How to adopt the Agent Operating Framework in your own Claude Code projects.
- Copy
AGENT_FRAMEWORK.mdto your project root asCLAUDE.md - Fill in Section 0 (Project Identity) with your project specifics
- Start a Claude Code session — it reads
CLAUDE.mdautomatically
That's it. The framework is now active.
Don't adopt everything at once. Start with what hurts most:
Copy examples/claude-code-rules/read-before-acting.md to ~/.claude/rules/
Copy examples/claude-code-rules/read-before-acting.md to ~/.claude/rules/ — the Three-Failure Stop escalation handles this.
Copy examples/claude-code-rules/scope-discipline.md to ~/.claude/rules/
Copy examples/claude-code-rules/session-lifecycle.md to ~/.claude/rules/
Copy examples/claude-code-rules/read-before-acting.md to ~/.claude/rules/ — Gate 0 forces reading the resource before touching it; pair with scope-discipline.md Gate 5 (Dormant Code Check) for caller mapping.
~/.claude/rules/ ← Global rules (apply to all projects)
.claude/rules/ ← Project rules (apply to this project only)
CLAUDE.md ← Project root (loaded every session)
Global rules go in ~/.claude/rules/. Use for universal behavior like "read before acting" that applies everywhere.
Project rules go in .claude/rules/ inside your repo. Use for project-specific constraints like "always use pytest, not unittest."
CLAUDE.md goes in the project root. Use for project identity, output contracts, and high-level guidance.
A mature project using this framework:
my-project/
├── CLAUDE.md ← Section 0 filled in, points to rules/
├── .claude/
│ └── rules/
│ └── project-specific.md ← Project-scoped rules
├── src/
└── ...
Your home directory:
~/.claude/
├── rules/
│ ├── read-before-acting.md ← Universal
│ ├── scope-discipline.md ← Universal
│ └── session-lifecycle.md ← Universal
└── projects/
└── <project>/
└── memory/
└── MEMORY.md ← Persistent memory for this project
- Start with CLAUDE.md only. Fill in Section 0. Use the framework as-is.
- When a mistake happens, write a memory entry. Soft guidance.
- When the same mistake happens again, promote to a rule. Hard constraint.
- When a rule gets ignored, promote to a hook. Automated enforcement.
Read guides/enforcement-architecture.md for the full escalation model.
- Don't adopt all 7 sections on day one — start with what hurts
- Don't write rules for problems you haven't had — rules without incident reports get ignored
- Don't put everything in CLAUDE.md — it loads every session, keep it lean
- Don't skip Section 0 — without identity and output contracts, the rest is enforcement without direction