The Core Philosophy: The Human-AI Sandwich

Compound engineering shifts the developer's role from writing code to managing a system that learns. The workflow follows a "human-AI sandwich" model: the human provides high-level judgment at the start (brainstorming/planning) and the end (polishing/raising the bar), while the AI handles the autonomous execution in the middle. The goal is to move away from repetitive tasks and toward curating a system that compounds knowledge over time.

The 50/50 Rule for System Evolution

To prevent complexity from accumulating, you must treat your codebase and documentation as a memory system. The rule is simple: spend 50% of your time building the feature and 50% teaching the system what it got wrong.

  • Stored Solutions vs. Research: By embedding solutions, design preferences, and architectural constraints into your repository (as solution documents), you reduce the need for the AI to perform redundant research or correction passes. This is actually more token-efficient in the long run.
  • Raising the Bar: The final review phase is not for QA—it is for raising the bar. If the AI produces a suboptimal result, you don't just fix the code; you update the system's knowledge base so it never makes that specific mistake again.
  • Inverting Complexity: The ultimate success metric is that the next feature should be easier to build than the current one. If complexity increases, the system is not compounding correctly.

Practical Implementation

  • Brain-On Moments: Never offload the initial problem definition to the AI. You must deeply understand the problem you are solving before the AI begins its autonomous loop.
  • The Autonomous Loop: Once the plan is set, let the machine work in parallel for hours. Use tools to analyze PRs, run tests, and generate before/after visual comparisons.
  • Documentation of Reasoning: Document the why behind decisions, not just the code. These traces allow you to turn post-mortems into permanent behavioral changes for the agent, ensuring the system evolves alongside your product taste.