docs(ENG-3282): refresh the README after the 0.9.3 model swap
A reviewer checked every README claim against the code. Snippets were type-checked against dist and behavior was checked at runtime. I re-verified the main findings. For example, multi-head mode is off by default (tier2MultiheadBlocked is undefined, and true only with tier2Config.multihead), and no source file reads multihead_presets.
Wrong before
- Presets (my mistake in #115): the text implied the multi-head presets apply on their own. They don't. The README now documents the
tier2Config: { multihead: {...} }opt-in, andtier2Configis added to the options block. defendToolResult: the signature was missingoptions({ context, signal }), and the description said it runs only Tier 1 and Tier 2.DefenseResult: it was missingtier2Available,coverageDegradedandtier3.note, and it saidtier3is present only when Tier 3 ran.- Anthropic SDK snippet:
filterkept thesystemrole in the type, which the SDK's message type rejects. - Vercel AI SDK example:
anthropicwas never imported, and it used an old model ID. - Risky fields: the
github_*row was missingcontent(config.ts). riskLevel: it said the level is never reduced. Tier 3 can lower it in cascade and sets it intier3_only.- Override warning: it fires once per process, not once per instance.
Missing before
- Node 22+ and the
fasttext.wasmpeer needed foruseSfe. - The
maxTokensdefault,legacyMaxTokensandfetch. - The batch
contextand{ signal }. - A note that Tier 2 rarely reports
mediumwith the bundled model (relevant toonError: "block").
Also: the build note is rewritten in plain sentences, and stale code comments are fixed. Those comments cited v5's multihead thresholds and 0.64, and said a single-sentence field "is blocked" when the cleaner actually leaves it untouched.
Not in this PR: the benchmark table and the F1/latency badges still describe an old model. That's waiting on a decision: re-measure them, or replace them with the release-gate numbers.
docs: doesn't release. Checks: 710 tests pass, test:typecheck passes, and lint shows only the pre-existing warning.
🤖 Generated with Claude Code
Summary by cubic
Refreshes the README so its claims match the code after the 0.9.3 model swap, updates stale comments in tier2-classifier.ts and prompt-defense.ts, and pins the recalibrated 0.52 high-risk boundary in tests.
Key corrections:
- Multi-head mode is off by default; documents the
tier2Config.multiheadopt-in instead of implying presets apply automatically. defendToolResultnow shows itsoptionsargument;DefenseResultaddstier2Available,coverageDegradedandtier3.note.- Fixes the Anthropic and Vercel AI SDK snippets (role filter, missing import, outdated model ID).
- Adds the Node 22+ requirement and the
fasttext.wasmpeer needed foruseSfe. - Covers
maxTokensdefault,legacyMaxTokens,fetch, batchcontext/signal, andriskLevelunder Tier 3. - Corrects the override warning to once per process, adds
contenttogithub_*, and notes Tier 2 rarely reportsmediumwith the bundled model. - Rewrites the build note, updates classifier comments that cited v5 thresholds, and documents the
[CONTENT SANITISED]marker in the sanitisation comment. - Adds spec assertions that Tier 2 rates 0.52 as high (the bundled model's boundary) and that blocking still requires
blockHighRisk. - Replaces the benchmark table and F1 badge with measurements for the 0.9.3 model (F1 0.865 average through the package pipe at the default 0.52 threshold); the prior 0.908 used a different method and is not comparable.