# Business-as-Code

URL: /business/business-as-code · Id: `page:business/business-as-code`

> A business is a definition plus a loop that keeps the running business true to it, carried by five pillars from the model to composition.

A business is a definition plus a loop that keeps the running business true to it. You write what it sells, to whom and who does the work, and the loop keeps the business matching.

## Five pillars
| Pillar | What it is | Reference |
| --- | --- | --- |
| The model | One definition of the business, and one view of where it stands now | [Nouns](/business/nouns/noun), [Verbs](/business/nouns/verb), [Dashboard](/business/nouns/dashboard) |
| The loop | Each week, the gap between the view and the [Goal](/business/nouns/goal) sets the next test | [Weekly test](/business/weekly-test) |
| Authority | One chain of [Permissions](/business/nouns/permission), [Limits](/business/nouns/limit) and [Mandates](/business/nouns/mandate) that only narrows | [Mandates and limits](/agents/mandates-and-limits) |
| Rehearsal and change | Every move is tried first, then merged as a new [Version](/business/nouns/version) | [Change](/business/nouns/change) |
| Composition | The business is assembled from inherited parts | [Startup Template](/business/nouns/startup-template) |

A product is one part of a business. Around it sit a site, a domain, payments, tax, support, contracts, books and the people who run them. Here one definition holds all of it, and an agent can read it whole.

## The model: one definition, one view
Your whole business is one definition. Edit it and the [Site](/business/nouns/site), the API, the agents' instructions and the books follow.

[Nouns](/business/nouns/noun) are the records a business keeps, and [Verbs](/business/nouns/verb) are what can be done to them. Every Verb leaves an [Event](/business/nouns/event), the record that it happened.

[Products](/business/nouns/product) are what you sell, through [Offers](/business/nouns/offer). [Agents](/business/nouns/agent) do the work, each in a [Role](/business/nouns/role). [Workflows](/business/nouns/workflow) move the work, and [Systems](/business/nouns/system) are the software it moves through.

The root is the [Founding Hypothesis](/business/founding-hypothesis): everything the [Startup](/business/nouns/startup) says, sells and measures compiles from it. The definition says what the business should be. The view says what it is now: a Dashboard of any scope, from one Role to the whole Startup, compiled from the same records.

A founder on [startups.new](/start/startups-new) says "charge $29 a month". A developer adds `offers/pro.mdx`. Both write the same Offer, served by one API, SDK, CLI and MCP server.

## The loop: close the gap every week
Each turn reads the view, ranks the gap between it and the [Minimum Success Criteria](/business/nouns/minimum-success-criteria), and works the top of the list. The [weekly test](/business/weekly-test) ranks the five slots of the Founding Hypothesis and runs one [Experiment](/business/nouns/experiment) on the weakest.

Inside the week, the view ranks what waits on its reader: [Approvals](/business/nouns/approval), [Actions](/business/nouns/action) in a delay window and [Tasks](/business/nouns/task), nearest close first. Every run ends in [Evidence](/business/nouns/evidence) and a [Decision](/business/nouns/decision). [Experimentation](/business/experimentation) shows the loop each run carries.

## Authority: one chain that only narrows
A [Permission](/business/nouns/permission) says what a Role may do, a [Limit](/business/nouns/limit) how much, and a [Mandate](/business/nouns/mandate) for whom and until when. Limits inherit, and a Role only tightens what its Startup allows.

Every [Action](/business/nouns/action) records who acted, for whom and under which Mandate. A call over its Limit never fails: it waits `pending` for an [Approval](/business/nouns/approval), a person's answer on that one Action.

Autonomy climbs per Verb on evidence, through three rungs: `assist`, `supervised` and `full`. [Autonomy levels](/agents/autonomy-levels) shows what each rung lets an agent do.

## Rehearsal and change: try it, then merge it
Every edit lands first as a Change, previewed on its own branch. Checks run on the preview, and a merged Change becomes a new [Version](/business/nouns/version) of the business. The previous Version stays, so a bad edit is one revert away.

A move is rehearsed before it is real. A `try` call runs and stores nothing, and the `test` environment runs the whole business with simulated payments, ad spend and filings. [Test and live](/code/builders/startup/test-and-live) explains the two environments.

An [Order](/business/nouns/order) keeps the Version of the Offer it bought, so a price Change never rewrites a past sale.

## Composition: build from parts
`startup.ts` names the business and the [Startup Template](/business/nouns/startup-template) it extends. The template brings Products, Offers, [Teams](/business/nouns/team), Roles, [Processes](/business/nouns/process) and Systems. A file exists only where the business differs from it.

```text
leaseline/
├── startup.ts
├── nouns/Lease.mdx          a Noun: its fields, Verbs and states
├── nouns/Lease.renew.ts     the Function behind Lease.renew
├── products/  offers/       what you sell
├── agents/                  Teams, Roles and who fills each
├── workflows/               Processes and their Workflows
└── systems/                 edits to the Systems you inherit
```

Leaseline, built on the [Solo SaaS](/start/templates/solo-saas) template, runs from seven files and inherits the rest. Parts compose below the template too: a Noun inherits another's properties, and a [Thing](/business/nouns/thing) can be several Nouns at once.

[Builders](/business/nouns/builder) compile the parts into a running business. Each Verb compiles to an API route, an SDK method, a CLI command and an MCP tool, all named `Noun.verb`. Your agent and your code call the same thing.

## Next
Part 1 of [six chapters on how the business works](/start/with-your-agent#how-it-works-in-six-chapters). [How products work](/products/how-products-work) is next: what you sell, and how it is priced. For each pillar in code, read [the Startup as code](/code/builders/startup/business-as-code).