spec-writing
- Run by agents
- product-writerrelease-managerspec-writerux-architect
- Reached from commands
- /builder-os:bos-shape
At a glance
Mode. Standalone writes the requested scope, numbered assertions and relevant states from the supplied requirements, current behavior and constraints, marking unknown facts and owner decisions; a draft authorizes no implementation. The lifecycle runs every step, writes SPEC.md and gate 4. Both per operating modes. Step 5 calls the other design skills; a standalone spec loads only those it needs, tracking-standards for events. Two further modes, each with its own procedure and marker: synthesis, a spec from the conversation with no interview (synthesis, to-spec by name), and communication, release notes, updates, exec summaries and memos (product communication). Read the section of spec methods behind the step you are on.
- 1Read
BRIEF.md→ Bet and Definition - 2State what exists today
- 3Write the impact on what exists
- 4Bound the scope
- 5Shape it with the person
- 6Write the stories, then the acceptance criteria
- 7Enumerate states and edge cases
- 8Write the quality bar
- 9Design the tracking plan before the build
- 10Write the eval set
- 11List the constraint conflicts
- 12Write, gate and get it accepted
The skill
Phase 4 makes the chosen bet buildable by someone who was not in the conversation, and measurable three months later.
Mode. Standalone writes the requested scope, numbered assertions and relevant states from the supplied requirements, current behavior and constraints, marking unknown facts and owner decisions; a draft authorizes no implementation. The lifecycle runs every step, writes SPEC.md and gate 4. Both per operating modes. Step 5 calls the other design skills; a standalone spec loads only those it needs, tracking-standards for events. Two further modes, each with its own procedure and marker: synthesis, a spec from the conversation with no interview (synthesis, to-spec by name), and communication, release notes, updates, exec summaries and memos (product communication). Read the section of spec methods behind the step you are on.
Procedure
Read
BRIEF.md→ Bet and Definition: the selected bet with its primary user action, the kill criteria, the success metric with its baseline; a missing bet stops the phase. Change track: the mandate inCHANGE.md→ Request is the bet, and the spec its Spec part; there is no phase 2 metric (step 7 runs only for a guardrail event), and a choice between solutions found while writing upgrades the work to feature (lifecycle-setup, the ratchet). Done when the bet, its primary action and the metric (or the mandate) are in front of you.State what exists today in the area the bet touches, from the code where
repo.readresolved, from the person otherwise.TECH.md,DOMAIN.mdand thePRODUCT.mdconstraints bound the spec; contradicting one means naming it and why. Done when current behavior is written and every constraint that bounds it is named.Write the impact on what exists (gate 4.11), one row each: existing data (shape, backfill or default, rows a new rule breaks, counted with
db.query), contracts (APIs, webhooks, exports, integrations others consume), tracking events, permissions (who sees the change), current users (default on or off, what moves, how they hear). "Nothing to do" with its reason counts; with nothing built yet,**Impact on what exists:** not applicable, {reason}; a change writes only the rows it touches, and current users. Done when every row it owes has a handling.Bound the scope. In scope, then out of scope as not now, not ever by design, or not until X, including the boundary someone will argue with. A boundary someone could draw elsewhere is a round question; the rest you write. An undecided in-scope question goes under Not yet specified with who decides it and which criteria wait on it. On the change track write
**Touches:**: what the change touches (interface, copy, data, personal data, permissions, money, messages, contracts, stack, or none of these), each explained in parentheses; it decides which of steps 5 to 11 apply (gate 4, Change track). Done when the out-of-scope list is non-empty (gate 4.2) and every contested boundary has the owner's answer.Shape it with the person, in this order; each sub-step asks the person, and where this phase runs delegated the delegate returns the round and the main conversation asks it:
- Flows.
ux-architecturewrites information architecture, flows, per-step states, the component inventory and the accessibility floor intoSPEC.md→ Design; every flow traces to the phase 3 primary action. On the product track one flow is the first day, and the spec's**Activation:**names its criterion and event (gate 4.17). - A real user, on a clickable prototype (product track, gate 4.13), before anything costly rests on the concept:
ux-architecture(direction) builds one self-contained HTML file walking the primary flow with real words, and the person runs one session with someone from the ICP per spec methods, notes saved withscripts/bos.mjs evidence add --class interview --id P{n}under## Real userswith**Willingness to pay:**(4.14) and**Channel result:**(4.22) once the channel test returned. A concept that fails here goes back to phase 3. - The domain.
domain-model: entities, transitions with who and guard, invariants, awkward scenarios, rules put to the person, a logic prototype when the rules are non-trivial, the data sketch (gate 4.10). - The agent (model output, gate 4.16).
agent-design: autonomy per action, hand-off, injection surfaces with must-pass cases, degradation, the latency budget. - The look.
ux-architecture(direction) on the primary flow: reference screens, rendered versions, a choice in rounds (gate 4.9); the kit waits for the stack. - The stack.
system-design(stack): inherited layers read from the repository, a decision card per open layer, ADRs for the hard-to-reverse ones,TECH.md→ Stack, the spec's## Stack(gate 4.8); then back toux-architecture(direction) for the kit. - The system.
system-design: components, contracts, external calls planned for failure, the scale defaults, the capacity, and a threat model whose mitigations are criteria (gates 4.18, 4.19).
Build track: the prototype picked at the solution stop is the source: Design points at it and writes only what a screen cannot show (data, rules, integrations, failures, who may do what); 5.3 to 5.7 are drafted and asked together at the build stop (depth).
Done when
SPEC.md→ Design carries the flows, the domain model and the visual direction, the spec carries## Stack,## Architectureand## Threat model, and on the product track## Real usersrecords a session that happened or the override with its reason.- Flows.
Write the stories, then the acceptance criteria. Numbered stories ("As a {actor}, I want {capability}, so that {benefit}") for every actor and flow. Then one criterion per requirement, numbered for phase 5, each tracing to a story: a subject that exists in the product, a verb with an observable outcome, and the condition under which it is checked (gate 4.1). Name the test seams: the highest points to test the behavior from, existing ones first, few, each with its criteria. Done when every story has a criterion and every criterion survives the adjective test and has a seam.
Enumerate states and edge cases. Six states per flow: empty, loading, partial, error, success, permission (gate 4.3 needs empty and error). Edge cases: zero/one/many/too many, concurrency, interruption, hostile input. Done when every case has a behavior, or a deliberate "undefined".
Write the quality bar (gate 4.12): permissions (who sees and does what; what someone outside the role gets), personal data (what is stored, who reads it, retention, deletion), performance (a budget with a number on the primary action, measured at gate 5.14), each as numbered criteria or "not applicable" with why; accessibility, end-to-end and secrets belong to the guardrail (5.10). Then
## Maintainability(4.23). Done when all four are answered.Design the tracking plan before the build (gate 4.4): work backwards from the phase 2 metric to the events and properties that compute it, check each against the catalogue via
tracking-standards, new or existing. Done when the plan shows how its events produce the number.Write the eval set when a criterion depends on model output, before the build and before the prompt: declare
**Model output:** yesand write at least 20 cases (10 in lite mode) with a threshold, a judge and must-pass cases, including one per injection surface (gate 4.6); synthetic cases are labeled synthetic. Done when the dataset file exists, or the spec declares no model output.List the constraint conflicts (gate 4.7): each requirement against the
PRODUCT.mdandTECH.mdconstraints, every collision with who decides it and the criteria it blocks, or none colliding. Conflicts close with their owner before acceptance, or travel as blocking edges into phase 5. Done when## Conflictsis written.Write, gate and get it accepted. Write
SPEC.md→ Spec per the spec template, headings and labels exact, and confirm the Design part exists. Write## What we chosein plain words, one row per choice as the template shows, opening with the rules that will surprise someone. Run gate 4. On a pass, present that summary first, then the spec, and ask for acceptance (a technical reviewer joins for a high-risk change); record it with the person's answer (scripts/bos.mjs record 4 --judged "{judge-id}=pass|fail,..." --accepted-by "who"where commands run). Done when gate 4 is recorded with the person's acceptance.
Watch for
| Do | Instead of |
|---|---|
| An undecided in-scope question under Not yet specified | Filing it out of scope, where the implementer answers it silently |
| Strike the adjectives; keep what is verifiable | An adjective doing the work in a criterion |
| Six states per flow | Happy-path states only |
| Declare model output and write the eval set with a threshold | "The summary is accurate" as a criterion |
| Ask, and record acceptance with the person's answer | Recording gate 4 because it passed |
More in spec methods.
Capabilities
| Capability | Used for | Floor if absent |
|---|---|---|
repo.read | What exists, what the current flows do, what is already instrumented | Ask the person to describe the current behavior; mark the spec as written without code access |
analytics.events | Which of the planned events already exist | Read the instrumentation from source; where there is no source, design from scratch and note it |
docs.search | Prior specs, design decisions, constraints already agreed | Ask |
tickets.read | Bugs and requests that bound the scope | Skip |
ui.render | The clickable prototype a real user walks (step 5.2) | Self-contained HTML the person opens and shares |
files.read / files.write | Previous artifacts, this artifact, state | Required |
Phase 4 needs no data capability. Without repo.read "what exists today" is thinner; the phase still runs.
Output Contract
## SPEC COMPLETE with the scope boundaries, the conflicts, the domain rules, the agent's behavior when a model acts, the stack, the architecture, the threat model and the visual direction with who chose them, the numbered acceptance criteria, the quality bar, the real-user session (product track), the state coverage, the tracking plan, the gate result and who accepted. The lifecycle artifact is SPEC.md per the spec template; gate 4 parses its headings, bold labels and tables.
References
Read only when a step needs them, so they cost no context until then.
PM Artifactsreferences/pm-artifacts.md
Product communication for a named reader: each type has a reader, a length and one default failure it falls into unless checked. Release notes, stakeholder updates, executive summaries, decision memos and PRDs.
Mode. Standalone by default, from supplied requirements and sources; inside an initiative the numbers carry their lifecycle tags. Both per operating modes. Load the section of templates and guidelines for the requested type: audience, tone, length, structure and template.
Procedure
- Determine the artifact type. PRD ("write a PRD", "spec this feature"); release notes ("write release notes", a version shipping); stakeholder update ("status update"); executive summary ("exec summary", "board update"); decision memo. Done when the type and its reader are named.
- Gather context. The feature or period, plus any prior output: a diagnosis, a growth analysis, a discovery synthesis, a spec. Carry their numbers with their tags; a metric a prior artifact marks unavailable stays unavailable here. Done when every number you will use has its source.
- Write to the template. The person's structure and length constraints come first; inapplicable sections are left out, and material omissions are explained. Done when every section of the template is written or its omission is stated.
- Check the type's default failure in the table below. Done when the check for this type passes.
- Deliver to the requested destination: inline text, the requested file, or the connected document, verified once saved. A long-form file with an ambiguous destination is clarified before writing, while drafting continues. Done when the artifact is at its destination.
Default failures
| Artifact | Default failure | Check |
|---|---|---|
| PRD | Success metrics with no baseline | Every metric has a baseline or an explicit unavailable |
| PRD | Requirements no one can test | Each requirement names an observable result; "intuitive" and "fast" become numbers |
| PRD | Scope with no boundary | An out-of-scope section, even when it feels obvious |
| Release notes | Written for the engineer who built it | Benefit first, in the user's words |
| Stakeholder update | No ask | What is needed, from whom, by when |
| Executive summary | Longer than a page | The numbers and the decision, on one page |
Capabilities
| Capability | Used for | Floor when absent |
|---|---|---|
files.read / files.write | Reading context, writing the artifact | Use only when the requested destination is a local file |
repo.read | README, changelog, git history, the feature's own code | Ask the person for the context |
docs.search / docs.read | Prior artifacts, project context, decision records | Ask |
docs.write | Publishing the artifact where the team reads it | Use for a requested connected document; if unavailable, report the destination blocker and provide a draft |
analytics.query / db.query | Baselines for the success metrics section | Write the metric with its baseline marked unavailable and the shape that would fill it |
The requested destination defines delivery. An inline PRD is delivered in chat; a Google Doc request is delivered to that document when the capability resolves; a requested file is saved at that path. Deliver there and only there. For lifecycle artifacts, keep the canonical artifact available to the initiative, using a resolving pointer or a copy only within the agreed contract.
Output Contract
Ends with ## ARTIFACT WRITTEN, in this shape:
## ARTIFACT WRITTEN
**Type:** {PRD / release notes / stakeholder update / executive summary}
**Delivered via:** {inline / verified path / connected document link}
**Unavailable inputs:** {any metric or baseline left unfilled, with the question that would fill it}
---
{the artifact}PM artifact templatesreferences/pm-templates.md
Load only the section for the requested artifact type. User structure and length constraints take precedence.
Artifact Quick Reference
| Artifact | Audience | Tone | Length | Key Principle |
|---|---|---|---|---|
| PRD | Engineering + Design | Precise, technical | 2-5 pages | Every requirement is testable |
| Release Notes | Customers | Friendly, benefit-focused | 0.5-1 page | Benefits, not features |
| Stakeholder Update | Internal leadership | Direct, data-driven | 1 page | Status + asks |
| Executive Summary | C-suite / Board | Strategic, concise | 0.5 page | Numbers + narrative |
PRD Guidelines
Structure: Problem → Solution → User Stories → Requirements → Metrics → Timeline Every requirement must be:
- Testable (can write acceptance criteria)
- Scoped (clear boundary of what's included/excluded)
- Prioritized (Must have / Should have / Nice to have)
Anti-patterns:
- "Intuitive UX" → What specific behavior? What does the user see?
- "Fast performance" → What latency target? How measured?
- "Similar to {competitor}" → Describe the specific behavior
Release Notes Guidelines
Structure: Highlights → Improvements → Bug Fixes → Coming Soon Tone rules:
- Lead with WHY it matters, not WHAT changed
- "You can now export reports as PDF" not "Added PDF export functionality"
- No internal jargon, no ticket numbers
- Use emojis sparingly for section headers only
Stakeholder Update Guidelines
Structure: TL;DR → Progress Table → Metrics → Decisions Needed → Next Period Rules:
- TL;DR must be readable in 10 seconds
- Use traffic lights (🟢🟡🔴) for status
- If you need a decision, state the options and your recommendation
- Metrics always show trend (vs. last period)
Executive Summary Guidelines
Structure: One-Liner → Key Numbers → Working/Not Working → Ask → Outlook Rules:
- Must fit on one screen (no scrolling)
- Lead with the single most important thing
- Numbers always contextualized (vs. target, vs. last period)
- If there's an ask, be specific about what you need
Templates
PRD
# PRD: {feature}
**Author:** {name} · **Date:** {today} · **Status:** Draft · **Target:** {release}
## Problem Statement
**Who** has this problem: {specific persona}
**What** the problem is: {observable behavior or pain}
**Evidence:** {numbers with their tags, or the note that it is unvalidated}
**Cost of not solving:** {what continues to happen}
## Proposed Solution
### Overview
{1-2 paragraphs}
### User Stories
| # | As a… | I want to… | So that… | Priority |
### Detailed Requirements
**Requirement:** {what it must do}
**Acceptance criteria:**
- [ ] {specific, testable}
**Edge cases:**
- {case}: {expected behavior}
### Out of Scope
{explicit. Ambiguity here becomes scope creep later}
## Success Metrics
| Metric | Baseline (tag) | Target | How it will be measured |
| {output} | | | |
| {input} | | | |
| {guardrail} | | Must not degrade | |
## Technical Considerations
Dependencies · risks · data requirements (new events, schema changes)
## Timeline
| Phase | Scope | Duration | Owner |
## Open Questions
{questions that need answering before or during the build}A PRD with no baseline in its success metrics cannot be evaluated after launch. Where the baseline is unavailable, write it as unavailable with the shape that would establish it, and treat establishing it as part of the work.
Release Notes
# Release Notes: {version or date}
## Highlights
### {feature}
{1-2 sentences on what it does and why it matters to the reader. Benefit, not implementation.}
## Improvements
- **{area}:** {what changed and why it is better}
## Bug Fixes
- Fixed {issue} that affected {who}
## Coming Soon
- {preview}Tone: writing to a colleague, not filing a changelog. No jargon, no internal component names, no ticket numbers.
Stakeholder Update
# {product} Update: {date}
## TL;DR
{what happened, what is next, any blocker. Two sentences.}
## Progress
| Area | Status | Detail |
| {area} | On track / At risk / Blocked | {detail, and the mitigation or the ask} |
## Key Metrics
| Metric | Last period | This period | Trend |
## Decisions Needed
1. **{decision}:** {context, options, your recommendation}
## Next Period
1. {priority}An update with no ask is a broadcast. If something is needed, it goes in Decisions Needed with a recommendation attached.
Executive Summary
# {product} Executive Summary: {period}
## One-Liner
{where we are, one sentence}
## Key Numbers
| Metric | Value | vs. target | vs. last period |
## What's Working
{2-3 points, each with a number}
## What Needs Attention
{2-3 points, each with a number and a proposed action}
## Strategic Ask
{what is needed from leadership, or "none this period"}
## 90-Day Outlook
{where this lands if the current trajectory holds}Half a page. An executive summary that runs to two pages was not summarized.
Spec Methodsreferences/spec-methods.md
The forms, examples and tables behind each lifecycle step of spec-writing. Read only the section the current step needs.
Scope Boundaries
Gate 4.2 fails an empty out-of-scope list, because an empty one means the scope was never bounded, only described.
Three kinds of boundary, all worth writing:
| Boundary | Form | Why it matters |
|---|---|---|
| Not now | "Bulk editing is out of scope for this release" | The common case. Protects the timeline |
| Not ever, by design | "We will not support offline editing; the conflict model would cost more than the feature is worth" | Prevents the same argument every quarter |
| Not until X | "Multi-workspace support waits until a second workspace exists in production" | Names the trigger rather than the date |
Write the boundary that someone will argue with. An out-of-scope list containing only things nobody wanted is not a boundary, it is padding.
Out of scope is not the same as not yet specified. Out of scope lies beyond what this release is for: it never comes back unless the bet changes. Not yet specified lies inside the scope and is simply not decided yet: how a limit is enforced, which of two error behaviors applies. Filing an open question under out of scope quietly drops it; leaving it unfiled hands the decision to whoever implements it. Each open question goes under Not yet specified with who decides it and which acceptance criteria wait on it, so phase 5 can build the slices that do not.
Impact on What Exists
New products have users only after they ship; a change to a live product has them before it starts. The questions that bite are about the state that predates the change, and none of them show up in a flow diagram.
Example, for "a deal can now be marked on hold" in a CRM report:
| Area | Today | What changes | Handling |
|---|---|---|---|
| Existing data | 41,200 deals, status open/won/lost [data:db:deal_status_counts] | new status on_hold | no backfill; existing deals keep their status |
| Contracts | the CSV export lists status as free text; two customers parse it [doc:support-export-parsers] | a fourth value appears | announce in the changelog a week before; value is lowercase like the others |
| Tracking events | deal_status_changed with to property | to gains on_hold | the win-rate dashboard filters to in (won, lost): unchanged, checked |
| Permissions | reps change their own deals, managers any in the team | same | on hold follows the same rule |
| Current users | managers read open pipeline weekly | on-hold deals leave the open total | default: counted separately under the total; release note says so |
A row that says "nothing to do" still names why. "Current users" is the row most often wrong: a total that silently changes is a bug report on Monday.
Constraint Conflicts
The constraints in PRODUCT.md (regulatory, distribution, resource) and in TECH.md (technical constraints, conventions) apply while the spec is written, not when someone notices them in review. Most of the time the spec can satisfy all of them. Sometimes two cannot hold at once: "every export of personal data is audited" against "no new table without an ADR", when the audit log needs a table.
A conflict found here costs a conversation with whoever owns the constraint. The same conflict found in phase 5 is resolved silently, in code, by whoever hit it. So the spec names it:
| Constraint A | Constraint B | Why both cannot hold | Decides | Blocks |
|---|---|---|---|---|
| {source and rule} | {source and rule} | {the specific collision} | {the person who owns the call} | {AC numbers waiting, or "none"} |
Gate 4.7 requires the ## Conflicts section, and a name under Decides for every row. When none exist, the section says which constraints were checked and that none collide; an absent section means nobody looked. Close conflicts with their owner before asking for the spec's acceptance, or carry them as blocking edges into phase 5 exactly like the Not yet specified table.
Acceptance Criteria
Gate 4.1: every criterion is a testable assertion. The mechanical check is a subject plus a verifiable verb, with no adjective doing the work.
| Not testable | Testable |
|---|---|
| "The import should be fast" | "A 10,000-row file finishes importing within 30 seconds on the standard plan" |
| "Errors are handled gracefully" | "A malformed row is skipped, counted, and reported in the summary; the remaining rows still import" |
| "The UX should be intuitive" | "A user who has never imported completes the flow without opening help, in usability testing with 5 participants" |
| "Data is secure" | "A user cannot read a record belonging to another workspace through any documented endpoint" |
The adjective test: strike every adjective from the criterion. If nothing verifiable remains, it was not a criterion.
Each criterion needs a subject that exists in the product, a verb that produces an observable outcome, and a condition under which it is checked. Anything else is a hope, and phase 5 will map a test to it and discover there is nothing to assert.
State and Edge-Case Enumeration
Gate 4.3 requires an error state and an empty state for every flow. Those two are the enumerated minimum, not the complete set. The full set per screen or step:
| State | The question it answers |
|---|---|
| Empty | What does a new user see before anything exists? |
| Loading | What is shown while waiting, and for how long before that changes? |
| Partial | What if some of it worked? Half-imported, some permissions, stale cache |
| Error | What broke, whose fault, what do they do now? |
| Success | What confirms it worked, and what is the next action? |
| Permission | What does someone without access see? Not a blank screen |
Partial is the state teams skip and the one that generates support tickets. Any operation over a collection has a partial state by construction.
Edge cases worth enumerating
Work these four categories against each flow; they cover most of what ships broken:
- Zero, one, many, too many. Empty collection, single item, normal, and the volume that breaks the page.
- Concurrency. Two people acting at once, the same person in two tabs, an action arriving after a state change.
- Interrupted. The user closes the tab mid-flow, the connection drops, the token expires halfway.
- Hostile or malformed input. Not only security: a spreadsheet with merged cells, an emoji in a name field, a 50MB file.
Each enumerated case gets an expected behavior in the spec. "Undefined" is an acceptable answer only when written down as a deliberate choice.
Tracking Before Build
Gate 4.4: the tracking plan names the events that will measure the phase 2 success metric. Designed now, not after launch, because instrumentation added afterwards cannot measure the launch.
Per the phase 2 metric, work backwards: which events, with which properties, would compute this number? Then check each against what already exists via tracking-standards. The output is a table the implementer can build from, and the input to gate 5.3 and gate 6.3.
A spec whose tracking plan cannot compute the phase 2 metric has failed to connect the build to the reason for building it, and phase 7 will have nothing to evaluate.
Model Output: Eval Set
When any acceptance criterion depends on what a model generates (a summary, a classification, a reply, a voice agent's turn), a single exact-output assertion may be insufficient. Deterministic properties and rubric-scored pass/fail cases still apply, with repeated trials when variability matters. Such a spec declares **Model output:** yes and carries an eval set, which gate 4.6 checks.
| Part | Rule |
|---|---|
| Cases | At least 20 inputs (10 in lite mode), drawn from real inputs where any exist ([doc:*] or [data:*] tagged), else written to cover the edge-case categories above. At least a quarter are failure-prone: ambiguous, adversarial, out of domain |
| Expected | Per case, what a correct output must contain or must not contain. Not a reference answer to match word for word |
| Judge | How each case is scored: a deterministic check (contains, parses, classifies as), a rubric a person applies, or a grader model with its rubric written out. Name which, per case or for the set |
| Threshold | The pass rate the build must reach, and any case that must pass on its own (a safety or compliance case never averages out) |
| Guardrail in production | Which share of live outputs is sampled and scored after release, by whom, how often. Phase 6 measures it next to the success metric |
The eval set is an actual file, not a prose case count. The spec names **Dataset:** {project-relative path} and **Threshold:** {percentage}. Use JSON or JSONL with unique id, input, expected, optional judge, and boolean must_pass, or the Markdown table supported by gate 4.6. Synthetic cases are labeled; unavailable real inputs are never invented as observations. A compatible JSON case is:
{"id":"ambiguous-01","input":"Cancel the old booking","expected":"Ask which booking; do not cancel yet","judge":"rubric: clarification before irreversible action","must_pass":true}The dataset lives in the initiative's evals/ directory or the repository's existing location; the spec points at it. It is the acceptance criterion for the model's behavior, so it is written before the prompt, not tuned after it.
Real-User Session
Product track, gate 4.13, before the build. One session with a person from the ICP walking the clickable version: does the problem land, does the concept make sense, where do they stick on the primary action. Write for the person running it:
- The recruiting message: who, why them, how long, what they get.
- The script: the problem first, in their words; then the prototype; then silence while they try. Questions about the last time it happened, never about what they would do.
- The note template: what they did, where they stuck, what they said unprompted, what changed in the spec because of it.
Notes come back pasted or as a file and are saved with scripts/bos.mjs evidence add --class interview --id P{n}. On a product for sale the same session shows the price (gate 4.14): a pre-order, a letter of intent or a click on a price is willingness to pay; praise is not. When nobody from the ICP can be reached this week, the spec says what the build is betting on without the session, and the person may override with that reason; the section records only sessions that happened.
More Common Mistakes
| Mistake | Why it fails | Correct |
|---|---|---|
| Empty out-of-scope list | Gate 4.2 fails; scope was described, not bounded | Write the boundary someone will argue with |
| Unnumbered acceptance criteria | Phase 5 maps tests by number | Number them |
| Tracking designed after the build | Cannot measure the launch it was meant to measure | Work backwards from the phase 2 metric, before building |
| Open questions with no owner | They resolve themselves badly, at implementation time | Who decides, by when |
| Specifying a flow the bet did not choose | Scope creep before a line is written | Every flow traces to the phase 3 primary action |
| Two constraints that cannot both hold, left for the build | The implementer picks one silently | Write the conflict with who decides; gate 4.7 |
| A tracking plan that cannot compute the success metric | Gate 4.4 fails; phase 7 has nothing to evaluate | State explicitly how the events produce the number |
Spec Templatereferences/spec-template.md
The output contract for .builderos/initiatives/{initiative}/SPEC.md → Spec. Gate 4 parses its section headings, bold labels and tables; keep them exactly. Standalone specs follow the requested format instead.
# Spec: {feature}
## The bet
{from BRIEF.md → Bet: the primary user action, the kill criteria}
## Today
{current behavior in the area this changes, with file references where code was read}
## In scope
{what this release does}
## Out of scope
| Item | Kind | Reason |
| {item} | not now / not ever / not until X | {reason, or the trigger} |
## Impact on what exists
| Area | Today | What changes | Handling |
|------|-------|--------------|----------|
| Existing data | {rows and fields already there, with counts where measured} | {new field, new rule, new state} | {backfill, default, migration; or "nothing to do: {why}"} |
| Contracts | {APIs, webhooks, exports, integrations consumed by others} | {} | {versioning, notice, unchanged} |
| Tracking events | {events in this area today} | {added, renamed, redefined} | {who reads them; dashboards and baselines affected} |
| Permissions | {roles, plans, tenants that see this area} | {} | {} |
| Current users | {what they do today} | {what moves, appears or disappears for them} | {default on/off, how they are told} |
{Or, when nothing exists yet: **Impact on what exists:** not applicable, {reason}}
## Not yet specified
| Open question | Decides | Blocks |
| {in-scope question still open} | {person} | {AC numbers that wait on it, or "none"} |
## Conflicts
| Constraint A | Constraint B | Why both cannot hold | Decides | Blocks |
| {source and rule} | {source and rule} | {collision} | {person} | {AC numbers, or "none"} |
{or: "Checked {constraints}; none collide."}
## Flows
{reference to SPEC.md → Design, with the flow list and where each is specified}
**Activation:** {product track: the acceptance criterion that marks the first useful outcome of the first day, and the tracking-plan event that measures it (gate 4.17)}
## Stack
**Drivers:** {three to five, each with its source}
| Layer | Choice | Status | Decided by | ADR |
| {layer} | {choice} | inherited / decided / not needed | {person, or "-"} | {decisions/ADR-NNN-slug.md, or "-"} |
## Architecture
{written by system-design, gate 4.18; or **Architecture:** not applicable, {reason} when there is no server, no stored data and no input from other people}
### Components
| Component | Responsibility | Owns | Talks to |
| {name} | {one line} | {entities} | {component: call / event / shared table} |
### Contracts
| Contract | Shapes | Errors | Lists |
| {endpoint, webhook, event, export} | {input → output} | {codes} | {page size and cursor, or "not a list"} |
### External calls
| Call | Timeout | Retry | Idempotency | When it fails |
| {provider: operation} | {seconds} | {attempts with backoff, or "none: not safe to repeat"} | {the key, or "read only"} | {what the user sees} |
### Scale defaults
| Default | How | Not applicable because |
| Owner key on every row | {} | {} |
| Paginated lists | {} | {} |
| Indexed queries | {} | {} |
| Idempotent writes | {} | {} |
| Slow work off the request | {} | {} |
| Reversible migrations | {} | {} |
**Capacity:** {expected load at this stage, tagged} · designed for {ten times that}
## Threat model
{written by system-design, gate 4.19; or **Threat model:** not applicable, {reason}}
**Boundaries:** {each trust boundary in one line}
| Boundary | Threat | Mitigation | Criterion |
| {boundary} | {another user's or customer's data / untrusted input / abuse / secrets, then the rest that apply} | {mitigation} | {acceptance criterion number, or "not applicable, {reason}"} |
## What we chose
| Choice | What | Why | Set aside | Cost | We'd change it if |
| {stack layer, architecture trade-off, visual direction or design kit} | {choice} | {one line} | {main alternative} | {money, time or upkeep} | {condition} |
## User stories
1. As a {actor}, I want {capability}, so that {benefit}
{A long numbered list covering every actor and every flow in scope; each acceptance criterion below traces to at least one story}
## Acceptance criteria
| # | Criterion | Flow |
| 1 | {subject + verifiable verb + condition} | {flow} |
## Test seams
| Seam | What is tested there | Exists today |
| {the highest point the behavior can be tested from: an API, a module interface, the UI} | {criteria by number} | {yes, or new} |
{Prefer existing seams and as few as possible; phase 5 plans its tests at these}
## Maintainability
**Structure:** {the modules this work adds or changes and their paths in backticks, following `TECH.md` → Map; or not applicable, why}
**Simple to change:** {what is likely to change (a rule, a provider, a price, a screen) and the one place it lives}
**Dependencies:** {each new library or service and why it beats writing it or the alternative compared; or none new}
{Phase 5 reviews the diff against this section (5.19)}
## Quality bar
| Area | Criteria | Not applicable because |
|------|----------|------------------------|
| Permissions | {AC numbers: who can see and do what, and what a user outside the role gets} | {or why it does not apply} |
| Personal data | {AC numbers: what is stored, who reads it, retention, deletion} | {} |
| Performance | {AC numbers: the budget with a number on the primary action (and the page load with an interface), measured at gate 5.14} | {} |
{Accessibility, end-to-end, dependencies, secrets, static analysis and the token check are automatic checks in the guardrail (TECH.md → Quality checks), not criteria here.}
## Real users
{product track: the session where a person from the ICP walked the problem, the concept or the clickable prototype; what they did, where they stuck, what changed; each with its `[interview:Pn]`, `[doc:...]` or `[data:...]` tag. Other tracks: omit.}
**Willingness to pay:** {product for sale: what a person from the ICP did when shown the price, tagged (gate 4.14)}
**Channel result:** {product track: what the phase 3 channel test returned against its thresholds, tagged (gate 4.22, go-to-market)}
## States
| Flow / step | Empty | Loading | Partial | Error | Success | Permission |
## Edge cases
| Case | Category | Expected behavior |
**Model output:** {yes | no}
## Eval set
**Dataset:** {project-relative existing eval file}
**Threshold:** {percentage}
**Judge:** {case or dataset scoring rubric}
{only when model output is yes; actual cases carry must_pass flags, one must-pass case per injection surface; production sampling when relevant}
## Agent behavior
{only when model output is yes; written by agent-design, gate 4.16}
| Action | Autonomy | Why | Criterion |
|--------|----------|-----|-----------|
| {action} | does / proposes / asks / never | {reversibility, blast radius, the person's answer} | {AC number; required for asks} |
**Hand-off:** {trigger, to whom, what context travels, what the user sees meanwhile}
**Degradation:** {slow: …; down: …; wrong: …}
**Latency budget:** {first token and complete answer at p95, per turn}
### Injection surfaces
| Surface | What could arrive | Mitigation | Eval case |
|---------|-------------------|------------|-----------|
| {input someone else can write} | {the attack} | {mitigations} | {must-pass case id in the dataset} |
## Tracking plan
| Event | Trigger | Properties | Measures | New or existing |
**Computes the phase 2 metric:** {how the named events produce that number}
## Open questions
{decisions deferred, each with who decides and by when}Synthesis: a spec from what was already discussedreferences/synthesis.md
Read this when the person asks to turn the conversation into a spec (by name, to-spec). The spec is written from the conversation and the code; the one question is the test seams.
- Gather. The conversation, every artifact and file it referenced,
TECH.md,DOMAIN.mdand the decisions in the area; explore the code the change touches whererepo.readresolved. Use the product's terms fromPRODUCT.md→ Language. Done when every statement the spec will make has a place in the conversation or the code it came from. - Propose the test seams. The highest points the behavior can be tested from, existing ones first, as few as possible. Check them with the person in one question; this is the only question. Done when they said yes or picked other seams.
- Write the spec template sections the material supports: problem and solution from the user's side, a long list of user stories, scope and out of scope, numbered acceptance criteria, states, test seams, and the decisions made (modules, interfaces, schema, contracts) described without file paths or code. A gap goes under Not yet specified with who decides it. Done when every user story maps to a criterion and every gap is named.
- Deliver to the requested destination: a file, a document, or the person's tracker through
tickets.write. In a lifecycle initiative it becomesSPEC.mdand gate 4 runs on it like any spec: what the conversation never settled shows up as failed conditions, and the lifecycle steps in spec-writing close them. Done when the spec is at its destination.
Report ## SPEC DRAFTED with the destination, the number of user stories and criteria, the seams the person confirmed, and the open points.
skills/spec-writing/SKILL.mdView on GitHub