BuilderOS

Architecture

How the pieces fit. Start at the README for what BuilderOS does; this is how it is built.


1. The inversion

The single decision that shapes everything else: skills hold the procedure, agents are adapters.

flowchart LR
    subgraph before["before: Claude-only"]
        direction TB
        B1["agents/x.md<br/>~200 lines<br/>numbered phases<br/>hardcoded tool calls"]
        B2["skills/y/SKILL.md<br/>reference material<br/>frameworks, tables"]
        B1 -->|loads as background| B2
    end
    subgraph after["after: host-agnostic"]
        direction TB
        A1["agents/x.md<br/>~30 lines<br/>role, Iron Law<br/>context contract"]
        A2["skills/y/SKILL.md<br/>method + PROCEDURE<br/>capabilities + floors<br/>output contract + gate"]
        A1 -->|run its procedure| A2
    end
    before ==>|invert| after

    classDef bad fill:#fce8e6,stroke:#d93025,color:#111
    classDef good fill:#e6f4ea,stroke:#34a853,color:#111
    class B1,B2 bad
    class A1,A2 good

Before the inversion, loading a BuilderOS skill on a host without subagents gave you a PMF scoring table and no idea what to do with it. The workflow lived in a Claude Code construct.

After it, the skill is self-executing. The agent adds only what a delegated context needs: who it is, its Iron Law, the context package it receives, how to report.

Enforced by contract. An agent longer than about 40 lines has almost certainly stolen something from its skill. See CLAUDE.md.


2. Layers

flowchart TB
    U([user]) --> ENTRY
    subgraph ENTRY["entry points"]
        direction LR
        SLASH["/bos-*<br/>Claude Code"]
        NAME["name the skill<br/>Codex, others"]
    end
    ENTRY --> USE["using-builder-os<br/>brief, route"]
    USE --> BOS["builder-os<br/>stateful pipeline"]
    USE --> SPEC["specialist skills<br/>standalone answers"]
    BOS --> PHASE["phase skills<br/>problem-framing, research-methods,<br/>opportunity-mapping, …"]
    PHASE --> CROSS
    subgraph CROSS["cross-cutting, model-invoked"]
        direction LR
        GC["gate-checks"]
        EL["evidence-ledger"]
        PT["pressure-testing"]
    end
    PHASE --> CAP["capability resolution"]
    CAP --> DATA[("analytics · db · docs<br/>tickets · meetings · repo")]
    PHASE --> ART[("PRODUCT.md<br/>.builderos/")]

    classDef store fill:#f1f3f4,stroke:#5f6368,color:#111
    class DATA,ART store

references/ sits beside all of it: templates, the state schema, the capability map. Not a layer, a shared vocabulary.


3. Instruction files

Which file the host reads as project instructions, and why this repo is arranged the way it is.

flowchart TD
    START([host starts in repo]) --> WHICH{which host?}
    WHICH -->|Codex and other<br/>AGENTS.md readers| RA["reads AGENTS.md<br/>directly"]
    WHICH -->|Claude Code| CC{"CLAUDE.md present in cwd<br/>or any directory above?"}
    CC -->|no| RA2["reads AGENTS.md<br/>directly"]
    CC -->|yes| RC["reads CLAUDE.md only<br/>AGENTS.md ignored"]
    RC --> IMP{"does CLAUDE.md<br/>import AGENTS.md?"}
    IMP -->|no| DRIFT["shared contract shadowed<br/>two files drift"]
    IMP -->|yes| BOTH["CLAUDE.md + AGENTS.md<br/>single source, both hosts"]

    classDef bad fill:#fce8e6,stroke:#d93025,color:#111
    classDef good fill:#e6f4ea,stroke:#34a853,color:#111
    class DRIFT bad
    class BOTH,RA,RA2 good

This repo takes the right-hand path: CLAUDE.md starts with @AGENTS.md.

FileHoldsRead by
AGENTS.mdArchitecture, design principles, non-negotiables, portability rules, skill contract, testing, contributingCodex directly; Claude Code through the import
CLAUDE.mdAdapter directories, agent contract, command contract, dispatch context packageClaude Code

Rule for contributors: true on every host → AGENTS.md. About subagents, slash commands or the plugin manifest → CLAUDE.md. Never the same rule in both.

Two things worth knowing. A CLAUDE.md above the working directory also suppresses direct AGENTS.md reading, which matters when BuilderOS sits inside a larger repo. And direct reading needs a recent Claude Code, while the import works regardless. Both are reasons the import is not optional here.


4. The artifact chain

Every phase consumes the previous artifact and produces the next. This is what makes the pipeline stateful rather than a themed prompt sequence.

flowchart LR
    F["00-frame.md<br/>problem · ICP<br/>riskiest assumption"] --> D["01-discovery.md<br/>evidence ledger<br/>JTBD · verdict"]
    D --> DF["02-definition.md<br/>opportunity tree<br/>success metric"]
    DF --> B["03-solution-bet.md<br/>options · bet<br/>kill criteria"]
    B --> SP["04-spec.md<br/>scope · flows<br/>acceptance criteria"]
    SP --> BP["05-build-plan.md<br/>tickets · test map"]
    BP --> RL["06-release.md<br/>rollout · baseline"]
    RL --> OC["07-outcome.md<br/>actual vs target<br/>decision"]
    OC -.->|next cycle| D

PRODUCT.md sits outside the chain and is read by every phase.

Concretely, what each phase inherits:

