Start here
Main Branch docs
Last updated May 25, 2026
Main Branch turns your business folder into the brain your agent works from. Concepts explain the system. Commands are the handles you pull. Connectors are where outside tools come in safely. Playbooks and examples show real work.
Manual map
How Main Branch thinks: memory, loops, bets, MoneyPath, approvals, books.
Commands12 commands, grouped by the job you are doing.
ConnectorsWhere outside tools meet your approval gates and private context.
PlaybooksReusable methods for sites, ads, content, reviews, and bets.
ExamplesReadable sessions that show Main Branch at work.
Install
Pick the folder that will become your business brain. Main Branch is local-first. It writes plain markdown into your workspace and keeps the business truth there.
pipx install mainbranch
mb onboard --name "My Business" --path my-business
cd my-business
mb status --json --peek In Claude Code, type the slash command. In Codex, ask for the mb-start route. Either way the fact layer is the same: mb status --json --peek before advice, setup, update, or repair.
Operating system
Main Branch runs business work as a loop. The agent reads local facts, helps you choose the wager, drafts or checks the work, then records what changed so the next session starts on evidence.
- Sense
- Decide
- Ship
- Reflect
Concepts
Business Memory
Core files, research, decisions, bets, pushes, books, outcomes, and checkpoints.
Operator Loop
Sense what is true, decide the wager, ship through rails, reflect into memory.
Offers, Bets, Pushes
Durable offers, time-boxed wagers, and coordinated execution stay distinct.
MoneyPath
Attention, proof, revenue, cost, and outcome signals tied to the business result.
Approval Gates
Spend, publishing, account mutation, customer contact, and destructive changes require approval.
Books as Settlement
Financial truth belongs in the operating loop, not after-the-fact reporting.
Commands
Command menu
Each command opens to its own page: when to use it, how it works, what you will see, pitfalls, and related routes.
Playbooks stay separate
Playbooks are reusable methods. Commands are agent handles. Keeping them apart keeps both easier to scan.
Operator loops
The daily workflow runs in four loops. Verbs, not buckets.
Sense
What's true right now?
Read repo health, recent activity, context freshness, provider readiness, and open work.
Decide
What should we wager?
Choose the next business move: bet, research, decision, push, repair, or playbook.
Ship
What goes into the world?
Produce pages, ads, content, reports, provider setup, saved checkpoints, and releases.
Reflect
What changed because of it?
Record verdicts, lessons, updated core files, outcomes, and next-session memory.
Connectors
Connectors are where leverage meets safety. The agent can read posture and draft from approved context. Publishing, spend, account mutation, customer contact, and destructive changes stay your call.
Backup, shared history, issues, proposals, pull requests, and task context.
site rail CloudflarePages, Workers, domains, analytics, deploy checks, and public surfaces.
planning rail GoogleSearch, ads, docs, sheets, calendar, and account posture when connected.
approval gated MetaPaid creative and account readiness. No spend or publishing without approval.
Business memory
The business folder is the brain. Core files, research, decisions, bets, pushes, playbooks, outcomes, and checkpoints give the agent a durable base layer.
| Memory lane | Files | Purpose |
|---|---|---|
| Core | (voice | offer | audience | proof | soul) | Identity, positioning, and operating rules |
| Judgment | (research | decisions | content-strategy | playbooks) | What the business has learned and chosen |
| Wagers | (bets | pushes | MoneyPath | outcomes) | What is being tested, shipped, measured, and settled |
| Continuity | (checkpoints | books | metrics | systems) | What changed, what it cost, and what carries forward |
Playbooks and examples
Playbooks
- Grow on X: Daily threads drawn from your offer and proof, in your locked voice. Drafts land in /drafts for review before they post.
- Google Ads: Search launch with a budget cap and conversion check. Operator approval gate before any spend.
- Facebook Ads: Meta creative and audience scaffold drawn from your own proof files. Operator approval gate before publish.
- Landing pages: Traffic landers wired to GA, ads, and your offer copy. Operator approval gate before deploy.
- Analytics wiring: GA, GSC, and ads attribution checked end to end. Mutation requires approval.
Examples
- Business day start: The agent reads status facts, names the top route, and keeps command detail available.
- Offer research to decision: A voice dump becomes research, a dated decision, and updated offer language.
- Site readiness check: A site repo is checked for GTM, consent posture, CTA clarity, and operator review gates.