{
  "version": "act 2.0.0",
  "slug": "dead-in-production",
  "name": "dead-in-production",
  "description": "Use when you want to safely remove code \u2014 finds symbols that are statically unreferenced, never covered by tests, and never executed in production, by intersecting dead-code, coverage, and trace evidence.",
  "url": "https://act101.ai/docs/skills/dead-in-production",
  "body_md": "# Dead in Production\n\nFind 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.\n\n## When to use\n\n- Cleanup / dead-code removal where a static signal alone feels risky.\n- Shrinking a service before a refactor or migration.\n\n## Inputs\n\nA git repo, an lcov coverage report, and an OTLP/JSON trace export from production. All overlays are MCP tools (Architecture tier).\n\n## Protocol\n\n1. **Static** \u2014 call `analyze_dead_code` to find symbols unreferenced from any entry point.\n2. **Untested** \u2014 call `coverage_overlay` with the lcov report; a symbol with `covered: false` (or zero hits) is untested.\n3. **Unused in prod** \u2014 call `trace_overlay` with the production trace; a symbol absent from the hits (zero `span_count`) never ran in prod.\n4. **Intersect** \u2014 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 \u2014 verify\"; one of three is \"investigate.\"\n5. **Caveat** \u2014 reflexion/DI/dynamic dispatch can hide real uses from static analysis; coverage and trace windows may be incomplete. State the evidence window and the `unmapped` counts so the user can judge.\n\n## Output\n\nA 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.\n\n## Honesty\n\nRespect `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."
}