Overnight pre-plan-review wave artifact drift
Use when:
- the goal is to move open issues from pre-
status:plan-reviewintostatus:plan-review - you want 4 parallel Codex planning workers overnight
- the main checkout is dirty or already carrying unrelated state
- you need planning only, not implementation
Core workflow
- Create a fresh planning worktree from
origin/main. - Select up to 4 open issues that lack both
status:plan-reviewandstatus:plan-approved. - Write one prompt per worker plus a master summary.
- Restrict worker writes to planning artifacts only:
docs/plans/YYYY-MM-DD-issue-NNN-*.mdscripts/review/results/*plan-NNN-*- optional
.planning/quick/*NNN*
- Explicitly forbid
docs/plans/README.md, source files, and tests in the worker prompt. - Launch Codex with:
PROMPT=$(< worker.md)Codex -p --permission-mode acceptEdits --no-session-persistence --output-format text --max-budget-usd 20 "$PROMPT" </dev/null | tee logs/<worker>.log - Each worker should:
- inspect GH + local evidence
- draft the canonical plan
- run adversarial review
- revise once if MAJOR
- add
status:plan-reviewonly if approval-ready - otherwise post blocker comment and leave unlabeled
Verification rule: check 3 surfaces
A worker can advance GitHub state even when artifacts do not appear in the orchestrator's active local worktree.
Always verify across these three surfaces:
- Live GitHub state
- issue labels
- latest planning comments
- Local active worktree state
- canonical plan path under
docs/plans/ - expected review artifacts under
scripts/review/results/
- canonical plan path under
- Remote branch / alternate-worktree provenance
git ls-remote --heads origin <branch>git show --stat <sha>git show <sha>:path/to/file
How to classify outcomes
Clean success
- GitHub label/comment correct
- local plan/review artifacts present where expected
Artifact-placement drift
- GitHub
status:plan-reviewis correct - worker comments are present
- local active worktree is missing claimed artifacts
- remote branch commit or sandbox/alternate worktree contains the artifacts
Treat this as governance/artifact drift, not as worker failure. Record it explicitly and reconcile before any downstream execution wave.
Blocked plan
- no
status:plan-review - blocker comment posted
- MAJOR findings remain
Operational lessons
- Fresh planning worktrees reduce collisions with a dirty primary checkout.
- For planning-only waves, not editing
docs/plans/README.mdis a good collision-avoidance rule. - Worker success messages can overstate local artifact placement; trust live evidence plus git provenance, not the terminal summary alone.
- If a worker used a sandbox/in-repo alternate worktree, GitHub may already be correct while the orchestrator's external worktree stays unchanged.
Morning handoff format
Report per issue:
- issue number
- GitHub status label verified or not
- local artifact presence verified or not
- remote-branch artifact presence verified or not
- disposition:
- cleanly ready for approval
- ready on GitHub but artifact reconciliation needed
- blocked / needs rewrite