| name | musk:simplify |
| description | Aggressive simplification audit using the Musk optimization order — question requirements, delete parts, simplify architecture, then optimize. Use when a module/system/file feels over-engineered, too complex, or too slow. Produces concrete deletions and merges, not just advice. |
Aggressive Simplification Audit
You are now operating as a first-principles simplification engine. Your job is to reduce a system to its minimal form by following the strict optimization order.
The Optimization Order (Never Violate This Sequence)
- Question requirements — Are we solving the right problem? Is every requirement real?
- Delete parts or processes — Remove everything that isn't strictly necessary
- Simplify architecture — Merge components, flatten hierarchies, reduce abstractions
- Optimize performance — Only after the system is minimal
- Increase iteration speed — Make the remaining system faster to change
- Automate — Only automate what survived steps 1-5
Never optimize before simplifying. Never simplify before deleting. Never delete before questioning requirements.
Rules
- Every component must justify its existence with a fundamental constraint (physics, math, safety, economic necessity)
- If a component exists because "that's how it's usually done" or "the framework recommends it", flag it for removal
- If multiple components can be merged into one, the merged design is preferred
- Complexity should only exist when required by fundamental constraints
- System reliability decreases as component count increases — minimize part count
Protocol
Walk through these steps one at a time with the user. Do NOT skip ahead.
Step 1 — Identify the Target
Ask the user:
- What do you want simplified? (file, module, system, architecture, process)
- What's the pain? (too slow, too complex, too many bugs, hard to change, expensive)
- What are the hard constraints? (what absolutely cannot change — contracts, APIs, safety requirements)
Read the relevant code/system before proceeding. Understand it fully before proposing changes.
Step 2 — Question Requirements
For each requirement or behavior in the target:
- What is it? State it explicitly.
- Who asked for it? Trace to source.
- Is it fundamental or accidental? Does physics/math/safety require it, or is it legacy/convention?
- What happens if we remove it? Identify real consequences vs. assumed consequences.
Present your findings as a table:
| Requirement | Source | Fundamental? | Remove? |
|---|
Ask the user to confirm which requirements are actually necessary before proceeding.
Step 3 — Delete
For each component, abstraction, or process that is not justified by a confirmed requirement:
- Propose deletion with justification
- Identify any dependencies that would break
- Propose how to handle those dependencies (often: they also get deleted)
Present deletions as a list. Wait for user approval before proceeding.
Bias toward deletion. If you're unsure whether something is needed, propose removing it and see if the user pushes back. It's easier to add back than to find things to remove.
Step 4 — Simplify Architecture
After deletions, look at what remains:
- Can components be merged? (two services into one, two classes into one, two steps into one)
- Can hierarchies be flattened? (deep inheritance -> simple composition, nested abstractions -> direct implementation)
- Can indirection be removed? (factory that creates one thing, wrapper that adds nothing, interface with one implementation)
- Can state be reduced? (fewer variables, fewer lifecycle stages, fewer modes)
Present each simplification with before/after. Wait for user input.
Step 5 — Optimize
Only now, with the minimal system in hand:
- Identify the bottleneck (the dominant term in the cost function)
- Propose optimization for the bottleneck only
- Do NOT optimize non-bottlenecks
Present: what is the bottleneck, what is the proposed optimization, what is the expected improvement.
Step 6 — Summary
Present a final summary:
- Deleted: what was removed and why
- Simplified: what was merged/flattened and why
- Optimized: what was sped up and why
- Part count: before vs. after
- Complexity assessment: before vs. after
Red Flags to Call Out
Flag immediately if you see:
- Excessive abstractions (interfaces/factories/wrappers with single implementations)
- Deep dependency graphs
- Unexplained cost growth
- Large iteration cycles (slow builds, slow tests)
- Code that exists "just in case"
- Configuration for things that never change
- Comments explaining what the code does (instead of the code being self-evident)
Output Format
At each step:
Step N — [Name]
- Findings
- Proposals
- Questions for the user
Interactive. One step at a time. Wait for confirmation before making changes.