@michelj/context-guard 0.4.3 → 0.4.4

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.
Files changed (74) hide show
  1. package/README.md +103 -208
  2. package/README.zh-CN.md +103 -208
  3. package/SKILL.md +27 -678
  4. package/agents/openai.yaml +2 -2
  5. package/bin/context-guard-skill.js +159 -56
  6. package/bin/postinstall.js +1 -1
  7. package/hooks.json +11 -11
  8. package/package.json +9 -6
  9. package/prototype/workbench.html +4933 -0
  10. package/references/bug-record-template.md +37 -0
  11. package/references/context-template.md +14 -336
  12. package/scripts/context_guard.py +577 -7655
  13. package/scripts/context_guard_hook.py +179 -731
  14. package/scripts/map_owns.py +769 -0
  15. package/references/feature-chain-methodology.md +0 -228
  16. package/references/register-template.md +0 -85
  17. package/references/task-case-template.md +0 -63
  18. package/tests/BC-20260618-063.sh +0 -116
  19. package/tests/BC-20260618-065.sh +0 -66
  20. package/tests/BC-20260626-080.sh +0 -48
  21. package/tests/BC-20260626-081.sh +0 -40
  22. package/tests/BC-20260626-082.sh +0 -32
  23. package/tests/BC-20260626-083.sh +0 -66
  24. package/tests/BC-20260627-084.sh +0 -74
  25. package/tests/BC-20260630-086.sh +0 -50
  26. package/tests/BC-20260630-087.sh +0 -103
  27. package/tests/BC-20260630-088.sh +0 -32
  28. package/tests/BC-20260630-089.sh +0 -63
  29. package/tests/BC-20260701-090.sh +0 -84
  30. package/tests/BC-20260702-096.sh +0 -48
  31. package/tests/BC-20260706-098.sh +0 -66
  32. package/tests/BC-20260707-099.sh +0 -47
  33. package/tests/BC-20260707-100.sh +0 -46
  34. package/tests/BC-20260707-101.sh +0 -47
  35. package/tests/BC-20260707-102.sh +0 -68
  36. package/tests/BC-20260707-103.sh +0 -59
  37. package/tests/BC-20260707-104.sh +0 -103
  38. package/tests/BC-20260707-105.sh +0 -109
  39. package/tests/BC-20260707-106.sh +0 -80
  40. package/tests/BC-20260707-107.sh +0 -74
  41. package/tests/BC-20260707-108.sh +0 -48
  42. package/tests/BC-20260707-109.sh +0 -56
  43. package/tests/BC-20260707-110.sh +0 -71
  44. package/tests/BC-20260707-111.sh +0 -70
  45. package/tests/BC-20260707-112.sh +0 -45
  46. package/tests/BC-20260707-113.sh +0 -73
  47. package/tests/BC-20260707-115.sh +0 -77
  48. package/tests/BC-20260707-116.sh +0 -77
  49. package/tests/BC-20260707-118.sh +0 -115
  50. package/tests/BC-20260707-119.sh +0 -47
  51. package/tests/BC-20260707-120.sh +0 -60
  52. package/tests/BC-20260707-121.sh +0 -66
  53. package/tests/BC-20260707-122.sh +0 -48
  54. package/tests/BC-20260707-123.sh +0 -43
  55. package/tests/BC-20260707-124.sh +0 -56
  56. package/tests/BC-20260707-125.sh +0 -64
  57. package/tests/BC-20260707-126.sh +0 -80
  58. package/tests/BC-20260707-127.sh +0 -88
  59. package/tests/BC-20260707-129.sh +0 -59
  60. package/tests/BC-20260707-130.sh +0 -69
  61. package/tests/BC-20260707-131.sh +0 -140
  62. package/tests/BC-20260707-132.sh +0 -150
  63. package/tests/BC-20260707-133.sh +0 -70
  64. package/tests/BC-20260708-136.sh +0 -210
  65. package/tests/BC-20260708-137.sh +0 -106
  66. package/tests/BC-20260708-138.sh +0 -168
  67. package/tests/BC-20260708-139.sh +0 -79
  68. package/tests/BC-20260709-002.sh +0 -63
  69. package/tests/BC-20260709-003.sh +0 -239
  70. package/tests/BC-20260709-006.sh +0 -76
  71. package/tests/BC-20260709-008.sh +0 -168
  72. package/tests/BC-20260710-001.sh +0 -61
  73. package/tests/BC-20260710-002.sh +0 -111
  74. package/tests/npm-install-smoke.sh +0 -53
