You’ll learn: How to treat CLAUDE.md and hooks as a system that improves with every session — and why feedback loops are the primary skill of agentic engineering.
The Discipline
When Claude makes a mistake, you have two choices:- Fix the instance — correct the output, move on
- Fix the system — trace why Claude made the mistake, then patch CLAUDE.md or hooks so it can’t happen again
Trace, Patch, Never Repeat
The workflow:- Notice — Claude uses relative imports when your project uses
@/path aliases - Trace — CLAUDE.md says nothing about import conventions
- Patch — Add to CLAUDE.md:
"Always use @/ path aliases for imports. Never use relative paths (../) for cross-directory imports." - Verify — Future sessions follow the convention
What to Patch Where
| Signal | Patch target | Example |
|---|---|---|
| Claude keeps making the same formatting mistake | CLAUDE.md convention | ”Use single quotes for strings” |
| Claude does something dangerous | Hook (hard block) | Block git push --force via PreToolUse hook |
| Claude’s approach to a task type is consistently wrong | Skill | Create a skill for database migrations with your patterns |
| Claude forgets cross-cutting concerns | .claude/rules/ file scoped to the relevant path | Testing requirements for src/api/ |
Feedback Loops as Primary Skill
The core skill of agentic engineering isn’t prompting — it’s designing tight validation loops. The tighter the loop, the faster Claude self-corrects.| Loop tightness | Example | Feedback speed |
|---|---|---|
| Tightest | PostToolUse hook runs linter after every edit | Seconds |
| Tight | ”Run npm test after each change” in the prompt | Minutes |
| Loose | Review at the end of a session | Could be too late |
The Compounding Effect
A well-maintained system produces a flywheel:← Prev: Robots-First · Next: Distribution →