← ClaudeAtlas

ground-truth-gateslisted

Build a deterministic regression gate (golden / replay / project — three gates) around any judgment-bearing function before changing it — classifiers, intent routers, regex matchers, redaction/PII scrubbing, text normalization, prompt-driven routing. Ships a runnable, already-run-verified template (node, zero deps). Use whenever the user asks for a test harness, golden set, eval, or regression gate; whenever you are about to edit a classifier/regex/redaction/prompt that routes real actions; whenever you are designing a runtime guard (a hook, validator, or auth check) and its fail direction; whenever an experiment needs a grading harness; and whenever you catch yourself (or a subordinate) saying "sounds right" or "should work" about behavior only real data can prove.
firaen22/claude-rulebook · ★ 0 · AI & Automation · score 62
Install: claude install-skill firaen22/claude-rulebook
# Ground-Truth Gates **The rule: no gate → no change to judgment-bearing behavior.** Behavioral prompting ("be careful with this regex") does nothing measurable. A harness that runs the REAL function over labeled REAL data converts "sounds right" into a falsifiable pass/fail — the highest-ROI artifact in any project; build it BEFORE tuning prompts, regexes, or classifier logic, not after the regression. If this skill ever conflicts with `~/.claude/harness/`, the harness wins (R8). ## The three gates | Gate | Locks | Mechanism | |---|---|---| | **Golden** | a classifier's decisions | labeled real cases run through the real function (no mocks), scored cost-asymmetrically | | **Replay** | a pure transform's output | frozen baseline, diffed on every run; any drifted line fails | | **Project** | everything at once | one command (`run-all.sh`) = typecheck + golden + replay; run it before claiming "done" | ## Quick start — bundled runnable template The template lives in this skill's `scripts/` directory and is **run-verified** (all pass AND fail paths executed 2026-07-07; the commands below are the exact ones that ran). Zero dependencies beyond `node` ≥18. ```bash cd ~/.claude/skills/ground-truth-gates/scripts # whole project gate (typecheck optional: export TYPECHECK_CMD="npx tsc --noEmit") bash run-all.sh # → ALL GATES PASS, exit 0 # golden gate alone node golden-gate.mjs --module ./example/classifier.mjs --cases ./example/cases.jsonl # r