Skip to content

Builders as compilers

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 compiles part of a project into the running business. StartupBuilder directs four others, and each owns a set of folders.

Five Builders

BuilderCompilesProduces
StartupBuilderstartup.ts, startups.lock, settings.mdx, policies.mdx, agents/, workflows/, plays/, systems/, dashboards/, tests/The Startup, Teams, Roles, Processes, Workflows, Dashboards
SoftwareBuildernouns/, verbs/, evaluators/, mappings/, env.ts, products/ of kind App, API, Agent or Dataset, apps/, code/Nouns, Verbs, Functions, Apps, the API, SDK, CLI and MCP
SiteBuildersites/, domains/, content/, brand/, components/Sites, Pages, Domains, Brand, Components
[Service](/business/nouns/service)Builderproducts/ of kind Service, and the outcome terms in its OfferServices and their work lifecycle
SalesBuilderoffers/, demand plays/Offers, Prices, checkout, Stripe Products 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 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 run on the preview.
  6. Preview. The result is a 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:

OutputWhere
Types.sb/types/Lease, and /$.d.ts for agents
APIGET /leaseline.app/leases, POST /leaseline.app/leases/{lease}/renew
SDK$.Lease.renew({ lease })
CLInpx startup-builder do Lease.renew --json '{"lease":"lease_1"}'
MCPLease.renew in the do tool's program
App/app/leases, and a form for each Verb
EventsLease.created, Lease.renewed
DocsA reference page for the Noun and each Verb

Reading the output

To see where any value came from, show it:

Terminal
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)