Loops

Loops: recurring engineering work, handed to an agent.

A loop is a way for an agent to work autonomously toward a goal you define. A clear trigger fires it, a clear goal tells it when it's done, and it hands you back a reviewable artifact, not a decision.

These are the loops I run on real engineering work. Some I use every week; one I'm building next. The full prompt for each one is right here on the page. Copy it, run it, make it yours.

Browse the loops →

How a loop works

Every loop on this page has the same four parts. Once you see the pattern, you can build your own.

Trigger

What starts it. A schedule, a new release, a merged PR, an opened issue.

Goal

What "done" means. Deterministic ("all tests pass") or inferred by the model ("until the architecture is clean").

Artifact

What it hands back. A review surface you can scan, or a small action it took and reported when the call was safe and obvious.

Handoff

Where your judgment takes over. The loop does the legwork; you make the calls that matter.

The whole point: loops do the legwork. The judgment stays with you.

The loops

If you have Dependabot or Renovate on, you know the pile. A stack of updates lands and they are not equally important: some are boring patch bumps, some are security fixes, some look small until you realize they touch a risky part of the stack.

This loop works the pile so you don't merge blind: it clears the safe bumps, fixes what's broken, and ranks the rest by risk.

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 · failing CI diagnosed and fixed · risky bumps left with a written assessment · a Slack digest of everything it did
Handoff
You review what it merged and make the call on anything risky

It merges the boring, safe bumps and pushes obvious CI fixes. The risky ones it leaves untouched with a written assessment: major bumps, breaking changes, anything uncertain. Your attention goes to the calls that actually need a human.

View loop & copy the config →

You merge a PR. Did it actually ship? Most teams can't answer that without digging through releases and compare views by hand. And the open PRs you're waiting on: are their deploy gates finally clear, or still blocked on something upstream?

This loop answers both, read-only: what shipped, whether your merged work made it into a release, and which open-PR gates have cleared.

Trigger
Recurring sweep, typically each morning (default window: past 24 hours)
Goal
Confirm what shipped and whether open-PR deploy gates have cleared
Artifact
A Shipping Status report: releases in the window · your shipped work · merged-PR → first-release table · open-PR gate status · follow-up questions
Handoff
You decide which follow-ups to act on

It takes no write actions: no merges, no label changes, no messages. Every suggestion comes back as a question you approve later. A review surface, not an actor.

View loop & copy the config →

The problem with docs isn't that nobody knows they matter. It's that implementation moves, releases ship, setup steps change, and the docs quietly fall behind because nobody is explicitly watching for it.

This loop watches for it: it reads your code and your docs, finds where they've diverged, fixes the clear low-risk drift itself, and flags the rest.

Trigger
Recurring sweep over recent git history and the working tree
Goal
Find where code and docs have diverged, and close the gap where it's safe
Artifact
Clear low-risk docs fixes committed and pushed · ambiguous gaps reported with exact files and a suggested update
Handoff
You decide on the ambiguous gaps it didn't touch

It only auto-fixes drift that's clear and low risk: docs-only, verified, conventional commit. Anything ambiguous it leaves alone and reports, with the exact source and stale docs, for you to decide.

View loop & copy the config →

I have a recurring team meeting, and before it I want to reconstruct what actually changed since the last one. Not status theater. Not a fake AI standup. Just a clean prep artifact so when it's my turn I can talk clearly about what moved.

Trigger
The meeting cadence
Goal
Reconstruct the week across the systems where work actually happened
Sources
Obsidian notes · Linear issues · Slack threads
Artifact
What changed since last meeting · what I worked on · what shipped · current status · open follow-ups
Handoff
You decide what to emphasize and how to say it

These tools are good at reconstructing a scattered week. They are not good at deciding what matters politically, or how to talk about it in the room. That part stays yours.

View loop & copy the config →

RFC drift loop

The one I'm building

Teams write an RFC, everyone agrees on the plan, then implementation starts moving. Edge cases show up. The rollout changes. A decision gets made in a PR thread. A month later the project is still moving, but the RFC is no longer a clean record of what's actually happening.

This is the one I haven't run yet. It's where I think the pattern goes next. The job isn't to rewrite the RFC behind your back. It's to compare the plan against execution and prepare a drift report.

Trigger
Recurring sweep, or activity on the RFC's implementation
Goal
Compare stated intent against the evidence of what shipped
Artifact
Original assumptions · what changed in implementation · which sections look stale · decision changelog · suggested updates · review questions
Handoff
You decide whether the design actually changed, or the team intentionally moved

This one pushes the pattern further. We're no longer summarizing a surface. We're comparing a system's stated intent against what actually happened.

Follow along as I build it →

The pattern

Not prompts. Not generic background agents. Not "AI engineer, go run the team."

The useful pattern is loops: a clear trigger, a clear goal, a reviewable artifact, and a clean handoff at the judgment boundary.

It gets more interesting once you stop asking "what prompt should I write?" and start asking "what recurring engineering loop should exist here?"

Related repos

Each loop's full prompt lives on its own page above. Copy it and run it from there. These repos hold the broader skills and plugins the loops lean on.

I'm building these in the open.

I add new loops as I run them on real work, and I'm sharing the prompts, the trigger setups, and what breaks. Drop your email and I'll send the next ones (including the RFC drift loop once it's running).

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

Powered by Buttondown