Parent: #54
Problem
Plan branches auto-merge into the phase branch without human PR review. Users want this to be configurable at two levels:
- Plan PR review — require human review before merging plan PRs into the phase branch
- Phase PR review — require human review of the phase PR before completing the phase
Changes
1. Config keys (.planning/config.json)
Add under workflow:
"plan_pr_review": false,
"phase_pr_review": false
Both default false (preserves current auto-merge behavior).
2A. Config reading (execute-phase.md, after step 0)
PLAN_PR_REVIEW=$(cat .planning/config.json 2>/dev/null | grep -o '"plan_pr_review"[[:space:]]*:[[:space:]]*[^,}]*' | grep -o 'true\|false' || echo "false")
PHASE_PR_REVIEW=$(cat .planning/config.json 2>/dev/null | grep -o '"phase_pr_review"[[:space:]]*:[[:space:]]*[^,}]*' | grep -o 'true\|false' || echo "false")
2B. Plan PR review gate (execute-phase.md, step 4, lines 395-449)
When PLAN_PR_REVIEW=false: No change.
When PLAN_PR_REVIEW=true:
- Push plan branch, create PR as ready for review (not draft), assign
default_reviewer
- Do NOT merge plan branch, do NOT close sub-issue
- Update STATE.md PR column to
pr#N(review)
- After all plans in wave have PRs → STOP with pending PR links
Re-entry detection (between step 3 and step 4):
- Check if completed plans have unmerged PRs
- If any
OPEN → STOP with waiting message
- If all
MERGED → update STATE.md to pr#N(merged), proceed
2C. Phase PR review gate (execute-phase.md, step 8.5)
When PHASE_PR_REVIEW=true:
- Push phase branch, promote PR to ready-for-review, assign reviewer
- Do NOT close feature issue, do NOT create HANDOFF.md, do NOT commit completion
- STOP with phase PR link
Re-entry detection (step 0.8):
- Check VERIFICATION.md + phase PR status via
gh pr view
- If
MERGED → complete deferred finalization
- If
OPEN → STOP
Settings UI (settings.md)
Add 2 new questions to step 3, update config writing and confirmation table.
Documentation
planning-config.md — document keys + <pr_review_config> section
state.md template — add pr#N(review) and pr#N(merged) column values
Files
.planning/config.json
.claude/commands/vit/execute-phase.md (zones 2A, 2B, 2C)
.claude/commands/vit/settings.md
.claude/vit/references/planning-config.md
.claude/vit/templates/state.md
Parent: #54
Problem
Plan branches auto-merge into the phase branch without human PR review. Users want this to be configurable at two levels:
Changes
1. Config keys (
.planning/config.json)Add under
workflow:Both default
false(preserves current auto-merge behavior).2A. Config reading (
execute-phase.md, after step 0)2B. Plan PR review gate (
execute-phase.md, step 4, lines 395-449)When
PLAN_PR_REVIEW=false: No change.When
PLAN_PR_REVIEW=true:default_reviewerpr#N(review)Re-entry detection (between step 3 and step 4):
OPEN→ STOP with waiting messageMERGED→ update STATE.md topr#N(merged), proceed2C. Phase PR review gate (
execute-phase.md, step 8.5)When
PHASE_PR_REVIEW=true:Re-entry detection (step 0.8):
gh pr viewMERGED→ complete deferred finalizationOPEN→ STOPSettings UI (
settings.md)Add 2 new questions to step 3, update config writing and confirmation table.
Documentation
planning-config.md— document keys +<pr_review_config>sectionstate.mdtemplate — addpr#N(review)andpr#N(merged)column valuesFiles
.planning/config.json.claude/commands/vit/execute-phase.md(zones 2A, 2B, 2C).claude/commands/vit/settings.md.claude/vit/references/planning-config.md.claude/vit/templates/state.md