Page Consolidation Audit
npm run wiki-consolidation:auditreads every non-generated wiki page and emits a source-preserving review queue for duplicate pages, foldable stubs, over-split ideas, and router gaps.
Routing Summary
Use this when Kevin asks whether pages should be combined, whether ideas are split too finely, or whether generated packs should expose merge/fold work alongside pack-routing work.
Commands:
npm run wiki-consolidation:audit
npm run agent-packs:refresh
npm run agent-packs:check
Outputs
| Output | Purpose |
|---|---|
wiki/meta/page-consolidation-audit.json |
Full machine ledger: candidate pairs, scores, actions, reasons, target page, and per-pack queues. |
outputs/audits/<date>-page-consolidation-audit.md |
Human report with action counts, hot categories, top merge/fold queue, and router/layered-mirror queue. |
agent-docs/packs/*.md |
Generated packs consume compact queues under ## Consolidation Review Queue after npm run agent-packs:refresh. |
Decision Types
| Action | Meaning |
|---|---|
merge-review |
Pages are likely duplicate or near-duplicate concepts; choose a survivor and preserve all unique content. |
fold-stub |
One page is probably a thin section of a stronger page. Fold unique content into the target before deleting anything. |
combine-or-route-review |
Pages are strongly related but may need either a merge or a better capsule/router boundary. |
router-tighten |
Pages should likely stay separate, but their hub, related:, or pack routing should be clearer. |
layered-mirror-router |
Same slug across skill/tool/concept layers; do not blindly merge. Tighten ownership and cross-links. |
Operating Rule
The audit is a consolidation queue, not an automatic refactor. Promote a finding only after reading
both pages, preserving citations, timelines, source URLs, aliases, and important ::artifact /
::tweet embeds. If a pair is a valid layer mirror, keep both pages and clarify the router.
After any promoted merge/fold, use Generated Surface Contract for redirects, qmd, packs, and generated review queues.
Classifier Guardrails
The audit intentionally suppresses structural mirrors that would make generated packs noisier:
- Root-category read-first docs and same-named category hubs are routers, not fold-stubs.
- Parallel
resolver/*-filingpages stay separate when they describe distinct filing decisions. - Retired
wiki/skills/<slug>.mdmirrors are not protected pages; their durable content should fold into a skill-family page, tool page, concept page, or Skill Registry row. - Date-stamped source/ingest ledgers are append-only siblings, not merge targets.
- First-name-only people pages with distinct source records stay separate unless aliases overlap.
- Executable skill files route through Skill Registry and
wiki/concepts/*-skills.md; only real tool/concept/design/project pages remain as article-layer mirrors. - Linked parent/subpage alias overlaps route through
router-tighteninstead ofmerge-review. - Heartbeat and constitution pages extracted from
SOUL.md,USER.md, andHEARTBEAT.mdstay as operational siblings when they share the same source spine. - Explicit comparison pages such as
resolver-vs-skill-resolverare bridge pages, not stubs. - Linked parent/subtopic pages route through
router-tightenso hubs, source mirrors, stories, and product pages can keep separate ownership.
These suppressions keep the queue focused on pages where a human actually needs to choose between merge, fold, or route-tightening work.
Timeline
- 2026-07-01 | Added generated-surface closeout for promoted consolidation findings so merges refresh redirects, qmd, packs, and review queues. Source: User request, 2026-07-01
- 2026-06-26 | Created after Kevin asked for a wiki-wide audit that detects pages and ideas that should be combined without losing content, then feeds those findings into generated packs. Source: User request, 2026-06-26;
scripts/audit-page-consolidation.ts - 2026-06-27 | Updated guardrails for the generated skill-registry model: retired skill mirrors fold into family pages or real topic pages, while executable SKILL.md files remain outside the article layer. Source: User request, 2026-06-27;
scripts/compact-wiki-brain.ts