claudeers.

🔓 unclaimed — this page was auto-generated from GitHub. Are you the creator?

Claim this page →
// Developer Tools

loop-engineering

Practical patterns, starters & CLI tools for loop engineering with AI coding agents. Design systems that prompt and orchestrate agents (inspired by Addy Osma…

Actively maintained
100/100
last commit 1 day ago
last release 9 days ago
releases 1
open issues 19
// install
git clone https://github.com/cobusgreyling/loop-engineering

Loop Engineering

Loop Engineering

Loop engineering is replacing yourself as the person who prompts the agent. You design the system that does it instead.

For developers using Grok, Claude Code, Codex, Cursor, and other AI coding agents.

A loop is a recursive goal: you define a purpose and the AI iterates (often with sub-agents, verification, and external state) until the goal is complete or the loop decides to hand off to you.

Loop Engineering — Design the system that prompts your agents

→ Interactive showcase + pattern picker
→ Loop Engineering essay (Substack)
Canonical essay by Addy Osmani

Contents

Start hereDescription
Loop Engineering essayThe concept, primitives, and Grok mapping — read this first
Pattern PickerWhich loop to run first — start here if unsure
Primitives MatrixGrok vs Claude Code vs Codex — bookmark this
Loop Design ChecklistShip readiness rubric
Patterns7 production patterns + interactive picker
StartersClone-and-run kits (Grok, Claude Code, Codex)
loop-auditLoop Readiness Score CLI (v1.4 + activity detection) — npx @cobusgreyling/loop-audit . --suggest
loop-initScaffold starters + budget/run-log (v1.2) — npx @cobusgreyling/loop-init . --pattern daily-triage --tool grok
loop-costToken spend estimator — npx @cobusgreyling/loop-cost
Goal EngineeringCompanion: Grok Build /goal — run-until-done objectives (npx @cobusgreyling/goal-audit)
StoriesReal wins and honest failures

Why This Matters

Peter Steinberger:

“You shouldn’t be prompting coding agents anymore. You should be designing loops that prompt your agents.”

Boris Cherny (Head of Claude Code at Anthropic):

“I don’t prompt Claude anymore. I have loops running that prompt Claude and figuring out what to do. My job is to write loops.”

The leverage point has moved from crafting individual prompts to designing the control systems that orchestrate agents over time.

The Five Building Blocks + Memory

PrimitiveJob in the Loop
Automations / SchedulingDiscovery + triage on a cadence
WorktreesSafe parallel execution
SkillsPersistent project knowledge
Plugins & ConnectorsReach into your real tools (MCP)
Sub-agentsMaker / checker split
+ Memory / StateDurable spine outside any conversation

Full detail: docs/primitives.md · Cross-tool matrix: docs/primitives-matrix.md

Visual Overview

The Five Building Blocks + Memory — Loop Engineering

Anatomy of a Loop (Mermaid)

flowchart LR
    A[Schedule / Automation] --> B[Triage Skill]
    B --> C[Read + Write STATE / Memory]
    C --> D[Isolated Worktree]
    D --> E[Implementer Sub-agent]
    E --> F[Verifier Sub-agent<br/>tests + gates]
    F --> G[MCP / Git / Tickets]
    G --> H{Human Gate?}
    H -->|safe / allowlisted| I[Commit / PR / Action]
    H -->|risky / ambiguous| J[Escalate to human<br/>with full context]
    I --> A
    J --> A

This reference repo now runs its own validate-patterns + audit workflows on every push/PR (see .github/workflows/). We also added LOOP.md describing the loops that will maintain it.

Patterns

PatternCadenceStarterWeek 1Token cost
Daily Triage1d–2hminimal-loopL1 reportLow
PR Babysitter5–15mpr-babysitterL1 watchHigh
CI Sweeper5–15mci-sweeperL2 cautiousVery high
Dependency Sweeper6h–1ddependency-sweeperL2 patch-onlyMedium
Changelog Drafter1d or tagchangelog-drafterL1 draftLow
Post-Merge Cleanup1d–6hpost-merge-cleanupL1 off-peakLow
Issue Triage2h–1dissue-triageL1 propose-onlyLow

Not sure which to pick? Try the interactive picker or pattern-picker.

Machine-readable index: patterns/registry.yaml (7 patterns)

Getting Started (5 minutes)

# 1. Scaffold a starter (or copy manually — see starters/)
npx @cobusgreyling/loop-init . --pattern daily-triage --tool grok

# 2. Estimate token spend for your cadence
npx @cobusgreyling/loop-cost --pattern daily-triage --level L1

# 3. Audit readiness (budget + run-log now scored)
npx @cobusgreyling/loop-audit . --suggest

# 4. See scores climb: empty → L1 → L2
bash scripts/before-after-demo.sh

# 5. Start report-only (Grok example)
/loop 1d Run loop-triage. Update STATE.md. No auto-fix in week one.

All three CLIs publish to npm from tagged releases — see docs/RELEASE.md. No clone required.

Develop from source (monorepo contributors):

cd tools/loop-init && npm ci && npm test && node dist/cli.js /path/to/project --pattern daily-triage --tool grok
cd tools/loop-audit && npm ci && npm test && node dist/cli.js /path/to/project --suggest
cd tools/loop-cost && npm ci && npm test && node dist/cli.js --pattern ci-sweeper --cadence 15m

Phased rollout: L1 report → L2 assisted fixes → L3 unattended — see loop-design-checklist.

Examples by Tool

Operating & Safety

Caveats

Loop engineering amplifies judgment — both good and bad.

  • Token costs can explode with sub-agents and long-running loops.
  • Verification is still on you. Unattended loops make unattended mistakes.
  • Comprehension debt grows faster unless you read what the loop ships.
  • Two people can run the same loop and get opposite results. The loop doesn't know. You do.

Addy Osmani:

“Build the loop. But build it like someone who intends to stay the engineer, not just the person who presses go.”

Contributing

Share production patterns, tool mappings, and failure stories. See CONTRIBUTING.md, adopters, and GitHub Discussions.

Sources

License

MIT


Practical, tool-aware reference for loop engineering — patterns you can clone, checklists you can ship against, and stories that include what broke.

Essay · Showcase · Cobus Greyling

// compatibility

Platformscli
Operating systems
AI compatibilityclaude
LicenseMIT
Pricingopen-source
LanguageJavaScript

// faq

What is 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.. It is open-source on GitHub.

Is loop-engineering free to use?

loop-engineering is open-source under the MIT license, so it is free to use.

What category does loop-engineering belong to?

loop-engineering is listed under automation in the Claudeers registry of Claude-compatible tools.

0 views
6,423 stars
unclaimed
updated 15 days ago

// embed badge

loop-engineering on Claudeers
[![Claudeers](https://claudeers.com/api/badge/loop-engineering.svg)](https://claudeers.com/loop-engineering)

// retro hit counter

loop-engineering hit counter
[![Hits](https://claudeers.com/api/counter/loop-engineering.svg)](https://claudeers.com/loop-engineering)

// reviews

// guestbook

0/500

// related in Developer Tools

🔓

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Curs…

// devtoolsaffaan-m/JavaScript225,699MIT[ claude ]
🔓

Use Garry Tan's exact Claude Code setup: 23 opinionated tools that serve as CEO, Designer, Eng Manager, Release Manager, Doc Engineer, and QA

// devtoolsgarrytan/TypeScript119,234MIT[ claude ]
🔓

🙌 OpenHands: AI-Driven Development

// devtoolsOpenHands/Python79,324NOASSERTION[ claude ]
🔓

Makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.

// devtoolsDietrichGebert/JavaScript73,042MIT[ claude ]

// built by

→ see how loop-engineering connects across the ecosystem