3.9 KiB
name, description, license, compatibility, metadata
| name | description | license | compatibility | metadata | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| openspec-apply-change | Implement the tasks from a change. Use when the user wants to start implementing, continue implementation, or work through the tasks of an existing change. | MIT | Claude Code — no external CLI required. |
|
Implement the tasks from a change.
Adapted for Claude Code. No
openspecCLI. A change is a folder underopenspec/changes/<name>/; tasks live intasks.mdas a Markdown checklist. Read the artifacts directly, implement, and flip- [ ]→- [x]with the Edit tool.
Input: Optionally specify a change name. If omitted, infer from conversation context; if ambiguous, prompt.
Steps
-
Select the change
If a name is provided, use it. Otherwise list active changes:
ls -1 openspec/changes 2>/dev/null | grep -v '^archive$'- Infer from conversation context if the user mentioned a change
- Auto-select if only one active change exists
- If ambiguous, use the AskUserQuestion tool to let the user choose
Always announce: "Using change: ".
-
Read the change artifacts
Read every artifact that exists in
openspec/changes/<name>/:proposal.md(what & why)design.md(how)tasks.md(the checklist you will execute)
If
tasks.mdis missing, the change is not ready to implement — suggest theopenspec-proposeskill (or creatingtasks.md) and stop. -
Assess progress
Count tasks in
tasks.md:- Incomplete = lines matching
- [ ] - Complete = lines matching
- [x]
Display: change name, "N/M tasks complete", and a short overview of what remains. If all tasks are already complete, congratulate and suggest archiving (the
openspec-archive-changeskill). - Incomplete = lines matching
-
Implement tasks (loop until done or blocked)
Mirror
tasks.mdinto your task-tracking tool (TaskCreate/TaskUpdate) so progress is visible. For each pending task:- Show which task is being worked on
- Make the code changes required — keep them minimal and focused on that task
- For SAP code, consult the relevant MCP server first (
sap-cap,sap-fiori,sap-ui5skills) — never guess CDS/Fiori/UI5 behavior - For non-trivial implementation, dispatch to the appropriate specialist sub-agent via the Agent tool rather than writing large code blocks inline
- Mark the task complete by editing
tasks.md:- [ ]→- [x] - Continue to the next task
Pause if:
- A task is unclear → ask for clarification
- Implementation reveals a design issue → suggest updating
design.md/proposal.md - An error or blocker is encountered → report and wait for guidance
- The user interrupts
-
On completion or pause, show status
- Tasks completed this session
- Overall progress: "N/M tasks complete"
- If all done: suggest archiving (
openspec-archive-change) - If paused: explain why and wait
Output During Implementation
## Implementing: <change-name>
Working on task 3/7: <task description>
[...implementation happening...]
✓ Task complete
Output On Completion
## Implementation Complete
**Change:** <change-name>
**Progress:** 7/7 tasks complete ✓
All tasks complete! Ready to archive this change (openspec-archive-change).
Guardrails
- Keep going through tasks until done or blocked
- Always read the artifacts before starting
- If a task is ambiguous, pause and ask before implementing
- If implementation reveals issues, pause and suggest artifact updates
- Keep code changes minimal and scoped to each task
- Update the
tasks.mdcheckbox immediately after completing each task - Pause on errors, blockers, or unclear requirements — don't guess
- Consult MCP/skills for SAP code; orchestrate via sub-agents for substantial work