Skip to content

Commit 4d05214

Browse files
shitianfangclaude
andcommitted
docs: position loop.js in loop engineering; link the docs site
New docs page defining loop engineering and where the verdict fits; README carries the positioning and the Mintlify URL; package keywords and homepage follow. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 1979ec3 commit 4d05214

5 files changed

Lines changed: 79 additions & 11 deletions

File tree

‎README.md‎

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22

33
**Stop prompting agents. State a Goal, and let the loop drive.**
44

5-
loop.js is a thin, opinionated TypeScript runtime for autonomous agent loops. You state a
6-
**Goal**; the engine drives **Rounds** — an Execute agent works in the work tree, then a
7-
separate, skeptical **Verify** agent judges the result against the bar — until the Goal
8-
**settles**. Every Round starts with fresh context and reads its memory from disk, so the
9-
loop survives crashes, restarts, and weeks on a schedule.
5+
loop.js is a **loop engineering** framework — a thin, opinionated TypeScript runtime for
6+
autonomous agent loops. You state a **Goal**; the engine drives **Rounds** — an Execute
7+
agent works in the work tree, then a separate, skeptical **Verify** agent judges the result
8+
against the bar — until the Goal **settles**. Every Round starts with fresh context and
9+
reads its memory from disk, so the loop survives crashes, restarts, and weeks on a schedule.
10+
11+
📖 **Docs: [loop-js.mintlify.site](https://loop-js.mintlify.site/)**
1012

1113
```sh
1214
npm create @loop.js@latest my-loop
@@ -45,6 +47,15 @@ does so. loop.js makes the writer/grader separation non-negotiable:
4547
- **Impossible is an answer.** A Goal that can never pass settles as a give-up instead of
4648
burning the budget to its cap.
4749

50+
## Loop engineering, with a verdict
51+
52+
*Loop engineering* is the practice of designing the system that prompts an agent — goal,
53+
iteration, verification, stop conditions — instead of prompting it turn by turn. Most loop
54+
runners iterate until a script or the agent itself says stop. loop.js is built around the
55+
missing piece: **an independent verdict**. The loop doesn't end because the worker feels
56+
done; it ends because a separate judge, with its own permissions and its own model, says
57+
the bar is met — or because a declared guard fires. [Read more →](https://loop-js.mintlify.site/loop-engineering)
58+
4859
## What a Round looks like
4960

5061
```
@@ -97,7 +108,8 @@ const exit = await run.done()
97108

98109
## Docs
99110

100-
Full documentation lives in [`docs/`](docs/) — quickstart, concepts, CLI and API reference.
111+
Full documentation: **[loop-js.mintlify.site](https://loop-js.mintlify.site/)** — quickstart,
112+
concepts, CLI and API reference (source in [`docs/`](docs/)).
101113

102114
## License
103115

‎docs/docs.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"groups": [
1313
{
1414
"group": "Get started",
15-
"pages": ["index", "quickstart"]
15+
"pages": ["index", "loop-engineering", "quickstart"]
1616
},
1717
{
1818
"group": "Concepts",

‎docs/loop-engineering.mdx‎

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
title: "What is loop engineering"
3+
description: "Designing the system that prompts an agent — and where loop.js fits in the practice"
4+
---
5+
6+
**Loop engineering** is the practice of designing the system that prompts an AI agent —
7+
instead of prompting it turn by turn. You define a goal, a way for the agent to find and do
8+
work, a way to verify the result, and a stop condition; the loop does the iterating. The
9+
term spread in mid-2026, after Claude Code's creator described his own workflow as "loops
10+
that prompt Claude" — by then coding agents were reliable enough at long-horizon work that
11+
the scarce skill had moved from writing prompts to designing the system that writes them.
12+
13+
## The elements of a loop
14+
15+
Every serious agent loop answers five questions:
16+
17+
| Question | loop.js answer |
18+
| --------------------- | --------------------------------------------------------------------- |
19+
| What is the work? | a **Goal** — set once, judged every Round |
20+
| How does it iterate? | **Rounds** — each starts with fresh context and reads memory from disk |
21+
| Who says it's done? | a separate, skeptical **Verify** agent — never the worker itself |
22+
| When does it stop? | when the Loop **settles** (bar met, or judged impossible) — limits are guards, never goals |
23+
| What re-triggers it? | any real scheduler — `loop cron` installs Entries into crontab, launchd, Task Scheduler, or Modal |
24+
25+
## Where loop.js stands in the practice
26+
27+
The simplest loops — shell scripts and minimal runners in the
28+
[ralph-loop](https://ralphloops.io/) tradition — re-prompt an agent with fresh context until
29+
a script check passes or a human stops it. That shape is powerful, and loop.js keeps its
30+
core insight (fresh context per iteration, state on disk). What loop.js adds is the
31+
**verdict**:
32+
33+
- **Writer ≠ grader.** A self-grading agent passes its own work; the better the model, the
34+
more confidently it does so. Verify runs as a separate agent, read-only by permission —
35+
not by prompt discipline.
36+
- **Digest-first, escalate when suspicious.** The judge reads the worker's handoff digest
37+
and can escalate — inspect the work tree, run the build, read the transcript — instead of
38+
rubber-stamping a summary.
39+
- **A "not yet" must say why.** The verdict's `reason` is mandatory and feeds the next
40+
Round, so iteration converges instead of retrying blind.
41+
- **Impossible is an answer.** A Goal that can never pass settles as a give-up instead of
42+
burning budget to the cap.
43+
- **Guards, declared.** Rounds, dollars, and per-Round wall clock bound the loop; a
44+
schedule Entry declares its own lifetime (`--until settled | forever`, capped).
45+
46+
## Try it
47+
48+
```sh
49+
npm create @loop.js@latest my-loop
50+
cd my-loop && npm install
51+
loop run
52+
```
53+
54+
<Card title="Quickstart" icon="rocket" href="/quickstart">
55+
From empty directory to a settled Goal.
56+
</Card>

‎packages/create-loop-js/package.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
"url": "git+https://github.com/loop-js/loop.js.git",
1919
"directory": "packages/create-loop-js"
2020
},
21-
"homepage": "https://github.com/loop-js/loop.js#readme",
21+
"homepage": "https://loop-js.mintlify.site",
2222
"bugs": "https://github.com/loop-js/loop.js/issues",
23-
"keywords": ["scaffold", "create", "agent", "agent-loop", "claude", "loop-js"],
23+
"keywords": ["scaffold", "create", "loop-engineering", "agent", "agent-loop", "claude", "loop-js"],
2424
"engines": {
2525
"node": ">=22.18.0"
2626
},

‎packages/loop-js/package.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
"url": "git+https://github.com/loop-js/loop.js.git",
2525
"directory": "packages/loop-js"
2626
},
27-
"homepage": "https://github.com/loop-js/loop.js#readme",
27+
"homepage": "https://loop-js.mintlify.site",
2828
"bugs": "https://github.com/loop-js/loop.js/issues",
29-
"keywords": ["agent", "agent-loop", "autonomous", "claude", "verify", "llm", "cron", "cli"],
29+
"keywords": ["loop-engineering", "agent", "agent-loop", "autonomous", "claude", "verify", "llm", "cron", "cli"],
3030
"engines": {
3131
"node": ">=22.18.0"
3232
},

0 commit comments

Comments
 (0)