Claude Secure Template
A production-ready starting point for building software with Claude. Work comes in, gets routed to whoever should do it — a person, Claude, or a cheaper local model — and every change passes the same security gates before it merges.
The routing switchboard
For anyone
Three ideas do most of the work. You don't need to read code to get them.
The environment is locked down before the first line is written — egress is allowlisted, secrets never touch the repo, and the agent itself is fenced: it cannot read the credential store or quietly edit the files that define its own limits.
Low-risk tasks are handed to a free model running on your own machine. Claude is spent only where its judgment is worth the cost.
Every task is a tracked card and every change is a reviewed pull request. Nothing merges until the automated checks agree.
For engineers
Each is a self-contained piece of the template. Together they turn a blank repo into a governed, AI-assisted delivery pipeline.
Under the hood
Four close-ups: the sealed environment, the two engines behind the routing, the token compressor, and the gates every change runs.
Auth lives in mounted volumes, never in the repo — and deny rules stop the agent reading them from there. The firewall opens the network to a short allowlist and blocks the rest, set once at container start. Worth knowing what that buys: the allowlist includes all of GitHub, so it bounds where data can go rather than whether it leaves. The container protects the host; it is not a containment boundary for data.
A task is classified by type and risk; any hard trigger — auth, networking, 8+ files — always escalates to Claude. The same decision shows up as the Route field on the board card.
Caveman trims Claude's wording down to the essentials, then a statusline reads the real per-session token counts from the transcript and prices them — so spend is visible while you work.
Every gate is required, not advisory — a red check keeps the pull request from merging.
The loop
One story, one branch, one pull request. The order is the point — each step gates the next.
Work is filed as a card on the board.
Tagged Human, Claude, or Local by risk.
An agent picks it up — no collisions.
Branch + PR that closes the issue.
Secrets, SAST, container scan must pass.
Reviewed, green, shipped.