一键导入
openspec-bulk-apply-change
Use when multiple active OpenSpec changes should be applied concurrently in isolated worktrees with delegated verification and no merge.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when multiple active OpenSpec changes should be applied concurrently in isolated worktrees with delegated verification and no merge.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | openspec-bulk-apply-change |
| description | Use when multiple active OpenSpec changes should be applied concurrently in isolated worktrees with delegated verification and no merge. |
| license | MIT |
| compatibility | Requires git, OpenSpec CLI, and Codex subagents. |
| metadata | {"author":"openspec","version":"1.0","generatedBy":"1.3.1"} |
Project context preflight before workflow actions: before this skill takes a workflow action, follow the project-constitution skill. Read root CONSTITUTION.md when present, enforce relevant project rules, stop on material conflicts, and follow the strict missing-constitution bootstrap/diagnostic policy. For architecture-sensitive work, also read ARCHITECTURE.md, adr/README.md, and relevant in-force adr/*.md. Read .secrets.local.env only when the current workflow actually needs a listed external system, and never reveal secret values.
Apply multiple active OpenSpec changes by creating isolated worktrees, dispatching delegated apply flows in parallel subagents, running verification in each flow, and reporting back without merging or archiving.
REQUIRED SUB-SKILL: Use openspec-git-discipline before any apply or worktree workflow.
/opsx:bulk-apply was invoked without an explicit single-change targetDo not use bulk mode when only one candidate change remains. Stop and tell the user to use /opsx:apply <change> instead.
Get candidate changes
Run:
openspec list --json
/opsx:apply <change>.Run git discipline checks
For each candidate change, verify apply is allowed before creating worktrees:
git status --short.openspec/changes/<change>/ has no uncommitted proposal files.main before applying from any branch or worktree.If any candidate fails the gate, exclude it from execution and report the reason. If fewer than 2 executable candidates remain, stop and report that bulk apply is not appropriate.
Collect change context
For each executable candidate change:
openspec status --change "<name>" --json
openspec instructions apply --change "<name>" --json
Then:
contextFiles.Parent goal-guidance preflight before orchestration side effects
Run this preflight after executable changes are known, blocked/all-done changes have been excluded, and context is available, but before creating worktrees or dispatching subagents.
Stop without a bulk goal when:
/opsx:apply <change> for the single remaining change.Skip parent goal generation and continue orchestration when:
Generate one copy-paste parent /goal prompt and stop before creating
worktrees or dispatching subagents when:
Generated bulk goal prompt shape (localize prose to the user's language, but keep command, change, and skill names exact):
/goal Проведи Intent-Driven OpenSpec bulk apply для изменений <change-a>, <change-b>, ... в текущем проекте.
Первое действие: запусти workflow `/opsx:bulk-apply <change-a> <change-b> ...`. Если вложенная slash-команда не исполняется буквально, используй workflow/skill `openspec-bulk-apply-change` с теми же изменениями.
Критерии завершения: у каждого выполненного change есть isolated worktree, apply result, `/opsx:verify <change>` result, changed-files summary, blocker summary и normalized parent report; skipped/paused/failed changes имеют причины; parent report перечисляет worktree paths, changed files, blockers и verify status.
Остановись без завершения goal, если осталось меньше двух executable changes, planning-artifact gate не пройден, OpenSpec state blocked/all-done для нужного change, worktree creation failed, subagent dispatch failed, credentials/secrets или external services недоступны, checks fail вне контроля Codex, есть artifact contradictions, требуется design/spec/ADR decision, возник merge/worktree conflict, либо нужен archive/merge/push/destructive git action или другое действие с отдельным approval. Не выполняй merge, archive, push или destructive git actions без отдельного явного approval.
Create isolated worktrees
For each executable candidate change:
.worktrees/<change> unless the user specified another root.Dispatch subagents in parallel
For each executable candidate change:
Subagent prompt requirements:
openspec-git-discipline before applying./opsx:apply <change>./opsx:verify <change> after apply work is complete.Collect and normalize reports
For each executed change, capture:
complete, paused, or failedready, warnings, critical, or failedReport back without merging
Present a final bulk-apply report:
/opsx:verify result per changeEnd with: "No merge or archive was performed. Explicit user approval is required before any merge or archive."
| Situation | Action |
|---|---|
| 2+ active candidates | Bulk apply in isolated worktrees |
| Explicit list of 2+ changes | Bulk apply only those changes |
| 1 candidate | Stop and use /opsx:apply <change> |
Proposal not on main | Exclude or stop before apply |
| Already inside an active goal for same changes | Skip parent goal and continue |
| User explicitly says no goal | Continue without parent goal |
| Blocked or all-done change | Skip execution and report status |
| Subagent finishes apply | Require /opsx:verify <change> before review-ready |
| User asks to merge/archive | Stop and require explicit follow-up approval |
| Mistake | Fix |
|---|---|
| Asking user to pick one change for a bulk request | Keep all executable candidates when 2+ remain |
| Creating worktrees before goal preflight | Generate the parent /goal prompt first unless goal guidance is active or bypassed |
| Creating a nested parent goal | When already inside a covering active goal, continue directly |
| Running apply in the parent workspace | Dispatch one subagent per worktree |
| Processing changes sequentially | Dispatch independent apply flows in parallel |
| Reporting ready after apply only | Require /opsx:verify <change> first |
| Treating verify as permission to merge | Report only; merge needs explicit approval |
| Archiving after verify | Never archive during bulk apply |
/goal prompt and stop when goal guidance is triggered..worktrees/ as the default worktree root unless the user specifies another location./opsx:verify in every delegated apply flow before reporting a change as review-ready.main.Implement tasks from an OpenSpec change. Use when the user wants to start implementing, continue implementation, or work through tasks.
Continue working on an OpenSpec change by creating the next artifact. Use when the user wants to progress their change, create the next artifact, or continue their workflow.
Fast-forward through OpenSpec artifact creation. Use when the user wants to quickly create all artifacts needed for implementation without stepping through each one individually.
Start a new OpenSpec change using the experimental artifact workflow. Use when the user wants to create a new feature, fix, or modification with a structured step-by-step approach.
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.
Use when documenting, drafting, reviewing, or updating ADRs, decision logs, tradeoffs, rationale, consequences, alternatives, or architecture decision history.