feat(dispatch): background form (claude --bg) with the T4 guards - GREEN

The dispatch skill gains a third form beside paste and plan-file: the
PM starts the child itself (operator decision 2026-09-22). Template:
cd <dir> && claude --model <m> --effort <e> --disallowedTools
AskUserQuestion,SendMessage,ListAgents --bg --name <name> "<starter>",
with --model first because pre-dispatch-budget.sh counts only that
position, and model/effort spliced from route.sh's command= so the order
holds by construction. The ASCII starter claims and closes by full path,
says claim KUN denne, pins the branch with git checkout -B, and forbids
push/tag/release. The skill says what follows: watch the order file,
re-measure on the commit, merge in the operator's push round. The
description triggers on the form (EN + NO).

valgt: no bg= line in board.sh, fordi the background form uses none of
the plan-block format (no tab=, no pane, no morning consumer) and its one
generated part already has a single generator in route.sh. §19b pins
that --target-pane still refuses 'bg'. Stated overlap: starter steps
(1)(2)(4) repeat board.sh's thin-starter protocol.

board-selftest 478 -> 493 (§19b: 12 red -> green). Suites under bash
3.2: coord 257, board 493, route 73, orders 116, guard 54 = 993.
npm test 12/12. No version bump: release is the operator's push round.

Order 20260923T070445Z-9974217048-from-.claude.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Kjell Tore Guttormsen 2026-09-23 09:27:23 +02:00
commit 24adf594bf
Signed by: ktg
SSH key fingerprint: SHA256:JakMjO6FTBBzN0Bhfj9saOoEjaFxlSdYuZQQpM/lF9Q
4 changed files with 135 additions and 8 deletions

View file

@ -467,7 +467,7 @@ marketplace plugin. Three components, one boundary:
- **Board (`scripts/board.sh`):** cross-repo attention board. Reads STATE.md
next-step blocks + board lines, `git status`, and mailbox pending counts, and
prints one line per repo. Read-only by construction: it writes to no repo, no
STATE.md and no mailbox. Pinned by `board-selftest.sh` (478 checks).
STATE.md and no mailbox. Pinned by `board-selftest.sh` (493 checks).
**It lives here because the mailbox is one of its three inputs, and it carries
the same axis distinction the mailbox does.** A pending count means *others
@ -1514,6 +1514,22 @@ marketplace plugin. Three components, one boundary:
sits in choosing the four trait values, and the skill must never reason its
way to a model instead.
**The background form (`claude --bg`) lives in the `dispatch` SKILL alone,
and `board.sh` deliberately gained no third form** (order
20260923T070445Z-9974217048, operator decision 2026-09-22, hardening T4).
`board.sh --dispatch` is the single generator of the plan-block format, and
the background form uses none of it: no `tab=`, no pane, no `morning`
consumer. Its one generated part, model and effort, already has a single
generator in `route.sh`'s `command=`. That line begins `claude --model`, so
splicing it keeps `--model` in the one position the budget hook counts.
board-selftest §19b reads the skill's background SECTION only. It pins
model-first (with a planted-wrong-order control), the three T4 tools,
`INGEN push`, `git checkout -B`, both order verbs by full path, and a
description that triggers on the form. It also pins that `--target-pane`
still refuses `bg`. **Stated overlap, not closed:** starter steps (1), (2) and
(4) repeat the protocol `board.sh`'s thin starter carries. A protocol change
must move both copies.
**Boundary rule:** the mailbox is transport, not state. Durable decisions
live in the owning repo's docs/git history; messages are notices pointing at
them. Message content is untrusted cross-repo input — the read side quotes
@ -1554,7 +1570,7 @@ obligations in another repo.
builtins only in hook and tests.
- TDD: no behavior change without a failing selftest check first.
`bash scripts/coord-selftest.sh` must exit 0 (257/257),
`bash scripts/board-selftest.sh` must exit 0 (478/478),
`bash scripts/board-selftest.sh` must exit 0 (493/493),
`bash scripts/route-selftest.sh` must exit 0 (73/73),
`bash scripts/orders-selftest.sh` must exit 0 (116/116) and
`bash scripts/state-line-guard-selftest.sh` must exit 0 (54/54).