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:
parent
3e1395dd60
commit
6281cd546e
3 changed files with 304 additions and 1 deletions
8
Makefile
8
Makefile
|
|
@ -24,7 +24,7 @@ TOOLS := $(REPO)/tools
|
|||
# Every cargo recipe runs at the repo root; the shell does not persist cd.
|
||||
IN_REPO := cd $(REPO) &&
|
||||
|
||||
.PHONY: check test sim bench bench-test coverage dep-weight cost cost-test cost-pin cost-budget cost-mix loop-lint self-tests env-test task-done loc all
|
||||
.PHONY: check test sim bench bench-test coverage dep-weight cost cost-test cost-pin cost-budget cost-mix loop-lint self-tests env-test task-done status loc all
|
||||
|
||||
## fmt + clippy (deny warnings) + HashMap deny-lint
|
||||
check:
|
||||
|
|
@ -62,6 +62,7 @@ self-tests:
|
|||
$(PY) $(TOOLS)/dep-weight.py --self-test
|
||||
$(PY) $(TOOLS)/repo.py --self-test
|
||||
$(PY) $(TOOLS)/task-done.py --self-test
|
||||
$(PY) $(TOOLS)/status.py --self-test
|
||||
|
||||
# T01 positive control: prove the environment fix, do not assume it. Runs
|
||||
# every tool from a foreign working directory with a PATH that has no
|
||||
|
|
@ -80,6 +81,11 @@ env-test:
|
|||
@$(MAKE) -C $(REPO) coverage >/dev/null \
|
||||
&& echo " [ok ] make -C <repo> works from any directory"
|
||||
|
||||
# T03: one-shot orientation — workplans, next task, spend, fast gates.
|
||||
# Cheap by design: no build. Start a session with this instead of grepping.
|
||||
status:
|
||||
@$(PY) $(TOOLS)/status.py
|
||||
|
||||
# T02: close a task — flip the workplan file, read the *measured* cost
|
||||
# from the transcripts, push the hub event with real numbers. Refuses on an
|
||||
# unknown or already-done task, and refuses to report an estimate.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue