Dependabot Consolidator
Codifies the recipe proven on kina PR #36: collect open Dependabot PRs, consolidate into one tested branch and PR, verify with baseline-diff gates, and close out on operator approval. Single-repo, operator-supervised scope.
Scope: Dependabot only
List open Dependabot PRs with:
gh pr list --author "app/dependabot" --state open \
--json number,title,headRefName,files
Warning: never touch human-authored PRs in the same pass. The --author app/dependabot filter is the guard; verify it returns only bot-authored entries before proceeding.
Decide grouping: ecosystem and risk
Classify each PR as config-only Actions or code/package bump before creating the branch. Decision: consolidate-all vs split-actions-from-code.
- Config-only Actions bumps (
.github/workflows/*.ymlonly): validated authoritatively by real GitHub CI running on the pushed branch. Low risk; consolidate freely. - Language/package bumps (Cargo.toml, package.json, go.mod, etc.): breaking MAJORs may need local compile, test, and code changes. Higher risk; consider splitting from Actions bumps if any contain MAJOR version changes.
See references/group-by-risk.md for the full ecosystem × risk taxonomy.
Consolidation procedure
Create branch and cherry-pick each Dependabot PR head in order:
git fetch origin
git checkout -b chore/consolidate-dependabot origin/main
For each PR (ordered low-risk first, MAJOR bumps last):
git cherry-pick <pr-head-sha>
Conflict rule — keep every bump: Dependabot PRs each target a distinct dependency. When cherry-pick conflicts arise, keep both sides (each bump targets a different line/package). Do not drop either side.
Pin-style preservation: Dependabot updates pins in two styles — @v4 major tag and full commit SHA with a # vX.Y.Z trailing comment. Read the file before cherry-picking to know which style applies; preserve that style after merge.
Lockfile handling: Before assuming a lockfile needs a manual update, run git check-ignore <lockfile>. If the lockfile is tracked, commit the updated version. For Cargo: cargo update -p <dep> for the specific crate only — do not run a global cargo update.
See references/consolidation-algorithm.md for full cherry-pick mechanics and edge cases.
Verify with baseline-diff gates
THE key insight: run each gate on the merge-base (main) FIRST, then on the branch. Only a NEW failure — one that does not appear on main — is a regression worth blocking on.
Gate discipline:
- Identify the gates:
cargo test,npm test, lint, type-check, build, integration scripts. - Run each gate on
main/ merge-base. Capture output. Record pass/fail per gate. - Checkout the consolidated branch. Run the same gates. Capture output.
- Diff: classify only gates that were PASSING on main and are now FAILING on branch as blocking.
- Gates that fail identically on both sides are pre-existing failures — not regressions.
Local integration gates: some gates cannot run in GitHub CI (Apple Container cluster spawn, hardware-dependent tests). Run these on the operator machine under the same baseline-diff discipline. See references/local-integration-gates.md and /core:container for container-spawn patterns.
See references/baseline-diff-verification.md for worked kina examples and the full gate enumeration workflow.
Use /github:act to replay GitHub CI gates locally before pushing. See /github:workflows for workflow file interpretation.
Merge and close out
Gate before merging:
- Green on local gates (baseline-diff verified)
- Green on remote CI (
gh pr checks— all checks passing) - Explicit operator go-ahead
After operator approval:
gh pr merge <consolidated-pr-number> --squash --match-head-commit <headRefOid>
Fetch <headRefOid> with gh pr view <consolidated-pr-number> --json headRefOid -q .headRefOid
immediately before merging — a bare gh pr merge --squash with no --match-head-commit is
blocked by the claude-skills-340 merge-write gate and can silently merge a commit that landed
after review. No attribution in the squash commit message.
For each superseded Dependabot PR, comment then verify closure:
gh pr comment <n> -b "Addressed by #<consolidated> (consolidated dependency update)"
gh pr view <n> --json state
Verify the state field is MERGED or CLOSED. Do not assume Dependabot auto-closes — confirm with gh pr view for each one.
See references/merge-and-closeout.md for the full close-out checklist.
Delegation
Hand mechanical cherry-picking to agents/dependabot-consolidator-worker.md. Read-only PR collection goes to agents/dependabot-collector.md.
Stop-and-report gates (worker must halt, not thrash):
- Conflict that cannot be resolved with keep-both (same line, competing values) → STOP, report the conflicting PRs and the specific file/line
- Non-trivial dependency API break requiring code changes → STOP, report the bump and the compilation error
- A baseline-diff gate that was green on main but fails on branch → STOP, report the gate name and diff of outputs
Hard constraint: agents never merge unilaterally. Merge is operator-approved and executed by the skill's close-out step.
Registration
See references/registration.md for the build checklist covering marketplace.json, plugin.json, sources.toml, and sources.md edits, plus the two validators to run before committing.
Related skills
/core:anti-fabrication— never claim a gate passed without showing command output/core:container— local integration gates using Apple Container/github:act— replay CI gates locally before push/github:workflows— read and interpret workflow files/github:actions— understand action versions and pin styles
Anti-Fabrication
- Never claim a gate passed without showing the command and its output verbatim.
- Always run the baseline gate on
mainbefore blaming a bump for a failure. - Confirm PR closure with
gh pr view <n> --json state— do not assert "Dependabot closed it." - Verify pin style by reading the file with the Read tool before asserting
@v4vs full-SHA style. - When reporting cherry-pick conflicts, show the exact
git statusoutput, not a paraphrase.
See /core:anti-fabrication for the full discipline.