Explain the Loop Maturity Model with examples
Browse files- README.md +16 -0
- README.zh-CN.md +15 -9
- data/resources.csv +0 -0
- data/resources.jsonl +0 -0
- data/resources.parquet +2 -2
- docs/index.html +97 -19
- meta/hf_card_body.md +16 -0
README.md
CHANGED
|
@@ -69,6 +69,22 @@ A **Loop Contract** is a reviewable operating specification for one recurring ag
|
|
| 69 |
|
| 70 |
Recurring agents need this policy because schedules, events, queues, and goals remove live supervision. Without explicit boundaries, missing decisions become hidden defaults: the loop can select the wrong work, widen its own scope, approve itself, forget failed attempts, or retry without a stopping rule. Start with the [JSON schema](https://github.com/ChaoYue0307/awesome-loop-engineering/blob/main/schemas/loop-contract.schema.json) and adapt one of the [20 validated examples](https://github.com/ChaoYue0307/awesome-loop-engineering/tree/main/examples).
|
| 71 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 72 |
## Load The Data
|
| 73 |
|
| 74 |
```python
|
|
|
|
| 69 |
|
| 70 |
Recurring agents need this policy because schedules, events, queues, and goals remove live supervision. Without explicit boundaries, missing decisions become hidden defaults: the loop can select the wrong work, widen its own scope, approve itself, forget failed attempts, or retry without a stopping rule. Start with the [JSON schema](https://github.com/ChaoYue0307/awesome-loop-engineering/blob/main/schemas/loop-contract.schema.json) and adapt one of the [20 validated examples](https://github.com/ChaoYue0307/awesome-loop-engineering/tree/main/examples).
|
| 71 |
|
| 72 |
+
## Loop Maturity Model
|
| 73 |
+
|
| 74 |
+
The maturity model helps teams choose the smallest operating model that can perform one recurring job reliably. Levels describe how a workflow is triggered, remembered, verified, divided, and supervised; they do not score model intelligence or product quality.
|
| 75 |
+
|
| 76 |
+
| Level | Added capability | Example |
|
| 77 |
+
| --- | --- | --- |
|
| 78 |
+
| 0 · Manual prompting | A person holds state and judges each next action. | One supervised test repair. |
|
| 79 |
+
| 1 · Scripted retry | A bounded wrapper returns external failure to one agent. | Three `pytest` repair attempts. |
|
| 80 |
+
| 2 · Scheduled loop | A schedule or event starts bounded intake and reporting. | Nightly docs-drift scan. |
|
| 81 |
+
| 3 · Stateful loop | Checkpoints and receipts survive across runs. | Feedback clustering with processed IDs. |
|
| 82 |
+
| 4 · Self-verifying loop | External checks or independent evaluation gate completion. | CI repair exits only when the original check passes. |
|
| 83 |
+
| 5 · Multi-agent loop | Specialists use explicit handoffs and shared state. | Explorer, reproducer, and reviewer for security findings. |
|
| 84 |
+
| 6 · Production-supervised loop | Telemetry, least privilege, budgets, approvals, rollback, and escalation govern production work. | Deploy verification with threshold-based pause and human rollback approval. |
|
| 85 |
+
|
| 86 |
+
Move up only when the current level cannot meet a recurring continuity, evidence, or risk requirement. Durable state should precede longer unattended runs, external verification should precede more agents, and production controls should precede production impact. The [full field guide](https://github.com/ChaoYue0307/awesome-loop-engineering#loop-maturity-model) explains why each level exists and the signal for advancing.
|
| 87 |
+
|
| 88 |
## Load The Data
|
| 89 |
|
| 90 |
```python
|
README.zh-CN.md
CHANGED
|
@@ -63,15 +63,21 @@ Prompt、context 和 harness engineering 让单次 agent 运行更好。Loop Eng
|
|
| 63 |
|
| 64 |
## 成熟度模型
|
| 65 |
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
|
| 71 |
-
|
|
| 72 |
-
|
|
| 73 |
-
|
|
| 74 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 75 |
|
| 76 |
## 必读入口
|
| 77 |
|
|
|
|
| 63 |
|
| 64 |
## 成熟度模型
|
| 65 |
|
| 66 |
+
Loop Maturity Model 用来判断**一个具体的 recurring agent workflow**需要哪些运行能力。它衡量 workflow 如何启动、记忆、验证、分工和接受监督,而不是给模型智能、团队水平或产品质量打分。
|
| 67 |
+
|
| 68 |
+
使用时,先从任务的结果、证据、风险和 human owner 出发,再选择最低但足够可靠的等级。每一级都会增加实现、观测、权限和维护成本;只有当前等级反复出现明确限制时才向上升级。能力应按顺序建立:先保存状态,再延长无人值守运行;先建立外部验证,再增加 agents;能影响用户或基础设施之前,先补齐 production controls。
|
| 69 |
+
|
| 70 |
+
| 等级 | 运行方式 | 为什么需要 | 具体示例 | 升级信号 |
|
| 71 |
+
| --- | --- | --- | --- | --- |
|
| 72 |
+
| **0 · Manual prompting** | 人保存上下文、写下一条指令并判断结果。 | 让一次性、模糊或高度依赖判断的工作保持人工监督。 | 开发者让 agent 修复一个失败测试,检查 diff 后再决定是否继续。 | 相同任务和反馈步骤频繁重复,已经可以编码。 |
|
| 73 |
+
| **1 · Scripted retry** | 有界脚本重复调用一个 agent,并把外部失败结果反馈给它。 | 省去重复 reprompt,同时保持单一目标和单一反馈信号。 | 运行 `pytest`,最多把失败输出反馈给 agent 三次。 | 任务应该按时间或事件自动启动,不再依赖人工发起。 |
|
| 74 |
+
| **2 · Scheduled loop** | schedule 或 event 触发新的 intake、一次有界运行以及 report 或 artifact。 | 去掉人工启动,并明确 cadence、idempotence 和 no-work exit。 | 每晚检查 docs drift,仅在代码与文档不一致时生成报告。 | 工作跨越多次运行、重复处理条目或在调用之间丢失上下文。 |
|
| 75 |
+
| **3 · Stateful loop** | 在模型之外持久化已完成工作、blocker、证据和 next action。 | 让 workflow 能在重启后继续,避免重复工作,并支持审计。 | feedback clusterer 保存已处理 ID、历史主题和最近成功 checkpoint。 | 稳定的外部证据已经可以判断状态转换或完成是否有效。 |
|
| 76 |
+
| **4 · Self-verifying loop** | tests、evals、policy checks、traces 或独立 evaluator 决定能否继续和退出。 | 用可检查的证据取代 agent 对成功的自我判断。 | CI repair loop 只有在原失败命令通过且 diff 未越界时才退出。 | 单一角色成为瓶颈,需要职责分离或独立 review。 |
|
| 77 |
+
| **5 · Multi-agent loop** | 专门角色通过明确 handoff 和共享状态分担 discovery、action、review 与 judgment。 | 引入职责分离和并行专业能力,同时避免 acting agent 自我批准。 | security loop 由 explorer 找候选问题、reproducer 复现、reviewer 判断严重性和范围。 | workflow 将影响 production、用户、资金、凭证或其他高影响系统。 |
|
| 78 |
+
| **6 · Production-supervised loop** | telemetry、least privilege、budgets、approvals、rollback、incident ownership 和 human escalation 共同约束每次运行。 | 控制 blast radius,让无人值守的 production work 可观察、可中断、可追责。 | deploy verifier 监控 rollout metrics,阈值被突破时暂停并把 rollback approval 交给 release owner。 | 随 workflow 演进持续强化 service objectives、replay、权限审查、failure drills 和成本控制。 |
|
| 79 |
+
|
| 80 |
+
等级代表能力,不代表目标越高越好。很多有价值的 workflow 停在 Level 2 或 3 就足够;拥有 durable state 的可靠 Level 3,优于目标模糊、检查薄弱或只有形式化角色的 Level 5。
|
| 81 |
|
| 82 |
## 必读入口
|
| 83 |
|
data/resources.csv
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|
data/resources.jsonl
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|
data/resources.parquet
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a81c9c585ecda7d6fc5d455ab3b748f89166adf187633017b085ceba19632fbd
|
| 3 |
+
size 435161
|
docs/index.html
CHANGED
|
@@ -661,11 +661,36 @@
|
|
| 661 |
font-family: "IBM Plex Mono", ui-monospace, monospace;
|
| 662 |
font-size: 0.84em;
|
| 663 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 664 |
.levels { border-top: 1px solid var(--line-strong); }
|
| 665 |
-
.level {
|
| 666 |
-
|
| 667 |
-
|
| 668 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 669 |
|
| 670 |
.resource-explorer { border-top: 1px solid var(--line-strong); }
|
| 671 |
.resource-toolbar {
|
|
@@ -867,8 +892,13 @@
|
|
| 867 |
.future-track { padding: 20px 0; }
|
| 868 |
.future-track + .future-track { border-top: 1px solid var(--line); border-left: 0; padding-left: 0; }
|
| 869 |
.future-shared { grid-template-columns: 1fr; gap: 10px; align-items: start; }
|
| 870 |
-
.
|
| 871 |
-
.level
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 872 |
.resource-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
| 873 |
.resource-toolbar label:first-child { grid-column: 1 / -1; }
|
| 874 |
.resource-reset { width: 100%; }
|
|
@@ -1110,8 +1140,12 @@
|
|
| 1110 |
.resource-detail-grid { grid-template-columns: 1fr; gap: 14px; }
|
| 1111 |
.resource-details summary { min-height: 34px; padding-top: 5px; }
|
| 1112 |
.caption { text-align: left; }
|
| 1113 |
-
.
|
| 1114 |
-
.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1115 |
footer { padding: 44px 0 40px; }
|
| 1116 |
.footer-grid { gap: 26px; }
|
| 1117 |
.cite { overflow: visible; }
|
|
@@ -1202,6 +1236,11 @@
|
|
| 1202 |
"name": "What is in a loop contract?",
|
| 1203 |
"acceptedAnswer": { "@type": "Answer", "text": "A Loop Contract is a reviewable operating specification for one recurring agent job. It fixes the objective, trigger, intake, workspace and permissions, context, roles, external verification, durable state, budget, escalation path, and success or blocked exit so repeated runs do not rely on hidden defaults." }
|
| 1204 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1205 |
{
|
| 1206 |
"@type": "Question",
|
| 1207 |
"name": "Which runtimes can run agent loops?",
|
|
@@ -1585,22 +1624,57 @@
|
|
| 1585 |
<div class="section-head">
|
| 1586 |
<div>
|
| 1587 |
<p class="section-label"><i class="icon" data-lucide="chart-no-axes-combined" aria-hidden="true"></i><span>05 / Maturity model</span></p>
|
| 1588 |
-
<h2>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1589 |
</div>
|
| 1590 |
-
<p class="section-intro">A reliable Level 3 loop with durable state and deterministic checks is more useful than a Level 5 loop with vague goals.</p>
|
| 1591 |
</div>
|
| 1592 |
<figure class="diagram supporting-visual">
|
| 1593 |
<div class="diagram-scroll"><img src="assets/loop-maturity-model.png" width="1667" height="944" loading="lazy" alt="Loop Maturity Model progressing from manual prompting through scripted retry, scheduled, stateful, self-verifying, multi-agent, and production-supervised loops."></div>
|
| 1594 |
-
<figcaption class="caption">
|
| 1595 |
</figure>
|
| 1596 |
-
<div class="levels">
|
| 1597 |
-
<
|
| 1598 |
-
|
| 1599 |
-
|
| 1600 |
-
|
| 1601 |
-
<
|
| 1602 |
-
<
|
| 1603 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1604 |
</div>
|
| 1605 |
</div>
|
| 1606 |
</section>
|
|
@@ -1799,6 +1873,10 @@
|
|
| 1799 |
<summary>What belongs in a loop contract?</summary>
|
| 1800 |
<p>A Loop Contract is a reviewable operating specification for one recurring agent job. It fixes the objective, trigger, intake, workspace and permissions, context, roles, external verification, durable state, budget, escalation path, and success or blocked exit so repeated runs do not depend on hidden defaults.</p>
|
| 1801 |
</details>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1802 |
<details>
|
| 1803 |
<summary>Which runtimes can run agent loops?</summary>
|
| 1804 |
<p>The same loop can run as a Claude Code loop or scheduled task, a Codex automation, a GitHub agentic workflow, a shell or cron wrapper, or a durable-execution runtime.</p>
|
|
|
|
| 661 |
font-family: "IBM Plex Mono", ui-monospace, monospace;
|
| 662 |
font-size: 0.84em;
|
| 663 |
}
|
| 664 |
+
.maturity-guide {
|
| 665 |
+
display: grid;
|
| 666 |
+
grid-template-columns: 180px minmax(0, 1fr);
|
| 667 |
+
gap: 30px;
|
| 668 |
+
align-items: start;
|
| 669 |
+
margin: 0 0 30px;
|
| 670 |
+
border-top: 1px solid var(--line-strong);
|
| 671 |
+
border-bottom: 1px solid var(--line);
|
| 672 |
+
padding: 20px 0;
|
| 673 |
+
}
|
| 674 |
+
.maturity-guide h3 { margin: 0; font-size: 0.96rem; line-height: 1.35; }
|
| 675 |
+
.maturity-guide p { margin: 0; color: var(--muted); font-size: 0.88rem; line-height: 1.62; }
|
| 676 |
+
.maturity-guide p + p { margin-top: 8px; }
|
| 677 |
+
.maturity-guide strong { color: var(--ink); }
|
| 678 |
.levels { border-top: 1px solid var(--line-strong); }
|
| 679 |
+
.level {
|
| 680 |
+
display: grid;
|
| 681 |
+
grid-template-columns: 64px minmax(190px, 0.72fr) minmax(0, 2.2fr);
|
| 682 |
+
gap: 24px;
|
| 683 |
+
align-items: start;
|
| 684 |
+
padding: 25px 0;
|
| 685 |
+
border-bottom: 1px solid var(--line);
|
| 686 |
+
}
|
| 687 |
+
.level .number { padding-top: 2px; color: var(--blue); font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 0.76rem; font-weight: 700; }
|
| 688 |
+
.level-intro h3 { margin: 0; font-size: 1rem; line-height: 1.35; }
|
| 689 |
+
.level-intro p { margin: 6px 0 0; color: var(--muted); font-size: 0.82rem; line-height: 1.5; }
|
| 690 |
+
.level-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin: 0; }
|
| 691 |
+
.level-facts > div { min-width: 0; }
|
| 692 |
+
.level-facts dt { color: var(--quiet); font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 0.62rem; font-weight: 650; letter-spacing: 0; text-transform: uppercase; }
|
| 693 |
+
.level-facts dd { margin: 6px 0 0; color: var(--muted); font-size: 0.8rem; line-height: 1.52; }
|
| 694 |
|
| 695 |
.resource-explorer { border-top: 1px solid var(--line-strong); }
|
| 696 |
.resource-toolbar {
|
|
|
|
| 892 |
.future-track { padding: 20px 0; }
|
| 893 |
.future-track + .future-track { border-top: 1px solid var(--line); border-left: 0; padding-left: 0; }
|
| 894 |
.future-shared { grid-template-columns: 1fr; gap: 10px; align-items: start; }
|
| 895 |
+
.maturity-guide { grid-template-columns: 150px minmax(0, 1fr); gap: 24px; }
|
| 896 |
+
.level { grid-template-columns: 52px minmax(0, 1fr); gap: 16px; }
|
| 897 |
+
.level .number { grid-row: 1 / 3; }
|
| 898 |
+
.level-intro, .level-facts { grid-column: 2; }
|
| 899 |
+
.level-facts { grid-template-columns: 1fr; gap: 12px; }
|
| 900 |
+
.level-facts > div { display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 14px; }
|
| 901 |
+
.level-facts dd { margin-top: 0; }
|
| 902 |
.resource-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
| 903 |
.resource-toolbar label:first-child { grid-column: 1 / -1; }
|
| 904 |
.resource-reset { width: 100%; }
|
|
|
|
| 1140 |
.resource-detail-grid { grid-template-columns: 1fr; gap: 14px; }
|
| 1141 |
.resource-details summary { min-height: 34px; padding-top: 5px; }
|
| 1142 |
.caption { text-align: left; }
|
| 1143 |
+
.maturity-guide { grid-template-columns: 1fr; gap: 7px; margin-bottom: 24px; padding: 18px 0; }
|
| 1144 |
+
.maturity-guide p { font-size: 0.84rem; line-height: 1.55; }
|
| 1145 |
+
.level { grid-template-columns: 38px minmax(0, 1fr); gap: 10px; padding: 20px 0; }
|
| 1146 |
+
.level-facts { gap: 13px; }
|
| 1147 |
+
.level-facts > div { grid-template-columns: 1fr; gap: 3px; }
|
| 1148 |
+
.level-intro p, .level-facts dd { font-size: 0.78rem; }
|
| 1149 |
footer { padding: 44px 0 40px; }
|
| 1150 |
.footer-grid { gap: 26px; }
|
| 1151 |
.cite { overflow: visible; }
|
|
|
|
| 1236 |
"name": "What is in a loop contract?",
|
| 1237 |
"acceptedAnswer": { "@type": "Answer", "text": "A Loop Contract is a reviewable operating specification for one recurring agent job. It fixes the objective, trigger, intake, workspace and permissions, context, roles, external verification, durable state, budget, escalation path, and success or blocked exit so repeated runs do not rely on hidden defaults." }
|
| 1238 |
},
|
| 1239 |
+
{
|
| 1240 |
+
"@type": "Question",
|
| 1241 |
+
"name": "Does every agent loop need to reach the highest maturity level?",
|
| 1242 |
+
"acceptedAnswer": { "@type": "Answer", "text": "No. Choose the lowest level that meets the job's continuity, evidence, and blast-radius requirements. Many useful workflows should stop at Level 2 or 3. Persist state before increasing autonomy, add external verification before more agents, and reserve production supervision for workflows with production impact." }
|
| 1243 |
+
},
|
| 1244 |
{
|
| 1245 |
"@type": "Question",
|
| 1246 |
"name": "Which runtimes can run agent loops?",
|
|
|
|
| 1624 |
<div class="section-head">
|
| 1625 |
<div>
|
| 1626 |
<p class="section-label"><i class="icon" data-lucide="chart-no-axes-combined" aria-hidden="true"></i><span>05 / Maturity model</span></p>
|
| 1627 |
+
<h2>Use the smallest loop that can do the job.</h2>
|
| 1628 |
+
</div>
|
| 1629 |
+
<p class="section-intro">The level describes how one workflow is triggered, remembered, verified, divided, and supervised. It measures operating capability, not model intelligence or product prestige.</p>
|
| 1630 |
+
</div>
|
| 1631 |
+
<div class="maturity-guide">
|
| 1632 |
+
<h3>Read capability, not ambition.</h3>
|
| 1633 |
+
<div>
|
| 1634 |
+
<p>Start with the recurring outcome, evidence, risk, and human owner. Move up only when the current level produces a repeated failure or cannot meet an operating requirement; every added level brings more code, permissions, observability, and maintenance.</p>
|
| 1635 |
+
<p><strong>Build in order:</strong> durable state before longer unattended runs, external verification before more agents, and production controls before the loop can affect users or infrastructure.</p>
|
| 1636 |
</div>
|
|
|
|
| 1637 |
</div>
|
| 1638 |
<figure class="diagram supporting-visual">
|
| 1639 |
<div class="diagram-scroll"><img src="assets/loop-maturity-model.png" width="1667" height="944" loading="lazy" alt="Loop Maturity Model progressing from manual prompting through scripted retry, scheduled, stateful, self-verifying, multi-agent, and production-supervised loops."></div>
|
| 1640 |
+
<figcaption class="caption">Levels are cumulative capabilities. Many useful workflows should stop at Level 2 or 3.</figcaption>
|
| 1641 |
</figure>
|
| 1642 |
+
<div class="levels" aria-label="Seven loop maturity levels">
|
| 1643 |
+
<article class="level">
|
| 1644 |
+
<span class="number">00</span>
|
| 1645 |
+
<div class="level-intro"><h3>Manual prompting</h3><p>A person holds the state, supplies each next instruction, and judges the result.</p></div>
|
| 1646 |
+
<dl class="level-facts"><div><dt>Why</dt><dd>Keeps one-off, ambiguous, or high-judgment work under direct supervision.</dd></div><div><dt>Example</dt><dd>A developer asks an agent to fix one failing test, reviews the diff, and decides whether to continue.</dd></div><div><dt>Progress signal</dt><dd>The same task and feedback sequence recur often enough to encode.</dd></div></dl>
|
| 1647 |
+
</article>
|
| 1648 |
+
<article class="level">
|
| 1649 |
+
<span class="number">01</span>
|
| 1650 |
+
<div class="level-intro"><h3>Scripted retry</h3><p>A bounded wrapper reruns one agent and feeds back an external failure.</p></div>
|
| 1651 |
+
<dl class="level-facts"><div><dt>Why</dt><dd>Removes repetitive reprompting while preserving one objective and one feedback signal.</dd></div><div><dt>Example</dt><dd>Run <code>pytest</code> and return its failure output for at most three repair attempts.</dd></div><div><dt>Progress signal</dt><dd>The job should start from a schedule or event without a person launching it.</dd></div></dl>
|
| 1652 |
+
</article>
|
| 1653 |
+
<article class="level">
|
| 1654 |
+
<span class="number">02</span>
|
| 1655 |
+
<div class="level-intro"><h3>Scheduled loop</h3><p>A schedule or event triggers fresh intake, one bounded run, and a report or artifact.</p></div>
|
| 1656 |
+
<dl class="level-facts"><div><dt>Why</dt><dd>Removes manual launch and makes cadence, idempotence, and no-work exits explicit.</dd></div><div><dt>Example</dt><dd>A nightly docs-drift scan reports only when code and documentation disagree.</dd></div><div><dt>Progress signal</dt><dd>Work spans runs, repeats items, or loses context between invocations.</dd></div></dl>
|
| 1657 |
+
</article>
|
| 1658 |
+
<article class="level">
|
| 1659 |
+
<span class="number">03</span>
|
| 1660 |
+
<div class="level-intro"><h3>Stateful loop</h3><p>Durable checkpoints and receipts record completed work, blockers, evidence, and the next action.</p></div>
|
| 1661 |
+
<dl class="level-facts"><div><dt>Why</dt><dd>Survives restarts, avoids duplicate work, and makes every run resumable and inspectable.</dd></div><div><dt>Example</dt><dd>A feedback clusterer stores processed IDs, prior themes, and the last successful checkpoint.</dd></div><div><dt>Progress signal</dt><dd>Stable external evidence can decide whether a transition or completion is valid.</dd></div></dl>
|
| 1662 |
+
</article>
|
| 1663 |
+
<article class="level">
|
| 1664 |
+
<span class="number">04</span>
|
| 1665 |
+
<div class="level-intro"><h3>Self-verifying loop</h3><p>Tests, evals, policy checks, traces, or an independent evaluator gate progress and exit.</p></div>
|
| 1666 |
+
<dl class="level-facts"><div><dt>Why</dt><dd>Replaces the agent's claim of success with reviewable evidence.</dd></div><div><dt>Example</dt><dd>A CI repair exits only when the original failing command passes and the diff remains in scope.</dd></div><div><dt>Progress signal</dt><dd>One role becomes a bottleneck, duties must be separated, or independent review is required.</dd></div></dl>
|
| 1667 |
+
</article>
|
| 1668 |
+
<article class="level">
|
| 1669 |
+
<span class="number">05</span>
|
| 1670 |
+
<div class="level-intro"><h3>Multi-agent loop</h3><p>Specialists divide discovery, action, review, and judgment through explicit handoffs and shared state.</p></div>
|
| 1671 |
+
<dl class="level-facts"><div><dt>Why</dt><dd>Adds separation of duties and parallel expertise without letting the acting agent approve itself.</dd></div><div><dt>Example</dt><dd>A security loop uses an explorer, a reproducer, and an independent reviewer.</dd></div><div><dt>Progress signal</dt><dd>The loop can affect production, customers, money, credentials, or other high-impact systems.</dd></div></dl>
|
| 1672 |
+
</article>
|
| 1673 |
+
<article class="level">
|
| 1674 |
+
<span class="number">06</span>
|
| 1675 |
+
<div class="level-intro"><h3>Production-supervised loop</h3><p>Telemetry, least privilege, budgets, approvals, rollback, and human escalation govern every run.</p></div>
|
| 1676 |
+
<dl class="level-facts"><div><dt>Why</dt><dd>Controls blast radius and makes production work observable, interruptible, and accountable.</dd></div><div><dt>Example</dt><dd>A deploy verifier pauses on a breached threshold and hands rollback approval to the release owner.</dd></div><div><dt>Harden next</dt><dd>Service objectives, replay, permission reviews, failure drills, and cost controls.</dd></div></dl>
|
| 1677 |
+
</article>
|
| 1678 |
</div>
|
| 1679 |
</div>
|
| 1680 |
</section>
|
|
|
|
| 1873 |
<summary>What belongs in a loop contract?</summary>
|
| 1874 |
<p>A Loop Contract is a reviewable operating specification for one recurring agent job. It fixes the objective, trigger, intake, workspace and permissions, context, roles, external verification, durable state, budget, escalation path, and success or blocked exit so repeated runs do not depend on hidden defaults.</p>
|
| 1875 |
</details>
|
| 1876 |
+
<details>
|
| 1877 |
+
<summary>Does every loop need to reach the highest maturity level?</summary>
|
| 1878 |
+
<p>No. Choose the lowest level that meets the job's continuity, evidence, and blast-radius requirements. Many useful workflows should stop at Level 2 or 3. Persist state before increasing autonomy, add external verification before more agents, and reserve production supervision for workflows with production impact.</p>
|
| 1879 |
+
</details>
|
| 1880 |
<details>
|
| 1881 |
<summary>Which runtimes can run agent loops?</summary>
|
| 1882 |
<p>The same loop can run as a Claude Code loop or scheduled task, a Codex automation, a GitHub agentic workflow, a shell or cron wrapper, or a durable-execution runtime.</p>
|
meta/hf_card_body.md
CHANGED
|
@@ -36,6 +36,22 @@ A **Loop Contract** is a reviewable operating specification for one recurring ag
|
|
| 36 |
|
| 37 |
Recurring agents need this policy because schedules, events, queues, and goals remove live supervision. Without explicit boundaries, missing decisions become hidden defaults: the loop can select the wrong work, widen its own scope, approve itself, forget failed attempts, or retry without a stopping rule. Start with the [JSON schema](https://github.com/ChaoYue0307/awesome-loop-engineering/blob/main/schemas/loop-contract.schema.json) and adapt one of the [{{CONTRACT_COUNT}} validated examples](https://github.com/ChaoYue0307/awesome-loop-engineering/tree/main/examples).
|
| 38 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
## Load The Data
|
| 40 |
|
| 41 |
```python
|
|
|
|
| 36 |
|
| 37 |
Recurring agents need this policy because schedules, events, queues, and goals remove live supervision. Without explicit boundaries, missing decisions become hidden defaults: the loop can select the wrong work, widen its own scope, approve itself, forget failed attempts, or retry without a stopping rule. Start with the [JSON schema](https://github.com/ChaoYue0307/awesome-loop-engineering/blob/main/schemas/loop-contract.schema.json) and adapt one of the [{{CONTRACT_COUNT}} validated examples](https://github.com/ChaoYue0307/awesome-loop-engineering/tree/main/examples).
|
| 38 |
|
| 39 |
+
## Loop Maturity Model
|
| 40 |
+
|
| 41 |
+
The maturity model helps teams choose the smallest operating model that can perform one recurring job reliably. Levels describe how a workflow is triggered, remembered, verified, divided, and supervised; they do not score model intelligence or product quality.
|
| 42 |
+
|
| 43 |
+
| Level | Added capability | Example |
|
| 44 |
+
| --- | --- | --- |
|
| 45 |
+
| 0 · Manual prompting | A person holds state and judges each next action. | One supervised test repair. |
|
| 46 |
+
| 1 · Scripted retry | A bounded wrapper returns external failure to one agent. | Three `pytest` repair attempts. |
|
| 47 |
+
| 2 · Scheduled loop | A schedule or event starts bounded intake and reporting. | Nightly docs-drift scan. |
|
| 48 |
+
| 3 · Stateful loop | Checkpoints and receipts survive across runs. | Feedback clustering with processed IDs. |
|
| 49 |
+
| 4 · Self-verifying loop | External checks or independent evaluation gate completion. | CI repair exits only when the original check passes. |
|
| 50 |
+
| 5 · Multi-agent loop | Specialists use explicit handoffs and shared state. | Explorer, reproducer, and reviewer for security findings. |
|
| 51 |
+
| 6 · Production-supervised loop | Telemetry, least privilege, budgets, approvals, rollback, and escalation govern production work. | Deploy verification with threshold-based pause and human rollback approval. |
|
| 52 |
+
|
| 53 |
+
Move up only when the current level cannot meet a recurring continuity, evidence, or risk requirement. Durable state should precede longer unattended runs, external verification should precede more agents, and production controls should precede production impact. The [full field guide](https://github.com/ChaoYue0307/awesome-loop-engineering#loop-maturity-model) explains why each level exists and the signal for advancing.
|
| 54 |
+
|
| 55 |
## Load The Data
|
| 56 |
|
| 57 |
```python
|