feat: add no-arg multi-repo mode to discover/plan, self-merging Finalize - #20
Conversation
discover.sh and plan.sh now support running with no repo argument, fanning out across every repo under PROJECT_REPOS_DIR (or the subset that qualifies) in one interactive session instead of requiring one invocation per repo. - discover.sh (no arg): every repo under PROJECT_REPOS_DIR qualifies (no TASKS.md prerequisite), so it attaches the whole directory as one --add-dir; the skill enumerates repo subdirectories itself. - plan.sh (no arg): bash filters to repos with a TASKS.md containing unchecked items (same gate overnight.sh's run_repo uses) before claude ever launches, then attaches one --add-dir per qualifying repo. - Both skills gained a multi-repo mode: analysis fans out in parallel via Agent-tool dispatch (one per repo for discover, one per item across all attached repos for plan), then review/approval/write/ finalize happens serially, one repo at a time, in order. - Finalize in both skills now merges its own PR (gh pr merge --squash --delete-branch) once approved, then checks out the default branch and pulls latest. This closes a gap where plan couldn't see items discover just found (and overnight couldn't see plan's numbering) until someone merged the PR by hand. Scoped narrowly in .claude/settings.json to gh pr merge on chore/tasks-discover-* and chore/tasks-plan-* branches only -- raw git merge stays denied everywhere, and overnight.sh's task/housekeeping PRs are untouched. - README updated: new discover.sh section, expanded plan.sh section, no-arg forms in Scripts/Usage, and an explicit Safety model callout for the merge exception and its scope.
|
Warning Review limit reached
Next review available in: 32 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe scripts now support single- and multi-repository operation. Discovery and planning skills process repositories with separate state, approval gates, sequential finalization, and approved bookkeeping PR merges. Documentation and Claude permissions describe the new workflows. ChangesTask workflow expansion
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant discover.sh
participant discover-tasks
participant plan.sh
participant plan-tasks
participant repositories
participant bookkeeping PRs
discover.sh->>discover-tasks: start discovery for one or all repositories
discover-tasks->>repositories: dispatch discovery agents
plan.sh->>plan-tasks: select repositories with unchecked tasks
plan-tasks->>repositories: investigate tasks in parallel
discover-tasks->>bookkeeping PRs: finalize and merge approved discovery changes
plan-tasks->>bookkeeping PRs: finalize and merge approved planning changes
bookkeeping PRs->>repositories: refresh default branches after successful merges
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.claude/settings.json:
- Around line 26-28: Add narrow allowlist entries in the settings configuration
alongside the existing Bash rules for pushing the chore/tasks-discover-* and
chore/tasks-plan-* branches, and for running git -C * pull:*. Keep the
permissions scoped to these branch patterns and pull command form without
broadening unrelated Git or GitHub operations.
In @.claude/skills/discover-tasks/SKILL.md:
- Around line 55-57: Before the discovery Finalize flow runs gh pr create in
.claude/skills/discover-tasks/SKILL.md (lines 55-57), run the target
repository’s full test suite defined by its CLAUDE.md and do not create the PR
if it fails; apply the same test gate before PR creation in
.claude/skills/plan-tasks/SKILL.md (lines 54-56), while preserving the existing
approval and merge steps.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 3de3f992-37fb-45ca-b8b7-36b581c68822
📒 Files selected for processing (6)
.claude/settings.json.claude/skills/discover-tasks/SKILL.md.claude/skills/plan-tasks/SKILL.mdREADME.mddiscover.shplan.sh
Finalize in both discover-tasks and plan-tasks pushes chore/tasks-discover-* /chore/tasks-plan-* branches and runs git -C <repo> pull post-merge, but neither was in the allowlist -- only overnight/* pushes were. Adds narrow allow rules for both branch patterns (plain and -C * forms, matching the existing overnight/* pattern) and for git pull, which doesn't need branch scoping since it can't push anything. Flagged by CodeRabbit on #20.
Summary
discover.sh/plan.shnow support running with no repo argument, fanning out across every qualifying repo underPROJECT_REPOS_DIRin one interactive session (parallel analysis dispatch, serial per-repo review/approval/finalize) instead of one invocation per repo.gh pr merge --squash --delete-branch) once you've approved its content, then checks out the default branch and pulls latest — closing the gap whereplancouldn't see itemsdiscoverjust found (andovernightcouldn't seeplan's numbering) until someone merged the PR by hand..claude/settings.jsongains two narrowly-scopedgh pr mergeallow rules (chore/tasks-discover-*,chore/tasks-plan-*only) — rawgit mergestays denied everywhere, andovernight.sh's task/housekeeping PRs are untouched.discover.shsection, expandedplan.shsection, no-arg forms documented, and an explicit Safety model callout for the merge exception and its scope.Test plan
bash -n discover.sh/bash -n plan.sh— syntax validplan.sh's bash-side TASKS.md gate verified against synthetic repos (open tasks / all-checked / no TASKS.md) — correct qualify/skip behavior--add-diraccepts multiple repeated flags in oneclaudeinvocation — verified empirically with a headless test session.claude/settings.jsonvalidated as well-formed JSONpnpm discover/pnpm planagainst a real multi-repoPROJECT_REPOS_DIR(needs a real target-repo setup to exercise)🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Documentation