Context
Add a checker that flags pattern files in patterns/ that aren't referenced from ROUTER.md or anything in context/ — orphans in the navigation graph.
⚠️ Read src/drift/checkers/index-sync.ts first. This partially overlaps with index-sync, and the goal is not to duplicate it. index-sync is about the index ↔ files relationship; this checker is about pattern files that exist but nothing links to them. Your PR should state clearly how the two differ.
Scope
- Flag pattern files with no inbound reference from
ROUTER.md or context/*.md.
- Warning-level severity (an orphaned pattern is a smell, not necessarily an error).
Where
- New checker:
src/drift/checkers/stale-pattern.ts — structural checker (operates on projectRoot, scaffoldRoot), follow the shape of index-sync.ts.
- Register in
src/drift/index.ts (import + invoke in the structural block + push to checkerIssueCounts).
- Tests:
test/checkers.test.ts.
Acceptance criteria
New to mex? Good first issue — 9 existing checkers to copy from. See CONTRIBUTING.md.
Context
Add a checker that flags pattern files in
patterns/that aren't referenced fromROUTER.mdor anything incontext/— orphans in the navigation graph.src/drift/checkers/index-sync.tsfirst. This partially overlaps withindex-sync, and the goal is not to duplicate it.index-syncis about the index ↔ files relationship; this checker is about pattern files that exist but nothing links to them. Your PR should state clearly how the two differ.Scope
ROUTER.mdorcontext/*.md.Where
src/drift/checkers/stale-pattern.ts— structural checker (operates onprojectRoot, scaffoldRoot), follow the shape ofindex-sync.ts.src/drift/index.ts(import + invoke in the structural block + push tocheckerIssueCounts).test/checkers.test.ts.Acceptance criteria
index-sync.src/drift/index.ts.npm run typecheck && npm test && npm run buildpass.New to mex? Good first issue — 9 existing checkers to copy from. See CONTRIBUTING.md.