Accuracy
Most dead-code and anti-pattern tools ask you to trust them. Necro measures itself: every number on this page is computed by running Necro over a frozen, real-repo corpus with hand-verified ground truth, then scored automatically. The numbers below are not hand-typed — they are read directly from a committed benchmark snapshot you can regenerate yourself.
Dead-code triage — precision & recall
Section titled “Dead-code triage — precision & recall”The headline number. Necro’s triage classifies genuinely-ambiguous maybe
findings as dead or alive. The positive class is “dead”, so precision is
what matters most: it measures how often Necro is right when it calls code dead.
A false positive here — killing live production code — is the trust-killer that
sinks static dead-code tools.
| Metric | Value | | --- | --- | | Precision (dead class) | 100% | | Recall (dead class) | 47% | | F1 | 0.64 | | True positives / False positives / False negatives | 7 / 0 / 8 | | Cases | 48 (honojs/hono@61d6d66 + trpc/trpc@c7360d4) |
At 100% precision across 48 real-repo
cases, Necro made 0 false-positive calls — it
never told you to delete live code. Recall is deliberately the looser axis:
Necro would rather quarantine an ambiguous symbol in the maybe tier than risk a
wrong kill.
Duplication refactor — pass-rate
Section titled “Duplication refactor — pass-rate”A different, structural metric (not precision). For each real clone group, Necro proposes an extract-duplicate refactor; a proposal passes only if it extracts one shared exported function, collapses the duplication at every clone site, and preserves each call surface. No human grades the output — the scorer is mechanical.
| Metric | Value | | --- | --- | | Pass-rate | 92% | | Passed / total | 11 / 12 | | Cases | 12 (trpc/trpc@c7360d4 + drizzle-team/drizzle-orm@48e5406) |
Methodology
Section titled “Methodology”- Corpora are real, frozen, and provenanced. Cases are captured verbatim from pinned commits of external TypeScript repositories (the SHAs above). The triage corpus carries hand-verified ground-truth labels assigned by reading each symbol’s actual usage across the source tree; the duplication corpus is scored structurally and needs no labels. Only case selection is a human step.
- Triage scoring. Each case is a
maybe-tier finding with its authentic evidence chain. Necro classifies it with a location-weighted prompt; the prediction is compared to ground truth. Precision/recall are computed on the “dead” class. - Duplication scoring. Each case is a real clone group flagged by Necro’s own
detector at its default
minTokens. The model’s extraction is lowered back to the syntactic IR and checked: one shared function, every edited site collapsed below the clone threshold, every signature preserved. - Non-determinism caveat. Both metrics put a language model in the loop, so a given run is a measured snapshot, not a guarantee — re-running can move the numbers by a few cases. Necro’s internal regression gates are set as floors below observed run-to-run minima for exactly this reason.
Reproduce it yourself
Section titled “Reproduce it yourself”The numbers above come from a committed snapshot. To regenerate it:
git clone https://github.com/manehorizons/necro && cd necronpm installexport ANTHROPIC_API_KEY=sk-... # the run calls the real modelnpm run bench # writes bench/results.jsonnpm run bench runs all 60 cases (48 triage +
12 duplication) and writes a provenance-stamped bench/results.json — the
same file this page reads.
Limitations & honesty
Section titled “Limitations & honesty”- Sample size is modest (48 triage + 12 duplication cases). These are authentic, deliberately-hard cases, not an exhaustive survey.
- Repo selection is curated. Cases come from a handful of well-known TS repos; results may differ on your codebase.
- No competitor comparison yet. This page reports Necro’s own measured numbers. A fair head-to-head against other tools (run on the same corpus, scored the same way) is planned as a follow-up — we’d rather publish nothing than an unfair comparison.