Compound Engineering: Making Work Compound Into the Next
#AI

Compound Engineering: Making Work Compound Into the Next

Tech Essays Reporter
9 min read

A revolutionary philosophy where each engineering effort builds upon previous work to make future development easier, not harder.

Compound Engineering: Making Work Compound Into the Next

Featured image

The Philosophy of Compounding

The core philosophy of compound engineering is that each unit of engineering work should make subsequent units easier—not harder. Most codebases follow a different trajectory, accumulating complexity with each feature addition until they become unwieldy monstrosities that teams fight rather than build upon.

After years of traditional development, organizations find that engineers spend more time navigating their system's complexities than adding new functionality. Each feature becomes a negotiation with existing code, introducing fragility and increasing cognitive load. The codebase gradually becomes harder to understand, modify, and trust.

Compound engineering flips this destructive cycle on its head. Instead of features adding complexity, they teach the system new capabilities. Bug fixes eliminate entire categories of future bugs. When codified, patterns become tools for future work. Over time, the codebase becomes easier to understand, easier to modify, and easier to trust.

The Four-Step Compound Loop

Every, the organization behind this philosophy, runs five products with primarily single-person engineering teams. Their system is built around a four-step loop that forms the foundation of compound engineering:

Plan → Work → Review → Compound → Repeat

The first three steps should be familiar to any developer, but it's the fourth step that distinguishes compound engineering from traditional approaches. Skipping this step reduces the methodology to traditional development with AI assistance.

The loop works consistently whether fixing a bug in five minutes or building a feature over several days—only the time spent on each step varies. The ideal allocation is 80 percent of time on planning and review, with the remaining 20 percent on execution and compounding.

1. Plan: Transforming Ideas into Blueprints

Planning transforms abstract ideas into concrete blueprints, with better plans consistently producing better results. This stage involves:

  • Understanding requirements: What's being built and why? What constraints exist?
  • Researching the codebase: How does similar functionality work? What patterns exist?
  • Researching externally: What do framework docs say? What are established best practices?
  • Designing the solution: What's the approach? Which files need changes?
  • Validating the plan: Does this hold together? Is it complete?

2. Work: Executing the Plan

Execution follows the planned blueprint, with the AI implementing while the developer monitors. Key tasks include:

  • Setting up isolation: Using git worktrees or branches to keep work separate
  • Executing the plan: The agent implements step by step
  • Running validations: Testing, linting, and type checking after each change
  • Tracking progress: Checking what work has been completed and what remains
  • Handling issues: Adapting the plan when something breaks

3. Review: Assessing and Capturing Learnings

This critical step catches issues before they ship while capturing learnings for future cycles. Actions include:

  • Multiple agent reviews: Specialized reviewers examine code in parallel
  • Prioritizing findings: Marking issues as P1 (must fix), P2 (should fix), or P3 (nice to fix)
  • Resolving findings: The agent fixes issues based on review feedback
  • Validating fixes: Confirming corrections are correct and complete
  • Capturing patterns: Documenting what went wrong to prevent recurrence

4. Compound: Where the Real Gains Happen

Traditional development stops at review, but the compound step is where the exponential benefits emerge. The first three steps produce a feature; the fourth produces a system that builds features better each time.

Key actions in this crucial step:

  • Capturing the solution: Asking what worked, what didn't, and what insights are reusable
  • Making it findable: Adding YAML frontmatter with proper metadata and tags
  • Updating the system: Adding new patterns to CLAUDE.md, the file agents read at each session start
  • Creating new agents when warranted
  • Verifying the learning: Asking if the system would catch this issue automatically next time

Implementation: The Compound Engineering Plugin

The compound engineering workflow is delivered as a plugin that can be installed in various AI coding tools with zero configuration. The plugin includes:

  • 26 specialized agents, each trained for specific tasks
  • 23 workflow commands including the main loop and utilities
  • 13 skills providing domain expertise

Core Commands

The plugin provides several key commands that implement the compound loop:

  • /workflows:brainstorm: Helps clarify requirements when you're unsure what to build
  • /workflows:plan: Transforms feature descriptions into detailed implementation plans
  • /workflows:work: Executes the code implementation plan
  • /workflows:review: Conducts comprehensive PR reviews using multiple specialized agents
  • /workflows:compound: Documents solved problems for future reference
  • /lfg: Chains the entire pipeline from idea to completed PR

Specialized Review Agents

The review process employs 14 specialized agents that analyze code in parallel:

  • Security: Scans for OWASP vulnerabilities, injection attacks, and authentication flaws
  • Performance: Detects N+1 queries, missing indexes, and caching opportunities
  • Architecture: Evaluates system design decisions and component boundaries
  • Pattern recognition: Identifies design patterns, anti-patterns, and code smells
  • Data integrity: Validates migrations, transaction boundaries, and referential integrity
  • Code simplicity: Enforces YAGNI principles and flags unnecessary complexity
  • Framework-specific reviewers: For Rails, Python, TypeScript, and other frameworks
  • Deployment verification: Generates pre-deploy checklists and rollback plans
  • Frontend: Detects race conditions in JavaScript and Stimulus controllers
  • Agent-native: Ensures features are accessible to both humans and agents

Shifting Mental Models: What to Let Go

