repo-mailbox/scripts
Kjell Tore Guttormsen b70786db46 fix(board): cut the rationale before extracting route traits, not after
route_cmd_for()'s four extractions searched the WHOLE route line with a
greedy `.*trait=`, so a rationale that names a trait won the match over the
field itself. route.sh --help asks for a rationale per score, so a real
rationale names the traits routinely - this is the ordinary shape of the
data, not an edge case. route.sh then correctly refused the prose, --plan
printed command_missing=, and the operator read a broken PARSER as "that
repo has no route line": Verifiseringsloven ansikt 4 aimed at our own tooling.

Measured by .claude on four live STATE.md files before the order was written,
then re-measured here rather than quoted: A/B-ing the pre-fix script against
this one over the real tree at the same moment gives 25 tabs, command_missing
7 -> 2, and the five repos that gained a command (app-creator, catalog,
claude-code-llm-wiki, llm-security-commons, portfolio-optimiser-commons) are
exactly the five the order named. The two that remain are real and belong to
their own repos: okr writes scope=multi-module, outside the vocabulary, and
llm-security has no route line at all.

The cut keys on the FIRST `rationale=`, not on `; rationale=`: everything from
that token on is free text by definition, and the separator form would miss a
line written without the space. F4's [^;>]* class is untouched - the two answer
different questions and neither replaces the other.

The board line needs no equivalent change, and that was measured rather than
assumed: `grep -n 's/\.\*' scripts/board.sh` is the denominator, and the board
line's grammar carries no free-text field.

Selftest section 23 (7 checks, 252 -> 259) pins both failure directions,
including the sharp inverse where the FIELD is invalid (known2) while the
rationale holds a VALID value - before the fix that emitted a confident
command= built on prose the STATE line never declared. Two known-positive
controls prove the cut does not break the path that already worked.

Closes order 20260820T204409Z-8157821110-from-.claude

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AZa4oEsa93ac6pZQFEXqBF
2026-08-20 23:06:09 +02:00
..
board-selftest.sh fix(board): cut the rationale before extracting route traits, not after 2026-08-20 23:06:09 +02:00
board.sh fix(board): cut the rationale before extracting route traits, not after 2026-08-20 23:06:09 +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-order-claim.sh fix(orders): call the order-verbs by absolute path, not bare PATH names 2026-08-18 09:16:59 +02:00
coord-order-done.sh fix(orders): narrow the return-reason escape so a plain arrow survives 2026-08-17 21:24:37 +02:00
coord-order-inbox.sh fix(orders): call the order-verbs by absolute path, not bare PATH names 2026-08-18 09:16:59 +02:00
coord-order-send.sh fix(coord): refuse a control character in --to instead of sanitizing it 2026-08-18 17:00:34 +02:00
coord-selftest.sh fix(coord): refuse a control character in --to instead of sanitizing it 2026-08-18 17:00:34 +02:00
coord-send.sh fix(coord): refuse a control character in --to instead of sanitizing it 2026-08-18 17:00:34 +02:00
coord-sweep.sh fix(coord-send): stop rejecting dot-prefixed repo names 2026-08-09 21:09:23 +02:00
orders-selftest.sh fix(coord): refuse a control character in --to instead of sanitizing it 2026-08-18 17:00:34 +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 feat(state-line-guard): deny status=done while commits are unpushed 2026-08-16 22:06:44 +02:00