Create a complete Spectra change proposal — from requirement to validated artifacts — in a single workflow.
Input: The argument after /spectra-propose is the requirement description. Examples:
/spectra-propose add dark mode
/spectra-propose fix the login page crash
/spectra-propose improve search performance
If no argument is provided, the workflow will extract requirements from conversation context or ask.
Prerequisites: This skill requires the spectra CLI. If any spectra command fails with "command not found" or similar, report the error and STOP.
Steps
Determine the requirement source
a. Argument provided (e.g., "add dark mode") → use it as the requirement description, skip to deriving the change name below.
b. Plan file available:
- Check if the conversation context mentions a plan file path (plan mode system messages include the path like
~/.claude/plans/<name>.md)
- If found, check if the file exists at
~/.claude/plans/
- If a plan file is found, use the AskUserQuestion tool to ask:
- Option 1: Use the plan file
- Option 2: Use conversation context
- If conversation context has no relevant discussion, mention this when presenting the choice
- If the user picks the plan file → read it and extract:
plan_title (H1 heading) → use as requirement description
plan_context (Context section) → use as proposal Why/Motivation content
plan_stages (numbered implementation stages) → use for artifact creation
plan_files (all file paths mentioned) → use for Impact section
- If the user picks conversation context → fall through to (c)
c. Conversation context → attempt to extract requirements from conversation history
- If context is insufficient, use the AskUserQuestion tool to ask what they want to build
From the resolved description, derive a kebab-case change name (e.g., "add dark mode" → add-dark-mode).
IMPORTANT: Do NOT proceed without understanding what the user wants to build.
Classify the change type
Based on the requirement, classify the change into one of three types:
| Type |
When to use |
| Feature |
New functionality, new capabilities |
| Bug Fix |
Fixing existing behavior, resolving errors |
| Refactor |
Architecture improvements, performance optimization, UI adjustments |
This determines the proposal template format in step 5.
Scan existing specs for relevance
Before creating the change, check if any existing specs overlap:
- Use the Glob tool to list all files matching
openspec/specs/*/spec.md
- Extract directory names as the spec identifier list
- Compare against the user's description to identify related specs (max 5 candidates)
- For each candidate (max 3), read the first 10 lines to retrieve the Purpose section
- If related specs are found, display them as an informational summary
IMPORTANT:
- If related specs are found, display them but do NOT stop or ask for confirmation — continue to the next step
- If no related specs are found, silently proceed without mentioning the scan
Create the change directory
spectra new change "<name>" --agent claude
If a change with that name already exists, suggest continuing the existing change instead of creating a new one.
Write the proposal
Get instructions:
spectra instructions proposal --change "<name>" --json
Write the proposal file using the template from instructions, with the following format based on change type:
Feature
## Why
<!-- Why this functionality is needed -->
## What Changes
<!-- What will be different -->
## Capabilities
### New Capabilities
- `<capability-name>`: <brief description>
### Modified Capabilities
(none)
## Impact
- Affected specs: <new or modified capabilities>
- Affected code: <list of affected files>
Bug Fix
## Problem
<!-- Current broken behavior -->
## Root Cause
<!-- Why it happens -->
## Proposed Solution
<!-- How to fix -->
## Success Criteria
<!-- Expected behavior after fix, verifiable conditions -->
## Impact
- Affected code: <list of affected files>
Refactor / Enhancement
## Summary
<!-- One sentence description -->
## Motivation
<!-- Why this is needed -->
## Proposed Solution
<!-- How to do it -->
## Alternatives Considered (optional)
<!-- Other approaches considered and why not -->
## Impact
- Affected specs: <affected capabilities>
- Affected code: <list of affected files>
Get the artifact build order
spectra status --change "<name>" --json
Parse the JSON to get:
applyRequires: array of artifact IDs needed before implementation
artifacts: list of all artifacts with their status and dependencies
Create remaining artifacts in sequence
Loop through artifacts in dependency order (skip proposal since it's already done):
a. For each artifact that is ready (dependencies satisfied):
b. Continue until all applyRequires artifacts are complete
- After creating each artifact, re-run
spectra status --change "<name>" --json
- Check if every artifact ID in
applyRequires has status: "done"
- Stop when all
applyRequires artifacts are done
c. If an artifact requires user input (unclear context):
- Use AskUserQuestion tool to clarify
- Then continue with creation
Analyze-Fix Loop (max 2 iterations)
- Run
spectra analyze <change-name> --json
- Filter findings to Critical and Warning only (ignore Suggestion)
- If no Critical/Warning findings → show "Artifacts look consistent ✓" and proceed
- If Critical/Warning findings exist:
a. Show: "Found N issue(s), fixing... (attempt M/2)"
b. Fix each finding in the affected artifact
c. Re-run
spectra analyze <change-name> --json
d. Repeat up to 2 total iterations
- After 2 attempts, if findings remain:
- Show remaining findings as a summary
- Proceed normally (do NOT block)
Validation
spectra validate "<name>"
If validation fails, fix errors and re-validate.
Show final status and end workflow
Show summary:
- Change name and location
- List of artifacts created
- Validation result
Use AskUserQuestion tool to ask what to do next. This ensures the workflow stops even when auto-accept is enabled. Provide exactly these options:
- First option (will be auto-selected): "Park" — Execute
spectra park "<name>" to park the change, then inform the user they can run /spectra-apply <change-name> when ready (which will auto-unpark).
- Second option: "Apply" — Invoke
/spectra-apply <change-name> to start implementation.
If AskUserQuestion tool is not available, execute spectra park "<name>" and inform the user to run /spectra-apply <change-name> when ready. Then STOP — do not continue.
After the user responds, if they chose "Park", execute spectra park "<name>" and the workflow is OVER. If they chose "Apply", invoke /spectra-apply <change-name> to begin implementation.
Artifact Creation Guidelines
- Follow the
instruction field from spectra instructions for each artifact type
- Read dependency artifacts for context before creating new ones
- Use
template as the structure for your output file - fill in its sections
- IMPORTANT:
context and rules are constraints for YOU, not content for the file
- Do NOT copy
<context>, <rules>, <project_context> blocks into the artifact
- These guide what you write, but should never appear in the output
- Parallel task markers (
[P]): When creating the tasks artifact, first read openspec/config.yaml. If parallel_tasks: true is set, add [P] markers to tasks that can be executed in parallel. Format: - [ ] [P] Task description. A task qualifies for [P] if it targets different files from other pending tasks AND has no dependency on incomplete tasks in the same group. When parallel_tasks is not enabled, do NOT add [P] markers.
Guardrails
- Create ALL artifacts needed for implementation
- Always read dependency artifacts before creating a new one
- If context is critically unclear, ask the user - but prefer making reasonable decisions to keep momentum
- If a change with that name already exists, suggest continuing that change instead
- Verify each artifact file exists after writing before proceeding to next
- NEVER write application code or implement features during this workflow
- NEVER skip the artifact workflow to write code directly
- NEVER reinterpret requirements by ignoring the proposal file
- NEVER invoke
/spectra-apply — this workflow ends after artifact creation. The user decides when to start implementation
- If AskUserQuestion tool is not available, ask the same questions as plain text and wait for the user's response
1---2name: spectra-propose-33description: Create a change proposal with all required artifacts4license: MIT5---67Create a complete Spectra change proposal — from requirement to validated artifacts — in a single workflow.89**Input**: The argument after `/spectra-propose` is the requirement description. Examples:1011- `/spectra-propose add dark mode`12- `/spectra-propose fix the login page crash`13- `/spectra-propose improve search performance`1415If no argument is provided, the workflow will extract requirements from conversation context or ask.1617**Prerequisites**: This skill requires the `spectra` CLI. If any `spectra` command fails with "command not found" or similar, report the error and STOP.1819**Steps**20211. **Determine the requirement source**2223 a. **Argument provided** (e.g., "add dark mode") → use it as the requirement description, skip to deriving the change name below.2425 b. **Plan file available**:26 - Check if the conversation context mentions a plan file path (plan mode system messages include the path like `~/.claude/plans/<name>.md`)27 - If found, check if the file exists at `~/.claude/plans/`28 - If a plan file is found, use the **AskUserQuestion tool** to ask:29 - Option 1: Use the plan file30 - Option 2: Use conversation context31 - If conversation context has no relevant discussion, mention this when presenting the choice32 - If the user picks the plan file → read it and extract:33 - `plan_title` (H1 heading) → use as requirement description34 - `plan_context` (Context section) → use as proposal Why/Motivation content35 - `plan_stages` (numbered implementation stages) → use for artifact creation36 - `plan_files` (all file paths mentioned) → use for Impact section37 - If the user picks conversation context → fall through to (c)3839 c. **Conversation context** → attempt to extract requirements from conversation history40 - If context is insufficient, use the **AskUserQuestion tool** to ask what they want to build4142 From the resolved description, derive a kebab-case change name (e.g., "add dark mode" → `add-dark-mode`).4344 **IMPORTANT**: Do NOT proceed without understanding what the user wants to build.45462. **Classify the change type**4748 Based on the requirement, classify the change into one of three types:4950 | Type | When to use |51 | -------- | ------------------------------------------------------------------- |52 | Feature | New functionality, new capabilities |53 | Bug Fix | Fixing existing behavior, resolving errors |54 | Refactor | Architecture improvements, performance optimization, UI adjustments |5556 This determines the proposal template format in step 5.57583. **Scan existing specs for relevance**5960 Before creating the change, check if any existing specs overlap:61 1. Use the **Glob tool** to list all files matching `openspec/specs/*/spec.md`62 2. Extract directory names as the spec identifier list63 3. Compare against the user's description to identify related specs (max 5 candidates)64 4. For each candidate (max 3), read the first 10 lines to retrieve the Purpose section65 5. If related specs are found, display them as an informational summary6667 **IMPORTANT**:68 - If related specs are found, display them but do NOT stop or ask for confirmation — continue to the next step69 - If no related specs are found, silently proceed without mentioning the scan70714. **Create the change directory**7273 ```bash74 spectra new change "<name>" --agent claude75 ```7677 If a change with that name already exists, suggest continuing the existing change instead of creating a new one.78795. **Write the proposal**8081 Get instructions:8283 ```bash84 spectra instructions proposal --change "<name>" --json85 ```8687 Write the proposal file using the template from instructions, with the following format based on change type:8889 ### Feature9091 ```markdown92 ## Why9394 <!-- Why this functionality is needed -->9596 ## What Changes9798 <!-- What will be different -->99100 ## Capabilities101102 ### New Capabilities103104 - `<capability-name>`: <brief description>105106 ### Modified Capabilities107108 (none)109110 ## Impact111112 - Affected specs: <new or modified capabilities>113 - Affected code: <list of affected files>114 ```115116 ### Bug Fix117118 ```markdown119 ## Problem120121 <!-- Current broken behavior -->122123 ## Root Cause124125 <!-- Why it happens -->126127 ## Proposed Solution128129 <!-- How to fix -->130131 ## Success Criteria132133 <!-- Expected behavior after fix, verifiable conditions -->134135 ## Impact136137 - Affected code: <list of affected files>138 ```139140 ### Refactor / Enhancement141142 ```markdown143 ## Summary144145 <!-- One sentence description -->146147 ## Motivation148149 <!-- Why this is needed -->150151 ## Proposed Solution152153 <!-- How to do it -->154155 ## Alternatives Considered (optional)156157 <!-- Other approaches considered and why not -->158159 ## Impact160161 - Affected specs: <affected capabilities>162 - Affected code: <list of affected files>163 ```1641656. **Get the artifact build order**166167 ```bash168 spectra status --change "<name>" --json169 ```170171 Parse the JSON to get:172 - `applyRequires`: array of artifact IDs needed before implementation173 - `artifacts`: list of all artifacts with their status and dependencies1741757. **Create remaining artifacts in sequence**176177 Loop through artifacts in dependency order (skip proposal since it's already done):178179 a. **For each artifact that is `ready` (dependencies satisfied)**:180 - Get instructions:181 ```bash182 spectra instructions <artifact-id> --change "<name>" --json183 ```184 - The instructions JSON includes:185 - `context`: Project background (constraints for you - do NOT include in output)186 - `rules`: Artifact-specific rules (constraints for you - do NOT include in output)187 - `template`: The structure to use for your output file188 - `instruction`: Schema-specific guidance189 - `outputPath`: Where to write the artifact190 - `dependencies`: Completed artifacts to read for context191 - `locale`: The language to write the artifact in (e.g., "Japanese (日本語)"). If present, you MUST write the artifact content in this language. Exception: spec files (specs/\*_/_.md) MUST always be written in English regardless of locale, because they use normative language (SHALL/MUST).192 - Read any completed dependency files for context193 - Create the artifact file using `template` as the structure194 - Apply `context` and `rules` as constraints - but do NOT copy them into the file195 - Show brief progress: "✓ Created <artifact-id>"196197 b. **Continue until all `applyRequires` artifacts are complete**198 - After creating each artifact, re-run `spectra status --change "<name>" --json`199 - Check if every artifact ID in `applyRequires` has `status: "done"`200 - Stop when all `applyRequires` artifacts are done201202 c. **If an artifact requires user input** (unclear context):203 - Use **AskUserQuestion tool** to clarify204 - Then continue with creation2052068. **Analyze-Fix Loop** (max 2 iterations)207 1. Run `spectra analyze <change-name> --json`208 2. Filter findings to **Critical and Warning only** (ignore Suggestion)209 3. If no Critical/Warning findings → show "Artifacts look consistent ✓" and proceed210 4. If Critical/Warning findings exist:211 a. Show: "Found N issue(s), fixing... (attempt M/2)"212 b. Fix each finding in the affected artifact213 c. Re-run `spectra analyze <change-name> --json`214 d. Repeat up to 2 total iterations215 5. After 2 attempts, if findings remain:216 - Show remaining findings as a summary217 - Proceed normally (do NOT block)2182199. **Validation**220221 ```bash222 spectra validate "<name>"223 ```224225 If validation fails, fix errors and re-validate.22622710. **Show final status and end workflow**228229 Show summary:230 - Change name and location231 - List of artifacts created232 - Validation result233234 Use **AskUserQuestion tool** to ask what to do next. This ensures the workflow stops even when auto-accept is enabled. Provide exactly these options:235 - **First option (will be auto-selected)**: "Park" — Execute `spectra park "<name>"` to park the change, then inform the user they can run `/spectra-apply <change-name>` when ready (which will auto-unpark).236 - **Second option**: "Apply" — Invoke `/spectra-apply <change-name>` to start implementation.237238 If **AskUserQuestion tool** is not available, execute `spectra park "<name>"` and inform the user to run `/spectra-apply <change-name>` when ready. Then STOP — do not continue.239240 **After the user responds**, if they chose "Park", execute `spectra park "<name>"` and the workflow is OVER. If they chose "Apply", invoke `/spectra-apply <change-name>` to begin implementation.241242**Artifact Creation Guidelines**243244- Follow the `instruction` field from `spectra instructions` for each artifact type245- Read dependency artifacts for context before creating new ones246- Use `template` as the structure for your output file - fill in its sections247- **IMPORTANT**: `context` and `rules` are constraints for YOU, not content for the file248 - Do NOT copy `<context>`, `<rules>`, `<project_context>` blocks into the artifact249 - These guide what you write, but should never appear in the output250- **Parallel task markers (`[P]`)**: When creating the **tasks** artifact, first read `openspec/config.yaml`. If `parallel_tasks: true` is set, add `[P]` markers to tasks that can be executed in parallel. Format: `- [ ] [P] Task description`. A task qualifies for `[P]` if it targets different files from other pending tasks AND has no dependency on incomplete tasks in the same group. When `parallel_tasks` is not enabled, do NOT add `[P]` markers.251252**Guardrails**253254- Create ALL artifacts needed for implementation255- Always read dependency artifacts before creating a new one256- If context is critically unclear, ask the user - but prefer making reasonable decisions to keep momentum257- If a change with that name already exists, suggest continuing that change instead258- Verify each artifact file exists after writing before proceeding to next259- **NEVER** write application code or implement features during this workflow260- **NEVER** skip the artifact workflow to write code directly261- **NEVER** reinterpret requirements by ignoring the proposal file262- **NEVER** invoke `/spectra-apply` — this workflow ends after artifact creation. The user decides when to start implementation263- If **AskUserQuestion tool** is not available, ask the same questions as plain text and wait for the user's response