Back to Articles

Compound Engineering: AI Development That Gets Smarter With Every Commit

[ View on GitHub ]

Compound Engineering: AI Development That Gets Smarter With Every Commit

Hook

What if every feature you shipped made the next one easier to build? Compound Engineering flips the script on technical debt—instead of accumulating friction, it systematically captures knowledge so AI agents get smarter with each task.

Context

AI coding assistants have a memory problem. Ask Copilot to refactor a component today, and tomorrow it'll suggest the same antipattern you just fixed. Claude can architect a beautiful system, then completely forget those decisions when you ask it to add a feature next week. The industry solved this for humans with documentation, ADRs, and code reviews—but our AI tools still treat every prompt like a blank slate.

Compound Engineering emerged from this gap. Built by EveryInc and adopted by 16,000+ developers, it's a TypeScript plugin that transforms AI-assisted development from isolated interactions into a cumulative knowledge system. Instead of hoping your AI remembers context, CE enforces a workflow where strategy documents, implementation plans, and "compound notes" become first-class artifacts that ground future agent behavior. It's methodology-as-code: the plugin won't let you jump straight to implementation without brainstorming requirements, and it won't let you merge without multi-agent review. The overhead is real, but so is the promise—software that compounds in value rather than complexity.

Technical Insight

The architecture centers on two primitives: skills (slash commands you invoke) and agents (autonomous actors that execute workflows). With 37 skills and 51 agents, CE provides a complete development lifecycle, but the real innovation is how these components coordinate through persistent artifacts.

Consider the typical flow. You start with /brainstorm, which spawns a requirements agent that doesn't just chat—it generates a structured markdown file with user stories, edge cases, and acceptance criteria. Next, /plan creates an implementation roadmap with explicit dependencies and risk assessments. Only then does /implement kick off, and here's where it gets interesting: the execution agent creates a git worktree for isolation, reads your STRATEGY.md and prior compound notes, then writes code that's informed by every previous decision.

Here's what a compound note looks like in practice:

// compound-notes/auth-patterns.md
## Pattern: Token Refresh Flow
**Context:** Added 2024-01-15 during OAuth integration
**Learning:** Always refresh tokens 5min before expiry, not on 401
**Rationale:** 401-based refresh causes race conditions when multiple 
             requests fail simultaneously
**Code Reference:** src/auth/TokenManager.ts:45-67
**Future Guidance:** Any new auth integration should use TokenManager 
                     base class to inherit this behavior

These notes aren't just documentation—they're injected into agent context on every subsequent task. When you later run /brainstorm for a new API integration, the agent reads this note and proactively suggests using TokenManager. You're not rediscovering patterns; you're compounding them.

The multi-agent code review is equally structured. After implementation, /review spawns three specialized agents: a security reviewer scanning for vulnerabilities, a performance reviewer checking algorithmic complexity, and an architecture reviewer ensuring alignment with STRATEGY.md. Each produces a scored report, and the system blocks merging below configurable thresholds. It's heavyweight, but it catches the subtle misalignments that human reviewers miss when they're deep in a codebase.

The plugin integrates via a marketplace architecture that abstracts over different AI environments:

// Simplified plugin registration
interface CompoundPlugin {
  skills: Skill[];
  agents: Agent[];
  hooks: {
    preCommit?: (context: WorkContext) => Promise<void>;
    postReview?: (results: ReviewResult[]) => Promise<void>;
  };
}

// Works across Claude Code, Cursor, Codex
registerPlugin({
  skills: [brainstormSkill, planSkill, implementSkill],
  agents: [requirementsAgent, codeAgent, reviewAgents],
  hooks: {
    preCommit: async (ctx) => {
      // Enforce compound note creation
      if (!ctx.artifacts.compoundNotes.length) {
        throw new Error('Must create compound note before commit');
      }
    }
  }
});

One underrated feature: product pulse reporting. The /pulse skill analyzes git history, issue trackers, and usage telemetry to generate time-windowed reports showing what features actually get used, where bugs cluster, and where tech debt is accumulating. This feeds back into STRATEGY.md updates, creating a closed loop where real-world signal informs planning. It's rare to see AI tooling that grounds agents in empirical data rather than just conversational context.

The 80/20 planning-to-execution ratio isn't arbitrary—it's enforced through skill dependencies. The implementation skill literally checks for the existence of a plan artifact before proceeding. This prevents the "cowboy coding" pattern where AI assistants generate plausible-looking code that doesn't solve the actual problem. You're forced to think before you build, and that friction is the point.

Gotcha

The installation experience varies wildly by platform. In Cursor, it's a one-click marketplace install. In Codex, you'll navigate a three-step TUI workflow, manually install agents from a separate repository, and configure environment variables. If you're evaluating CE, test it in your actual environment first—the documentation assumes familiarity with your IDE's plugin system, which can be sparse.

More fundamentally, the mandatory ceremony doesn't scale down gracefully. Fixing a typo in a README shouldn't require brainstorming, planning, worktree creation, multi-agent review, and compound note generation. Yet CE's skill dependencies enforce this by default. You can configure bypass rules, but out-of-the-box, the system assumes every change is architecturally significant. For teams doing exploratory prototyping or working in early-stage greenfield projects where you're still figuring out what to build, this overhead kills momentum. The plugin shines when patterns are emerging and you want to codify them—not when you're still thrashing through possibilities. There's also a learning curve for teams: understanding which compound notes to write, how granular to make plans, and when to override the workflow takes weeks of practice.

Verdict

Use if: You're building a complex product with sustained development where accumulated context matters—think SaaS applications, internal platforms, or any codebase where onboarding new developers (human or AI) is painful because tribal knowledge lives in Slack threads. CE is invaluable when you've hit the inflection point where technical debt is compounding faster than you can pay it down, or when you're working with multiple AI agents that need consistent context. Teams that already value ADRs, design docs, and structured code review will find CE feels like a natural evolution of those practices. Skip if: You're prototyping, building one-off scripts, working solo on side projects, or in early-stage startups where the product direction pivots weekly. The overhead of brainstorms, plans, and compound notes exceeds their value when you're still figuring out what to build. Also skip if your team doesn't have buy-in for process—CE enforces discipline, and if developers route around it with manual git commits, you'll just have expensive overhead without the benefits. For quick wins and throwaway code, stick with simpler tools like Aider or Cursor's native agent.

// ADD TO YOUR README
[![Featured on Starlog](https://starlog.is/api/badge/ai-dev-tools/everyinc-compound-engineering-plugin.svg)](https://starlog.is/api/badge-click/ai-dev-tools/everyinc-compound-engineering-plugin)