Repeat until BOTH proposal and specs are complete.
0. Inspect status
Run:
openspec status --change --json
Parse the JSON to determine, for artifacts proposal and specs:
- whether each is
ready vs complete - whether
specs is blocked by missing proposal
If the JSON schema is unclear, show the JSON and ask the user what the status fields mean; do not guess.
1. Blocked behavior
If specs is blocked by missing proposal, create proposal first (even if specs looks ready).
1.5 Brainstorming prelude (proposal inputs)
If proposal is ready (and not complete), do a short clarification pass BEFORE writing files:
- Follow
skills/superspec-brainstorm/SKILL.md as a subroutine. - Do NOT run
openspec during brainstorming. - Do NOT write or modify any files during brainstorming.
- Keep a "Brainstorming Notes" block as working notes.
Exit brainstorming when:
- You have concrete bullets for intent, background, in-scope, out-of-scope, constraints, affected specs, and success criteria.
- Affected Specs names are decided (kebab-case), because they drive
specs//spec.md.
Then proceed to create/update proposal.md using OpenSpec instructions, using the notes to fill the template precisely.
If you believe you already know all the answers, you still MUST produce the "Brainstorming Notes" block before writing proposal.md.
2. Create/Update proposal
If proposal is ready (and not complete):
- Run:
- openspec instructions proposal --change --json
- From the JSON, extract at minimum:
- outputPath (where to write)
- template and/or instruction content
- Write the proposal content to the concrete
outputPath (typically proposal.md).
If outputPath is not a concrete file path (unexpected), STOP and show the full JSON.
Proposal must be concise and must include a filled "Affected Specs" section (it drives specs file creation).
After writing, print:
3. Create/Update specs
If specs is ready (and not complete):
- Run:
- openspec instructions specs --change --json
- Read dependencies from the JSON (e.g.,
requires) and ensure proposal exists; if not, go create proposal. - Treat
outputPath patterns like specs/**/spec.md as a hint ONLY. Do not write wildcard paths. - Determine concrete spec files from the proposal "Affected Specs".
Create one delta spec per affected capability (new/modified/removed), at:
Each delta spec MUST:
- Be a delta (changes only), structured into:
- ## ADDED Requirements
- ## MODIFIED Requirements
- ## REMOVED Requirements
- Use normative language per requirement (MUST/SHALL).
- For every ADDED/MODIFIED/REMOVED requirement, include Given/When/Then scenarios:
- at least one happy path (if applicable)
- at least one edge/failure case
- every #### Scenario: MUST include a ##### Test Obligation block with: Type (unit|integration|e2e), Test File, Test Name, Verify Command, Expected (RED), and Key Assertions. If any field is missing, ask the user; do not guess.
After writing, print:
4. Re-check
After creating proposal or specs, re-run:
openspec status --change --json
Stop the loop only when both artifacts show complete.