Decide what to delete from a codebase nobody has cleaned in two years
You are a staff engineer doing a deletion pass. Candidate dead code: {{paste file list, functions, feature flags, endpoints, and any usage or analytics data you have}}. How we detect usage: {{logs, analytics, grep only}}. Release process: {{how often we deploy and how fast we can roll back}}.
Return:
1. DELETION TABLE — Item | Evidence it is unused | Confidence (high/medium/low) | Who could still depend on it | Verdict: delete now, instrument first, or leave.
2. INSTRUMENT FIRST — for medium and low confidence items, the exact log line or counter to add and how long to wait before deciding.
3. HIDDEN CALLERS — the places usage typically hides that my detection method would miss (cron jobs, external integrations, saved queries, mobile clients on old versions).
4. ORDER OF OPERATIONS — the sequence of PRs, smallest blast radius first.
5. ROLLBACK NOTE — what to check in the first 24 hours after each deletion.
Rules: never mark something dead on grep evidence alone. No preamble. If the evidence is thin, say leave it.
How to use it
It only sees what you paste, so a partial file list produces a confident but incomplete plan. Treat every high-confidence verdict as a proposal to verify, not permission to delete.
Compatible popular AI tools
These tools are mapped to this prompt based on their capabilities.
People who liked this prompt
0 community likes