repositories / smith

smith

There are many coding harnesses - but this one is fast

owned by bugabinga

docs: add product walkthrough (SPEC §1.1) (#4)

e56427dba3eccd874438061406312c254aa8944b

Oliver Jan Krylow <oliver@bugabinga.net> ·

SSH signature · not checked

Browse filesCompare with HEAD

Final readiness-gap pass: the product as a user meets it, nine scenes
pinning observable behavior with contracts owned by cited sections.
User decisions applied:

- empty first screen shows dim hint lines that vanish at first entry;
  no wizard, no onboarding,
- no-auth first message: the recoverable error IS the guidance (env
  var + /auth login OAuth path, new §9.11 built-in); message stays in
  the input for resend,
- all border panels closed by default; panels strictly opt-in,
- model switching operates on §5.7 resolver names (aliases/groups/
  buckets) as first-class vocabulary — ctrl+l cycles a shortlist,
  /model (new §9.11 built-in) fuzzy-picks; raw IDs are fallback,
- terminology pinned up front and kept distinct throughout: tree
  navigation (conversation, §6.5) vs time travel (workspace file
  state via VCS ops, §9.13) vs replay (recorded traces, §6.11).


Claude-Session: https://claude.ai/code/session_01LABEHeVpg74oyZNtWLUWpB

Co-authored-by: Claude <noreply@anthropic.com>

Changed files (1)

+65 / −1 text lines

Diff layout

docs/SPEC.md

Modified

+65 / −1 text lines

3636 shape-level (named types, behavior, properties) for internal Rust. Code
3737 blocks are illustrative unless a section says otherwise.
39### 1.1 Walkthrough
41The product, as a user meets it. Each scene pins observable behavior; the
42cited sections own the contracts. Three features that must never blur:
43**tree navigation** moves through the conversation tree (§6.5, files
44untouched), **time travel** moves workspace file state through the VCS
45operation timeline (§9.13), and **replay** re-executes a recorded trace
46(§6.11, never the live session).
48**First run.** `smith` in a project directory. No config exists; defaults
49apply (§5.6). Capabilities probe once, fail-conservative (§8.3). The default
50layout plugin renders status bar (model, context %, cost), message history,
51input, hint bar — all border panels closed; panels are strictly opt-in
52(§8.7). The empty history shows a few dim hint lines (active model, how to
53begin, `smith help`) that vanish at the first entry. No wizard, no
54onboarding. Startup under 100ms (§13).
56**First message, no auth.** The user types; auth resolution fails fast
57before the first stream (§7.4). The error is the guidance: a recoverable
58error (§5.8) renders in history naming the missing credential, the env var
59to set, and `/auth login <provider>` for OAuth (§9.11); the message stays in
60the input for immediate resend. The failure teaches; no setup flow exists.
62**First task.** Text streams as it arrives. Tool calls render as collapsed
63one-liners that expand on selection (§8.10); cost and context tick live in
64the status bar. `!cargo test` runs directly and lands as a bash-execution
65entry (§6.5). Every mutating tool records a VCS operation invisibly (§9.13)
66— no commit prompts, no jj exposed.
68**Steering.** Mid-run, the user types a correction and enters — it queues as
69a steer; a modifier queues a follow-up instead (§6.1). The queue renders
70between history and input (§8.11). In-flight tools finish, never-started
71calls skip, the steer lands, the model re-plans. Cancel keys pop the queue
72newest-first; only an empty queue aborts.
74**Tree navigation.** A refactor went sideways. `/tree` shows the session
75tree; the user switches the leaf to the pre-refactor entry. The conversation
76rewinds; files do not (§6.5). A new message from here is a new branch,
77silently.
79**Time travel.** The files are still wrong. The time-travel timeline shows
80the VCS operations recorded around each entry; the user inspects op diffs
81and restores the workspace to the pre-refactor op (`/undo`, or restore from
82the timeline). Tree navigation answers "where were we in the conversation";
83time travel answers "what did the files look like." The timeline bridges
84them by offering the restore for the op recorded at the current entry — but
85they are separate axes.
87**Model switching.** `ctrl+l` cycles a configured shortlist; `/model` opens
88a fuzzy picker. Both operate on resolver names (§5.7) — aliases, groups,
89buckets — as first-class vocabulary, with the picker showing what each name
90resolves to. Raw provider/model IDs are the fallback, not the interface.
92**Leaving and returning.** Quit restores the terminal (§10). `smith
93continue` resumes the last session in cwd — same leaf (§6.5 replay rule),
94queues empty (§6.1, process-ephemeral), accumulated cost in the status bar.
95`smith attach` fuzzy-picks among sessions.
97**Replay.** To understand yesterday's session: `smith replay <session>
98--speed 2` re-plays it visually; `--compare` re-executes tools and diffs
99current outputs against recorded ones (§6.11). Replay reads the trace and
100never touches the live session.
39102## 2. Workspace
41104### 2.1 Crates
17041767- tools: `read`, `write`, `edit`, `bash`, `find`, `grep`, `ls`,
17051768- slash commands: `/undo`, `/redo`, `/history`, `/tree`, `/reload-config`,
1706 `/secret` (§6.7), replay/time-travel,
1769 `/secret` (§6.7), `/auth login <provider>` (§7.4 OAuth flow), `/model`
1770 (fuzzy picker over §5.7 resolver names), replay/time-travel,
17071771- VCS tools,
17081772- default layout,
17091773- default keybindings,