package/README.zh-CN.md CHANGED
@@ -2,301 +2,196 @@
2
2
 
3
3
  语言:[English](README.md) | **中文**
4
4
 
5
- Context Guard 是一个给 Codex 用的项目记忆 skill。它把任务主线、支线、bad case 和验证链路保存在项目自己的 `.codex/context/` 里,让 Codex 在不同 session 之间也能知道“现在做到哪里、踩过哪些坑、下次怎么检查”。
5
+ Context Guard 是一个面向 Codex、Cursor 和 Claude 的项目记忆 skill。它把任务主线、支线、bad case 和验证链路保存在项目自己的 `.codex/context/` 里,让 Agent 在不同 session 之间也能知道“现在做到哪里、踩过哪些坑、下次怎么检查”。
6
6
 
7
7
  ## 能做什么
8
8
 
9
- - **维护项目 context**:自动创建并更新 `.codex/context/`。
10
- - **保留用户原话**:把短用户指令、约束、偏好、路线提示和 bad case 反馈写入 `user-messages.md`。
11
- - **敏感信息只留本地**:公开 context 里只保留脱敏指针,真正需要复用的凭据只放在 `.codex/context/private/`。
12
- - **记录路线图**:维护主线、支线、分叉节点和当前进度。
13
- - **记录 bad case**:保存问题现象、触发条件、原因、修复方式和防复发检查。
14
- - **生成 Roadmap HTML**:支持卡片和高密度紧凑总览,点击节点看详情。
15
- - **区分人类视图和 agent 视图**:HTML 给人看,Markdown/JSON 给 Codex 读取。
16
- - **支持多语言记录**:按项目偏好用中文或英文写 context。
17
- - **处理任务切换**:遇到新方向、支线任务或中断任务时,帮助 Codex park/resume。
18
- - **绑定 Subagent 项目**:把 agent ID 绑定到实际本地项目根目录,避免 context 写回父工作区或 SSH 服务器。
19
- - **沉淀真实修复**:优先保存 Subagent 实际发现的问题、根因、修复和验证;重复完成事件不会重复建节点。
20
- - **测试由人类设计**:Codex 只复用已确认检查,或提出草案等待用户确认,不静默创建长期测试。
21
- - **用功能链覆盖 bad case**:优先把多个 bad case 挂到同一条真实功能/工作流测试链上,而不是为每个 bad case 单独造测试。
22
- - **默认运行已确认测试**:用户创建或确认的测试,默认每次开发结束都要运行;只有用户说明不必每次运行时才降频。
23
- - **提供测试中台入口**:`dev-complete` 会统一运行已确认的 always-run 测试,成功清理临时产物,失败保留证据。
9
+ - **四块**:会话、坏例、任务、地图,都在当前项目的 `.codex/context/`
10
+ - **首次建图**:人和 Agent 先商量第一层怎么切(可以先给几种拆法或较多候选),定了再拆第二层、第三层。卡名要一眼能看懂。之后会话打开这张图
11
+ - **人看工作台**:`prototype/workbench.html`。Agent 读小索引,不读整张地图
12
+ - **用户原话**:写进 `user-messages.md`;密钥只在 `private/`
13
+ - **记录语言**:按文件夹选中文或英文
14
+ - **生命周期**:首次 Session 自动建档、记录用户消息,并在识别到 bad case 后通过统一命令落盘
24
15
 
