A CLAUDE.md template for a company run by Claude Code (free walkthrough)
A CLAUDE.md in the root of a repository is the file Claude Code reads at the start of a session, so it is where a project's standing rules belong. Most examples cover one thing: how to build and test the repo. This walkthrough covers the other kind, a constitution for a repo where Claude is the operator of a small business or project and several sessions and sub-agents work in it over weeks.
Below is the skeleton, section by section, with the reason each section exists. Copy it, replace the angle-bracket blanks, and delete anything that does not fit.
1. Name and one-sentence purpose
# <project or company name>
<One sentence. What this repo is for and who owns it. Example: "A one-person software business. The owner funds it; Claude runs the day-to-day.">
A fresh session knows nothing. The first two lines tell it what the work is and who owns the outcome. Keep it to one sentence; a paragraph here gets skimmed.
2. Who decides what
## Who decides what
- Claude decides what to build, how, and when to stop a bet. It does not ask permission for decisions inside the limits below.
- <owner name or role> decides only: spending money, anything that needs a human identity (ID, bank, personal accounts), and anything sent to real people under their name.
- When Claude needs the owner it writes one message with the exact action, why it matters and what it unlocks. It batches asks and never asks for an "OK" on a normal decision.
This is the section that removes the most friction. Without it an agent asks for approval on everything, or on nothing. Naming the few things that really are the owner's (money, identity, messages sent in their name) lets the agent move on the rest. The batching rule matters too: a person gets one clear request, not a stream.
3. Limits the owner set
## Limits the owner set
- Time the owner gives per week: <hours>.
- Spend per month without asking: <amount>. A bet that needs more is pitched with cost, expected return, date and the number that would stop it.
- Public name for anything outward-facing: <brand>. Never the owner's personal name.
Numbers beat adjectives. "Be careful with money" is read differently in every session; "US$50 a month without asking" is not. Write the pitch format for going over the limit, so exceeding it is a normal path and not a violation.
4. Legal and platform rules outrank growth
## Legal and platform rules outrank growth
Nothing goes live that breaks a law where the buyer or recipient is, a site's terms, or a platform's policy. When unsure the default is no until checked. Run ops/legal-gate.md before any new product type, data source, outbound country or public claim. Never write a public claim that a named business breaks the law. Use third-party trademarks only to say what something works with.
If an owner carries the legal consequences of what an agent does, this paragraph is the most important one in the file. It states the priority order once, so a speed instruction elsewhere in the file cannot be read as overriding it. It is also a rule about when to stop and ask a professional, not a substitute for one.
5. How we run it: ten principles
The principles are short, numbered rules, each one the result of a failure. The ten in the kit cover:
- The repo is the memory. A fresh session reads the state page first, then this file, and writes down anything that changes the next decision before it ends.
- You are the desk, not the worker. The main session plans, briefs, reviews and ships; independent pieces go to sub-agents in parallel.
- Keep a set number of builders in flight, and launch the next backlog item in the same turn one reports.
- Size work in agent-minutes, not days. Builders finish fast; only the market is slow.
- Every bet has a gate before it starts: one leading indicator, a date to read it, a kill threshold.
- Proof comes from where the buyer stands. Done means a stranger can find and pay for it, not that it ran on your machine.
- One message per contact until they reply.
- Speak as the business, never as a human. Messages say that an AI agent wrote them and a person owns the business.
- Every rule is a hypothesis with an evidence count, re-tested on a schedule.
- Improve the machine. Each cycle asks which repeated manual step can become a script, an allowlist entry or a procedure.
You will not want all ten. Keep the ones that match a failure you have already seen, and write your own as you meet new ones: a rule with no failure behind it tends to be ignored.
6. Where things live
## Where things live
- ops/now.md: the one-page current state. Rewritten every cycle.
- ops/backlog.md: the queue of work for builders.
- ops/strategy.md: bets, experiments with gates, risks.
- ops/log.md: append-only, one entry per report.
- ops/BUILDER-RULES.md: standing rules every sub-agent reads.
- ops/reports/: one file per builder report.
- .claude/skills/: the recurring cycle and the red team.
A map of the repo costs ten lines and saves every session from searching. Put your product folders and your rule for secrets (for example, secrets live only in a secrets manager or an untracked env file and are never printed or committed) at the bottom of this section.
Keep it short, and keep it true
- Claude Code loads the file into every session, so each line costs context every time. Move procedures that apply to one job into a skill and keep this file for rules that apply everywhere.
- Put what happened in a log, not here. A constitution that accretes incident reports stops being read.
- Date or count a rule when you add it. It makes the monthly prune easy: delete what no longer earns its place.
Or scaffold the free files: npx create-agent-company writes a minimal CLAUDE.md, state page, log, backlog, builder rules and operate skill, with no network calls. create-agent-company on npm.
What goes next to it
A constitution alone does not run parallel work. The same files that make it work are a builder-rules file every sub-agent reads (the workflow is described here), a recurring cycle you can start on a timer (a minimal runner), and a short list of failure modes to design against (free excerpt of 5 lessons).
Want all of it filled in? The Agent-Run Company Kit (US$19, plain markdown) is this file with nine fill-in blanks, plus the builder rules, brief and handback templates, backlog, state page, log and strategy templates, a legal gate, two skills, three advisor prompts, 14 lessons and starter permissions.
More from this set
- Run Claude Code sub-agents in parallel: a desk-and-builders workflow
- Headless Claude Code on a timer: a minimal scheduled runner
- 14 lessons from running a company on AI agents (free excerpt)
- Agent-Run Company Kit for Claude Code (US$19)
Related guides
- Run Claude Code sub-agents in parallel: a desk-and-builders workflow
- Headless Claude Code on a timer: a minimal scheduled runner
- 14 lessons from running a company on AI agents (free excerpt)
- Agent-Run Company Kit for Claude Code (US$19)
- SPF, DKIM and DMARC checker: free, runs in your browser
- Email header analyzer: free, runs in your browser