helloloop 0.1.0 → 0.1.2

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 CHANGED
@@ -1,168 +1,190 @@
1
1
  # HelloLoop
2
2
 
3
- `HelloLoop` 是一个面向 Codex 的 backlog 驱动开发插件。
3
+ `HelloLoop` 是一个面向 Codex 的独立插件,用来把“根据开发文档接续推进仓库开发”这件事标准化、可追踪、可验证地跑起来。
4
4
 
5
- 它把持续开发所需的任务队列、执行策略、验证命令和运行记录集中到目标仓库的 `.helloloop/` 目录里,并通过显式 CLI / skill 入口推动任务逐步落地。
5
+ 它会先分析当前仓库真实代码与开发文档之间的差距,再把后续任务、运行状态、执行记录统一写入目标仓库根目录的 `.helloloop/`,让 Codex 能持续接着做,而不是每轮都重新交代背景。
6
+
7
+ 命令入口按 `Node.js 20+` 设计,支持 Windows、macOS 和 Linux。
6
8
 
7
9
  ## 目录
8
10
 
9
- - [HelloLoop 是什么](#helloloop-是什么)
10
- - [核心能力](#核心能力)
11
- - [适用场景](#适用场景)
12
- - [项目结构](#项目结构)
11
+ - [核心定位](#核心定位)
13
12
  - [安装](#安装)
14
13
  - [快速开始](#快速开始)
15
- - [命令说明](#命令说明)
14
+ - [路径规则](#路径规则)
15
+ - [安全底线](#安全底线)
16
+ - [命令速查](#命令速查)
16
17
  - [状态目录](#状态目录)
17
- - [任务与执行模型](#任务与执行模型)
18
- - [发布到 npm](#发布到-npm)
19
- - [验证](#验证)
18
+ - [在 Codex 中使用](#在-codex-中使用)
19
+ - [许可证](#许可证)
20
+ - [仓库结构](#仓库结构)
20
21
  - [相关文档](#相关文档)
21
22
 
22
- ## HelloLoop 是什么
23
-
24
- `HelloLoop` 解决的是“让 Codex 在同一个仓库里持续推进任务”这个问题。
23
+ ## 核心定位
25
24
 
26
- 与一次性执行单个改动不同,它围绕一份 backlog 运行:
25
+ `HelloLoop` 适合这样的场景:
27
26
 
28
- - 先从 backlog 里选择当前最合适的任务
29
- - 根据项目状态、必读文档和约束生成执行提示
30
- - 调用 Codex 完成实现
31
- - 运行验证命令确认结果
32
- - 失败时按 Ralph Loop 思路重试或换路
33
- - 把状态、结果和运行产物写回目标仓库
27
+ - 仓库里已经有 `docs/`、方案包、任务文档或阶段说明
28
+ - 代码已经做了一部分,需要先判断“现在做到哪里了”
29
+ - 你希望自动生成足够细的后续 backlog,而不是得到一句“继续开发”
30
+ - 你希望后续每轮执行都带着状态、约束、文档和验证命令继续推进
31
+ - 你希望在开发文档约束不完整时,仍然有一层稳定、安全的执行底线
34
32
 
35
- 这意味着你可以把 `HelloLoop` 当成一个“面向仓库持续推进”的执行层,而不是单次脚本集合。
33
+ 围绕这个目标,`HelloLoop` 做四件事:
36
34
 
37
- ## 核心能力
35
+ 1. 自动发现项目仓库与开发文档
36
+ 2. 对比当前代码和文档目标,判断真实进度
37
+ 3. 生成或刷新 `.helloloop/backlog.json`
38
+ 4. 驱动 Codex 按 backlog 接续执行并留下运行记录
38
39
 
39
- - **插件安装**:把运行时 bundle 安装到 `~/.codex/plugins/helloloop`
40
- - **仓库初始化**:为目标仓库生成 `.helloloop/` 初始状态文件
41
- - **任务选择**:基于优先级、依赖和风险等级选择下一任务
42
- - **干跑预览**:先生成下一任务提示词和验证列表,再决定是否执行
43
- - **单轮执行**:执行一个任务并回写状态
44
- - **循环执行**:连续执行多个任务,直到达到上限或遇到阻塞
45
- - **验证联动**:优先读取任务自身验证命令,否则回退到仓库 `.helloagents/verify.yaml`
46
- - **运行留痕**:把每次执行的提示词、日志、验证输出保存到 `runs/`
40
+ 同时,`HelloLoop` 自带一层内建安全底线:
47
41
 
48
- ## 适用场景
42
+ - 开发文档缺少必要约束时,自动补上默认工程约束
43
+ - Windows 端优先使用 `pwsh`,也支持 `bash`(如 Git Bash)和 `powershell`,但不回退到 `cmd`
44
+ - 所有流程都要求避免静默失败、危险命令和隐私信息泄露
49
45
 
50
- - 你已经有 backlog,希望 Codex 按队列持续推进
51
- - 你希望每个任务执行前都自动带上项目状态和文档约束
52
- - 你希望执行失败后自动进入重试或换路,而不是停在一次失败
53
- - 你希望把任务状态、验证结果和运行痕迹沉淀在仓库内
54
- - 你希望通过 npm 分发这个插件,并在 GitHub Tag 发布时自动同步到 npm
46
+ ## 安装
55
47
 
56
- ## 项目结构
48
+ ### npm / npx
57
49
 
58
- ```text
59
- helloloop/
60
- ├── .codex-plugin/ # Codex 插件 manifest
61
- ├── bin/ # npm bin 入口
62
- ├── docs/ # 说明文档
63
- ├── scripts/ # CLI 安装脚本与入口
64
- ├── skills/ # 插件技能
65
- ├── src/ # 核心实现
66
- ├── templates/ # 初始化模板
67
- └── tests/ # 回归测试
50
+ ```powershell
51
+ npx helloloop install --codex-home <CODEX_HOME>
68
52
  ```
69
53
 
70
- 源码仓库包含 `docs/` 和 `tests/`,但安装到 Codex Home 时只会复制运行时必需文件。
71
-
72
- ## 安装
73
-
74
- ### 方式一:通过 npm / npx 安装
54
+ ### 源码仓库
75
55
 
76
56
  ```powershell
77
- npx helloloop install --codex-home C:\Users\hellowind\.codex
57
+ node ./scripts/helloloop.mjs install --codex-home <CODEX_HOME>
78
58
  ```
79
59
 
80
- ### 方式二:从源码仓库安装
60
+ 如果你在 Windows 上更习惯 PowerShell,也可以使用:
81
61
 
82
62
  ```powershell
83
- pwsh -NoLogo -NoProfile -File .\scripts\install-home-plugin.ps1 -CodexHome C:\Users\hellowind\.codex
63
+ pwsh -NoLogo -NoProfile -File .\scripts\install-home-plugin.ps1 -CodexHome <CODEX_HOME>
84
64
  ```
85
65
 
86
- 如果已存在同名安装目录,追加 `-Force` 或 `--force` 覆盖即可。
66
+ 安装完成后,插件会复制到 `<CODEX_HOME>/plugins/helloloop`,并更新 `<CODEX_HOME>/.agents/plugins/marketplace.json`。
87
67
 
88
- 安装完成后,运行时文件会位于:
68
+ ## 快速开始
89
69
 
90
- ```text
91
- C:\Users\hellowind\.codex\plugins\helloloop
70
+ ### 1. 安装插件
71
+
72
+ ```powershell
73
+ npx helloloop install --codex-home <CODEX_HOME>
92
74
  ```
93
75
 
94
- 同时会自动更新:
76
+ ### 2. 进入目标项目或开发文档目录
95
77
 
96
- ```text
97
- C:\Users\hellowind\.codex\.agents\plugins\marketplace.json
78
+ 最短命令就是:
79
+
80
+ ```powershell
81
+ npx helloloop
98
82
  ```
99
83
 
100
- ## 快速开始
84
+ 默认规则如下:
101
85
 
102
- ### 1. 安装插件
86
+ - 当前目录是项目仓库根目录时:自动查找开发文档并分析当前进度
87
+ - 当前目录本身是开发文档目录时:优先尝试反推目标仓库
88
+ - 分析完成后:自动生成或刷新目标仓库根目录下的 `.helloloop/`
89
+
90
+ 如果你只知道一个路径,也可以只传一个位置:
103
91
 
104
92
  ```powershell
105
- npx helloloop install --codex-home C:\Users\hellowind\.codex
93
+ npx helloloop <PATH>
106
94
  ```
107
95
 
108
- ### 2. 在目标仓库初始化状态目录
96
+ 这里的 `<PATH>` 只能传一个,可以是:
97
+
98
+ - 项目仓库路径
99
+ - 开发文档目录
100
+ - 开发文档文件
101
+
102
+ ### 3. 查看下一任务
109
103
 
110
104
  ```powershell
111
- node C:\Users\hellowind\.codex\plugins\helloloop\scripts\helloloop.mjs init --repo D:\GitHub\dev\your-repo
105
+ npx helloloop next
112
106
  ```
113
107
 
114
- ### 3. 检查运行条件
108
+ ### 4. 执行一次或连续执行
115
109
 
116
110
  ```powershell
117
- node C:\Users\hellowind\.codex\plugins\helloloop\scripts\helloloop.mjs doctor --repo D:\GitHub\dev\your-repo
111
+ npx helloloop run-once
112
+ npx helloloop run-loop --max-tasks 2
118
113
  ```
119
114
 
120
- ### 4. 查看当前状态或下一任务
115
+ 如果你已经做了全局安装,也可以把 `npx helloloop` 简写成 `helloloop`。
116
+
117
+ ## 路径规则
118
+
119
+ - 不传路径:默认分析当前目录
120
+ - 只传一个路径:自动判断它是仓库路径还是开发文档路径
121
+ - 已给开发文档但无法确定仓库:停止并提示补充 `--repo`
122
+ - 已给仓库但找不到开发文档:停止并提示补充 `--docs`
123
+ - `--repo` 和 `--docs` 是高级覆盖选项,不是主工作流
124
+
125
+ 推荐优先使用:
121
126
 
122
127
  ```powershell
123
- node C:\Users\hellowind\.codex\plugins\helloloop\scripts\helloloop.mjs status --repo D:\GitHub\dev\your-repo
124
- node C:\Users\hellowind\.codex\plugins\helloloop\scripts\helloloop.mjs next --repo D:\GitHub\dev\your-repo
128
+ npx helloloop
129
+ npx helloloop <PATH>
125
130
  ```
126
131
 
127
- ### 5. 执行一个任务或连续执行
132
+ 只有在自动发现无法收敛时,再显式补充:
128
133
 
129
134
  ```powershell
130
- node C:\Users\hellowind\.codex\plugins\helloloop\scripts\helloloop.mjs run-once --repo D:\GitHub\dev\your-repo
131
- node C:\Users\hellowind\.codex\plugins\helloloop\scripts\helloloop.mjs run-loop --repo D:\GitHub\dev\your-repo --max-tasks 2
135
+ npx helloloop --repo <REPO_ROOT> --docs <DOCS_PATH>
132
136
  ```
133
137
 
134
- ## 命令说明
138
+ ## 安全底线
139
+
140
+ - `HelloLoop` 会始终附加一组内建安全底线,覆盖 shell 安全、EHRB 命令阻断、跨平台兼容和静默失败防护。
141
+ - 如果项目开发文档或 `.helloloop/project.json` 已有明确约束,则优先使用项目约束;内建安全底线继续作为最低边界。
142
+ - 如果项目没有给出必要约束,则自动启用默认工程约束,例如代码是事实源、体积控制、验证必须执行、阻塞必须明确说明。
143
+ - Windows 环境下,`HelloLoop` 优先使用 `pwsh`,也支持 `bash`(如 Git Bash)和 `powershell`;如果这些安全 shell 都不可用,会直接停止,而不是回退到 `cmd.exe`。
144
+ - macOS / Linux 环境下,`HelloLoop` 优先使用 `bash`,没有 `bash` 时再回退到 `sh`。
145
+
146
+ ## 命令速查
135
147
 
136
148
  | 命令 | 作用 |
137
149
  | --- | --- |
138
- | `install` | 安装插件到 Codex Home,并更新 marketplace |
139
- | `init` | 初始化目标仓库 `.helloloop/` |
140
- | `doctor` | 检查 Codex CLI、模板、配置文件和插件文件是否齐备 |
141
- | `status` | 查看 backlog 汇总与下一任务 |
142
- | `next` | 干跑生成下一任务预览,不真正调用 Codex |
150
+ | `analyze` | 自动发现仓库与开发文档,分析进度并刷新 `.helloloop/` |
151
+ | `next` | 预览下一任务,不真正执行 |
143
152
  | `run-once` | 执行一个任务 |
144
153
  | `run-loop` | 连续执行多个任务 |
154
+ | `status` | 查看 backlog 汇总与当前状态 |
155
+ | `doctor` | 检查 Codex、插件 bundle 与目标仓库是否满足运行条件 |
156
+ | `init` | 手动初始化 `.helloloop/` 模板 |
157
+ | `install` | 安装插件到 Codex Home |
158
+
159
+ 除 `install` 外,其余命令都可以直接在目标仓库目录执行;如果不在目标仓库目录,也可以补一个路径:
160
+
161
+ ```powershell
162
+ npx helloloop next <PATH>
163
+ npx helloloop run-once <PATH>
164
+ npx helloloop status <PATH>
165
+ ```
145
166
 
146
167
  ### 常用选项
147
168
 
148
169
  | 选项 | 说明 |
149
170
  | --- | --- |
150
- | `--repo <dir>` | 目标仓库根目录 |
171
+ | `--repo <dir>` | 高级选项:显式指定项目仓库根目录 |
172
+ | `--docs <dir\|file>` | 高级选项:显式指定开发文档目录或文件 |
151
173
  | `--codex-home <dir>` | 指定 Codex Home |
152
- | `--config-dir <dir>` | 自定义状态目录,默认 `.helloloop` |
153
- | `--dry-run` | 只生成提示词和预览,不真正调用 Codex |
174
+ | `--config-dir <dir>` | 指定状态目录名,默认 `.helloloop` |
175
+ | `--dry-run` | 只生成提示和预览,不真正调用 Codex |
154
176
  | `--task-id <id>` | 指定执行某个任务 |
155
- | `--max-tasks <n>` | `run-loop` 最多执行多少个任务 |
156
- | `--max-attempts <n>` | 每种策略内最大重试次数 |
177
+ | `--max-tasks <n>` | `run-loop` 最多执行的任务数 |
178
+ | `--max-attempts <n>` | 每种策略的最大重试次数 |
157
179
  | `--max-strategies <n>` | 单任务最大换路次数 |
158
- | `--allow-high-risk` | 允许执行 `medium` / `high` / `critical` 风险任务 |
180
+ | `--allow-high-risk` | 允许执行 `medium` 及以上风险任务 |
159
181
  | `--required-doc <path>` | 追加全局必读文档 |
160
182
  | `--constraint <text>` | 追加全局实现约束 |
161
- | `--force` | 覆盖安装目录 |
183
+ | `--force` | 覆盖已有安装目录 |
162
184
 
163
185
  ### Skill 名称
164
186
 
165
- 安装为 Codex 插件后,可通过插件命名空间使用:
187
+ 安装为 Codex 插件后,推荐显式使用:
166
188
 
167
189
  ```text
168
190
  helloloop:helloloop
@@ -170,7 +192,7 @@ helloloop:helloloop
170
192
 
171
193
  ## 状态目录
172
194
 
173
- `HelloLoop` 在目标仓库内默认使用 `.helloloop/` 保存执行状态。
195
+ `HelloLoop` 默认在目标仓库根目录创建 `.helloloop/`,而不是写回插件目录自身。
174
196
 
175
197
  典型结构如下:
176
198
 
@@ -184,151 +206,49 @@ helloloop:helloloop
184
206
  └── runs/
185
207
  ```
186
208
 
187
- ### 各文件作用
188
-
189
- - `backlog.json`:任务列表、优先级、风险、验收条件、依赖关系
190
- - `policy.json`:循环上限、重试次数、Codex 执行参数
191
- - `project.json`:全局必读文档、实现约束和 planner 配置
192
- - `status.json`:机器可读的最近运行状态
193
- - `STATE.md`:给人看的当前状态摘要
194
- - `runs/`:每次任务执行的提示词、stdout、stderr 和验证记录
195
-
196
- 如果旧仓库仍保留 `.helloagents/helloloop/`,当前版本也会自动识别;你也可以显式传 `--config-dir .helloagents/helloloop`。
197
-
198
- ## 任务与执行模型
199
-
200
- ### backlog 任务字段
201
-
202
- `backlog.json` 中的任务通常包含这些字段:
203
-
204
- - `id`:任务唯一标识
205
- - `title`:任务标题
206
- - `status`:`pending` / `in_progress` / `done` / `failed` / `blocked`
207
- - `priority`:`P0` 到 `P3`
208
- - `risk`:`low` / `medium` / `high` / `critical`
209
- - `goal`:任务目标
210
- - `docs`:执行前必读文档
211
- - `paths`:主要涉及目录
212
- - `acceptance`:验收条件
213
- - `dependsOn`:依赖的上游任务
214
- - `verify`:任务专属验证命令(可选)
215
-
216
- ### 执行流程
217
-
218
- `HelloLoop` 的核心执行逻辑如下:
219
-
220
- 1. 从 backlog 中筛出可执行任务
221
- 2. 按优先级和依赖关系选择下一任务
222
- 3. 读取仓库状态、必读文档和实现约束
223
- 4. 生成 Codex 执行提示词
224
- 5. 调用 `codex exec`
225
- 6. 运行验证命令
226
- 7. 成功则把任务标记为完成
227
- 8. 失败则按 Ralph Loop 记录失败历史并继续重试或换路
228
-
229
- ### 风险与阻塞规则
230
-
231
- - 默认只自动执行 `low` 风险任务
232
- - `medium` 及以上风险任务需要显式传入 `--allow-high-risk`
233
- - 如果存在未收束的 `in_progress` 任务,新的自动执行会被阻塞
234
- - 如果存在 `failed` 或 `blocked` 任务,执行会停下来等待处理
235
- - 如果依赖任务未完成,相关任务不会被挑选执行
236
-
237
- ## 发布到 npm
238
-
239
- 仓库已加入自动发布工作流:
240
-
241
- ```text
242
- .github/workflows/publish.yml
243
- ```
244
-
245
- 这个工作流借鉴了 `helloagents` 的发布结构,并做了适合 `HelloLoop` 的简化与对齐:
246
-
247
- - 以 Git Tag 作为发布触发器
248
- - 发布前校验 `package.json` 版本与 Tag 是否一致
249
- - 自动运行 `npm test`
250
- - 自动运行 `npm pack --dry-run`
251
- - 自动发布到 npm
252
- - 自动创建 GitHub Release
253
-
254
- ### 推荐发布方式
209
+ 各文件职责如下:
255
210
 
256
- #### 正式版
211
+ - `backlog.json`:接续开发任务列表
212
+ - `policy.json`:循环上限、重试策略和 Codex 参数
213
+ - `project.json`:开发文档入口和全局约束
214
+ - `status.json`:最近一次运行的机器可读状态
215
+ - `STATE.md`:面向人的当前进展摘要
216
+ - `runs/`:提示词、stdout、stderr、验证输出等运行留痕
257
217
 
258
- 1. 修改 `package.json` 中的 `version`
259
- 2. 提交并推送代码
260
- 3. 创建同版本 Tag
218
+ ## Codex 中使用
261
219
 
262
- 示例:
220
+ 可以。
263
221
 
264
- ```powershell
265
- npm version patch --no-git-tag-version
266
- git add package.json
267
- git commit -m "chore: release v0.1.1"
268
- git push origin main
269
- git tag v0.1.1
270
- git push origin v0.1.1
271
- ```
222
+ - 在当前 Codex 会话里,直接运行 `npx helloloop ...` 即可,不需要重开终端
223
+ - 如果你使用的是全局安装后的 `helloloop` 短命令,是否需要新终端取决于你的 shell 是否已经刷新 PATH
224
+ - `HelloLoop` 负责组织分析、backlog 和执行流程,真正的代码分析与开发仍然通过本机 `codex` CLI 完成
272
225
 
273
- 推送 `v0.1.1` 后,Action 会把 `0.1.1` 发布到 npm 的 `latest` 通道。
226
+ ## 许可证
274
227
 
275
- #### Beta
228
+ `HelloLoop` 使用 `Apache-2.0` 许可证,许可证文件位于仓库根目录 `LICENSE`。
276
229
 
277
- Beta Tag 采用:
230
+ ## 仓库结构
278
231
 
279
232
  ```text
280
- v0.2.0-beta.1
281
- ```
282
-
283
- 这类 Tag 会发布到 npm 的 `beta` 通道。工作流会要求:
284
-
285
- - `package.json` 中的基础版本为 `0.2.0`
286
- - 实际发布版本为 `0.2.0-beta.1`
287
-
288
- ### npm Trusted Publishing 配置
289
-
290
- 为了让 GitHub Actions 无需 `NPM_TOKEN` 直接发布到 npm,建议使用 npm Trusted Publishing。
291
-
292
- 在 npm 包设置中把以下信息绑定为 Trusted Publisher:
293
-
294
- - GitHub 仓库:`hellowind777/helloloop`
295
- - Workflow 文件:`publish.yml`
296
- - 触发来源:GitHub-hosted runner
297
-
298
- 发布工作流已经按 Trusted Publishing 方式准备好:
299
-
300
- - `id-token: write`
301
- - Node 24
302
- - 升级到最新 npm CLI
303
- - 直接执行 `npm publish`
304
-
305
- ### 工作流触发规则
306
-
307
- - `push tags: v*`:标准自动发布入口
308
- - `workflow_dispatch`:手动输入 Tag 重新发布某个版本
309
-
310
- ## 验证
311
-
312
- ### 本地回归
313
-
314
- ```powershell
315
- npm test
316
- ```
317
-
318
- ### 打包预检
319
-
320
- ```powershell
321
- npm pack --dry-run
233
+ helloloop/
234
+ ├── .codex-plugin/ # Codex 插件 manifest 与展示元数据
235
+ ├── bin/ # npm 命令入口
236
+ ├── docs/ # 补充说明文档
237
+ ├── scripts/ # 安装脚本与 CLI 入口
238
+ ├── skills/ # 插件技能
239
+ ├── src/ # 核心实现
240
+ ├── templates/ # 初始化时写入 .helloloop/ 的模板
241
+ └── tests/ # 回归测试
322
242
  ```
323
243
 
324
- ### 安装烟测
244
+ 其中:
325
245
 
326
- ```powershell
327
- node .\bin\helloloop.mjs install --codex-home C:\Users\hellowind\AppData\Local\Temp\helloloop-smoke --force
328
- ```
246
+ - `src/` 放 `HelloLoop` 的实际实现逻辑,例如路径发现、分析提示词生成、运行调度和安装流程
247
+ - `tests/` 放回归测试,确保 CLI、安装链路、bundle 结构和分析流程没有被改坏
248
+ - `templates/` 是初始化目标仓库时写入 `.helloloop/` 的模板来源
329
249
 
330
250
  ## 相关文档
331
251
 
332
- - 安装说明:`docs/install.md`
333
- - 插件主说明:`docs/README.md`
334
- - 官方标准映射:`docs/plugin-standard.md`
252
+ - `docs/install.md`:安装与日常使用方式
253
+ - `docs/README.md`:插件 bundle 结构说明
254
+ - `docs/plugin-standard.md`:官方插件结构与当前实现映射
package/package.json CHANGED
@@ -1,24 +1,24 @@
1
1
  {
2
2
  "name": "helloloop",
3
- "version": "0.1.0",
4
- "description": "Standalone Codex plugin bundle for backlog-driven repository execution with Ralph Loop guards",
3
+ "version": "0.1.2",
4
+ "description": "面向 Codex 的独立插件 bundle,用于基于 backlog 持续推进仓库开发并执行验证循环",
5
+ "author": "HelloWind",
6
+ "license": "Apache-2.0",
7
+ "homepage": "https://github.com/hellowind777/helloloop",
5
8
  "type": "module",
6
9
  "repository": {
7
10
  "type": "git",
8
- "url": "https://github.com/hellowind777/helloloop.git"
9
- },
10
- "homepage": "https://github.com/hellowind777/helloloop#readme",
11
- "bugs": {
12
- "url": "https://github.com/hellowind777/helloloop/issues"
11
+ "url": "git+https://github.com/hellowind777/helloloop.git"
13
12
  },
14
13
  "publishConfig": {
15
14
  "access": "public"
16
15
  },
17
16
  "bin": {
18
- "helloloop": "./bin/helloloop.mjs"
17
+ "helloloop": "bin/helloloop.js"
19
18
  },
20
19
  "files": [
21
20
  ".codex-plugin",
21
+ "LICENSE",
22
22
  "README.md",
23
23
  "bin",
24
24
  "package.json",
@@ -28,10 +28,9 @@
28
28
  "templates"
29
29
  ],
30
30
  "scripts": {
31
- "test": "node --test tests/cli_surface.test.mjs tests/install_script.test.mjs tests/ralph_loop.test.mjs tests/plugin_bundle.test.mjs"
31
+ "test": "node --test tests/analyze_cli.test.mjs tests/cli_surface.test.mjs tests/install_script.test.mjs tests/process_shell.test.mjs tests/prompt_guardrails.test.mjs tests/ralph_loop.test.mjs tests/plugin_bundle.test.mjs"
32
32
  },
33
33
  "engines": {
34
34
  "node": ">=20"
35
35
  }
36
36
  }
37
-
@@ -1,53 +1,55 @@
1
1
  ---
2
2
  name: helloloop
3
- description: Use when the user wants Codex to keep shipping repo work across turns, bootstrap HelloLoop, or inspect backlog-driven execution state through the pure official plugin bundle.
3
+ description: 当用户希望 Codex 先分析仓库当前进度,再生成 backlog 并按队列持续接续开发时使用。
4
4
  ---
5
5
 
6
6
  # HelloLoop
7
7
 
8
- Use this plugin when the task is continuous repository execution rather than a single chat-turn change.
8
+ 当任务目标不是单轮对话里改一点代码,而是要基于开发文档持续推进整个仓库时,使用这个插件。
9
9
 
10
- ## Official Plugin Boundary
10
+ ## 插件边界
11
11
 
12
- - This bundle root is the official plugin surface for HelloLoop.
13
- - It ships standard Codex plugin metadata through `.codex-plugin/plugin.json` and a plugin skill through `skills/`.
14
- - Current Codex runtime does not auto-load Hook handlers from plugins.
15
- - This plugin therefore does not support `~helloloop` or automatic Stop-hook continuation.
12
+ - 当前 bundle 根目录就是 `HelloLoop` 的官方插件目录。
13
+ - 插件元数据位于 `.codex-plugin/plugin.json`,执行逻辑位于 `skills/`、`bin/`、`scripts/`、`src/`、`templates/`。
14
+ - 运行状态统一写入目标仓库根目录下的 `.helloloop/`。
16
15
 
17
- ## Setup
16
+ ## 使用前准备
18
17
 
19
- 1. Install with `npx helloloop install --codex-home <CODEX_HOME>` or use `scripts/install-home-plugin.ps1`.
20
- 2. From the target repository, run `node <helloloop-plugin-root>/scripts/helloloop.mjs doctor --repo <repo-root>`.
21
- 3. From the target repository, run `node <helloloop-plugin-root>/scripts/helloloop.mjs init --repo <repo-root>`.
18
+ 1. 先通过 `npx helloloop install --codex-home <CODEX_HOME>` `scripts/install-home-plugin.ps1` 安装插件。
19
+ 2. 打开目标项目仓库目录,或者打开开发文档所在目录。
20
+ 3. 运行 `npx helloloop` `npx helloloop <path>`。
21
+ 4. 如果无法自动判断仓库路径或开发文档路径,就停下来提示用户补充;`--repo` 和 `--docs` 只作为显式覆盖选项使用。
22
22
 
23
- ## Operating Model
23
+ ## 工作模式
24
24
 
25
- - `.helloloop/` is the CLI and backlog state directory.
26
- - The installed plugin bundle keeps runtime files such as `src/`, `templates/`, `bin/`, `scripts/`, and `skills/`.
27
- - Source-only materials such as `docs/` and `tests/` stay in the development repository.
25
+ - 代码是事实源,开发文档是目标源。
26
+ - `HelloLoop` 会先分析当前真实进度,再生成或刷新 `.helloloop/backlog.json`。
27
+ - 后续开发通过 `next`、`run-once`、`run-loop` backlog 接续推进。
28
+ - 真正的代码分析与实现仍由本机 `codex` CLI 完成。
28
29
 
29
- ## Invocation
30
+ ## 核心命令
30
31
 
31
- - In official Codex plugin mode, plugin skills are namespaced with `plugin_name:`.
32
- - For this plugin, the unambiguous skill name is `helloloop:helloloop`.
33
- - Explicitly naming the `helloloop` plugin should also bias Codex toward this skill.
34
- - Do not promise bare `$helloloop` is the official invocation form.
32
+ - `npx helloloop`
33
+ - `npx helloloop <path>`
34
+ - `npx helloloop next`
35
+ - `npx helloloop run-once`
36
+ - `npx helloloop run-loop --max-tasks <n>`
35
37
 
36
- ## Primary Commands
38
+ ## 高级命令
37
39
 
38
- - `node <helloloop-plugin-root>/scripts/helloloop.mjs status --repo <repo-root>`
39
- - `node <helloloop-plugin-root>/scripts/helloloop.mjs next --repo <repo-root>`
40
- - `node <helloloop-plugin-root>/scripts/helloloop.mjs run-once --repo <repo-root>`
41
- - `node <helloloop-plugin-root>/scripts/helloloop.mjs run-loop --repo <repo-root>`
40
+ - `npx helloloop status`
41
+ - `npx helloloop doctor`
42
+ - `npx helloloop init`
43
+ - `npx helloloop --repo <repo-root> --docs <docs-path>`
42
44
 
43
- ## Reporting Rules
45
+ ## 调用方式
44
46
 
45
- - State explicitly that the plugin runs in pure official plugin mode.
46
- - Call out any request that depends on Hook-only behavior such as `UserPromptSubmit` or `Stop`, because those are intentionally unsupported here.
47
- - Keep Ralph Loop guardrails and repo verification intact.
47
+ - 在官方 Codex 插件模式下,明确的 skill 名称是 `helloloop:helloloop`。
48
+ - 在对话里显式提到 `helloloop` 插件,也会帮助 Codex 更准确地命中这个 skill。
48
49
 
49
- ## Docs
50
+ ## 参考文档
50
51
 
51
- - Source repo main guide: `docs/README.md`
52
- - Source repo installation note: `docs/install.md`
53
- - Source repo official standard and runtime boundary: `docs/plugin-standard.md`
52
+ - 主说明:`README.md`
53
+ - 安装说明:`docs/install.md`
54
+ - Bundle 说明:`docs/README.md`
55
+ - 插件标准映射:`docs/plugin-standard.md`