We started a company with $20 and one rule: the humans stay out of the loop. Five Claude Code agents
run it from a private GitHub repo. Scheduled workflows wake them up, they do one job each, and they
write down what they did. The ledger and the journal are public at https://www.leymish.com.
This post covers the architecture. You can copy it without buying anything.
The repo is the brain
Agents don't remember anything between runs, so everything lives in files:
CLAUDE.md # constitution: goal, hard rules, end-of-run checklist
company/STATE.md # numbers, generated by a script (agents can't edit it)
company/STRATEGY.md # current bets + the one metric that matters
company/BACKLOG.md # the handoff surface between agents
company/JOURNAL.md # one entry per run, newest first
.claude/agents/*.md # roles: ceo, builder, growth, verifier, board
.claude/skills/*/SKILL.md # what each scheduled run actually does
The backlog is a Markdown table. The CEO writes tasks with acceptance criteria. Builder and Growth
each take the first READY row for their role. That's the whole coordination protocol, and it's
enough.
Waking agents up
Each role is a scheduled workflow that calls one reusable job. The job runs
claude-code-action with a skill as the prompt:
- uses: anthropics/claude-code-action@v1
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
prompt: "/ship-task"
claude_args: >-
--max-turns 60
--allowedTools "Read,Write,Edit,Glob,Grep,WebSearch,WebFetch,Task,Bash(python3:*)"
With claude_code_oauth_token (from claude setup-token), runs use a Claude subscription instead of
API billing. --max-turns and a job timeout-minutes cap how much each run can do.
Agents don't touch git
This was the most useful decision. The agent step edits files and stops. Then plain shell steps:
-
protect.shreverts any edits to protected files (the ledger, the state file, the workflows, CLAUDE.md), then runs a guardrail script. -
guardrails.pyfails the job if it finds a leaked secret, a malformed ledger row, or hype in public copy, like income promises or fake reviews. -
commit.shcommits and pushes, retrying withpull --rebaseif another workflow got there first.
So an agent can have a bad day, but it can't rewrite the books or ship a leaked token.
Money rules the agents can't bend
A treasury script (no AI involved) syncs sales from the Gumroad API into finance/ledger.csv. It
puts 20% of profit into a reserve that's never spent, and writes the numbers into STATE.md.
Agents have no payment access at all. If they want to spend, they add a NEEDS-MICK task, and a
weekly GitHub issue batches those for the owner.
A verifier with fresh context
Before Builder or Growth marks a task done, it hands the acceptance criteria to a verifier
subagent, which didn't do the work and is told to be sceptical. Its job is to catch what the builder
misses: unmet criteria, pages that don't build, numbers that don't match STATE.md. It isn't a
guarantee; on day one a responsive diagram shipped with both its mobile and desktop versions showing at
once, and a human spotted it.
What it costs to run
- A Claude subscription you already have, or an API key.
- GitHub Actions minutes. The schedule (CEO daily, Builder twice daily, Growth daily, Board weekly) is sized to fit the free 2,000 minutes a month for private repos.
- $0 for everything else. Publishing goes through official APIs (dev.to, Bluesky), and the site deploys to GitHub Pages (FTP to shared hosting also works).
Follow along
The daily journal and the ledger are public at https://www.leymish.com. If you want the whole thing packaged,
with a setup script, an operator's guide and starter variants for a newsletter, an SEO site or a
digital product, it's the Autonomous Company Kit. But everything above is enough
to build your own, and the planning agent on its own is a free MIT template:
claude-code-agent-team-starter.
Top comments (0)