@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.
- package/README.md +103 -208
- package/README.zh-CN.md +103 -208
- package/SKILL.md +27 -678
- package/agents/openai.yaml +2 -2
- package/bin/context-guard-skill.js +159 -56
- package/bin/postinstall.js +1 -1
- package/hooks.json +11 -11
- package/package.json +9 -6
- package/prototype/workbench.html +4933 -0
- package/references/bug-record-template.md +37 -0
- package/references/context-template.md +14 -336
- package/scripts/context_guard.py +577 -7655
- package/scripts/context_guard_hook.py +179 -731
- package/scripts/map_owns.py +769 -0
- package/references/feature-chain-methodology.md +0 -228
- package/references/register-template.md +0 -85
- package/references/task-case-template.md +0 -63
- package/tests/BC-20260618-063.sh +0 -116
- package/tests/BC-20260618-065.sh +0 -66
- package/tests/BC-20260626-080.sh +0 -48
- package/tests/BC-20260626-081.sh +0 -40
- package/tests/BC-20260626-082.sh +0 -32
- package/tests/BC-20260626-083.sh +0 -66
- package/tests/BC-20260627-084.sh +0 -74
- package/tests/BC-20260630-086.sh +0 -50
- package/tests/BC-20260630-087.sh +0 -103
- package/tests/BC-20260630-088.sh +0 -32
- package/tests/BC-20260630-089.sh +0 -63
- package/tests/BC-20260701-090.sh +0 -84
- package/tests/BC-20260702-096.sh +0 -48
- package/tests/BC-20260706-098.sh +0 -66
- package/tests/BC-20260707-099.sh +0 -47
- package/tests/BC-20260707-100.sh +0 -46
- package/tests/BC-20260707-101.sh +0 -47
- package/tests/BC-20260707-102.sh +0 -68
- package/tests/BC-20260707-103.sh +0 -59
- package/tests/BC-20260707-104.sh +0 -103
- package/tests/BC-20260707-105.sh +0 -109
- package/tests/BC-20260707-106.sh +0 -80
- package/tests/BC-20260707-107.sh +0 -74
- package/tests/BC-20260707-108.sh +0 -48
- package/tests/BC-20260707-109.sh +0 -56
- package/tests/BC-20260707-110.sh +0 -71
- package/tests/BC-20260707-111.sh +0 -70
- package/tests/BC-20260707-112.sh +0 -45
- package/tests/BC-20260707-113.sh +0 -73
- package/tests/BC-20260707-115.sh +0 -77
- package/tests/BC-20260707-116.sh +0 -77
- package/tests/BC-20260707-118.sh +0 -115
- package/tests/BC-20260707-119.sh +0 -47
- package/tests/BC-20260707-120.sh +0 -60
- package/tests/BC-20260707-121.sh +0 -66
- package/tests/BC-20260707-122.sh +0 -48
- package/tests/BC-20260707-123.sh +0 -43
- package/tests/BC-20260707-124.sh +0 -56
- package/tests/BC-20260707-125.sh +0 -64
- package/tests/BC-20260707-126.sh +0 -80
- package/tests/BC-20260707-127.sh +0 -88
- package/tests/BC-20260707-129.sh +0 -59
- package/tests/BC-20260707-130.sh +0 -69
- package/tests/BC-20260707-131.sh +0 -140
- package/tests/BC-20260707-132.sh +0 -150
- package/tests/BC-20260707-133.sh +0 -70
- package/tests/BC-20260708-136.sh +0 -210
- package/tests/BC-20260708-137.sh +0 -106
- package/tests/BC-20260708-138.sh +0 -168
- package/tests/BC-20260708-139.sh +0 -79
- package/tests/BC-20260709-002.sh +0 -63
- package/tests/BC-20260709-003.sh +0 -239
- package/tests/BC-20260709-006.sh +0 -76
- package/tests/BC-20260709-008.sh +0 -168
- package/tests/BC-20260710-001.sh +0 -61
- package/tests/BC-20260710-002.sh +0 -111
- 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
|
|
5
|
+
Context Guard 是一个面向 Codex、Cursor 和 Claude 的项目记忆 skill。它把任务主线、支线、bad case 和验证链路保存在项目自己的 `.codex/context/` 里,让 Agent 在不同 session 之间也能知道“现在做到哪里、踩过哪些坑、下次怎么检查”。
|
|
6
6
|
|
|
7
7
|
## 能做什么
|
|
8
8
|
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
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
|
-
|
|
30
|
-
npx @michelj/context-guard install
|
|
31
|
-
```
|
|
18
|
+
## 工作台
|
|
32
19
|
|
|
33
|
-
|
|
20
|
+
人在工作台里看图、点头。安装 Hook 后,新 Session 会自动启动本机单实例服务并打开页面;Agent 读 `.codex/context/` 里的小索引,不操作画布。
|
|
34
21
|
|
|
35
|
-
|
|
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
|
-
|
|
24
|
+
第一次打开可能会看到 GitHack 的提示页(它只是中转,没审过页面内容)。点 **Open the page** 就进工作台。
|
|
40
25
|
|
|
41
|
-
|
|
42
|
-
npx @michelj/context-guard install --with-hooks
|
|
43
|
-
```
|
|
26
|
+
要自己定第一层:顶栏点仓库名,切到 **OpenClaw**(首次使用),点「看几种第一层切法」,选一种才上画布。仍是演示卡名,但切法是你定的。
|
|
44
27
|
|
|
45
|
-
|
|
28
|
+
顶栏 **中 / EN** 切界面语言。地图上的标题、用途、记忆仍按写入时的语言,不整页翻译。
|
|
46
29
|
|
|
47
|
-
|
|
30
|
+
也可以手动启动或停止工作台:
|
|
48
31
|
|
|
49
32
|
```bash
|
|
50
|
-
|
|
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
|
-
|
|
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
|
-
|
|
67
|
-
~/.codex/skills/context-guard/SKILL.md
|
|
68
|
-
```
|
|
41
|
+

