@pzy560117/codex-harness 0.1.9 → 0.1.11

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.
@@ -0,0 +1,363 @@
1
+ {
2
+ "metadata": {
3
+ "purpose": "feature_impl / release / archive 任务参考模板。不要把本文件直接当运行中的 task.json;它用于在 PLAN-001 之后生成真实任务。",
4
+ "usage": [
5
+ "先保留 INIT-001、ANALYSIS-001、TESTCASE-001、PLAN-001 作为 seed queue。",
6
+ "后续真实实现任务从本文件的 template 中复制,再替换 requirement_ids、owned_paths、context_files、test_command、evidence 和 source_case_ids。",
7
+ "不要把多个高风险域、多个主 requirement_ids、或长期前后端混合 story 原样保留下来。"
8
+ ]
9
+ },
10
+ "feature_impl_template": {
11
+ "id": "USX-001",
12
+ "description": "实现一个可独立验收的真实用户故事",
13
+ "task_kind": "feature_impl",
14
+ "phase": "usx",
15
+ "gate_profile": "spec_required",
16
+ "required_truth_sources": [
17
+ "product",
18
+ "design",
19
+ "plan",
20
+ "architecture",
21
+ "testing",
22
+ "repo_context"
23
+ ],
24
+ "priority": 20,
25
+ "dependencies": [
26
+ "PLAN-001"
27
+ ],
28
+ "passes": false,
29
+ "story_id": "USX",
30
+ "story_priority": "P0/P1/P2",
31
+ "independent_test": "替换为该故事的独立验证方式,例如一个最短闭环页面或一条完整 API/业务路径",
32
+ "architecture_constraints": [
33
+ "delivery_shape=<replace-with-web_app|backend_service|monolith|frontend_app|cli|library|automation|data_pipeline|domain_prototype|other>",
34
+ "public_interfaces=<replace-with-http|grpc|graphql|mq|cli|ui-route|package-api|file-format|none>",
35
+ "persistence_boundary=<replace-with-database|browser_storage|filesystem|external-api|none>",
36
+ "test_double_policy=<replace-with-project-policy>"
37
+ ],
38
+ "forbidden_implementations": [
39
+ "禁止把测试替身、mock、fixture、local-only adapter 或领域原型作为声明交付路径完成",
40
+ "禁止只运行 git diff --check 就声明 feature_impl 完成",
41
+ "单个 feature_impl 默认不超过 3 条主 requirement_ids;订单、支付、库存、RBAC 不要和其他主故事捆绑;前端和后端不要长期混在同一个 story"
42
+ ],
43
+ "qa_contract": {
44
+ "source": [
45
+ "docs/testing/NATURAL_LANGUAGE_TEST_CASES.md",
46
+ "docs/testing/TRACEABILITY_MATRIX.md",
47
+ "docs/testing/test-matrix.md",
48
+ "docs/testing/verify-matrix.md"
49
+ ],
50
+ "required_layers": [
51
+ "unit_or_component",
52
+ "contract_or_api",
53
+ "story_full_chain",
54
+ "affected_regression"
55
+ ],
56
+ "tdd_contract": {
57
+ "policy": "required",
58
+ "red": {
59
+ "source_case_ids": [
60
+ "TC-REQ-REPLACE-USX-001"
61
+ ],
62
+ "behavior": "<replace-with-one-new-or-changed-usx-behavior>",
63
+ "test_files": [
64
+ "<replace-with-usx-focused-test-file>"
65
+ ],
66
+ "command": "<replace-with-usx-focused-test-command>",
67
+ "expected_failure": "<replace-with-usx-error-or-assertion-that-proves-behavior-missing>",
68
+ "evidence": "artifacts/tdd/USX-001/red.log"
69
+ },
70
+ "green": {
71
+ "command": "<replace-with-same-usx-focused-test-command>",
72
+ "evidence": "artifacts/tdd/USX-001/green.log"
73
+ },
74
+ "refactor_guard": {
75
+ "command": "<replace-with-usx-affected-tests-or-development-validation>",
76
+ "evidence": "artifacts/tdd/USX-001/refactor.log"
77
+ },
78
+ "coverage": {
79
+ "command": "<replace-with-usx-coverage-command-or-not-applicable>",
80
+ "minimum": "80% for business logic; 100% for critical logic"
81
+ },
82
+ "exemptions": []
83
+ },
84
+ "development_validation": {
85
+ "purpose": "coding-time feedback only; cannot replace acceptance_validation",
86
+ "commands": [
87
+ "<replace-with-affected-tests>",
88
+ "<replace-with-unit-or-component-tests>",
89
+ "<replace-with-contract-or-typecheck-or-lint>"
90
+ ],
91
+ "evidence": [
92
+ "<replace-with-development-test-log-or-report>"
93
+ ]
94
+ },
95
+ "story_full_chain": {
96
+ "source_case_ids": [
97
+ "TC-REQ-REPLACE-USX-FULLCHAIN-001"
98
+ ],
99
+ "entry": "<replace-with-user-visible-entry-or-public-api>",
100
+ "data": "<replace-with-seed-or-fixture-id-from-TEST_DATA_MATRIX>",
101
+ "action": "<replace-with-end-to-end-story-action>",
102
+ "oracles": [
103
+ "response_or_ui",
104
+ "database_or_state",
105
+ "side_effect_or_no_side_effect"
106
+ ],
107
+ "evidence": [
108
+ "<replace-with-request-response-or-screenshot>",
109
+ "<replace-with-db-diff-or-state-proof>",
110
+ "<replace-with-trace-log-or-event-proof>"
111
+ ],
112
+ "failure_mode": "<replace-with-negative-or-error-path-proof>"
113
+ },
114
+ "acceptance_validation": {
115
+ "purpose": "post-implementation user or business full-chain validation",
116
+ "must_run_after_implementation": true,
117
+ "source": "story_full_chain",
118
+ "source_case_ids": [
119
+ "TC-REQ-REPLACE-USX-FULLCHAIN-001"
120
+ ],
121
+ "fresh_evidence_required": true
122
+ },
123
+ "release_impact": [
124
+ "USX evidence must feed RELEASE-001 cross-story flow"
125
+ ],
126
+ "exemptions": []
127
+ },
128
+ "context_files": [
129
+ "docs/product/prd-lite.md",
130
+ "docs/product/requirement-interface-matrix.md",
131
+ "docs/architecture/constraints.md",
132
+ "docs/context/feature-pack.md",
133
+ "docs/design/design-brief.md",
134
+ "docs/design/component-map.md",
135
+ "docs/design/screen-states.md",
136
+ "docs/testing/ACCEPTANCE_CRITERIA.md",
137
+ "docs/testing/ACCEPTANCE_EXAMPLES.md",
138
+ "docs/testing/NATURAL_LANGUAGE_TEST_CASES.md",
139
+ "docs/testing/REGRESSION_PLAN.md",
140
+ "docs/testing/TRACEABILITY_MATRIX.md",
141
+ "docs/testing/TEST_STRATEGY.md",
142
+ "docs/testing/TEST_DATA_MATRIX.md",
143
+ "docs/testing/EVIDENCE_PROTOCOL.md",
144
+ "docs/testing/test-matrix.md",
145
+ "docs/testing/verify-matrix.md",
146
+ "plans/features/<feature-slug>.dev-plan.md"
147
+ ],
148
+ "owned_paths": [
149
+ "<replace-with-usx-owned-path-1>/",
150
+ "<replace-with-usx-owned-path-2>/"
151
+ ],
152
+ "requirement_ids": [
153
+ "FR-REPLACE-USX-001",
154
+ "FR-REPLACE-USX-002"
155
+ ],
156
+ "produces_artifacts": [
157
+ "<replace-with-usx-primary-artifact>",
158
+ "<replace-with-usx-test-evidence>"
159
+ ],
160
+ "execution": {
161
+ "mode": "single"
162
+ },
163
+ "steps": [
164
+ "把 USX 标题、requirement_ids、owned_paths、产物路径和独立验证方式替换为真实项目内容",
165
+ "把 qa_contract 中的 tdd_contract.source_case_ids、story_full_chain.source_case_ids、acceptance_validation.source_case_ids、入口、数据、动作、Oracle、证据、失败态和 release impact 全部替换为真实内容",
166
+ "模块归属:<replace-with-module-owner>",
167
+ "文件改动清单:<replace-with-file-list>",
168
+ "复用内容:<replace-with-reused-code-or-docs>",
169
+ "新增内容:<replace-with-new-code-or-docs>",
170
+ "不改内容:<replace-with-explicit-non-goals>",
171
+ "风险点:<replace-with-key-risks>",
172
+ "测试范围:<replace-with-affected-tests-and-full-chain-scope>",
173
+ "仅实现一个可单独交付的用户故事,并同步补齐其 affected tests 与必要文档",
174
+ "运行与 USX 对应的真实验证命令,必须包含开发验证和代码完成后的故事级验收链路,并记录可回溯证据"
175
+ ],
176
+ "test_command": "powershell -NoProfile -ExecutionPolicy Bypass -File .\\tools\\harness\\verify.ps1 -Commands @('<replace-with-project-fitness-check>', '<replace-with-affected-tests>', 'git diff --check')",
177
+ "acceptance": [
178
+ "USX 能作为独立增量演示或独立验收",
179
+ "USX 满足架构约束 truth source,不以测试替身冒充声明交付路径",
180
+ "USX 的 tdd_contract 和验收链路均能回溯到 NATURAL_LANGUAGE_TEST_CASES.md 中的自然语言用例",
181
+ "USX 的开发验证和故事级验收链路均通过,且验收证据能进入 RELEASE-001",
182
+ "USX 的 Requirement IDs、测试映射和证据路径完整可追溯"
183
+ ]
184
+ },
185
+ "release_template": {
186
+ "id": "RELEASE-001",
187
+ "description": "执行跨故事联调、回归验证、视觉检查和交付收口",
188
+ "task_kind": "release",
189
+ "phase": "verify",
190
+ "gate_profile": "release_required",
191
+ "required_truth_sources": [
192
+ "product",
193
+ "design",
194
+ "plan",
195
+ "testing",
196
+ "repo_context"
197
+ ],
198
+ "priority": 80,
199
+ "dependencies": [
200
+ "<replace-with-implemented-story-task-ids>"
201
+ ],
202
+ "passes": false,
203
+ "qa_contract": {
204
+ "source": [
205
+ "docs/testing/NATURAL_LANGUAGE_TEST_CASES.md",
206
+ "docs/testing/TRACEABILITY_MATRIX.md",
207
+ "docs/testing/REGRESSION_PLAN.md",
208
+ "docs/testing/verify-matrix.md",
209
+ "docs/testing/EVIDENCE_PROTOCOL.md"
210
+ ],
211
+ "required_layers": [
212
+ "cross_story_full_chain",
213
+ "p0_p1_regression",
214
+ "contract_or_api",
215
+ "e2e_or_equivalent_system_test",
216
+ "visual_or_ui_state_review_when_applicable",
217
+ "failure_triage"
218
+ ],
219
+ "development_validation": {
220
+ "purpose": "release-task setup and affected checks only; cannot replace release_candidate acceptance",
221
+ "commands": [
222
+ "<replace-with-affected-regression-or-contract-checks>",
223
+ "<replace-with-build-or-typecheck-if-applicable>"
224
+ ],
225
+ "evidence": [
226
+ "<replace-with-release-precheck-log-or-report>"
227
+ ]
228
+ },
229
+ "cross_story_full_chain": {
230
+ "source_case_ids": [
231
+ "TC-REQ-REPLACE-RELEASE-001"
232
+ ],
233
+ "entry": "<replace-with-primary-user-or-system-entry>",
234
+ "flow": [
235
+ "<replace-with-story-order>"
236
+ ],
237
+ "oracles": [
238
+ "user_visible_result",
239
+ "api_contract",
240
+ "data_consistency",
241
+ "side_effects",
242
+ "audit_or_trace"
243
+ ],
244
+ "evidence": [
245
+ "docs/testing/verify-matrix.md",
246
+ "docs/testing/failure-triage.md",
247
+ "artifacts/"
248
+ ],
249
+ "failure_mode": "<replace-with-release-failure-path-proof>"
250
+ },
251
+ "acceptance_validation": {
252
+ "purpose": "post-implementation release-candidate validation from user or delivery perspective",
253
+ "must_run_after_all_story_tasks": true,
254
+ "source": "cross_story_full_chain",
255
+ "source_case_ids": [
256
+ "TC-REQ-REPLACE-RELEASE-001"
257
+ ],
258
+ "fresh_evidence_required": true
259
+ },
260
+ "exemptions": []
261
+ },
262
+ "context_files": [
263
+ "docs/context/feature-pack.md",
264
+ "docs/design/visual-parity-review.md",
265
+ "docs/testing/ACCEPTANCE_EXAMPLES.md",
266
+ "docs/testing/TRACEABILITY_MATRIX.md",
267
+ "docs/testing/TEST_STRATEGY.md",
268
+ "docs/testing/REGRESSION_PLAN.md",
269
+ "docs/testing/EVIDENCE_PROTOCOL.md",
270
+ "docs/testing/test-matrix.md",
271
+ "docs/testing/verify-matrix.md",
272
+ "docs/testing/failure-triage.md",
273
+ "plans/features/<feature-slug>.dev-plan.md"
274
+ ],
275
+ "owned_paths": [
276
+ "docs/testing/",
277
+ "docs/design/",
278
+ "artifacts/",
279
+ "tests/"
280
+ ],
281
+ "requirement_ids": [
282
+ "NFR-REPLACE-RELEASE",
283
+ "FR-REPLACE-END-TO-END"
284
+ ],
285
+ "produces_artifacts": [
286
+ "artifacts/visual-review/",
287
+ "docs/testing/failure-triage.md",
288
+ "traces/"
289
+ ],
290
+ "execution": {
291
+ "mode": "single"
292
+ },
293
+ "steps": [
294
+ "执行开发验证、P0/P1 回归、发布候选级跨故事整链路、端到端、视觉还原和必要契约校验",
295
+ "记录失败归因、修复建议、最终通过证据和剩余风险",
296
+ "确认 release 阶段只负责 fresh evidence,不在此阶段第一次补需求或测试范围"
297
+ ],
298
+ "test_command": "powershell -NoProfile -ExecutionPolicy Bypass -File .\\tools\\harness\\verify.ps1",
299
+ "acceptance": [
300
+ "跨故事完整主流程验证通过,或有明确 blocked 说明与后续处置",
301
+ "P0/P1 回归、契约/API、E2E/视觉或等价系统级验证均有 fresh evidence",
302
+ "交付所需的测试与视觉证据完整可追溯"
303
+ ]
304
+ },
305
+ "archive_template": {
306
+ "id": "ARCHIVE-001",
307
+ "description": "归档本轮交付知识、更新知识索引并标记可复用经验",
308
+ "task_kind": "archive",
309
+ "phase": "archive",
310
+ "gate_profile": "lightweight",
311
+ "required_truth_sources": [
312
+ "knowledge"
313
+ ],
314
+ "priority": 90,
315
+ "dependencies": [
316
+ "RELEASE-001"
317
+ ],
318
+ "passes": false,
319
+ "context_files": [
320
+ "docs/harness/knowledge-architecture.md",
321
+ "docs/harness/knowledge-import.md",
322
+ "docs/harness/knowledge-lint.md",
323
+ "docs/harness/team-knowledge-sync.md",
324
+ "docs/harness/rule-governance.md",
325
+ "docs/knowledge/knowledge-catalog.md",
326
+ "docs/knowledge/catalog.md",
327
+ "progress.txt",
328
+ "traces/"
329
+ ],
330
+ "owned_paths": [
331
+ "docs/knowledge/"
332
+ ],
333
+ "requirement_ids": [
334
+ "NFR-KNOWLEDGE-ARCHIVE"
335
+ ],
336
+ "produces_artifacts": [
337
+ "docs/knowledge/knowledge-catalog.md",
338
+ "docs/knowledge/catalog.md",
339
+ "docs/knowledge/"
340
+ ],
341
+ "execution": {
342
+ "mode": "single"
343
+ },
344
+ "knowledge_query_budget": {
345
+ "catalogs": 2,
346
+ "entries": 8
347
+ },
348
+ "steps": [
349
+ "读取本轮任务 trace、progress、review 输出和 failure triage,提取可复用的 decision、guideline、pitfall、process 或 model",
350
+ "新增或更新 docs/knowledge/ 下的知识条目,所有新增条目初始 maturity 默认为 draft",
351
+ "更新 knowledge-catalog.md 和 catalog.md,确保索引能按阶段和类型引导后续任务按需读取",
352
+ "输出 promotion、decay、conflict、merge 和 team sync candidates;成熟度提升、团队同步、冲突裁决和归档删除必须有明确 evidence",
353
+ "不要把一次性任务结论提升为 AGENTS.md 规则;只有 proven 级别或用户明确要求时才升级规则"
354
+ ],
355
+ "test_command": "git diff --check",
356
+ "acceptance": [
357
+ "本轮可复用知识已沉淀到 docs/knowledge/ 或明确说明没有可归档条目",
358
+ "knowledge-catalog.md 和 catalog.md 与新增或更新条目保持一致",
359
+ "可提升、可衰减、可团队同步、冲突和重复条目已有候选说明或明确无相关候选",
360
+ "归档任务没有修改业务实现或伪造 driver runtime 状态"
361
+ ]
362
+ }
363
+ }