Commit c8fc171
feat(help): --help becomes two tiers — one line per flag, every disclosure one call away
`ripwire --help` printed 185,540 B / ~46,000 tokens in one flat document: every flag's purpose
AND every caveat that flag has ever earned, interleaved. On a tool whose pitch is token
efficiency that was the most expensive thing it could print.
The fix is a SPLIT, not a cull. Nothing was deleted; 133 opening lines were relocated.
--help one plain-speech line per flag ~4,473 tokens (was ~46,385)
--help=--FLAG that flag's whole entry, every disclosure intact
--help=SECTION one family at full detail
--help=all the entire former catalog
WHAT DECIDED THE DESIGN. Not length — reachability. test/legendcostcheck.sh records that an
outside evaluation (callstack/agent-device #2400) measured ripwire spending ~10% MORE tokens
than grep-and-read, traced it to the per-call legend, and that the fix (--legend=compact) was
ALREADY documented in --help: "buried four lines into a schema description, so nobody extracted
it." That sentence sits at line 1465 of 1597. An evaluator holding the exact question did not
find the answer they were standing on. The defect was not that the text was long; it was that a
fact inside it had no address. So the flags got addresses.
Measured here first: 156 entries, median 6 lines, mean 10, max 46; the top 30 carried 53% of the
bytes and 61 opening lines did not stand alone, so a "keep line 1, drop the rest" cull would have
shipped 61 broken fragments. Every rewritten line pushes its old text down one row rather than
replacing it, so tier 2 gained the summaries (+7.4%) and lost nothing.
ALSO: a missing <dir> no longer answers with the catalog. It printed all 185 KB to stderr —
~46,000 tokens for the likeliest first-run typo — while an unknown flag cost 32 bytes. Now 362 B
that names the four things you probably meant.
MACHINE CONSUMERS READ TIER 2. 52 invocations across 41 gates plus docs/docs_commands_build.py
now call --help=all: an assertion about DOCUMENTED CONTENT must not pass or fail on where a
sentence sits. clicheck keeps arm (e) on plain --help because that arm tests what a user types.
GATE FIRST (non-negotiable #1): test/helpbudgetcheck.sh was written and observed RED before any
of this. It holds tier 1 to a 7,000-token ceiling AND asserts tier 2 still carries every row —
opposite failure modes, so fixing one by breaking the other cannot pass. Arm (I) is deliberately
narrower than its name and says so: it proves a summary is not truncated (open bracket, dangling
punctuation, over-width), not that it reads well. An earlier draft flagged five complete
sentences ending in prepositions and would have made the prose worse to satisfy the checker.
RE-PINS, both legitimate and both checked before re-pinning:
- test/printffmtparitycheck.sh: the red set was confirmed to be exactly {help} (11 PASS, 1 FAIL,
d9b77634 -> f066b2b8) before UPDATE_GOLDEN. The corpus gains `help_all` and `help_one` so both
tiers and one addressed entry are fenced; pinning only one would let the other move silently.
- docs/COMMANDS.md regenerated from a --clean-first build, never hand-edited.
Gate count 570 -> 571 across its seven spellings.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent cf38ba7 commit c8fc171
50 files changed
Lines changed: 1576 additions & 984 deletions
File tree
- docs
- present
- skills/ripwire-router
- src
- test
- taskroutefix
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
791 | 791 | | |
792 | 792 | | |
793 | 793 | | |
| 794 | + | |
| 795 | + | |
794 | 796 | | |
795 | 797 | | |
796 | 798 | | |
| |||
1818 | 1820 | | |
1819 | 1821 | | |
1820 | 1822 | | |
1821 | | - | |
| 1823 | + | |
1822 | 1824 | | |
1823 | | - | |
| 1825 | + | |
1824 | 1826 | | |
1825 | 1827 | | |
1826 | 1828 | | |
| |||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
5579 | 5579 | | |
5580 | 5580 | | |
5581 | 5581 | | |
5582 | | - | |
| 5582 | + | |
5583 | 5583 | | |
5584 | 5584 | | |
5585 | 5585 | | |
| |||
6491 | 6491 | | |
6492 | 6492 | | |
6493 | 6493 | | |
6494 | | - | |
| 6494 | + | |
6495 | 6495 | | |
6496 | 6496 | | |
6497 | 6497 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
165 | | - | |
| 165 | + | |
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
708 | 708 | | |
709 | 709 | | |
710 | 710 | | |
711 | | - | |
| 711 | + | |
712 | 712 | | |
713 | 713 | | |
714 | 714 | | |
| |||
732 | 732 | | |
733 | 733 | | |
734 | 734 | | |
735 | | - | |
| 735 | + | |
736 | 736 | | |
737 | 737 | | |
738 | 738 | | |
| |||
971 | 971 | | |
972 | 972 | | |
973 | 973 | | |
974 | | - | |
| 974 | + | |
975 | 975 | | |
976 | 976 | | |
977 | 977 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
| 137 | + | |
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
| |||
0 commit comments