|
|
69
42
|
|
|
70
|
-
|
|
43
|
+
### 进入模块
|
|
71
44
|
|
|
72
|
-
|
|
45
|
+
开工单元挂在模块下面,只画从属实线。
|
|
73
46
|
|
|
74
|
-
|
|
75
|
-
<Codex 打开的项目根目录>/.codex/context/
|
|
76
|
-
```
|
|
47
|
+

|
|
77
48
|
|
|
78
|
-
|
|
49
|
+
### 模块关系
|
|
79
50
|
|
|
80
|
-
|
|
81
|
-
- chat/thread 名称对应的目录
|
|
82
|
-
- 临时目录
|
|
83
|
-
- SSH 远程服务器路径
|
|
51
|
+
点「关系」再点一张卡,只高亮它的生产/消费,其它变暗,不会进入该模块。
|
|
84
52
|
|
|
85
|
-
|
|
53
|
+

|
|
86
54
|
|
|
87
|
-
|
|
88
|
-
<Codex 打开的项目根目录>/.codex/context/user-messages.md
|
|
89
|
-
```
|
|
55
|
+
### 会话流动
|
|
90
56
|
|
|
91
|
-
|
|
57
|
+
点一条挂了会话的 Bug。从根到该节点的链路亮起来,当前会话沿线流动。
|
|
92
58
|
|
|
93
|
-
|
|
94
|
-
<Codex 打开的项目根目录>/.codex/context/private/
|
|
95
|
-
```
|
|
59
|
+

|
|
96
60
|
|
|
97
|
-
|
|
61
|
+
### 授权模式
|
|
98
62
|
|
|
99
|
-
|
|
100
|
-
python3 ~/.codex/skills/context-guard/scripts/context_guard.py show-roadmap --root /path/to/project
|
|
101
|
-
```
|
|
63
|
+
「授权模式」标出这次会话 Agent 能读哪一段。灰色卡未授权。
|
|
102
64
|
|
|
103
|
-
|
|
65
|
+

|
|
104
66
|
|
|
105
|
-
|
|
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
|
-
|
|
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
|
-
|
|
75
|
+
也可以全局安装,让 npm 包自动安装到检测到的客户端:
|
|
123
76
|
|
|
124
77
|
```bash
|
|
125
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
```
|
|
189
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
207
|
-
Use $context-guard to maintain this task context.
|
|
208
|
-
```
|
|
130
|
+
## Context 保存在哪里
|
|
209
131
|
|
|
210
|
-
|
|
132
|
+
Context 必须保存在当前打开的本地项目里(不随客户端改变):
|
|
211
133
|
|
|
212
134
|
```text
|
|
213
|
-
|
|
135
|
+
<当前项目根目录>/.codex/context/
|
|
214
136
|
```
|
|
215
137
|
|
|
216
|
-
|
|
138
|
+
不要把 context 写到:
|
|
217
139
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
140
|
+
- skill 安装目录
|
|
141
|
+
- chat/thread 名称对应的目录
|
|
142
|
+
- 临时目录
|
|
143
|
+
- SSH 远程服务器路径
|
|
221
144
|
|
|
222
|
-
|
|
145
|
+
对后续工作有价值的短用户消息会保存在:
|
|
223
146
|
|
|
224
|
-
```
|
|
225
|
-
|
|
147
|
+
```text
|
|
148
|
+
<当前项目根目录>/.codex/context/user-messages.md
|
|
226
149
|
```
|
|
227
150
|
|
|
228
|
-
|
|
151
|
+
如果用户提供了后续需要复用的凭据,Context Guard 只会在公开 context 中记录脱敏指针。原始凭据必须只保存在本地私有目录:
|
|
229
152
|
|
|
230
|
-
```
|
|
231
|
-
|
|
153
|
+
```text
|
|
154
|
+
<当前项目根目录>/.codex/context/private/
|
|
232
155
|
```
|
|
233
156
|
|
|
234
|
-
|
|
157
|
+
如果手动运行脚本:
|
|
235
158
|
|
|
236
159
|
```bash
|
|
237
|
-
|
|
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
|
-
|
|
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
|
|
254
|
-
|
|
255
|
-
|
|
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
|
-
|--
|
|
270
|
-
|--
|
|
271
|
-
|--
|
|
272
|
-
|--
|
|
273
|
-
|--
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|--
|
|
278
|
-
|--
|
|
279
|
-
|
|
280
|
-
|
|
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`。
|