Skip to content

Commit 450f8be

Browse files
mizu-junclaudehappy-otter
authored
docs: add PRODUCT.md and documentation map (#31)
Add docs/PRODUCT.md capturing product vision, target users, differentiation, capability-level requirements, and explicit non-goals (Mosh, core-embedded AI, DOM-based desktop UI, mandatory daemon). Reviewed at each minor/major release. Add a Documentation Map & Roles section to CLAUDE.md / CLAUDE.ja.md defining one job per persistent document (CLAUDE.md / PRODUCT.md / ARCHITECTURE.md / adr / plans / CHANGELOG), and link PRODUCT.md from both README documentation maps. Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Happy <yesreply@happy.engineering>
1 parent 122b1d9 commit 450f8be

5 files changed

Lines changed: 139 additions & 2 deletions

File tree

CLAUDE.ja.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,19 @@
22

33
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
44

5+
## ドキュメントマップと役割分担
6+
7+
永続ドキュメントはそれぞれ 1 つの役割を持つ。新しい内容はその役割を持つファイルに書き、他のファイルに重複させないこと。
8+
9+
| ドキュメント | 役割 | 更新タイミング |
10+
|---|---|---|
11+
| `CLAUDE.md` | Claude Code への作業ルール(どう作業するか) | ルール変更時。陳腐化した項目は削除 |
12+
| `docs/PRODUCT.md` | 製品要求・ビジョン・非目標(何をなぜ作るか) | マイナー/メジャーリリース節目でレビュー |
13+
| `docs/ARCHITECTURE.md` | システム設計(どう作られているか) | 構造変更時 |
14+
| `docs/adr/` | 個別の設計判断の記録(なぜそう決めたか) | 追記のみ。採択済み ADR は書き換えない |
15+
| `docs/plans/` | フェーズ付き作業計画・進捗(作業単位のステアリングファイル) | 作業中は随時。完了後は `plans/archive/`|
16+
| `CHANGELOG.md` | リリース履歴 | リリース時 |
17+
518
## ビルドコマンド
619

720
```bash
@@ -186,7 +199,7 @@ v1.4.0 で旧 `nexterm-launcher` クレートを削除。v0.9.3 でシングル
186199

187200
CIは`.github/workflows/ci.yml``master`ブランチへの push / PR をトリガーとして設定済み。Linux / macOS / Windows の3 OS マトリクスで `cargo test` / `cargo clippy -- -D warnings` / `cargo fmt --check` を実行する。
188201

189-
バージョンバンプは`Cargo.toml``[workspace.package] version`を更新すること(個別クレートのCargo.tomlではなく、ワークスペースルートのみ)。ワークスペースは Rust 2024 edition (`edition = "2024"`) を使用しているため、ビルドには Rust 1.85 以降が必要。
202+
バージョンバンプは`Cargo.toml``[workspace.package] version`を更新すること(個別クレートのCargo.tomlではなく、ワークスペースルートのみ)。ワークスペースは Rust 2024 edition (`edition = "2024"`) を使用しているため、ビルドには Rust 1.85 以降が必要。マイナー/メジャーバージョンを上げる際は `docs/PRODUCT.md` もレビューすること("Last reviewed" 行の更新と、出荷済み・取り下げ済み要求の反映)。
190203

191204
Flatpakビルドは`.github/workflows/flatpak.yml``ubuntu-latest`ランナー上で実行する。`container:`ブロックを使うと`apt-get`が利用できなくなるため使用しないこと。`flatpak remote-add``flatpak install``flatpak-builder`にはすべて`--user`フラグが必要(CI環境ではシステム操作の権限がない)。
192205

CLAUDE.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,19 @@ When adding a new document, default to English and only create a `*.ja.md` compa
2626

2727
**Rule of thumb:** if a human will read it inside a terminal session with Claude, write Japanese; if it will land in the repo or on GitHub for the world to see, write English.
2828

29+
## Documentation Map & Roles
30+
31+
Each persistent document has one job. Write new content in the file that owns that job; do not duplicate it elsewhere.
32+
33+
| Document | Role | When it changes |
34+
|---|---|---|
35+
| `CLAUDE.md` | Working rules for Claude Code (*how to work here*) | When a rule changes; delete stale entries |
36+
| `docs/PRODUCT.md` | Product requirements, vision, non-goals (*what & why to build*) | Reviewed at each minor/major release |
37+
| `docs/ARCHITECTURE.md` | System design (*how it is built*) | When the structure changes |
38+
| `docs/adr/` | Individual design decisions (*why we decided*) | Append-only; never rewrite accepted ADRs |
39+
| `docs/plans/` | Phased work plans with status/progress (steering files for units of work) | Continuously while the work is active; move to `plans/archive/` when done |
40+
| `CHANGELOG.md` | Release history | At each release |
41+
2942
## Build Commands
3043

3144
```bash
@@ -212,7 +225,7 @@ Releases are automated by `.github/workflows/release.yml` and triggered by pushi
212225

213226
CI is configured at `.github/workflows/ci.yml` and runs on push/PR against `master`. The 3-OS matrix (Linux / macOS / Windows) runs `cargo test`, `cargo clippy -- -D warnings`, and `cargo fmt --check`.
214227

215-
Bump the version in `Cargo.toml` under `[workspace.package] version` only (not in individual crate `Cargo.toml` files). The workspace uses Rust 2024 edition (`edition = "2024"`), so Rust 1.85+ is required.
228+
Bump the version in `Cargo.toml` under `[workspace.package] version` only (not in individual crate `Cargo.toml` files). The workspace uses Rust 2024 edition (`edition = "2024"`), so Rust 1.85+ is required. When bumping a minor or major version, also review `docs/PRODUCT.md` (update the "Last reviewed" line and reconcile any shipped or dropped requirements).
216229

217230
The Flatpak build (`.github/workflows/flatpak.yml`) runs on `ubuntu-latest`. Do not use a `container:` block — it disables `apt-get`. `flatpak remote-add`, `flatpak install`, and `flatpak-builder` all require the `--user` flag (CI has no system-level privileges).
218231

README.ja.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ background_opacity = 0.95
176176

177177
| ドキュメント | 内容 |
178178
|--------------|------|
179+
| [docs/PRODUCT.md](docs/PRODUCT.md) | 製品要求 — ビジョン、ターゲットユーザー、差別化、非目標(英語) |
179180
| [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) | クレート構成、プロセスモデル、描画パイプライン、IPC、BSP |
180181
| [docs/PROTOCOL.md](docs/PROTOCOL.md) | IPC プロトコル仕様(メッセージ型、フレーミング、ハンドシェイク) |
181182
| [docs/CONFIGURATION.md](docs/CONFIGURATION.md) | TOML / Lua 設定の完全リファレンス |

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ Full reference:
176176

177177
| Document | Contents |
178178
|----------|----------|
179+
| [docs/PRODUCT.md](docs/PRODUCT.md) | Product requirements — vision, target users, differentiation, non-goals |
179180
| [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) | Crate layout, process model, render pipeline, IPC, BSP |
180181
| [docs/PROTOCOL.md](docs/PROTOCOL.md) | IPC protocol spec (message types, framing, handshake) |
181182
| [docs/CONFIGURATION.md](docs/CONFIGURATION.md) | Full TOML / Lua configuration reference |

docs/PRODUCT.md

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
# Nexterm Product Requirements
2+
3+
- Status: living document, reviewed at each minor/major release (alongside `CHANGELOG.md`)
4+
- Last reviewed: 2026-07-06 (v1.13.0)
5+
- Owner: @mizu-jun
6+
7+
This document defines **what Nexterm is and why** — vision, target users, product
8+
requirements, and explicit non-goals. It is intentionally coarse-grained: it does not
9+
track in-flight work (that lives in [docs/plans/](plans/)) and it does not describe how
10+
the system is built (that lives in [ARCHITECTURE.md](ARCHITECTURE.md)).
11+
12+
## Vision
13+
14+
A daemonless terminal multiplexer in Rust that combines the session resilience of
15+
tmux, the rendering quality of a modern GPU terminal, and built-in remote
16+
connectivity — in a single binary that works the same on Linux, macOS, and Windows.
17+
18+
"Daemonless" means: the server is an internal tokio task inside the `nexterm` binary
19+
(or an optional standalone process); sessions survive client disconnects without the
20+
user ever managing a daemon.
21+
22+
## Target users
23+
24+
1. **Terminal power users** who want tmux-style multiplexing (BSP splits, attach/detach,
25+
session sharing) without giving up GPU rendering, ligatures, images, and CJK/IME support.
26+
2. **Remote operators** who live in SSH / SFTP / serial consoles and want host management,
27+
port forwarding, ProxyJump, and file transfer built into the terminal instead of a
28+
toolbox of separate utilities.
29+
3. **Windows users seeking a tmux equivalent** — first-class ConPTY + Named Pipe support,
30+
MSI/winget/Scoop distribution, and feature parity with the Unix build.
31+
4. **Teams with security / compliance requirements** who need supply-chain transparency
32+
(SBOM, SLSA provenance, signed updates, threat model) from their tooling.
33+
5. **Non-English users** — the UI ships in 8 languages (en/ja/zh-CN/ko/de/fr/es/it).
34+
35+
## Differentiation
36+
37+
Versus WezTerm / kitty / Alacritty / Ghostty / Windows Terminal, Nexterm's sustained
38+
differentiators (do not regress these):
39+
40+
| Differentiator | Notes |
41+
|---|---|
42+
| Sandboxed WASM plugin runtime | wasmi with fuel + memory caps; versioned stable ABI ([plugin-api.md](plugin-api.md)) |
43+
| Embedded web terminal | axum + xterm.js with token / OAuth / TOTP auth and optional TLS; no other OSS terminal ships this by default |
44+
| Full UI internationalization | 8 locales; among OSS terminals only Windows Terminal is comparable |
45+
| Supply-chain posture | minisign-verified updates + SLSA provenance + CycloneDX SBOM + STRIDE threat model |
46+
| In-app settings GUI | 7-category panel writing back to TOML; rare among OSS terminals |
47+
| TOML + Lua two-tier configuration | static safety plus dynamic scripting, both hot-reloaded |
48+
| Integrated SSH stack | agent auth, known-hosts, ProxyJump, SOCKS5, X11 forwarding, SFTP GUI, serial ports |
49+
| Consent-based security UX | per-capability consent prompts for OSC 52 clipboard, notifications, URL opens |
50+
| Accessibility | full AccessKit tree (NVDA / VoiceOver / Orca) for tabs, panes, dialogs, and the grid |
51+
52+
Competitive tracking (feature matrix, gap analysis) is a planning activity — see
53+
[plans/gap-roadmap-2026h2.md](plans/gap-roadmap-2026h2.md) for the current roadmap.
54+
55+
## Product requirements by area
56+
57+
Requirements are stated at the capability level. Shipped capabilities are the current
58+
contract; planned ones link to their plan file.
59+
60+
| Area | Requirement | Reference |
61+
|---|---|---|
62+
| Terminal emulation | VT100/ANSI with xterm extensions; Sixel, Kitty graphics, iTerm2 inline images; kitty keyboard (CSI u) and Text Sizing; OSC 8/52/133; underline extensions | `nexterm-vt`, [src/features/terminal.md](src/features/terminal.md) |
63+
| Multiplexing | Sessions survive client disconnect; BSP splits to arbitrary depth; zoom, swap, break/join, drag-resize; tabs with tearing; floating panes; session snapshots with versioned auto-migration | [ARCHITECTURE.md](ARCHITECTURE.md), ADR-0005, ADR-0007 |
64+
| Command blocks | OSC 133-based prompt → command → output → exit-code blocks, navigable and persistent (Warp-style) | [plans/blocks-implementation.md](plans/blocks-implementation.md) |
65+
| Remote connectivity | Built-in SSH (agent, known-hosts, port forwarding, ProxyJump, SOCKS5, X11), SFTP with progress UI, serial ports, web terminal with authenticated access | [src/features/ssh.md](src/features/ssh.md), [src/features/web.md](src/features/web.md) |
66+
| Extensibility | WASM plugins (sandboxed, versioned ABI, runtime load/unload/reload) and Lua (hooks, macros, status bar, key bindings) | [plugin-api.md](plugin-api.md), ADR-0004 |
67+
| Configuration | TOML for static config + Lua for dynamic overrides, hot-reloaded; settings GUI writes back preserving comments | [CONFIGURATION.md](CONFIGURATION.md) |
68+
| Internationalization | Every user-facing string localized in all 8 locales via `nexterm-i18n` | `nexterm-i18n/locales/` |
69+
| Accessibility | Screen-reader support via AccessKit; contrast ≥ 4.5:1; full keyboard operation; IME composition | CLAUDE.md UI/UX guidelines |
70+
| Security | Sandboxed extension surfaces; consent UI for sensitive escape sequences; UID-validated IPC; zeroized secrets; OS keychain integration | [THREAT_MODEL.md](THREAT_MODEL.md), [../SECURITY.md](../SECURITY.md) |
71+
| Distribution | Single binary; Linux (tarball, AppImage, Flatpak), macOS (Homebrew), Windows (MSI, winget, Scoop); signed auto-update | Release workflow |
72+
| Observability | PTY recording (raw + asciicast v2), access logs for the web terminal, `NEXTERM_LOG` tracing | `nexterm-ctl record` |
73+
74+
## Non-goals
75+
76+
Explicit decisions **not** to build (rationale recorded where the decision was made):
77+
78+
- **Mosh support** — XL effort for low demand ([plans/gap-roadmap-2026h2.md](plans/gap-roadmap-2026h2.md)).
79+
- **Core-embedded AI assistant** — AI features belong in the plugin layer on top of the
80+
read API, keeping the core AI-free (same roadmap; the WASM sandbox + consent UI is
81+
the differentiator there).
82+
- **A DOM/web-based desktop UI** — the GUI is rendered natively with wgpu + cosmic-text;
83+
no HTML/CSS/React layer (CLAUDE.md UI/UX guidelines). The web *terminal* feature is a
84+
remote-access endpoint, not the desktop UI.
85+
- **A mandatory resident daemon** — the daemonless single-binary model is the identity
86+
of the product (see Vision).
87+
88+
## Quality attributes
89+
90+
- **Compatibility**: IPC protocol and snapshot schema are versioned (`PROTOCOL_VERSION`,
91+
`SNAPSHOT_VERSION`) with monotonic bumps and auto-migration for older snapshots
92+
(ADR-0002, ADR-0007). Plugin ABI changes bump the plugin API version ([plugin-api.md](plugin-api.md)).
93+
- **Performance**: GPU-rendered with damage tracking and diff-based grid updates;
94+
regressions are guarded by the benchmarks in [benchmarks.md](benchmarks.md).
95+
- **Reliability**: no `unwrap()` in production code; poison-lock recovery; fuzzing
96+
(cargo-fuzz) and property tests on the VT parser; 3-OS CI matrix.
97+
- **Security**: STRIDE threat model maintained in [THREAT_MODEL.md](THREAT_MODEL.md);
98+
cargo-deny + SBOM + provenance in CI; periodic audit rounds ([plans/](plans/)).
99+
100+
## Related documents
101+
102+
| Document | Answers |
103+
|---|---|
104+
| This file | What to build and why; non-goals |
105+
| [ARCHITECTURE.md](ARCHITECTURE.md) | How the system is built |
106+
| [PROTOCOL.md](PROTOCOL.md), [plugin-api.md](plugin-api.md) | Interface contracts |
107+
| [adr/](adr/README.md) | Why individual design decisions were made |
108+
| [plans/](plans/) | What is being worked on now (phased work plans) |
109+
| [CHANGELOG.md](../CHANGELOG.md) | What shipped when |

0 commit comments

Comments
 (0)