Skip to content

[M059] Script Registry & Orphan Audit #98

@keithah

Description

@keithah

Roadmap source: kodiai-roadmap.md

  • Phase: Phase 5 — Long-Tail Cleanup
  • Milestone: M059

Slice M059/S01 — scripts/REGISTRY.md

What this is

scripts/ contains 120+ files. Many are verifier harnesses, some are one-off backfills, some are diagnostic tools that were committed and never revisited. There's no single document that says what each script is for.

Acceptance criteria

  • scripts/REGISTRY.md lists every *.ts under scripts/ with: purpose, owning milestone (if applicable), whether it's a recurring job (cron/workflow) or one-off, and an archive status.
  • Every script referenced by package.json and every .github/workflows/*.yml is cross-linked.
  • Scripts identified as dead (no importers, no workflow references, no human memory of purpose) are either moved to scripts/archive/ or deleted, with the choice recorded.

Files to touch

  • scripts/REGISTRY.md — create.
  • scripts/archive/ — may be created if anything is archived.

Verify contract

  • Command: bun run verify:m059:s01
  • Script: scripts/verify-m059-s01.ts
  • Check IDs: registry_present, registry_covers_every_script, package_json_scripts_cross_linked.
  • Status codes: m059_s01_ok, m059_s01_missing_entry.

Slice M059/S02 — Orphan script sweep

What this is

After S01's registry exists, do a sweep: any scripts/*.ts that has no workflow reference, no package.json entry, no docs/ reference, and no DECISIONS.md mention is a candidate for deletion.

Acceptance criteria

  • scripts/verify-m059-s02.ts identifies orphans automatically (using the S01 registry as ground truth).
  • Each orphan is either retained (with explicit justification in the registry) or deleted.
  • The sweep does not delete anything listed in scripts/REGISTRY.md as active.

Files to touch

  • scripts/* — possible deletions, each recorded in the PR description.

Verify contract

  • Command: bun run verify:m059:s02
  • Check IDs: no_uncategorized_orphans, all_deletions_registry_authorized.
  • Status codes: m059_s02_ok, m059_s02_unclassified_orphan.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions