codex-task-waves/SKILL.md
Use when the user says "have codex fix this" / "have codex implement this" / "let codex handle this" / "give this to codex" / "delegate this to codex" for a single task with context already in scope (a Jira ticket, GitHub issue, file diff, bug, or described change). Plans the work, splits it into reviewable waves, dispatches codex per wave with review and correction between waves before opening a PR. Not for multi-issue parallel batches (use codex-issue-waves) or one-shot codex runs without planning (use invoking-codex-exec).
npx skillsauth add ddnetters/homelab-agent-skills codex-task-wavesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Take a single in-scope task — "this" being the current Jira ticket, GitHub issue, bug, or described change — and produce one PR composed of one or more verified commits, each shaped by a written plan, a codex implementer dispatch, a codex reviewer dispatch, and (when needed) a codex corrector dispatch.
Orchestration model. Claude is the PO / engineering manager. Codex is the worker — implementer, reviewer, or corrector. Claude never edits source files, never reviews code, never makes inline fixes. Every code touch goes through a codex dispatch. See invoking-codex-exec "Codex roles" and "Orchestrator boundaries" for the full rule.
REQUIRED SUB-SKILLS:
invoking-codex-exec — every wave's dispatches (implementer, reviewer, corrector); flags, sandbox traps, read-only enforcement, monitoringsuperpowers:writing-plans — the plan file that drives every wavesuperpowers:using-git-worktrees — worktree setup before wave 1PLAN_<TICKET-ID>.md or PLAN.md). Per superpowers:writing-plans: spec, root cause, proposed change, tests, verification commands, out-of-scope. The plan file is the artifact every wave reads.The number of waves depends on the task's shape, not its size in lines:
Boundaries that work:
Don't split when:
Don't merge waves when:
State the wave count and rationale to the user before starting wave 1. Single-wave is a valid answer — say so explicitly so the user isn't surprised by a flat dispatch.
For each wave, in order:
invoking-codex-exec (implementer role). The codex prompt must include:
## Scope block with three required headings (In scope, Out of scope, Open questions). The plan file's spec section feeds the per-wave Scope blocks but does not replace them — each wave gets its own block tuned to that wave's surface. Open questions documents resolved decisions, not unresolved ones; resolve any genuinely-open question before dispatch.git status --short and git log --oneline <last-wave-commit>..HEAD to confirm the implementer produced a commit (or a clean working tree if uncommitted) and that nothing pathological happened. This is a status check, not a review — claude is verifying that something happened, not judging what it is. If codex was killed mid-run and the diff looks complete, dispatch a corrector to finish the verification commands rather than running them yourself.invoking-codex-exec (reviewer role). The reviewer codex receives:
## Scope block the implementer worked from.git diff <last-wave-commit>..HEAD, fenced as ## Artifact under review with the prompt-injection-defuse line (see invoking-codex-exec "Prompt shape — reviewer role").## Scope block. Files or behaviors outside In scope (or explicitly listed Out of scope) are scope-creep — flag as Blocking. Decisions that contradict resolved Open questions are Blocking.--no-verify, no TODO/FIXME slop.<worktree>/.codex-review-output.json. Read-only enforcement is the orchestrator's responsibility (see invoking-codex-exec "Read-only enforcement").<worktree>/.codex-review-output.json, validates the JSON, and decides:
verdict: approved and no items in blocking/should_fix/scope_violations → proceed to step 6 (commit).blocking or scope_violations → step 5 (corrector dispatch).should_fix or nits → claude decides per item: address now via corrector, or defer to PR comment with explicit reasoning. nits default to deferral.scope_violations against the plan: reviewer codex sometimes flags a feature as scope-creep when it was in the wave's exit condition. Read the plan file (NOT the diff) to confirm before insisting on a scope-creep fix.invoking-codex-exec (corrector role). The corrector prompt:
.codex-review-output.json.blocking ∪ should_fix ∪ scope_violations).## Scope block whose In scope is exactly those items and whose Out of scope is "everything else, including all nits from the review".verdict: approved. After 3 corrector cycles without convergence, escalate to user — do not loop indefinitely.fix:, feat:, refactor:, test:), one commit". One commit per wave keeps the PR diff history reviewable. If the implementer already committed in step 1, this step verifies the commit message and squashes if needed via corrector dispatch — claude does not amend or rebase by hand.pnpm tsc --noEmit && pnpm test, ./gradlew check, etc.) and report pass/fail; if fail, fix and re-run". A wave that breaks an upstream test fails fast here, before downstream waves pile on.Move to the next wave only when the current wave is clean and the project verification corrector reported pass.
Reviews are dispatched as codex (reviewer role). No claude subagents, no fresh claude -p, no inline review by the orchestrator.
| Target | Use | Cost |
|--------|-----|------|
| codex exec (reviewer role) | Every review, every wave. Same worktree the implementer used. | ~10–40k codex tokens per pass + read-only enforcement overhead (~2 git commands) |
| claude subagent / claude -p | Never. Claude is the PO. Reviews are work; work goes to codex. | — |
| ultrareview | User-triggered, billed, you can't launch it. Out of scope for this skill. | — |
The reviewer codex has no native read-only mode. The orchestrator detects boundary violations after the run via git rev-parse HEAD + git status --porcelain snapshots before and after. See invoking-codex-exec "Read-only enforcement" for the exact recipe.
After two consecutive boundary violations on the same review, escalate to user.
Reviewer codex occasionally writes invalid JSON or an empty file. Detection:
python3 -c "import json,sys; json.load(open('<worktree>/.codex-review-output.json'))" 2>&1
Recovery:
.codex-review-output.json. Do not write any prose preamble or trailing text. Do not write to any other file."After the last wave:
pnpm tsc --noEmit && pnpm test, etc.); commit the deletion if verification passes". Claude does not delete the plan file by hand.git push -u origin <branch> directly. Pushing is a status operation (no code change), not a code touch.gh pr create. Body must include:
The PR body is content claude composes. This is not "review" — it's a manager writing a status report from structured inputs (plan, review outputs, commit log).
| Symptom | Meaning | Fix |
|---------|---------|-----|
| Trying to plan and dispatch in the same turn | Skipped the wave-splitting decision | Stop, write plan first |
| Wave 1 dispatch already touches wave 2's surface | Boundaries wrong | Re-split or merge waves |
| About to read the diff yourself to "just check one thing" | Claude is reviewing | Stop. Dispatch a reviewer codex if a check is needed. If the question is genuinely about state (does it exist? what's the SHA?), gh pr view / git log are fine. Reading content for judgment is not. |
| About to fix a one-line typo in place to "save a codex dispatch" | Claude is editing | Stop. Dispatch a corrector. The discipline is the point — every code touch is a codex run with an associated audit trail. |
| Considering a claude subagent for review | Old delegation path. Claude does not review. | Dispatch codex (reviewer role) per "Review delegation — codex only" |
| Considering claude -p for an escalated review | Same — claude does not review at any escalation tier | Dispatch a second reviewer codex with a stronger prompt or a different framing if the first review felt shallow. Two reviewer codexes disagreeing is a signal to escalate to the user, not to bring claude into the review |
| Reviewer codex modified files | Read-only boundary violation | Reset HEAD + clean working tree (preserve .codex-review-output.json), re-dispatch with stronger prefix. Two violations → escalate |
| Reviewer codex output file is missing or invalid JSON | Malformed review | Re-dispatch once with explicit JSON contract. Second failure → escalate |
| 3+ corrector cycles without convergence | Plan or scope is wrong, not just the implementation | Escalate to user. Don't loop indefinitely |
| Codex commits across the boundary you set | Boundary not enforced in prompt | Dispatch corrector with explicit "don't touch X" |
| Considering a 5+-wave split | Over-decomposed | Combine until ≤ 3 unless each wave earns its review cycle |
| About to fan out review across many waves | Each wave's review is per-PR-single, not parallel — that's codex-issue-waves | Single-task waves run sequentially; reviews don't parallelize within one task |
| Single-wave task, but you wrote 100 lines of plan | Plan is over-engineered for the task | Trim plan, dispatch, move on |
| User said "just have codex fix it" but you start lecturing about waves | Single-wave answer was correct; just proceed | State "1 wave, here's why," then go |
For multi-issue parallel waves see codex-issue-waves. For a one-shot codex dispatch with no plan and no wave structure see invoking-codex-exec directly.
development
Use when delegating a single coding task to `codex exec` ("hand off to codex", "run codex on this", "dispatch codex on this ticket", any one-shot invocation). Covers flags, sandbox traps, monitoring, and recovery. Not for multi-issue parallel batches — use codex-issue-waves for those.
development
Run a batch of GitHub issues through codex exec in isolated git worktrees as parallel autonomous PRs, then manage the review and correction waves until merge. Use when the user gives a list of issue numbers (≥ 2) and asks to "spawn codex" / "dispatch codex" / "have codex work on" / "manage the PRs" / "process feedback" / "get them merged" for those issues, or when the user asks for multi-issue parallel delegation to codex. Not for single-issue wave-driven delegation (use codex-task-waves), single-issue one-shot dispatch (use invoking-codex-exec), or implementation without delegation (use /pr or direct implementation).
development
Slite knowledge base API — ask questions, search notes, retrieve content, manage users and groups, and audit knowledge health via the REST API
tools
Plex Media Server API — library management, media search, playback sessions, server status, and automation