I type one sentence into Claude Code and five files load before the model writes a word. Anthropic did not ship that behavior. My agent harness does, and the wiring behind it is four files and a hook.
A harness is everything around the model. The model is rented, and mine is identical to yours. The harness is the part you own. It holds the instructions that load, the order they load in, the skills the agent can reach, the hooks that refuse bad output, and the memory that outlives the session.
Most people stop at one file. They write a CLAUDE.md, list ten preferences in it, then retype eight of those preferences by hand for the next six months. That is rented work with an extra step. The instruction exists, nothing enforces it, and the agent follows it when the context window feels generous.
Four layers, each with one job
Global. ~/.claude/CLAUDE.md loads in every repo on this machine. It carries my writing rules, a project registry that turns the words "my notes" into D:\Atharva\NOTES, the API key rotation order, and the two CLI tools I reach for every week. Nothing repo-specific lives here.
Project. D:\Atharva\NOTES\CLAUDE.md carries what only this vault knows. The folder contract, the publishing pipeline, the review desk, the six agents. Three other repos on this machine run their own copy of the same pattern with different content.
Skills. 60 skills in the vault, 94 more machine wide. A skill is a folder the agent opens only when the job matches it. A LinkedIn post loads one skill, a Substack article another. The agent never reads 154 skills at once, so the cost of adding the 155th is zero.
Hooks. Six Python files. This layer changed my output the most, because a hook runs code instead of asking politely.
I measured what those four layers cost. Nine files I wrote reach the model before my first word, and they add up to about 40,300 tokens. Around 28,000 of those arrive on every session, whatever I ask for. The other 12,200 load only because a hook read a writing word in my prompt.

Ask that same session about a Python bug and the bottom block never loads.
The load order is the part everyone skips
On paper my rules agree with each other. They collide at 11pm inside one paragraph, when the voice file wants a long conditional sentence and the scorer caps me at twenty words.
One file answers that. DIGITAL TWIN/core/runtime-contract.md names which files load, in what sequence, and which one wins a disagreement.
Five files always load, in this order. The contract opens the chain. The pattern rules follow, and they hold the AI tells a regex cannot catch. The plain-style file lands third. World.md arrives fourth and names the villain and the one reader. Voice.md closes the always-loaded set.
After those five, the job picks one more file on demand, and the channel skill loads last. The checks then run in a fixed order, and each one carries a stated bar.
Precedence resolves upward. A sample I paste into the session beats the voice profile. The voice profile beats the skill. A hard ban beats everything.
The agent prints that chain above every draft. I never open a file to learn which rules ran.
A hook is a rule that can fail
Three of my six hooks do work I used to do by hand.
writing-load-order.py fires on the prompt. It reads the channel out of my request and prints the chain into context before I finish typing. I stopped reminding the agent which files to read.
writing-gate.py fires after every write. It runs the scorer on the file the agent just saved. On a critical finding it returns a block with the exact offending lines. The same hook fires when the session tries to end, and it refuses to close while a draft it touched still fails.
pillar-guard.py classifies the topic against my three content pillars before a word gets drafted. An off-topic post gets a warning banner and needs my explicit yes.
A reminder lets a bad draft through. A gate returns an error and the write does not land.
What four layers actually bought me
Consistency stopped being my job. The scorer is deterministic, so a draft gets the same verdict at 9am and at midnight.
My judgment survives the session. Every call I make once goes into a file, and the next session opens with it already loaded.
Ten routines run without me. Daily comments, lead DMs, a weekly digest and a monthly graph refresh all run on a schedule I do not attend.
A new model costs nothing to onboard. Opus 5 arrived and read the same four files.
One result surprised me. Writing the rules down changed what I believe about writing. I could not state my rule about rhythm until I tried to write it, failed twice, and found the idea underneath it was wrong.
Build one this week
You already have opinions. They live in the corrections you type every day, and every correction you repeat twice is a file you have not written yet.
Start smaller than you think.
Open
~/.claude/CLAUDE.mdand write down the five corrections you gave an agent this week.Split that file. Machine-wide facts stay global, and repo facts move into that repo.
Once you hold more than three rule files, write the load order down as its own file.
Take your loudest rule and turn it into a hook, so it blocks instead of reminding.
The test is whether a stranger opens your repo, reads no chat history, asks you no questions, and keeps your operation running for two weeks. My harness is the part that passes that test. The model is the part I rent.






