Stop Bloating Your CLAUDE.md: The Infrastructure-First Workflow That Cuts Review Time in Half
Every time Claude Code ignored an instruction, the instinct was the same: add another rule to CLAUDE.md. This creates a vicious cycle. A developer's audit revealed their file grew from 45 to 190 lines, yet compliance got worse. Instructions past line 100 started being treated as suggestions, not rules. The audit found 40% redundancy—rules that contradicted each other or were obsolete.
Trimming to 123 lines helped, but the real fix was a paradigm shift: CLAUDE.md is an intake point, not a permanent home. It should contain project conventions, tech stack, and the five most critical things—nothing more. Everything else belongs in infrastructure the agent loads only when needed.
The Core Principle: Move Enforcement into the Environment
The breakthrough came from replacing instructional rules with automated hooks. For example, instead of a rule saying "always run typecheck after editing," implement a script that runs automatically on every file save. The agent doesn't choose; the environment enforces. This surfaces errors immediately, not 20 edits later during PR review.
This one change dramatically cut review time. By the time the developer looked at code, structural problems were already resolved, allowing focus on intent and design.
Building Your Infrastructure: Skills, Campaigns, and Hooks
Here’s how to systematically replace bloated CLAUDE.md rules:
1. Convert Repeated Instructions into Skills
Create modular Markdown files that encode patterns, constraints, and examples for specific domains (e.g., code_review_skill.md, api_design_skill.md). The agent loads only the relevant skill for the current task. This wastes zero tokens on irrelevant context.
2. Eliminate Session Context Loss with Campaign Files
A campaign file is a structured document tracking what was built, decisions made, and what remains. Close a session and return tomorrow; the campaign file lets you pick up exactly where you left off, eliminating daily re-explanations.
3. Automate Quality Verification with Hooks
- Typecheck on every edit (as described)
- Anti-pattern scanning on session end
- Circuit breaker that kills the agent after 3 repeated failures on the same issue
- Compaction protection that saves state before Claude compresses context
All these run automatically, enforced by the environment, not competing instructions.
The Progression: From Raw Prompts to Orchestration
The developer outlines a clear maturity model:
- Raw Prompting: Nothing persists; the agent repeats mistakes.
- CLAUDE.md: Rules help but hit a ceiling around 100 lines.
- Skills: Modular expertise loads on demand; zero tokens when inactive.
- Hooks: The environment enforces quality, not instructions.
- Orchestration: Parallel agents, persistent campaigns, coordinated waves.
Most projects are fine at Level 2 or 3. The key insight is that when CLAUDE.md stops working, the answer isn't more rules—it's moving enforcement into infrastructure.
Try It Now: Start with One Hook
You don't need a full system to start. Identify the most frequently ignored rule in your CLAUDE.md and automate it.
Example: Automated TypeScript Hook
Instead of this rule in CLAUDE.md:
## Quality Rules
- Always run `npm run type-check` after editing any TypeScript file.
Set up a file watcher. Using a tool like nodemon or a simple shell script:
#!/bin/bash
# watch_ts.sh
while inotifywait -r -e modify ./src; do
npm run type-check
if [ $? -ne 0 ]; then
echo "Type check failed. Fix errors before continuing."
fi
done
Run it in the background of your Claude Code session. The rule is now enforced, not requested.
Open-Source Implementation: Citadel
The developer open-sourced the full system built from this philosophy: Citadel on GitHub. It includes the skill system, hooks, campaign persistence, and a /do command that routes tasks to the right orchestration level automatically. It was built from 27 documented failures across 198 agents on a 668K-line codebase—every rule traces to something that broke.
The harness is simple. The knowledge that shaped it—that rules degrade but hooks don't—is what changes your workflow.






