@hunter-harness/workflow-harness 0.2.64 → 0.2.65

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 (154) hide show
  1. package/harness/bundles/general/claude-code/.harness-build.json +1 -1
  2. package/harness/bundles/general/claude-code/contracts/workflow-policy.json +1 -1
  3. package/harness/bundles/general/claude-code/harness-archive/SKILL.md +1 -1
  4. package/harness/bundles/general/claude-code/harness-codebase-map/SKILL.md +6 -5
  5. package/harness/bundles/general/claude-code/harness-knowledge-ingest/SKILL.md +11 -5
  6. package/harness/bundles/general/claude-code/harness-knowledge-query/SKILL.md +1 -1
  7. package/harness/bundles/general/claude-code/harness-plan/SKILL.md +1 -1
  8. package/harness/bundles/general/claude-code/harness-review/SKILL.md +1 -1
  9. package/harness/bundles/general/claude-code/harness-run/SKILL.md +2 -2
  10. package/harness/bundles/general/claude-code/harness-submit/SKILL.md +2 -2
  11. package/harness/bundles/general/claude-code/harness-sync/SKILL.md +1 -1
  12. package/harness/bundles/general/claude-code/harness-test/SKILL.md +1 -1
  13. package/harness/bundles/general/claude-code/scripts/harness_archive.py +320 -35
  14. package/harness/bundles/general/claude-code/scripts/harness_context.py +43 -25
  15. package/harness/bundles/general/claude-code/scripts/harness_gate.py +22 -27
  16. package/harness/bundles/general/claude-code/scripts/harness_ledger.py +155 -16
  17. package/harness/bundles/general/claude-code/scripts/harness_runtime.py +31 -5
  18. package/harness/bundles/general/codebuddy/.harness-build.json +1 -1
  19. package/harness/bundles/general/codebuddy/contracts/workflow-policy.json +1 -1
  20. package/harness/bundles/general/codebuddy/harness-archive/SKILL.md +1 -1
  21. package/harness/bundles/general/codebuddy/harness-codebase-map/SKILL.md +6 -5
  22. package/harness/bundles/general/codebuddy/harness-knowledge-ingest/SKILL.md +11 -5
  23. package/harness/bundles/general/codebuddy/harness-knowledge-query/SKILL.md +1 -1
  24. package/harness/bundles/general/codebuddy/harness-plan/SKILL.md +1 -1
  25. package/harness/bundles/general/codebuddy/harness-review/SKILL.md +1 -1
  26. package/harness/bundles/general/codebuddy/harness-run/SKILL.md +2 -2
  27. package/harness/bundles/general/codebuddy/harness-submit/SKILL.md +2 -2
  28. package/harness/bundles/general/codebuddy/harness-sync/SKILL.md +1 -1
  29. package/harness/bundles/general/codebuddy/harness-test/SKILL.md +1 -1
  30. package/harness/bundles/general/codebuddy/scripts/harness_archive.py +320 -35
  31. package/harness/bundles/general/codebuddy/scripts/harness_context.py +43 -25
  32. package/harness/bundles/general/codebuddy/scripts/harness_gate.py +22 -27
  33. package/harness/bundles/general/codebuddy/scripts/harness_ledger.py +155 -16
  34. package/harness/bundles/general/codebuddy/scripts/harness_runtime.py +31 -5
  35. package/harness/bundles/general/codex/.harness-build.json +1 -1
  36. package/harness/bundles/general/codex/contracts/workflow-policy.json +1 -1
  37. package/harness/bundles/general/codex/harness-archive/SKILL.md +1 -1
  38. package/harness/bundles/general/codex/harness-codebase-map/SKILL.md +6 -5
  39. package/harness/bundles/general/codex/harness-knowledge-ingest/SKILL.md +11 -5
  40. package/harness/bundles/general/codex/harness-knowledge-query/SKILL.md +1 -1
  41. package/harness/bundles/general/codex/harness-plan/SKILL.md +1 -1
  42. package/harness/bundles/general/codex/harness-review/SKILL.md +1 -1
  43. package/harness/bundles/general/codex/harness-run/SKILL.md +2 -2
  44. package/harness/bundles/general/codex/harness-submit/SKILL.md +2 -2
  45. package/harness/bundles/general/codex/harness-sync/SKILL.md +1 -1
  46. package/harness/bundles/general/codex/harness-test/SKILL.md +1 -1
  47. package/harness/bundles/general/codex/scripts/harness_archive.py +320 -35
  48. package/harness/bundles/general/codex/scripts/harness_context.py +43 -25
  49. package/harness/bundles/general/codex/scripts/harness_gate.py +22 -27
  50. package/harness/bundles/general/codex/scripts/harness_ledger.py +155 -16
  51. package/harness/bundles/general/codex/scripts/harness_runtime.py +31 -5
  52. package/harness/bundles/general/cursor/.harness-build.json +1 -1
  53. package/harness/bundles/general/cursor/contracts/workflow-policy.json +1 -1
  54. package/harness/bundles/general/cursor/harness-archive/SKILL.md +1 -1
  55. package/harness/bundles/general/cursor/harness-codebase-map/SKILL.md +6 -5
  56. package/harness/bundles/general/cursor/harness-knowledge-ingest/SKILL.md +11 -5
  57. package/harness/bundles/general/cursor/harness-knowledge-query/SKILL.md +1 -1
  58. package/harness/bundles/general/cursor/harness-plan/SKILL.md +1 -1
  59. package/harness/bundles/general/cursor/harness-review/SKILL.md +1 -1
  60. package/harness/bundles/general/cursor/harness-run/SKILL.md +2 -2
  61. package/harness/bundles/general/cursor/harness-submit/SKILL.md +2 -2
  62. package/harness/bundles/general/cursor/harness-sync/SKILL.md +1 -1
  63. package/harness/bundles/general/cursor/harness-test/SKILL.md +1 -1
  64. package/harness/bundles/general/cursor/scripts/harness_archive.py +320 -35
  65. package/harness/bundles/general/cursor/scripts/harness_context.py +43 -25
  66. package/harness/bundles/general/cursor/scripts/harness_gate.py +22 -27
  67. package/harness/bundles/general/cursor/scripts/harness_ledger.py +155 -16
  68. package/harness/bundles/general/cursor/scripts/harness_runtime.py +31 -5
  69. package/harness/bundles/java/claude-code/.harness-build.json +1 -1
  70. package/harness/bundles/java/claude-code/contracts/workflow-policy.json +1 -1
  71. package/harness/bundles/java/claude-code/harness-apidoc/SKILL.md +1 -1
  72. package/harness/bundles/java/claude-code/harness-archive/SKILL.md +1 -1
  73. package/harness/bundles/java/claude-code/harness-codebase-map/SKILL.md +6 -5
  74. package/harness/bundles/java/claude-code/harness-knowledge-ingest/SKILL.md +11 -5
  75. package/harness/bundles/java/claude-code/harness-knowledge-query/SKILL.md +1 -1
  76. package/harness/bundles/java/claude-code/harness-package/SKILL.md +1 -1
  77. package/harness/bundles/java/claude-code/harness-plan/SKILL.md +1 -1
  78. package/harness/bundles/java/claude-code/harness-review/SKILL.md +1 -1
  79. package/harness/bundles/java/claude-code/harness-run/SKILL.md +2 -2
  80. package/harness/bundles/java/claude-code/harness-submit/SKILL.md +2 -2
  81. package/harness/bundles/java/claude-code/harness-sync/SKILL.md +1 -1
  82. package/harness/bundles/java/claude-code/harness-test/SKILL.md +1 -1
  83. package/harness/bundles/java/claude-code/scripts/harness_archive.py +320 -35
  84. package/harness/bundles/java/claude-code/scripts/harness_context.py +43 -25
  85. package/harness/bundles/java/claude-code/scripts/harness_gate.py +22 -27
  86. package/harness/bundles/java/claude-code/scripts/harness_ledger.py +155 -16
  87. package/harness/bundles/java/claude-code/scripts/harness_runtime.py +31 -5
  88. package/harness/bundles/java/codebuddy/.harness-build.json +1 -1
  89. package/harness/bundles/java/codebuddy/contracts/workflow-policy.json +1 -1
  90. package/harness/bundles/java/codebuddy/harness-apidoc/SKILL.md +1 -1
  91. package/harness/bundles/java/codebuddy/harness-archive/SKILL.md +1 -1
  92. package/harness/bundles/java/codebuddy/harness-codebase-map/SKILL.md +6 -5
  93. package/harness/bundles/java/codebuddy/harness-knowledge-ingest/SKILL.md +11 -5
  94. package/harness/bundles/java/codebuddy/harness-knowledge-query/SKILL.md +1 -1
  95. package/harness/bundles/java/codebuddy/harness-package/SKILL.md +1 -1
  96. package/harness/bundles/java/codebuddy/harness-plan/SKILL.md +1 -1
  97. package/harness/bundles/java/codebuddy/harness-review/SKILL.md +1 -1
  98. package/harness/bundles/java/codebuddy/harness-run/SKILL.md +2 -2
  99. package/harness/bundles/java/codebuddy/harness-submit/SKILL.md +2 -2
  100. package/harness/bundles/java/codebuddy/harness-sync/SKILL.md +1 -1
  101. package/harness/bundles/java/codebuddy/harness-test/SKILL.md +1 -1
  102. package/harness/bundles/java/codebuddy/scripts/harness_archive.py +320 -35
  103. package/harness/bundles/java/codebuddy/scripts/harness_context.py +43 -25
  104. package/harness/bundles/java/codebuddy/scripts/harness_gate.py +22 -27
  105. package/harness/bundles/java/codebuddy/scripts/harness_ledger.py +155 -16
  106. package/harness/bundles/java/codebuddy/scripts/harness_runtime.py +31 -5
  107. package/harness/bundles/java/codex/.harness-build.json +1 -1
  108. package/harness/bundles/java/codex/contracts/workflow-policy.json +1 -1
  109. package/harness/bundles/java/codex/harness-apidoc/SKILL.md +1 -1
  110. package/harness/bundles/java/codex/harness-archive/SKILL.md +1 -1
  111. package/harness/bundles/java/codex/harness-codebase-map/SKILL.md +6 -5
  112. package/harness/bundles/java/codex/harness-knowledge-ingest/SKILL.md +11 -5
  113. package/harness/bundles/java/codex/harness-knowledge-query/SKILL.md +1 -1
  114. package/harness/bundles/java/codex/harness-package/SKILL.md +1 -1
  115. package/harness/bundles/java/codex/harness-plan/SKILL.md +1 -1
  116. package/harness/bundles/java/codex/harness-review/SKILL.md +1 -1
  117. package/harness/bundles/java/codex/harness-run/SKILL.md +2 -2
  118. package/harness/bundles/java/codex/harness-submit/SKILL.md +2 -2
  119. package/harness/bundles/java/codex/harness-sync/SKILL.md +1 -1
  120. package/harness/bundles/java/codex/harness-test/SKILL.md +1 -1
  121. package/harness/bundles/java/codex/scripts/harness_archive.py +320 -35
  122. package/harness/bundles/java/codex/scripts/harness_context.py +43 -25
  123. package/harness/bundles/java/codex/scripts/harness_gate.py +22 -27
  124. package/harness/bundles/java/codex/scripts/harness_ledger.py +155 -16
  125. package/harness/bundles/java/codex/scripts/harness_runtime.py +31 -5
  126. package/harness/bundles/java/cursor/.harness-build.json +1 -1
  127. package/harness/bundles/java/cursor/contracts/workflow-policy.json +1 -1
  128. package/harness/bundles/java/cursor/harness-apidoc/SKILL.md +1 -1
  129. package/harness/bundles/java/cursor/harness-archive/SKILL.md +1 -1
  130. package/harness/bundles/java/cursor/harness-codebase-map/SKILL.md +6 -5
  131. package/harness/bundles/java/cursor/harness-knowledge-ingest/SKILL.md +11 -5
  132. package/harness/bundles/java/cursor/harness-knowledge-query/SKILL.md +1 -1
  133. package/harness/bundles/java/cursor/harness-package/SKILL.md +1 -1
  134. package/harness/bundles/java/cursor/harness-plan/SKILL.md +1 -1
  135. package/harness/bundles/java/cursor/harness-review/SKILL.md +1 -1
  136. package/harness/bundles/java/cursor/harness-run/SKILL.md +2 -2
  137. package/harness/bundles/java/cursor/harness-submit/SKILL.md +2 -2
  138. package/harness/bundles/java/cursor/harness-sync/SKILL.md +1 -1
  139. package/harness/bundles/java/cursor/harness-test/SKILL.md +1 -1
  140. package/harness/bundles/java/cursor/scripts/harness_archive.py +320 -35
  141. package/harness/bundles/java/cursor/scripts/harness_context.py +43 -25
  142. package/harness/bundles/java/cursor/scripts/harness_gate.py +22 -27
  143. package/harness/bundles/java/cursor/scripts/harness_ledger.py +155 -16
  144. package/harness/bundles/java/cursor/scripts/harness_runtime.py +31 -5
  145. package/harness/manifests/general/claude-code.json +19 -19
  146. package/harness/manifests/general/codebuddy.json +19 -19
  147. package/harness/manifests/general/codex.json +19 -19
  148. package/harness/manifests/general/cursor.json +19 -19
  149. package/harness/manifests/java/claude-code.json +21 -21
  150. package/harness/manifests/java/codebuddy.json +21 -21
  151. package/harness/manifests/java/codex.json +21 -21
  152. package/harness/manifests/java/cursor.json +21 -21
  153. package/hunter-workflow-family.json +5 -5
  154. package/package.json +1 -1
