Skip to content

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.

Config LayerWhat It ControlsFile / Location
CLAUDE.mdProject-specific instructions, conventions, knowledgeProject root: CLAUDE.md
SettingsPermissions, allowed commands, model preferences~/.claude/settings.json
HooksAutomated actions triggered by events (before commit, after tool use, etc.)Settings file
MemoryPersistent facts across conversations~/.claude/projects/[project]/memory/

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:

  1. Project architecture overview — “This is a Next.js app with a Supabase backend. The API lives in /api/, the UI components in /components/.”

  2. Coding conventions — “Use TypeScript, never plain JavaScript. All functions must have explicit return types.”

  3. Behavioral rules — “Never refactor code outside the current task scope. Never add features that weren’t explicitly requested.”

  4. Team knowledge — “The auth system uses JWT tokens stored in httpOnly cookies. The session expires after 24 hours.”

  5. Anti-patterns — “Do not use the legacyApi module — it’s deprecated and will be removed. Use newApi instead.”

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.


Next: 3.4 — MCP | Phase overview: Phase 3