feat(route): give next-cost a writer, and make the rubric the only copy
The board line's next-cost field had a reader (board.sh) and no writer, so
its value was retyped by hand every session and drifted into several
competing spellings. Cleaning the data could not fix that: the cause was the
missing write path.
route.sh is that writer. Four scored traits of the next task -- path,
verification, reversibility, scope -- plus a required rationale, run through
the operator's model rubric moved here as the single copy. The row table is a
closed set of six values, so a seventh spelling cannot enter circulation, and
route-selftest.sh section 6 runs the round trip (route emits -> board parses)
inside one repo rather than across two.
Two spellings of one decision come out of one table: the rubric name for the
board line, the CLI alias for the command the operator pastes. Effort levels
are the set pinned in this marketplace; model aliases are gated against the
installed claude rather than hardcoded.
Three things worth naming:
- Escalation is asymmetric. Any single trait escalates; the cheapest row needs
all four at the cheap end. Underkill costs one session, overkill costs quota
every session -- but a wrong architecture call costs more than either.
- The Fable rows fire only from an explicit judgement flag, never inferred
from the last-session record. "The session did not finish" also covers
context exhaustion and operator interrupts, which say nothing about the
model, and Fable runs without an advisor.
- The trait block is a single-line HTML comment because board.sh's NESTE
extractor skips only lines that START with '<!--'. Measured first: a YAML
block or a multi-line comment silently replaces the repo's next step on the
board with "next_task:". Pinned by section 7.
board.sh is untouched as a program; its header now points at route.sh for the
value set so this does not reopen the two-specs defect 305f168 closed.
Selftests: coord 136, board 30, route 47 (new), node 7.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017peNgsxVt1BR4BTuMwiPoX
This commit is contained in:
parent
305f1687b7
commit
0d1183800e
8 changed files with 808 additions and 11 deletions
13
README.md
13
README.md
|
|
@ -77,7 +77,13 @@ Since v0.8.0 it closes with one aggregate line about mail pending in *other* mai
|
|||
|
||||
The mailbox is one of its three inputs, which is why the board lives here. Note the axis: a repo's pending count means *others are waiting on it*, an obligation it owes outward. Who a repo waits *on* comes only from its own board line, because the message format has no reply-to field.
|
||||
|
||||
**CLI.** The engine is six bash scripts in the plugin's `scripts/` directory; resolve them as `"${CLAUDE_PLUGIN_ROOT:-$HOME/.claude}/scripts/coord-<name>.sh"` (from a terminal, use the plugin's install path):
|
||||
**Choosing what to run the next session with (the `route` skill).** The board's cost column has to come from somewhere. `route.sh` is a pure calculator: score four traits of the next task — is the solution path `known`, `partial` or `undetermined`; will `verification` be `strong`, `weak` or `none`; is it `cheap`, `costly` or `one-way` to reverse; is the `scope` `local`, `multi-file` or `cross-cutting` — and it returns the model and effort, a pasteable startup command, and the one-step-cheaper fallback for when quota is tight. Escalation is asymmetric: any single trait escalates, while the cheapest row needs all four at the cheap end. A free-text rationale is required, because that is where a misscore is found later.
|
||||
|
||||
It lives here because it is the **writer** for the cost field the board already reads. That field had a reader and no writer, so it was retyped by hand every session and drifted into several spellings; the row table is a closed set, so a new spelling cannot enter circulation, and the selftest runs the round trip — route emits, board parses — inside one repo instead of across two. Nothing about `board.sh` changes: a calculator printing to stdout writes nothing, and the session writes its own STATE.md.
|
||||
|
||||
Scoring is judgement and belongs to the skill; turning scores into a row is a lookup and costs no model calls. One deliberate side effect is worth more than the tokens saved: a next step that cannot be scored `known` or `partial`, with no design phase planned, is an **underspecified task description** — the answer is to rewrite the step, not to upgrade the model.
|
||||
|
||||
**CLI.** The engine is seven bash scripts in the plugin's `scripts/` directory; resolve them as `"${CLAUDE_PLUGIN_ROOT:-$HOME/.claude}/scripts/coord-<name>.sh"` (from a terminal, use the plugin's install path):
|
||||
|
||||
coord-send.sh --to <repo> --subject "<subject>" [--message "<text>"] # or body on stdin
|
||||
coord-send.sh --broadcast --subject "<subject>" <<'BODY' ... BODY
|
||||
|
|
@ -87,6 +93,8 @@ The mailbox is one of its three inputs, which is why the board lives here. Note
|
|||
coord-done.sh <filename>... | --all # archive without replying
|
||||
coord-count.sh [--exclude <mailbox>] # count pending per mailbox, delivering nothing
|
||||
board.sh [--roots <dir>[,<dir>...]] # cross-repo attention board (read-only)
|
||||
route.sh --path <v> --verification <v> --reversibility <v> \
|
||||
--scope <v> --rationale "<why>" # model + effort for the next session
|
||||
|
||||
The reply/resolve hints the hook injects (`-> reply: coord-send --reply-to … | done without reply: coord-done …`) refer to these scripts.
|
||||
|
||||
|
|
@ -125,7 +133,8 @@ Note that raising the inbox's priority (Rule 7) deliberately does **not** widen
|
|||
|
||||
bash scripts/coord-selftest.sh # 136 checks against a throwaway mailbox
|
||||
bash scripts/board-selftest.sh # 30 checks against a throwaway repo tree
|
||||
npm test # both selftests via node --test
|
||||
bash scripts/route-selftest.sh # 47 checks, incl. the route->board round trip
|
||||
npm test # all three selftests via node --test
|
||||
|
||||
TDD is the house rule: every behavior change lands with a failing selftest check first.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue