Skip to content

Compounding Engineering (DSPy Edition)

Python License Code Style: Ruff DSPy

Each unit of engineering work should make subsequent units of work easierβ€”not harder.

What is Compounding Engineering?

Compounding Engineering is a philosophy where every task you complete makes the next one easier. This isn't just about reusing codeβ€”it's about systematically extracting learnings, patterns, and decisions from each piece of work and automatically applying them to future tasks.

This CLI tool implements that philosophy using DSPy, providing AI-powered development tools for:

  • 🧠 Knowledge Accumulation - Every action automatically strengthens the system
  • πŸ” Multi-Agent Code Review - 10+ specialized reviewers working in parallel
  • πŸ€– Intelligent Work Execution - ReAct-based file editing with reasoning
  • πŸ“‹ Smart Planning - Repository-aware feature planning
  • βœ… Interactive Triage - Manage and prioritize findings
  • πŸ›‘οΈ Secure Configuration - Multi-source handled .env logic with path traversal protection
  • ⚑ Smart Context Gathering - Relevance-scored file selection and token management

Key Features

🧠 True Compounding Intelligence

Unlike traditional tools, this system learns and improves with every use:

  • Auto-Learning: Every todo resolution automatically codifies learnings
  • KB Auto-Injection: Past learnings automatically inform all AI operations
  • Pattern Recognition: Similar issues are prevented based on past resolutions
  • Knowledge Accumulation: The system gets smarter with every use

πŸ” Multi-Agent Code Review

Run 10+ specialized review agents in parallel, each focusing on different aspects:

  • Security Sentinel - Detects vulnerabilities (SQLi, XSS, CSRF, etc.)
  • Performance Oracle - Identifies bottlenecks and algorithmic issues
  • Architecture Strategist - Reviews design patterns and SOLID principles
  • Data Integrity Guardian - Checks transaction safety and validation
  • And many more specialized reviewers...

All agents benefit from your accumulated knowledge base.

πŸ›‘οΈ Secure Work Execution

Execute AI-generated plans safely with flexible modes:

  • In-place execution (default) - Direct file modifications
  • Isolated worktrees (--worktree) - Safe parallel execution in git worktrees
  • Parallel processing - Multi-threaded todo resolution
  • Auto-codification - Every resolution creates learnings for future use

πŸ“š Knowledge Base

The heart of the compounding system:

graph LR
    A[Plan] -->|KB Context| B[Execute Work]
    B -->|KB Context| C[Review Code]
    C -->|KB Context| D[Triage Findings]
    D -->|Auto-Codify| KB[(Knowledge Base)]
    KB -->|Auto-Inject| A
    KB -->|Auto-Inject| B
    KB -->|Auto-Inject| C
    KB -->|Auto-Inject| D

    style KB fill:#4CAF50,stroke:#333,stroke-width:3px
    style D fill:#FFC107,stroke:#333,stroke-width:2px

Quick Example

# 1. Review your code changes
uv run python cli.py review

# 2. Triage the findings
uv run python cli.py triage

# 3. Let AI fix the issues (automatically learns from the process)
uv run python cli.py work p1

# 4. The system now knows how to prevent similar issues!

Each cycle makes the next one easier. That's compounding engineering.

Why This Tool?

Traditional Tools Compounding Engineering
Same issues repeated Patterns learned and prevented
Manual documentation Auto-codification of learnings
Context lost between tasks Knowledge automatically applied
Static capabilities System improves with use

Get Started

Ready to experience compounding engineering?

Installation Guide - Get up and running in minutes

Quick Start - Your first compounding engineering cycle

Configuration - Set up your LLM provider

Usage Guide - Learn the core workflows

Philosophy

Based on the Compounding Engineering philosophy by Kieran Klaassen:

  • Plan β†’ Delegate β†’ Assess β†’ Codify - Systematic workflow
  • Each unit of work makes subsequent work easier - Knowledge accumulation
  • Systematic beats heroic - Automated learning and reuse
  • Quality compounds over time - System gets smarter with use

View on GitHub | Report Issue | Contribute