Skip to main content
Your agent writes dead code. Shrike deletes it — and proves the app still builds. Shrike is the cleanup layer for AI-built TypeScript apps. It finds code that an agent or pull request left behind, measures the dead weight, removes it in verified batches, and gives you a portable receipt that says exactly what was checked.
Verified means the project’s configured checks passed after removal, relative to a baseline. It does not prove the code is semantically unused in production, that the tests are adequate, or that external consumers cannot import it.

Start with the report

report always prints the deterministic plain report. Run npx getshrike with no arguments on an interactive terminal to open the read-only view; in CI, pipes, and agent sessions it falls back to plain output. npx getshrike report --base origin/main shows what this branch orphaned. The headline metric is dead weight %: removable source lines divided by analyzed non-generated source lines. It is always shown with the raw fraction, never as a score.
Example output — your project will show its own numbers.

What Shrike does

  • Whole-graph orphan delta. Shrike compares the merge-base graph with the branch head graph, so it finds code that became unreachable anywhere in the repository — including files the change never touched.
  • Verified deletion batches. Candidates are split into independent batches. Each batch is applied in a worktree, the project’s checks run against a baseline, and a regression is bisected so only the culprit is reverted.
  • Portable receipt. A content-addressed JSON receipt records graph hashes, witnesses, patches, check results, build evidence, and the outcome.
  • Agent and CI setup. shrike install writes a portable skill for coding agents, and shrike ci install writes an advisory-by-default GitHub Actions workflow.
Shrike fails closed. An item that is an entry, public API, generated, unparsed, or reachable through an unknown edge is protected and reported with a reason instead of being deleted. Repository content is treated as data, never as instructions; the analyzer does not spawn processes or open sockets. Dependencies are reported separately and are always advisory. Shrike never removes or edits a dependency automatically.

Who it is for

Shrike is for TypeScript and JavaScript projects — especially Next.js and React applications — that want to remove code orphaned by a change without guessing whether the project still builds. It is not a linter, a bundle optimizer, a type checker, a plugin catalogue, a cleanliness score, or a multi-language analyzer.

Framework coverage

Shrike protects framework-invoked code so it is not mistaken for dead code. Framework entries are gated on the owning package declaring the dependency, so a file that merely looks like a route in an unrelated package stays analyzable.

Start here

  1. Install Shrike — Node.js 22+ and the getshrike npm package.
  2. Read the cleanup report — run report and interpret the metric.
  3. Quickstart — report, scan, delta, and plan.
  4. Verified pruning — the batch, check, bisection, and receipt contract.
  5. Agent integrations and GitHub Action — put Shrike where you work.

Performance

The Rust engine emits deterministic JSON: identical input produces byte-identical output. The budgets below come from the repository’s deterministic generator and harness, which run one cold analysis followed by warmups and five measured runs, and report wall time and peak RSS. Absolute times are machine-specific; every reported run includes the machine and commit. See the benchmark method.