delivery-discipline
- Run by agents
- build-reviewerdelivery-planner
- Reached from commands
- /builder-os:bos-build
At a glance
Mode. Standalone decomposition produces the plan (step 3) from the supplied spec and stops there. A standalone implementation plans first and waits for acceptance unless the request already authorized going straight to code; a standalone review applies the two axes and the severity scale of step 5. The lifecycle runs every step and gate 5. Both per operating modes.
- 1Read
SPEC.md,TECH.md - 2Record the test baseline
- 3Write the plan, reading only
- 4Get the plan accepted
- 5Run the loop per slice
- 6Keep the plan true
- 7Check scope creep
- 8Verify instrumentation end to end
- 9Look at what was built, then check security and speed
- 10Put it in the person's hands and show it working
- 11Write, gate, and leave the code legible
The skill
Phase 5 turns a spec into working, tested, instrumented software and proves it: a plan a person accepts before any code, then a captured execution record the gate judges against the criteria, the change and the plan.
Mode. Standalone decomposition produces the plan (step 3) from the supplied spec and stops there. A standalone implementation plans first and waits for acceptance unless the request already authorized going straight to code; a standalone review applies the two axes and the severity scale of step 5. The lifecycle runs every step and gate 5. Both per operating modes.
Read the build method for the detail. Two modes also run alone: tickets (tickets, to-tickets by name) and demo, a video of a feature from a passing end-to-end test (feature demo). Load tracking-standards and gate-checks when needed.
Procedure
Read
SPEC.md,TECH.md. The build uses the spec's## Stackand## Architecture, and the tokens and kit inSPEC.md→ Design → Visual direction, applied per the interface details. A layer still open, or a structural addition found later (framework, database, hosted service, paid API, runtime), pauses the slice for asystem-design(stack) card to the person. Done when the spec exists and every layer the work touches is decided.Record the test baseline before any code: run
TECH.md→ Verify throughrun-checkand note passes, failures and duration. A suite already red: list each failure under## Pre-existing failuresand inTECH.md→ Known failing; gate 5.2 then compares the final run against this baseline. An empty Verify is filled first; no suite means slice one creates it. What the baseline finds missing (no guardrail, no production) goes into the plan as slice zero (step 3). Work on the branch the plan names; a slow suite usesTECH.md→ Test (fast) per slice (where the work lives). Done when the baseline capture exists and every failure in it is listed.Write the plan, reading only: spec,
TECH.md, codebase, in the host's read-only planning mode where one exists; the baseline writes only evidence files. The plan holds the seams (each module this work creates or changes, its interface, what it hides, where its tests sit, per the build method), with the central module designed twice; slices with files, criteria and blocking edges, per the slice rules and tickets (expand–contract for a wide refactor); slice zero when the baseline found them missing: the cheapest guardrail running Verify with the automatic quality checks per Guardrails (gates 5.8, 5.10; where the CI belongs to someone else, the plan asks them), and production online behind a door with a preview per change perrelease-ops(production) (gate 5.16); the critical path; risks with mitigations; rejected alternatives with why each lost; a planned test for every numbered criterion. Slices are tracer bullets, each end to end, sized to one fresh session. Open it with**In plain words:**: what gets built, in what order, what the person can try after each slice, and the riskiest step. Done when an engineer new to this conversation could build from it without asking.Get the plan accepted. Present
**In plain words:**first. Quiz the person on the slices per tickets, section 3, until they approve the breakdown; then the riskiest step and what was rejected. Record**Accepted:** {who} · {ISO timestamp}from the person's own words, or quote an earlier standing instruction that named the build, with its date. On thebuildtrack the plan is the slices with their files and the person's go on them, quoted; seams, risks and the plain-words summary are written only where they help. Code starts after that line. Publish one ticket per slice per tickets, section 4, and name where under**Tickets:**. Done when the plan carries the person's acceptance and the tickets exist.Run the loop per slice, one slice per branch and pull request (a draft from the first commit, pushed at the end of every session; a commit of documents alone is not progress), in order:
- Test first where a break does damage: a criterion touching one customer's data reaching another, money, an action leaving the product or its approval, a migration, or outside text reaching a model gets its test first, by number, at a seam the plan names, and you watch it fail. Every other criterion is tried by hand in step 3 and mapped
by hand: {capture}(gates 5.1, 5.20). An untestable damage criterion returns to phase 4. - Write the least code that passes, then refactor with the tests green. Per slice run the tests of the files touched and the typecheck; the whole Verify runs after a batch of merges, or in CI.
- Try it in the running app: start it, walk the real flow as its user would, fix what breaks, and capture a screenshot or a 30-second video. That capture closes the slice.
- Verify the slice's instrumentation fires in a real environment with the tracking plan's properties.
- Delegate at most one agent per slice, for long work only, reporting every 30 minutes in plain words. An hour without a commit means circling: tell the person what works, what you tried, where you are stuck, two ways forward; unless they asked for a long run.
- Review on two axes, one reviewer per pull request,, tagging each finding standards (good code, true to
## Maintainability, 5.19?) or spec conformance (the specified thing?): behavior against each criterion the slice claims, including phase 4's enumerated states, and the diff against the plan. It runs in a fresh context given spec, plan and diff only; inline, reread the diff as someone else's. Important findings, per the severity scale (a threat-model mitigation violated counts too), are fixed now; list at most five nits and count the rest. A finding seen a second time becomes a check (lint rule, test or hook) in the same pull request, named inTECH.md(Guardrails). - Report the slice to the person (gate 5.18) in plain words and in their language, kept in
LOG.md→ Reports per the template: what to open now first, then done, how,**Seen:**with the capture, next, needed from them. Mark the slice inPLAN.md, and itsWORK.mdrow to try.
A bug found on the way runs
bug-diagnosis. Fix the code, keep the test: change a test only when it encodes behavior the spec does not require, citing the spec line. Done when Verify, captured after the slice's last change, is green on every criterion the slice owns and no important finding is open.- Test first where a break does damage: a criterion touching one customer's data reaching another, money, an action leaving the product or its approval, a migration, or outside text reaching a model gets its test first, by number, at a seam the plan names, and you watch it fail. Every other criterion is tried by hand in step 3 and mapped
Keep the plan true. A deviation (an unnamed file, a split slice, a risk that turned real) updates the plan in the same change, with the reason. Done when the plan describes the diff as it is.
Check scope creep (gate 5.4): the diff against the phase 4 out-of-scope list, item by item. Anything built from it is removed, or promoted deliberately as a logged, visible override. Done when every out-of-scope item has a verdict.
Verify instrumentation end to end (gate 5.3): per tracking-plan event, trigger the action, confirm arrival with its properties at the destination, record the evidence tagged by source. Done when every event in the tracking plan has its evidence.
Look at what was built, then check security and speed (gates 5.9, 5.12 to 5.14), on the startup path and where the track calls them in, per closing checks. Done when
## Interface review,## Craft critique,## Security reviewand## Performanceeach hold what happened, or the gate skips them.Put it in the person's hands and show it working (gates 5.17, 5.15) per closing checks. Done when
## Triedquotes the person and## Demohas its test, run and recording, or the gate skips them.Write, gate, and leave the code legible. Complete
PLAN.md(one row per slice with its status) andLOG.md(runs, reviews, demo, what was tried) per the build-plan template, headings, bold labels and tables exact, every status claim backed by arun-checkcapture from the final change. Run gate 5 and record it (scripts/bos.mjs record 5 --judged "{judge-id}=pass|fail,..."where commands run). UpdateTECH.md: Map (gate 5.11 checks every path), Verify, conventions, traps, recurring findings, and each must-always-hold rule with its deterministic check. Then run retro on the build sessions and list the changes under**Environment:**; a finding aboutAGENTS.mdorCLAUDE.mdrunsagents-md. Done when gate 5 is recorded,TECH.mdmatches the code, and the retro's changes are listed.
A planning-only run produces the accepted plan and leaves gate 5 for later.
Watch for
| Do | Instead of |
|---|---|
| Capture the final run and have coverage judged | Pasting green output |
| Close a slice on a capture of it working in the app | Closing it on green tests alone |
| Test what a break would damage, try the rest by hand | A red-green test per criterion, copy and layout included |
| Test the criterion where its surface lives, or return it to phase 4 | Mapping it to "no test, reasoned exception" |
| Plan reading only, get acceptance, then build | Code before the **Accepted:** line |
Capabilities
| Capability | Used for | Floor if absent |
|---|---|---|
repo.read | Codebase, tests, patterns | Phase 5 needs it; say so and stop at the plan's questions |
shell.exec | Verify through run-check | Deliver the plan, say what must run; gate 5.2 waits for a capture |
analytics.events / analytics.query | Events arriving with properties | Emission log or code path, tagged weaker |
ui.capture | Screenshots of each state of the built interface (step 9) | The person opens the routes and says what they see |
subagent.dispatch | The fresh-context review, the loop | Run it inline, slice by slice |
files.read / files.write | Artifacts, state | Required |
Output Contract
## BUILD VERIFIED with PLAN.md and LOG.md complete per the template (the accepted plan, every criterion to its test, the captured runs, the reviews, the demo, who tried it) and the gate result.
References
Read only when a step needs them, so they cost no context until then.
Build Methodreferences/build-method.md
The reasoning and detail behind the phase 5 procedure in the skill. Read the section you need.
The Plan
Step 1 reads, from SPEC.md and TECH.md: the numbered acceptance criteria, the state matrix, the out-of-scope list, the not-yet-specified decisions, the conflicts and the tracking plan; the stack, constraints, conventions and Verify commands.
Building from a bet without a spec reproduces the ambiguity phase 4 exists to remove, which is why a missing SPEC.md stops the phase.
The first reviewable artifact of a build is the plan, not the diff. A wrong assumption caught in the plan costs an edit to a document; the same assumption caught in review costs the work built on it.
| Part | What it says |
|---|---|
| Seams | The modules this work creates or changes, their interfaces and where tests sit; see Seams below |
| Slices | The tracer bullets below, each with the files it creates or changes, the acceptance criteria it owns and what it blocks on |
| Critical path | The longest chain of blocking edges |
| Risks | What can break, which step is riskiest, and what limits apply (a rate limit, a migration, a shared table) with the mitigation |
| Rejected alternatives | The approaches considered and why each lost, so the reviewer does not re-propose them |
| Criteria to tests | Every numbered acceptance criterion mapped to at least one planned test |
Gate 5.6 checks the **In plain words:** summary, the **Accepted:** record, the Seams with their plain-words line, the Files column and the Risks; gate 5.7 judges that acceptance came before the code and that the final diff matches the plan.
A plan corrected only in a "Deviations" paragraph at the end is a plan nobody could review against.
Seams
A module is anything with an interface and an implementation: a function, a class, a package, a slice through tiers. Its interface is everything a caller must know: the signature, but also the ordering, the errors and the promises. A seam is where that interface lives, and it is where tests go.
- Deep over shallow. A good module hides a lot behind a small interface. Deletion test: delete it in your head; if the complexity reappears in every caller, it earned its place; if it just vanishes, it was a pass-through.
- The interface is the test surface. Tests cross the same seam callers do. Needing to test past it means the module is the wrong shape.
- One adapter is a hypothetical seam, two is a real one. Do not add an interface for a variation nothing needs yet.
- The domain rules get one home. The transitions and invariants from
SPEC.md→ Design → Domain model live behind one module; screens and endpoints ask it, they do not re-implement it. - Design it twice for the central module: two or three interfaces built under different constraints (smallest, most flexible, common case trivial), compared on what each hides and where change lands. The first idea is rarely the best one.
The owner reads one plain line per seam; the rest is for the reviewer and the next agent.
Guardrails
A guardrail runs Verify (build, test, lint) on every change without anyone asking: a CI job on every push, a pre-commit hook, or both. A repository with neither is itself a finding: every rule then depends on an agent remembering it.
- Slice zero adds one when there is none. The cheapest that fits the repository: a CI workflow where the code is hosted on a service that runs one, a pre-commit hook otherwise. It runs the exact Verify commands from
TECH.mdand fails on a non-zero exit. Record it inTECH.md→ Guardrail with the file that defines it. Adding it is a code change like any other: it is in the plan the owner accepts. On a repository whose CI is someone else's (a platform team, a protected configuration, a client's repository), adding or changing it is that owner's decision: put it to them as a question in the plan, propose a local pre-commit hook meanwhile, and if they decline record**Guardrail:** declined by {person} ({why}), {date}, which gate 5.8 shows as a warning rather than a pass. - Slice zero adds the quality checks too. In the same guardrail: an accessibility scan on every route of the interface, one end-to-end test that walks the primary flow, a dependency audit, a secret scan, static analysis for security flaws; with an interface, a token check that fails on raw colours and spacing outside the token file (interface details); once a look has shipped (
TECH.md→ Design system), visual regression screenshots of the primary flow, so the next feature cannot erode it unseen. Use what the stack already has before adding a tool. Record them inTECH.md→ Quality checks (gate 5.10). A check that cannot apply is written "n/a" with why (no interface, no dependencies). These run every time; a reviewer's memory does not. - Mechanical rules become checks. A finding that is a fixed pattern (a banned call, an import that must not happen, a file that must not be edited, a missing await) gets a deterministic check in the guardrail: a lint rule, a type, a hook, a CI step. Default to building the check over writing the rule.
- Judgment stays in words. Cross-file consistency, naming that fits the domain, "matches the surrounding code": these go in
TECH.md→ Conventions, which the reviewer reads with the diff. The implementing context is already the most loaded one; standards are the reviewer's job.
Gate 5.8 checks that TECH.md names a guardrail. An override is legitimate where none can exist (no hosting, no hooks), logged with that reason.
Slow Suites and Where the Work Lives
On a large codebase the full suite takes minutes. Per slice, run TECH.md → Verify → Test (fast) on the files the slice touches; run the full Verify before reporting a slice finished only when it is cheap, and always before the final capture for gate 5.2. Record the fast command in TECH.md once you find it.
Each slice is a small pull request to the default branch, behind a flag until the feature is complete, named by the plan's **Branch:** pattern and linking the initiative folder; the folder's changes travel with each one. A pull request per initiative is large, slow to review and hard to reverse (Where the work lives). Opening the pull request is within an authorized build; merging it is the owner's call unless they delegated it.
Tracer Bullets
Slice rules
Decompose the spec into slices that each go all the way through: interface, logic, storage, instrumentation. Not layers.
- Each slice is end-to-end. A user can do something, however narrow, and the event fires.
- Each slice maps to acceptance criteria by number. A slice mapping to none is not in the spec and is scope creep arriving early.
- Blocking edges are explicit. Slice B blocks on A, or it does not. Write them as a list, not a diagram:
3 blocks on 1. Then check the critical path; where that chain is most of the work, the decomposition is still layered in disguise. - The first slice is the riskiest one that is still small. Not the easiest.
- Open decisions are edges. A slice whose acceptance criteria appear in the spec's Not yet specified table blocks on that decision. Write it as an edge (
4 blocks on decision: retry limit) and build the unblocked slices first; never resolve the open question in code. - Parallel only when independent. Independent slices (no blocking edge, no shared files) can run in parallel, each in its own isolated workspace where the host supports it. Slices that share files stay in one sequence.
Why
A layer-first decomposition ("build the schema, then the API, then the UI") produces three weeks of work before anything is demonstrable and four weeks before anything is falsifiable. A tracer-bullet decomposition produces something thin and end-to-end on day two, which is when the spec's wrong assumptions become visible while they are still cheap.
| Decomposition | First demonstrable | First falsifiable |
|---|---|---|
| By layer | After the last layer | After the last layer |
| By tracer bullet | Slice one | Slice one |
The first slice is the riskiest one that is still small, not the easiest: the point of going end-to-end early is to hit the unknown early. An implicit dependency discovered mid-build costs a day. The longest chain of blocking edges is the minimum duration regardless of how many people work on it.
Test Baseline
Without a baseline, a suite with four pre-existing failures makes gate 5.2 unarguable in the wrong direction: nobody can tell your failures from the ones that were already there. The baseline is also the honest answer to "did this change break anything", which a green suite alone cannot give when it was never fully green.
TECH.md → Verify holds one command each for build, test and lint, each exiting non-zero on failure, with an example of healthy output. Where that section is empty, find the commands, run them, and write them there before going further.
A check that needs a person to remember how to run it will not be run by an agent, which is why a multi-command verification gets wrapped in a single target. A phase 5 that ends with no tests fails gate 5.1 by construction.
The Loop
If you cannot write the test from the criterion, the criterion failed the adjective test in phase 4. A test that passes before the code exists is testing nothing, and watching it fail is the step people skip. Write the least code that passes, not the general solution: the general solution arrives when a second case demands it.
Steps 1 and 2 are the discipline. Everything else is craft that survives without them; those two do not survive being skipped, because a suite written after the code tests what the code does rather than what the spec required.
A bug test failing on a typo reproduces nothing. A test that existed before the fix, and that the fix could not rewrite, is the evidence the bug is gone.
A red test is a finding about the code until shown otherwise. Where the host or CI can block edits to test files during a fix, that is the deterministic version of the never-weaken rule.
Two-Axis Review
| Axis | Question | Failure looks like |
|---|---|---|
| Standards | Is this good code? | Duplication, unhandled errors, poor naming, missing edge cases |
| Spec conformance | Is this the specified thing? | Well-built code that solves a slightly different problem |
A review that only runs the first axis will approve a beautifully implemented misunderstanding. A criterion "satisfied" by code nobody exercised in the enumerated error state is not satisfied. A fresh-context review keeps the verdict from being shaped by the assumptions that produced the code.
| Severity | Means | Handling |
|---|---|---|
| Important | Breaks an acceptance criterion or an enumerated state, exposes data, violates a TECH.md constraint, weakens a test, adds a structural layer (framework, database, hosted service, paid API, runtime) nobody decided, or departs from the tokens and kit in SPEC.md → Design | Fixed in this phase, or the gate fails |
| Nit | Style, naming, a cleaner shape | At most five listed; the rest summarized as a count |
Skip what the toolchain already checks (formatting, lint rules) and generated files. Tag each finding with its axis (standards or spec).
Recording a recurring finding in TECH.md means the next build avoids it instead of the next review catching it. The scope-creep check catches the most common quiet failure in delivery: the thing that was easy to add while you were in there.
Instrumentation
Gate 5.3 wants proof that the events arrive, not that the code calling them was written. Three failures worth expecting: the event fires but a required property is null, the event fires twice for one action, and the event fires in development but the production configuration was never set. Each one is invisible until someone tries to use the data, which is phase 7, which is too late to fix cheaply. Emission-log evidence is weaker; it is still evidence, and it still catches the null property.
Claims and Their Evidence
| Claim | Requires | Not enough |
|---|---|---|
| Tests pass | A verified run record, output and review of coverage, from a run after the last change | An earlier run, "should pass" |
| This test covers AC-3 | The test failing with the behavior removed, then passing with it restored | The test passing once |
| The bug is fixed | A test that reproduced it, captured before the fix and unchanged by it, now passing | The suite green after a fix that also edited the test |
| The build follows the plan | The diff read against the accepted plan, deviations recorded in the plan | "Built as planned" |
| Instrumentation works | The event observed arriving, with its properties | The tracking call present in the code |
| The model behaves as specified | The eval set run against the final prompt and model, pass rate and every must-pass case shown | A few good examples in a demo, or a run before the last prompt change |
| Nothing out of scope was built | The diff read against the spec's scope boundaries | The implementer saying so |
| The slice is done | Every acceptance criterion it owns mapped to a test that ran | Tests green overall |
Capture Runs
Use the installation's scripts/bos.mjs run-check --label {slug} [--cwd {relative-dir}] [--initiative {slug}] [--root {project-root}] -- {executable} {args} for explicit execution. It records command, working directory, exit status, timestamp and output hash and prints the **Run:** pointer. For an eval, also pass --results {relative-json} --dataset {relative-dataset} to bind both files to the capture. Commands are executed as arguments, never interpolated shell strings. A failed run cannot satisfy gate 5.2. Gate reads do not execute anything; relevant verification must still judge coverage and correspondence to the final change.
Prerequisites and Hard Rules
Phase 5 is the one phase with a real prerequisite: something has to write code. This skill makes a violation of a must-always-hold rule unlikely; only the deterministic check makes it impossible.
Common Mistakes, Full List
| Mistake | Why it fails | Correct |
|---|---|---|
| Pasted green output with no captured run | Prose or an old run can hide failed execution | Capture the final run and have relevance/coverage judged |
| Mapping a criterion to "no test, reasoned exception" | Gate 5.1 counts it as unmapped: an excuse is not a test | Test it where its surface lives, or send it back to phase 4 as out of scope or not yet specified |
| Carrying a review finding that biases the phase 2 metric or a guardrail to phase 6 | Instrumentation that reads wrong is a gate 5.3 failure; phase 7 would judge the bet on it | Fix it in this phase, or fail the gate and say why |
| No baseline before starting | Pre-existing failures become indistinguishable from new ones | Record and paste the baseline first |
| Layer-first decomposition | Nothing is falsifiable until the last layer lands | Tracer bullets, end to end |
| A slice mapping to no acceptance criterion | It is not in the spec | Remove it, or amend the spec deliberately |
| Writing tests after the code | Tests what the code does, not what the spec required | Test first, watch it fail |
| Skipping "watch it fail" | A test that never failed proves nothing | Run it red before writing code |
| Review on standards only | Approves a well-built misunderstanding | Check built behavior against each criterion |
| Instrumentation "verified" by reading the code | The property is null and nobody finds out until phase 7 | Trigger it and confirm arrival |
| Building the easy out-of-scope item while in there | Gate 5.4 fails, and the timeline quietly moved | Remove it, or log the promotion as an override |
| Implicit blocking edges | Discovered mid-build, costs a day each | Write them as a list |
| Writing code before the plan is accepted | The first reviewable artifact becomes the diff, when changing course is expensive | Plan reading only, get it accepted, then build |
| A plan only its author can follow | The completeness test fails; review has nothing to check against | Name files, order, risks and tests until someone else could build from it |
| Fixing the plan only at the end | Gate 5.7 has nothing honest to compare | Update the plan in the same change as the deviation |
| Changing an assertion to turn a test green | The loop stops checking the code it was built to check | Fix the code; change a wrong test only as its own visible step |
| Twelve findings of equal weight | The Important one drowns in nits | Important first, five nits at most, the rest counted |
| The building context approving its own work | The verdict inherits the assumptions that produced the code | Review in a fresh context, or reread the diff from scratch |
Another build toolchain
Where a plan-then-test-then-review toolchain is present in this session, it may run loop steps 1 to 4; the criterion-to-test mapping, the scope-creep check and the instrumentation verification stay with the skill's procedure.
Closing checks
The steps the build track skips (gate 5 says which) and the startup path runs before gate 5. Numbers follow the procedure in SKILL.md.
- Look at what was built (gates 5.9, 5.12). Capture the six states of the primary flow (only empty and error on the change track) at the widest and the narrowest width the ICP uses, with
ui.capture, and compare each with the chosen version and the tokens. A difference is fixed, or recorded in the design with its reason. Then a craft critique from a fresh context (a separate agent given only the design, the voice, the captures and the reference screens; inline, a person who did not build it) against the interface details, on the eight aspects of gate 5.12; each finding is fixed or recorded. Each message in the design's Messages is sent to a test inbox or phone and captured under**Messages received:**. On the change track, steps 8 to 10c run only for whatSPEC.md→**Touches:**calls in (gate 5, Change track). Done when## Interface reviewhas an image or route per state and width, and## Craft critiqueevery aspect with what happened. - Check security and speed (gates 5.13, 5.14). A fresh context with the diff, the threat model and
TECH.mdreviews gate 5.13's five areas; findings are fixed or recorded. Then measure every budget in the spec's quality bar on the built product throughrun-check, and fix what is over. Done when## Security reviewhas every area with what happened, and## Performancehas every budget measured and met. 10b. Put it in the person's hands (gate 5.17) per production setup step 7, recorded under## Triedwith their words quoted. Done when every finding is fixed or recorded. 10c. Show it working (gate 5.15, feature demo) on the build the person's findings left. Done when## Demohas its test, its passing run and its recording.
Build Plan Templatereferences/build-plan-template.md
The output contract for phase 5. Copy the headings, bold field labels and tables exactly; the gate script parses them. Two files: PLAN.md is the plan, read before every slice and kept under its cap (gate E.3); LOG.md is what the build recorded, appended as it happens and read when something is looked up. Gate 5 reads both. On the change track the plan is CHANGE.md → Plan.
.builderos/initiatives/{initiative}/PLAN.md:
# Build: {feature}
## Plan
**In plain words:** {what gets built, in what order, what the owner can try after each slice, the riskiest step; no jargon}
**Accepted:** {who} · {ISO timestamp with Z or an offset, before the first code change}
**Branch:** {the branch the build happens on, and the pull request once open}
## Seams
| Module | New or changed | Interface | Hides | Tests at | In plain words |
| {name} | new / changed | {what callers ask, what it promises, how it fails} | {what stays inside} | {the seam the tests cross} | {one line a non-engineer follows} |
## Test baseline
**Run:** {project-relative evidence/runs/*.json captured before any change}
{passing, failing, duration}
## Pre-existing failures
| Test | Since |
| {name exactly as the baseline log prints it} | {before this initiative; TECH.md → Known failing, or the commit} |
{only when the baseline was red; omit otherwise}
## Slices
| # | Slice | Files | Acceptance criteria | Blocks on | Status |
| 1 | {end-to-end description} | {files created or changed} | 1, 4 | none | done |
**Critical path:** {the longest blocking chain, and its length}
**Tickets:** {the folder or tracker the accepted slices were published to, one ticket per slice; or "not published"}
## Risks
| Risk | Mitigation |
| {what can break, the riskiest step, the limit that applies} | {how the plan handles it} |
## Rejected alternatives
| Alternative | Why not |
## Acceptance criteria to tests
| # | Criterion | Test | Result |
| 1 | {from SPEC.md} | {literal or backticked test file path, optionally followed by the test name} | pass |
| 2 | {a criterion a break would not damage} | by hand: {screenshot or video file, or its https link} | pass |
.builderos/initiatives/{initiative}/LOG.md:
# Build log: {feature}
## Test output
**Run:** {project-relative evidence/runs/*.json from the final run}
**Mapped run:** {only when the baseline was red: a captured run of the mapped tests alone, exiting 0}
{captured runner output; command, exit status and log are resolved from the record}
## Instrumentation
| Event | Triggered by | Arrived | Properties verified | Evidence |
| {event} | {action} | yes | {list} | `[tag]` |
## Eval results
**Run:** {project-relative captured eval run JSON}
**Results:** {project-relative JSON array of unique {id, pass: boolean} entries covering the dataset}
{only for model-output specs: dataset/result hashes bound in the run, pass rate, must-pass results, prompt/model versions and rubric}
## Interface review
**Widths:** {the widest and the narrowest the ICP uses, in pixels: 1280 and 390}
| State | Screenshot or route | Matches the chosen direction |
| empty | {images at both widths, project- or initiative-relative, or the route to open} | yes / no, {what differs} |
| loading | {} | {} |
| partial | {} | {} |
| error | {} | {} |
| success | {} | {} |
| permission | {or "not applicable, {why}" when the flow has no such state} | {} |
**Messages received:** {when SPEC.md → Design → Messages has rows: each message sent by the built product to a test inbox or phone, with its capture file; omit otherwise}
{A "no" is fixed, or recorded in SPEC.md → Design as a deviation and then yes. The change track reviews empty and error at one width. Without an interface: **Interface review:** not applicable, {reason}}
## Craft critique
**Run by:** {a separate agent given only SPEC.md → Design, the voice adjectives, the captures and the reference screens; or a person who did not build it}
| Aspect | Finding | What happened |
| Hierarchy | {what draws the eye first, and whether it should; or "none found"} | {fixed, or recorded in SPEC.md → Design} |
| Spacing rhythm | {} | {} |
| Typography | {} | {} |
| Copy against the voice | {} | {} |
| Focus states | {} | {} |
| Motion and reduced motion | {} | {} |
| Interaction states | {hover, pressed, focus-visible, disabled, loading on every control; feedback within 100 ms; per interface-details.md} | {} |
| Next to the references | {per reference screen, where the built screen falls short on the detail it was chosen for} | {} |
## Demo
**Test:** {the end-to-end test that walks the flow, a project-relative path}
**Run:** {project-relative evidence/runs/e2e-demo-*.json from run-check: the run that was filmed, exiting 0}
**Recorded by:** {only on the floor: the person who recorded the screen}
| Flow | Recording | Shows |
| {primary flow, as named in SPEC.md → Design} | {the https link where the person opens it (pull request, artifact); a local copy only under the git-ignored .builderos/media/{initiative}/} | {the steps and the outcome a viewer sees, with the length} |
| First day | {product track} | {} |
{With step screenshots instead of a video: the files in order, and why no video. Without an interface: **Demo:** not applicable, {reason}. Per feature-demo}
## Security review
**Run by:** {a separate agent given the diff, the spec's threat model and TECH.md; or a person who did not build it}
| Area | Finding | What happened |
| Access control | {every endpoint that takes an id checks the owner; or "none found"} | {fixed, or recorded with the reason} |
| Input handling | {} | {} |
| Secrets and configuration | {} | {} |
| Abuse limits | {} | {} |
| Data exposure | {errors, logs and responses carrying personal data or internals} | {} |
{Skipped when the spec's threat model is not applicable}
## Performance
| Measure | Budget | Measured | Within budget | Evidence |
| {primary action, p95} | {from the spec's quality bar} | {number} | yes | {evidence/runs/*.json from run-check, or a data tag} |
| {largest contentful paint at the narrowest width; with an interface} | {2.5 s} | {} | {} | {} |
{Skipped when the spec's quality bar says performance does not apply}
## Reports
### {slice number and name}
**Did:** {what now works, in the person's words: no gate numbers, no module names}
**How:** {one line a non-engineer follows; each choice made alone as "Decided: X, because Y"}
**Try:** {the preview URL, a screenshot file, or the `Run` command and where to click}
**Seen:** {a screenshot or 30-second video of it working in the running app, or the pull request carrying it; "nothing to see: {why}" for a migration or a refactor}
**Next:** {the slice that follows, and what the person will be able to open after it}
**Need from you:** {a decision, an account, a look; "nothing" when nothing}
{Gate 5.18: one report per slice marked done in PLAN.md → Slices, sent to the person when the slice closes and kept here. A slice with nothing to open (a migration, a refactor) shows the test run or the screen it leaves unchanged.}
## Tried
**Link:** {the preview URL, or the `Run` command from TECH.md → Verify}
**Tried by:** {the person who will accept the work, and the date; never the agent}
| What they tried | What they found | What happened |
|---|---|---|
| {the primary flow; the first day on a new product; the edge this build touched} | {what they said, in their words} | {fixed, or recorded in SPEC.md → Design with why} |
{Gate 5.17. Skipped with the interface review when there is no interface. Production itself is in TECH.md → Environments (gate 5.16, `release-ops` (production)).}
## Scope check
| Out-of-scope item (phase 4) | Built? | Note |
## Review findings
| Finding | Axis | Severity | Resolution |
{Important findings all resolved; at most five nits, the rest as a count}
## Deviations from spec
{anything built differently, with the reason and whether the spec was amended; deviations from the plan are recorded in the plan itself}
## Retro
**Environment:** {what slowed or misled the agent during the build, and the pointer, check or convention changed for it, per `retro`}Demo Methodreferences/demo-method.md
Read the section a step of delivery-discipline (demo) needs. Runner names below are examples of what ui.record resolves to, never requirements: use what the project already runs before adding anything.
The walk as a test
The flow table in SPEC.md → Design is the script. Each row becomes one step of the test, in order, and the Mermaid flowchart names the happy path from entry to the success exit. A step acts the way the user does and then asserts what the user sees:
| Flow row | Test step |
|---|---|
| 1 · opens the weekly report · shows this week's deals | go to /reports, expect the heading "This week" and at least one deal row |
| 2 · clicks Export · builds the file | click the button named "Export", expect the toast "Your file is ready" |
| 3 · opens the file · the CSV downloads | expect a download named deals-2026-w43.csv |
Locate by what the user reads (role and visible label), so the test breaks when the screen breaks and survives a class rename. Wait on what the user waits on (a heading, a toast, a row), never on a fixed delay, so the run is fast headless and steady on camera.
The branches in the flowchart (empty account, error, permission) are covered by the regular tests of phase 5; the demo films the path the person will use most, plus the first day on the product track.
Data a customer would recognize
Seed the account the test uses with records from the product's world: the company names, amounts, dates and statuses from PRODUCT.md → Language and the ICP. Synthetic, and never copied from a real customer: a video travels further than a database. A reviewer watching should recognize their own work in it.
Watchable settings
| Setting | Default | Why |
|---|---|---|
| Viewport | the ICP's main width from SPEC.md → Design → Widths, 1280×720 for desktop, 390×844 for a phone-first product | The viewer sees the screen their users see |
| Pace | 300 to 600 ms between actions, a 1 s hold on each outcome | Long enough to read, short enough to watch to the end |
| Captions | one line per step, the user's action in the product's words | The video explains itself without a voice-over |
| Pointer | visible, moving to each target | The viewer follows where the action happens |
| Length | under a minute per flow | A demo longer than that is several flows |
| Switch | one environment variable or script, demo | The guardrail runs the same test without video, at full speed |
Examples of the switch per runner: in Playwright, a demo project in the config with use: { video: 'on', viewport, launchOptions: { slowMo: 400 } }, or browser.newContext({ recordVideo: { dir, size } }) for one test; in Cypress, video: true with a slower defaultCommandTimeout only under the demo config; in a browser the host drives, its own recording. The script "demo": "DEMO=1 {the e2e command} {the flow's test}" goes into TECH.md → **Demo:**.
A caption can be injected by the test itself before each step: an element fixed at the bottom of the page, the step's sentence as its text, removed at the end. Keep it out of the product's code.
The ladder
- The runner's video. The test runner records the browser context it drives. The file it writes is the recording; rename it after the flow.
- A browser the host drives, recorded. Where the host can open and record a browser but the project has no runner yet, walk the same steps there and keep the assertions as checks the agent makes on each screen.
- A screenshot per step from the same run. No video, but the same proof: one still after each assertion, numbered in order (
1-report.png,2-exported.png), in the same git-ignored folder. The table lists them in order and says why there is no video. - The person records the screen. The test runs (or the person walks the flow) while their screen recorder runs;
**Recorded by:**names them. The test still exists and passes in the guardrail.
Every rung ends in a real file or link. A description of what the video would show is the gap, said as a gap.
Where the file lives
Outside the codebase. A video in the repository makes every clone heavier forever and turns a review into a binary diff, so the repository holds the link and the script that records it, never the file. The run writes to .builderos/media/{initiative}/{flow}.webm, a folder listed in .gitignore; gate 5.15 fails a recording git would commit. From there it goes where the person opens it: attached to the pull request (a GIF of the first seconds plays inline), an artifact, or the CI run's saved files with a retention long enough for the outcome review. The table holds that https:// link, and the local path while the file is only on this machine.
A minute at 1280×720 is usually a few megabytes; a larger file means a longer flow, so shorten it or lower the size.
Watching it before anyone else
Extract a still per step (a frame every second with a video tool where shell.exec resolved, or the runner's step screenshots) and look at each against the flowchart node and the chosen direction. The frequent faults: the first frame is a blank page, a spinner holds through the caption, a toast vanishes before it is readable, the seed data shows "Lorem", the window is the wrong width. Each is fixed in the test or the product, then the flow is recorded again.
Worked example
## Demo
**Test:** `test/e2e/export-week.spec.ts`
**Run:** .builderos/initiatives/csv-export/evidence/runs/e2e-demo-2026-10-24T10-12-03Z.json
| Flow | Recording | Shows |
|------|-----------|-------|
| Export the week | https://github.com/acme/app/pull/48 (attached; local copy .builderos/media/csv-export/export-the-week.webm) | the report with 14 deals, Export, the toast, the file in downloads (38 s) |TECH.md → **Demo:** pnpm demo -- test/e2e/export-week.spec.ts (records into .builderos/media/csv-export/, git-ignored).
In phase 6 the release notes carry the link under **Demo:**, and the message asking for exposure authorization opens with it.
Feature Demoreferences/feature-demo.md
A green test suite tells an engineer the feature works; a video shows everyone else. This mode turns the end-to-end test of a flow into a recording of it: the test walks the flow the way the user does, checks what the user sees at every step, and the run that passes is the one that is filmed. A video only exists of a walk that worked, so the person accepting the build, the reviewer of the pull request and the reader of the release notes all see the same proof.
Mode. Standalone records the flow the person names on the running product and hands over the file. In the lifecycle it runs in phase 5 after the person has tried the build (delivery-discipline, step 10c), writes PLAN.md → ## Demo, and gate 5.15 checks it; phase 6 shows the same recording to whoever authorizes exposure and links it in the release notes. Both per operating modes. Read the demo method for the test shape, the recording settings with examples per runner, captions, the ladder in detail and a worked example.
Procedure
- Read the flows.
SPEC.md→ Design →## Flows: each flow's steps table and its Mermaid flowchart, the chosen direction and its widths; the spec's acceptance criteria;TECH.md→ Verify, Quality checks and**Demo:**when a previous initiative left the recording command there; how the product starts locally. Done when you can name the flows to record, the command that starts the product, and the test runner in use. - Choose what to record. The primary flow, always. On the product track also
### First day, from the first visit to the first useful outcome, because activation is decided there. On the change track the flow of the screen that changed. Standalone, the flow the person asked for. Done when each recording has a flow fromSPEC.md→ Design or from the request. - Write the walk as a test, or extend the end-to-end test the guardrail already runs on the primary flow (gate 5.10). One test step per step of the flow table, following the flowchart's happy path from entry to the success exit; each step acts the way the user does (by visible label and role) and asserts what the user sees afterwards. Seed data that reads like the product's real users, in
PRODUCT.md→ Language: names, amounts and dates a customer would recognize. Done when the test passes headless and every node on the happy path has its step and its assertion. - Make it watchable. Record at the width the ICP uses most (from
SPEC.md→ Design → Widths), pace the actions so each outcome stays on screen long enough to read, show a caption per step naming the user's action in the product's words, and keep the pointer visible. Recording runs on demand behind one switch, so the guardrail stays fast. Done when one command records, and every step has its caption. - Record through
ui.record, down the ladder: the runner's own video; a browser the host drives, recorded; a screenshot per step from the same run; the person recording the screen while the test or they walk the flow (**Recorded by:**). Run it throughrun-checkwith the labele2e-demo, so the recording comes with a captured passing run. Recordings stay out of the codebase: save to.builderos/media/{initiative}/{flow}.webm(or.mp4), a folder in.gitignore(add the line if it is missing), then put the file where the person opens it (attached to the pull request, an artifact, the CI run's saved files) and record its link. Done when every flow has a git-ignored file or a link, from a passing run or a named person. - Watch it before anyone else does. Look at the frames step by step (extracted stills, or the runner's screenshots) against the flowchart and the chosen direction: each step visible, each caption true, the outcome on screen at the end, nothing that belongs to a test (placeholder text, an empty account, a debug overlay). A wrong frame is fixed in the product or the test, and the flow recorded again. Without a way to see frames, the person watches it and says what they saw. Done when every step of every recording has been seen and matches.
- Record and hand it on. Write
## DemoinPLAN.mdper the build-plan template:**Test:**,**Run:**, and a table (Flow / Recording / Shows). Put the recording command inTECH.md→**Demo:**, so the next initiative records with one line. The pull request carries the link. Done when gate 5.15 passes on the file.
Watch for
| Do | Instead of |
|---|---|
| Film the run that passed, with its capture | A screen recording of a walk nobody asserted |
| One step per row of the flow, an assertion after each | A test that clicks through and checks only the last page |
| Data a customer would recognize | "Test User", "foo", an empty account |
| A caption naming the user's action | A silent video the viewer has to decode |
| Recording behind a switch | Slowing every CI run with video |
| Look at the frames, then show it | Sending a recording of a spinner |
Capabilities
| Capability | Used for | Floor if absent |
|---|---|---|
shell.exec | Starting the product, running the test through run-check | Write the test and the command; the person runs it and records the screen (**Recorded by:**) |
ui.record | The video of the walk | A screenshot per step from the same run (ui.capture); then the person's screen recording |
ui.capture | Stills to check each step | The person watches and says what they saw |
repo.read | The existing end-to-end tests, fixtures and seed data | Ask how the product starts and where its tests live |
files.read / files.write | SPEC.md → Design, the build plan, the recording, TECH.md | Inline answers need no write; lifecycle writes require it |
Output Contract
## DEMO RECORDED with each flow, its recording (path or link), what it shows, the test that walks it and the passing run, or who recorded it on the floor. The lifecycle artifact is PLAN.md → ## Demo; gate 5.15 parses **Test:**, **Run:** or **Recorded by:** and the table.
Ticketsreferences/tickets.md
How a plan, a spec or a conversation becomes tickets: tracer-bullet slices that each declare the tickets that block them, small enough that a fresh session (or a parallel one) can take one and finish it. Used by phase 5, step 3 and step 4, and by to-tickets. Adapted from Pocock's to-tickets (MIT).
1. Gather
Work from the plan, the spec or the conversation; fetch any reference passed in and read its full body. Explore the code the work touches where repo.read resolved, using the terms in PRODUCT.md → Language and respecting the ADRs in the area. Look for a prefactor: make the change easy, then make the easy change. A prefactor is the first ticket.
2. Slice
- Each slice cuts a narrow but complete path through every layer the behavior needs (schema, API, interface, tests): vertical, never one layer at a time.
- A finished slice is demoable or verifiable on its own, against acceptance criteria named by number.
- Each slice fits one fresh session.
- Each slice lists the tickets that block it; one with no blocker can start now.
Wide refactors are the exception. One mechanical change whose blast radius crosses the codebase (renaming a column, retyping a shared symbol) breaks thousands of call sites at once, so no vertical slice can land green. Sequence it expand–contract: expand (add the new form beside the old, nothing breaks), migrate the call sites in batches sized by blast radius (per package, per directory), each batch its own ticket blocked by the expand and green on its own because the old form still exists, then contract (delete the old form) in a ticket blocked by every batch. When even the batches cannot stay green alone, keep the sequence on one integration branch and promise green only at a final integrate-and-verify ticket.
3. Quiz the person
Present the breakdown as a numbered list: per ticket its title, what it blocks on, and what it delivers end to end. Then one pressure-testing round, with your recommendation on each:
- Is the granularity right, or too coarse or too fine?
- Does each ticket depend only on tickets that really gate it?
- Should any be merged or split?
Iterate until the person approves the breakdown. In phase 5 this happens before the plan is accepted, and the accepted plan's slices are these tickets.
4. Publish
One ticket per file, numbered in dependency order (blockers first): .builderos/initiatives/{initiative}/tickets/NN-{slug}.md in an initiative, .builderos/tickets/{slug}/NN-{slug}.md outside one, or the destination the person named. Where tickets.write resolved and the person wants the tracker, publish one issue per ticket in the same order, using the tracker's native blocking links and parent issue, and write each link into its file. Leave any parent issue unchanged.
# NN: {ticket title}
**What to build:** {the end-to-end behavior this ticket makes work, from the user's side, not a list per layer}
**Acceptance criteria:** {the spec's criteria by number, or the checks for this ticket}
**Blocked by:** {numbers and titles of the tickets that gate it, or none}
**Status:** ready
- [ ] {criterion or check}Leave file paths and code out of tickets: they go stale. The exception is a snippet from a prototype that states a decision more exactly than prose (a state machine, a schema, a type), trimmed to the decision.
Work the frontier: any ticket whose blockers are all done. A purely linear chain is worked top to bottom.
Called by name
Asked for directly (to-tickets), slice and quiz on what the person passed or on the conversation, then publish: inside an initiative the slices are the build plan's, the quiz comes before the plan's acceptance and the tickets go to .builderos/initiatives/{initiative}/tickets/; elsewhere to .builderos/tickets/{slug}/, the tracker, or the destination the person named. Report ## TICKETS PUBLISHED with where they went, the frontier and the critical path.
skills/delivery-discipline/SKILL.mdView on GitHub