Harness Engineering Quick Reference
This file is a condensed reference of Harness Engineering core concepts for Skills and Commands to load on demand. For complete handbook: references/HarnessEngineering.md (compiling Anthropic · OpenAI · InfoQ · HN practice精华)
Core Definition
Harness Engineering transforms the engineer's core work from "writing code" to "designing environments where AI agents work reliably."
The model is the horse—powerful but unaware of direction; Harness is the reins, saddle, and bit—guiding power in the right direction.
Three Evolution Stages
Four Core Components
Six-Layer Model
Single-Layer Failure Trap: All three must work together—CLAUDE.md rules alone get occasionally ignored; Hooks alone can't handle judgment tasks; settings.json alone lacks context.
Core Principles
- Context reset is better than infinite compression: Periodic clearing and structured handoff are more effective than accumulation
- Never let creators independently review their own output: Separate generation and evaluation roles
- Simplify Harness as models evolve: When new models solve certain failure types, proactively remove scaffolding
- Constraints empower, don't restrict: Stricter architecture constraints lead to more reliable Agent output
- Context is a scarce resource: Critically examine everything added to the context window
- Separate permission enforcement from model reasoning: CLAUDE.md explains why, Hooks enforce
Core Loop
"On the Loop" Role Positioning
Correct approach: When unsatisfied with Agent output, improve the Harness that produced it, not the output directly.
Feedforward & Feedback System
Principle: Use Computational to cover 80% of common issues, then Inferential for remaining 20% semantic cases.
