|
| 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