| name | openspec-write-plan |
| description | Use when an OpenSpec change has proposal, design, and tasks artifacts ready and a Superpowers implementation plan needs to be created before execution. |
| license | MIT |
| compatibility | Requires openspec CLI and Superpowers writing-plans skill. |
| metadata | {"author":"dyx","version":"1.0.1"} |
Generate a detailed Superpowers implementation plan from an OpenSpec change's artifacts.
Input: Optionally specify a change name. Supports --max-tasks N (default 10) to control plan splitting.
Steps
-
Select the change
If a name is provided, use it. Otherwise:
- Infer from conversation context if the user mentioned a change
- Auto-select if only one active change exists
- If ambiguous, run
openspec list --json to get available changes and prompt the user to select
Always announce: "Using change: " and how to override.
-
Check status and load artifacts
openspec status --change '<name>' --json
Parse the JSON to understand schema and artifact status.
openspec instructions apply --change '<name>' --json
Read all contextFiles (proposal, design, tasks, etc.).
If tasks artifact is missing or incomplete: stop and suggest running /opsx:propose first.
-
Parse tasks.md to extract task labels
Read the tasks file and extract all task entries with their labels (e.g., 1.1, 2.3). Each line matching - [ ] <label> <description> is a task. Record the label and description for each.
-
Determine plan splitting
If --max-tasks is less than 1, treat as default (10). Count total tasks. If total > --max-tasks:
-
Call superpowers:writing-plans
Invoke the superpowers:writing-plans skill with these additional constraints:
If the skill call fails (Superpowers not installed): stop and display:
"Superpowers writing-plans skill not detected. Cannot create plan. Please install Superpowers first."
Do not generate any plan files. Do not fall back to a different approach.
File naming:
- Single plan:
docs/superpowers/plans/YYYY-MM-DD-<change-name>.md
- Multiple plans:
docs/superpowers/plans/YYYY-MM-DD-<change-name>-tasks-<first>-<last>.md
-
Verify mapping coverage
After plan generation, scan the plan file(s) for all <!-- openspec-task: LABEL --> annotations. Check:
- Every OpenSpec task label has at least one corresponding plan task
- Every plan task annotation references a label that exists in tasks.md (catch typos like
1.11 vs 1.1)
- If any label is missing or invalid: warn the user and offer to regenerate the plan
-
Output summary
## Plan Created
**Change:** <change-name>
**Plan file(s):**
- docs/superpowers/plans/<filename>.md (N tasks)
**Mapping coverage:** All OpenSpec tasks covered ✓
Ready to execute! Run `/opsx:executing-plans <change-name>` to start implementation.
This command will handle execution mode selection and sync progress back to OpenSpec tasks.
IMPORTANT: Do NOT offer any other execution method. Do NOT suggest using superpowers:subagent-driven-development or superpowers:executing-plans directly. The only supported next step is /opsx:executing-plans.
Guardrails
- Change names must match
[A-Za-z0-9_-]+ — reject any name with spaces, quotes, or special characters before substituting into shell commands
- Superpowers is a hard dependency — do not proceed without it
- Always load OpenSpec artifacts before calling superpowers:writing-plans
- Always verify mapping coverage after plan generation
- Do not modify any existing OpenSpec files
- Do not skip user confirmation for plan splitting
- Follow Superpowers plan file conventions (header, task structure, TDD steps)
- Never let superpowers:writing-plans perform its "Execution Handoff" — execution must go through
/opsx:executing-plans to ensure OpenSpec task sync