exhaustive-audit
Skill2 starsChanged 40 days agoMITView on GitHub
Multi-session exhaustive codebase audit framework. Inventory every file path with hashes/line counts, partition into claimable shards for concurrent or serial agents, read and verify every line with a machine-checked coverage ledger, cross-check docs/config/code, and optionally map the system via the knowledge graph (revkg / kg_*). Use when the user runs /exhaustive-audit, asks for a full-codebase audit, line-level verification, multi-agent audit, fleet-wide audit, "account for every file/line", or a brutally honest per-repo product assessment (Phase 0).
- Reads credentials
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 3 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 70
Default run root (writable operator dir.
- Very specific: line 113
No two claims on same shard_id.
- Very specific: line 151
Verify line_count matches manifest (or re-count and record drift as finding).
- Very specific: line 152
If the worktree has changed, read the manifest row's snapshot path from the run root and verify its SHA-256 before crediting the pinned …
- Distinctive: line 220
After inventory (not instead of it):
- Very specific: line 227
Write reports/system-map.md: major packages, edges, orphan-looking dirs (cross-check against manifest).
- Very specific: line 255
Only when coverage-status.js --mode <run mode> exits 0:
- Distinctive: line 326
When the active harness can select a model for each subagent, route by task class instead of using one model for every shard.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Exhaustive audit framework
Honest completeness contract
A monorepo cannot fit every line into one model context. Completeness is machine-checked:
- Inventory — every on-disk path under scope is listed (hash, bytes, line count).
- Coverage ledger — every path reaches a terminal status (
verified|finding|waived|blocked). - Line accountability — for each file, the auditor records that the full content was read (or a mechanical verifier covered it), with start/end line counts matching the manifest.
- No silent skip — uncovered paths at close are a failed audit, not a soft miss.
Knowledge graph (revkg / kg_*) maps and relates; it does not replace reading file bodies. Use KG after inventory for system views and dependency edges.
When to use
| Trigger | Action |
/exhaustive-audit or "audit every file/line" | Run full framework |
| Multi-session / multi-agent audit | Open run + shard claims |
| "Is the fleet correct?" / product honesty | Phase 0 (reports/assessment.md), then line-level if still needed |
| Fleet line inventory | open-run.js --fleet (allowlist in scripts/lib/fleet-scope.js) |
| Single package deep dive | Scope to that path; still inventory-first |
Not for: tiny one-file reviews (use normal review skill); pure claim-drift (use claims validators). A Phase 0 verdict is not line-complete and must not be called exhaustive.
Artifacts (canonical locations)
Pick one run root (prefer an operator-private audits directory):
<run-root>/
AUDIT-RUN.yml # run metadata + scope + status
manifest.jsonl # one JSON object per path (machine)
source/sha256/ # exact content snapshots for manifest hashes
shards.json # partition plan
claims/ # per-shard claim files
ledger/
coverage.jsonl # path → status + auditor + evidence
findings.jsonl # structured findings
reports/
progress.md # human progress
assessment.md # Phase 0 per-repo honesty (not line coverage)
system-map.md # optional KG-derived map
final.md # closeout reportDefault run root (writable operator dir; prefer fleet shared archive):
# Fleet shared cold store (not inside product git). See $REVEALFLEET_ROOT/archive/cold/README.md
export REVEALFLEET_ARCHIVE="${REVEALFLEET_ARCHIVE:-$REVEALFLEET_ROOT/archive/cold}"
export AUDIT_RUN_ROOT="${AUDIT_RUN_ROOT:-$REVEALFLEET_ARCHIVE/audits}"
RUN_ROOT="$AUDIT_RUN_ROOT/$(date -u +%Y-%m-%d)-<slug>"Scripts (this skill)
All under $REVEALFLEET_ROOT/revskills/skills/exhaustive-audit/scripts/:
| Script | Purpose |
open-run.js | Create run dir, pin HEADs, write AUDIT-RUN.yml, build manifest + shards. Does not claim. |
manifest-build.js | Walk scope → manifest.jsonl (every file; repo on each row) |
shard-plan.js | Partition manifest. --by-repo (default when 2+ repos) never mixes repos. |
coverage-status.js | Covered vs missing; --mode code (default) or md-truth. Exit 1 if incomplete. |
claim-shard.js | Claim / --complete (status done) / --release (back to open) |
lib/fleet-scope.js | Default fleet allowlist + skip rules (SSOT) |
SKILL="$REVEALFLEET_ROOT/revskills/skills/exhaustive-audit"
export REVEALFLEET_ARCHIVE="${REVEALFLEET_ARCHIVE:-$REVEALFLEET_ROOT/archive/cold}"
node "$SKILL/scripts/open-run.js" --root "$REVEALFLEET_ROOT" --fleet --slug fleet-p0
# or one repo:
node "$SKILL/scripts/open-run.js" --root "$REVEALFLEET_ROOT/revealui" --slug revealui
node "$SKILL/scripts/coverage-status.js" \
--manifest "$RUN_ROOT/manifest.jsonl" \
--ledger "$RUN_ROOT/ledger/coverage.jsonl" \
--mode codeFleet --fleet walks only DEFAULT_FLEET_REPOS in scripts/lib/fleet-scope.js, including revmind and fleet-root docs/. It skips archive/, tmp/, scripts/, hidden dirs except .jv, and worktree-style names. Cold archive is opt-in: --include-archive. Override the allowlist with --repos a,b. --mode md-truth inventories *.md and *.mdx only.
Multi-session protocol
Concurrent
- One session runs open-run (manifest + shards +
AUDIT-RUN.yml). - Agents claim disjoint shards via
claim-shard.js+ workboard note (workboard.d/notes/). - Each session: for every path in shard → Read full file → write coverage + findings lines.
- No two claims on same
shard_id. Path-level re-claim only after release. - Closer session runs
coverage-status.jsand writesreports/final.md.
Serial
Same ledger; next session resumes first status: open or unclaimed shard. Do not rebuild manifest unless scope HEAD changed (re-hash and re-open delta only).
Coordination hardlines
- Multi-step product trees: worktrees from
origin/test(not required for read-only audit of a pinned ref). - Claims: workboard note +
claims/<shard_id>.yml. - Executable work discovered during audit → file a gap/lane; do not invent root TODO lists (
canonical-work-units). - Publish durable discoveries:
kg_add_episode(agent-fact) and/or findings.jsonl.
Session workflow (every auditor)
0. Open or resume
# Open (once). Do not claim a shard in the same breath.
node "$SKILL/scripts/open-run.js" --root <SCOPE> --slug <slug> [--fleet] [--mode code]
# optional system map seed
revkg scan --repo <name> # if POSTGRES_URL available; non-blockingFor a fleet product assessment, write reports/assessment.md (Phase 0) before claiming shards. Inventory is substrate, not the verdict.
1. Claim a shard
node "$SKILL/scripts/claim-shard.js" --run "$RUN_ROOT" --shard shard-003 --agent "$AGENT_ID"2. Exhaustive read (per path)
For each path in the shard (from shards.json / claim file):
Readthe entire file (paginate with offset/limit if large; cover all lines).- Verify
line_countmatches manifest (or re-count and record drift as finding). If the worktree has changed, read the manifest row'ssnapshotpath from the run root and verify its SHA-256 before crediting the pinned content. New runs opened withopen-run.jsretain these snapshots with private file permissions. - Classify findings (see taxonomy below).
- Append coverage record:
{
"path": "packages/core/src/index.ts",
"status": "verified",
"lines_read": [1, 240],
"manifest_lines": 240,
"sha256": "<recomputed from the content read>",
"agent": "grok-audit-3",
"session": "…",
"ts": "2026-07-22T18:00:00Z",
"notes": ""
}For text files, a supplied lines_read must be exactly [1, manifest.lines],
with integer bounds. Empty text (lines: 0) permits omission or [0, 0];
binary manifests use lines: null. A blocked row may record a partial read.
Code-mode verified rows for nonempty text require the full span.
With --check-hash, both the manifest hash and declared read hash must be
nonempty strings and match. The validator uses read_sha256 when that field
is present, otherwise the legacy sha256 receipt field. An invalid explicit
read_sha256 cannot fall back to sha256. Compute the receipt hash from the
content read; copying the manifest hash does not establish read provenance.
The flag compares declared hashes and cannot independently prove that the
auditor read the content.
Statuses:
| Status | Meaning |
verified | Full read; no open issue for this path |
finding | Full read; one or more findings linked |
waived | Full read; issues accepted with reason + owner |
blocked | Cannot read (secrets binary, permission); reason required |
skipped-generated | Only if path matches generated allowlist AND content spot-checked |
Forbidden: skipped without allowlist; partial reads marked verified.
3. Finding records
Append to ledger/findings.jsonl:
{
"id": "F-0012",
"path": "…",
"lines": [44, 48],
"severity": "blocker|high|medium|low|info",
"class": "bug|security|drift|dead|dup|doc-lie|todo|style|intent-dup",
"title": "short",
"body": "what is wrong; evidence",
"gap": null,
"agent": "…",
"ts": "…"
}Promotion: blocker/high → file a tracked work unit in the operator planning system (gap/lane) same or next session.
4. Knowledge graph (optional but preferred for system view)
After inventory (not instead of it):
revkg scan --repo revealui # Tier-1 extractors
# or MCP: kg_context / kg_neighbors on package anchorsWrite reports/system-map.md: major packages, edges, orphan-looking dirs (cross-check against manifest).
Publish audit conclusions:
{ "tool": "kg_add_episode", "arguments": {
"episodeType": "agent-fact",
"source": "exhaustive-audit",
"content": "…",
"nodes": [],
"edges": []
}}5. Complete claim + progress
# Finished the shard: mark done (not --release; release reopens it).
node "$SKILL/scripts/claim-shard.js" --run "$RUN_ROOT" --shard shard-003 --complete --agent "$AGENT_ID"
node "$SKILL/scripts/coverage-status.js" --manifest "$RUN_ROOT/manifest.jsonl" \
--ledger "$RUN_ROOT/ledger/coverage.jsonl" --mode code \
--write-md "$RUN_ROOT/reports/progress.md"--release abandons a claim (status: open). --complete is terminal (status: done). Do not reclaim a done shard.
6. Close run
Only when coverage-status.js --mode <run mode> exits 0:
reports/final.md— counts, finding index, gap ids filed, residual waiversreports/assessment.md— Phase 0 per-repo honesty if this was a fleet/product run- Set
AUDIT-RUN.ymlstatus: closed - Checkpoint / handoff fragment with run path
Finding taxonomy (minimum)
| Class | Examples |
bug | Incorrect logic, broken invariant |
security | Authz, secret leak, injection |
drift | Doc/code disagree (code wins; fix doc or decide) |
doc-lie | Public claim false vs code |
dead | Unreachable / unused export (confirm) |
dup | Accidental duplication |
intent-dup | Intentional dual (document, do not "fix") |
todo | TODO/FIXME without gap |
config | Wrong env, stale path, dual source of truth |
test-gap | Critical path untested |
Scope defaults
Include: source, config, CI, scripts, docs, schemas, migrations, lockfiles (as units), skill/rules markdown.
Exclude by default (manifest-build --exclude-defaults):
node_modules, .git, dist, build, .next, coverage, .turbo, opensrc, .direnv, target, vendor, playwright-report, test-results, and the other names in DEFAULT_EXCLUDES inside manifest-build.js.
Fleet --fleet additionally skips (see scripts/lib/fleet-scope.js): archive/, tmp/, fleet-root scripts/, hidden dirs except .jv, worktree-style names. --include-archive is the only way to pull cold dumps into a fleet manifest.
Never exclude without recording: .env.example/templates, migrations, security gates, license files.
Verification levels (depth)
| Level | Name | Bar |
| L1 | Accounted | Path in manifest |
| L2 | Read | Full content read; coverage row |
| L3 | Verified | Content checked against purpose (correctness judgment) |
| L4 | Cross-checked | Related tests/docs/callers consistent (use KG + grep) |
Exhaustive audit requires L2 for every path. L3 is the default for code/config; L4 for security, money, auth, and public claims surfaces.
Phase 0 — product assessment (fleet honesty)
Line inventory answers "did we account for every file." It does not answer "is this product real." Phase 0 is the honesty pass. Write reports/assessment.md from templates/assessment.md.
Per repo:
| Field | Ground in |
| Identity | package.json / Cargo.toml / entrypoints |
| Ship state | git pins in AUDIT-RUN.yml, test vs main lag |
| What works | Routes, CLIs, servers that exist in code |
| Honesty gaps | README / marketing vs those paths |
| Dead weight | Unused trees, dual deploy targets |
| Verdict | shippable-core / sold-ahead-of-runtime / infra-only / archive-grade / leftover |
Phase 0 may finish in one session. Calling it exhaustive is a contract violation until coverage-status.js --mode code exits 0.
Subagent routing
| Role | Use |
| Inventory + shard plan | Single session or mechanic |
| Shard read (many files) | explore read-only or full agent; one shard per agent |
| Security shards | Prefer security-aware model; mark severity carefully |
| Final synthesis | Senior pass over findings.jsonl only (not re-read whole tree) |
When the active harness can select a model for each subagent, route by task class instead of using one model for every shard. For the current Codex model family, use Luna for bounded mechanical inventory, receipt consolidation, and CI status collection; Sol for disjoint source-reading shards and low-ambiguity owning fixes after the design is settled; Astra for ambiguous security design, cross-repository synthesis, and independent review of sensitive changes. Keep the independent reviewer on a separate agent/session from the author. If a task finds an unexpected trust boundary, concurrency invariant, or design choice, stop the low-cost assignment and escalate that task to Astra. Model selection never changes the coverage, evidence, or review bar.
The coordinator must pass the selected model explicitly when spawning an agent and record the requested model, task class, and actual agent/model identity in the shard report. If the harness cannot pin or report a model, say so in the receipt and keep the same review requirements; do not claim automatic model routing occurred. These names are a Codex routing profile, not fleet-wide provider requirements.
Related skills
knowledge-graph— map/relate after inventorymulti-agent-memory— session facts while audit runssecurity-hardening— OWASP lens on security shardsrevealui-checkpoint— close multi-session auditcode-over-docshardline — code wins factual conflicts
References
references/methodology.md— full phases, concurrency rules, anti-patternstemplates/AUDIT-RUN.yml— run metadata (preferopen-run.js)templates/coverage-line.json— coverage record schematemplates/assessment.md— Phase 0 rubric- Hardline: audit-first SDLC (studio rules)
- Work units: tracked gaps/lanes only for remediation work
Anti-patterns
| Do not | Why |
| Sample 10% of files and call it exhaustive | Violates contract |
| Trust KG scan alone | No line-level content proof |
| Overlapping shard claims | Duplicate work / conflicting findings |
| Fix while auditing without tracking | Split audit vs implement PRs; file gaps |
| Write a second free-floating "audit backlog" at docs root | Use findings.jsonl + gaps |
Mark minified vendor bundles verified without allowlist | Use skipped-generated or waive |
| Call Phase 0 or inventory-only "exhaustive" | Completeness is coverage-status --mode code exit 0 |
Close a code run on historical-ok | C3 statuses are --mode md-truth only |
MD-truth program (GAP-407)
| Script | Wave |
scripts/w1-auto-class-md.js | W1 historical/generated |
scripts/w4-jv-present-md.js | W4 .jv residual |
scripts/w5-homes-md.js | W5 claude/grok homes |
scripts/md-truth-check.js | W6 gate (--self-test CI-safe; --coverage needs archive) |
scripts/coverage-status.js | complete bar (exit 0) |
node skills/exhaustive-audit/scripts/md-truth-check.js --self-test
# operator:
# REVEALFLEET_ARCHIVE=$REVEALFLEET_ROOT/archive/cold node …/md-truth-check.js --coverageOther versions1 project uses a version of this.
Word for word · 1
- RevealUIStudio/revskills★ 2100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository29 other files it gives its agents.
- skills/revealui-design/CLAUDE.mdCLAUDE.md
- drizzle-dbSkill
- electric-syncSkill
- grok-bot-checkpointSkill
- knowledge-graphSkill
- mcp-serverSkill
- multi-agent-memorySkill
- next-best-practicesSkill
- redundancy-scanSkill
- revealui-checkpointSkill
- revealui-cleanupSkill
- coordinateSkill
- revealui-designSkill
- revealui-design-statusSkill
- revealui-doctorSkill
- revealui-opsSkill
- revealui-pickupSkill
- revealui-recoverSkill
- revealui-rollupSkill
- revealui-skills-testSkill
- revealui-snapshotSkill
- revealui-sync-ltsSkill
- revealui-sync-rulesSkill
- revealui-trackerSkill
- revvault-resolveSkill
- security-hardeningSkill
- tailwind-v4Skill
- vitest-testingSkill
- yjs-collaborationSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

