# Builders as compilers

URL: /code/builders · Id: `page:code/builders`

> How a Startup project compiles into a running business, which Builder owns each folder, and how to trace any value to its file.

A [Builder](/business/nouns/builder) compiles part of a project into the running business. [StartupBuilder](/code/builders/startup) directs four others, and each owns a set of folders.

## Five Builders
| Builder | Compiles | Produces |
| --- | --- | --- |
| StartupBuilder | `startup.ts`, `startups.lock`, `settings.mdx`, `policies.mdx`, `agents/`, `workflows/`, `plays/`, `systems/`, `dashboards/`, `tests/` | The [Startup](/business/nouns/startup), [Teams](/business/nouns/team), [Roles](/business/nouns/role), [Processes](/business/nouns/process), [Workflows](/business/nouns/workflow), [Dashboards](/business/nouns/dashboard) |
| SoftwareBuilder | `nouns/`, `verbs/`, `evaluators/`, `mappings/`, `env.ts`, `products/` of kind [App](/business/nouns/app), API, [Agent](/business/nouns/agent) or [Dataset](/business/nouns/dataset), `apps/`, `code/` | [Nouns](/business/nouns/noun), [Verbs](/business/nouns/verb), [Functions](/business/nouns/function), [Apps](/business/nouns/app), the API, SDK, CLI and MCP |
| SiteBuilder | `sites/`, `domains/`, `content/`, `brand/`, `components/` | [Sites](/business/nouns/site), [Pages](/business/nouns/page), [Domains](/business/nouns/domain), [Brand](/business/nouns/brand), [Components](/business/nouns/component) |
| [Service](/business/nouns/service)Builder | `products/` of kind [Service](/business/nouns/service), and the outcome terms in its [Offer](/business/nouns/offer) | [Services](/business/nouns/service) and their work lifecycle |
| SalesBuilder | `offers/`, demand `plays/` | [Offers](/business/nouns/offer), [Prices](/business/nouns/price), checkout, Stripe [Products](/business/nouns/product) and Prices |

## One compile
Every save under `npx startup-builder dev`, and every push, runs the same steps:

1. **Parse.** Each file becomes a typed record. A syntax error, a secret-shaped value or a key set twice stops here and names the line.
2. **Canonicalize.** The record is printed in one canonical form and fingerprinted. Formatting changes mint nothing.
3. **Resolve.** Own values merge over the pinned [Startup Template](/business/nouns/startup-template) into `.sb/resolved/`.
4. **Build.** Each Builder compiles its folders: types, routes, screens, Pages, Stripe objects, MCP tools.
5. **Check.** Verb tests, Role tests, scenario tests and [Evaluators](/business/nouns/evaluator) run on the preview.
6. **Preview.** The result is a [Change](/business/nouns/change) on its own preview address, merged with `Change.merge` and deployed with `Version.deploy`.

## What a compile produces
One `nouns/Lease.mdx` file, in a Startup that declares a `Lease` Noun, yields every one of these:

| Output | Where |
| --- | --- |
| Types | `.sb/types/Lease`, and `/$.d.ts` for agents |
| API | `GET /leaseline.app/leases`, `POST /leaseline.app/leases/{lease}/renew` |
| SDK | `$.Lease.renew({ lease })` |
| CLI | `npx startup-builder do Lease.renew --json '{"lease":"lease_1"}'` |
| MCP | `Lease.renew` in the `do` tool's program |
| App | `/app/leases`, and a form for each Verb |
| [Events](/business/nouns/event) | `Lease.created`, `Lease.renewed` |
| Docs | A reference page for the Noun and each Verb |

## Reading the output
To see where any value came from, show it:

```bash
npx startup-builder show /offers/pro/price
```

```text
offers/pro.price = $29 per month
  set by    offers/pro.mdx:3
  shadows   solo-saas@7  ($19 per month)
```