whatisgithub

What is loop-engineering?

cobusgreyling/loop-engineering — explained in plain English

Analysis updated 2026-05-18

141JavaScriptAudience · developerComplexity · 3/5LicenseSetup · easy

In one sentence

A collection of patterns and CLI tools for building automated systems that run AI coding agents on a schedule, called loop engineering.

Mindmap

mindmap
  root((loop-engineering))
    What it does
      Automated AI loops
      Scheduled agent runs
      Control logic patterns
    Tech stack
      JavaScript
      npm CLIs
      MCP
    Use cases
      Issue triage
      PR review automation
      Dependency updates
    Audience
      Developers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Set up a daily scheduled loop that triages new GitHub issues automatically

USE CASE 2

Watch open pull requests for problems and flag them for review

USE CASE 3

Estimate token cost of a planned automation loop before running it

USE CASE 4

Scaffold a starter automation project for Claude Code, Codex, or Grok

What is it built with?

JavaScriptNode.jsnpmMCP

How does it compare?

cobusgreyling/loop-engineeringamitkumardemo/edgecareerpolymarket-sports/polymarket-trading-bot
Stars141142142
LanguageJavaScriptJavaScriptJavaScript
Setup difficultyeasymoderatehard
Complexity3/53/54/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 30min

Tools are published to npm and runnable via npx without a separate install step.

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

So what is it?

Loop engineering is a way of working with AI coding tools where, instead of typing prompts yourself, you design automated systems that send the prompts for you. The central idea, credited to Boris Cherny (Head of Claude Code at Anthropic) and Addy Osmani, is that a developer's job is shifting from writing individual instructions to writing the control logic that decides what to tell an AI agent, when, and what to do with the result. This repository collects practical patterns, starter projects, and CLI tools that put that idea into practice. The repo organizes its material around seven named patterns, each suited to a different recurring task: triaging issues on a daily schedule, watching pull requests for problems, sweeping for failing tests, updating dependencies, drafting changelogs, cleaning up after merges, and sorting new issues by priority. Each pattern comes with a markdown description, a recommended cadence (how often to run it), and a "starter" folder you can copy into your own project as a starting point. Three small command-line tools ship alongside the patterns. loop-audit checks how ready a project is to run automated loops and gives it a readiness score with suggestions. loop-init scaffolds a starter setup for a chosen pattern and AI tool combination (currently Grok, Claude Code, or Codex). loop-cost estimates how many tokens a given loop will consume per run, which helps budget before committing to a cadence. All three are published to npm and can be run without installing them first using the npx command. The building blocks the patterns draw on are: scheduling (running on a timer), worktrees (isolated copies of the codebase for safe parallel work), skills (saved project context the AI can recall), external tool connections (via the MCP protocol), sub-agents (separate AI instances handling specific steps), and a persistent state file that keeps memory across runs. A flowchart in the README shows how these connect: schedule triggers triage, triage reads and writes state, a sub-agent implements, another sub-agent verifies, and the result either merges automatically or escalates to a human depending on risk level. The license is MIT.

Copy-paste prompts

Prompt 1
Use loop-init to scaffold a starter project for the issue-triage pattern with Claude Code.
Prompt 2
Run loop-audit on my project and explain the readiness score it gives me.
Prompt 3
Estimate the token cost of a daily PR-review loop using loop-cost.
Prompt 4
Explain how sub-agents, worktrees, and a persistent state file fit together in a loop-engineering pattern.

Frequently asked questions

What is loop-engineering?

A collection of patterns and CLI tools for building automated systems that run AI coding agents on a schedule, called loop engineering.

What language is loop-engineering written in?

Mainly JavaScript. The stack also includes JavaScript, Node.js, npm.

What license does loop-engineering use?

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

How hard is loop-engineering to set up?

Setup difficulty is rated easy, with roughly 30min to a first successful run.

Who is loop-engineering for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.