File size: 30,998 Bytes
9ec4919
 
 
 
 
 
 
 
 
95e6746
9ec4919
 
 
 
b7ee84b
9ec4919
 
 
b7ee84b
9ec4919
 
 
52b576f
 
 
 
 
 
9ec4919
 
 
52b576f
 
 
 
9ec4919
52b576f
 
9ec4919
 
 
52b576f
 
9ec4919
 
52b576f
 
 
9ec4919
52b576f
 
 
 
 
 
 
 
 
 
9ec4919
52b576f
 
95e6746
52b576f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9ec4919
52b576f
 
 
 
 
 
 
9ec4919
52b576f
 
 
9ec4919
 
 
 
 
 
 
 
 
52b576f
9ec4919
 
 
 
 
52b576f
95e6746
52b576f
9ec4919
 
 
 
52b576f
 
95e6746
52b576f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9ec4919
52b576f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9ec4919
 
 
 
52b576f
 
 
 
 
 
 
 
 
 
 
 
9ec4919
 
 
52b576f
 
 
 
 
 
 
 
 
 
9ec4919
 
52b576f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9ec4919
 
52b576f
 
 
 
 
 
 
 
 
 
 
 
 
9ec4919
 
52b576f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9ec4919
 
 
52b576f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9ec4919
52b576f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9ec4919
52b576f
 
 
 
 
 
 
 
 
 
 
 
9ec4919
 
 
 
52b576f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9ec4919
 
52b576f
 
 
 
 
 
 
 
 
 
 
 
