The Claude Code Harness Engineering Playbook
The highest-leverage habits for working with AI coding agents aren't about prompting, they're about building a compounding system around the agent.
"Encode every mistake in CLAUDE.md. Your CLAUDE.md compounds in value over time; this is 'Compounding Engineering.'" The priority stack:
-
Worktrees for parallel work:
claude --worktree feat-namelets you run multiple tasks simultaneously in isolated git worktrees. This is the single biggest productivity unlock because it turns a sequential workflow into a parallel one. While one agent implements a feature, another can be fixing a bug in a separate worktree. -
Encode mistakes into CLAUDE.md: Every time the agent does something wrong, add a rule. The file compounds in value over time, turning past failures into permanent guardrails. This is the same principle as Infrastructure Determines Output applied to AI collaboration.
-
Verify everything: End prompts with "run the tests", "take a screenshot", "prove this works." Verification is not optional; it's the difference between 2-3x quality and shipping hallucinated code. Trust but verify.
-
Plan Mode for non-trivial work: Shift+Tab twice. Let the agent explore the codebase and create a plan before implementing. Skip for trivial changes. This mirrors The OODA Loop Speed of Decision Beats Quality of Decision, orient before you act.
-
/clear between tasks: Context pollution is the #1 failure mode. A clean slate for each task prevents the agent from confusing requirements across different problems.
-
Automate the inner loop:
/commit-push-prcollapses the git ceremony into a single command. Remove friction from the publish cycle. -
Voice dictation: fn key twice on macOS. Speaking produces more detailed, natural prompts than typing, which gives the agent better context to work with.
The agent is only as good as the system you build around it: worktrees for parallelism, CLAUDE.md for compounding learning, and verification for quality.
See also: Infrastructure Determines Output | Design Systems That Make Success Easy | External Structure Compensates for Willpower | One Percent Improvements Compound