랭킹으로 돌아가기

cobusgreyling/loop-engineering

JavaScriptcobusgreyling.github.io/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.

agentic-aiai-agentsclaude-codecodexdevops-automationgithub-actionsgrokllmmcpai-codingautomationloop-engineering
스타 성장
스타
8.9k
포크
1.2k
주간 성장
이슈
16
6k7k8k
6월 1일6월 17일7월 4일7월 21일
아티팩트npmnpm install loop-engineering
README

Loop Engineering

Explore the Showcase

GitHub stars loop-audit dogfood loop-audit npm loop-init npm loop-cost npm loop-sync npm loop-context npm loop-mcp-server npm loop-worktree npm MIT Pages

Loop Engineering logo

Stop prompting. Design the loop. Get a score.

Loop Engineering — design the system that prompts your agents

npx @cobusgreyling/loop-init .
# Optional: also scaffold a versioned harness (harness-foundry)
npx @cobusgreyling/loop-init . --with-foundry

loop-init scaffolds skills, state, and budget files, then prints your Loop Ready score and first loop command. Swap --tool for claude, codex, or opencode. Use --with-foundry when you want the loop as a composable runtime stack.

Loop Ready score climbs from 10 to 100 in 15 seconds

Loop engineering replaces you as the person who prompts the agent — you design the system that does it instead.

New here? Quickstart (5 min) · Interactive picker

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

→ Interactive showcase + pattern picker · Essay · Addy Osmani

Contents

Start here Description
Quickstart (5 min) Scaffold → cost check → audit → first loop — start here if you just landed
Loop Engineering essay The concept, primitives, and Grok mapping — read for the why
Pattern Picker Which loop to run first — start here if unsure
Primitives Matrix Cross-tool loop primitive mapping — bookmark this
Loop Design Checklist Ship readiness rubric
Patterns 7 production patterns + interactive picker
Starters Clone-and-run kits (Grok, Claude Code, Codex, Opencode)
Opencode examples CLI-first loops: cron/systemd + opencode run, skills, worktrees
loop-audit Loop Readiness Score CLI (v1.7 — constraints + governance + Harness Runtime) — npx @cobusgreyling/loop-audit . --suggest · --badge for README
loop-init Scaffold starters + budget/run-log + constraints (v1.5) — npx @cobusgreyling/loop-init . --pattern daily-triage --tool grok · --with-foundry for harness stack
harness-foundry Companion runtime: versioned stacks, sessions, traces — npx @cobusgreyling/harness-foundry init --from loop-engineering:daily-triage
outerloop Companion governance: evidence → verdict → answerability
loop-cost Token spend estimator — npx @cobusgreyling/loop-cost
loop-sync Drift detection between STATE.md and LOOP.mdnpx @cobusgreyling/loop-sync .
loop-context Stateful memory manager + circuit breaker for long runs — npx @cobusgreyling/loop-context --check --ledger run.json
loop-mcp-server MCP runtime lookup for patterns, skills, state — npx @cobusgreyling/loop-mcp-server
loop-worktree Manage isolated git worktrees per fix attempt — npx @cobusgreyling/loop-worktree create --run-id <id> --pattern <p>
loop-gate Mechanical enforcement of the path denylist + auto-merge allowlist from gate.yamlnpx @cobusgreyling/loop-gate check --action auto-merge --paths <f1,f2,...>
Goal Engineering Companion: loops discover, goals finish — /goal + stack cookbook (npx @cobusgreyling/goal doctor .)
Memory Engineering Companion: stop re-explaining the repo — tiers, budget, Memory Ready score (node tools/memory-init/cli.js .)
Fleet Engineering Companion: govern populations of agents — registry, inbox, Fleet Ready score (npx @cobusgreyling/fleet-init .)
Stories Real wins and honest failures

Ecosystem stack

memory-engineering → loop-engineering → harness-foundry → outerloop → fleet-engineering
   (persist)            (patterns)         (runtime)        (verdict)     (population)
Layer You get Start
Memory Tiers, recall budget, Memory Ready score memory-engineering
Design (this repo) Patterns, starters, Loop Ready score npx @cobusgreyling/loop-init .
Runtime Versioned harness, traces, evolve npx @cobusgreyling/loop-init . --with-foundry or Foundry showcase
Govern Evidence, verdict, answerability outerloop
Fleet Registry, inbox, budgets, kill switch npx @cobusgreyling/fleet-init . · Fleet Ready

Scale beyond one loop: when agents forget across sessions, add memory-engineering. When you have many agents/loops on a team, add fleet-engineering.

Next after Loop Ready 80+: version the loop as a harness — loop-init prints the CTA automatically; loop-audit recommends Foundry when the score is strong but .foundry/stack.yaml is missing. | Contributor quickstart | Help wanted: 21 scoped good first issues — comment I'll take this to get assigned | | Community update | July 4: 5.5k stars, traffic sources, contributor merges | | Community week (Jul 8) | loop-worktree npm, MCP quickstart, tool appendices | | npm update (Jul 16) | loop-context 1.2.0 + loop-worktree 1.1.0 — daily budget, path locks | | Maintenance (Jul 10) | Doc sync, branch prune, loop-audit 1.6.0 follow-up | | Prior release notes | v1.5.0 — loop-sync, constraints, MCP server | | Add your project | Pinned: Loop Ready badge + adopters list |

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

