Brainstorming Requirements And Backlog
Close requirements, compile a retained architecture and specification pair, project the delivery backlog, and retain the execution plan
$requirements-phase is the only route from bounded requirements to a delivery-depth backlog and its execution plan. It runs five steps in a fixed order:
$requirements-grillcloses the decisions.$create-architecturecompilesARCHITECTURE.md.$create-speccompilesSPEC.md.$write-backlogprojects the delivery backlog.$create-planwrites and retainsPLAN.md.
The phase is explicit-only: a human must invoke it, or Full Delivery starts it for a missing or stale pair, backlog projection, or plan. Finder is optional context. When you supply a Fog, a Finder child, a Research or Prototype child, or a durable Finder handoff, the phase loads only that exact Fog graph. It creates no Fog, Finder artifact, or Grilling provider item.
- Use this when: scope, terms, acceptance signals, technical decisions, or testing decisions still need closure before delivery.
- It gives you: one Requirements result. It names the retained
ARCHITECTURE.md,SPEC.md, andPLAN.md, their exact identities and verified immutable blob URLs, the$write-backlogresult, and the exact residual delta. - It does not require: a Fog, a prior Finder run, an existing Story, or a fixed count of grill children, specifications, Stories, or Tasks.
Before The Phase: Brainstorm
$brainstorm is an optional front end. Use it when you ask the agent to brainstorm a system, shape, or architecture. It is a proposal loop: the agent proposes, you steer. It asks no question rounds; question rounds belong to $requirements-grill.
Every turn carries, in order: the current shape, two or three alternatives with their tradeoffs, an evidence anchor or explicit unknown for each claim, each open decision as a fork with a default ("I take X unless you steer"), one $show-me view of the current shape, and a closing invitation to react. The agent can run $flow-lenses on its own shapes and show each finding as a tradeoff.
Brainstorm has exactly two exits: another turn when you steer, or $requirements-grill with the Brainstorm Brief when you are ready to settle requirements. It edits no code, writes no plan, creates no branch, commit, or worktree, and starts no implementation agent. Implementation starts only on your explicit go.
The Brainstorm Brief is its only durable write: <wiki-root>/content/docs/project/grilling/<topic>-brainstorm-brief.md, with a grilling/meta.json entry. It holds the bounded system and operators, the chosen shape, rejected shapes with reasons, your preferences quoted verbatim, open forks with defaults, and evidence anchors. The agent updates it after every turn that accepts or rejects a shape or records a preference. The grill imports it before its first round.
Skills In The Chain
| Skill | Role in this flow | Invocation | Pack |
|---|---|---|---|
$requirements-phase | Orchestrator. Owns decision closure, compile order, and projection authority. | Explicit only | requirements |
$brainstorm | Optional proposal loop before the phase; writes the Brainstorm Brief. | Model | requirements |
$requirements-grill | Altitude-routed interview: grill log, status, and glossary. | Model | requirements |
$grilling | Round scheduler inside the grill. | Model | planning |
$flow-lenses | Ten Flow Lenses over one bounded flow; returns candidate gaps with Altitude. | Model | requirements |
$domain-modeling | Glossary terms, relationships, and axioms. | Model | requirements |
$codebase-design | Module, interface, and seam vocabulary for L3 Modules questions. | Model | quality |
$show-me | Smallest visual view beside a textual conclusion. | Model | misc |
$wait-what | Repitches a question or term that did not land. | Model | misc |
$wayfinder | Recommends one route for one precise unknown. | Model | planning |
$parallel-research | Runs Wayfinder's research route as readonly lanes. | Model | research |
$prototype | Runs Wayfinder's prototype route as a throwaway artifact. | Model | research |
$create-architecture | Compiles ARCHITECTURE.md. | Model | planning |
$create-spec | Compiles SPEC.md without an interview. | Model | planning |
$write-backlog | Sole provider writer: reconcile, preview, write, read back. | Model | requirements |
$create-plan | Writes and retains PLAN.md from the pair and the Write Backlog result. | Model | planning |
All these packs are default packs. $flow-lenses is an internal skill: its callers are the grill checkpoint, $create-architecture step 3, and $brainstorm. It only examines and reports; the caller owns every question and every durable write. See Skill Packs.
Runtime Graph
Each compiler returns one atomic result. A failed step writes no partial artifact and the chain does not advance.
1. Enter Or Resume
The phase completes entry when the direct scope is bounded, or when the supplied Finder context resolves to one exact graph.
Then it reads the matching grill status before the log. It summarizes accepted, rejected, superseded, parked, and unresolved branches. When no matching status exists, it starts a bounded grill.
2. Close Decisions With Requirements Grill
$requirements-grill runs the interview while material decisions stay open: with the human when standalone, and by Autonomous Decisions inside AFK delivery-phase (Inside AFK Delivery). Research recommendations are evidence, not decisions. The step is complete when every material branch is settled at its Target Altitude or explicitly parked.
Altitude Ladder
The grill is a Durable Workflow Graph. Each question and each round has one Altitude:
| Altitude | The grill decides |
|---|---|
| L1 Outcome | Users, flows, scope, observable behavior, states, copy, non-goals. |
| L2 Shape | Deployables, boundaries, state ownership and authority, contracts between parts, data lifecycle, external dependencies. |
| L3 Modules | Exact primitives and libraries, module names and interfaces, seams and adapters, dependency direction, type and schema shapes, file layout, resource lifetime owner. |
Planning stays with $create-plan: no grill question asks edit order, task breakdown, waves, estimates, or tuning constants.
Each branch has one Target Altitude and one Settled Altitude. The Target Altitude is L3 for a code-bearing branch and L1 for a product-only branch. A branch becomes code-bearing when an accepted answer names or changes code, a schema, a contract, configuration, or a runtime path. A Target Altitude only rises; less depth needs a user park at a named Altitude (inside AFK delivery-phase, an out-of-bounds Autonomous Decision park). The Settled Altitude is the deepest level at which every question of the branch is answered or parked.
One round asks questions at exactly one Altitude: the shallowest Altitude with a ready question in any branch. Branches descend independently. The Brainstorm Brief, a Finder Fog, the log, or code evidence can settle a level; the branch then starts at the next level. No module detail stays an unasked default: L3 questions decide it, and a default is pinned only after the user authorizes auto-pinning, with its Altitude recorded. Inside AFK delivery-phase, the delivery run is the authorization.
Graph Gates
A router loads on every entry and cold resume, recomputes the route from the status file, the log, the Brief, and the current message, and selects exactly one gate:
groundfinds facts through subagents and never asks the user. Before the first round it imports the Brainstorm Brief: preferences and the accepted shape become answered entries (Source: Brainstorm Brief) that are never re-asked, rejected shapes become rejected alternatives, and open forks become questions with the Brief default as the recommendation. A changed Brief imports only its delta.groundalso records a compile gap from$create-architecture, gives each branch its Target and Settled Altitude, upgrades an open legacy status, and gives$domain-modelingthe status glossary.roundruns one$grillinground over every ready question at the round Altitude, presented through$wait-whatwith one$show-meview. Each question carries a recommendation; a technical question also states its evidence anchor, code consequence, and one meaningful alternative.$wayfindertakes a question stuck on one precise unknown.checkpointrecords each response set, also a partial one. It runs$domain-modelingand$flow-lenseson the changed decisions; each candidate gap becomes a question at its Altitude. It derives next-level questions for a branch whose working level is settled below its Target Altitude. L3 derivation uses$codebase-designvocabulary, the stack skill that applies (for Effect,$effect-service-design),opensrcfor the exact primitive, and a$show-meinterface sketch.closeasks for shared-understanding confirmation, runs the final$domain-modelingpass, presents the persisted understanding with$show-me, writes wiki synthesis after explicit closure, and hands off to$create-architecture.
Every grill question, confirmation, and correction request is a plain chat message, and the user replies in free text. No gate uses AskUserQuestion, request_user_input, or another structured question tool. Inside AFK delivery-phase, the grill sends the user no message and waits for no reply: Inside AFK Delivery.
Each round records its Required Calls. The next round starts only when the record lists every required round and checkpoint call. The Close Guard passes only when no question is unanswered, every active branch is settled at its Target Altitude or parked at a named Altitude with the user's reason (inside AFK delivery-phase, the decision's evidence), every auto-pinned default records its Altitude, every code-bearing branch is grounded, and every Required Calls record is complete.
The status confirmation moves from pending to confirmed only on explicit user confirmation; inside AFK delivery-phase, only on the confirmation Autonomous Decision. Approval applies to the durable artifacts, not to a visual. Parked branches stay preserved scope.
Inside AFK Delivery
Inside AFK delivery-phase, Requirements Phase and every child skill send the user no question and wait for no reply. Each point that would ask or stop for the user becomes an Autonomous Decision: the agent takes the recommended answer from current evidence, marks it in-bounds or out-of-bounds, logs it, and posts each out-of-bounds decision to the thread at once. No step uses a question tool.
| Point | Inside AFK delivery |
|---|---|
| Round | The agent writes the response set itself: each frontier question takes its recommendation, rechecked against current evidence. |
$wait-what and $show-me lines | They read not due — AFK delivery; no human reads the round. |
| Log entry | Each answer records Source: autonomous decision (in-bounds | out-of-bounds) and an Evidence: line. |
| Park | The reason is the decision's evidence. A park that drops accepted scope, such as less depth than the Target Altitude, is out-of-bounds. |
| Auto-pin | The delivery run authorizes it: Auto-pin: authorized R<N> (AFK delivery). |
$wayfinder | The agent is the decision owner; a prototype verdict comes from the prototype evidence. |
| Confirmation and closure | When the Close Guard passes, the grill confirms and closes in one pass, with the passing Close Guard as evidence. |
| Missing projection boundary | An in-bounds decision: project the accepted specification's scope. |
$create-plan and $write-backlog | Each settles its own questions by its AFK carve-out. |
Only missing access stops the phase for the human: a configured provider that fails, or missing credentials or permissions, returns the blocked backlog delta.
Grill Artifacts
| Artifact | Path | Content |
|---|---|---|
| Brainstorm Brief | apps/wiki/content/docs/project/grilling/<topic>-brainstorm-brief.md | Written by $brainstorm; the grill reads it and never writes it. |
| Grill log | apps/wiki/content/docs/project/grilling/<topic>-grill-log.md | Decision record. Stable Q<N> entries, each with its Altitude: and source; changes add superseding entries. |
| Grill status | apps/wiki/content/docs/project/grilling/<topic>-grill-status.md | Branch Dashboard with Target and Settled Altitude, current round and its Altitude, frontier, Required Calls, Brief import record, confirmation, Technical Grounding, active glossary. |
| Domain glossary | apps/wiki/content/docs/project/domains/<context>-glossary.mdx | Published canonical terms, written only after explicit grill closure. |
In a single-repository project the wiki root is wiki instead of apps/wiki. Other skills, such as $create-spec and $write-backlog, read the canonical glossary in the grill status and route term changes back to the grill.
Where Wayfinder Fits
$wayfinder is nonmutating decision support for one precise unknown that an active workflow already owns. It recommends exactly one route:
grillingwhen a human choice closes the unknown;researchwhen readonly evidence can answer it;prototypewhen learning needs an artifact and a human verdict.
Wayfinder creates no item, changes no provider, and authorizes no projection or delivery. The owning workflow keeps the state and runs the route.
$requirements-grill invokes $wayfinder by name when a question stays open on one precise unknown that neither a user answer nor the fact exploration of $grilling can close. It passes the unknown, its owning branch and question ID, the evidence so far, and the user as decision owner (inside AFK delivery-phase, the agent). Then the grill runs the returned route:
grilling: the next round of this grill.research:$parallel-research.prototype:$prototypeon aprototype/<slug>branch, with the unknown and the owning question as its brief. The human's verdict closes it, and the owning question stays parked until the verdict returns. Inside AFKdelivery-phase, an Autonomous Decision from the prototype evidence is the verdict.
The grill persists the route result against the owning question and resumes the grill at that question.
3. Compile The Architecture
When the user confirms shared understanding (inside AFK delivery-phase, the grill's confirmation Autonomous Decision), the phase invokes $create-architecture with the current grill status and log. $requirements-grill names the same handoff: after explicit closure and wiki synthesis, it hands the durable grill artifacts to $create-architecture, whose retained ARCHITECTURE.md then feeds $create-spec. Architecture comes before every SPEC.md, for fresh, resumed, and local work alike.
$create-architecture:
- Reconciles status, log, glossary, evidence, and learnings.
- Reserves the sibling
SPEC.mdpath without creating it. - Runs
$flow-lenseson the accepted flow and accounts for every lens with evidence, an explicit unknown, or a justified not-applicable result. Candidate gaps stay candidates: each material gap returns to$requirements-grillwith its Altitude. Compilation accepts no new mechanism or guarantee. - Writes
ARCHITECTURE.mdwith stable selectors:ARC-###blocks,FLOW-###flows,FLOW-###-STEP-###steps, and optionalDEC-###decisions. Selectors are never reused or renumbered. Accepted L3 Modules decisions go in the Modules and Interfaces section. - Embeds
$show-meviews inside the document. - Leaves its Spec Traceability map at
pending-spec-ids. - Retains the artifact: a dedicated commit, push, an immutable blob URL pinned to the full commit SHA and path, and a byte readback.
The result is architecture-written with readiness: agent-ready. On any gap, it returns architecture-not-ready, lists all gaps, and keeps the prior canonical artifact. A retention failure also returns architecture-not-ready. Unresolved decisions go back to $requirements-grill, which records each gap as a question at its Altitude and reopens a closed grill.
4. Compile The Specification
After architecture-written, the phase invokes $create-spec with that retained architecture and the same confirmed sources. $create-spec asks no questions and writes no backlog.
It assigns OUT-### outcome codes and AC-### acceptance codes. Each AC-### covers one OUT-###. It then completes the architecture's Spec Traceability map, retains the enriched architecture first, and binds that final immutable identity in SPEC.md. Finally it commits, pushes, and verifies the spec blob URL.
The result is spec-written with both verified immutable URLs. On failure it returns one spec-not-ready result that lists every missing item and its upstream route: finder-phase, parallel-research, prototype-phase, or requirements-phase / requirements-grill. Architecture gaps return to Requirements Phase. Pending mappings or local-only artifacts also give spec-not-ready.
OUT-### codes are traceability only. They imply no provider item identity or count.
Specification Folder
The pair lives in one folder: <specs-root>/<domain>/<folder-name>/ARCHITECTURE.md and SPEC.md. $create-spec resolves the specs root in this order:
apps/wiki/content/docs/project/specsfor a routed project wiki.apps/wiki/specsfor a legacy source wiki.docs/specswhen no wiki planning surface exists.
The folder name is kebab-case, with a ticket prefix such as PROJ-123- when the user names one. A folder that exists for a different capability gives spec-not-ready.
5. Project The Backlog
The phase honors the caller's provider projection boundary. Missing authority returns a blocked backlog delta. The compiled pair stays retained, and no provider write happens. Inside AFK delivery-phase, a missing projection boundary is an in-bounds Autonomous Decision instead: project the accepted specification's scope.
With authority, the phase passes the verified spec blob URL and current provider evidence to $write-backlog. With no prior Finder projection, $write-backlog may reuse, enrich, or create Product Area, Initiative, and Epic placement first. It then derives shippable Stories and atomic, independently ownable Tasks. It never copies OUT-### codes as Story identities.
Before any write, $write-backlog:
- reads the provider fresh and reconciles by stable identity; a title match is discovery only;
- validates the full Task blocker graph with
scripts/validate-task-blocker-graph.mjs, including missing targets, self-edges, duplicate edges, future-milestone blockers, cycles, and oneV*milestone per Story and its Tasks; - previews the topology with
$show-me, then writes structural changes without waiting for a reply.
Any authority, identity, or graph failure produces zero writes. Only exact readback proves success. A partial write failure stops and returns the observed writes and the residual delta.
See the Project Backlog Operating Model for hierarchy and provider mappings.
6. Create The Plan
The phase routes on the Write Backlog result:
- Written: it invokes
$create-planwith the retained pair and that result. Plan tasks mirror the provider Tasks and their blocker graph. - No backlog provider configured: it invokes
$create-planwithtask_identity_mode: planning-only. Plan tasks useTnidentities. - Blocked (missing authority, or a configured provider failed): the phase stops with no plan and returns the exact blocked delta. Inside AFK
delivery-phase, only missing access blocks: a failed provider, or missing credentials or permissions.
$create-plan commits and pushes, or explicitly retains, PLAN.md, then verifies its immutable blob URL against the plan bytes. The phase verifies that URL again before it returns. One plan creates at most one pull request per Touched Repository; split or stack PRs only when the user explicitly asks. See Plan: create-plan and PLAN.md for the plan contents.
Blocked Results
| Result | Cause | Next route |
|---|---|---|
| Open grill branch | A branch is below its Target Altitude, or a material decision is unanswered. | Next $requirements-grill round, or Wayfinder. |
| Required calls missing | A round's Required Calls record lacks a round or checkpoint call. | The grill gate that owns the missing call. |
architecture-not-ready | Missing, unresolved, or unretained architecture input. | Each gap to its owner; decisions to the grill. |
spec-not-ready | Missing evidence, pending mapping, folder collision, or local-only artifact. | The named upstream route. |
| Blocked backlog delta | Missing provider projection authority, or a configured provider failed. | Pair stays retained; no plan. The human restores missing access. Standalone, the human also supplies a missing boundary; inside AFK delivery-phase, an Autonomous Decision supplies it. |
| Zero-write stop | Ambiguous identity, invalid blocker graph, or mutable authority. | Fix the named gap, then rerun projection. |
Terminal Outcome
The phase returns one Requirements result: the retained architecture, specification, and plan, their verified immutable blob URLs, complete Spec Traceability, the $write-backlog result with exact provider identities, and the residual delta. The result is ready for $delivery-phase, which consumes the plan and creates none. See Implementation.
Finder
Optional Business or Functional intake over one resumable Fog workflow that returns control to the human
Design
Take product design work from brand identity through a design system, accepted Compositions, and quality-checked Variant Rounds in the real app to committed Design-Owned UI Code and a delivery brief