CB-WP-0004 T03: make status — one-shot orientation

49 turns and $6.87 per CB-RES-0003 went to grep/ls/wc answering "what is
the state of this repo". tools/status.py answers it in 22 lines: commit
and working-tree state, every workplan with task counts, the next todo
task, spend since the last commit against CB-01/CB-02, and the three fast
gates.

Two constraints are deliberate. It does not build — a status command that
takes two minutes gets replaced by `ls` within a day. And it states its
own limit in the output ("slow gates not run here"), so a green status
cannot be misread as a green `make all`; the self-test asserts that line
is present, and that the whole report stays under 40 lines.

The positive control is the refusal to be confidently empty: a parser
that found zero workplans and zero tasks would print a clean, wrong
picture, which is worse than the greps it replaces. It also caught a
dot-all regex that returned twenty paragraphs of the preceding task's
prose as the "task heading".

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
tegwick 2026-07-31 10:20:27 +02:00
parent 3e1395dd60
commit 6281cd546e
3 changed files with 304 additions and 1 deletions

View file

@ -154,6 +154,24 @@ are exactly what this prints.
Confidence medium: some inspection is genuinely exploratory and will not
disappear, and the review says so.
**Delivered.** `tools/status.py` + `make status`, 22 lines of output:
commit and working-tree state, every workplan with its task counts, the
next todo task with its heading, spend since the last commit against
CB-01/CB-02, and the three fast gates.
Two deliberate constraints. It **does not build** — a status command that
takes two minutes gets replaced by `ls` within a day — and it **states
its own limit** in the output (`slow gates not run here`), so a green
`status` cannot be misread as a green `make all`. The self-test asserts
the output stays under 40 lines, because the failure mode for an
orientation tool is becoming another thing to skim.
Its positive control refuses the confidently-empty report: a parser that
found zero workplans and zero tasks would print a clean, wrong picture,
which is worse than the greps it replaces. That control also caught a
dot-all regex that returned twenty paragraphs of a previous task's prose
as the "task heading".
## Phase B — The one that also closes an error class
## Task: Fact registry and `make facts-check`