Repolode
cobusgreyling

cobusgreyling/loop-engineering

A pattern library and CLI toolkit for designing loops that let AI coding agents discover work, act on it, verify results and persist state.

Stars
11,701
Forks
1,576
Open issues
17
Last commit
yesterday

What is it?

Loop Engineering is a collection of patterns, starter templates and command-line tools for running AI coding agents as repeatable loops around a codebase. Instead of typing the next prompt by hand, you define a system that discovers work (such as failing CI, open issues or stale dependencies), hands tasks to an agent, checks the output and records state in files like STATE.md.

The repository includes eight ready-to-adapt patterns, including Daily Triage, PR Babysitter, CI Sweeper, Dependency Sweeper and Changelog Drafter. Each pattern has a cadence, an autonomy level from report-only (L1) to unattended (L3), and a rough cost estimate. Example setups are provided for Claude Code, Grok, Codex, OpenClaw, Opencode and GitHub Actions, and a unified CLI (npx @cobusgreyling/loop) offers init, doctor, status, audit and cost commands.

The project also documents failure modes, anti-patterns and safety guidance, and recommends rolling out from report-only runs to assisted and then unattended operation only after the verifier has proven reliable.

Key features

  • 01Eight reusable loop patterns with cadence, autonomy level and cost guidance.
  • 02Unified CLI with init, doctor, status, audit and cost commands.
  • 03Example setups for Claude Code, Grok, Codex, OpenClaw, Opencode and GitHub Actions.
  • 04A thin GitHub Action loop starter that needs no STATE.md file.
  • 05Documentation on failure modes, anti-patterns and safety.

Use cases

  • Keeping a repository healthy by having an agent triage issues and check CI on a schedule.
  • Automatically babysitting pull requests and dependency updates with human review.
  • Adding a report-only agent loop to an existing project before granting it write access.
  • Drafting changelogs from tags or recent merges.

Quick start

  1. 1

    Initialize the daily-triage pattern in your repo with the Claude tool

    npx @cobusgreyling/loop init . --pattern daily-triage --tool claude
  2. 2

    Check the setup with the doctor command

    npx @cobusgreyling/loop doctor .

Things to know

  • Week one is report-only, so the loop does not act on work until you roll out higher levels.
  • Running loops with AI agents can incur significant token costs.

In collections

Topics

FAQ

What is loop-engineering?
A pattern library and CLI toolkit for designing loops that let AI coding agents discover work, act on it, verify results and persist state. Loop Engineering is a collection of patterns, starter templates and command-line tools for running AI coding agents as repeatable loops around a codebase. Instead of typing the next prompt by hand, you define a system that discovers work (such as failing CI, open issues or stale dependencies), hands tasks to an agent, checks the output and records state in files like STATE.md.
Is loop-engineering free to use? What license does it have?
loop-engineering is open source under the MIT license. Check the license terms before using it in commercial products.
Is loop-engineering still maintained?
Actively maintained. The last commit to loop-engineering was on Nov 5, 2026.
What can I use loop-engineering for?
Keeping a repository healthy by having an agent triage issues and check CI on a schedule. Automatically babysitting pull requests and dependency updates with human review. Adding a report-only agent loop to an existing project before granting it write access. Drafting changelogs from tags or recent merges.
How do I install loop-engineering?
Initialize the daily-triage pattern in your repo with the Claude tool: npx @cobusgreyling/loop init . --pattern daily-triage --tool claude Check the setup with the doctor command: npx @cobusgreyling/loop doctor .
Where can I get loop-engineering?
The source code and installation instructions are on GitHub: https://github.com/cobusgreyling/loop-engineering

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects