# cobusgreyling/loop-engineering

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/cobusgreyling-loop-engineering).**

_How this analysis was created: the description and tags below were written by an AI model that read this project's README and public documentation pages; stars, license and language come straight from the GitHub API. The model does not read the source code._

11,717 stars · 1,577 forks · TypeScript · MIT

## Links

- GitHub: https://github.com/cobusgreyling/loop-engineering
- Homepage: https://cobusgreyling.github.io/loop-engineering/
- awesome-repositories: https://awesome-repositories.com/repository/cobusgreyling-loop-engineering.md

## Topics

`agentic-ai` `ai-agents` `ai-coding` `anthropic` `automation` `claude` `claude-code` `codex` `coding-agents` `devops-automation` `devtools` `github-actions` `grok` `llm` `loop-engineering` `mcp` `prompt-engineering`

## Description

Loop Engineering is a toolkit of patterns, starter templates, and command-line tools for designing recurring loops that prompt, schedule, and orchestrate AI coding agents. It covers loops such as triage, dependency sweeping, and changelog drafting, each with a suggested cadence, starting autonomy level, and relative cost. Starter files for a chosen pattern and target coding tool can be generated directly into the root of any git project, including the initial state file and setup, with no clone or manual setup.

The project centers on keeping unattended agents under control. Loops advance from report-only to assisted to unattended operation only after the verifier proves correct over a week of runs. A circuit breaker checks a ledger of past attempts and hands control to a human instead of repeating a failing fix. Each fix attempt runs in its own git worktree, and its edits are captured as a reviewable patch that leaves the main working tree untouched. A path-based merge gate checks changed files against denylist and allowlist rules, with an optional file-count cap, before any unattended merge is allowed.

Around that core sit tools for readiness and cost. A readiness auditor scores a repository from 0 to 100, weighting recent run history above files on disk, and lists concrete next steps. A drift check flags mismatches between the loop instructions and the state file. A cost estimator forecasts token spend for a pattern at a given autonomy level, and loops can request a capped extension of their token budget that a human approves. Loop progress, attempt history, and budgets are kept in plain state files.

A tool server built on the Model Context Protocol lets agents fetch patterns, skills, and project state on demand rather than loading all documentation into every prompt. Readiness audits and circuit-breaker checks can also run in a CI pipeline, starting in report-only mode before any automatic fixes are enabled.

## Tags

### Artificial Intelligence & ML

