Docs navigation Docs overview

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

Concepts

How Main Branch thinks: memory, loops, bets, MoneyPath, approvals, books.

Commands

12 commands, grouped by the job you are doing.

Connectors

Where outside tools meet your approval gates and private context.

Playbooks

Reusable methods for sites, ads, content, reviews, and bets.

Examples

Readable 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.

bash
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.

Full Main Branch operating loop
  1. Sense
  2. Decide
  3. Ship
  4. 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.

Open 12 command pages

Playbooks stay separate

Playbooks are reusable methods. Commands are agent handles. Keeping them apart keeps both easier to scan.

Open playbooks

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

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.