Inspiration
Every repo has a graveyard: exports nobody imports, modules nobody reaches. Existing tools print a list; a list of dozens of dead symbols is homework, not a decision. Epitaph turns that list into a place you can walk through.
What it does
Epitaph scans a JavaScript/TypeScript repository and builds a real module graph with the TypeScript compiler API (ts-morph): entry points, imports, reachability. What is left becomes a tombstone with the file, kind, confidence, cause of death, git age, and a deterministic epitaph. A graveyard score shows how much of the repo is alive. Filters and search turn a large yard into "just this folder, just the certain ones." Séance mode dims the living chrome and lights the graves; ?plain=1 removes every atmospheric layer and leaves a plain, keyboard-accessible tool.
Burial plan
Select graves and "Prepare burial" returns a unified diff. Epitaph never deletes, moves, or rewrites code. You review the patch, download it, and git apply it yourself. Read-only by construction.
How we built it
Kiro wrote the code against a spec we wrote for Kiro: two EARS specs (graveyard-engine, haunted-atlas-ui), three steering docs, four hooks, and a stdio MCP server in .kiro/. The engine uses the TypeScript compiler API, not regex; type-only imports count as usage, while namespace/re-export opacity and framework conventions are marked uncertain. fast-check property tests cover determinism, sort idempotence, report validity, and reachability monotonicity. 119 tests pass.
Challenges
False positives are fatal to trust. We made type-only imports count as usage, downgraded namespace-only and lifecycle-looking names to "uncertain", and never report exports inside orphan modules (the module is the finding). We also kept the costume removable: plain mode is the same app, not a separate build.
Accomplishments
A complete local-first tool: 119 tests, deterministic epitaphs from a seeded PRNG (no LLM at runtime), a reviewable patch, full keyboard and screen-reader support, responsive down to 390px, and zero telemetry.
What we learned
Spatial memory and one good line of cemetery wit do more for a team review than a CSV. The costume should encode the data model, not hide it.
What's next
Framework-aware entry points (Next.js, Vite), a baseline file for accepted findings, and a GitHub Action that comments the graveyard on a PR.
Links
- Demo video: https://youtu.be/WbWVCQZSUbk
- Source (MIT): https://github.com/afei8732-hub/epitaph
- Static overview: https://afei8732-hub.github.io/epitaph/
- Run locally: git clone https://github.com/afei8732-hub/epitaph.git && cd epitaph && npm ci && npm start, then scan fixtures/haunted-sample.
Built With
- css
- fast-check
- javascript
- kiro
- node.js
- ts-morph
- typescript