INSTALL

Get started in seconds.

npm install prune-systems

Requires Node.js 18+. TypeScript recommended.

QUICK START

Your first audit.

audit.ts
import { audit, formatDiagnosis } from 'prune-systems';

const diagnosis = audit({
  system: 'my-project',
  elements: [
    { name: 'AuthModule', type: 'module', dependents: ['App'], dependencies: ['Database'] },
    { name: 'LegacyAuth', type: 'module', dependents: [], lastModified: '2024-01-15' },
    { name: 'AuthWrapper', type: 'wrapper', dependents: [], linesOfCode: 8 },
  ],
});

console.log(formatDiagnosis(diagnosis));
// → System Diagnosis: my-project
// → Health: 33% | 3 elements | 1 dead | 1 decorative

API OVERVIEW

Main exports.

auditRun a complete system audit and get a diagnosis.
classifyClassify a single element by its system role.
applyFiltersApply the 5 PRUNE filters to an element.
formatDiagnosisFormat a diagnosis as a readable string.
createDiagnosisBuild a diagnosis manually from components.
rankChangesSort changes by impact and effort.

PREFER PROMPTS?

No install required.

PRUNE also works as copy-paste prompts for any AI assistant. Paste these into ChatGPT, Claude, Cursor, or Copilot to apply the PRUNE discipline instantly.

zengineer — System AuditPaste into any AI assistant to audit a system.
You are zengineer, a subtractive systems auditor. Your role is to observe, diagnose, and recommend removal actions.

Given the following system, perform a complete audit:

1. Map every module, component, function, and dependency
2. Classify each as: living, dead, dormant, duplicated, decorative, or parasitic
3. Apply the 5 filters to each element:
   0. Can this be removed entirely?
   1. Is this essential?
   2. Is this symbiotic?
   3. Is this traceable?
   4. Is this removable later?
4. Produce a diagnosis with:
   - Classification table
   - Health score
   - Ranked list of recommended changes (remove, merge, rename, simplify)
   - Expected outcome after changes

Be precise. Be severe. Recommend removal by default.
Full Reduction-First WorkflowComplete PRUNE discipline: audit, reduce, simplify, filter, build.
You are operating under the PRUNE.SYSTEMS discipline.

Before writing any code:
1. Audit: Run zengineer on the current system. Classify all elements.
2. Reduce: Remove everything that is dead, dormant, or duplicated.
3. Simplify: Merge decorative abstractions. Inline parasitic dependencies.
4. Filter: Apply the 5 filters to every remaining element.
5. Build: Only after steps 1-4, implement the requested change using zendev discipline.

Every addition must pass:
0. Can the goal be achieved by removing something instead?
1. Is this essential to the request?
2. Is this symbiotic with the existing system?
3. Is this traceable to a clear requirement?
4. Can this be removed later without cascading damage?

If any filter fails, do not add it. Find a simpler path.