All loops

Engineering

Dependency triage loop

A recurring loop that sweeps your open Dependabot PRs, merging the safe bumps, fixing failing CI, flagging the risky ones with a written assessment, and posting a digest to Slack.

Trigger
Recurring sweep over open Dependabot PRs
Goal
Clear the safe updates, fix what's broken, and rank the rest by risk
Artifact
Safe bumps merged, CI fixes pushed, risky bumps assessed, plus a Slack digest of everything it did
Handoff
You review what it merged and make the call on anything risky
Tools
Claude Code · GitHub CLI (gh) · Slack (MCP)
The loop, ready to run
Review all open Dependabot pull requests on this repository and process each one.

1. List all open PRs authored by Dependabot:
   gh pr list --author "app/dependabot" --state open --json number,title,headRefName,statusCheckRollup

2. For each open PR, spawn an agent (Agent tool, isolation: "worktree") to handle it
   independently. Each agent should:

   a. Check out the PR branch in its worktree.
   b. Determine CI status from the PR's status checks.

   If CI is FAILING:
   - Read the failure logs: gh pr checks <number>, then gh run view <run-id> --log-failed
   - Identify the root cause of the failure.
   - Attempt a fix: update code, configuration, or tests as needed.
   - Commit the fix and push to the PR branch.
   - If you are unable to fix it, comment your findings on the PR.

   If CI is PASSING:
   - Review the full changeset: gh pr diff <number>
   - Read the dependency's changelog / release notes if available.
   - Evaluate risk:
     - Is this a major version bump? (higher risk)
     - Are there breaking changes noted in the changelog?
     - Does it touch a security-sensitive dependency?
     - Is it a patch/minor update with only bug fixes? (lower risk)
   - If the update appears SAFE (patch/minor with no breaking changes):
     merge it with gh pr merge <number> --squash
   - If the update appears RISKY (major bump, breaking changes, or uncertainty):
     comment a detailed risk assessment on the PR explaining what you found and
     why you chose not to auto-merge.

3. After all agents complete, compile a summary of every action taken and send it to
   your Slack channel (replace <your Slack channel> with the channel ID) using the
   Slack MCP tool. Include:
   - Total PRs reviewed
   - PRs merged (with dependency name and version)
   - PRs where fixes were pushed (with a description of the fix)
   - PRs left for manual review (with a risk-assessment summary)
   - Any PRs that couldn't be processed, and why

If there are no open Dependabot PRs, send a short "No open Dependabot PRs" message to
your Slack channel.

Get the next loops

I add new loops as I run them on real work — with the full prompt, the trigger setup, and what breaks. Drop your email and I'll send the next ones.

No spam. The loops, plus the occasional note on building with AI. Unsubscribe anytime.

Powered by Buttondown