From tofu-harness
Use when auditing an AI-agent harness (CLAUDE.md / AGENTS.md / SKILL.md / rules files) for drift — dead links, stale model names, tool mismatches, and cross-document conflicts — then repairing only independently verified findings. Deadline-bounded, parallel-census based, with built-in guards against audit overrun. Especially useful right after a new model release, when official prompting guidance changes underneath your harness.
How this skill is triggered — by the user, by Claude, or both
Slash command
/tofu-harness:harness-auditThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
> Origin: a real overnight audit (2026-07-25; a single run, one harness, 252 documents) — full census → 52 suspected defects → independent re-verification → 49 confirmed → all repaired (one commit spanning 47 files + 2 sibling fixes). These aggregates carry their scope label deliberately — per-document verdicts are the reliable unit (STEP 2). The **seven guards below were reverse-engineered fro...
Origin: a real overnight audit (2026-07-25; a single run, one harness, 252 documents) — full census → 52 suspected defects → independent re-verification → 49 confirmed → all repaired (one commit spanning 47 files + 2 sibling fixes). These aggregates carry their scope label deliberately — per-document verdicts are the reliable unit (STEP 2). The seven guards below were reverse-engineered from that night's inefficiencies (over-verification, purpose drift, no deadline), so that running this skill never costs what the first run did.
Exactly three outputs. Declare them up front; wanting to produce anything else mid-run is your drift alarm.
OK / FINDING / UNREADABLE| # | Guard | Rule |
|---|---|---|
| ① | Deadline required | Ask for an end time before starting (refuse to start open-ended). Reaching it = report what exists. Extensions are the user's call, not yours |
| ② | Deliverable frame is fixed | The three outputs above, nothing else — "while I'm at it" is how audits eat the night |
| ③ | Verification rounds capped at 2 | Re-verifying or re-wording the same target more than twice = escalate to the user instead |
| ④ | Label fixes only when behavior changes | Wording/label defects in files you don't own: intervene only if an agent would act differently; otherwise record and move on |
| ⑤ | Parallel by default, workers judge-only | 30+ documents = parallel worker census (not sequential reading). Workers never edit anything |
| ⑥ | Measure capacity before fan-out | Check the machine's concurrent capacity (panes/process headroom) before spawning workers; verify leftover cleanup after |
| ⑦ | Runtime checks are opt-in | Document truthfulness is the default scope. Executing skills to verify them is a separate, costlier stage — offer it as an upgrade question and run it only if the user says yes |
Ask for: the deadline, and the target scope (default: project + user-home CLAUDE.md / AGENTS.md / SKILL.md / rules files). Declare the three deliverables.
Build an independent file list with find before scanning — never count while scanning (if existence becomes the entry condition, absences silently fall out of the denominator). Save the list as a JSON array.
Parallel workers (~12 docs each) judge every document on four axes:
reference/, scripts/, examples/) resolve?Worker schema: {path, verdict: OK|FINDING|UNREADABLE, axis, finding}. No minimizers in the prompt ("only report serious ones" shrinks output literally) — collect everything, filter downstream.
Include a unit-definition example in the worker prompt. Without "here is what counts as one finding", extraction criteria diverge per worker and aggregate counts don't reproduce (measured: verdict agreement 86–88%, extraction agreement 26–41%). Trust per-document verdicts; never quote aggregate counts standalone.
Feed FINDINGs to different workers who re-verify from scratch: {verdict: CONFIRMED|REFUTED|UNCERTAIN, evidence (one measured line), fix_type: edit|policy|none, old_string?, new_string?}. Workers stay read-only; old_string must be verbatim and uniquely matchable. Don't punish UNCERTAIN — a wrong fix is worse than no fix. (In the origin run this stage overturned 3 of 52 first-pass findings.)
Apply CONFIRMED+edit through one applier (replace only when the match count is exactly 1; report failures) → stage files by name → commit. policy items go to the disposition list (banners, retirement notices, owner notifications — prefer reversible moves).
Census table (per-group accounting + findings) + repair commit hashes + disposition list + THREATS (why not to over-trust this result: skim-level verdicts, sample verification rate, denominator scope). If the deadline arrives first, report what exists.
Only with explicit user consent: pick the N most-used skills and run non-destructive smokes (--help, --dry-run, status modes, dependency version checks) into a PASS/FAIL table. Never execute destructive paths (paid APIs, outbound sends, deletions).
git add by explicit filename only (never bulk-add).hooks/): the audit repairs what documents say; the gates enforce what agents do. A repaired rule that never fires is decoration — wire it; a firing gate built on a stale rule enforces yesterday's truth — audit it. Run both./doctor (Claude Code built-in): doctor checks the installation (settings parse, duplicate installs, unused extensions); harness-audit checks the content (whether your documents tell the truth). Different layers, same morning.npx claudepluginhub treylom/tofu-harness --plugin tofu-harnessGuides completion of development work by verifying tests, detecting environment, and presenting structured options for merge, PR, or cleanup.
Guides creation and editing of skills using test-driven development with pressure scenarios and subagents to verify agent compliance.
Dispatches multiple subagents concurrently for independent tasks without shared state. Use when facing 2+ unrelated failures or subsystems that can be investigated in parallel.