Skip to main content

Repo Gap Analysis

This document is the implementation backlog for moving the repo closer to the ownerless governance standard: every surface should be discoverable, validated, repairable, bounded, and purgeable. Audit date: 2026-05-14. Evidence used:
  • static repo inventory
  • PATH="/opt/homebrew/bin:$PATH" bash tools/lpd doctor --json
  • PATH="/opt/homebrew/bin:$PATH" node operations/scripts/audits/governance/reports/generate-v2-folder-governance-cleanup-matrix.js --report-md /tmp/v2-folder-governance-cleanup-matrix.md --report-json /tmp/v2-folder-governance-cleanup-matrix.json --as-of 2026-05-14
  • PATH="/opt/homebrew/bin:$PATH" node operations/scripts/audits/governance/scripts/script-footprint-and-usage-audit.js --scope full --output-dir /tmp
  • PATH="/opt/homebrew/bin:$PATH" node operations/scripts/generators/governance/reports/generate-repo-governance-status.js --check

Executive Findings

Purge and Remediation Queue

1. Governance Artifacts

2. V2 Folder Governance

The cleanup matrix found: Implementation order:
  1. Update .mintignore and shared selection helpers so _workspace, x-deprecated, archive, and known transitional lanes are consistently non-publishable.
  2. Run a no-write report and split rows into move waves by section.
  3. Start with gateways, because it carries most rows and several nested x-resources and x-deprecated lanes.
  4. Use git mv or repo move tooling for file moves; do not hand-copy.
  5. Preserve route behavior: if a page was ever routable, verify redirects or docs.json removal explicitly.
  6. Regenerate page/catalog indexes after each wave.
  7. Run lpd test --staged, then targeted link/import validation.
Acceptance criteria:
  • No publishable route resolves into _workspace, x-deprecated, archive, or design lanes.
  • File-selection helpers used by validators and generators share the same non-publishable lane contract.
  • The cleanup matrix rows decrease after each move wave.

3. Reports, Archives, and Backup Artifacts

Script footprint audit findings: Specific purge candidates:

4. Scripts and Tooling

5. GitHub Actions

6. Components, Templates, and UI

7. Content and IA

Implementation Plan

Phase 1: Stabilize Governance Signals

  1. Regenerate stale governance map.
  2. Regenerate docs-guide catalogs if new feature pages are accepted.
  3. Add or update feature-page freshness checks for TODOs, missing links, and moved script roots.
  4. Run staged validation.
Exit criteria:
  • Governance map check passes.
  • Feature docs have no TODO markers or old root references.
  • Catalogs reflect new feature pages.

Phase 2: Normalize Non-Publishable V2 Lanes

  1. Update ignore and selection helpers.
  2. Execute the v2 cleanup matrix by section, starting with gateways.
  3. Validate route, link, and import behavior after each wave.
  4. Record completed move waves in a report.
Exit criteria:
  • Cleanup matrix rows are materially reduced.
  • No routed page resolves into non-publishable lanes.

Phase 3: Purge Retention Violations

  1. Classify backup files, .DS_Store, and large report artifacts.
  2. Replace full historical reports with concise summaries where possible.
  3. Use deletion-approved commits for tracked removals.
  4. Add or verify ignore coverage.
Exit criteria:
  • Script footprint audit no longer reports backup artifacts.
  • Large tracked reports are either justified or removed.

Phase 4: Repair Script and Workflow Governance

  1. Backfill script headers in bounded batches.
  2. Resolve script overlap cluster.
  3. Retire or document deprecated workflow.
  4. Regenerate script and workflow catalogs.
Exit criteria:
  • Script template non-compliance count trends to zero.
  • Workflow catalog and live workflows agree.

Phase 5: Consolidate UI and IA Debt

  1. Classify archived components.
  2. Regenerate component catalogs and docs.
  3. Produce a dedicated developers/developers1/developers2 IA migration plan.
  4. Execute only approved IA changes with docs.json and redirect validation.
Exit criteria:
  • Component counts are generated and trustworthy.
  • Duplicate developer trees have an approved migration path.

Non-Acceptance Criteria

The following do not satisfy this gap analysis:
  • Adding ignore rules without moving, validating, or documenting the underlying source of drift.
  • Deleting files without dependency checks and required deletion approval.
  • Hand-editing generated outputs without fixing the generator or canonical source.
  • Leaving old docs paths as undocumented compatibility aliases.
  • Treating workspace reports as permanent source of truth.
  • Running only a superficial command when repo tooling provides a deeper validator.

Next Concrete Commands

Last modified on May 19, 2026