-
-
The Graveyard for parse-server: 5 dead dependencies, every score with its working.
-
A Kiro agent's replacement for intersect, caught: old keeps the duplicate, new drops it. Attempt 2: proved, 6/6 sabotage.
-
App 2, GitHub Actions: archived actions-rs/toolchain swapped and proved, 12 of 12 sabotage caught.
-
Death score breakdown for deep-diff: each signal with points and source, plus the calibration row.
Summary for judges
- What: Last Rites scans a GitHub repo's npm dependencies, scores how dead each one is (0-100, every point shown with its source), and lays them out as toe tags in The Graveyard.
- The proof: for a dead package, it pins property-based tests to the repo's real call sites and runs old vs new on 1,000+ generated inputs, with a sabotage check so no proof can pass trivially.
- The moment: we asked a Kiro custom agent to replace
intersectin parse-server. Its first replacement dropped duplicate IDs; Last Rites caught it with a shrunk one-line counterexample. The agent read it, fixed its code, proved it (2,000 runs, 6 of 6 sabotage mutants caught), and only then committed, on a local branch. - Kiro: 12 Kiro specs (4 bugfix specs), 6 steering files, 4 hooks, 2 custom agents, an MCP server (5 tools) and a Kiro power. ~800 spec tasks, ~2,100 tests.
- Try it in 60 seconds: https://lastrites.swellstackco.com → parse-server →
intersect(an ailing package, scroll to Proof). - Video: https://www.youtube.com/watch?v=RIGBw5_gc2I
- Repo: https://github.com/swellstackco/last-rites (MIT).
Inspiration
left-pad, request, the xz backdoor: the dependencies nobody watches are the ones that hurt. Scanners already warn and codemods already rewrite. Nobody shows you that the replacement behaves the same in your code. And now AI agents write the replacements, so "the tests still pass" is no longer enough.
What it does
- Scan: reads
package-lock.json(orpackage.jsonranges), gathers evidence from the npm registry, GitHub, OSV and e18e module-replacements, with a disk cache. - Score: a transparent weighted death score. Each row of the breakdown shows the value, points, weight and source link, plus a labelled calibration row when the author declared the package abandoned.
- Graveyard: toe tags grouped Dead / Dying / Ailing / Alive. Cached demo scans load instantly; live scans of any public repo are rate limited.
- Proof: usage surface (every import and call site), a recipe per package (oracle, call-shape arbitraries, projection of what the code actually consumes), a differential fast-check run, a sabotage check, and a Proof_Report shown in the UI.
- Agents: the same engine as an MCP server and a Kiro power. A read-only
coroneragent investigates; anexorcistagent migrates and is not allowed to edit the target untilgenerate_pin_testsreturns proved. - Second app on the skeleton:
exorcist-actionsfinds dead GitHub Actions (archived repos, deprecated Node runtimes, mutable tags). Same death score and graveyard; different fixes (swap, pin to SHA) and different proofs (input/output contract, SHA resolution, surgical one-line rewrite). Demo: railwayapp/nixpacks (20 actions in CI): 2 dead (actions-rs/cargo,actions-rs/toolchain, both archived). Swapactions-rs/toolchain→dtolnay/rust-toolchain@master: PROVED, 12 of 12 sabotage mutants caught, with the dropped inputs (override,profile) declared, not hidden. Pinactions/checkout@v4→11d5960a…: PROVED across 11 uses in 5 files, 2 of 2 mutants caught.
How the proof works, and why it can't pass trivially
- The old package is the oracle. Inputs are shaped from the real call sites (
intersect(allIds)andintersect.big(allIds)on arrays of id lists). - Only what the code consumes is compared: parse-server only checks
dd(a, b) === undefined, so the deep-diff proof compares equal-vs-not-equal. - Zero call sites never passes:
node-abort-controllergets NO CALL SITES and "remove the dependency". - Sabotage: mutants of the candidate (drop last element, reverse, return undefined, swap args...) must each be caught, or the proof is marked weak.
Real results on parse-server @ 3402ee6: intersect attempt 1 (Kiro agent) COUNTEREXAMPLE shrunk to [[["x","x"]]] (old keeps both, new keeps one); attempt 2 PROVED, 2,000 runs, 6/6 sabotage. deep-diff PROVED (1,000 runs). node-abort-controller NO CALL SITES. The agent's migration is commit 160b30d on a local branch; nothing was pushed.
How we built it with Kiro
- Spec-driven development: death-score, npm-evidence, npm-scanner, graveyard-ui, proof-harness, toe-tag-redesign, kiro-integration, exorcist-actions, plus bugfix specs death-score-calibration, graveyard-ui-polish, toe-tag-polish and graveyard-ui-actions. EARS requirements, designs with numbered correctness properties, every task checked off, commits named by spec.
- Spec vs vibe, honestly: the parts that broke silently were the few things fixed by hand outside a spec. A vite-node quirk strips the script path from argv, so two entry guards never fired and the dev server exited without an error. The spec'd code had properties guarding it; the vibe-fixed glue didn't. Bugfix specs became the default after that: write the failing property first, then fix.
- Property-based testing during the build:
- death-score Property 5 written as
>=let an "unknown counts as alive" sabotage pass; Kiro strengthened it to strict>. - the calibration bug was found on real data (no package graded dead on real repos); the bugfix spec then wrote fix-check Property 6 first, and it failed on the unfixed engine, shrunk to "deprecated + 25 months since publish → 61, graded dying", before the fix turned it green.
- the agent's
intersectreplacement (above): caught in the real use of the shipped tool.
- death-score Property 5 written as
- Steering: product, tech, structure, migration-rules, proof-rules (no trivial passes, zero call sites fail, sabotage mandatory), graveyard-ui (scoped by fileMatch; design tokens and banned looks).
- Hooks (4): scan-deps-on-save (lockfile saved → warn on newly dead packages), candidate-proof-on-save (re-runs the proof when a candidate migration is saved; fired 3 times during the agent run, two warnings then ok), death-score-monotonic-on-save (re-checks the monotonicity property when the engine changes), check-on-stop (typecheck + tests when the agent stops; fired 6 times).
- Custom agents (2):
coroner(read-only tools + 4 read MCP tools; verified it left both repos untouched) andexorcist(write + shell, but its prompt and the proof gate forbid touching the target before proved; never pushes). - MCP:
scan_repo,death_report,usage_surface,find_replacement,generate_pin_testsover stdio, bundled to one file. - Power:
power/(plugin.json, mcp.json, migration-rules and proof-rules skills); installed and exercised withkiro-cli powers install ./power, then uninstalled. - Surfaces: Kiro IDE for spec authoring (requirements and design sessions in Spec mode); Kiro CLI headless for long task batches (
kiro-cli chat --no-interactive, gated by typecheck + full test run before each commit) and for the custom-agent runs.
Design
Toe Tag direction, chosen from three researched from real artifacts (morgue toe tags, death certificates, coroner's inquest forms, burial registers): steel-gray wall, manila tags with a grade band, a death-certificate form grid for the breakdown, a rubber stamp for the proof. Self-hosted OFL fonts (Barlow Condensed, IBM Plex, Special Elite). WCAG AA contrast checked by a test from the tokens.
Challenges
- No package graded dead on real repos at first → bugfix spec with a transparent calibration floor.
- vite-node argv quirk (above).
- A headless retry loop overnight re-ran a prerequisite check 13 times; the spec's "never fake a transcript" rule held every time.
- The exorcist agent refused to overwrite an existing proof report that described a different usage surface, and stopped to ask: the safety rule worked against us, correctly.
Prior art, stated plainly
Socket, Snyk, Renovate, npm deprecations and e18e codemods warn or rewrite. Last Rites proves behavior on your call sites.
What's next
More recipes (pure-function packages first), a nightly watch, PR mode. Startup angle: Swell & Stack Co.
Disclosures
Open-source libraries: fast-check, vite, vitest, typescript, semver, @modelcontextprotocol/sdk, zod, esbuild, jsdom, yaml. Planning documents (briefs per spec in docs/briefs) were written outside Kiro. Claude Code (Anthropic) wrote the briefs, launched Kiro CLI batches, ran the browser checks and agent runs, and made a few small hand fixes labelled in the commit log. Product code was written by Kiro through specs.
Built With
- fast-check
- kiro
- mcp
- node.js
- typescript
- vite
