Compound
Engineering
By Kieran Klaassen — GM of Cora at Every (every.to)
A methodology and open-source plugin where each unit of engineering work makes subsequent work easier — not harder. Plan, work, assess, compound, repeat.
The Philosophy
Traditional codebases accumulate complexity. Compound engineering inverts this: every feature makes the next feature easier to build. The system that produces code is more valuable than any individual piece of code.
Each unit of engineering work should make subsequent units easier — not harder.
— Core principle of Compound EngineeringCode must be hand-written
What matters is maintainable code solving the right problem — not who or what typed it.
Writing code is the core job
Shipping value is the job. Code is one input. Plans are the new code.
Every line needs manual review
Automated systems can catch the same issues. Build safety nets, not review processes.
Solutions must originate from the engineer
The engineer's role shifts to adding taste and context judgment. Extract your taste into the system.
First attempts should be good
First attempts have a 95% garbage rate. Second attempts are still 50%. Iteration is the point.
More typing = more learning
Reviewing 10 AI implementations teaches more patterns than hand-typing two.
Claude Code opens 100 percent of my pull requests, and I haven't typed a function in weeks. It's turned me from a programmer into an engineering manager overnight.
— Kieran KlaassenThe 50/50 Rule
Traditional teams allocate 90% of time to features and 10% to everything else. Compound engineering flips this: 50% building features, 50% improving the system — institutional knowledge, review agents, documentation. An hour spent creating a review agent saves ten hours of review over the next year.
Plan → Work → Assess → Compound
80% of time goes to Plan + Assess. 20% goes to Work + Compound. The fourth step — Compound — is what separates this from ordinary AI-assisted development.
Plan
Agents research the codebase, commit history, and external best practices in parallel. Produces a written document covering objective, architecture, approach, and success criteria.
- Three parallel research agents: repo analyst, framework docs researcher, best practices researcher
- Spec-flow-analyzer catches edge cases
- Enable ultrathink to spawn 40+ parallel research agents
- Builds a shared mental model between you and the agent
Work
Agent converts the plan into a to-do list and builds incrementally. MCP tools like Playwright let the agent use the app as it builds — writing code, walking through the UI, spotting issues.
- Git worktrees for isolated parallel development
- Progress tracking with task completion status
- Quality checks spawn 5+ reviewer agents automatically
- Linting, type-checking, PR creation built in
Assess
14 specialized agents review in parallel, each checking from a different angle: security, performance, architecture, data integrity, code quality, deployment readiness.
- P1 (must fix), P2 (should fix), P3 (nice to fix) triage
- Security sentinel checks OWASP top 10
- Performance oracle catches N+1 queries
- Code simplicity reviewer ensures minimalism
Compound
The money step. Learnings from any prior step get recorded for future agent use. Six parallel subagents extract, classify, and document solutions.
- Creates searchable markdown with YAML frontmatter
- Updates CLAUDE.md with new patterns and rules
- Knowledge auto-distributed to the whole team
- Test: "Would the system catch this automatically next time?"
The plan and review steps should comprise 80 percent of an engineer's time.
— Every.to guide on Compound Engineering22 Slash Commands
The plugin ships with workflow commands (prefixed workflows: to avoid collisions) and utility commands for autonomous operation.
| Command | Category | Description |
|---|---|---|
| /workflows:brainstorm | Core Loop | Explore requirements and approaches before planning. Runs lightweight repo research, asks clarifying questions, proposes approaches. |
| /workflows:plan | Core Loop | Turn feature ideas into detailed implementation plans. Spawns three parallel research agents plus spec-flow-analyzer. |
| /workflows:work | Core Loop | Execute plans with git worktrees and task tracking. Four phases: quick start, execute, quality check, ship it. |
| /workflows:review | Core Loop | Multi-agent code review. Spawns 14 specialized agents in parallel checking security, performance, architecture, and more. |
| /workflows:compound | Core Loop | Document solved problems to compound team knowledge. Six parallel subagents extract and categorize learnings. |
| /lfg | Autonomous | Full autonomous engineering workflow: plan → deepen-plan → work → review → resolve → browser tests → feature video → compound. Spawns 50+ agents. |
| /slfg | Autonomous | Full autonomous workflow with swarm mode for parallel execution across multiple worktrees simultaneously. |
| /deepen-plan | Autonomous | Enhance plans with parallel research agents for each section. Adds depth to existing plans. |
| /changelog | Utility | Create engaging changelogs for recent merges. Auto-generates from git history. |
| /triage | Utility | Triage and prioritize issues. Presents each finding for human decision: approve, skip, or customize priority. |
| /resolve_parallel | Utility | Resolve TODO comments in parallel across the codebase. |
| /resolve_pr_parallel | Utility | Resolve PR review comments in parallel. Addresses each comment and implements fixes. |
| /resolve_todo_parallel | Utility | Resolve todos in parallel, clearing technical debt efficiently. |
| /create-agent-skill | Create or edit Claude Code skills interactively. | |
| /generate_command | Generate new slash commands from descriptions. | |
| /heal-skill | Fix skill documentation issues automatically. | |
| /sync | Sync Claude Code config across machines. | |
| /test-browser | Utility | Run browser tests on PR-affected pages using agent-browser CLI. |
| /xcode-test | Utility | Build and test iOS apps on simulator. |
| /feature-video | Utility | Record video walkthroughs and add to PR description. |
| /reproduce-bug | Utility | Reproduce bugs using logs and console output. |
| /report-bug | Report a bug in the plugin itself. |
29 Agents, 19 Skills
Agents are specialized subagents spawned for specific tasks. Skills provide just-in-time context — injecting relevant documentation, patterns, or constraints only when needed, keeping context windows lean.
Agents by Category
Review Agents
15 agentsSpecialized code review from every angle, run in parallel during /workflows:review.
- security-sentinel — OWASP top 10 vulnerabilities
- performance-oracle — N+1 queries, indexes, caching
- architecture-strategist — architectural decisions
- code-simplicity-reviewer — final pass for minimalism
- data-integrity-guardian — migrations and data safety
- kieran-rails-reviewer — Rails strict conventions
- kieran-python-reviewer — Python strict conventions
- kieran-typescript-reviewer — TypeScript conventions
- dhh-rails-reviewer — DHH/37signals style
- deployment-verification-agent — Go/No-Go checklists
Research Agents
5 agentsGather information from the codebase, documentation, and external sources during the Plan phase.
- repo-research-analyst — repository structure
- framework-docs-researcher — framework documentation
- best-practices-researcher — industry standards
- learnings-researcher — institutional knowledge
- git-history-analyzer — code evolution
Design Agents
3 agentsBridge the gap between design mockups and implementation.
- figma-design-sync — sync with Figma designs
- design-iterator — iterative UI refinement
- design-implementation-reviewer — verify UI vs mockup
Workflow Agents
5 agentsAutomate recurring development tasks.
- bug-reproduction-validator — reproduce and validate bugs
- pr-comment-resolver — address PR review comments
- spec-flow-analyzer — find gaps in specifications
- lint — linting for Ruby and ERB files
- every-style-editor — enforce style guide compliance
Docs Agent
1 agentDocumentation generation following established patterns.
- ankane-readme-writer — Ankane-style READMEs for Ruby gems
Key Skills
Orchestration
Multi-agent coordination- orchestrating-swarms — comprehensive swarm guide
- git-worktree — parallel development management
- resolve-pr-parallel — parallel PR comment resolution
Development
Code patterns and style- dhh-rails-style — DHH/37signals coding style
- dspy-ruby — type-safe LLM apps with DSPy.rb
- agent-native-architecture — prompt-native patterns
- frontend-design — production-grade interfaces
Content & Tools
Productivity and automation- brainstorming — collaborative dialogue exploration
- compound-docs — capture solved problems
- skill-creator — guide for creating Claude Code skills
- agent-browser — CLI browser automation
- gemini-imagegen — image generation via Gemini
- rclone — upload files to cloud storage
Plugin File Structure
CLAUDE.md — agent instructions, preferences, patterns
docs/
brainstorms/ — /workflows:brainstorm output
solutions/ — /workflows:compound output
plans/ — /workflows:plan output
todos/
001-ready-p1-fix-auth.md
002-pending-p2-add-tests.md
CLAUDE.md is the most critical file — agents read it every session. docs/solutions/ builds searchable institutional knowledge that compounds over time.
Convert to Any Tool
The plugin includes an experimental Bun/TypeScript CLI that converts Claude Code plugins to other agentic coding tool formats. Write once, run everywhere.
How Conversion Works
bunx @every-env/compound-plugin install compound-engineering --to cursor
# Sync personal config to other tools
bunx @every-env/compound-plugin sync --target opencode
Agents become tool-specific rules files. Commands become tool-specific command formats. Skills are symlinked (not copied). MCP servers are translated to each tool's configuration schema. Personal skills from ~/.claude/skills/ are synced as symlinks for consistency.
Cursor Output
.cursor/ directory- Agents → .cursor/rules/.mdc (Agent Requested mode)
- Commands → .cursor/commands/.md
- Skills → .cursor/skills/ (identical standard)
- MCP servers → .cursor/mcp.json
Copilot Output
.github/ directory- Agents get frontmatter with tools: ["*"]
- MCP env vars prefixed COPILOT_MCP_
- infer: true enabled for all agents
Gemini Output
.gemini/ directory- Namespaced commands become directory structure
- workflows:plan → commands/workflows/plan.toml
Installation & Setup
Install the plugin in Claude Code, then start using the compound loop immediately. The bundled Context7 MCP server provides framework documentation lookup.
Claude Code (Primary)
/plugin marketplace add https://github.com/EveryInc/compound-engineering-plugin
/plugin install compound-engineering
Cursor
/add-plugin compound-engineering
Other Tools (via CLI conversion)
bunx @every-env/compound-plugin install compound-engineering --to opencode
# Codex
bunx @every-env/compound-plugin install compound-engineering --to codex
# GitHub Copilot
bunx @every-env/compound-plugin install compound-engineering --to copilot
Context7 MCP Server (if not auto-loading)
{
"mcpServers": {
"context7": {
"type": "http",
"url": "https://mcp.context7.com/mcp"
}
}
}
The Context7 MCP server provides framework documentation lookup for 100+ frameworks including Rails, React, Next.js, Vue, Django, and Laravel.
Browser Automation (Optional)
npm install -g agent-browser
agent-browser install # Downloads Chromium
Example Workflow
A real session walkthrough using the /lfg command — from idea to production-ready PR with 50+ agents.
Kick Off
You describe your feature in plain language. The /lfg command takes over, starting the full compound loop autonomously.
/lfg Add user notifications for comment repliesResearch Phase
Three parallel agents research your codebase, framework documentation, and industry best practices. They produce a detailed implementation plan covering architecture, affected files, and success criteria.
/workflows:plan (auto-triggered)Plan Deepening
Additional research agents enrich each section of the plan with parallel research. The system pauses here for your approval before proceeding.
/deepen-plan (auto-triggered)Implementation
Agent sets up a git worktree, creates a branch, and implements the plan step by step. It writes code, runs tests, and iterates on failures. MCP tools let it navigate the UI to verify its work.
/workflows:work (auto-triggered)Multi-Agent Review
14 specialized review agents analyze the code in parallel: security sentinel, performance oracle, architecture strategist, code simplicity reviewer, and more. Findings are triaged into P1/P2/P3 priorities.
/workflows:review (auto-triggered)Fix & Verify
Issues found during review are resolved automatically. Browser tests validate the feature works end-to-end. A feature video is recorded and attached to the PR description.
/resolve_parallel + /test-browser + /feature-videoCompound
Six parallel subagents extract learnings: what worked, what patterns emerged, what should be documented. Results are written to docs/solutions/ and CLAUDE.md is updated. Next time, the system knows more.
/workflows:compound (auto-triggered)Features that took a week to code ship in an afternoon of thoughtful delegation.
— Kieran KlaassenFive Stages of Compound Engineering
Skipping stages doesn't work — each builds the mental models required for the next.
Manual
Line-by-line, no AI. Traditional development.
Chat-Based
Copy-paste snippets, full control, you type everything.
Agentic + Review
AI modifies files, you approve each action line-by-line.
Plan-First
Step away during implementation. Review the final PR, not each line.
Idea to PR
Agent handles everything on a single machine. You ideate, review, merge.
Parallel Cloud
Multiple agents, multiple features, from anywhere. Full swarm mode.
Three Questions for Any AI Output
Ask these of every plan and implementation to surface hidden issues.
"What was the hardest decision you made here?"
Surfaces tricky tradeoffs the agent navigated. If the answer is "nothing was hard," the agent likely missed something.
"What alternatives did you reject, and why?"
Reveals the option space the agent considered. Ensures the chosen path was deliberate, not default.
"What are you least confident about?"
Gets the AI to flag its own weaknesses. The areas of lowest confidence are where human review matters most.
In Their Words
A system that produces code is more valuable than any individual piece of code.
— Every.to guide on Compound EngineeringYou have to unlearn coding. Stop thinking in terms of files and functions.
— Kieran KlaassenShip more value. Type less code.
— Core principle of Compound EngineeringPlans are the new code.
— Every.to guide on Compound EngineeringYou want to remove yourself as a micromanager of your own code.
— Kieran KlaassenNot shocking but an extremely effective way to convert these intuited best-practices into something specific, concrete, and largely automatic.
— Will Larson (lethain.com), on adopting Compound EngineeringLinks & Resources
Primary sources, documentation, and community content around Compound Engineering.
compound-engineering-plugin
The open-source plugin repository. 9.6K stars, 756 forks, 32 contributors. MIT license.
ArticleCompound Engineering: How Every Codes With Agents
The original article by Dan Shipper introducing the methodology and how Every uses it internally.
GuideEvery.to Compound Engineering Guide
Comprehensive guide covering the loop, beliefs, stages of adoption, best practices, and the plugin reference.
ArticleHow to Make Claude Code Better Every Time You Use It
Peter Yang interviews Kieran Klaassen about the full compound engineering system.
YouTube50-Minute Tutorial with Kieran Klaassen
Full video walkthrough: the compound loop, live demos, skills, Playwright MCP, and the /lfg command.
ArticleHow I Use Claude Code to Ship Like a Team of Five
Kieran's original article on his workflow: 4+ parallel agents, git worktrees, 100% AI-written PRs.
AnalysisLearning from Every's Compound Engineering
Will Larson's independent analysis. "Not shocking but extremely effective." Implementation took roughly an hour.
TutorialBuild an App with Multiple AI Agents
Full tutorial on building with Claude Code's multi-agent capabilities and the compound engineering plugin.