chore(.dev): add Phase 3 batch step to consolidate ready-to-merge waves#59
Merged
Conversation
Adds PROMPT_dependency_batch.md and a Phase 3 invocation to dependency.sh. After Phase 2 drains, if ≥2 PRs are ralphie:ready-to-merge AND share at least one touched file path (in practice always pnpm-lock.yaml), Phase 3 opens a single batch PR off fresh origin/main that combines their package.json edits, regenerates the lockfile once, verifies the combined diff (lint/build/check:links), and closes the constituents with ralphie:replaced-by-newer-pr. Motivates: today's wave required manually batching #52 and #53 after merge-cascade conflicts. Same pattern will repeat weekly per the Dependabot schedule; this automates it. New flags: - --batch-only: skip Phase 1+2, batch the current ready set. - --no-batch: skip Phase 3 entirely. dependency-rules.md gains a Phase 3 section: eligibility gates (≥2 ready, ≥1 file overlap), batchable edit shapes (pnpm.overrides, dependencies versions, same-package version conflicts take the higher), verification recipe, outcomes table, batch PR body shape, and constituent comment shapes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
docs-preview | 97b42c6 | Commit Preview URL Branch Preview URL |
May 13 2026, 03:36 PM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a third phase to the dependency loop: after Phase 2 drains, if ≥2 PRs are
ralphie:ready-to-mergeand share at least one touched file path (in practice alwayspnpm-lock.yaml), open a single batch PR combining theirpackage.jsonedits, regenerate the lockfile once, and verify the combined diff. Constituents are closed withralphie:replaced-by-newer-prand a comment pointing at the batch.Avoids the rebase cascade that played out today: 7 ready PRs, merge the first, the other 6 go stale, manually rebase each. Phase 3 turns that into one merge.
New files / flags
.dev/PROMPT_dependency_batch.md— the Phase 3 session prompt (consistent shape with Phase 1+2 prompts)..dev/dependency.sh— Phase 3 invocation after Phase 2, plus--batch-only(skip 1+2) and--no-batch(skip 3)..dev/dependency-rules.md— new Phase 3 section: eligibility gates, batchable edit shapes, same-package version conflict rule (take the higher), verification recipe, outcomes table, PR body shape, comment shapes.Eligibility gates
Phase 3 only proceeds when all hold:
ralphie:ready-to-merge(excludingchore/batch-*head refs — no infinite recursion).Failure mode
If the combined verify fails (interaction effects between bumps), Phase 3 discards the batch branch and leaves all constituents individually mergeable with a comment explaining what broke. The maintainer drains serially.
Test plan
bash -n .dev/dependency.sh(syntax).dev/dependency.sh --helpprints the new flagsralphie:ready-to-merge(likely after the next Phase 2 pass), then./.dev/dependency.sh --batch-onlyto exercise just Phase 3. Expect one batch PR with auto-merge enabled and the constituents closed.🤖 Generated with Claude Code