You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add structured spec discovery step to proposal instruction
Replace vague "Check openspec/specs/ for existing spec names" with a
concrete CLI-based discovery step using `openspec list --specs --json --detail`.
This gives the AI a repeatable workflow for identifying New vs Modified
capabilities before writing the Capabilities section, with a graceful
fallback for environments where --detail is not yet available.
Closes#901
Copy file name to clipboardExpand all lines: schemas/spec-driven/schema.yaml
+4-3Lines changed: 4 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -13,12 +13,13 @@ artifacts:
13
13
- **Why**: 1-2 sentences on the problem or opportunity. What problem does this solve? Why now?
14
14
- **What Changes**: Bullet list of changes. Be specific about new capabilities, modifications, or removals. Mark breaking changes with **BREAKING**.
15
15
- **Capabilities**: Identify which specs will be created or modified:
16
-
- **New Capabilities**: List capabilities being introduced. Each becomes a new `specs/<name>/spec.md`. Use kebab-case names (e.g., `user-auth`, `data-export`).
17
-
- **Modified Capabilities**: List existing capabilities whose REQUIREMENTS are changing. Only include if spec-level behavior changes (not just implementation details). Each needs a delta spec file. Check `openspec/specs/` for existing spec names. Leave empty if no requirement changes.
16
+
- Before filling this in, discover existing specs by running `openspec list --specs --json --detail`. Review each spec's `overview` to understand what it covers. If `--detail` is unavailable, browse `openspec/specs/` and read each spec's Purpose section instead.
17
+
- **New Capabilities**: List capabilities being introduced that don't overlap with any existing spec. Each becomes a new `specs/<name>/spec.md`. Use kebab-case names (e.g., `user-auth`, `data-export`).
18
+
- **Modified Capabilities**: List existing capabilities whose REQUIREMENTS are changing. Only include if spec-level behavior changes (not just implementation details). Each needs a delta spec file. Use the `id` from the catalog output above. Leave empty if no requirement changes.
18
19
- **Impact**: Affected code, APIs, dependencies, or systems.
19
20
20
21
IMPORTANT: The Capabilities section is critical. It creates the contract between
21
-
proposal and specs phases. Research existing specs before filling this in.
22
+
proposal and specs phases. Always run spec discovery before filling this in.
22
23
Each capability listed here will need a corresponding spec file.
23
24
24
25
Keep it concise (1-2 pages). Focus on the "why" not the "how" -
- **proposal.md**: Ask user about the change if not clear. Fill in Why, What Changes, Capabilities, Impact.
103
+
- Before writing Capabilities, run \`openspec list --specs --json --detail\` to discover existing specs. Compare each spec's overview against the proposed change to determine New vs Modified capabilities.
103
104
- The Capabilities section is critical - each capability listed will need a spec file.
104
105
- **specs/<capability>/spec.md**: Create one spec per capability listed in the proposal's Capabilities section (use the capability name, not the change name).
105
106
- **design.md**: Document technical decisions, architecture, and implementation approach.
@@ -217,8 +218,9 @@ The artifact types and their purpose depend on the schema. Use the \`instruction
- **proposal.md**: Ask user about the change if not clear. Fill in Why, What Changes, Capabilities, Impact.
223
+
- Before writing Capabilities, run \`openspec list --specs --json --detail\` to discover existing specs. Compare each spec's overview against the proposed change to determine New vs Modified capabilities.
222
224
- The Capabilities section is critical - each capability listed will need a spec file.
223
225
- **specs/<capability>/spec.md**: Create one spec per capability listed in the proposal's Capabilities section (use the capability name, not the change name).
224
226
- **design.md**: Document technical decisions, architecture, and implementation approach.
0 commit comments