ワンクリックで
openspec-git-discipline
Use when OpenSpec propose, continue, apply, verify, archive, branch, merge, or worktree timing affects git history.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Use when OpenSpec propose, continue, apply, verify, archive, branch, merge, or worktree timing affects git history.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
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.
| name | openspec-git-discipline |
| description | Use when OpenSpec propose, continue, apply, verify, archive, branch, merge, or worktree timing affects git history. |
| license | MIT |
| compatibility | Codex lazy-loaded skill for git-backed OpenSpec projects. |
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.
Use this skill whenever OpenSpec lifecycle state changes or git timing affects the workflow.
Project policy: checkpoint discipline is mandatory. Every completed artifact or coherent apply group must be checkpointed before the next lifecycle phase depends on it. Safe scaffold/artifact/apply-group checkpoint commits run automatically by default when session git discipline is auto; manual mode can still require approval.
Core rule: every OpenSpec state change must cross main before the next
lifecycle phase depends on it.
main before apply starts.main, a branch, or a worktree only if that exact proposal
state is already available on main.main after implementation is merged back.auto mode after the changed paths and commit message are shown.Hard gates that always require explicit approval: branch creation, merge, push, pull request creation, archive, destructive git operations, dirty unrelated work, and any one-time override of a required gate.
main; otherwise warn and ask whether to continue.git status --short and verify planning artifacts are not
only local uncommitted state.git branch --show-current and git status --short;
stop if not on main or implementation has not been merged.If proposal state has not reached main:
I should not apply this yet because the planning change has not reached
main. A proposal can be drafted on a branch, but apply must start only after that proposal state is available onmain.
If archive is not running from merged main:
I should not archive this yet because archive must run from
mainafter implementation is merged back. Verify makes a change eligible to merge; it does not replace the merge.
Checkpoint after each of these boundaries before a later lifecycle phase depends on the result:
openspec new change creates a change directory.At every checkpoint:
git status --short;scripts/openspec-git-checkpoint when available for safe scoped checkpoint commits; in manual mode, ask before git add/git commit;Overrides are allowed only when the user explicitly names or clearly confirms the gate being bypassed. An override is one-time and does not disable future gates. Record the override in the response with: