Propose a new change - create the change and generate all artifacts in one step.
I'll create a change with artifacts:
- proposal.md (what & why)
- design.md (how)
- tasks.md (implementation steps)
When ready to implement, run /opsx:apply
Store selection: If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run openspec store list --json to discover registered store ids, then pass --store <id> on the commands that read or write specs and changes (new change, status, instructions, list, show, validate, archive, doctor, context). Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local openspec/ root.
Input: The user's request should include a change name (kebab-case) OR a description of what they want to build.
Steps
If no clear input provided, ask what they want to build
Use the AskUserQuestion tool (open-ended, no preset options) to ask:
"What change do you want to work on? Describe what you want to build or fix."
From their description, derive a kebab-case name (e.g., "add user authentication" → add-user-auth).
IMPORTANT: Do NOT proceed without understanding what the user wants to build.
Create the change directory
openspec new change "<name>"
This creates a scaffolded change in the planning home resolved by the CLI with .openspec.yaml.
Get the artifact build order
openspec status --change "<name>" --json
Parse the JSON to get:
applyRequires: array of artifact IDs needed before implementation (e.g., ["tasks"])
artifacts: list of all artifacts with their status and dependencies
planningHome, changeRoot, artifactPaths, and actionContext: path and scope context. Use these instead of assuming repo-local paths.
Create artifacts in sequence until apply-ready
Use the TodoWrite tool to track progress through the artifacts.
Loop through artifacts in dependency order (artifacts with no pending dependencies first):
a. For each artifact that is ready (dependencies satisfied):
b. Continue until all applyRequires artifacts are complete
- After creating each artifact, re-run
openspec status --change "<name>" --json
- Check if every artifact ID in
applyRequires has status: "done" in the artifacts array
- 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
Show final status
openspec status --change "<name>"
Output
After completing all artifacts, summarize:
- Change name and location
- List of artifacts created with brief descriptions
- What's ready: "All artifacts created! Ready for implementation."
- Prompt: "Run
/opsx:apply or ask me to implement to start working on the tasks."
Artifact Creation Guidelines
- Follow the
instruction field from openspec instructions for each artifact type
- The schema defines what each artifact should contain - follow it
- 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
Guardrails
- Create ALL artifacts needed for implementation (as defined by schema's
apply.requires)
- 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, ask if user wants to continue it or create a new one
- Verify each artifact file exists after writing before proceeding to next
1---
2name: openspec-propose
3description: Propose a new change with all artifacts generated in one step. Use when the user wants to quickly describe what they want to build and get a complete proposal with design, specs, and tasks ready for implementation.
4allowed-tools: Bash(openspec:*)
5license: MIT
6compatibility: Requires openspec CLI.
7metadata:
8 author: openspec
9 version: "1.0"
10 generatedBy: "1.6.0"
11---
12
13Propose a new change - create the change and generate all artifacts in one step.
14
15I'll create a change with artifacts:
16- proposal.md (what & why)
17- design.md (how)
18- tasks.md (implementation steps)
19
20When ready to implement, run /opsx:apply
21
22---
23
24**Store selection:** If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run `openspec store list --json` to discover registered store ids, then pass `--store <id>` on the commands that read or write specs and changes (`new change`, `status`, `instructions`, `list`, `show`, `validate`, `archive`, `doctor`, `context`). Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local `openspec/` root.
25
26**Input**: The user's request should include a change name (kebab-case) OR a description of what they want to build.
27
28**Steps**
29
301. **If no clear input provided, ask what they want to build**
31
32 Use the **AskUserQuestion tool** (open-ended, no preset options) to ask:
33 > "What change do you want to work on? Describe what you want to build or fix."
34
35 From their description, derive a kebab-case name (e.g., "add user authentication" → `add-user-auth`).
36
37 **IMPORTANT**: Do NOT proceed without understanding what the user wants to build.
38
392. **Create the change directory**
40 ```bash
41 openspec new change "<name>"
42 ```
43 This creates a scaffolded change in the planning home resolved by the CLI with `.openspec.yaml`.
44
453. **Get the artifact build order**
46 ```bash
47 openspec status --change "<name>" --json
48 ```
49 Parse the JSON to get:
50 - `applyRequires`: array of artifact IDs needed before implementation (e.g., `["tasks"]`)
51 - `artifacts`: list of all artifacts with their status and dependencies
52 - `planningHome`, `changeRoot`, `artifactPaths`, and `actionContext`: path and scope context. Use these instead of assuming repo-local paths.
53
544. **Create artifacts in sequence until apply-ready**
55
56 Use the **TodoWrite tool** to track progress through the artifacts.
57
58 Loop through artifacts in dependency order (artifacts with no pending dependencies first):
59
60 a. **For each artifact that is `ready` (dependencies satisfied)**:
61 - Get instructions:
62 ```bash
63 openspec instructions <artifact-id> --change "<name>" --json
64 ```
65 - The instructions JSON includes:
66 - `context`: Project background (constraints for you - do NOT include in output)
67 - `rules`: Artifact-specific rules (constraints for you - do NOT include in output)
68 - `template`: The structure to use for your output file
69 - `instruction`: Schema-specific guidance for this artifact type
70 - `resolvedOutputPath`: Resolved path or pattern to write the artifact
71 - `dependencies`: Completed artifacts to read for context
72 - Read any completed dependency files for context
73 - Create the artifact file using `template` as the structure and write it to `resolvedOutputPath`
74 - Apply `context` and `rules` as constraints - but do NOT copy them into the file
75 - Show brief progress: "Created <artifact-id>"
76
77 b. **Continue until all `applyRequires` artifacts are complete**
78 - After creating each artifact, re-run `openspec status --change "<name>" --json`
79 - Check if every artifact ID in `applyRequires` has `status: "done"` in the artifacts array
80 - Stop when all `applyRequires` artifacts are done
81
82 c. **If an artifact requires user input** (unclear context):
83 - Use **AskUserQuestion tool** to clarify
84 - Then continue with creation
85
865. **Show final status**
87 ```bash
88 openspec status --change "<name>"
89 ```
90
91**Output**
92
93After completing all artifacts, summarize:
94- Change name and location
95- List of artifacts created with brief descriptions
96- What's ready: "All artifacts created! Ready for implementation."
97- Prompt: "Run `/opsx:apply` or ask me to implement to start working on the tasks."
98
99**Artifact Creation Guidelines**
100
101- Follow the `instruction` field from `openspec instructions` for each artifact type
102- The schema defines what each artifact should contain - follow it
103- Read dependency artifacts for context before creating new ones
104- Use `template` as the structure for your output file - fill in its sections
105- **IMPORTANT**: `context` and `rules` are constraints for YOU, not content for the file
106 - Do NOT copy `<context>`, `<rules>`, `<project_context>` blocks into the artifact
107 - These guide what you write, but should never appear in the output
108
109**Guardrails**
110- Create ALL artifacts needed for implementation (as defined by schema's `apply.requires`)
111- Always read dependency artifacts before creating a new one
112- If context is critically unclear, ask the user - but prefer making reasonable decisions to keep momentum
113- If a change with that name already exists, ask if user wants to continue it or create a new one
114- Verify each artifact file exists after writing before proceeding to next