Most systems are
overbuilt.
Audit, reduce, verify — without breaking function.
Constraint-based system analyzer. Scans your codebase. Classifies every module. Proposes reductions. Validates against 5 structural constraints. Ships as a CLI and TypeScript API.
TRY IT
Run PRUNE on a system. Right now.
Paste your file tree or use the example. See what should not exist.
PROOF
We removed 55% of a system. Nothing broke.
Real codebase. 42 modules. 18 dependencies. 4-minute audit.
Before
After
THE SYSTEM
Every reduction is constraint-verified.
PRUNE does not guess. It evaluates every proposed change against 5 structural constraints. If any fails, the change is rejected.
No remaining module has a broken import. Every dependency chain stays intact.
Nothing more can be removed. Every remaining element is necessary.
No two modules export the same symbol. Each responsibility exists once.
Low coupling. Each module has minimal fan-in × fan-out. Changes stay local.
Short dependency chains. Any element can be traced to its purpose in one pass.
If ANY constraint fails → the reduction is rejected.
INSTALL
A real engine. Not a wrapper.
TypeScript. Zero external dependencies. 21KB. Scans your filesystem, builds a dependency graph, proposes constraint-verified reductions.
npm install prune-systems$ prune benchmark ./src
Before:
Files 42
Lines 11,400
Dependencies 18
After:
Files 19
Lines 5,200
Dependencies 9
Δ:
Files -55%
Lines -54%
Dependencies -50%
Constraints:
Function preserved ✓
Irreducible ✓
No duplication ✓
Local reasoning 0.82
Traceability 0.91
Verdict: SUCCESSimport { runPrune } from 'prune-systems';
const result = runPrune('./src');
console.log(result.verdict);
// → SUCCESS
console.log(result.reductions);
// → [
// { type: 'remove', targets: ['unused.ts'], impact: 0.9 },
// { type: 'merge', targets: ['helpers.ts', 'utils.ts'], impact: 0.7 },
// { type: 'inline', targets: ['wrapper.tsx'], impact: 0.5 },
// ]
console.log(result.constraints);
// → { functionPreserved: true, irreducible: true, ... }NO INSTALL REQUIRED
Copy. Paste. Audit.
Run this in Claude, ChatGPT, or Cursor. Add your system description. Get a reduction plan.
You are PRUNE, a constraint-based system analyzer. Audit the system I describe: 1. Scan every module, file, component, and dependency 2. Build the dependency graph 3. Classify each element: - living (actively used, connected) - dead (no imports, no dependents) - duplicated (same exports as another module) - decorative (thin wrapper, <15 lines) - parasitic (high deps, low value) 4. Propose reductions: - remove dead modules - merge duplicates (keep the one with more dependents) - inline decorative wrappers 5. Validate against constraints: - Function preserved (no broken imports) - Irreducible (nothing else can be removed) - No duplication (no shared exports remain) - Local reasoning (low coupling score) - Traceability (short dependency chains) 6. Output: - Before/after metrics (files, lines, deps) - Delta percentages - Constraint results (✓/✗) - Verdict: SUCCESS / PARTIAL / FAILURE Be precise. Be severe. Default to removal. Here is my system:
HONEST
When PRUNE fails.
Subtraction has failure modes. We designed constraints specifically to catch them.
Removing a module that other modules silently depend on.
→ Every remaining import is validated. If any breaks, the removal is rejected.
Two modules appear independent but share implicit state.
→ Fan-in × fan-out coupling score catches high-connectivity modules. Score must exceed 0.3.
Merging modules that serve different purposes.
→ Only modules with identical exports are merge candidates. Traceability ensures clear paths remain.
Removing code that isn't dead — just dormant.
→ The engine simulates removal of every remaining node. If any can still be safely removed, the system is not irreducible.
LAUNCHING
Launching on Product Hunt.
The first constraint-based system analyzer. Scan. Classify. Reduce. Verify. Without breaking function.
What it is
A CLI and TypeScript API that scans codebases, builds dependency graphs, proposes reductions, and validates them against 5 structural constraints.
Who it's for
Engineers who suspect their system has grown beyond what it needs. Tech leads managing accumulated complexity. Founders who want less, not more.
Try it now
Use the interactive demo above. Copy the prompt into Claude. Or install the package and run prune analyze ./src on your codebase.