PhaseReadsExtracts from it
1 Discover00-frame.mdThe riskiest assumption becomes the research target; reachability shapes recruiting; prior-art class shapes who to chase first
2 Define01-discovery.mdEvery evidence tag becomes a candidate node in the opportunity tree
3 Ideate02-definition.mdThe selected opportunity and the metric the bet must move
4 Shape03-solution-bet.mdThe bet, its kill criteria, the assumption still to test
5 Build04-spec.mdAcceptance criteria map one-to-one to tests
6 Ship05-build-plan.mdWhat to roll out, what to instrument
7 Learn06-release.md + live dataBaseline and target to judge against

PRODUCT.md is separate on purpose: it holds identity, not decisions. It changes when the ICP or the problem changes, never because a feature shipped.


5. The eight gates

Full conditions in skills/gate-checks/references/, one file per gate. The shape of each:

GateRefuses to pass when
0 FrameProblem statement contains solution language · no single ICP with a sourced size · riskiest assumption not falsifiable · why-now is a preference, not a dated change
1 DiscoverFewer than 5 primary evidence units from 5 distinct sources · no explicit verdict · no JTBD · disconfirming evidence never sought
2 DefineFewer than 3 traced opportunities · no written rejections · baseline is an estimate · scale bet at pre-PMF
3 IdeateOptions share the same primary user action · kill criteria missing a metric, threshold or date · riskiest assumption has no priced test · no value in money with sources and three scenarios · the test misses the load-bearing assumption · no go-to-market · no declared stake
4 ShapeAcceptance criteria not testable · out-of-scope list empty · flows missing error and empty states · tracking plan does not measure the phase 2 metric
5 BuildAn acceptance criterion with no test · tests claimed rather than shown · instrumentation not verified firing · out-of-scope items got built
6 ShipNo rollback path · baseline captured after exposure · no dashboard for the metric · no outcome review scheduled · no launch plan
7 LearnActual not compared to target · kill criteria never evaluated · no keep/iterate/kill decision · channels never read

Two design notes.

KILLED is a pass. Phase 1 returning "this problem is not worth solving" stops the pipeline and is the cheapest outcome the system can produce. It is reported as a win.

Lite mode relaxes elaboration conditions for small features, and never relaxes the ones that prevent building on fiction: evidence thresholds, kill criteria, test mapping, rollback, baseline.


6. Phase map

#PhaseSkillsAgentsCommand
0Frameproblem-framingproblem-framer/bos-frame
1Discoverresearch-methodsresearch-planner, discovery-synthesizer/bos-discover
2Defineopportunity-mapping, product-analysis (strategy)opportunity-mapper, product-diagnostician/bos-define
3Ideateideation-methods, business-case, go-to-market, tracking-standards (experiments)solution-architect, experiment-designer/bos-ideate
4Shapespec-writing, ux-architecturespec-writer, ux-architect, product-writer/bos-shape
5Builddelivery-discipline, tracking-standardsdelivery-planner, build-reviewer, tracking-architect/bos-build
6Shiprelease-ops, go-to-market, spec-writing (communication)release-manager, product-writer/bos-ship
7Learnoutcome-review, go-to-market, product-analysis (metrics, growth, OKRs, finance)product-diagnostician/bos-learn

All eight phases are live. Phase 7 adds no new specialist: it orchestrates the analysis agents against the phase 2 target and the phase 3 kill criteria, with outcome-review holding the judging procedure so the phase also runs on a host with no agents at all.

/bos-adr is callable from any phase, the moment a decision becomes expensive to unwind.

Cross-cutting, callable from any phase: gate-checks, evidence-ledger, pressure-testing.


7. Capabilities

25 named capabilities, resolved at runtime by matching the tools a session actually exposes. Never by name, never assumed.

analytics.query · analytics.events · analytics.replay
db.query · logs.query
docs.search · docs.read · docs.write
tickets.read · tickets.write · meetings.read · research.search
web.search · web.fetch
deploy.run · ui.render · ui.capture · ui.record · diagram.render
repo.read · files.read / files.write · shell.exec
subagent.dispatch · sessions.read · schedule.run

files.read and files.write are the only ones always assumed: .builderos/ depends on them. Everything else has a degradation ladder and a floor, listed in ../references/capability-map.md.

The operating mode is a summary of what resolved, not a list of installed products:

ModeResolvedConsequence
connectedanalytics.query or db.queryReal baselines; gates 2.4, 5.3, 6.2 satisfiable
vault-baseddocs.search over local notesPhases 0–4 fully usable
codebase-basedrepo.read onlyPhases 4–6 strongest
conversationalnothing beyond filesPhases 0–3 fully usable

An idea with no product and no data is the normal entry point, not a degraded one.


8. Design debt

Stated plainly rather than discovered later.

DebtSizePlan
No automated skill-triggering harness: prompts exist, no runnerMediumOut of scope for v1.0; gates are the mechanical safety net
Behavioral runs are few: the scenarios ran on Claude Code (2026-10-05, 2026-10-20), one real product reached phase 6, no phase has run under a Codex model, and many gate conditions still rest on a citation the script cannot check (the attested lists in each gate file)LargeRe-run every scenario after each release; a real change and a real paid product to phase 7
The benchmark bands in product-analysis (metrics) are working heuristics, not sourced benchmarksSmallReplace with the product's own history once two quarters exist

Roadmap: plans/2026-09-20-lifecycle-os-v1.md.

Generated from docs/architecture.mdView on GitHub