25
- ## 安装
26
-
27
- 使用 npx 安装:
16
+ 第一版**没有** Roadmap HTML、测试中台、功能链。
28
17
 
29
- ```bash
30
- npx @michelj/context-guard install
31
- ```
18
+ ## 工作台
32
19
 
33
- 也可以全局安装,让 npm 包自动把 skill 复制到 Codex 的 skill 目录:
20
+ 人在工作台里看图、点头。安装 Hook 后,新 Session 会自动启动本机单实例服务并打开页面;Agent 读 `.codex/context/` 里的小索引,不操作画布。
34
21
 
35
- ```bash
36
- npm install -g @michelj/context-guard --registry=https://registry.npmjs.org
37
- ```
22
+ **当前工作台:** [prototype/workbench.html](https://github.com/Michel-Johnson/Context-Guard-Skill/blob/main/prototype/workbench.html) · [浏览器打开](https://raw.githack.com/Michel-Johnson/Context-Guard-Skill/main/prototype/workbench.html)
38
23
 
39
- 只有当你明确希望安装 Codex 生命周期 hook 提醒时,才加 `--with-hooks`:
24
+ 第一次打开可能会看到 GitHack 的提示页(它只是中转,没审过页面内容)。点 **Open the page** 就进工作台。
40
25
 
41
- ```bash
42
- npx @michelj/context-guard install --with-hooks
43
- ```
26
+ 要自己定第一层:顶栏点仓库名,切到 **OpenClaw**(首次使用),点「看几种第一层切法」,选一种才上画布。仍是演示卡名,但切法是你定的。
44
27
 
45
- 该命令也会在 `~/.codex/config.toml` 中启用当前的 `[features] hooks = true`,并把已弃用的 `codex_hooks` 别名安全迁移,同时保留其他配置。
28
+ 顶栏 **中 / EN** 切界面语言。地图上的标题、用途、记忆仍按写入时的语言,不整页翻译。
46
29
 
47
- npm 包正式发布前,也可以直接从 GitHub 使用:
30
+ 也可以手动启动或停止工作台:
48
31
 
49
32
  ```bash
50
- npx github:Michel-Johnson/Context-Guard-Skill install
33
+ context-guard workbench --root /path/to/project
34
+ context-guard workbench --root /path/to/project --stop
51
35
  ```
52
36
 
53
- 也支持手动安装:
37
+ ### 总览
54
38
 
55
- ```bash
56
- git clone git@github.com:Michel-Johnson/Context-Guard-Skill.git
57
- cd Context-Guard-Skill
58
- mkdir -p ~/.codex/skills/context-guard
59
- rsync -a --delete \
60
- SKILL.md README.md README.zh-CN.md agents references scripts tests \
61
- ~/.codex/skills/context-guard/
62
- ```
63
-
64
- 安装后 Codex 应该能发现:
39
+ 第一页 4–8 张主干模块卡。点一张进入。未修 Bug 在右侧列表。
65
40
 
66
- ```text
67
- ~/.codex/skills/context-guard/SKILL.md
68
- ```
41
+ ![工作台总览](docs/shots/workbench/overview.png)
69
42
 
70
- ## Context 保存在哪里
43
+ ### 进入模块
71
44
 
72
- Context 必须保存在当前打开的本地项目里:
45
+ 开工单元挂在模块下面,只画从属实线。
73
46
 
74
- ```text
75
- <Codex 打开的项目根目录>/.codex/context/
76
- ```
47
+ ![模块内部](docs/shots/workbench/module.png)
77
48
 
78
- 不要把 context 写到:
49
+ ### 模块关系
79
50
 
80
- - skill 安装目录
81
- - chat/thread 名称对应的目录
82
- - 临时目录
83
- - SSH 远程服务器路径
51
+ 点「关系」再点一张卡,只高亮它的生产/消费,其它变暗,不会进入该模块。
84
52
 
85
- 对后续工作有价值的短用户消息会保存在:
53
+ ![模块关系](docs/shots/workbench/relations.png)
86
54
 
87
- ```text
88
- <Codex 打开的项目根目录>/.codex/context/user-messages.md
89
- ```
55
+ ### 会话流动
90
56
 
91
- 如果用户提供了后续需要复用的凭据,Context Guard 只会在公开 context 中记录脱敏指针。原始凭据必须只保存在本地私有目录:
57
+ 点一条挂了会话的 Bug。从根到该节点的链路亮起来,当前会话沿线流动。
92
58
 
93
- ```text
94
- <Codex 打开的项目根目录>/.codex/context/private/
95
- ```
59
+ ![会话流动](docs/shots/workbench/session-flow.png)
96
60
 
97
- 如果手动运行脚本,建议显式传入项目根目录:
61
+ ### 授权模式
98
62
 
99
- ```bash
100
- python3 ~/.codex/skills/context-guard/scripts/context_guard.py show-roadmap --root /path/to/project
101
- ```
63
+ 「授权模式」标出这次会话 Agent 能读哪一段。灰色卡未授权。
102
64
 
103
- 注册一个用户已确认的自动化测试:
65
+ ![授权模式](docs/shots/workbench/auth-mode.png)
104
66
 
105
- ```bash
106
- python3 ~/.codex/skills/context-guard/scripts/context_guard.py test-hub-add \
107
- --root /path/to/project \
108
- --title "Markdown 预览渲染" \
109
- --command-text "npm test"
110
- ```
67
+ ## 安装
111
68
 
112
- 创建一条待确认的功能链测试草案:
69
+ 使用 npx 安装。安装器会检测 Codex、Cursor 和 Claude,把 Skill 与生命周期 Hook 一起安装并安全合并现有配置:
113
70
 
114
71
  ```bash
115
- python3 ~/.codex/skills/context-guard/scripts/context_guard.py feature-chain-add \
116
- --root /path/to/project \
117
- --title "GPU 监控按钮" \
118
- --entry "点击 GPU 监控按钮" \
119
- --exit-check "打开包含有效 grafana_url 的监控页"
72
+ npx @michelj/context-guard install
120
73
  ```
121
74
 
122
- 把 bad case 挂到功能链的具体环节:
75
+ 也可以全局安装,让 npm 包自动安装到检测到的客户端:
123
76
 
124
77
  ```bash
125
- python3 ~/.codex/skills/context-guard/scripts/context_guard.py feature-chain-attach-bc \
126
- --root /path/to/project \
127
- --chain-id FC-... \
128
- --node-title "后端返回监控 URL" \
129
- --bad-case BC-... \
130
- --check "grafana_url 不为空,前端不会卡住"
78
+ npm install -g @michelj/context-guard --registry=https://registry.npmjs.org
131
79
  ```
132
80
 
133
- 用户确认流程后,再批准同一条功能链:
81
+ 强制安装到三类客户端:
134
82
 
135
83
  ```bash
136
- python3 ~/.codex/skills/context-guard/scripts/context_guard.py feature-chain-approve \
137
- --root /path/to/project \
138
- --chain-id FC-... \
139
- --command-text "npm test -- gpu-monitor"
84
+ npx @michelj/context-guard install --platform all
140
85
  ```
141
86
 
142
- 功能链命令可以输出 checkpoint 标记,让测试中台知道具体哪一步失败:
143
-
144
- ```text
145
- CG_CHECKPOINT:后端返回监控 URL:PASS
146
- CG_CHECKPOINT:前端打开监控页:FAIL:缺少 grafana_url
147
- ```
148
-
149
- 标记里的 checkpoint 名称必须匹配已登记的功能链节点;未知名称会被当成测试链路错误。已批准的功能链默认必须报告每个已登记 checkpoint,除非该 checkpoint 被明确标为 optional。
150
-
151
- 如果某个 checkpoint 不适合每次都跑,显式标为 optional:
87
+ 默认会安装 Hook;如果只想复制 Skill,可以显式关闭:
152
88
 
153
89
  ```bash
154
- python3 ~/.codex/skills/context-guard/scripts/context_guard.py feature-chain-set-checkpoint \
155
- --root /path/to/project \
156
- --chain-id FC-... \
157
- --node-title "前端打开监控页" \
158
- --required optional \
159
- --reason "只在浏览器集成环境运行"
90
+ npx @michelj/context-guard install --no-hooks
160
91
  ```
161
92
 
162
- 查看每条功能链哪些 checkpoint 必跑、哪些可选:
163
-
164
- ```bash
165
- python3 ~/.codex/skills/context-guard/scripts/context_guard.py feature-chain-list \
166
- --root /path/to/project \
167
- --verbose
168
- ```
93
+ 默认目录分别是 `~/.codex/skills/context-guard`、`~/.cursor/skills/context-guard` 和 `~/.claude/skills/context-guard`。安装器会备份并合并现有 Hook/Settings;Codex 同时启用 `[features] hooks = true`,并迁移旧的 `codex_hooks` 别名。
169
94
 
170
- 如果用户说这条链不需要每次都跑,修改运行频率:
95
+ npm 包正式发布前,也可以直接从 GitHub 使用:
171
96
 
172
97
  ```bash
173
- python3 ~/.codex/skills/context-guard/scripts/context_guard.py feature-chain-set-policy \
174
- --root /path/to/project \
175
- --chain-id FC-... \
176
- --run-policy relevant-only \
177
- --reason "只在修改 GPU 监控流程时运行"
98
+ npx github:Michel-Johnson/Context-Guard-Skill install
178
99
  ```
179
100
 
180
- 开发完成后交给测试中台:
101
+ 也支持手动安装:
181
102
 
182
103
  ```bash
183
- python3 ~/.codex/skills/context-guard/scripts/context_guard.py dev-complete --root /path/to/project --jobs 2
104
+ git clone git@github.com:Michel-Johnson/Context-Guard-Skill.git
105
+ cd Context-Guard-Skill
106
+ mkdir -p ~/.codex/skills/context-guard
107
+ rsync -a --delete \
108
+ SKILL.md README.md README.zh-CN.md agents prototype references scripts \
109
+ ~/.codex/skills/context-guard/
184
110
  ```
185
111
 
186
- 查看只读测试中台页面:
112
+ 安装后相应客户端应该能发现:
187
113
 
188
- ```bash
189
- python3 ~/.codex/skills/context-guard/scripts/context_guard.py show-test-hub --root /path/to/project --open
114
+ ```text
115
+ ~/.codex/skills/context-guard/SKILL.md
116
+ ~/.cursor/skills/context-guard/SKILL.md
117
+ ~/.claude/skills/context-guard/SKILL.md
190
118
  ```
191
119
 
192
- 简单管理测试:
120
+ ## 发布
193
121
 
194
- ```bash
195
- python3 ~/.codex/skills/context-guard/scripts/context_guard.py test-hub-list --root /path/to/project
196
- python3 ~/.codex/skills/context-guard/scripts/context_guard.py test-hub-disable --root /path/to/project --test-id TC-... --reason "暂时不需要每次运行"
197
- python3 ~/.codex/skills/context-guard/scripts/context_guard.py test-hub-enable --root /path/to/project --test-id TC-...
198
- python3 ~/.codex/skills/context-guard/scripts/context_guard.py test-hub-set-policy --root /path/to/project --test-id TC-... --run-policy relevant-only --reason "只和编辑器改动相关"
199
- python3 ~/.codex/skills/context-guard/scripts/context_guard.py test-hub-remove --root /path/to/project --test-id TC-...
200
- ```
122
+ 这个 npm 包不使用 GitHub Release 作为交付入口。用户从 npm 安装 skill,因此正式发布由版本标签驱动:
201
123
 
202
- ## 常用方式
124
+ 1. 把 `package.json` 更新到下一个稳定版本,并将该提交合入 `main`。
125
+ 2. 在该提交上创建完全匹配的 `vX.Y.Z` 标签。
126
+ 3. 推送标签;`.github/workflows/npm-publish.yml` 会校验、打包、安装冒烟,并把同一份 tarball 发布到 npm。
203
127
 
204
- 让 Codex 启用并维护 context:
128
+ 该 workflow 没有手动触发入口。推送匹配的版本标签后,GitHub 会自动执行完整发布流水线;验证通过的 tarball 会作为 GitHub Actions Artifact 保留 14 天。它复用 `Michel-Johnson/Context-Guard-Skill` 已有的 npm Trusted Publisher,workflow 文件名保持 `npm-publish.yml`,允许 `npm publish` 操作;Actions 发布不需要本地登录 npm。完整步骤见 [npm 发布与恢复手册](https://github.com/Michel-Johnson/Context-Guard-Skill/blob/main/docs/npm-release-runbook.md)。
205
129
 
206
- ```text
207
- Use $context-guard to maintain this task context.
208
- ```
130
+ ## Context 保存在哪里
209
131
 
210
- 展示当前路线图:
132
+ Context 必须保存在当前打开的本地项目里(不随客户端改变):
211
133
 
212
134
  ```text
213
- Use $context-guard to show the roadmap.
135
+ <当前项目根目录>/.codex/context/
214
136
  ```
215
137
 
216
- 初始化项目 context:
138
+ 不要把 context 写到:
217
139
 
218
- ```bash
219
- python3 ~/.codex/skills/context-guard/scripts/context_guard.py init --root /path/to/project
220
- ```
140
+ - skill 安装目录
141
+ - chat/thread 名称对应的目录
142
+ - 临时目录
143
+ - SSH 远程服务器路径
221
144
 
222
- 设置记录语言:
145
+ 对后续工作有价值的短用户消息会保存在:
223
146
 
224
- ```bash
225
- python3 ~/.codex/skills/context-guard/scripts/context_guard.py set-language --root /path/to/project --language 中文
147
+ ```text
148
+ <当前项目根目录>/.codex/context/user-messages.md
226
149
  ```
227
150
 
228
- 生成路线图:
151
+ 如果用户提供了后续需要复用的凭据,Context Guard 只会在公开 context 中记录脱敏指针。原始凭据必须只保存在本地私有目录:
229
152
 
230
- ```bash
231
- python3 ~/.codex/skills/context-guard/scripts/context_guard.py show-roadmap --root /path/to/project
153
+ ```text
154
+ <当前项目根目录>/.codex/context/private/
232
155
  ```
233
156
 
234
- 也可以用 npm CLI 作为轻量封装:
157
+ 如果手动运行脚本:
235
158
 
236
159
  ```bash
237
- npx @michelj/context-guard show-roadmap --root /path/to/project
160
+ python3 scripts/context_guard.py init --root /path/to/project
161
+ python3 scripts/context_guard.py set-language --root /path/to/project --language 中文
238
162
  ```
239
163
 
240
- 创建支线任务:
164
+ 第一次 Session 若 `record_language` 仍为 `unset`,Hook 会要求 Agent 先询问“中文还是 English”,保存后后续 Session 不再重复询问。`workbench` 命令会启动本机服务并返回浏览器地址。
241
165
 
242
- ```bash
243
- python3 ~/.codex/skills/context-guard/scripts/context_guard.py create-branch-task \
244
- --root /path/to/project \
245
- --title "支线任务标题" \
246
- --branch "支线名称" \
247
- --parent-node NODE-YYYYMMDD-001
248
- ```
166
+ ## 常用方式
249
167
 
250
- 记录路线图节点:
168
+ ```text
169
+ Use $context-guard. 四块:会话、坏例、任务、地图。
170
+ ```
251
171
 
252
172
  ```bash
253
- python3 ~/.codex/skills/context-guard/scripts/context_guard.py checkpoint-roadmap-node \
254
- --root /path/to/project \
255
- --title "给 Codex 看的源标题" \
256
- --display-title "给用户看的短标题" \
257
- --user-request "用户实际提出的问题" \
258
- --progress-summary "当前进展" \
259
- --method-summary "采取的方法" \
260
- --branch Main \
261
- --level major \
262
- --outcome "结果"
173
+ python3 scripts/context_guard.py init --root /path/to/project
174
+ python3 scripts/context_guard.py set-language --root /path/to/project --language 中文
175
+ python3 scripts/context_guard.py workbench --root /path/to/project
263
176
  ```
264
177
 
178
+ 运行 `context-guard workbench --root /path/to/project` 看图。
179
+
265
180
  ## 主要文件
266
181
 
267
182
  ```text
268
183
  .codex/context/
269
- |-- index.md # 快速索引和当前任务
270
- |-- roadmap.md # agent 可读路线图
271
- |-- bad-cases.md # bad case 登记表
272
- |-- preferences.json # 语言和项目偏好
273
- |-- roadmap/
274
- | |-- roadmap.html # 用户查看的路线图
275
- | |-- roadmap.md # agent 快速读取版
276
- | `-- roadmap.json # 结构化索引
277
- |-- tasks/ # 任务级 context
278
- |-- task-cases/ # 任务导向测试 case
279
- |-- test-hub/ # 测试注册表、最近结果和失败证据
280
- `-- bad-case-tests/ # 可复用 bad case 检查脚本
281
- ```
282
-
283
- ## 使用原则
284
-
285
- - 路线图只记录关键进展,不记录每个小动作。
286
- - 用户看的标题要像人话,不要像实现日志。
287
- - bad case 要能帮助未来避免复发。
288
- - 测试设计权属于人类;Codex 可以执行已确认检查,或提出待确认草案。
289
- - 当任务容易复发或适合沉淀为流程检查时,Codex 应温和提醒用户是否创建测试任务,但不能擅自创建长期测试。
290
- - 测试的长期单位优先是功能链:一个明确入口、一段真实流程、多个检查点、覆盖多个 bad case。
291
- - 新 bad case 优先挂到已有功能链节点;没有匹配功能链时,再提出新的功能链草案。
292
- - 功能链默认是 `proposed` 草案;用户确认后,用 `feature-chain-approve` 在检查覆盖完整时再批准。
293
- - 用户确认的测试默认是 `every-dev-completion`;只有用户要求时,Codex 才能改成其他运行频率。
294
- - 已确认的自动化测试应进入 `.codex/context/test-hub/registry.json` 或 `.codex/context/test-hub/feature-chains.json`,由 `dev-complete` 统一调度。
295
- - 测试中台保持简单:一个注册表、一个 `dev-complete` runner、一个最近结果、一个只读 HTML 状态页和几个管理命令。
296
- - Codex 最终总结必须说明当前测试中台结果:已确认的 always-run 测试是否全部通过、失败、阻塞,或当前没有这类测试。
297
- - 测试链路优先复用已有命令、脚本、截图或人工检查。
298
- - 不要为了每个 bad case 都新写脚本。
299
- - 前端或 HTML 改动结束前,应实际查看页面或截图,确认没有明显视觉错误。
300
- - 任何新的长期测试 case 都先写简短草案,让用户确认后再变成 active 测试。
301
-
302
- 详细行为规则见 [`SKILL.md`](SKILL.md)。
184
+ |-- FIND.md
185
+ |-- sessions.jsonl
186
+ |-- sessions/
187
+ |-- bugs-index.json
188
+ |-- bugs/ 和 fixes/
189
+ |-- tasks/
190
+ |-- map.json
191
+ |-- owns-index.json 和 cards/ # 生成
192
+ |-- preferences.json
193
+ |-- user-messages.md
194
+ `-- private/ # gitignored
195
+ ```
196
+
197
+ 见 [`SKILL.md`](SKILL.md)(一页)和 `.codex/context/FIND.md`。