← ClaudeAtlas

looplisted

Use when the user invokes /human-plan:loop to run, tick, inspect, or stop the Human Plan background batch loop.
qzruncode/stupid-ai · ★ 1 · AI & Automation · score 70
Install: claude install-skill qzruncode/stupid-ai
# Loop 先读取 `../../shared/human-plan-protocol.md`,并遵守共享 Human Plan 协议。 `loop` 负责把 `human-plan` 从单个 Plan 闭环提升为后台批次循环。它不是新的开发模式,也不是让 AI 无限改代码;它只负责维护一轮 batch 的状态、账本和 gate,并在安全边界内反复推进。 ## 核心模型 一轮 loop 的边界是 batch,不是单次 `code-scan`: ```text batch-code-scan -> batch-index -> 按顺序串行处理候选 Plan -> gated 时暂停当前 batch,等待人类批准/确认当前 Plan -> 所有 Plan complete -> 代码状态固化后生成 batch report -> 下一轮 loop 再基于最新代码执行新的 batch-code-scan ``` 不要在 batch 内反复全量扫描项目。只有当前 batch 的所有 Plan 都已 `complete`,且实现、审计、提交或用户指定的固化策略完成后,才允许开始下一轮 `batch-code-scan`。`gated` 或 `blocked` 不是 batch 结束状态;它们只表示当前 batch 还有事项不能自动解决。 ## 账本文件 所有 loop 运行状态写入当前项目: ```text docs/human-plans/.loop/ state.json batch-index.md run-log.md gates.md changelog.md token-ledger.md batches/ STOP ``` 字段和含义: - `state.json`:runner 状态、Batch ID、`batch_status`、max ticks、used ticks、active Plan、token 估算、最近错误。 - `batch-index.md`:本轮 batch 的扫描范围、候选 Plan、优先级、状态、依赖和串行处理顺序。 - `run-log.md`:每个 tick 实际做了什么。 - `gates.md`:等待人的事项,包含 Plan Ref、原因和精确命令。 - `changelog.md`:本轮已经解决的问题、改动范围、验证结果和剩余风险。 - `token-ledger.md`:每个 tick 的 input/output/total token 估算或真实 usage。 - `batches/<Batch ID>.md`:batch 全部解决后归档,说明发现了什么、解决了什么、代码状态如何固化、下一轮扫描基线是什么。 - `STOP`:runner 检测到该文件后,在当前 tick 结束后停止。 AI 每做一个动作,都必须能回答三件事:这轮发现了什么、已经解决了什么、现在卡在哪里需要人做什么。 ## 命令 ### `/human-plan:loop start [max_ticks]` 启动本地 runner。`max_ticks` 是本次最多执行多少个 tick,缺省为 `3`。如果 Claude Code 允许执行 shell,直接运行: ```bash node plugins/human-plan/loop/runner.js start <max_ticks> ``` 如果当前项目没有这个脚本,停止并提示安装