Main Branch
The system of record for businesses run with AI agents.
Agents run the work. You keep the business record and the keys.
Main Branch keeps your offers, audience, research, decisions, and lessons as
plain files in a folder you own. That folder is your business record. Claude
Code or Codex reads it before it advises you, proposes work, and saves what you
approve. Session logs show what an agent did. The business record shows what
you decided, so the next session starts there, not from a blank chat.
Set up your business folder ·
Follow a working day ·
Browse the docs ·
Check runtime support
What you get
- An agent that has read your offer, audience, and voice files before it answers.
- Proposals you approve, edit, or reject. Nothing publishes, spends, or contacts
a customer without your say.
- Decisions and lessons saved as files, so the next session reads them.
- Readable saved history in git, with a preview before every save. The one bounded exception:
/mb-grow log
entries the owner approved in autonomy.md.
Try it
After setup, open your business folder and ask:
People keep asking what my service includes. Read my offer and audience
files, show me what is unclear, and propose one change before writing.
The agent reads your files and Main Branch's health and status facts, shows the
evidence and what it is unsure about, and proposes one change. You approve it.
The accepted offer becomes a file the next session reads. The
working-day walkthrough follows a fictional example from
the first question to the next morning.
The same loop clarifies an offer, turns research into a decision, plans a bet,
drafts content, reviews a page, or saves a lesson from finished work.
Do this first
You need Python, git, and Claude Code or Codex CLI, signed in. The
setup guide covers installing each. With those and
pipx in place:
pipx install mainbranch
mb onboard --name "My Business" --path my-business
cd my-business
mb doctor
mb onboard asks you a few questions in the terminal. "My Business" and
my-business are example names; choose your own. A healthy folder ends
mb doctor with:
all good — you're set to run `claude`.
Then open the folder in Claude Code and run /mb-start. In Codex CLI, ask it
to use the global mb-start skill. Tell the agent what you want help with. If a
skill is missing, follow the setup repair steps.
Prefer to be guided? You can paste the setup prompt
into your runtime. It asks about your business and proposes the first files
for your review. Local-only setup is valid. GitHub backup is recommended and
requires a signed-in account and your approval.
Keep this business folder separate from a clone of the Main Branch engine.
What works where
Claude Code supports the bundled production workflows within each workflow's
limits. Codex supports the daily start, status, setup, think, repair, update,
help, and close routes. Its bet, ads, organic, site, and books routes remain
read-only planning. Wiki and skill-authoring workflows are outside current
Codex support. The tailnet audit skills are drafts, and /mb-seo is experimental. Check
compatibility or run
mb workflow list --runtime codex --json for exact route status.
Work with it each day
- Open your business folder. Use
/mb-start in Claude Code or the global
mb-start skill in Codex to read current facts.
- Describe the question or work. Ask the agent to cite the files and
observations behind its recommendation.
- Choose the next move. Review proposed file changes and approve the work
you want it to do.
- Ask for a checkpoint preview, then approve the save. A checkpoint records
accepted files in local history. Syncing that history to GitHub is separate.
- Use
/mb-end, or the global mb-end skill in Codex, to review what changed,
what you learned, and what remains open.
The four operating loops describe this method as
Sense, Decide, Ship, and Reflect. You can use them within one short session.
You do not need a separate agent or document for every step.
Your files and authority
Your business record stays in plain Markdown and git history. You can read it
in a text editor without Main Branch. Credentials, caches, and raw sensitive
data have separate storage boundaries.
The agent proposes and explains work within the authority you give it.
Publishing, spending, customer contact, and account changes require explicit
approval and a tested execution path. Installing Main Branch does not authorize
those actions.