Add @claude delegation, auto-merge, and rebase handling
Merged
DO
7mo ago+140+140+012345678901234567890123456789-13-13-01234567890123456789
Summary
- When council escalates a PR in a Claude-enabled org, post a follow-up
@claudecomment with specific fix instructions from the council findings - On approval: enable auto-merge (
--auto --squash), rebase if branch is behind base, removeneeds-human-reviewlabel - Cycle guard (
MAX_REVIEW_CYCLES, default 3) prevents infinite@claudedelegation loops - New repo variables:
CLAUDE_ORGS(comma-separated org list),MAX_REVIEW_CYCLES
Lifecycle
Council finds issues → @claude fix instructions → Claude pushes →
next cron re-reviews (SHA changed) → if clean → approve + auto-merge
Test plan
- Dry-run against a PR in petry-projects org with
CLAUDE_ORGSset - Verify @claude comment format in dry-run output
- Verify auto-merge command in dry-run output for approved PRs
- Verify cycle guard stops delegation after MAX_REVIEW_CYCLES
🤖 Generated with Claude Code