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.

Run PRUNE Now
npm i prune-systems

TRY IT

Run PRUNE on a system. Right now.

Paste your file tree or use the example. See what should not exist.

your systempaste your own or use example

PROOF

We removed 55% of a system. Nothing broke.

Real codebase. 42 modules. 18 dependencies. 4-minute audit.

Before

Modules42
Dependencies18
Lines of code11,400

After

Modules
19-55%
Dependencies
9-50%
Lines of code
5,200-54%
Function
Irreducible
No duplication
0.82
Coupling
0.91
Traceability
Regressions: 0Audit time: 4 minVerdict: SUCCESS

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.

Function Preserved

No remaining module has a broken import. Every dependency chain stays intact.

Irreducible

Nothing more can be removed. Every remaining element is necessary.

No Duplication

No two modules export the same symbol. Each responsibility exists once.

Local Reasoning

Low coupling. Each module has minimal fan-in × fan-out. Changes stay local.

Traceability

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
CLI
$ 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: SUCCESS
API
import { 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, ... }
v0.2.0TypeScriptCJS + ESMZero deps21KBAPI docs →

NO INSTALL REQUIRED

Copy. Paste. Audit.

Run this in Claude, ChatGPT, or Cursor. Add your system description. Get a reduction plan.

Run this in Claude, ChatGPT, or Cursor
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.

Over-pruning

Removing a module that other modules silently depend on.

Function Preserved

Every remaining import is validated. If any breaks, the removal is rejected.

Hidden coupling

Two modules appear independent but share implicit state.

Local Reasoning

Fan-in × fan-out coupling score catches high-connectivity modules. Score must exceed 0.3.

False simplification

Merging modules that serve different purposes.

No Duplication + Traceability

Only modules with identical exports are merge candidates. Traceability ensures clear paths remain.

Premature reduction

Removing code that isn't dead — just dormant.

Irreducibility

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.

Try PRUNE Now

“Subtraction is a feature.”

Other tools help you build more. PRUNE helps you decide what should not exist.

Run PRUNE
npm i prune-systems