- Parse
RUNBOOK.yamlin repo root → find the next epic withstatus: pending - Check
lock.active_claim→ if another session claimed an epic and TTL hasn't expired, do NOT claim any epic. Ask the user what to do (wait, override, or work on something else). Never silently pick a different epic. - Read the latest handoff at
~/.copilot.working/sessions/for this project - Run
git statusandpython -m pytest --tb=short -qto verify clean state (currently 1356+ tests passing)
- Update
RUNBOOK.yaml:- Set
lock.active_claimto the epic ID - Set
lock.claimed_byto{date}-{session-id} - Set
lock.claimed_atto current ISO 8601 timestamp - Set the epic's
statustoclaimed
- Set
- Do NOT commit this change — it's local working state only
Resuming OpenSpace upgrade.
Epic {id}: {title} (Phase {phase})
Last session: {handoff summary or "fresh start"}
Starting epic cycle.
- Use
brainstormingskill if design decisions needed - Use
writing-plansskill to create implementation plan - Create feature branch:
epic/{phase}.{number}-{name}
- Use
subagent-driven-developmentskill with TDD - RED → GREEN → REFACTOR for every change
- Commit frequently with descriptive messages
- Run full pytest suite:
python -m pytest --tb=short -q - ALL tests must pass (currently 1028+)
- If tests fail: fix before proceeding. Do NOT skip.
git push origin {branch}- Create PR if not exists (link to GitHub issue, set milestone)
- Launch /8eyes multi-agent review (minimum 3 models)
- Collect findings from all roles
- Launch /collab multi-model buyoff (top-tier models per provider)
- Collect findings
- Address ALL findings from Step 5 + 6
- Re-run full test suite after fixes
- Commit fixes, push
- Track review round in
RUNBOOK.yamlepic'sreview_roundfield - HARD CAP: 3 rounds maximum
- If round 3 still has findings:
git stashorgit resetto pre-fix state- Update epic status to
blockedin RUNBOOK.yaml /handoffwith detailed findings- STOP — human intervention required
- If all roles PASS: proceed to Step 9
- Update epic status to
in_reviewin RUNBOOK.yaml - Ensure PR has: linked issue, milestone, passing CI
- DO NOT merge yourself — human approves the PR
- Wait for human approval, or
/handoffand stop
- After human merges: the PR itself should include the RUNBOOK.yaml update
setting the epic's
statustomerged(include in the epic branch, not main) - Clear local lock: set
lock.active_claimto null locally - Do NOT commit RUNBOOK.yaml directly to main — all changes go through PR review (CODEOWNERS requires admin approval for RUNBOOK.yaml)
- Check context health (
/healthor estimate) - If context < 60% used: claim next epic, go to Step 1
- If context ≥ 60% used:
/handoffand STOP (human restarts fresh session) - If no more epics in current phase: check if next phase prerequisites are met
- If all P7 epics merged: PROJECT COMPLETE 🎉
- After completing a review round (before starting next round)
- After merging an epic (before starting next epic)
- Context ≥ 60% used
- Review round 3 still has findings (blocked)
- Design decision needed that requires human judgment
- Any error you can't resolve in 3 attempts
- Session has been running for 3+ hours
- No epic ships without /8eyes + /collab review — both required, every time (honor system — CI does not enforce this; discipline is the gate)
- No merge without full test suite passing — zero exceptions
- No skipping phases — CI enforces via phase-config.yml
- No self-merge — human clicks Approve (merge_policy: human_approval)
- 3-round review cap — abort + handoff, don't thrash
- Claim before building — prevents concurrent session conflicts
- /handoff before context exhaustion — never lose state
- Include RUNBOOK.yaml status update in epic PRs — reviewed via CODEOWNERS
| Situation | Action |
|---|---|
| Session crash before /handoff | Next session: read RUNBOOK.yaml + git state. Epic with claimed status and expired TTL → reclaim and continue. Review state may be lost — re-run /8eyes from the current branch state. |
| Tests fail after fix | Debug with systematic-debugging skill. 3 attempts max, then /handoff. |
| /8eyes or /collab unavailable | /handoff with note. Do NOT skip review. |
| Merge conflict with main | Rebase, re-test, re-push. If complex: /handoff. |
| Design decision needed | Ask user with ask_user tool. If user unavailable: /handoff. |
| CI blocks merge | Read CI error. Fix if phase/milestone issue. If unclear: /handoff. |