一键导入
openspec-apply-change
Implement tasks from an OpenSpec change. Use when the user wants to start implementing, continue implementation, or work through tasks.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Implement tasks from an OpenSpec change. Use when the user wants to start implementing, continue implementation, or work through tasks.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Generate JSON wireframe with HTML preview
Generate OpenCode agent markdown definitions with safe permission presets and an interactive question flow.
Evaluate and enforce whether OpenSpec artifacts can be executed by openspec/applier without scope changes or design rediscovery. Use before proposer finalization, analyzer review, and applier delegation.
Archive a completed change in the experimental workflow. Use when the user wants to finalize and archive a change after implementation is complete.
Enter explore mode - a thinking partner for exploring ideas, investigating problems, and clarifying requirements. Use when the user wants to think through something before or during a change.
Sync delta specs from a change to main specs. Use when the user wants to update main specs with changes from a delta spec, without archiving the change.
| name | openspec-apply-change |
| description | Implement tasks from an OpenSpec change. Use when the user wants to start implementing, continue implementation, or work through tasks. |
| license | MIT |
| compatibility | Requires openspec CLI. |
| metadata | {"author":"openspec","version":"1.0","generatedBy":"1.4.1"} |
Implement tasks from an OpenSpec change.
Before implementation, load openspec-apply-readiness and require a READY result. A Change contains repository-scoped work only: never execute, await, or complete a task that requires release execution, deployment, environment provisioning, credential access or probes, external approval, staging or production validation, operational rehearsal, or production observation. Return the violated readiness criteria so openspec/proposer can remove the invalid artifact content.
Read the confirmed intent.md from contextFiles before implementation. Preserve its owner-approved outcome and classifications; do not replace it with a familiar solution pattern or a solution-shaped paraphrase.
When UI is in scope, treat .wireframe.json as the visible-surface source and the matching .wireframe.html and screenshot as openspec/designer rendering evidence. Never edit or recapture the evidence during apply. Resolve only self-evident implementation details that preserve existing actions, information structure, and copy. Return BLOCKED instead of redesigning the surface when artifacts conflict or a non-self-evident visible change is necessary.
Input: Optionally specify a change name. If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
Steps
Select the change
If a name is provided, use it. Otherwise:
pnpm exec openspec list --json to get available changes and use the AskUserQuestion tool to let the user selectAlways announce: "Using change: " and how to override (e.g., /opsx-apply <other>).
Check status to understand the schema
pnpm exec openspec status --change "<name>" --json
Parse the JSON to understand:
schemaName: The workflow being used (e.g., "spec-driven")planningHome, changeRoot, and actionContext: planning scope and edit constraintsGet apply instructions
pnpm exec openspec instructions apply --change "<name>" --json
This returns:
contextFiles: artifact ID -> array of concrete file paths (varies by schema - could be intent/proposal/specs/design/tasks or spec/tests/implementation/docs)Handle states:
state: "blocked" (missing artifacts): show message, suggest completing the missing artifacts with /opsx-propose <name> before retrying applystate: "all_done": congratulate, suggest archiveWorkspace guard: If status JSON reports actionContext.mode: "workspace-planning" and allowedEditRoots is empty, explain that full workspace apply is not supported in this slice. Treat linked repos and folders as read-only context, ask the user to select an affected area through an explicit implementation workflow, and STOP before editing files.
Read context files
Read every file path listed under contextFiles from the apply instructions output.
The files depend on the schema being used:
Show current progress
Display:
Implement tasks (loop until done or blocked)
For each pending task:
- [ ] → - [x]Pause if:
On completion or pause, show status
Display:
Output During Implementation
## Implementing: <change-name> (schema: <schema-name>)
Working on task 3/7: <task description>
[...implementation happening...]
✓ Task complete
Working on task 4/7: <task description>
[...implementation happening...]
✓ Task complete
Output On Completion
## Implementation Complete
**Change:** <change-name>
**Schema:** <schema-name>
**Progress:** 7/7 tasks complete ✓
### Completed This Session
- [x] Task 1
- [x] Task 2
...
All tasks complete! Ready to archive this change.
Output On Pause (Issue Encountered)
## Implementation Paused
**Change:** <change-name>
**Schema:** <schema-name>
**Progress:** 4/7 tasks complete
### Issue Encountered
<description of the issue>
**Options:**
1. <option 1>
2. <option 2>
3. Other approach
What would you like to do?
Guardrails
Fluid Workflow Integration
This skill supports the "actions on a change" model: