melech-prunelisted
Install: claude install-skill AdirD/agent-shell-hamelech
# Prune
After 5–15 prompts of iterative coding with AI, codebases accrete **AI residue**: orphaned helpers from earlier prompts, dead types, half-migrated state, speculative config keys, and zombie workflows.
The feature works and tests might pass, but the working diff is cluttered with dead pathways and unreferenced scaffolding.
**`melech-prune` acts as an evidentiary garbage collector and architectural reconciler.**
---
## The Core Philosophy: Inverted Burden of Proof
In normal coding, developers assume: *"The AI wrote this, so it's probably needed."*
**`melech-prune` flips this assumption entirely:**
> **Every added or modified function, type, parameter, state hook, wrapper, and export is assumed GUILTY (dead code, accidental residue, or YAGNI bloat) until proven innocent with concrete evidence.**
If a symbol cannot provide proof of reachability and concrete necessity, it is queued for deletion.
---
## The 4 Evidentiary Proofs
To survive pruning, every symbol in the audited diff must satisfy these four tests:
| Proof Type | Question Asked | Evidentiary Requirement | If Proof Fails |
|---|---|---|---|
| **1. Reachability Proof** | "Can runtime execution actually reach this?" | Trace a direct call chain from an active entrypoint (route, UI component, CLI command, export, or event handler). | **Dead / Zombie Code** → Purge. |
| **2. Requirement Proof** | "Which explicit user requirement demanded this?" | Identify the exact user story or bugfix requiring this branc