loopgen 0.5.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +56 -21
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,25 +4,28 @@
|
|
|
4
4
|
[](https://github.com/Nagiici/Loopgen/actions/workflows/ci.yml)
|
|
5
5
|
[](LICENSE)
|
|
6
6
|
|
|
7
|
-
**AI coding
|
|
7
|
+
**Run your AI's coding loop — and prove its work actually passed.**
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
Any model can *write* an `AGENTS.md`. loopgen does the part a stateless model can't: it **runs** a bounded
|
|
10
|
+
loop, executes your real `test` / `lint` / `build` and **gates success on the exit codes**, **enforces**
|
|
11
|
+
forbidden-path and iteration limits, and writes a **tamper-evident, hash-chained audit log + proof report**.
|
|
12
|
+
Works with Claude Code, Codex, Cursor, and local models (Ollama, LM Studio, llama.cpp).
|
|
12
13
|
|
|
13
14
|
```bash
|
|
14
|
-
npx loopgen init
|
|
15
|
+
npx loopgen init # scan your repo + pick bounded-loop templates (local wizard, nothing written)
|
|
16
|
+
npx loopgen run test-repair # run the loop, verify it, and leave proof it passed (exits 0/1 for CI)
|
|
15
17
|
```
|
|
16
18
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
+
- ✅ **Prove the work** — `loopgen run` executes a loop, gates on your *real* verification commands, and
|
|
20
|
+
writes an auditable record a chatbot cannot. *Referee* mode verifies any agent's change; *driven* mode
|
|
21
|
+
drives a **local model** itself and **blocks forbidden writes before they land**.
|
|
22
|
+
- 🧾 **Govern the agents** — `loopgen audit` rolls up every dev's hash-chained ledger into a report + a
|
|
23
|
+
self-contained HTML dashboard, and a CI **merge gate** (`audit check`, also a GitHub Action) blocks PRs
|
|
24
|
+
that lack passing, untampered proof.
|
|
25
|
+
- 🏠 **Local-first & open source (MIT)** — no telemetry, no cloud; drives only your local models; API keys
|
|
26
|
+
are referenced by env-var name only.
|
|
19
27
|
|
|
20
|
-
|
|
21
|
-
paths, maker/checker separation, and a state-file audit log.
|
|
22
|
-
- 🔌 **Tool-agnostic** — one scan generates config for Codex, Claude, Cursor, and local runtimes.
|
|
23
|
-
- 🏠 **Local-first** — no telemetry, no cloud calls; API keys are referenced by env-var name only.
|
|
24
|
-
|
|
25
|
-
<!-- TODO: add a 15s demo GIF of the wizard (scan → preview diff → apply) here. -->
|
|
28
|
+

|
|
26
29
|
|
|
27
30
|
📖 中文说明见 [中文](#中文) · English documentation [below](#english).
|
|
28
31
|
|
|
@@ -32,15 +35,24 @@ npx loopgen init # opens a local wizard in demo mode — no setup, nothing
|
|
|
32
35
|
|
|
33
36
|
### 项目简介
|
|
34
37
|
|
|
35
|
-
|
|
38
|
+
**跑你的 AI 编码循环 —— 并证明它的工作真的通过了。** 任何模型都能*写*一个 `AGENTS.md`;loopgen 做的是
|
|
39
|
+
模型本身做不到的那部分:**执行**一个有界循环,跑你真实的 `test` / `lint` / `build` 并**按退出码判定通过/
|
|
40
|
+
失败**,**强制**禁止路径与迭代上限,并写下一条**带哈希链、防篡改的审计 + 证明报告**。支持 Claude Code、
|
|
41
|
+
Codex、Cursor 和本地模型(Ollama、LM Studio、llama.cpp)。
|
|
36
42
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
-
|
|
40
|
-
|
|
41
|
-
- 状态记录:`.loopgen/state/*.md`,用于记录每次循环尝试、结果和阻塞点。
|
|
43
|
+
```bash
|
|
44
|
+
npx loopgen init # 扫描仓库 + 选择有界循环模板(本地向导,不写文件)
|
|
45
|
+
npx loopgen run test-repair # 跑这个循环、验证它,并留下「通过」的证据(退出码 0/1,可接 CI)
|
|
46
|
+
```
|
|
42
47
|
|
|
43
|
-
|
|
48
|
+
- ✅ **证明工作** —— `loopgen run` 执行循环、按你的真实验证命令判定、写下 chatbot 做不到的可审计记录。
|
|
49
|
+
*referee* 模式验证任意 agent 的改动;*driven* 模式自己驱动**本地模型**,并在**落盘前拦截禁止路径写入**。
|
|
50
|
+
- 🧾 **治理 agent** —— `loopgen audit` 把每个开发者的哈希链账本聚合成报告 + 自包含 HTML 看板,CI **合并闸门**
|
|
51
|
+
(`audit check`,也有现成 GitHub Action)挡住「缺少通过/未被篡改证据」的 PR。
|
|
52
|
+
- 🏠 **local-first & 开源(MIT)** —— 无遥测、无云调用;只驱动你的本地模型;API key 仅按环境变量名引用。
|
|
53
|
+
|
|
54
|
+
> 仍可先用内置 demo 预览:`loopgen init` 不需要真实项目、也不会写入文件。生成的可审查文件包括
|
|
55
|
+
> `.loopgen/playbooks/*.md`、Codex/Claude/Cursor/AGENTS.md 适配输出、`.loopgen/state/*.md` 等。
|
|
44
56
|
|
|
45
57
|
### 适合谁先尝试
|
|
46
58
|
|
|
@@ -197,6 +209,16 @@ npm run loopgen -- audit check --require test-repair --require-no-violations --r
|
|
|
197
209
|
(直接打开即可,无需服务器)和一份 markdown 报告。`check` 是**合并闸门**:当某个必需 loop 没有通过记录、
|
|
198
210
|
有改动碰了禁止路径、或链断了,就以非 0 退出 —— 接进 CI 即可在「证据缺失/不足」时挡住合并。
|
|
199
211
|
|
|
212
|
+
也有现成的 GitHub Action(会把治理汇总写进 job summary,并在策略违规时让 job 失败):
|
|
213
|
+
|
|
214
|
+
```yaml
|
|
215
|
+
- uses: Nagiici/Loopgen/.github/actions/audit-check@v0.6.0
|
|
216
|
+
with:
|
|
217
|
+
require: test-repair,ci-failure-repair
|
|
218
|
+
require-no-violations: "true"
|
|
219
|
+
require-chain: "true"
|
|
220
|
+
```
|
|
221
|
+
|
|
200
222
|
可用 adapter:
|
|
201
223
|
|
|
202
224
|
- `agents-md`:通用 `AGENTS.md`,可被 Claude Code、Codex、Cursor、Copilot、Gemini CLI、Aider 等读取
|
|
@@ -262,7 +284,9 @@ npm run loopgen -- audit check --require test-repair --require-no-violations --r
|
|
|
262
284
|
|
|
263
285
|
### Overview
|
|
264
286
|
|
|
265
|
-
`loopgen`
|
|
287
|
+
`loopgen` is a **verified runner for AI coding loops**: it scans a project, generates inspectable bounded-loop
|
|
288
|
+
configs, then **runs** them — executing your real verification, enforcing guardrails, and writing
|
|
289
|
+
tamper-evident proof. The generated, inspectable files (the input to `loopgen run`):
|
|
266
290
|
|
|
267
291
|
- Tool-agnostic `.loopgen/playbooks/*.md` files for anyone who wants to understand the loop before using an agent tool.
|
|
268
292
|
- Codex outputs: `.codex/skills/*`, `.codex/automations/*`, and checker agents.
|
|
@@ -469,6 +493,17 @@ a self-contained **HTML governance dashboard** (just open it — no server) plus
|
|
|
469
493
|
the **merge gate**: it exits non-zero if a required loop has no passing run, a run touched forbidden paths, or
|
|
470
494
|
the chain is broken — wire it into CI to block merges on missing or insufficient proof.
|
|
471
495
|
|
|
496
|
+
There's a ready-made GitHub Action (it renders the governance rollup into the job summary and fails the job
|
|
497
|
+
on policy violations):
|
|
498
|
+
|
|
499
|
+
```yaml
|
|
500
|
+
- uses: Nagiici/Loopgen/.github/actions/audit-check@v0.6.0
|
|
501
|
+
with:
|
|
502
|
+
require: test-repair,ci-failure-repair
|
|
503
|
+
require-no-violations: "true"
|
|
504
|
+
require-chain: "true"
|
|
505
|
+
```
|
|
506
|
+
|
|
472
507
|
Available adapters:
|
|
473
508
|
|
|
474
509
|
- `agents-md` — one `AGENTS.md` read by Claude Code, Codex, Cursor, Copilot, Gemini CLI, Aider, and more
|
package/package.json
CHANGED