feat(board): give the plan a paste= line the operator can actually use
--plan shipped with dir= and command= as separate fields. That is right for a driver, which moves the pane itself and then types the command, and unusable for a person: the first operator to read a block could not act on it at all. Joining an absolute path from one field with a command from another is not a saved line of output. It is the step where a session gets started in the wrong repository - the same failure the absolute dir= exists to prevent, moved from the machine to the human. paste= is the two already joined, cd <dir> && <command>, one thing to select. Both forms stay: the two consumers want the same fact shaped differently, and neither shape serves both. Emitted only alongside command=, never once per block. A `paste=cd X && ` with nothing after it would run the cd and then a bare newline, which fails SILENTLY - the operator ends up in the right directory with no session started and no error to notice. board-selftest: 86 -> 89 checks. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011eKRzhD1RqY2MxvDEkrJAM
This commit is contained in:
parent
6d0fe14d0f
commit
5bea1f8651
10 changed files with 76 additions and 9 deletions
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
*AI-generated: all code produced by Claude Code through dialog-driven development.*
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
|
|
@ -111,6 +111,8 @@ It makes **zero model calls**, which is the point rather than a detail. Under su
|
|||
|
||||
It prints `key=value` blocks rather than prose because it has **two consumers**: the operator pasting a command, and a separate repo driving a terminal from it. Prose would make the rendered format an API that no test here could hold stable for a consumer living in another repo. Each block carries `dir=` as an absolute path — a new terminal pane inherits its anchor's working directory, so a plan that omitted it would look right and point at the wrong repo. A repo whose route line is missing or unparseable gets `command_missing=` with the reason, never an empty `command=`: a driver reading `^command=` would type a blank line into a live pane.
|
||||
|
||||
The two consumers want the same information shaped differently, so each block carries both. `dir=` and `command=` stay separate for a driver, which moves the pane itself and then types the command. **`paste=` is the operator's line** — the two already joined into one `cd … && claude …` to select and paste. Asking a person to assemble a directory from one field and a command from another is not a saved line of output; it is the step where a session gets started in the wrong repository. `paste=` is emitted only where `command=` is, since `paste=cd X && ` with nothing after it would run the `cd` and then a bare newline, leaving you in the right directory with no session and no error.
|
||||
|
||||
Driving a terminal from this plan deliberately lives **outside this repo**. That work is a version-pinned, undocumented composition on top of a preview API whose documented path is already broken upstream, and its blast radius reaches into other repos' running sessions. The dependency runs one way — the driver consumes the plan, the plan never knows a terminal exists — so if the terminal API breaks, the plan still prints and the operator still pastes.
|
||||
|
||||
## Security Model
|
||||
|
|
@ -147,7 +149,7 @@ Note that raising the inbox's priority (Rule 7) deliberately does **not** widen
|
|||
## Development
|
||||
|
||||
bash scripts/coord-selftest.sh # 183 checks against a throwaway mailbox
|
||||
bash scripts/board-selftest.sh # 86 checks against a throwaway repo tree
|
||||
bash scripts/board-selftest.sh # 89 checks against a throwaway repo tree
|
||||
bash scripts/route-selftest.sh # 73 checks, incl. the route->board round trip
|
||||
npm test # all three selftests via node --test
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue