repo-mailbox/scripts
Kjell Tore Guttormsen 1ee003328c feat(board): --dispatch, the startup command a dispatched session can act on
"Start a session in repo X, on order Y, at cost Z" was produced by hand, and
it misfired four times on 2026-08-16 across two repos. Three distinct holes,
all measured, all closed here:

1. A bare `claude --model X --effort Y` forces the operator to type Go, and
   the session then guesses its task out of STATE.md. The emitted command
   carries the prompt in argv: `... "$(cat <file>)"`. Verified directly that
   this passes the file's bytes as ONE argv element with no re-evaluation, so
   $(...), backticks, quotes and UTF-8 in the prompt BODY are inert - only the
   PATH is expanded, so it must be absolute and shell-clean.
2. --no-go stops only the follow-up Go message, never the work (morning:806).
   The plan-file form says so in its own output, not just in a comment.
3. A session dispatching its own next session gets an empty plan: morning's
   plan_drop_open (morning:1788) drops a block whose repo already has a pane,
   and --dry-run says "0 of 1", which reads as a broken plan file. --dispatch
   therefore emits two forms, chosen by --target-pane: a plan block, or a
   bare paste line for the tab that already exists (and no tab= key at all,
   so it can never be fed to morning as a plan).

Generator ownership, the question left open for two sessions: it goes in
board.sh, which already owns the block format including paste=. A second
emitter of tab=/repo=/dir=/command=/paste= would be two copies of one file
format. Read-only survives - the prompt file and the plan file are written by
the caller, the brief-nightly.sh split unchanged.

--target-pane yes|no is REQUIRED with no default, the same rule --last-effort
carries: it is a measurement (morning --probe-panes, which works without a
tty), and the dry-run cannot substitute for it - run from a Claude session
morning reports "window: unknown ... assuming an empty window" and
plan_drop_open never fires, so a dry-run gate would pass the self-dispatch
case every time.

Cost comes from route.sh's row table; --dispatch deliberately takes no
--model/--effort, because --advisor opus is a property of the ROW and a
dispatch taking the model directly has no honest source for that flag.

New skills/dispatch/SKILL.md is the front door. board-selftest 183 -> 217.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ett8uHMDLir6trFaMzrYRu
2026-08-16 16:05:53 +02:00
..
board-selftest.sh feat(board): --dispatch, the startup command a dispatched session can act on 2026-08-16 16:05:53 +02:00
board.sh feat(board): --dispatch, the startup command a dispatched session can act on 2026-08-16 16:05:53 +02:00
brief-nightly.sh feat(brief): render the nightly cross-repo briefing without a model 2026-08-01 22:38:46 +02:00
coord-count.sh fix(coord-count): distinguish claimed from unmeasured, fix Linux date parse 2026-08-14 23:44:01 +02:00
coord-done.sh feat(engine): make a bulk close state what Rule 7 says must be stated 2026-07-31 15:48:42 +02:00
coord-inbox.sh feat(engine): let a message say it needs no answer, and count debt without losing sight of the rest 2026-07-31 15:46:14 +02:00
coord-selftest.sh fix(coord-send): reply mode claimed "marked handled" without checking 2026-08-16 15:42:13 +02:00
coord-send.sh fix(coord-send): reply mode claimed "marked handled" without checking 2026-08-16 15:42:13 +02:00
coord-sweep.sh fix(coord-send): stop rejecting dot-prefixed repo names 2026-08-09 21:09:23 +02:00
route-selftest.sh feat(route)!: Fable rows are a hand-written override, never a route.sh outcome 2026-08-09 22:03:05 +02:00
route.sh feat(route)!: Fable rows are a hand-written override, never a route.sh outcome 2026-08-09 22:03:05 +02:00
state-line-guard-selftest.sh fix(state-line-guard): Edit path used String.replace, not a function 2026-08-15 20:37:18 +02:00