- [Coding Agent Orchestrators](https://awesome-repositories.com/f/artificial-intelligence-ml/agentic-systems-frameworks/agent-orchestration-multi-agent/coordination-and-routing/ai-agent-orchestrators/coding-agent-orchestrators.md) — Offers patterns, starter templates, and command-line tools for designing recurring loops that prompt, schedule, and orchestrate AI coding agents.
- [Agentic Loop Design](https://awesome-repositories.com/f/artificial-intelligence-ml/agentic-loop-design.md) — Provides patterns for recurring agent loops such as triage, dependency sweeping, and changelog drafting, each with cadence, autonomy level, and cost.
- [Autonomy Promotion Stages](https://awesome-repositories.com/f/artificial-intelligence-ml/agentic-loop-design/autonomy-promotion-stages.md) — Advances loops from report-only to assisted to unattended operation only after the verifier proves correct across a week of runs.
- [AI Agent Orchestration Frameworks](https://awesome-repositories.com/f/artificial-intelligence-ml/ai-agent-orchestration-frameworks.md) — Coordinates AI coding agents through scheduled loops with autonomy stages, token budgets, circuit breakers, and human approval gates.
- [Agent Failure Escalation](https://awesome-repositories.com/f/artificial-intelligence-ml/agent-failure-escalation.md) — Checks a ledger of past attempts before each retry and escalates to a human instead of repeating the same failing fix. ([source](https://github.com/cobusgreyling/loop-engineering/blob/main/docs/QUICKSTART.md))
- [Agent Loop Pattern Selection](https://awesome-repositories.com/f/artificial-intelligence-ml/agent-loop-pattern-selection.md) — Offers a catalogue of recurring agent loops such as triage, dependency sweeping, and changelog drafting with suggested cadence, autonomy level, and cost. ([source](https://github.com/cobusgreyling/loop-engineering#readme))
- [Worktree Patch Captures](https://awesome-repositories.com/f/artificial-intelligence-ml/agentic-systems-frameworks/integration-deployment/ai-agent-tooling/coding-agents/agent-change-reviews/worktree-patch-captures.md) — Runs agent commands in a temporary git worktree and saves every edit as a reviewable patch, leaving the main working tree untouched. ([source](https://github.com/cobusgreyling/loop-engineering/blob/main/docs/QUICKSTART.md))

### Development Tools & Productivity

- [Agent Change Merging](https://awesome-repositories.com/f/development-tools-productivity/agent-change-merging.md) — Lets coding agents merge changes unattended while path rules, failure limits, and human approval keep risky changes out.
- [Readiness Audits](https://awesome-repositories.com/f/development-tools-productivity/code-completion-tools/ai-context-completions/project-context-files/readiness-audits.md) — Scores a repository from 0 to 100 on loop readiness, lists concrete next steps, and can generate a score badge. ([source](https://github.com/cobusgreyling/loop-engineering/blob/main/docs/QUICKSTART.md))
- [Model Context Protocol Servers](https://awesome-repositories.com/f/development-tools-productivity/ai-coding-assistants/model-context-protocol-servers.md) — Ships a tool server that lets coding agents fetch loop patterns, skills, and project state on demand instead of loading all documentation into every prompt.
- [Readiness Auditors](https://awesome-repositories.com/f/development-tools-productivity/code-completion-tools/ai-context-completions/project-context-files/readiness-auditors.md) — Provides a command-line auditor that scores a repository from 0 to 100 for loop readiness, weighting recent runs, with next steps.
- [Automated Merge Gates](https://awesome-repositories.com/f/development-tools-productivity/git-branching-merging/automated-merge-gates.md) — Matches changed file paths against denylist and allowlist rules, with an optional file-count cap, before permitting an unattended merge.
- [Path-Based Merge Rules](https://awesome-repositories.com/f/development-tools-productivity/git-branching-merging/automated-merge-gates/path-based-merge-rules.md) — Checks changed files against denylist and allowlist rules with an optional file-count cap before permitting any unattended merge. ([source](https://github.com/cobusgreyling/loop-engineering/blob/main/docs/QUICKSTART.md))
- [Worktree Isolation Tools](https://awesome-repositories.com/f/development-tools-productivity/git-tooling/worktree-isolation-tools.md) — Runs each fix attempt in its own temporary git worktree and captures edits as a reviewable patch, leaving the main tree untouched.
- [Agentic Workflow Isolation](https://awesome-repositories.com/f/development-tools-productivity/git-workflows/agentic-workflow-isolation.md) — Tries agent-made fixes in separate git worktrees so edits become reviewable patches and rejected attempts never touch the main tree.
- [Production-Ready Agent Scaffolders](https://awesome-repositories.com/f/development-tools-productivity/project-scaffolding-config-code-generation/project-scaffolding-configuration/project-scaffolding/plugin-based-scaffolding/agent-scaffolding/production-ready-agent-scaffolders.md) — Generates starter loop configurations and initial state files into any git project for a chosen pattern and target coding tool.

### Business & Productivity Software

- [AI Token Budget Controllers](https://awesome-repositories.com/f/business-productivity-software/financial-operational-management/billing-financial-systems/billing-and-usage/budget-cap-configurations/ai-token-budget-controllers.md) — Lets loops draft a capped, once-per-day request for more tokens that a human approves by editing the budget file. ([source](https://github.com/cobusgreyling/loop-engineering/blob/main/docs/QUICKSTART.md))

### DevOps & Infrastructure

- [Cost Estimators](https://awesome-repositories.com/f/devops-infrastructure/resource-cost-management/cost-estimators.md) — Forecasts token spend for a loop pattern at a given autonomy level so teams can set a budget before running agents. ([source](https://github.com/cobusgreyling/loop-engineering#readme))

### Software Engineering & Architecture

- [Circuit Breakers](https://awesome-repositories.com/f/software-engineering-architecture/circuit-breakers.md) — Checks a ledger of past attempts before each retry and stops repeated failing fixes, handing control to a human instead.
- [Worktree Isolations](https://awesome-repositories.com/f/software-engineering-architecture/parallel-subagent-orchestrators/worktree-isolations.md) — Gives each fix attempt its own git worktree tracked in a manifest so retries never collide and rejected attempts can be swept away. ([source](https://github.com/cobusgreyling/loop-engineering/blob/main/docs/QUICKSTART.md))

### Part of an Awesome List

- [Agent Loop](https://awesome-repositories.com/f/awesome-lists/devtools/agent-loop.md) — Practical design system for agent loops with seven production patterns.
