BuilderOS

Gate 4: Shape

23 conditions. 19 decided by the script, 3 judged by the model. Run at the end of /builder-os:bos-shape.

Acceptance: whoever owns the product decision, with a technical reviewer for high-risk changes, recorded with record 4 --accepted-by "who" (SKILL.md, Acceptance).

Conditions

  1. 4.1

    Acceptance criteria are testable assertions

    Each starts with a subject and a verifiable verb; no "should be intuitive"

    model
  2. 4.2

    Out-of-scope list is non-empty

    An empty out-of-scope list means the scope was never bounded. On the change track SPEC.md also has **Touches:** (below)

    script
  3. 4.3

    Every flow has error and empty states

    Per flow, both states enumerated

    script
  4. 4.4

    Tracking plan measures the Phase 2 metric

    Named events map to the success metric. Skipped on the change track, which has no phase 2 metric

    model
  5. 4.5

    Accessibility floor stated

    Keyboard path, contrast target, focus order

    script
  6. 4.6

    Model output has an eval dataset

    Existing JSON/JSONL cases (id, input, expected, optional judge, boolean must_pass) or Markdown case table (# / Input / Expected / Judge / Must pass). Full ≥20, lite ≥10 valid unique cases, threshold 0–100, named judge, at least one must-pass case. Prose counts and unsupported formats fail

    script
  7. 4.7

    Constraint conflicts stated, each with who decides

    A ## Conflicts section exists, stating either the conflicts between PRODUCT.md and TECH.md constraints or that none were found. Every conflict row names who decides

    script
  8. 4.8

    The stack was decided with a person

    ## Stack lists every layer the work touches as inherited, decided or not needed; every decided row names who decided it; every linked ADR exists in decisions/; ## What we chose summarizes the choices for the person accepting

    script
  9. 4.9

    The look was chosen from rendered versions

    SPEC.md → Design → ## Visual direction shows at least 3 versions on a new product in full mode, 2 on the feature track or in lite mode, each version file exists and holds a design (a real image, or HTML with visible content; a 0-byte file fails); **Chosen:**, **Chosen by:** (a person), **Design kit:** and the tokens are filled. Wherever two or more versions are needed, **References:** lists real screens studied before rendering (files that hold a screen, or doc tags): 3 on a new product in full mode, 2 otherwise; and the versions table has an Avoids column naming, per version, the generic default it steers away from. Or **Visual direction:** not applicable, {reason} when there is no interface. On the change track one version is enough, or **Visual direction:** inherited, {reason} when no screen changes its composition

    script
  10. 4.10

    The domain was modeled with a person

    SPEC.md → Design → ## Domain model: an Entities table; a ### Transitions: {entity} table naming who for every entity with a lifecycle; ### Invariants; a ### Data table; **Rules decided by:** a person, quoting their words; a referenced prototype file holds visible content. Or **Domain model:** not applicable, {reason} when nothing changes state or shape

    script
  11. 4.11

    The impact on what exists is handled

    SPEC.md → ## Impact on what exists has a row for existing data, contracts (APIs, webhooks, exports, integrations), tracking events, permissions and current users, each with its handling ("nothing to do" with the reason counts). On the change track only the areas it touches, and current users. Or **Impact on what exists:** not applicable, {reason} when nothing exists yet

    script
  12. 4.12

    What a machine cannot check is written down

    SPEC.md → ## Quality bar table (Area / Criteria / Not applicable because) with a row for permissions, personal data and performance. Each row cites acceptance criteria that exist, or gives the reason it does not apply. Accessibility, end-to-end, dependencies and secrets are not here: they are automatic checks (5.10)

    script
  13. 4.13

    Someone from the ICP saw it before the build (product track)

    SPEC.md → ## Real users cites at least one interview, doc or data tag: one session where a person from the ICP walked the problem, the concept or the clickable prototype. A plan to talk to users fails; the tag on a field line (Willingness to pay, Channel result) does not count as the session. Skipped on the spike, change and feature tracks

    script
  14. 4.14

    Money before the build (product track, for sale)

    **Willingness to pay:** in the spec cites an interview, doc or data tag: what a person from the ICP did when shown the price (a pre-order, a letter of intent, a click on a price, a price accepted in the real-user session). An opinion about the price ("said they would pay") fails: the line names an act (pre-ordered, paid, signed, clicked, accepted). ## Stack has a payments row, inherited or decided: how the product takes money and who handles tax and invoices. Skipped when PRODUCT.md says not for sale and on the other tracks

    script
  15. 4.15

    No scale work before PMF

    Model-judged at idea and pre-PMF: nothing in the spec is optimization, enterprise control or infrastructure for load nobody has. The six scale defaults of 4.18 are not scale work. Skipped after PMF

    model
  16. 4.16

    The agent's behavior is designed (model output)

    SPEC.md → ## Agent behavior (agent-design): an autonomy table (Action / Autonomy / Why / Criterion) where every action is does, proposes, asks or never, and every asks row cites an acceptance criterion that exists; **Hand-off:**; **Degradation:**; **Latency budget:** with a number; ### Injection surfaces (Surface / What could arrive / Mitigation / Eval case), each row with a mitigation and an eval case that is must-pass in the 4.6 dataset. Skipped without model output

    script
  17. 4.17

    The first day is designed (product track)

    SPEC.md → Design → ## Flows has ### First day, from the first visit to the first useful outcome; the spec's **Activation:** cites an acceptance criterion that exists and names an event from the tracking plan. Skipped on the other tracks

    script
  18. 4.18

    The system was designed before the code

    SPEC.md → ## Architecture (system-design): ### Components (Component / Responsibility / Owns / Talks to), each with a responsibility and what it talks to; ### Contracts; ### External calls where every call has a timeout in seconds, a retry rule, its idempotency and what the user sees when it fails, or "none"; ### Scale defaults with a row each for owner key on every row, paginated lists, indexed queries, idempotent writes, slow work off the request and reversible migrations, each with how or why not; **Capacity:** with numbers. Or **Architecture:** not applicable, {reason} when there is no server, no stored data and no input from other people

    script
  19. 4.19

    Who could break it, and the test that shows they cannot

    SPEC.md → ## Threat model: **Boundaries:** and a table (Boundary / Threat / Mitigation / Criterion) with a row for another user's or customer's data, untrusted input, abuse and secrets; every row has a mitigation and cites an acceptance criterion that exists, or "not applicable, {reason}". Or **Threat model:** not applicable, {reason}

    script
  20. 4.20

    Every flow is drawn, and every lifecycle

    SPEC.md → Design → ## Flows: each ### {flow} has a fenced mermaid block that is a flowchart (or graph) with at least two arrows, and a decision node wherever its steps table lists branches. Each entity with a lifecycle in ## Domain model has a mermaid stateDiagram under its ### Transitions: {entity} table, holding every state the table names. The diagram and the table say the same thing; the table stays the record the build reads. In lite mode a warning

    script
  21. 4.21

    Every message the product sends is designed

    SPEC.md → Design → ## Messages: a table (Message / Trigger / Recipient / Channel / Text / Opt-out / Preview) where every row has all seven, the text is real words rather than a placeholder, and every preview file named holds content. Or **Messages:** none, {reason} when the product sends nothing outside its screens

    script
  22. 4.22

    The tests chosen before the build were read against their lines

    Product track: SPEC.md → **Channel result:** cites an interview, doc or data tag, and its number is not below the stop line of the phase 3 **Channel test:**. Any track whose bet chose test first: BRIEF.md → Bet → ## Cheapest test has **Result:** with a tag, not below **Stop below:**. Under the line the gate holds: kill (record 4 --kill), change the bet, or waive 4.22 with the person's reason. Skipped when no test came before the build

    script
  23. 4.23

    The code is designed to last

    SPEC.md → ## Maintainability has Structure: (the modules this work adds or changes, with their paths in backticks, against TECH.md → Map, or not applicable with why), Simple to change: (what is likely to change and the one place it lives) and Dependencies: (each new library or service and why, or none new). Phase 5 reviews the diff against it (5.19)

    script

Details

Read when running gate 4. E.1, E.2 and the procedure in SKILL.md apply too. Acceptance: whoever owns the product decision, with a technical reviewer for high-risk changes, recorded with record 4 --accepted-by "who" (SKILL.md, Acceptance).

Attested (the script checks the citation and its file, not the event): 4.13, 4.14, 4.22.

Build track. 4.4 maps the tracking plan to BRIEF.md → Request → Done when: (a log line per run is a tracking plan). 4.9 needs one version (the prototype version picked at the solution stop counts), or the look inherited or not applicable with its reason for a tool with no screen. 4.20 passes or fails as in full mode: the flows and journeys are where build work is designed. The rules (4.10), the stack and the trade-offs are drafted on their recommendations and put to the person in the build stop, so one answer can be quoted in each. 4.13, 4.14 and 4.17 are skipped. The threat model holds: a tool often holds credentials and client data.

Change track. SPEC.md → **Touches:** lists what the change touches, comma-separated, each explained in parentheses: interface, copy, data, personal data, permissions, money, messages, contracts, stack, or none of these. The change always owes 4.1, 4.2 and 4.11; the rest applies by what it touches: interface 4.3, 4.5, 4.9, 4.20; data 4.10, 4.18; personal data or permissions 4.12, 4.19; money 4.7, 4.12, 4.19; messages 4.21; contracts 4.18; stack 4.8. Everything else is skipped and says why. Without **Touches:** every condition runs and 4.2 fails.

Script-decided: 4.2, 4.3, 4.5, 4.6, 4.7, 4.8, 4.9, 4.10, 4.11, 4.12, 4.13, 4.14, 4.16, 4.17, 4.18, 4.19, 4.20, 4.21, 4.22. Model-judged: 4.1, 4.4, 4.15. The emitted checked_by split is authoritative.

Generated from skills/gate-checks/references/gate-4-shape.mdView on GitHub