cobusgreyling/loop-engineering

Practical patterns, starters & CLI tools for loop engineering with AI coding agents. Design systems that prompt and orchestrate agents (inspired by Addy Osmani and Boris Cherny). Includes loop-audit, loop-init, loop-cost.

What it solves

Loop Engineering provides a framework for moving from manual prompting of AI coding agents to designing automated control systems (loops) that orchestrate agents over time. It solves the problem of repetitive manual intervention by creating structured, repeatable patterns for agentic workflows like triage, PR management, and CI maintenance.

How it works

The system uses a set of primitives to build autonomous loops. These include:

  • Automations/Scheduling: Triggers for discovery and triage on a set cadence.
  • Worktrees: Isolated environments for safe parallel execution of fixes.
  • Skills: Persistent project-specific knowledge.
  • Plugins/Connectors: Integration with external tools via the Model Context Protocol (MCP).
  • Sub-agents: A split between "maker" and "checker" agents for implementation and verification.
  • Memory/State: A durable record of progress outside of individual chat sessions.

It provides a unified CLI (@cobusgreyling/loop) to scaffold these loops, audit their readiness, estimate token costs, and manage state synchronization.

Who it’s for

Developers using AI coding agents such as Grok, Claude Code, Codex, Cursor, and Opencode who want to automate their development lifecycle.

Highlights

  • Production Patterns: Includes 7 pre-defined patterns such as Daily Triage, PR Babysitter, and CI Sweeper.
  • Loop Ready Score: A diagnostic tool to measure the maturity and readiness of a loop design.
  • Unified Tooling: A suite of npm packages for initialization, auditing, cost estimation, and context management.
  • Phased Rollout: A recommended path from report-only (L1) to assisted fixes (L2) and finally unattended automation (L3).