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, Verbs, Dashboard |
| The loop | Each week, the gap between the view and the Goal sets the next test | Weekly test |
| Authority | One chain of Permissions, Limits and Mandates that only narrows | Mandates and limits |
| Rehearsal and change | Every move is tried first, then merged as a new Version | Change |
| Composition | The business is assembled from inherited parts | 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, the API, the agents' instructions and the books follow.
nouns/[noun].mdxBusiness291VerbsWhat can be done to a Noun: renew a Lease, publish an Offer.nouns/[noun].[verb].tsverbs/[verb].mdxBusiness291EventsWhat happened, in the past tense: a Lease renewed. Every Verb emits one.generated from VerbsBusiness10ProductsWhat you sell, an App, an API, a Site, a Service, an agent or data, and the Offers that price it.products/[product].mdxoffers/[offer].mdxProducts38AgentsWho runs it: Teams of Roles, an agent or a person in each.agents/[team]/[role].mdxAgents76WorkflowsHow the work runs: Processes, each a set of Workflows with triggers and approvals.workflows/[process]/index.mdxWorkflows67SystemsThe software the business runs on: billing, ledger, CRM, support and the rest.systems/[system].mdxSystemsNouns are the records a business keeps, and Verbs are what can be done to them. Every Verb leaves an Event, the record that it happened.
Products are what you sell, through Offers. Agents do the work, each in a Role. Workflows move the work, and Systems are the software it moves through.
The root is the Founding Hypothesis: everything the 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 says "charge $29 a month". A developer adds offers/. 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, and works the top of the list. The weekly test ranks the five slots of the Founding Hypothesis and runs one Experiment on the weakest.
Inside the week, the view ranks what waits on its reader: Approvals, Actions in a delay window and Tasks, nearest close first. Every run ends in Evidence and a Decision. Experimentation shows the loop each run carries.
Authority: one chain that only narrows
A Permission says what a Role may do, a Limit how much, and a Mandate for whom and until when. Limits inherit, and a Role only tightens what its Startup allows.
Every Action records who acted, for whom and under which Mandate. A call over its Limit never fails: it waits pending for an Approval, a person's answer on that one Action.
Autonomy climbs per Verb on evidence, through three rungs: assist, supervised and full. 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 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 explains the two environments.
An 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 it extends. The template brings Products, Offers, Teams, Roles, Processes and Systems. A file exists only where the business differs from it.
startup.tsimport { Startup } from 'startup-builder'
export default Startup({
name: 'Leaseline',
domain: 'leaseline.app',
extends: 'solo-saas',
story: 'Leaseline tracks lease renewals for small property managers.',
signup: 'magicLink',
trial: 'card-free',
})
- 4The Startup: one business, with its own Products, Customers and P&L. →
- 5Its Site, app, API and email live at this domain. →
- 6The Solo SaaS Template brings Products, Offers, Teams, Roles, Processes and Systems. A file exists only where Leaseline differs. →
- 7What it does, in one sentence. The Brand, the Site and every agent start from it. →
- 8–9Settings: how customers sign up and try it. Every other Setting is inherited. →
leaseline/startup.tsnouns/Lease.mdxa Noun: its fields, Verbs and statesnouns/Lease.renew.tsthe Function behind Lease.renewproducts/offers/ what you sellagents/Teams, Roles and who fills eachworkflows/Processes and their Workflowssystems/edits to the Systems you inherit
Leaseline, built on the 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 can be several Nouns at once.
Builders 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. How products work is next: what you sell, and how it is priced. For each pillar in code, read the Startup as code.