Dead In Production — act101 Agent Skill
Use when you want to safely remove code — finds symbols that are statically unreferenced, never covered by tests, and never executed in production, by intersecting dead-code, coverage, and trace evidence.
Dead in Production
Find code that is safe to delete with high confidence by requiring three independent signals to agree: it is statically unreachable, untested, and never runs in production.
When to use
- Cleanup / dead-code removal where a static signal alone feels risky.
- Shrinking a service before a refactor or migration.
Inputs
A git repo, an lcov coverage report, and an OTLP/JSON trace export from production. All overlays are MCP tools (Architecture tier).
Protocol
- Static — call
analyze_dead_codeto find symbols unreferenced from any entry point. - Untested — call
coverage_overlaywith the lcov report; a symbol withcovered: false(or zero hits) is untested. - Unused in prod — call
trace_overlaywith the production trace; a symbol absent from the hits (zerospan_count) never ran in prod. - Intersect — a symbol present in ALL THREE (statically dead AND uncovered AND untraced) is high-confidence dead. Report it first. Symbols in two of three are "probably dead — verify"; one of three is "investigate."
- Caveat — reflexion/DI/dynamic dispatch can hide real uses from static analysis; coverage and trace windows may be incomplete. State the evidence window and the
unmappedcounts so the user can judge.
Output
A ranked deletion list: high-confidence (3/3) first, then 2/3 with the missing signal named, then 1/3. For each, cite the symbol id and which signals fired. Include the trace/coverage unmapped counts and the trace time window as caveats.
Honesty
Respect modeled_kinds and unmapped: a symbol that mapped to no coverage/trace fact is "no evidence," not "dead." Never recommend deleting on a single signal. Coverage/trace are facts about the captured window only.