Harness Engineering: from CC to AI coding
A full book on harness engineering ('from Claude Code source code to AI coding') with Chinese and English editions in book/ and book-en/. The single best conceptual source in this corpus: chapters on prompt assembly, tool design, context management, verification loops, and sub-agent patterns.
View source on GitHubKey takeaways
- 01
The harness - not the model - is where coding-agent quality is won
- 02
Chapters map 1:1 to buildable subsystems: prompts, tools, context, verification
- 03
Verification loops are treated as non-negotiable, not optional polish
Flows built on this research
Harness Engineering
Verification Loops: Never Trust an Unrun Edit
Wire verification into your agent so every edit is checked by machines - syntax, tests, behavior - before it counts as done.
4 steps · 60-100 minutes
Agent Architecture
Error Recovery and Retry Policy for the Agent Loop
Design the retry, backoff, and give-up behavior that separates production agents from demos that loop forever.
4 steps · 60-90 minutes
Harness Engineering
Cost Control: Model Routing and Effort Tiers
Route work to the cheapest model that can do it and match reasoning effort to task difficulty - with quality guardrails.
4 steps · 90-120 minutes
Agent Architecture
From CLI Harness to Product
Grow a working agent loop into a product: sessions, config, resumability, and the packaging polish the successful terminal agents share.
5 steps · 90-150 minutes
Agent Architecture
Assemble a System Prompt Like the Pros
Structure your agent's system prompt the way leading harnesses do: layered sections, dynamic context, and enforceable rules.
4 steps · 60-90 minutes