Repository Public
1# NEXTERM — Implementation plan23Target: a native macOS terminal + agentic workspace (see `CLAUDE.md`). This plan is the ordered4list of milestones; `docs/PROGRESS.md` tracks verified state.56## Environment (inspected 2026-11-01)7| Item | Value |8|---|---|9| Machine | MacBook Pro, Apple M5 Max, 18 cores, 48 GB |10| macOS | 27.0 (26A5425a) |11| Xcode / Swift | Xcode 27.2 (27B52), Swift 6.4.2, SDK macOS 26 |12| Displays | 5120×2880 external (main) + built-in 3456×2234 |13| Claude CLI | `/opt/homebrew/bin/claude` 2.1.316 (`--session-id`, `--settings <file-or-json>` available) |14| Signing | Developer ID Application: Simon-Pierre Boucher (3YM54G49SN); Apple Development identities |15| Notarization | `notarytool` keychain profile `MacLustr-Notarize` (history: MacLustr-5.0.0.dmg Accepted 2026-09-29) |16| Tools | xcodegen 2.45.4, git 2.x, tmux (brew, installed for tests), sqlite 3.54, zig 0.17 (spike only) |17| Known toolchain issue | Xcode 27.2 CoreDevice/CoreSimulator plug-ins fail to load on macOS 27.0 — noise only, macOS builds succeed |1819## Architecture (see docs/ARCHITECTURE.md)20* `NEXTERMKit/` Swift package, Swift 6 strict concurrency:21 `WorkspaceCore` (layout tree, models) · `TerminalCore` (SwiftTerm adapter, sessions, registry) ·22 `PersistenceCore` (SQLite) · `GitCore` · `RemoteCore` · `ClaudeIntegration`.23* `Sources/NEXTERM/` SwiftUI + AppKit app: workspace controller, windows, tabs, pane canvas,24 sidebar, inspector, Mission Control, settings, command palette, design system.25* Xcode project generated by `xcodegen` from `project.yml`.2627## Milestones28| # | Phase | Scope | Exit criteria |29|---|---|---|---|30| 0 | Discovery & spike | Toolchain inspection, engine ADR, PTY proof in a native window | Build + launch + typed command round-trips (DONE) |31| 1 | Terminal MVP | Sessions, tabs, nested splits, focus, close semantics, shortcuts, windows, appearance, clipboard, find | Acceptance tests 1–3 pass |32| 2 | Workspace system | SQLite persistence, session registry independent of views, multi-window, pane move across windows, display recovery, templates | Acceptance 4–6 pass |33| 3 | Claude Code | CLI discovery, interactive sessions, labels, opt-in verified hooks via `--settings`, notifications, Mission Control | Acceptance 7 pass |34| 4 | SSH, tmux, Git | ssh config hosts, host-key handling, reconnect, tmux attach, git status/diff/log/worktrees with safety | Acceptance 8–10 (9/10 BLOCKED if no host) |35| 5 | Polish & release | Accessibility, settings, palette, perf measurements, docs, tests, Release build, Developer ID signing, notarization | Acceptance 11–12 pass; notarized DMG |3637## Key design rules38* Session ownership: `SessionRegistry` owns `TerminalSession`s; SwiftUI only reparents the39 long-lived `NSView`. Layout edits never touch the PTY.40* Stable IDs for workspace/window/tab/pane/session/split.41* Restoration = re-creating processes from saved profiles (cwd, kind). Only tmux-backed and42 `claude --resume` sessions reattach; the UI says which.43* Claude hooks: scoped per launch through `claude --settings <nexterm-hooks.json>` (verified CLI flag),44 never by editing `~/.claude/settings.json`.45* All child processes are launched with argument arrays; no shell string concatenation.46