False positives kill adoption
A Django signal, a FastAPI route, a Spring bean, a Rails model: all "unused" to a naive import scanner. One wrong deletion and the tool is uninstalled.
Deadpath builds a deterministic reachability graph of your repository, scores every finding with explainable confidence, and hands Claude Code, Cursor, or Codex a guided workflow — so the model spends tokens on judgement, not on rediscovering your codebase.
Every team has it: modules nobody imports, exports nobody calls, dependencies nobody needs. Existing tools find it — then drown you in false positives, so you stop reading them. Agents make it worse: they cannot tell dead from dynamically loaded, so they either leave the mess or delete something that mattered.
A Django signal, a FastAPI route, a Spring bean, a Rails model: all "unused" to a naive import scanner. One wrong deletion and the tool is uninstalled.
Each conversation starts from zero: crawl the tree, re-read files, re-triage the same findings. That is the single largest token sink in agent-driven cleanup.
Knip for JS, Vulture for Python, nothing agreed for Go, Java, Rust, C#, Ruby, PHP or Swift. Enterprises need one signal shape across every service.
Python AST, TS/JS import graph, and a reference graph for 14 more languages. Deterministic. Offline.
no LLMNamed signals — decorators, base classes, string references, config mentions, dynamic imports — adjust a base score.
no LLMDevil's advocate checks schedulers, orchestrators, entry points, flags, reflection. Identification + security lens. Verdict: remove / verify / keep.
no LLMOptional model reviews remove first, then verify, as evidence packets. Veto only: confirm, escalate, or overturn — never strengthen. Then exact files, greps, validate.
Parsed facts, finding history, decisions and verdicts persist in .deadpath/. Next session starts warm.
Severity is derived from a reproducible score, not a hunch. Framework registration lowers it by 0.60. A string literal naming the module lowers it by 0.35. Only ≥ 0.85 becomes block and fails CI; everything else is a lead for the agent to verify.
block by design.Before an agent proposes a deletion, a deterministic critic checks 30+ named counter-hypotheses against real artifacts — crontab, Dockerfile, serverless handlers, CI scripts, reflection, feature flags — and returns file:line evidence. Then an identification check and a security lens. Verdict: remove, verify, or keep, plus the one next check that settles it.
verify=False, leftover secrets) is tagged remove_first — unmonitored attack surface.remove findings are quick wins. Strong objections skip verify/edit so the agent does not re-argue them.deadpath.workflow emits verify → edit → validate → remember steps shaped by the detected stack: grep this symbol, read these 40 lines, run go test ./... or pytest -q or dotnet build, then record the decision.
remove first (the deletions that hurt if a live path was missed), then verify. Keep and note stay offline. The model cannot strengthen a verdict..deadpath/memory.json keeps parsed facts by content hash, finding history, your decisions and triage verdicts. On a repeat visit the agent receives one-liners for known findings, nothing for acknowledged ones, and only the essentials of the profile.
scan --only-new turns a legacy backlog into a CI ratchet: only new dead code fails.Tokens per deadpath.scan packet on the bundled fixture (≈4 chars/token)
Measured with tests/ fixture deadapp. Savings grow with repository size: the compact packet is O(findings), the full one is O(evidence).
Python gets full AST analysis. TypeScript and JavaScript (including Vue and Svelte single-file components) get an import graph. Fourteen more languages get a file-level reference graph with declared precision, so confidence stays honest. Frameworks are recognised from imports and manifests to mark entry points and registration patterns.
path imports resolve to files; findings may reach block. name references are type or module tokens; findings are capped at warn. Full support matrix →
Claude Code, Cursor and Codex each get a skill that teaches the agent the loop: scan → workflow → verify → remember. All three talk to the same deadpath mcp stdio server.
/plugin marketplace add wolfxops/deadpath
/plugin install deadpath
Skill + MCP manifest. Ask about unused code and Claude runs the loop.
{ "mcpServers": { "deadpath": {
"command": "deadpath", "args": ["mcp"] } } }
Rule + skill stop Cursor from guessing dead code without a scan.
[mcp_servers.deadpath]
command = "deadpath"
args = ["mcp"]
Add to ~/.codex/config.toml. Same server, same findings.
The fixture scan needs no API key and no network. You should see an orphan file and an unused export as block, and an ambiguous export as warn.
pip install -e .
deadpath scan --mock
deadpath workflow --mock
deadpath languages