← All work

claude-config

An AI coding agent is only as reliable as the structure around it. This is that structure, versioned and verified.

Role
Designer and sole author
Period
2026

The problem

A coding agent with no operating rules does whatever the last prompt implied. It starts building before it understands the goal, claims work is done without proof, and burns the most expensive model on reading logs. Fixing that by re-explaining yourself every session does not scale. I wanted the rules to live in files, apply to every project, and be checked by a machine.

Role and constraint

I designed and wrote the whole configuration: the global rules file, the skills, the agents, the status line, the hooks and the verification script. The constraint I set myself was that the router file every session reads must stay under 150 lines. If it cannot fit, the rule belongs somewhere narrower.

The decision: route work to the cheapest capable model

The expensive way to research a codebase is to let the main agent read it. Every file it opens stays in its context for the rest of the session, and it is the largest, costliest model in the system.

So the configuration defines two subagents pinned to specific models, and the rules file says when each must be used. A bulk-researcher runs on the cheapest model and exists to read a great deal and return a little: documentation trawls, log analysis, multi-file sweeps. A visual-qa agent runs on a mid-tier model and drives a browser, so screenshots accumulate in its context rather than the main thread’s. The main model keeps its context for judgment.

The alternative I rejected was leaving model choice to the agent per task. It sounds flexible, and in practice the agent picks the model it is already running on. Pinning the model in the agent definition removes the decision, and the verification script fails if the pin is missing.

Enforcing the structure

Rules that are not checked decay. The configuration ships with a verification script that asserts 74 structural invariants across five sections, and it exits non-zero when any fails.

Terminal output of the verification script showing PASS lines and zero failing checks
Real output of the verification script, run while writing this page. Seventy-four checks, none failing.

The compounding piece

The skill I consider most important is the smallest. When I correct the agent, or when a gotcha surfaces, a capture-learning skill writes the lesson to the narrowest scope that will surface it next time: a specific skill file, a project’s rules, the global rules, or the environment notes. It explicitly refuses to record one-off preferences. The result is a configuration that gets more specific to how I work with every session, without the rules file growing past its cap.

Evidence

Where it stands

The repository is private because it holds my working environment. I am happy to walk through any part of it, and the verification output above is reproducible on request.