Skip to content

Commit c8fc171

Browse files
joyful-ii-V-Iclaude
andcommitted
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

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -791,6 +791,8 @@ Full retrieval tables — including the MRR figures behind the router numbers ab
791791

792792
Around the core sit 179 long flags advertised in `--help`, across seven families — plus an MCP
793793
server, so a coding agent can call any of them mid-task instead of grepping and reading whole files.
794+
`--help` prints one line per flag (~4.5K tokens); `--help=--FLAG` prints that flag's full entry with
795+
every caveat, `--help=SECTION` one family, and `--help=all` the whole catalog.
794796
Not sure which of them fits the task in front of you? `ripwire . --help-task="<task in words>"`
795797
recommends ONE executable command with the evidence behind the pick — advice only, it never runs
796798
the recommendation — and abstains honestly when the evidence is too thin to name a winner.
@@ -1818,9 +1820,9 @@ wrong, and it has. These are the results that say so, all in-tree, all published
18181820
### In the tests
18191821

18201822
<details>
1821-
<summary><b>570 gate scripts</b>, five contracts no unit test can hold, and the house rule: write the gate before the code it measures</summary>
1823+
<summary><b>571 gate scripts</b>, five contracts no unit test can hold, and the house rule: write the gate before the code it measures</summary>
18221824

1823-
`test/regression.sh` names **570 gate scripts** and is the authoritative list;
1825+
`test/regression.sh` names **571 gate scripts** and is the authoritative list;
18241826
`python3 test/pargates.py . ./build/ripwire -j 6` runs the same set in parallel. On top of them sit the
18251827
contracts that do not fit a unit test: two runs byte-identical, warm output identical to cold, output
18261828
that pipes clean through `xmllint --noout`, a sanitizer build with `-fno-sanitize-recover=all`, and a

docs/COMMANDS.md

Lines changed: 788 additions & 761 deletions
Large diffs are not rendered by default.

docs/EVALS.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ section, and it is not an afterthought.
2121
| **Co-change / known-item evals** | `--eval`, `--eval-retrieval` (see `bench/ANSWERQUALITY.md`) | Whether the tool surfaces the other files a real historical commit touched; and known-item retrieval across four rankers. |
2222
| **Ensemble calibration harness** | `bench/ensemblecal/` | Whether `--ensemble`'s four evidence families are actually orthogonal, how often each fires, how stable each is across commits — and the preset ladder derived from that (§9). |
2323
| **Differential argv harness** | `test/argvdiffcheck.sh` | That a refactor changed *nothing observable*: two binaries, every argv vector, stdout + stderr + exit code byte-identical. |
24-
| **The gate suite** | `test/regression.sh`, `test/pargates.py` | 570 gate scripts plus the determinism, cache-transparency and golden contracts. |
24+
| **The gate suite** | `test/regression.sh`, `test/pargates.py` | 571 gate scripts plus the determinism, cache-transparency and golden contracts. |
2525
| **`--quality-delta`** | `src/quality.h` | Ten measured code-quality failure modes, reported only where a change made them worse. |
2626

2727
### The labeling protocol (why the held-out eval is allowed to disagree with the ranker)
@@ -5579,7 +5579,7 @@ copy here would be exactly the dialect divergence that gate exists to catch. Com
55795579
tags, wrap, stable-order defaults), seven individually invoked standalone gates (`g1freshcheck`,
55805580
`skillscan`, `htmlexport`, `compresscheck`, `handoffcheck`, `releaseinstallcheck`,
55815581
`taskroutecheck`), and a single loop
5582-
naming **570 gate scripts**, all of which exist on disk.
5582+
naming **571 gate scripts**, all of which exist on disk.
55835583

55845584
`python3 test/pargates.py . ./build/ripwire -j 6` runs the same scripts in parallel so a full
55855585
verification fits in one sitting. It does not modify `regression.sh`.
@@ -6491,7 +6491,7 @@ Listed because the reason is more useful than the silence.
64916491
shipped**. See `bench/locbench/anchorhop_calib.json`. The mention anchor's reproducible numbers are
64926492
the ablations in §4.
64936493
- **A single round gate-count.** Two in-tree numbers disagree (`test/pargates.py`'s docstring says
6494-
~210; `test/argvdiffcheck.sh` says 200+), while the loop in `test/regression.sh` names 570. The
6494+
~210; `test/argvdiffcheck.sh` says 200+), while the loop in `test/regression.sh` names 571. The
64956495
loop is the authority; the stale docstrings are a known drift. `test/manifestcheck.sh` asserts this
64966496
very number against the loop's actual length, so it cannot go stale silently again.
64976497
- **"282 argv vectors."** The gate asserts a floor of ≥250 assembled from five sources; 282 was a

