home / skills / mamba-mental / agent-skill-manager / simplification-cascades

simplification-cascades skill

/skills/problem-solving/simplification-cascades

This skill helps you identify a single insight that eliminates multiple components, dramatically simplifying systems and reducing maintenance.

npx playbooks add skill mamba-mental/agent-skill-manager --skill simplification-cascades

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
2.8 KB
---
name: Simplification Cascades
description: Find one insight that eliminates multiple components - "if this is true, we don't need X, Y, or Z"
when_to_use: when implementing the same concept multiple ways, accumulating special cases, or complexity is spiraling
version: 1.1.0
---

# Simplification Cascades

## Overview

Sometimes one insight eliminates 10 things. Look for the unifying principle that makes multiple components unnecessary.

**Core principle:** "Everything is a special case of..." collapses complexity dramatically.

## Quick Reference

| Symptom | Likely Cascade |
|---------|----------------|
| Same thing implemented 5+ ways | Abstract the common pattern |
| Growing special case list | Find the general case |
| Complex rules with exceptions | Find the rule that has no exceptions |
| Excessive config options | Find defaults that work for 95% |

## The Pattern

**Look for:**
- Multiple implementations of similar concepts
- Special case handling everywhere
- "We need to handle A, B, C, D differently..."
- Complex rules with many exceptions

**Ask:** "What if they're all the same thing underneath?"

## Examples

### Cascade 1: Stream Abstraction
**Before:** Separate handlers for batch/real-time/file/network data
**Insight:** "All inputs are streams - just different sources"
**After:** One stream processor, multiple stream sources
**Eliminated:** 4 separate implementations

### Cascade 2: Resource Governance
**Before:** Session tracking, rate limiting, file validation, connection pooling (all separate)
**Insight:** "All are per-entity resource limits"
**After:** One ResourceGovernor with 4 resource types
**Eliminated:** 4 custom enforcement systems

### Cascade 3: Immutability
**Before:** Defensive copying, locking, cache invalidation, temporal coupling
**Insight:** "Treat everything as immutable data + transformations"
**After:** Functional programming patterns
**Eliminated:** Entire classes of synchronization problems

## Process

1. **List the variations** - What's implemented multiple ways?
2. **Find the essence** - What's the same underneath?
3. **Extract abstraction** - What's the domain-independent pattern?
4. **Test it** - Do all cases fit cleanly?
5. **Measure cascade** - How many things become unnecessary?

## Red Flags You're Missing a Cascade

- "We just need to add one more case..." (repeating forever)
- "These are all similar but different" (maybe they're the same?)
- Refactoring feels like whack-a-mole (fix one, break another)
- Growing configuration file
- "Don't touch that, it's complicated" (complexity hiding pattern)

## Remember

- Simplification cascades = 10x wins, not 10% improvements
- One powerful abstraction > ten clever hacks
- The pattern is usually already there, just needs recognition
- Measure in "how many things can we delete?"

Overview

This skill finds a single insight that removes multiple components and simplifies system design. It trains you to spot unifying principles where many special cases can be collapsed into a single abstraction. The goal is measurable simplification: fewer components, less config, and lower maintenance cost.

How this skill works

The skill inspects a codebase or system for repeated implementations, special‑case handling, and growing configuration surfaces. It guides you to list variations, identify the underlying commonality, and extract a domain‑independent abstraction. You validate the abstraction by testing fit across cases and measuring how many components become unnecessary.

When to use it

  • You see the same feature implemented in multiple ways across the system
  • Configuration files keep growing with options for edge cases
  • Refactoring feels like whack‑a‑mole—fixing one bug creates another
  • Many guardrails, locks, or validators that look similar
  • You need a high‑impact refactor with measurable ROI

Best practices

  • Start by inventorying variations before proposing abstractions
  • Prefer simple, well‑documented abstractions over clever designs
  • Prototype the abstraction and run it against real cases to validate coverage
  • Measure impact: count eliminated implementations, reduced LOC, and simplified configs
  • Keep the abstraction orthogonal and domain‑independent where possible

Example use cases

  • Replace separate batch/stream/file handlers with a single stream processor plus source adapters
  • Unify session tracking, rate limiting, and connection pools under a per‑entity ResourceGovernor
  • Adopt immutable data and transformation pipelines to remove locking, defensive copies, and complex cache invalidation
  • Convert many special‑case config flags into sane defaults plus a small extension API
  • Abstract repeated parsing/validation logic into a single rule engine that covers multiple formats

FAQ

How do I know an abstraction is safe to introduce?

Prototype and run it across existing cases. If most cases fit without complex exceptions and tests pass, it is likely safe.

When should I avoid collapsing components?

Avoid collapsing when special cases require fundamentally different semantics or when the abstraction would add hidden complexity that harms maintainability.