3.3 — Harness Engineering
Your harness is not just a tool — it’s configurable infrastructure. Most builders use Claude Code like a chat window. Agent architects configure it.
The Four Config Layers
Section titled “The Four Config Layers”| Config Layer | What It Controls | File / Location |
|---|---|---|
| CLAUDE.md | Project-specific instructions, conventions, knowledge | Project root: CLAUDE.md |
| Settings | Permissions, allowed commands, model preferences | ~/.claude/settings.json |
| Hooks | Automated actions triggered by events (before commit, after tool use, etc.) | Settings file |
| Memory | Persistent facts across conversations | ~/.claude/projects/[project]/memory/ |
CLAUDE.md Deep Dive
Section titled “CLAUDE.md Deep Dive”This is the most powerful configuration tool for vibe coders. It’s a Markdown file in your project root that Claude Code reads every session. Whatever you write here, the AI follows — without you repeating it in every prompt.
Five core uses:
-
Project architecture overview — “This is a Next.js app with a Supabase backend. The API lives in
/api/, the UI components in/components/.” -
Coding conventions — “Use TypeScript, never plain JavaScript. All functions must have explicit return types.”
-
Behavioral rules — “Never refactor code outside the current task scope. Never add features that weren’t explicitly requested.”
-
Team knowledge — “The auth system uses JWT tokens stored in httpOnly cookies. The session expires after 24 hours.”
-
Anti-patterns — “Do not use the
legacyApimodule — it’s deprecated and will be removed. UsenewApiinstead.”
You first encountered CLAUDE.md in Phase 2 as a context tool. Here’s the upgrade: in Phase 2 it was one way to give context. In Phase 3, it becomes the foundation of your agent’s operating rules.
A hook is a script that runs automatically when a specific event happens.
Analogy: An alarm system. When the door opens (event), the alarm triggers (hook). You don’t push a button every time — the system reacts automatically.
In Claude Code, hooks fire on specific events:
- Before or after a tool call
- Before a file is written
- At conversation start or end
- After every AI response
Example uses:
- Run a linter automatically after every file edit
- Log every AI action to an external system for review
- Trigger a backup before any destructive operation
- Send a notification when a long-running task completes
Hooks are what separate a configured agent from an unconfigured one. They let you attach behavior to events without prompting for it every time.