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:
- Fewer than two executable changes remain. Report skipped/excluded changes and suggest
/opsx:apply <change> for the single remaining change.
- A planning-artifact gate failed for the requested run and leaves fewer than two executable changes.
- Orchestration is blocked before worktree creation by missing credentials, missing repository access, unavailable external systems, or contradictory artifacts that need user decisions.
Skip parent goal generation and continue orchestration when:
- The current session is already inside an active Codex Goal whose scope includes the same target changes.
- The user explicitly asked to continue without a goal, said "no goal", or otherwise clearly bypassed goal guidance.
Generate one copy-paste parent /goal prompt and stop before creating
worktrees or dispatching subagents when:
- Two or more executable changes remain.
- The run is not already goal-guided.
- The user did not explicitly bypass goal guidance.
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.