Agent Pack Corpus Audit

npm run agent-packs:audit reads every non-generated wiki page and emits the page-by-page decision ledger for pack inclusion, explicit pack guidance, research refreshes, and capsule assignment.

Routing Summary

Use this when Kevin asks to make packs more complete, audit all wiki articles for workflow routing, or decide which pages should feed design.md, frontend.md, backend.md, code.md, ai-agents.md, and the other portable packs.

Commands:

npm run agent-packs:audit
npm run agent-packs:refresh
npm run agent-packs:check

Outputs

Output Purpose
wiki/meta/agent-pack-corpus-audit.json Full machine ledger: every reviewed page, capsule, pack candidates, actions, research reasons, and source notes.
outputs/audits/<date>-agent-pack-corpus-audit.md Human report with action counts, capsule counts, high-impact pack queues, and a full per-page table.
agent-docs/packs/*.md Generated packs consume compact review queues under ## Corpus Review Queue after npm run agent-packs:refresh.

Decision Types

Action Meaning
assign-capsule:<id> Page has no capsule yet; audit proposes an owner capsule.
review-capsule:<old>-><new> Existing capsule disagrees with the current heuristic.
review-pack-candidate:<pack> Page is a strong candidate for the named pack but not currently in its generated surface.
distill-explicit-pack-block:<pack> Page is important enough that a short explicit source block or pack-rule update may be better than summary extraction.
research-refresh Page depends on current upstream facts and should be rechecked before relying on it.
source-or-markdown-hygiene Page likely needs citations, artifact/tweet embeds, or a lead summary.

Operating Rule

The audit is a triage layer, not the source of truth. Promote a finding by updating the atomic wiki page, pack definition, capsule router, or explicit source block, then rerun npm run agent-packs:refresh. Use Generated Surface Contract when deciding whether to update a source page, generator, pack definition, manifest, or stateful audit ledger.


Timeline