to implement compound engineering effectively, teams must unlearn several deeply held beliefs about software development:

  1. "The code must be written by hand" - The requirement is to write good code, not necessarily to type it manually
  2. "Every line must be manually reviewed" - Quality can be achieved through automated systems that catch the same issues
  3. "Solutions must originate from the engineer" - With AI researching approaches, engineers focus on adding taste and context
  4. "Code is the primary artifact" - A system that produces code is more valuable than any individual implementation
  5. "Writing code is the core job function" - Developers ship value through planning, reviewing, and system improvement, not just coding
  6. "First attempts should be good" - First attempts have a 95% garbage rate; focus on iterating quickly rather than perfection
  7. "Code is self-expression" - Code belongs to the team, product, and users, not individual developers
  8. "More typing equals more learning" - Understanding matters more than muscle memory; reviewing implementations builds deeper knowledge

What to Adopt Instead

In place of these outdated beliefs, compound engineering suggests adopting new approaches:

  1. Extract taste into the system - Document preferences in CLAUDE.md or AGENTS.md so agents produce code matching your style
  2. Follow the 50/50 rule - Allocate 50% of engineering time to features and 50% to system improvements that build institutional knowledge
  3. Trust the process, build safety nets - Create verification infrastructure rather than gatekeeping at every step
  4. Make environments agent-native - If developers can see or do something, agents should be able to as well
  5. Embrace parallelization - Run multiple agents and features simultaneously to overcome compute bottlenecks
  6. Treat plans as the new code - Start with detailed plans that become the source of truth for implementation

The Five Stages of Adoption

to implement compound engineering effectively, teams progress through five stages:

  1. Stage 0: Manual development - Writing code line by line without AI assistance
  2. Stage 1: Chat-based assistance - Using AI as a smart reference tool, copying snippets manually
  3. Stage 2: Agentic tools with line-by-line review - Allowing AI to make changes directly but approving each action
  4. Stage 3: Plan-first, PR-only review - Collaborating on detailed plans, then letting AI implement without supervision
  5. Stage 4: Idea to PR - Providing ideas and letting AI handle everything from research to PR creation
  6. Stage 5: Parallel cloud execution - Running multiple agents in parallel on cloud infrastructure

Best Practices for Implementation

Agent-Native Architecture

An agent-native approach means giving agents the same capabilities developers have. The agent-native checklist helps teams verify their setup:

  • Can agents run tests, linters, and type checkers?
  • Can they access logs and debugging tools?
  • Can they perform git operations and create pull requests?
  • Can they access production systems (read-only) and error tracking?

Permission Management

The --dangerously-skip-permissions flag in Claude Code eliminates constant permission requests, enabling flow state. However, it should only be used when:

  • You trust the process and have good review systems
  • You're working in a safe environment (not production)
  • You have good rollback capabilities

Safety is maintained through git version control, tests, and PR review.

Design Workflow

The "baby app" approach allows design experimentation without risk:

  1. Create a throwaway project for prototyping
  2. "Vibe code" designs until they feel right
  3. Extract patterns and design system elements
  4. Transfer refined designs to the main project

Team Collaboration Patterns

the compound engineering approach transforms team dynamics:

  • Traditional: Person A writes code → Person B reviews → Discussion → Merge
  • Compound: Person A creates plan → AI implements → AI agents review → Person B reviews AI review → Merge

New team agreements include explicit plan approval, PR ownership by the initiator, and human reviewers focusing on intent rather than implementation details.

Implications for Software Development

Compound engineering represents a fundamental shift in how software is created and maintained:

  1. Productivity transformation: Teams can dramatically increase output while potentially writing less code
  2. Code quality evolution: Parallel review by specialized agents may catch more issues than traditional human review
  3. Knowledge management: Institutional knowledge becomes systematically captured and accessible
  4. Role evolution: Developers shift from code writers to system designers and quality assurers
  5. Technical debt reduction: Continuous system improvement through the compound step systematically reduces accumulated debt

Counter-Perspectives and Challenges

Despite its compelling benefits, compound engineering faces several challenges:

  1. Over-reliance on AI: Teams might lose fundamental understanding of their systems
  2. Security and control concerns: AI-generated code introduces new security considerations
  3. Initial setup cost: Significant investment is required to build the compound system
  4. Applicability limitations: The approach may work better for certain application types than others
  5. Team resistance: Many developers may resist the shift from "code as self-expression" to "code as system output"
  6. Tool dependency: Heavy reliance on specific AI tools and platforms creates potential vendor lock-in

Conclusion

Compound engineering offers a thoughtful evolution of software development practices in the age of AI. It's not merely about using AI to write code faster, but about fundamentally rethinking development processes to leverage AI capabilities while mitigating their limitations.

The core insight is that value in software development is shifting from writing individual lines of code to designing systems that can generate high-quality code autonomously. This requires different skills from developers, with increased emphasis on planning, review, and system design.

The compound step—capturing learnings from each cycle to improve future work—creates a virtuous cycle where the system gets progressively better at generating code that matches team preferences and standards. For organizations willing to make the transition, compound engineering offers a path to dramatically improved productivity and code quality in an AI-augmented development world.

For those interested in exploring this approach further, Every provides access to their complete library of AI and engineering content through their subscription service.

Comments

Loading comments...