Adapter for executing OpenSpec change proposals using subagent-driven-development. Parses OpenSpec structure, groups tasks by phase, and creates one PR per phase.
Converts OpenSpec change proposals into executable plans and delegates implementation to superpowers:subagent-driven-development.
proposal.mdtasks.md with tasks organized by phase/openspec-dev <change-id> [phases]
Arguments:
<change-id> โ Required. The OpenSpec change directory name[phases] โ Optional. Phase filter using numeric ranges (e.g., 1,3,5-7)Examples:
/openspec-dev add-launch-features โ Execute all phases/openspec-dev add-launch-features 2 โ Execute phase 2 only/openspec-dev add-launch-features 1,3-5 โ Execute phases 1, 3, 4, and 5When [phases] is provided, only matching phases from tasks.md are executed.
Parsing rules:
2 โ phase 2 only1,3,5 โ phases 1, 3, and 52-4 โ phases 2, 3, and 41,3-5,7 โ phases 1, 3, 4, 5, and 7Phase numbering: Phases are numbered by order in tasks.md (first ## Phase ... = 1, second = 2, etc.)
Error handling:
Parse OpenSpec โ Extract phases โ Per phase: branch + subagent-driven-dev + PR
Read and extract from openspec/changes/<change-id>/:
[phases] provided):# Example tasks.md structure
## Phase 1: Core API
- [ ] Add user authentication endpoint
- [ ] Create data validation layer
## Phase 2: UI Components
- [ ] Build login form component
- [ ] Add dashboard layout
Extract unchecked tasks (- [ ]) grouped by their phase heading. When [phases] is specified, only process matching phases.
For each phase with unchecked tasks:
git checkout main && git pull
git checkout -b feat/<change-id>-phase-N
Convert phase tasks into a plan format:
# Phase N: <Phase Name>
## Context
OpenSpec change: <change-id>
Spec reference: openspec/specs/<capability>/spec.md
## Tasks
1. <Task description from tasks.md>
2. <Task description from tasks.md>
...
Follow the superpowers:subagent-driven-development workflow:
The subagent-driven-development skill handles:
When all phase tasks complete:
gh pr create \
--title "feat(<change-id>): Phase N - <phase name>" \
--body "## Summary
<bullet points of changes>
## OpenSpec Reference
- Change: openspec/changes/<change-id>/proposal.md
- Tasks: Phase N from tasks.md
## Test Coverage
<list of test files added/modified>"
Critical: Keep openspec/changes/<change-id>/tasks.md updated as the source of truth.
When a task passes both reviews in subagent-driven-development:
openspec/changes/<change-id>/tasks.md- [ ] to - [x] for the completed task# Example: mark task complete in source file
# In openspec/changes/add-launch-features/tasks.md:
# - [ ] Add user authentication endpoint โ - [x] Add user authentication endpoint
git add openspec/changes/<change-id>/tasks.md
git commit -m "chore(openspec): mark task complete - <task description>"
Add PR reference to completed tasks:
## Phase 1: Core API
- [x] Add user authentication endpoint (PR #142)
- [x] Create data validation layer (PR #142)
tasks.md to see current status- [x])After all phases:
## OpenSpec Development Complete: <change-id>
| Phase | Branch | PR | Status |
|-------|--------|-----|--------|
| Phase 1: Core API | feat/change-id-phase-1 | #142 | Ready |
| Phase 2: UI Components | โ | โ | Skipped (not in filter) |
| Phase 3: Tests | โ | โ | Skipped (already complete) |
| Phase 4: Docs | feat/change-id-phase-4 | #143 | Ready |
### Next Steps
- Review and merge PRs in phase order
- Run again if tasks were added or skipped
Status values:
Ready โ PR created, awaiting reviewSkipped (not in filter) โ Phase excluded by [phases] argumentSkipped (already complete) โ All tasks in phase already checkedThis skill is a thin adapter that delegates to:
| Skill | Purpose |
|---|---|
superpowers:subagent-driven-development |
Task execution, reviews, retry loops |
superpowers:test-driven-development |
TDD discipline (used by implementers) |
superpowers:finishing-a-development-branch |
Final cleanup if needed |
Do not duplicate the implementation/review logic from subagent-driven-development.