| name | source-command-corgi-loop |
| description | Run the Corgi Loop — execute Task Group bundles (apply → verify → review-evidence) with automated lifecycle decisions |
source-command-corgi-loop
Use this skill when the user asks to run the migrated source command corgi-loop.
Command Template
Run the Corgi Loop for a change — execute Task Group bundles with automated lifecycle decisions.
Input: Optionally specify a change name (e.g., /corgi:loop add-auth). If omitted, infer from context.
Steps
-
Determine platform
Read openspec/config.yaml and check the schema field.
-
Check isolation mode (CRITICAL — do NOT skip)
Read openspec/config.yaml and check isolation.mode.
- If
isolation.mode is worktree: the worktree MUST already exist (created by propose). The skill MUST resolve it and work inside it. If the worktree is missing, stop and report failure — do not create it during loop.
- If
isolation section is missing or mode is none: normal operation, no worktree needed.
-
Dispatch to platform skill
- If
schema: gitlab-tracked → Follow the instructions in the corgispec-loop skill
- If
schema: github-tracked → Follow the instructions in the corgispec-loop skill
- Otherwise → Tell the user: "Unsupported schema ''. Supported: gitlab-tracked, github-tracked." and stop.
The selected skill owns the internal loop phases, including initialization, group bundle execution (apply → verify → review-evidence), artifact writing, and compaction recovery. This wrapper only reads config, enforces isolation, dispatches by schema, and verifies postconditions.
-
Pass through all input
Forward the user's input (change name, etc.) to the selected skill as-is.
-
Verify postconditions
After the skill completes, verify:
state.json exists at .Codex/corgi-loop/<change>/state.json with valid schema
verify.json exists at .Codex/corgi-loop/<change>/groups/<N>/verify.json for the current group
review.json exists at .Codex/corgi-loop/<change>/groups/<N>/review.json for the current group
- All three files share the same
changeName, group, and nonce
- The skill STOPPED after writing artifacts — no lifecycle decisions made
- If any postcondition fails, report which one and do not claim completion
Platform behavior: On OpenCode, the loop is self-driving and retries failed groups automatically (up to 3 attempts). Codex does not retry — a failure is immediately terminal. Stopping conditions: FAIL verdict, critical/important findings, circuit breaker, or all groups complete.