@@ -2,5 +2,5 @@
2
2
  "schemaVersion": 1,
3
3
  "overlay": "none",
4
4
  "agent": "claude-code",
5
- "coreHash": "d8689a8d7aa28b09"
5
+ "coreHash": "7f28abc4c54931cd"
6
6
  }
@@ -110,7 +110,7 @@
110
110
  "artifacts": ["summary-data", "archive-manifest"],
111
111
  "events": ["phase.start", "phase.end", "artifact"],
112
112
  "allowedInteractions": [],
113
- "capabilities": ["gate-begin", "gate-close"]
113
+ "capabilities": []
114
114
  },
115
115
  "harness-sync": {
116
116
  "phase": "sync",
@@ -21,7 +21,7 @@ disallowed-tools:
21
21
  - Bash(awk *)
22
22
  - Bash(curl *)
23
23
  ---
24
- <!-- generated by harness_deploy.py; core=d8689a8d7aa28b09; overlay=none; agent=claude-code; do not edit -->
24
+ <!-- generated by harness_deploy.py; core=7f28abc4c54931cd; overlay=none; agent=claude-code; do not edit -->
25
25
  # harness-archive — 变更归档
26
26
 
27
27
  ## Purpose
@@ -20,7 +20,7 @@ disallowed-tools:
20
20
  - Bash(awk *)
21
21
  - Bash(curl *)
22
22
  ---
23
- <!-- generated by harness_deploy.py; core=d8689a8d7aa28b09; overlay=none; agent=claude-code; do not edit -->
23
+ <!-- generated by harness_deploy.py; core=7f28abc4c54931cd; overlay=none; agent=claude-code; do not edit -->
24
24
  # harness-codebase-map — 代码库地图
25
25
 
26
26
  ## Purpose
@@ -29,8 +29,8 @@ disallowed-tools:
29
29
 
30
30
  ## 核心边界
31
31
 
32
- - **只写** `.harness/codebase/map/`、`map-summary.md`、`map-manifest.json`、`.harness/reports/codebase-map-*.md`
33
- - **禁止** `.planning/`、Git 写操作、修改 `.codegraph/`、自动 commit/push
32
+ - **内容只写** `.harness/codebase/map/`、`map-summary.md`、`map-manifest.json`、`.harness/reports/codebase-map-*.md`;平台同步只更新 Harness 协议状态
33
+ - **禁止** `.planning/`、Git 写操作、修改 `.codegraph/`、自动 commit 或 Git push
34
34
  - `harness-sync` 只**建议**刷新,不自动跑全量 map
35
35
 
36
36
  ## When to Use
@@ -61,6 +61,7 @@ disallowed-tools:
61
61
  | 6 | 写 summary + manifest(schema → `templates/map-manifest.schema.json`) |
62
62
  | 7 | 更新 `.harness/context-index.json` codebase 入口(若存在) |
63
63
  | 8 | 控制台 + `.harness/reports/codebase-map-*.md` 报告 |
64
+ | 9 | 项目已绑定平台时,运行 `npx hunter-harness push --yes --non-interactive --json` 上传受控规则与架构快照;失败只报告“平台同步待重试”,不回滚本地地图 |
64
65
 
65
66
  逐步细节、frontmatter 字段、git 允许列表 → `reference.md` / `checklist.md`
66
67
 
@@ -86,7 +87,7 @@ disallowed-tools:
86
87
  |---|------|
87
88
  | 1 | 唯一输出 `.harness/codebase/map/` |
88
89
  | 2 | `generated_reviewable`,不建议手工改 map 正文 |
89
- | 3 | Git 写操作、不改业务代码 |
90
+ | 3 | 不做 Git 写操作、不改业务代码;受控平台上传不等于 Git push |
90
91
  | 4 | 不管理 CodeGraph |
91
92
  | 5 | 敏感信息脱敏 → `sensitive-info-protocol` |
92
93
  | 6 | 证据化输出 → `evidence-based-reporting-protocol` |
@@ -94,7 +95,7 @@ disallowed-tools:
94
95
 
95
96
  ## Output Format
96
97
 
97
- 模式、范围、7/7 文档路径与行数、manifest/summary、context-index 状态、WARN/FAIL → `reference.md` 报告模板
98
+ 模式、范围、7/7 文档路径与行数、manifest/summary、context-index 状态、平台同步状态、WARN/FAIL → `reference.md` 报告模板
98
99
 
99
100
  ## 渐进披露
100
101
 
@@ -8,7 +8,7 @@ disallowed-tools:
8
8
  - Bash(git *)
9
9
  - Bash(curl *)
10
10
  ---
11
- <!-- generated by harness_deploy.py; core=d8689a8d7aa28b09; overlay=none; agent=claude-code; do not edit -->
11
+ <!-- generated by harness_deploy.py; core=7f28abc4c54931cd; overlay=none; agent=claude-code; do not edit -->
12
12
  # harness-knowledge-ingest
13
13
 
14
14
  知识 ingest 完全由 Hunter Platform 负责。归档完成时,客户端生成一个确定性 ZIP;
@@ -33,15 +33,21 @@ disallowed-tools:
33
33
 
34
34
  ## Normal Workflow
35
35
 
36
- 1. `harness-archive` 的 finalize 生成确定性 ZIP,并调用:
36
+ 1. 先读取最近归档操作记录中的 `archiveRemote`,以及本地状态目录
37
+ `.harness/state/local/archive-packages/<change-key>.remote.json`。若 `archiveStatus=durable` 且
38
+ `knowledgeStatus=ready`,直接报告已完成,禁止重新打包或上传。
39
+ 2. 若存在 `.harness/state/local/archive-packages/<change-key>.zip`,只重试该包;
40
+ 禁止搜索实现源码、调用 Python 内部函数或手工重新拼包。
41
+ 3. 只有旧归档没有 ZIP/回执时,调用公开命令重新生成并上传;`harness-archive`
42
+ 的 finalize 正常情况下会生成确定性 ZIP,并调用:
37
43
 
38
44
  ```powershell
39
45
  powershell.exe -Command "npx hunter-harness archive upload --file '<archive.zip>' --change-key '<change-key>' --yes --non-interactive --json"
40
46
  ```
41
47
 
42
- 2. 检查响应中的包哈希、服务端保存状态和 `knowledge_status`。
43
- 3. 只有服务端确认原 ZIP 已持久保存且知识状态为 ready,才删除本地待上传 ZIP。
44
- 4. 上传或 ingest 失败时保留 ZIP 与失败收据;修复连接后重试同一个 ZIP,不重新拼散文件。
48
+ 4. 检查响应中的包哈希、服务端保存状态和 `knowledge_status`。
49
+ 5. 只有服务端确认原 ZIP 已持久保存且知识状态为 ready,才删除本地待上传 ZIP。
50
+ 6. 上传或 ingest 失败时保留 ZIP 与失败收据;修复连接后重试同一个 ZIP,不重新拼散文件。
45
51
 
46
52
  ## Ownership Rules
47
53
 
@@ -8,7 +8,7 @@ disallowed-tools:
8
8
  - Bash(git *)
9
9
  - Bash(curl *)
10
10
  ---
11
- <!-- generated by harness_deploy.py; core=d8689a8d7aa28b09; overlay=none; agent=claude-code; do not edit -->
11
+ <!-- generated by harness_deploy.py; core=7f28abc4c54931cd; overlay=none; agent=claude-code; do not edit -->
12
12
  # harness-knowledge-query
13
13
 
14
14
  项目知识以 Hunter Platform 的服务端索引为唯一真源。客户端只提交查询并消费结果:
@@ -21,7 +21,7 @@ disallowed-tools:
21
21
  - Bash(awk *)
22
22
  - Bash(curl *)
23
23
  ---
24
- <!-- generated by harness_deploy.py; core=d8689a8d7aa28b09; overlay=none; agent=claude-code; do not edit -->
24
+ <!-- generated by harness_deploy.py; core=7f28abc4c54931cd; overlay=none; agent=claude-code; do not edit -->
25
25
  # harness-plan — 需求规划
26
26
 
27
27
  ## Purpose
@@ -22,7 +22,7 @@ disallowed-tools:
22
22
  - Bash(curl *)
23
23
  - Bash(codegraph *)
24
24
  ---
25
- <!-- generated by harness_deploy.py; core=d8689a8d7aa28b09; overlay=none; agent=claude-code; do not edit -->
25
+ <!-- generated by harness_deploy.py; core=7f28abc4c54931cd; overlay=none; agent=claude-code; do not edit -->
26
26
  # harness-review — 代码审查
27
27
 
28
28
  ## Purpose
@@ -22,7 +22,7 @@ disallowed-tools:
22
22
  - Bash(curl *)
23
23
  - Bash(codegraph *)
24
24
  ---
25
- <!-- generated by harness_deploy.py; core=d8689a8d7aa28b09; overlay=none; agent=claude-code; do not edit -->
25
+ <!-- generated by harness_deploy.py; core=7f28abc4c54931cd; overlay=none; agent=claude-code; do not edit -->
26
26
  # harness-run — 需求编码
27
27
 
28
28
  ## Purpose
@@ -78,7 +78,7 @@ disallowed-tools:
78
78
 
79
79
  ## Workflow 概要
80
80
 
81
- 0. 加载上下文:普通 Run 先 `harness_context.py prepare --phase run --executor <tool> [--change <id>] --json`,再 **`harness_context.py begin --phase run --change <id> --executor <tool> --json`** 校验交接,最后运行 **`harness_gate.py begin --phase run --change <id>`**。`--fixback` 不得拼装这些底层步骤,必须只调用一次 `harness_fixback.py launch-review --project . --change <id> --change-dir <change-dir> --executor <tool> --skills-root <skills-root> --product-identity <当前产品身份> --json`:该命令会先筛选结构化评审项,再原子选择 Fixback 分支、确认上下文、取得 Run 门禁并创建已填充批次。返回 `FIXBACK_NOTHING_TO_APPLY` 时直接报告“本轮评审没有需要执行的代码修复”并停止;返回阻塞码时按 `recoveryAction` 停止,不搜索实现、不试探其他参数、不创建空批次。禁止手写 `events.ndjson` / `phase.end`。已连接平台时 begin 会 best-effort 补传事件,失败只告警。
81
+ 0. 加载上下文:普通 Run 先 `harness_context.py prepare --phase run --executor <tool> [--change <id>] --json`,再 **`harness_context.py begin --phase run --change <id> --executor <tool> --json`** 校验交接,最后运行 **`harness_gate.py begin --phase run --change <id>`**。`harness_gate.py` 会从当前已安装适配器自动识别 skills root;只有执行复制到别处的脚本时才显式传 `--skills-root`。`--fixback` 不得拼装这些底层步骤,必须只调用一次 `harness_fixback.py launch-review --project . --change <id> --change-dir <change-dir> --executor <tool> --skills-root <skills-root> --product-identity <当前产品身份> --json`:该命令会先筛选结构化评审项,再原子选择 Fixback 分支、确认上下文、取得 Run 门禁并创建已填充批次。返回 `FIXBACK_NOTHING_TO_APPLY` 时直接报告“本轮评审没有需要执行的代码修复”并停止;返回阻塞码时按 `recoveryAction` 停止,不搜索实现、不试探其他参数、不创建空批次。禁止手写 `events.ndjson` / `phase.end`。已连接平台时 begin 会 best-effort 补传事件,失败只告警。
82
82
  0.5. **测试基础设施探测**(先写 `CHECKING`,四项证据齐备后再结论)→ `reference.md` Step 0.5;测试基线已由上一步 gate begin 内部建立,不得再次执行 guard begin
83
83
  1. **变更簇 TDD** — `protocols.md` `run-tdd-protocol`;批量 RED/GREEN;按需 `change-cluster-review-protocol`(高风险 + reviewer 预检可用)
84
84
  2. 构建验证 + **仅**通过 `harness_ledger.py record` 写 ledger(禁止 Write/Edit `verification-ledger.json`);若本阶段创建/删除了清单、锁文件、源码根或改变技术栈,最后一次产品编辑后、写账本与关门前必须执行 `harness_preflight.py detect --project . --json` 刷新 build profile。`record --project . --profile-input <key>` 会对缺失/陈旧 profile 自动检测并从同一 target 推导 scope、coverage、规范命令和输入闭包;不得再手填另一套身份。`diff-hash --change-dir` 纳入 ignored tests → `reference.md` Step 2c
@@ -21,7 +21,7 @@ disallowed-tools:
21
21
  - Bash(awk *)
22
22
  - Bash(curl *)
23
23
  ---
24
- <!-- generated by harness_deploy.py; core=d8689a8d7aa28b09; overlay=none; agent=claude-code; do not edit -->
24
+ <!-- generated by harness_deploy.py; core=7f28abc4c54931cd; overlay=none; agent=claude-code; do not edit -->
25
25
  # harness-submit — 最终提交(含 worktree 合并)
26
26
 
27
27
  ## Purpose
@@ -72,7 +72,7 @@ worktree 合并前必须运行 `harness_change.py integration-lock acquire --run
72
72
 
73
73
  ### 提交流程(步骤 0–7)
74
74
 
75
- 0. **启动准备** — `harness_context.py prepare --phase submit --executor <tool> [--change <id>] --json` 确定唯一变更与 executionRoot;`harness_context.py begin --phase submit --change <id> --executor <tool> --json` 校验 review→submit receipt;**`harness_gate.py begin --phase submit --change <id>`**;读 ledger,以 `harness_ledger.py diff-hash --repo . --base <baseCommit> --change-dir ".harness/changes/<change-name>" --json` 计算 diffHash + post-test 7 类分类(禁止手写 ledger / 手工 phase.end)
75
+ 0. **启动准备** — `harness_context.py prepare --phase submit --executor <tool> [--change <id>] --json` 确定唯一变更与 executionRoot;`harness_context.py begin --phase submit --change <id> --executor <tool> --json` 校验 review→submit receipt;**`harness_gate.py begin --phase submit --change <id>`**;读 ledger,以 `harness_ledger.py diff-hash --repo <executionRoot> --base <baseCommit> --change-dir ".harness/changes/<change-name>" --json` 计算 diffHash + post-test 7 类分类(`executionRoot` 必须直接取准备回执;禁止手写 ledger / 手工 phase.end)
76
76
  1. **合并最新代码** — 主目录与 worktree 均**不在业务工作区 stash/pull**;远端同步由合并段 integration transaction 在隔离 integration worktree 内完成(见「worktree 合并流程」);**正常路径禁止 `git stash` / `stash pop`**
77
77
  2. **最终验证** — ledger 复用优先;提交前只调用 `can-reuse --project . --profile-input unitTestFull --command <profile 规范命令>`。不得传入另一套 `--files`,不得把 runner 包装说明写进 `command`。`reuse=true` 时禁止重跑;只有真实输入、依赖、工具链或环境身份变化时才执行一次同一 profile 验证,并只登记一条结果。不要读取 ledger/archive 实现源码或临时编写散列脚本排查参数。
78
78
  - 无远端 CI 且 gate-policy 未强制 remote provider 时,验证通过/复用后运行 `harness_archive.py certify-local --change-dir ... --project . --json`,从同一 ledger 生成 `local-reproducible` 产品候选收据;该命令不执行测试。
@@ -19,7 +19,7 @@ disallowed-tools:
19
19
  - Bash(awk *)
20
20
  - Bash(curl *)
21
21
  ---
22
- <!-- generated by harness_deploy.py; core=d8689a8d7aa28b09; overlay=none; agent=claude-code; do not edit -->
22
+ <!-- generated by harness_deploy.py; core=7f28abc4c54931cd; overlay=none; agent=claude-code; do not edit -->
23
23
  # harness-sync
24
24
 
25
25
  ## Purpose
@@ -23,7 +23,7 @@ disallowed-tools:
23
23
  - Bash(node *)
24
24
  - Bash(codegraph *)
25
25
  ---
26
- <!-- generated by harness_deploy.py; core=d8689a8d7aa28b09; overlay=none; agent=claude-code; do not edit -->
26
+ <!-- generated by harness_deploy.py; core=7f28abc4c54931cd; overlay=none; agent=claude-code; do not edit -->
27
27
  # harness-test — 测试执行
28
28
 
29
29
  ## Purpose