SIGNAL · AGENTS

Compound Engineering with Claude Code

Compound engineering (Plan → Work → Assess → Compound) makes Claude Code permanently smarter by persisting corrections to CLAUDE.md and /docs so mistakes never repeat.

3 MINAI

TLDR

  • Compound engineering (Plan → Work → Assess → Compound) makes Claude Code permanently smarter by persisting corrections to CLAUDE.md and /docs so mistakes never repeat.
  • Specialized sub-agents handle planning, visual browser testing, and multi-angle code review — widening focus after narrow implementation before any merge.
  • The /lfg command chains the entire loop — plan, work, test, review, PR, feature video — into one unattended ~1-hour run.

Caveman

Fix mistakes once, write them down, AI learns forever.

ELI5

When Claude makes a mistake, you correct it and save that correction so Claude never makes the same mistake again. Special helper-agents plan your features by reading your existing code and current best practices online, then other helpers review the result for security and simplicity before anything ships. Over time, your AI setup gets measurably smarter the more you use it.

Trunk → Branches

Trunk: A four-step compound engineering loop (Plan, Work, Assess, Compound) turns every Claude Code session into a permanent improvement to your AI toolchain.

Branches:

  1. /workflows plan spawns sub-agents grounded in your codebase, online best-practice articles, and correct framework versions — not hallucinated assumptions.
  2. Claude Skills deliver domain knowledge just-in-time on demand, preventing context overload from always-on injection.
  3. /compound persists architectural decisions to a searchable /docs directory; “add this to CLAUDE.md” is the lightweight single-session alternative.
  4. Playwright MCP + Opus 4.5 lets Claude control the browser, visually test features, read console errors, and self-fix bugs in a closed loop without writing formal test code.
  5. /review sub-agents (security, architect, code-simplicity, DHH persona) synthesize P1/P2/P3 prioritized findings before merge, widening focus after narrow implementation.
  6. /lfg chains plan → work → test → review → PR creation → marketing video/changelog into a single unattended run.

Key Patterns

Pattern: Persisting corrections to CLAUDE.md or /docs compounds across sessions — transfers to any agentic workflow where retaining past decisions eliminates repeat errors.

Pattern: Just-in-time context (Claude Skills) outperforms always-on injection — transfers to RAG and prompt engineering: load domain knowledge only when the task requires it to avoid context saturation.

Pattern: Widening review agents after narrowing implementation agents catches blind spots — transfers to any multi-agent pipeline where specialization creates tunnel vision before shipping.

Stress Test

  • Hidden assumption: Claude reliably reads and applies CLAUDE.md and /docs context every session without drift or omission.
  • Best counterargument: Compounding only works if corrections are written precisely; vague CLAUDE.md entries introduce noise rather than signal and can degrade future sessions.
  • Fails when: The /docs directory accumulates faster than entries can be meaningfully indexed, or context window overflows from too many persisted learnings.
  • Fact vs opinion: The 4-step loop structure is a presented design philosophy, not an empirically validated framework — results depend heavily on prompt quality and correction specificity.

In Practice

  • Run Claude Code without approval interruptions: claude --dangerously-skip-permissions (alias to cc) to unblock unattended agent runs. ¶3:43
  • Trigger the planning flow: /workflows plan <feature description> — spawns sub-agents for code grounding, best-practices research, and spec-flow persona analysis. ¶5:07
  • Persist a session learning immediately: run /compound to write to /docs with searchable frontmatter, or say “add this to CLAUDE.md” for lightweight instant compounding. ¶21:34
  • Write Claude Skill descriptions as capability lists (“I can do X, Y, Z”) rather than trigger conditions; invoke explicitly with “use this skill for [task]” — do not rely on auto-detection. ¶50:26
  • Use the Playwright-based feature video command to auto-record a screen capture of your feature flow, compress it, and attach it directly to the PR. ¶51:03
  • Push a running Claude Code terminal session to the mobile app by typing & inside the terminal — continues the same session context on phone. ¶44:24

navigate · open · esc close