docs/docs_commands_build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ def tool_name_of( binPath ):
162162

163163
def help_text_of( binPath ):
164164
try:
165-
run = subprocess.run( [ binPath, '--help' ], capture_output = True, text = True, timeout = 120 )
165+
run = subprocess.run( [ binPath, '--help=all' ], capture_output = True, text = True, timeout = 120 )
166166
except OSError as exc:
167167
sys.exit( 'docs_commands_build: cannot run %s (%s)' % ( binPath, exc ) )
168168
if run.returncode != 0 and not run.stdout:

present/deck5_ripwire_build.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,7 @@ function row(s, y, h, cols, opts={}){
708708
kicker(s, "// how it stays true", AMBER);
709709
title(s, "Proven, not promised");
710710
const cards = [
711-
["570 gate scripts", "the suite runs on every push — plus determinism, cache-transparency and golden contracts; the gate count itself is gated against the runner's own loop"],
711+
["571 gate scripts", "the suite runs on every push — plus determinism, cache-transparency and golden contracts; the gate count itself is gated against the runner's own loop"],
712712
["byte-identical, always", "two runs over the same tree produce the same bytes; warm equals cold. Enforced in CI, twice — Release AND a plain flavour, because NDEBUG once blinded a whole class of checks"],
713713
["differential refactoring", "a refactor must prove it changed nothing observable: two binaries, hundreds of argv vectors, stdout + stderr + exit codes byte-identical"],
714714
["held-out labels, authored blind", "eval labels were written by reading source before the ranker ever ran on them — so the eval is allowed to say the ranker is wrong. It has."],
@@ -732,7 +732,7 @@ function row(s, y, h, cols, opts={}){
732732
title(s, "Claims you can trust, because we publish what failed", { size: 32 });
733733

734734
card(s, MX, 1.72, 3.86, 1.72);
735-
stat(s, "570", "gate scripts named by test/regression.sh — and the COUNT itself is gated against the runner's own loop, so it cannot go stale quietly",
735+
stat(s, "571", "gate scripts named by test/regression.sh — and the COUNT itself is gated against the runner's own loop, so it cannot go stale quietly",
736736
MX+0.15, 1.86, 3.56, CYAN, { bsize: 42, bh: 0.66, lsize: 9.5 });
737737
card(s, 4.68, 1.72, 3.86, 1.72, CARD2);
738738
stat(s, "8", "registered NEGATIVES — changes built, gated green, measured against a band written before the code, and reverted rather than tuned",
@@ -971,7 +971,7 @@ function row(s, y, h, cols, opts={}){
971971
["179 long flags · 29 slides", "bash test/deckclaimcheck.sh"],
972972
["every --flag named here exists", "bash test/deckcheck.sh"],
973973
["74.7% fewer element bytes", "bash test/showcasecapturecheck.sh"],
974-
["570 gate scripts", "bash test/manifestcheck.sh"],
974+
["571 gate scripts", "bash test/manifestcheck.sh"],
975975
["46 repos · 69 papers · 237 surveyed","bash test/readmedriftcheck.sh"],
976976
["the ten moments, any row", "ripwire . --callers=SYM | wc -c"],
977977
["the head-to-head table", "bench/headtohead/r4-2026-08-06/"],

skills/ripwire-router/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ The always-loaded ripwire primer trains the READ verbs (`--for`/`--recall`/`--ca
134134
`ripwire <dir> --quality-panel[=strict|default|lenient]`, the six-family panel (→ **ripwire-fresh-eyes**).
135135
**It is a lens, not a gate** — always exits 0; `--quality-delta` above is the only pass here that gates.
136136

137-
`ripwire --help` is the full flag catalog; every skill re-verifies its commands against the shipped binary.
137+
`ripwire --help` lists every flag on one line; `--help=--FLAG` prints one flag in full and `--help=all` the whole catalog. Every skill re-verifies its commands against the shipped binary.
138138

139139
**Installing these skills:** `bash skills/install.sh` symlinks every `ripwire-*` skill into the Claude
140140
skill home (its codex mode targets `${AGENTS_HOME:-~/.agents}/skills`; `--codex-legacy` retains

0 commit comments

Comments
 (0)