Primitive Job in the Loop
Automations / Scheduling Discovery + triage on a cadence
Worktrees Safe parallel execution
Skills Persistent project knowledge
Plugins & Connectors Reach into your real tools (MCP)
Sub-agents Maker / checker split
+ Memory / State Durable 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

Animated loop flow — schedule, triage, state, worktree, implement, verify, MCP, human gate

Mermaid diagram (copy-friendly)
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

Deeper diagrams — the actor-level sequence within one run, the run lifecycle's states, autonomy levels L1-L3, and how tools/ maps onto the primitives — live in docs/architecture-diagrams.md.

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

Seven production loop patterns with cadence and token cost

Pattern Cadence Starter Week 1 Token cost
Daily Triage 1d–2h minimal-loop L1 report Low
PR Babysitter 5–15m pr-babysitter L1 watch High
CI Sweeper 5–15m ci-sweeper L2 cautious Very high
Dependency Sweeper 6h–1d dependency-sweeper L2 patch-only Medium
Changelog Drafter 1d or tag changelog-drafter L1 draft Low
Post-Merge Cleanup 1d–6h post-merge-cleanup L1 off-peak Low
Issue Triage 2h–1d issue-triage L1 propose-only Low

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 + get your Loop Ready score (printed automatically)
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. Re-audit after improvements
npx @cobusgreyling/loop-audit . --suggest

# Optional: paste Loop Ready badge into your README
npx @cobusgreyling/loop-audit . --badge

# 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 npm CLIs publish 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.”

Help wanted

First PR? Start with the contributor quickstart — ~10 min to ~1 hr tasks with same-day review on stories and adopters. See CONTRIBUTORS.md for everyone who has shipped so far.

Pick one Issue
~10 min #120 — Add your project to adopters
~15 min #118 — Daily Triage story · #173 — Issue Triage story
~20 min #119 — PR Babysitter failure story
~30 min #117 — Continue.dev · #147 — Cline
~30 min #195 — Roo Code · #196 — GitHub Copilot
~40 min #220 — Cursor CI Sweeper · #223 — Cursor Changelog Drafter
~40 min #224 — Cursor Issue Triage
Hubs Show your loop · Ask anything

Comment "I'll take this" on any good first issue for assignment.

Contributing

Share production patterns, tool mappings, and failure stories. See CONTRIBUTING.md (contribution ladder + good first issue backlog), Code of Conduct, adopters, and hubs: Show your loop · Ask anything.

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

Star History Chart

Static chart (CI-updated daily). Live chart needs a GitHub token — stored in your browser only.

관련 저장소
Significant-Gravitas/AutoGPT

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

PythonPyPIOtheraiopenai
agpt.co
185.6k46.1k
langgenius/dify

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

TypeScriptnpmOtheraigpt
dify.ai
149.5k23.6k
infiniflow/ragflow

RAGFlow is a leading open-source Retrieval-Augmented Generation (RAG) engine that fuses cutting-edge RAG with Agent capabilities to create a superior context layer for LLMs

GoGo ModulesApache License 2.0aiai-agents
ragflow.io
85.5k10k
microsoft/ai-agents-for-beginners

18 Lessons to Get Started Building AI Agents

Jupyter NotebookMIT Licenseagentic-aiagentic-framework
aka.ms/ai-agents-beginners
70k23.2k
ruvnet/ruflo

🌊 The leading agent meta-harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, RAG integration, and native Claude Code / Codex / Hermes and many more Integrated

TypeScriptnpmMIT Licenseclaude-codeswarm
cognitum.one
65.3k7.8k
Mintplex-Labs/anything-llm

Stop renting your intelligence. Own it with AnythingLLM. Everything you need for a powerful local-first agent experience

JavaScriptnpmMIT Licenseraglocalai
anythingllm.com
63.6k7k
shanraisshan/claude-code-best-practice

from vibe coding to agentic engineering - practice makes claude perfect

HTMLMIT Licenseclaude-aiclaude-code
linkedin.com/in/shanraisshan
63.2k6.3k
FlowiseAI/Flowise

Build AI Agents, Visually

TypeScriptnpmOtherartificial-intelligencechatgpt
flowiseai.com
54.8k24.7k
siyuan-note/siyuan

A privacy-first, self-hosted, fully open source personal knowledge management software, written in typescript and golang.

TypeScriptnpmGNU Affero General Public License v3.0note-takinglocal-first
b3log.org/siyuan
45.3k2.9k
calesthio/OpenMontage

World's first open-source, agentic video production system. 12 pipelines, 52 tools, 500+ agent skills. Turn your AI coding assistant into a full video production studio.

PythonPyPIGNU Affero General Public License v3.0agentagentic-ai
openmontage.video
40.6k4.8k
wshobson/agents

Multi-harness agentic plugin marketplace for Claude Code, Codex CLI, Cursor, OpenCode, GitHub Copilot, and Gemini CLI

PythonPyPIMIT Licenseagentsanthropic
sethhobson.com
38.1k4.1k
CopilotKit/CopilotKit

The Frontend Stack for Agents & Generative UI. React, Angular, Mobile, Slack, and more. Makers of the AG-UI Protocol

TypeScriptnpmMIT Licenseaillm
docs.copilotkit.ai
36.2k4.5k