Dead In Production — act101 Agent Skill
Use when removing code and a static dead-code signal alone feels risky. Finds symbols that are statically unreferenced, never covered by tests, and never executed in production.
Dead in Production
Find code that is safe to delete by requiring three independent signals to agree: statically unreachable, untested, and never run in production.
When to use
- Cleanup or dead-code removal where the static signal alone is not enough.
- Shrinking a service before a refactor or migration.
Inputs
An lcov coverage report and an OTLP/JSON trace export from production.
coverage_overlay and trace_overlay are Architecture tier; analyze_dead_code is
static (Free). None of the three needs git.
Protocol
- Static:
analyze_dead_codefinds symbols unreferenced from any entry point. - Untested:
coverage_overlaywith the lcov report;covered: falseor zero hits means untested. - Unused in prod:
trace_overlaywith the production trace; zerospan_countmeans it never ran in the captured window. - Intersect: a symbol that is statically dead, uncovered, and untraced is high-confidence dead and leads the report. Two of three is "probably dead, verify"; one of three is "investigate".
- Caveat: reflection, DI, and dynamic dispatch hide real uses from static
analysis, and coverage and trace windows can be incomplete. State the evidence
window and the
unmappedcounts.
Output
A ranked deletion list: 3/3 first, then 2/3 with the missing signal named, then 1/3.
For each entry cite the symbol id and which signals fired. Close with the trace and
coverage unmapped counts and the trace time window.
Coverage
Read modeled_kinds and unmapped on every overlay result: a symbol that mapped
to no coverage or trace fact is "no evidence", not "dead".
Deletion recommendations need at least two agreeing signals. Coverage and trace
describe the captured window only.