9ec4919
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Awesome Loop Engineering</title>
    <meta name="description" content="A curated field guide to Loop Engineering: designing recurring AI-agent systems above prompt, context, and harness engineering.">
    <meta name="robots" content="index,follow">
    <link rel="canonical" href="https://chaoyue0307.github.io/awesome-loop-engineering/">
    <link rel="icon" href="assets/awesome-loop-engineering-logo.svg" type="image/svg+xml">
    <meta property="og:type" content="website">
    <meta property="og:title" content="Awesome Loop Engineering">
    <meta property="og:description" content="Curated resources, patterns, examples, schema, and field guides for recurring AI-agent systems.">
    <meta property="og:url" content="https://chaoyue0307.github.io/awesome-loop-engineering/">
    <meta property="og:image" content="https://raw.githubusercontent.com/ChaoYue0307/awesome-loop-engineering/main/assets/social-preview.png">
    <meta name="twitter:card" content="summary_large_image">
    <meta name="twitter:title" content="Awesome Loop Engineering">
    <meta name="twitter:description" content="A field guide for designing recurring AI-agent systems above prompt, context, and harness engineering.">
    <meta name="twitter:image" content="https://raw.githubusercontent.com/ChaoYue0307/awesome-loop-engineering/main/assets/social-preview.png">
    <style>
      :root {
        color-scheme: dark;
        --bg: #0b1020;
        --bg-2: #0f172a;
        --panel: rgba(17, 24, 39, 0.72);
        --panel-solid: #111827;
        --muted: #c2cad8;
        --faint: #8b95a7;
        --text: #f8fafc;
        --accent: #38bdf8;
        --accent-2: #a78bfa;
        --border: rgba(148, 163, 184, 0.18);
        --border-strong: rgba(148, 163, 184, 0.34);
        --radius: 18px;
        --maxw: 1140px;
      }
      * { box-sizing: border-box; }
      html { scroll-behavior: smooth; scroll-padding-top: 84px; }
      body {
        margin: 0;
        background:
          radial-gradient(1100px 540px at 8% -6%, rgba(56, 189, 248, 0.16), transparent 70%),
          radial-gradient(1000px 520px at 100% 4%, rgba(167, 139, 250, 0.16), transparent 70%),
          var(--bg);
        color: var(--text);
        font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
        line-height: 1.62;
        -webkit-font-smoothing: antialiased;
      }
      a { color: #8fd6fb; text-decoration: none; }
      a:hover { text-decoration: underline; }
      .wrap { width: min(var(--maxw), calc(100% - 40px)); margin: 0 auto; }

      /* Header */
      header.site {
        position: sticky; top: 0; z-index: 50;
        backdrop-filter: blur(12px);
        background: rgba(11, 16, 32, 0.72);
        border-bottom: 1px solid var(--border);
      }
      .nav { display: flex; align-items: center; gap: 18px; height: 64px; }
      .brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -0.01em; }
      .brand .logo { width: 28px; height: 28px; border-radius: 8px; display: block; flex: 0 0 auto; box-shadow: 0 6px 18px rgba(56, 189, 248, 0.18); }
      .nav .links { display: flex; gap: 18px; margin-left: 14px; }
      .nav .links a { color: var(--muted); font-size: 0.93rem; font-weight: 600; }
      .nav .links a:hover { color: var(--text); text-decoration: none; }
      .nav .spacer { flex: 1; }
      .nav .ghs { display: flex; gap: 10px; }
      .pill { border: 1px solid var(--border-strong); border-radius: 999px; padding: 7px 14px; font-size: 0.88rem; font-weight: 700; color: var(--text); background: rgba(15, 23, 42, 0.6); }
      .pill.solid { border-color: transparent; background: linear-gradient(90deg, var(--accent), var(--accent-2)); color: #07101f; }
      .menu-btn { display: none; }

      main { padding-bottom: 80px; }
      section { padding: 64px 0 8px; }
      .eyebrow { color: var(--accent); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; }
      h1 { margin: 12px 0 16px; font-size: clamp(2.5rem, 6.2vw, 4.6rem); line-height: 0.98; letter-spacing: -0.045em; }
      h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); letter-spacing: -0.03em; margin: 0 0 8px; }
      .section-intro { color: var(--muted); max-width: 760px; margin: 0 0 26px; }
      .lead { color: var(--muted); font-size: clamp(1.06rem, 2vw, 1.28rem); max-width: 720px; }

      /* Hero */
      .hero { padding-top: 56px; }
      .hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr); gap: 34px; align-items: center; }
      .cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
      .btn { border: 1px solid var(--border-strong); border-radius: 999px; padding: 11px 19px; font-weight: 700; color: var(--text); background: rgba(15, 23, 42, 0.66); }
      .btn:hover { text-decoration: none; border-color: var(--accent); }
      .btn.primary { border-color: transparent; background: linear-gradient(90deg, var(--accent), var(--accent-2)); color: #07101f; }
      .visual { border: 1px solid var(--border); border-radius: 26px; overflow: hidden; background: var(--panel); box-shadow: 0 30px 80px rgba(0,0,0,0.34); }
      .visual img { display: block; width: 100%; }

      .definition { margin-top: 30px; border-left: 4px solid var(--accent); padding: 18px 22px; border-radius: 14px; background: rgba(15, 23, 42, 0.7); color: var(--muted); }
      .definition strong { color: var(--text); }

      /* Stats */
      .stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-top: 34px; }
      .stat { border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; background: var(--panel); text-align: center; }
      .stat b { display: block; font-size: 1.9rem; letter-spacing: -0.03em; background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
      .stat span { color: var(--faint); font-size: 0.84rem; font-weight: 600; }

      /* Generic grids and cards */
      .grid { display: grid; gap: 16px; }
      .g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
      .g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
      .card { border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; background: var(--panel); transition: transform 0.16s ease, border-color 0.16s ease; }
      .card:hover { transform: translateY(-3px); border-color: var(--border-strong); }
      .card h3 { margin: 0 0 8px; font-size: 1.06rem; }
      .card p { color: var(--muted); margin: 0; font-size: 0.95rem; }

      .stack { display: grid; gap: 12px; }
      .layer { border: 1px solid var(--border); border-radius: 16px; padding: 16px 18px; background: rgba(15, 23, 42, 0.7); }
      .layer.top { border-color: transparent; background: linear-gradient(90deg, rgba(56,189,248,0.16), rgba(167,139,250,0.16)); }
      .layer strong { color: var(--text); }
      .layer span { color: var(--faint); }

      .wide { border: 1px solid var(--border); border-radius: 24px; overflow: hidden; background: var(--panel); box-shadow: 0 26px 70px rgba(0,0,0,0.28); }
      .wide img { display: block; width: 100%; }

      /* Pattern cards */
      .pat { display: block; border: 1px solid var(--border); border-radius: 16px; padding: 16px 16px; background: var(--panel); transition: transform 0.16s ease, border-color 0.16s ease; }
      .pat:hover { transform: translateY(-3px); border-color: var(--accent); text-decoration: none; }
      .pat .sym { color: var(--faint); font-size: 0.82rem; }
      .pat .name { display: block; color: var(--text); font-weight: 700; margin-top: 4px; }

      /* Maturity */
      .levels { display: grid; gap: 10px; }
      .lvl { display: grid; grid-template-columns: 54px 1fr; gap: 14px; align-items: center; border: 1px solid var(--border); border-radius: 14px; padding: 12px 16px; background: var(--panel); }
      .lvl b { font-size: 1.4rem; background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; text-align: center; }
      .lvl .t { color: var(--text); font-weight: 700; }
      .lvl .d { color: var(--faint); font-size: 0.9rem; }

      /* Chips */
      .chips { display: flex; flex-wrap: wrap; gap: 10px; }
      .chip { border: 1px solid var(--border-strong); border-radius: 999px; padding: 8px 15px; font-size: 0.9rem; font-weight: 600; color: var(--muted); background: rgba(15,23,42,0.6); }
      .chip:hover { color: var(--text); border-color: var(--accent); text-decoration: none; }

      footer { margin-top: 70px; border-top: 1px solid var(--border); padding-top: 30px; color: var(--faint); }
      footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 22px; }
      footer h4 { color: var(--text); margin: 0 0 10px; font-size: 0.95rem; }
      footer a { color: var(--muted); display: block; padding: 3px 0; }
      .cite { position: relative; border: 1px solid var(--border); border-radius: 12px; background: #0a0f1d; padding: 14px 14px; margin-top: 12px; overflow: auto; }
      .cite pre { margin: 0; color: #cbd5e1; font-size: 0.8rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre; }
      .copy { position: absolute; top: 10px; right: 10px; border: 1px solid var(--border-strong); background: rgba(15,23,42,0.8); color: var(--text); border-radius: 8px; padding: 4px 10px; font-size: 0.78rem; cursor: pointer; }
      .legal { margin-top: 26px; font-size: 0.88rem; }

      @media (max-width: 900px) {
        .hero-grid { grid-template-columns: 1fr; }
        .g-3, .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
        .stats { grid-template-columns: repeat(2, 1fr); }
        footer .cols { grid-template-columns: 1fr; }
        .nav .links { display: none; }
        .menu-btn { display: inline-flex; }
      }
      @media (max-width: 560px) {
        .g-3, .g-4 { grid-template-columns: 1fr; }
        .lvl { grid-template-columns: 44px 1fr; }
        .nav { gap: 8px; }
        .brand .bt { display: none; }
        .pill { padding: 6px 12px; font-size: 0.82rem; white-space: nowrap; }
        h1 { font-size: clamp(2.2rem, 11vw, 3rem); }
      }
      @media (prefers-reduced-motion: reduce) {
        html { scroll-behavior: auto; }
        .card, .pat { transition: none; }
      }
    </style>
    <script type="application/ld+json">
      {
        "@context": "https://schema.org",
        "@type": "CollectionPage",
        "name": "Awesome Loop Engineering",
        "url": "https://chaoyue0307.github.io/awesome-loop-engineering/",
        "description": "A curated field guide to Loop Engineering: designing recurring AI-agent systems above prompt, context, and harness engineering.",
        "keywords": ["Loop Engineering", "AI agents", "Coding agents", "Agent workflows", "Agentic loops"],
        "isPartOf": {
          "@type": "WebSite",
          "name": "Awesome Loop Engineering",
          "url": "https://github.com/ChaoYue0307/awesome-loop-engineering"
        },
        "license": "https://creativecommons.org/publicdomain/zero/1.0/",
        "logo": "https://chaoyue0307.github.io/awesome-loop-engineering/assets/awesome-loop-engineering-logo.svg",
        "author": { "@type": "Person", "name": "Chaoyue He" }
      }
    </script>
  </head>
  <body>
    <header class="site">
      <div class="wrap nav">
        <span class="brand"><img class="logo" src="assets/awesome-loop-engineering-logo.svg" alt="" width="28" height="28"> <span class="bt">Loop Engineering</span></span>
        <nav class="links" aria-label="Primary">
          <a href="#concept">Concept</a>
          <a href="#lifecycle">Lifecycle</a>
          <a href="#choose">Choose a loop</a>
          <a href="#patterns">Patterns</a>
          <a href="#runtimes">Runtimes</a>
          <a href="#resources">Resources</a>
        </nav>
        <span class="spacer"></span>
        <span class="ghs">
          <a class="pill" href="https://huggingface.co/cy0307/awesome-loop-engineering">Hugging Face</a>
          <a class="pill solid" href="https://github.com/ChaoYue0307/awesome-loop-engineering">GitHub</a>
        </span>
      </div>
    </header>

    <main>
      <!-- HERO -->
      <section class="hero" id="top">
        <div class="wrap">
          <div class="hero-grid">
            <div>
              <div class="eyebrow">Awesome Loop Engineering</div>
              <h1>Design loops,<br>not just prompts.</h1>
              <p class="lead">
                Loop Engineering is the AI and coding-agent practice of designing recurring systems that discover work, delegate it to agents, verify results, persist state, decide next actions, and run again.
              </p>
              <div class="cta">
                <a class="btn primary" href="https://github.com/ChaoYue0307/awesome-loop-engineering#readme">Explore the list</a>
                <a class="btn" href="#choose">Choose your loop</a>
                <a class="btn" href="https://github.com/ChaoYue0307/awesome-loop-engineering/blob/main/patterns/MATRIX.md">Pattern matrix</a>
              </div>
            </div>
            <div class="visual">
              <img src="https://raw.githubusercontent.com/ChaoYue0307/awesome-loop-engineering/main/assets/loop-engineering-stack.svg" alt="Diagram of the engineering stack: Prompt, Context, and Harness Engineering improve one run; Loop Engineering governs recurring agent work over time.">
            </div>
          </div>

          <div class="stats" role="list" aria-label="Repository at a glance">
            <div class="stat" role="listitem"><b>15</b><span>operational patterns</span></div>
            <div class="stat" role="listitem"><b>15</b><span>loop contracts</span></div>
            <div class="stat" role="listitem"><b>6</b><span>runnable templates</span></div>
            <div class="stat" role="listitem"><b>250+</b><span>curated entries</span></div>
            <div class="stat" role="listitem"><b>8</b><span>languages</span></div>
          </div>

          <div class="definition">
            <strong>Canonical definition.</strong>
            Loop Engineering is the AI and coding-agent practice of designing recurring systems that discover work, delegate it to agents, verify results, persist state, decide next actions, and run again on a cadence, event, or until a verifiable goal is reached.
          </div>
        </div>
      </section>

      <!-- CONCEPT / STACK -->
      <section id="concept">
        <div class="wrap">
          <div class="eyebrow">The stack</div>
          <h2>Four layers, one recurring system</h2>
          <p class="section-intro">Prompt, context, and harness engineering make a single agent run better. Loop Engineering sits on top and governs agent work over time.</p>
          <div class="stack">
            <div class="layer"><strong>Prompt Engineering</strong> &mdash; <span>what should I say to the model?</span></div>
            <div class="layer"><strong>Context Engineering</strong> &mdash; <span>what state, memory, and knowledge should the model see?</span></div>
            <div class="layer"><strong>Harness Engineering</strong> &mdash; <span>what tools, permissions, sandboxes, and checks surround one run?</span></div>
            <div class="layer top"><strong>Loop Engineering</strong> &mdash; <span>what recurring system governs agent work over time?</span></div>
          </div>
        </div>
      </section>

      <!-- LIFECYCLE -->
      <section id="lifecycle">
        <div class="wrap">
          <div class="eyebrow">The lifecycle</div>
          <h2>One pass of a recurring loop</h2>
          <p class="section-intro">Verification is a deterministic gate, not the agent's opinion. State persists outside the model. Every loop has a budget and a human exit.</p>
          <div class="wide">
            <img src="https://raw.githubusercontent.com/ChaoYue0307/awesome-loop-engineering/main/assets/loop-lifecycle.svg" alt="Loop Engineering lifecycle: Intake, Delegate, Act, Verify, Persist, Decide; Decide retries by feeding evidence back, escalates to a human, or exits when the goal is met.">
          </div>
        </div>
      </section>

      <!-- CHOOSE YOUR LOOP -->
      <section id="choose">
        <div class="wrap">
          <div class="eyebrow">Choose your loop</div>
          <h2>Start from the problem you have</h2>
          <p class="section-intro">Each card opens a ready-to-adapt pattern with a trigger, verification gate, durable state, budget, and escalation path. Compare them all in the <a href="https://github.com/ChaoYue0307/awesome-loop-engineering/blob/main/patterns/MATRIX.md">pattern matrix</a>.</p>
          <div class="grid g-3">
            <a class="pat" href="https://github.com/ChaoYue0307/awesome-loop-engineering/blob/main/patterns/pr-babysitter.md"><span class="sym">&ldquo;My PR is stuck&rdquo;</span><span class="name">PR babysitter</span></a>
            <a class="pat" href="https://github.com/ChaoYue0307/awesome-loop-engineering/blob/main/patterns/ci-repair-loop.md"><span class="sym">&ldquo;CI keeps failing&rdquo;</span><span class="name">CI repair loop</span></a>
            <a class="pat" href="https://github.com/ChaoYue0307/awesome-loop-engineering/blob/main/patterns/docs-drift-collector.md"><span class="sym">&ldquo;The docs may be stale&rdquo;</span><span class="name">Docs drift collector</span></a>
            <a class="pat" href="https://github.com/ChaoYue0307/awesome-loop-engineering/blob/main/patterns/deploy-verifier.md"><span class="sym">&ldquo;A deploy needs monitoring&rdquo;</span><span class="name">Deploy verifier</span></a>
            <a class="pat" href="https://github.com/ChaoYue0307/awesome-loop-engineering/blob/main/patterns/feedback-clusterer.md"><span class="sym">&ldquo;Feedback is noisy&rdquo;</span><span class="name">Feedback clusterer</span></a>
            <a class="pat" href="https://github.com/ChaoYue0307/awesome-loop-engineering/blob/main/patterns/dependency-triage-loop.md"><span class="sym">&ldquo;Updates pile up&rdquo;</span><span class="name">Dependency triage loop</span></a>
            <a class="pat" href="https://github.com/ChaoYue0307/awesome-loop-engineering/blob/main/patterns/evaluation-regression-loop.md"><span class="sym">&ldquo;Agent evals regressed&rdquo;</span><span class="name">Evaluation regression loop</span></a>
            <a class="pat" href="https://github.com/ChaoYue0307/awesome-loop-engineering/blob/main/patterns/security-review-loop.md"><span class="sym">&ldquo;Sensitive changes need review&rdquo;</span><span class="name">Security review loop</span></a>
            <a class="pat" href="https://github.com/ChaoYue0307/awesome-loop-engineering/blob/main/patterns/cost-control-loop.md"><span class="sym">&ldquo;Agent spend is rising&rdquo;</span><span class="name">Cost-control loop</span></a>
            <a class="pat" href="https://github.com/ChaoYue0307/awesome-loop-engineering/blob/main/patterns/bug-hunting-loop.md"><span class="sym">&ldquo;Recurring bug discovery&rdquo;</span><span class="name">Bug hunting loop</span></a>
            <a class="pat" href="https://github.com/ChaoYue0307/awesome-loop-engineering/blob/main/patterns/enterprise-approval-loop.md"><span class="sym">&ldquo;A change needs sign-off&rdquo;</span><span class="name">Enterprise approval loop</span></a>
            <a class="pat" href="https://github.com/ChaoYue0307/awesome-loop-engineering/blob/main/patterns/incident-response-loop.md"><span class="sym">&ldquo;An incident just paged&rdquo;</span><span class="name">Incident response loop</span></a>
            <a class="pat" href="https://github.com/ChaoYue0307/awesome-loop-engineering/blob/main/patterns/data-quality-loop.md"><span class="sym">&ldquo;A dataset keeps drifting&rdquo;</span><span class="name">Data-quality loop</span></a>
            <a class="pat" href="https://github.com/ChaoYue0307/awesome-loop-engineering/blob/main/patterns/release-note-loop.md"><span class="sym">&ldquo;Release notes are a chore&rdquo;</span><span class="name">Release-note loop</span></a>
            <a class="pat" href="https://github.com/ChaoYue0307/awesome-loop-engineering/blob/main/patterns/model-routing-loop.md"><span class="sym">&ldquo;Model choice is ad hoc&rdquo;</span><span class="name">Model-routing loop</span></a>
          </div>
        </div>
      </section>

      <!-- PATTERNS / CONTRACT -->
      <section id="patterns">
        <div class="wrap">
          <div class="eyebrow">The loop contract</div>
          <h2>Every loop names the same parts</h2>
          <p class="section-intro">A useful loop has a contract. If a part is missing, it becomes either a manual prompt habit or an unsafe background automation.</p>
          <div class="wide">
            <img src="https://raw.githubusercontent.com/ChaoYue0307/awesome-loop-engineering/main/assets/loop-contract-cards.svg" alt="Loop Contract cards: objective, trigger, intake, workspace, context, delegation, verification, state, budget, escalation, and exit.">
          </div>
          <div class="grid g-3" style="margin-top:18px">
            <div class="card"><h3>Verifiable by design</h3><p>Tests, typechecks, evals, traces, or reviewers decide done &mdash; never the acting agent alone.</p></div>
            <div class="card"><h3>State outside the model</h3><p>Progress files, issues, checkpoints, and traces survive the next run and every context reset.</p></div>
            <div class="card"><h3>Budgeted and bounded</h3><p>Retries, runtime, and concurrency are capped, with a clear human exit before anything risky ships.</p></div>
          </div>
        </div>
      </section>

      <!-- RUNTIMES -->
      <section id="runtimes">
        <div class="wrap">
          <div class="eyebrow">Where loops run</div>
          <h2>Pick a runtime deliberately</h2>
          <p class="section-intro">The same contract can run as a session command, a scheduled cloud job, a CI workflow, or a cron wrapper. The <a href="https://github.com/ChaoYue0307/awesome-loop-engineering/blob/main/meta/RUNTIME_SELECTION.md">runtime selection guide</a> compares persistence, file access, isolation, and permissions.</p>
          <div class="grid g-3">
            <a class="card" href="https://github.com/ChaoYue0307/awesome-loop-engineering/blob/main/examples/runnable/claude-loop.md"><h3>Claude Code <code>/loop</code></h3><p>Session-scoped recurring task while you are nearby.</p></a>
            <a class="card" href="https://github.com/ChaoYue0307/awesome-loop-engineering/blob/main/examples/runnable/claude-desktop-scheduled-task.md"><h3>Desktop scheduled task</h3><p>Local recurring runs with file access and missed-run guardrails.</p></a>
            <a class="card" href="https://github.com/ChaoYue0307/awesome-loop-engineering/blob/main/examples/runnable/codex-automation.md"><h3>Codex automation</h3><p>Unattended background task in an isolated worktree.</p></a>
            <a class="card" href="https://github.com/ChaoYue0307/awesome-loop-engineering/blob/main/examples/runnable/github-agentic-workflow.md"><h3>GitHub agentic workflow</h3><p>Scheduled or event-triggered loop in GitHub Actions.</p></a>
            <a class="card" href="https://github.com/ChaoYue0307/awesome-loop-engineering/blob/main/examples/runnable/shell-cron-loop.md"><h3>Shell / cron</h3><p>Minimal wrapper that delegates to an agent CLI and records receipts.</p></a>
            <a class="card" href="https://github.com/ChaoYue0307/awesome-loop-engineering/blob/main/examples/runnable/test-repair-loop.sh"><h3>Runnable reference</h3><p>A dependency-light test-repair loop you can run today.</p></a>
          </div>
        </div>
      </section>

      <!-- MATURITY -->
      <section id="maturity">
        <div class="wrap">
          <div class="eyebrow">Loop maturity model</div>
          <h2>Climb the model slowly</h2>
          <p class="section-intro">A reliable Level 3 loop with clear state and deterministic checks is usually more valuable than a flashy Level 5 loop with vague goals.</p>
          <div class="levels">
            <div class="lvl"><b>0</b><div><div class="t">Manual prompting</div><div class="d">A human reads state and writes the next prompt.</div></div></div>
            <div class="lvl"><b>1</b><div><div class="t">Scripted retry</div><div class="d">A shell or script loop feeds errors back to an agent.</div></div></div>
            <div class="lvl"><b>2</b><div><div class="t">Scheduled loop</div><div class="d">The agent runs on a cadence and reports findings.</div></div></div>
            <div class="lvl"><b>3</b><div><div class="t">Stateful loop</div><div class="d">Progress survives across sessions through files, issues, or checkpoints.</div></div></div>
            <div class="lvl"><b>4</b><div><div class="t">Self-verifying loop</div><div class="d">Deterministic checks or evaluator agents gate completion.</div></div></div>
            <div class="lvl"><b>5</b><div><div class="t">Multi-agent loop</div><div class="d">Specialized agents split discovery, implementation, review, and judgment.</div></div></div>
            <div class="lvl"><b>6</b><div><div class="t">Production-supervised loop</div><div class="d">Observability, budgets, approvals, rollback, and escalation are first-class.</div></div></div>
          </div>
        </div>
      </section>

      <!-- RESOURCES -->
      <section id="resources">
        <div class="wrap">
          <div class="eyebrow">The curated list</div>
          <h2>Browse by category</h2>
          <p class="section-intro">Primary sources, official docs, papers, benchmarks, and implementation-heavy write-ups &mdash; selective, not a dump. Jump into any section of the README.</p>
          <div class="chips">
            <a class="chip" href="https://github.com/ChaoYue0307/awesome-loop-engineering#start-here">Start Here</a>
            <a class="chip" href="https://github.com/ChaoYue0307/awesome-loop-engineering#core-loop-primitives">Core Loop Primitives</a>
            <a class="chip" href="https://github.com/ChaoYue0307/awesome-loop-engineering#official-runtime-guides">Runtime Guides</a>
            <a class="chip" href="https://github.com/ChaoYue0307/awesome-loop-engineering#research-foundations">Research Foundations</a>
            <a class="chip" href="https://github.com/ChaoYue0307/awesome-loop-engineering#verification-and-feedback-gates">Verification &amp; Feedback</a>
            <a class="chip" href="https://github.com/ChaoYue0307/awesome-loop-engineering#securing-unattended-loops">Securing Unattended Loops</a>
            <a class="chip" href="https://github.com/ChaoYue0307/awesome-loop-engineering#state-memory-and-context-persistence">State &amp; Memory</a>
            <a class="chip" href="https://github.com/ChaoYue0307/awesome-loop-engineering#orchestration-and-multi-agent-delegation">Orchestration</a>
            <a class="chip" href="https://github.com/ChaoYue0307/awesome-loop-engineering#benchmarks-and-evaluation">Benchmarks</a>
            <a class="chip" href="https://github.com/ChaoYue0307/awesome-loop-engineering#critiques-risks-and-limitations">Critiques &amp; Risks</a>
            <a class="chip" href="https://github.com/ChaoYue0307/awesome-loop-engineering#adjacent-awesome-lists">Adjacent Lists</a>
          </div>
        </div>
      </section>

      <!-- CONTRIBUTE -->
      <section id="contribute">
        <div class="wrap">
          <div class="eyebrow">Contribute</div>
          <h2>Bring a source or a real loop</h2>
          <div class="grid g-3">
            <a class="card" href="https://github.com/ChaoYue0307/awesome-loop-engineering/blob/main/CONTRIBUTING.md"><h3>Add a resource</h3><p>Primary sources and implementation-heavy write-ups, with one specific annotation.</p></a>
            <a class="card" href="https://github.com/ChaoYue0307/awesome-loop-engineering/blob/main/gallery/README.md"><h3>Share a loop</h3><p>Use the case-study and anonymization checklists to publish a real or anonymized loop.</p></a>
            <a class="card" href="https://github.com/ChaoYue0307/awesome-loop-engineering/discussions/2"><h3>Join the discussion</h3><p>Show your Loop Engineering patterns and compare notes with other builders.</p></a>
          </div>
        </div>
      </section>

      <footer>
        <div class="wrap">
          <div class="cols">
            <div>
              <h4>Cite this repository</h4>
              <div class="cite">
                <button class="copy" type="button" data-copy="cite-bib">Copy</button>
                <pre id="cite-bib">@misc{chaoyue2026awesome_loop_engineering,
  author       = {He, Chaoyue},
  title        = {Awesome Loop Engineering},
  year         = {2026},
  howpublished = {\url{https://github.com/ChaoYue0307/awesome-loop-engineering}}
}</pre>
              </div>
            </div>
            <div>
              <h4>Explore</h4>
              <a href="https://github.com/ChaoYue0307/awesome-loop-engineering/blob/main/DEFINITION.md">Canonical definition</a>
              <a href="https://github.com/ChaoYue0307/awesome-loop-engineering/blob/main/MANIFESTO.md">Manifesto</a>
              <a href="https://github.com/ChaoYue0307/awesome-loop-engineering/blob/main/TAXONOMY.md">Taxonomy</a>
              <a href="https://github.com/ChaoYue0307/awesome-loop-engineering/blob/main/ANTI-PATTERNS.md">Anti-patterns</a>
            </div>
            <div>
              <h4>Project</h4>
              <a href="https://github.com/ChaoYue0307/awesome-loop-engineering">GitHub repository</a>
              <a href="https://huggingface.co/cy0307/awesome-loop-engineering">Hugging Face mirror</a>
              <a href="https://github.com/ChaoYue0307/awesome-loop-engineering/blob/main/ROADMAP.md">Roadmap</a>
              <a href="https://github.com/ChaoYue0307/awesome-loop-engineering/blob/main/TRANSLATIONS.md">Translations</a>
            </div>
          </div>
          <p class="legal">
            This is an early curated map of an emerging practice, not a final standard. Original repository materials are released under CC0-1.0. Linked resources keep their own licenses.
          </p>
        </div>
      </footer>
    </main>

    <script>
      document.querySelectorAll('.copy').forEach(function (btn) {
        btn.addEventListener('click', function () {
          var el = document.getElementById(btn.getAttribute('data-copy'));
          if (!el) return;
          navigator.clipboard.writeText(el.innerText).then(function () {
            var prev = btn.textContent; btn.textContent = 'Copied'; setTimeout(function () { btn.textContent = prev; }, 1400);
          });
        });
      });
    </script>
  </body>
</html>