@hunter-harness/workflow-harness 0.2.16 → 0.2.17

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 (234) hide show
  1. package/harness/bundles/general/claude-code/.harness-build.json +1 -1
  2. package/harness/bundles/general/claude-code/CONTEXT.md +14 -1
  3. package/harness/bundles/general/claude-code/README.md +1 -1
  4. package/harness/bundles/general/claude-code/harness-archive/SKILL.md +7 -4
  5. package/harness/bundles/general/claude-code/harness-archive/reference.md +1 -1
  6. package/harness/bundles/general/claude-code/harness-codebase-map/SKILL.md +4 -2
  7. package/harness/bundles/general/claude-code/harness-knowledge-ingest/SKILL.md +4 -2
  8. package/harness/bundles/general/claude-code/harness-knowledge-query/SKILL.md +4 -2
  9. package/harness/bundles/general/claude-code/harness-plan/SKILL.md +8 -4
  10. package/harness/bundles/general/claude-code/harness-plan/checklist.md +5 -5
  11. package/harness/bundles/general/claude-code/harness-review/SKILL.md +5 -2
  12. package/harness/bundles/general/claude-code/harness-run/SKILL.md +7 -3
  13. package/harness/bundles/general/claude-code/harness-run/checklist.md +4 -4
  14. package/harness/bundles/general/claude-code/harness-submit/SKILL.md +6 -3
  15. package/harness/bundles/general/claude-code/harness-submit/checklist.md +5 -5
  16. package/harness/bundles/general/claude-code/harness-submit/reference.md +3 -3
  17. package/harness/bundles/general/claude-code/harness-sync/SKILL.md +4 -2
  18. package/harness/bundles/general/claude-code/harness-sync/reference.md +1 -1
  19. package/harness/bundles/general/claude-code/harness-test/SKILL.md +7 -4
  20. package/harness/bundles/general/claude-code/harness-test/checklist.md +8 -5
  21. package/harness/bundles/general/claude-code/harness-test/pitfalls.md +1 -1
  22. package/harness/bundles/general/claude-code/harness-test/reference.md +28 -13
  23. package/harness/bundles/general/claude-code/protocols/submit-protocol.md +1 -1
  24. package/harness/bundles/general/claude-code/scripts/harness_deploy.py +7 -0
  25. package/harness/bundles/general/claude-code/scripts/harness_integration.py +26 -2
  26. package/harness/bundles/general/claude-code/scripts/harness_plan_finalize.py +159 -7
  27. package/harness/bundles/general/claude-code/scripts/harness_test_cleanup.py +175 -0
  28. package/harness/bundles/general/codebuddy/.harness-build.json +1 -1
  29. package/harness/bundles/general/codebuddy/CONTEXT.md +14 -1
  30. package/harness/bundles/general/codebuddy/README.md +1 -1
  31. package/harness/bundles/general/codebuddy/harness-archive/SKILL.md +7 -4
  32. package/harness/bundles/general/codebuddy/harness-archive/reference.md +1 -1
  33. package/harness/bundles/general/codebuddy/harness-codebase-map/SKILL.md +4 -2
  34. package/harness/bundles/general/codebuddy/harness-knowledge-ingest/SKILL.md +4 -2
  35. package/harness/bundles/general/codebuddy/harness-knowledge-query/SKILL.md +4 -2
  36. package/harness/bundles/general/codebuddy/harness-plan/SKILL.md +8 -4
  37. package/harness/bundles/general/codebuddy/harness-plan/checklist.md +5 -5
  38. package/harness/bundles/general/codebuddy/harness-review/SKILL.md +5 -2
  39. package/harness/bundles/general/codebuddy/harness-run/SKILL.md +7 -3
  40. package/harness/bundles/general/codebuddy/harness-run/checklist.md +4 -4
  41. package/harness/bundles/general/codebuddy/harness-submit/SKILL.md +6 -3
  42. package/harness/bundles/general/codebuddy/harness-submit/checklist.md +5 -5
  43. package/harness/bundles/general/codebuddy/harness-submit/reference.md +3 -3
  44. package/harness/bundles/general/codebuddy/harness-sync/SKILL.md +4 -2
  45. package/harness/bundles/general/codebuddy/harness-sync/reference.md +1 -1
  46. package/harness/bundles/general/codebuddy/harness-test/SKILL.md +7 -4
  47. package/harness/bundles/general/codebuddy/harness-test/checklist.md +8 -5
  48. package/harness/bundles/general/codebuddy/harness-test/pitfalls.md +1 -1
  49. package/harness/bundles/general/codebuddy/harness-test/reference.md +28 -13
  50. package/harness/bundles/general/codebuddy/protocols/submit-protocol.md +1 -1
  51. package/harness/bundles/general/codebuddy/scripts/harness_deploy.py +7 -0
  52. package/harness/bundles/general/codebuddy/scripts/harness_integration.py +26 -2
  53. package/harness/bundles/general/codebuddy/scripts/harness_plan_finalize.py +159 -7
  54. package/harness/bundles/general/codebuddy/scripts/harness_test_cleanup.py +175 -0
  55. package/harness/bundles/general/codex/.harness-build.json +1 -1
  56. package/harness/bundles/general/codex/CONTEXT.md +14 -1
  57. package/harness/bundles/general/codex/README.md +1 -1
  58. package/harness/bundles/general/codex/harness-archive/SKILL.md +7 -4
  59. package/harness/bundles/general/codex/harness-archive/reference.md +1 -1
  60. package/harness/bundles/general/codex/harness-codebase-map/SKILL.md +4 -2
  61. package/harness/bundles/general/codex/harness-knowledge-ingest/SKILL.md +4 -2
  62. package/harness/bundles/general/codex/harness-knowledge-query/SKILL.md +4 -2
  63. package/harness/bundles/general/codex/harness-plan/SKILL.md +8 -4
  64. package/harness/bundles/general/codex/harness-plan/checklist.md +5 -5
  65. package/harness/bundles/general/codex/harness-review/SKILL.md +5 -2
  66. package/harness/bundles/general/codex/harness-run/SKILL.md +7 -3
  67. package/harness/bundles/general/codex/harness-run/checklist.md +4 -4
  68. package/harness/bundles/general/codex/harness-submit/SKILL.md +6 -3
  69. package/harness/bundles/general/codex/harness-submit/checklist.md +5 -5
  70. package/harness/bundles/general/codex/harness-submit/reference.md +3 -3
  71. package/harness/bundles/general/codex/harness-sync/SKILL.md +4 -2
  72. package/harness/bundles/general/codex/harness-sync/reference.md +1 -1
  73. package/harness/bundles/general/codex/harness-test/SKILL.md +7 -4
  74. package/harness/bundles/general/codex/harness-test/checklist.md +8 -5
  75. package/harness/bundles/general/codex/harness-test/pitfalls.md +1 -1
  76. package/harness/bundles/general/codex/harness-test/reference.md +28 -13
  77. package/harness/bundles/general/codex/protocols/submit-protocol.md +1 -1
  78. package/harness/bundles/general/codex/scripts/harness_deploy.py +7 -0
  79. package/harness/bundles/general/codex/scripts/harness_integration.py +26 -2
  80. package/harness/bundles/general/codex/scripts/harness_plan_finalize.py +159 -7
  81. package/harness/bundles/general/codex/scripts/harness_test_cleanup.py +175 -0
  82. package/harness/bundles/general/cursor/.harness-build.json +1 -1
  83. package/harness/bundles/general/cursor/CONTEXT.md +14 -1
  84. package/harness/bundles/general/cursor/README.md +1 -1
  85. package/harness/bundles/general/cursor/harness-archive/SKILL.md +7 -4
  86. package/harness/bundles/general/cursor/harness-archive/reference.md +1 -1
  87. package/harness/bundles/general/cursor/harness-codebase-map/SKILL.md +4 -2
  88. package/harness/bundles/general/cursor/harness-knowledge-ingest/SKILL.md +4 -2
  89. package/harness/bundles/general/cursor/harness-knowledge-query/SKILL.md +4 -2
  90. package/harness/bundles/general/cursor/harness-plan/SKILL.md +8 -4
  91. package/harness/bundles/general/cursor/harness-plan/checklist.md +5 -5
  92. package/harness/bundles/general/cursor/harness-review/SKILL.md +5 -2
  93. package/harness/bundles/general/cursor/harness-run/SKILL.md +7 -3
  94. package/harness/bundles/general/cursor/harness-run/checklist.md +4 -4
  95. package/harness/bundles/general/cursor/harness-submit/SKILL.md +6 -3
  96. package/harness/bundles/general/cursor/harness-submit/checklist.md +5 -5
  97. package/harness/bundles/general/cursor/harness-submit/reference.md +3 -3
  98. package/harness/bundles/general/cursor/harness-sync/SKILL.md +4 -2
  99. package/harness/bundles/general/cursor/harness-sync/reference.md +1 -1
  100. package/harness/bundles/general/cursor/harness-test/SKILL.md +7 -4
  101. package/harness/bundles/general/cursor/harness-test/checklist.md +8 -5
  102. package/harness/bundles/general/cursor/harness-test/pitfalls.md +1 -1
  103. package/harness/bundles/general/cursor/harness-test/reference.md +28 -13
  104. package/harness/bundles/general/cursor/protocols/submit-protocol.md +1 -1
  105. package/harness/bundles/general/cursor/scripts/harness_deploy.py +7 -0
  106. package/harness/bundles/general/cursor/scripts/harness_integration.py +26 -2
  107. package/harness/bundles/general/cursor/scripts/harness_plan_finalize.py +159 -7
  108. package/harness/bundles/general/cursor/scripts/harness_test_cleanup.py +175 -0
  109. package/harness/bundles/java/claude-code/.harness-build.json +1 -1
  110. package/harness/bundles/java/claude-code/CONTEXT.md +14 -1
  111. package/harness/bundles/java/claude-code/README.md +1 -1
  112. package/harness/bundles/java/claude-code/harness-apidoc/SKILL.md +5 -2
  113. package/harness/bundles/java/claude-code/harness-archive/SKILL.md +7 -4
  114. package/harness/bundles/java/claude-code/harness-archive/reference.md +1 -1
  115. package/harness/bundles/java/claude-code/harness-codebase-map/SKILL.md +4 -2
  116. package/harness/bundles/java/claude-code/harness-knowledge-ingest/SKILL.md +4 -2
  117. package/harness/bundles/java/claude-code/harness-knowledge-query/SKILL.md +4 -2
  118. package/harness/bundles/java/claude-code/harness-package/SKILL.md +5 -2
  119. package/harness/bundles/java/claude-code/harness-package/checklist.md +4 -4
  120. package/harness/bundles/java/claude-code/harness-plan/SKILL.md +8 -4
  121. package/harness/bundles/java/claude-code/harness-plan/checklist.md +5 -5
  122. package/harness/bundles/java/claude-code/harness-review/SKILL.md +5 -2
  123. package/harness/bundles/java/claude-code/harness-run/SKILL.md +7 -3
  124. package/harness/bundles/java/claude-code/harness-run/checklist.md +4 -4
  125. package/harness/bundles/java/claude-code/harness-submit/SKILL.md +6 -3
  126. package/harness/bundles/java/claude-code/harness-submit/checklist.md +5 -5
  127. package/harness/bundles/java/claude-code/harness-submit/reference.md +3 -3
  128. package/harness/bundles/java/claude-code/harness-sync/SKILL.md +4 -2
  129. package/harness/bundles/java/claude-code/harness-sync/reference.md +1 -1
  130. package/harness/bundles/java/claude-code/harness-test/SKILL.md +8 -5
  131. package/harness/bundles/java/claude-code/harness-test/pitfalls.md +1 -1
  132. package/harness/bundles/java/claude-code/harness-test/reference.md +1 -1
  133. package/harness/bundles/java/claude-code/protocols/submit-protocol.md +1 -1
  134. package/harness/bundles/java/claude-code/scripts/harness_deploy.py +7 -0
  135. package/harness/bundles/java/claude-code/scripts/harness_integration.py +26 -2
  136. package/harness/bundles/java/claude-code/scripts/harness_plan_finalize.py +159 -7
  137. package/harness/bundles/java/claude-code/scripts/harness_test_cleanup.py +175 -0
  138. package/harness/bundles/java/codebuddy/.harness-build.json +1 -1
  139. package/harness/bundles/java/codebuddy/CONTEXT.md +14 -1
  140. package/harness/bundles/java/codebuddy/README.md +1 -1
  141. package/harness/bundles/java/codebuddy/harness-apidoc/SKILL.md +5 -2
  142. package/harness/bundles/java/codebuddy/harness-archive/SKILL.md +7 -4
  143. package/harness/bundles/java/codebuddy/harness-archive/reference.md +1 -1
  144. package/harness/bundles/java/codebuddy/harness-codebase-map/SKILL.md +4 -2
  145. package/harness/bundles/java/codebuddy/harness-knowledge-ingest/SKILL.md +4 -2
  146. package/harness/bundles/java/codebuddy/harness-knowledge-query/SKILL.md +4 -2
  147. package/harness/bundles/java/codebuddy/harness-package/SKILL.md +5 -2
  148. package/harness/bundles/java/codebuddy/harness-package/checklist.md +4 -4
  149. package/harness/bundles/java/codebuddy/harness-plan/SKILL.md +8 -4
  150. package/harness/bundles/java/codebuddy/harness-plan/checklist.md +5 -5
  151. package/harness/bundles/java/codebuddy/harness-review/SKILL.md +5 -2
  152. package/harness/bundles/java/codebuddy/harness-run/SKILL.md +7 -3
  153. package/harness/bundles/java/codebuddy/harness-run/checklist.md +4 -4
  154. package/harness/bundles/java/codebuddy/harness-submit/SKILL.md +6 -3
  155. package/harness/bundles/java/codebuddy/harness-submit/checklist.md +5 -5
  156. package/harness/bundles/java/codebuddy/harness-submit/reference.md +3 -3
  157. package/harness/bundles/java/codebuddy/harness-sync/SKILL.md +4 -2
  158. package/harness/bundles/java/codebuddy/harness-sync/reference.md +1 -1
  159. package/harness/bundles/java/codebuddy/harness-test/SKILL.md +8 -5
  160. package/harness/bundles/java/codebuddy/harness-test/pitfalls.md +1 -1
  161. package/harness/bundles/java/codebuddy/harness-test/reference.md +1 -1
  162. package/harness/bundles/java/codebuddy/protocols/submit-protocol.md +1 -1
  163. package/harness/bundles/java/codebuddy/scripts/harness_deploy.py +7 -0
  164. package/harness/bundles/java/codebuddy/scripts/harness_integration.py +26 -2
  165. package/harness/bundles/java/codebuddy/scripts/harness_plan_finalize.py +159 -7
  166. package/harness/bundles/java/codebuddy/scripts/harness_test_cleanup.py +175 -0
  167. package/harness/bundles/java/codex/.harness-build.json +1 -1
  168. package/harness/bundles/java/codex/CONTEXT.md +14 -1
  169. package/harness/bundles/java/codex/README.md +1 -1
  170. package/harness/bundles/java/codex/harness-apidoc/SKILL.md +5 -2
  171. package/harness/bundles/java/codex/harness-archive/SKILL.md +7 -4
  172. package/harness/bundles/java/codex/harness-archive/reference.md +1 -1
  173. package/harness/bundles/java/codex/harness-codebase-map/SKILL.md +4 -2
  174. package/harness/bundles/java/codex/harness-knowledge-ingest/SKILL.md +4 -2
  175. package/harness/bundles/java/codex/harness-knowledge-query/SKILL.md +4 -2
  176. package/harness/bundles/java/codex/harness-package/SKILL.md +5 -2
  177. package/harness/bundles/java/codex/harness-package/checklist.md +4 -4
  178. package/harness/bundles/java/codex/harness-plan/SKILL.md +8 -4
  179. package/harness/bundles/java/codex/harness-plan/checklist.md +5 -5
  180. package/harness/bundles/java/codex/harness-review/SKILL.md +5 -2
  181. package/harness/bundles/java/codex/harness-run/SKILL.md +7 -3
  182. package/harness/bundles/java/codex/harness-run/checklist.md +4 -4
  183. package/harness/bundles/java/codex/harness-submit/SKILL.md +6 -3
  184. package/harness/bundles/java/codex/harness-submit/checklist.md +5 -5
  185. package/harness/bundles/java/codex/harness-submit/reference.md +3 -3
  186. package/harness/bundles/java/codex/harness-sync/SKILL.md +4 -2
  187. package/harness/bundles/java/codex/harness-sync/reference.md +1 -1
  188. package/harness/bundles/java/codex/harness-test/SKILL.md +8 -5
  189. package/harness/bundles/java/codex/harness-test/pitfalls.md +1 -1
  190. package/harness/bundles/java/codex/harness-test/reference.md +1 -1
  191. package/harness/bundles/java/codex/protocols/submit-protocol.md +1 -1
  192. package/harness/bundles/java/codex/scripts/harness_deploy.py +7 -0
  193. package/harness/bundles/java/codex/scripts/harness_integration.py +26 -2
  194. package/harness/bundles/java/codex/scripts/harness_plan_finalize.py +159 -7
  195. package/harness/bundles/java/codex/scripts/harness_test_cleanup.py +175 -0
  196. package/harness/bundles/java/cursor/.harness-build.json +1 -1
  197. package/harness/bundles/java/cursor/CONTEXT.md +14 -1
  198. package/harness/bundles/java/cursor/README.md +1 -1
  199. package/harness/bundles/java/cursor/harness-apidoc/SKILL.md +5 -2
  200. package/harness/bundles/java/cursor/harness-archive/SKILL.md +7 -4
  201. package/harness/bundles/java/cursor/harness-archive/reference.md +1 -1
  202. package/harness/bundles/java/cursor/harness-codebase-map/SKILL.md +4 -2
  203. package/harness/bundles/java/cursor/harness-knowledge-ingest/SKILL.md +4 -2
  204. package/harness/bundles/java/cursor/harness-knowledge-query/SKILL.md +4 -2
  205. package/harness/bundles/java/cursor/harness-package/SKILL.md +5 -2
  206. package/harness/bundles/java/cursor/harness-package/checklist.md +4 -4
  207. package/harness/bundles/java/cursor/harness-plan/SKILL.md +8 -4
  208. package/harness/bundles/java/cursor/harness-plan/checklist.md +5 -5
  209. package/harness/bundles/java/cursor/harness-review/SKILL.md +5 -2
  210. package/harness/bundles/java/cursor/harness-run/SKILL.md +7 -3
  211. package/harness/bundles/java/cursor/harness-run/checklist.md +4 -4
  212. package/harness/bundles/java/cursor/harness-submit/SKILL.md +6 -3
  213. package/harness/bundles/java/cursor/harness-submit/checklist.md +5 -5
  214. package/harness/bundles/java/cursor/harness-submit/reference.md +3 -3
  215. package/harness/bundles/java/cursor/harness-sync/SKILL.md +4 -2
  216. package/harness/bundles/java/cursor/harness-sync/reference.md +1 -1
  217. package/harness/bundles/java/cursor/harness-test/SKILL.md +8 -5
  218. package/harness/bundles/java/cursor/harness-test/pitfalls.md +1 -1
  219. package/harness/bundles/java/cursor/harness-test/reference.md +1 -1
  220. package/harness/bundles/java/cursor/protocols/submit-protocol.md +1 -1
  221. package/harness/bundles/java/cursor/scripts/harness_deploy.py +7 -0
  222. package/harness/bundles/java/cursor/scripts/harness_integration.py +26 -2
  223. package/harness/bundles/java/cursor/scripts/harness_plan_finalize.py +159 -7
  224. package/harness/bundles/java/cursor/scripts/harness_test_cleanup.py +175 -0
  225. package/harness/manifests/general/claude-code.json +31 -27
  226. package/harness/manifests/general/codebuddy.json +31 -27
  227. package/harness/manifests/general/codex.json +31 -27
  228. package/harness/manifests/general/cursor.json +31 -27
  229. package/harness/manifests/java/claude-code.json +33 -29
  230. package/harness/manifests/java/codebuddy.json +33 -29
  231. package/harness/manifests/java/codex.json +33 -29
  232. package/harness/manifests/java/cursor.json +33 -29
  233. package/hunter-workflow-family.json +2 -2
  234. package/package.json +1 -1
@@ -2,5 +2,5 @@
2
2
  "schemaVersion": 1,
3
3
  "overlay": "none",
4
4
  "agent": "claude-code",
5
- "coreHash": "21a7451404d2c0ff"
5
+ "coreHash": "d5b51ad56d4d4535"
6
6
  }
@@ -53,9 +53,22 @@ _Avoid_: 仅凭 diffHash 复用, 无证据跳过
53
53
  _Avoid_: 每轮测试后必杀服务
54
54
 
55
55
  **交互白名单**:
56
- 每个 skill 显式声明的允许 AskUserQuestion 场景清单。白名单外一律取默认值并记 decision 事件。
56
+ 每个 skill 显式声明的允许 `blocking user confirmation` 场景清单。白名单外一律取默认值并记 decision 事件。
57
57
  _Avoid_: 逐决策点询问
58
58
 
59
+ **阻断式用户确认(blocking user confirmation)**:
60
+ 宿主无关的审批原语。canonical skill 使用此术语表达"展示完整审批包并等待明确答复"的语义,不绑定具体宿主工具。adapter 按下表映射到宿主具体工具:
61
+
62
+ | Adapter | 工具 |
63
+ |---------|------|
64
+ | claude-code | AskUserQuestion |
65
+ | codebuddy | AskUserQuestion |
66
+ | codex | request_user_input 或普通对话 |
67
+ | cursor | 普通对话 |
68
+
69
+ finalizer 只校验 approval receipt/decision 的顺序和内容,不校验交互工具品牌。
70
+ _Avoid_: 硬编码宿主工具名, 跨宿主不可移植
71
+
59
72
  **部署合成**:
60
73
  `harness_deploy.py build` 把通用核心 + shared 片段 + overlay 合成为自包含 SKILL.md 后部署。Vault 源头 DRY,运行时单文件。
61
74
  _Avoid_: 运行时跨文件拼规则, fork 维护
@@ -59,7 +59,7 @@
59
59
  | harness-knowledge-query | `[Bash(powershell.exe:*), Read, Write, Edit, Glob, Grep]` | 同上 |
60
60
  | harness-knowledge-ingest | `[Bash(powershell.exe:*), Read, Write, Edit, Glob, Grep]` | 同上 |
61
61
 
62
- > **AskUserQuestion 不预批准**:各 skill 需要向用户确认时通过普通权限提示调用 `AskUserQuestion`,不在 `allowed-tools` 中预批准(遵循 skill-optimizer 规则)。`harness-codebase-map` 额外预批准 `Agent` 用于派发并行 mapper。
62
+ > **blocking user confirmation 不预批准**:各 skill 需要向用户确认时通过普通权限提示调用 `blocking user confirmation`(adapter 映射到 `AskUserQuestion`/`request_user_input`/普通对话),不在 `allowed-tools` 中预批准(遵循 skill-optimizer 规则)。`harness-codebase-map` 额外预批准 `Agent` 用于派发并行 mapper。
63
63
 
64
64
  > **codegraph 命令**:原 `Bash(codegraph *)` 改为 MCP 工具调用(`mcp__codegraph__codegraph_explore` 等),不再通过 Bash。
65
65
  >
@@ -20,7 +20,7 @@ disallowed-tools:
20
20
  - Bash(awk *)
21
21
  - Bash(curl *)
22
22
  ---
23
- <!-- generated by harness_deploy.py; core=21a7451404d2c0ff; overlay=none; agent=claude-code; do not edit -->
23
+ <!-- generated by harness_deploy.py; core=d5b51ad56d4d4535; overlay=none; agent=claude-code; do not edit -->
24
24
  # harness-archive — 变更归档
25
25
 
26
26
  ## Purpose
@@ -69,6 +69,7 @@ disallowed-tools:
69
69
  9. **每个 skill 边界只刷新一次状态快照** — 先运行 `python <skills-root>/scripts/harness_state.py capture --project . --change-dir ".harness/changes/<change-name>" --base <baseCommit> --json`;`changedSegments=[]` 时复用已有 profile/rules/map/knowledge/change/code 指纹,不再重复跑全量 `harness-sync`、知识重建或代码库扫描。只有对应 segment 变化或缺失时才定向刷新;快照不能替代源码读取和验证门禁。
70
70
 
71
71
  状态目录分层:新路径优先,旧路径兼容 → [[../protocols/state-layout-protocol.md|state-layout-protocol]]
72
+ > 片段:read-protocol
72
73
 
73
74
  ## Workflow
74
75
 
@@ -96,7 +97,7 @@ disallowed-tools:
96
97
 
97
98
  ### Phase 2:确认归档 ⚠️ 强制阻断
98
99
 
99
- AskUserQuestion 让用户确认归档操作。**用户拒绝 → 终止流程,不执行任何操作。**
100
+ blocking user confirmation 让用户确认归档操作。**用户拒绝 → 终止流程,不执行任何操作。**
100
101
 
101
102
  - **Read `reference.md`** — 确认对话框的内容格式
102
103
 
@@ -121,6 +122,7 @@ AskUserQuestion 让用户确认归档操作。**用户拒绝 → 终止流程,
121
122
  - 命令结果不得靠猜测;普通 Bash 被拒 → 立即改用等价 PowerShell 重试一次
122
123
  - 仅 PowerShell 成功且有明确证据(构建/git/测试输出、文件存在、exit 0)时可标 ✅OK;否则 ❌FAIL 或 🟡WARN
123
124
  - 禁止把 hook 拒绝、静态验证、无输出、用户跳过说成成功 → 详见 [[../protocols/powershell-protocol.md|powershell-protocol]]、[[../protocols/evidence-based-reporting-protocol.md|evidence-based-reporting-protocol]]
125
+ > 片段:p0-trust
124
126
 
125
127
  ## 关键规则(硬门禁速查)
126
128
 
@@ -132,7 +134,7 @@ AskUserQuestion 让用户确认归档操作。**用户拒绝 → 终止流程,
132
134
 
133
135
  ### 二、归档前确认是强制阻断检查点
134
136
 
135
- AskUserQuestion 确认;用户拒绝 → 终止,不执行任何操作。
137
+ blocking user confirmation 确认;用户拒绝 → 终止,不执行任何操作。
136
138
 
137
139
  ### 三、文件移动只用内置工具或 PowerShell
138
140
 
@@ -201,7 +203,7 @@ git 命令通过 `powershell.exe -Command "..."` 执行;archive-meta.md 和 fi
201
203
 
202
204
  ## 交互白名单
203
205
 
204
- **仅允许**归档确认(Phase 2 AskUserQuestion);拒绝 → 终止,不执行任何移动。
206
+ **仅允许**归档确认(Phase 2 blocking user confirmation);拒绝 → 终止,不执行任何移动。
205
207
 
206
208
  ## 执行日志
207
209
 
@@ -216,3 +218,4 @@ python <skills-root>/scripts/harness_events.py append --change-dir ".harness/cha
216
218
  > **Task 4 §6.1 写入契约**:普通 `append` = 加锁 -> 追加一行 -> fsync -> 解锁,**不 load 历史、不渲染**(O(1),跨进程锁 `events.ndjson.lock`,UUID 用完整 `uuid4().hex` 无需去重扫描)。仅 `--type phase.end` append 在追加成功后渲染一次 `execution-log.md`;显式 `harness_events.py render` 随时从完整 events 重建;`harness_archive.py finalize` 在 collect 前强制 render 一次。高频 command append 期间 log 可能滞后,phase 边界保持最新。
217
219
 
218
220
  每次阶段结束必须写 `--status OK|WARN|FAIL|BLOCKED`;重试同一阶段时增加 `--attempt <n>`,不得覆盖或伪装成一次执行。跨工具继续执行时写 `--executor-tool <codex|claude-code|codebuddy|cursor>`,并在接棒事件写 `--handoff-from-tool` / `--handoff-reason`;也可由 `HUNTER_HARNESS_TOOL/AGENT/MODEL/RUN_ID` 环境变量统一注入。
221
+ > 片段:logging · phase=`archive`
@@ -8,7 +8,7 @@ description: harness-archive 的归档流程、manifest、summary-data、final-s
8
8
 
9
9
  - **Phase 0 读取上下文**:读 SKILL.md / 本文件 / 共用协议(`../protocols/archive-report-protocol.md`、`../protocols/report-pipeline-protocol.md`、`../protocols/state-layout-protocol.md`、`../protocols/powershell-protocol.md`、`../protocols/sensitive-info-protocol.md`、`../protocols/evidence-based-reporting-protocol.md`)/ 解析 `$ARGUMENTS`。
10
10
  - **Phase 1 确认归档对象**:Glob `.harness/changes/*/plans/*-plan.md`(排除 archive),展示概要;多变更让用户选择或终止。
11
- - **Phase 2 确认归档(强制阻断)**:AskUserQuestion 确认,拒绝即终止。
11
+ - **Phase 2 确认归档(强制阻断)**:blocking user confirmation 确认,拒绝即终止。
12
12
  - **Phase 3 执行归档**:
13
13
  1. 运行 `python <skills-root>/scripts/harness_archive.py status --change-dir ... --json` 做前置检查。
14
14
  2. `meta/archive-meta.md` 由 finalize 生成(与 summary `finalStatus` 同源);禁止手写。维护者结论写入 events 即可。finalize 在 before-manifest 前执行 cleanup(删除 lock/pid/launcher/credential,截断超大日志)。
@@ -20,7 +20,7 @@ disallowed-tools:
20
20
  - Bash(awk *)
21
21
  - Bash(curl *)
22
22
  ---
23
- <!-- generated by harness_deploy.py; core=21a7451404d2c0ff; overlay=none; agent=claude-code; do not edit -->
23
+ <!-- generated by harness_deploy.py; core=d5b51ad56d4d4535; overlay=none; agent=claude-code; do not edit -->
24
24
  # harness-codebase-map — 代码库地图
25
25
 
26
26
  ## Purpose
@@ -73,6 +73,7 @@ disallowed-tools:
73
73
  - 命令结果不得靠猜测;普通 Bash 被拒 → 立即改用等价 PowerShell 重试一次
74
74
  - 仅 PowerShell 成功且有明确证据(构建/git/测试输出、文件存在、exit 0)时可标 ✅OK;否则 ❌FAIL 或 🟡WARN
75
75
  - 禁止把 hook 拒绝、静态验证、无输出、用户跳过说成成功 → 详见 [[../protocols/powershell-protocol.md|powershell-protocol]]、[[../protocols/evidence-based-reporting-protocol.md|evidence-based-reporting-protocol]]
76
+ > 片段:p0-trust · map 额外:文件存在/行数/hash 为证据
76
77
 
77
78
  ## 关键规则
78
79
 
@@ -98,7 +99,7 @@ disallowed-tools:
98
99
 
99
100
  ## 交互白名单
100
101
 
101
- **无** AskUserQuestion;参数/默认值 + `decision` 事件
102
+ **无** blocking user confirmation;参数/默认值 + `decision` 事件
102
103
 
103
104
  ## 执行日志
104
105
 
@@ -113,3 +114,4 @@ python <skills-root>/scripts/harness_events.py append --change-dir ".harness/cha
113
114
  > **Task 4 §6.1 写入契约**:普通 `append` = 加锁 -> 追加一行 -> fsync -> 解锁,**不 load 历史、不渲染**(O(1),跨进程锁 `events.ndjson.lock`,UUID 用完整 `uuid4().hex` 无需去重扫描)。仅 `--type phase.end` append 在追加成功后渲染一次 `execution-log.md`;显式 `harness_events.py render` 随时从完整 events 重建;`harness_archive.py finalize` 在 collect 前强制 render 一次。高频 command append 期间 log 可能滞后,phase 边界保持最新。
114
115
 
115
116
  每次阶段结束必须写 `--status OK|WARN|FAIL|BLOCKED`;重试同一阶段时增加 `--attempt <n>`,不得覆盖或伪装成一次执行。跨工具继续执行时写 `--executor-tool <codex|claude-code|codebuddy|cursor>`,并在接棒事件写 `--handoff-from-tool` / `--handoff-reason`;也可由 `HUNTER_HARNESS_TOOL/AGENT/MODEL/RUN_ID` 环境变量统一注入。
117
+ > 片段:logging · phase=`codebase-map`;默认写 reports,有未归档变更时另写 change events
@@ -20,7 +20,7 @@ disallowed-tools:
20
20
  - Bash(awk *)
21
21
  - Bash(curl *)
22
22
  ---
23
- <!-- generated by harness_deploy.py; core=21a7451404d2c0ff; overlay=none; agent=claude-code; do not edit -->
23
+ <!-- generated by harness_deploy.py; core=d5b51ad56d4d4535; overlay=none; agent=claude-code; do not edit -->
24
24
  # harness-knowledge-ingest
25
25
 
26
26
  从 `.harness/archive/**/reports/final/summary-data.json` 抽取项目知识,生成并维护本地 `.harness/knowledge/` 索引。
@@ -228,6 +228,7 @@ powershell.exe -Command "python '<skill-dir>\scripts\harness_knowledge.py' sync
228
228
  - 命令结果不得靠猜测;普通 Bash 被拒 → 立即改用等价 PowerShell 重试一次
229
229
  - 仅 PowerShell 成功且有明确证据(构建/git/测试输出、文件存在、exit 0)时可标 ✅OK;否则 ❌FAIL 或 🟡WARN
230
230
  - 禁止把 hook 拒绝、静态验证、无输出、用户跳过说成成功 → 详见 [[../protocols/powershell-protocol.md|powershell-protocol]]、[[../protocols/evidence-based-reporting-protocol.md|evidence-based-reporting-protocol]]
231
+ > 片段:p0-trust · ingest/sync 须绑定 `upToDate`/产物路径证据
231
232
 
232
233
  ## Output Format
233
234
 
@@ -247,7 +248,7 @@ powershell.exe -Command "python '<skill-dir>\scripts\harness_knowledge.py' sync
247
248
 
248
249
  ## 交互白名单
249
250
 
250
- **仅当** `.harness/config/harness.json` 中 `knowledge.manualReview=true` 时,promote/demote 高价值条目需 AskUserQuestion;否则按 skill 默认策略 + `decision` 事件。
251
+ **仅当** `.harness/config/harness.json` 中 `knowledge.manualReview=true` 时,promote/demote 高价值条目需 blocking user confirmation;否则按 skill 默认策略 + `decision` 事件。
251
252
 
252
253
  ## 执行日志
253
254
 
@@ -262,3 +263,4 @@ python <skills-root>/scripts/harness_events.py append --change-dir ".harness/cha
262
263
  > **Task 4 §6.1 写入契约**:普通 `append` = 加锁 -> 追加一行 -> fsync -> 解锁,**不 load 历史、不渲染**(O(1),跨进程锁 `events.ndjson.lock`,UUID 用完整 `uuid4().hex` 无需去重扫描)。仅 `--type phase.end` append 在追加成功后渲染一次 `execution-log.md`;显式 `harness_events.py render` 随时从完整 events 重建;`harness_archive.py finalize` 在 collect 前强制 render 一次。高频 command append 期间 log 可能滞后,phase 边界保持最新。
263
264
 
264
265
  每次阶段结束必须写 `--status OK|WARN|FAIL|BLOCKED`;重试同一阶段时增加 `--attempt <n>`,不得覆盖或伪装成一次执行。跨工具继续执行时写 `--executor-tool <codex|claude-code|codebuddy|cursor>`,并在接棒事件写 `--handoff-from-tool` / `--handoff-reason`;也可由 `HUNTER_HARNESS_TOOL/AGENT/MODEL/RUN_ID` 环境变量统一注入。
266
+ > 片段:logging · phase=`knowledge-ingest` · 默认控制台报告;变更上下文写 phase/decision/issue/artifact
@@ -20,7 +20,7 @@ disallowed-tools:
20
20
  - Bash(awk *)
21
21
  - Bash(curl *)
22
22
  ---
23
- <!-- generated by harness_deploy.py; core=21a7451404d2c0ff; overlay=none; agent=claude-code; do not edit -->
23
+ <!-- generated by harness_deploy.py; core=d5b51ad56d4d4535; overlay=none; agent=claude-code; do not edit -->
24
24
  # harness-knowledge-query
25
25
 
26
26
  并行 change 中查询必须传 `--change <change-id>`;成功后以该 change 的 `meta/knowledge-context.json` 为稳定指针。全局 `context-packs/latest.json` 仅向后兼容,不得用于判断多个 active change 的上下文归属。
@@ -128,6 +128,7 @@ powershell.exe -Command "python '<ingest-skill-dir>\scripts\harness_knowledge.py
128
128
  - 命令结果不得靠猜测;普通 Bash 被拒 → 立即改用等价 PowerShell 重试一次
129
129
  - 仅 PowerShell 成功且有明确证据(构建/git/测试输出、文件存在、exit 0)时可标 ✅OK;否则 ❌FAIL 或 🟡WARN
130
130
  - 禁止把 hook 拒绝、静态验证、无输出、用户跳过说成成功 → 详见 [[../protocols/powershell-protocol.md|powershell-protocol]]、[[../protocols/evidence-based-reporting-protocol.md|evidence-based-reporting-protocol]]
131
+ > 片段:p0-trust · query 成功须含 `contextPack`/`planInput.kind` 与 `latest.json` 写入
131
132
 
132
133
  ## Output Format
133
134
 
@@ -145,7 +146,7 @@ powershell.exe -Command "python '<ingest-skill-dir>\scripts\harness_knowledge.py
145
146
 
146
147
  ## 交互白名单
147
148
 
148
- **无** AskUserQuestion;`stale`/`conflicted` 命中记 `issue`,不阻断 query。
149
+ **无** blocking user confirmation;`stale`/`conflicted` 命中记 `issue`,不阻断 query。
149
150
 
150
151
  ## 执行日志
151
152
 
@@ -160,3 +161,4 @@ python <skills-root>/scripts/harness_events.py append --change-dir ".harness/cha
160
161
  > **Task 4 §6.1 写入契约**:普通 `append` = 加锁 -> 追加一行 -> fsync -> 解锁,**不 load 历史、不渲染**(O(1),跨进程锁 `events.ndjson.lock`,UUID 用完整 `uuid4().hex` 无需去重扫描)。仅 `--type phase.end` append 在追加成功后渲染一次 `execution-log.md`;显式 `harness_events.py render` 随时从完整 events 重建;`harness_archive.py finalize` 在 collect 前强制 render 一次。高频 command append 期间 log 可能滞后,phase 边界保持最新。
161
162
 
162
163
  每次阶段结束必须写 `--status OK|WARN|FAIL|BLOCKED`;重试同一阶段时增加 `--attempt <n>`,不得覆盖或伪装成一次执行。跨工具继续执行时写 `--executor-tool <codex|claude-code|codebuddy|cursor>`,并在接棒事件写 `--handoff-from-tool` / `--handoff-reason`;也可由 `HUNTER_HARNESS_TOOL/AGENT/MODEL/RUN_ID` 环境变量统一注入。
164
+ > 片段:logging · phase=`knowledge-query` · 独立运行时控制台报告;变更上下文写 decision/issue/artifact
@@ -20,7 +20,7 @@ disallowed-tools:
20
20
  - Bash(awk *)
21
21
  - Bash(curl *)
22
22
  ---
23
- <!-- generated by harness_deploy.py; core=21a7451404d2c0ff; overlay=none; agent=claude-code; do not edit -->
23
+ <!-- generated by harness_deploy.py; core=d5b51ad56d4d4535; overlay=none; agent=claude-code; do not edit -->
24
24
  # harness-plan — 需求规划
25
25
 
26
26
  ## Purpose
@@ -46,6 +46,7 @@ disallowed-tools:
46
46
  9. **每个 skill 边界只刷新一次状态快照** — 先运行 `python <skills-root>/scripts/harness_state.py capture --project . --change-dir ".harness/changes/<change-name>" --base <baseCommit> --json`;`changedSegments=[]` 时复用已有 profile/rules/map/knowledge/change/code 指纹,不再重复跑全量 `harness-sync`、知识重建或代码库扫描。只有对应 segment 变化或缺失时才定向刷新;快照不能替代源码读取和验证门禁。
47
47
 
48
48
  状态目录分层:新路径优先,旧路径兼容 → [[../protocols/state-layout-protocol.md|state-layout-protocol]]
49
+ > 片段:read-protocol · plan 额外写 `meta/worktree.json`、`meta/change-context.json`
49
50
 
50
51
  ## Worktree 门禁
51
52
 
@@ -57,11 +58,12 @@ disallowed-tools:
57
58
  | `requested=true` + path 存在 | 切换 worktree 执行 |
58
59
  | `requested=true` + path 不存在 | **必须创建**(run)或 **停止**(test/review/submit) |
59
60
 
60
- **严禁** `requested=true` 时静默回主目录。创建失败 → 停止或 AskUserQuestion 降级(须 🟡WARN + 用户确认)。
61
+ **严禁** `requested=true` 时静默回主目录。创建失败 → 停止或 blocking user confirmation 降级(须 🟡WARN + 用户确认)。
61
62
 
62
63
  **状态与代码分离**:代码/编译/测试在 `worktreeRoot`;`stateDir`(logs/events/ledger/reports)写回 `.harness/changes/<change-name>/`。
63
64
 
64
65
  创建命令与 JSON 模板 → 各 skill `reference.md`(plan 写决策,run 创建/更新)。
66
+ > 片段:worktree-gate · plan 在**设计审批包**写入 `worktree.json`(模板 → `reference.md`)
65
67
 
66
68
  ## 原生规划协议
67
69
 
@@ -81,7 +83,7 @@ disallowed-tools:
81
83
  | 1 | `harness-knowledge-query` 单次 query(内部 ensure-current;失败记 `issue`) |
82
84
  | 2 | 歧义优先检查 + 复杂度分级;先确认会改变实现方向的语义歧义 |
83
85
  | 3 | 按复杂度执行有预算的代码探索;简单修复不得扩散到无关模块 |
84
- | 4 | **设计审批包** AskUserQuestion;确认事件早于 approved 设计文档和 `meta/worktree.json` |
86
+ | 4 | **设计审批包** blocking user confirmation;确认事件早于 approved 设计文档和 `meta/worktree.json` |
85
87
  | 5–6 | plan + implementation-detail + test-scenarios → `plans/` |
86
88
  | 7.5 | 仅 `--adversarial` 对抗评审 |
87
89
  | 8 | 在临时产物集上运行 `harness_plan_finalize.py finalize`;原子发布、唯一 `phase.end`、render → `checklist.md` |
@@ -93,13 +95,14 @@ change-name 范围变更 → 提示重命名或记 🟡WARN(→ `reference.md`
93
95
  - 命令结果不得靠猜测;普通 Bash 被拒 → 立即改用等价 PowerShell 重试一次
94
96
  - 仅 PowerShell 成功且有明确证据(构建/git/测试输出、文件存在、exit 0)时可标 ✅OK;否则 ❌FAIL 或 🟡WARN
95
97
  - 禁止把 hook 拒绝、静态验证、无输出、用户跳过说成成功 → 详见 [[../protocols/powershell-protocol.md|powershell-protocol]]、[[../protocols/evidence-based-reporting-protocol.md|evidence-based-reporting-protocol]]
98
+ > 片段:p0-trust
96
99
 
97
100
  ## 关键规则
98
101
 
99
102
  | 规则 | 要点 |
100
103
  |------|------|
101
104
  | 产物路径 | 只写 `.harness/changes/<cn>/`;禁止 superpowers 输入 |
102
- | 设计审批包 | 一次 AskUserQuestion 含 worktree(读 `harness.json` `defaultWorktree`) |
105
+ | 设计审批包 | 一次 blocking user confirmation 含 worktree(读 `harness.json` `defaultWorktree`) |
103
106
  | 阶段 8 | spec/plan/detail/scenarios/worktree.json 先进入 staging;仅 finalizer 校验成功后发布并写唯一 `phase.end`/log,失败不得手工补终态 |
104
107
  | Plan 结束 | **禁止**询问执行模式;只提示 `/harness-run` |
105
108
  | 知识查询 | 0.5 失败不得假装已读历史 |
@@ -135,3 +138,4 @@ python <skills-root>/scripts/harness_events.py append --change-dir ".harness/cha
135
138
  > **Task 4 §6.1 写入契约**:普通 `append` = 加锁 -> 追加一行 -> fsync -> 解锁,**不 load 历史、不渲染**(O(1),跨进程锁 `events.ndjson.lock`,UUID 用完整 `uuid4().hex` 无需去重扫描)。仅 `--type phase.end` append 在追加成功后渲染一次 `execution-log.md`;显式 `harness_events.py render` 随时从完整 events 重建;`harness_archive.py finalize` 在 collect 前强制 render 一次。高频 command append 期间 log 可能滞后,phase 边界保持最新。
136
139
 
137
140
  每次阶段结束必须写 `--status OK|WARN|FAIL|BLOCKED`;重试同一阶段时增加 `--attempt <n>`,不得覆盖或伪装成一次执行。跨工具继续执行时写 `--executor-tool <codex|claude-code|codebuddy|cursor>`,并在接棒事件写 `--handoff-from-tool` / `--handoff-reason`;也可由 `HUNTER_HARNESS_TOOL/AGENT/MODEL/RUN_ID` 环境变量统一注入。
141
+ > 片段:logging · phase=`plan`
@@ -6,7 +6,7 @@ description: harness-plan 的阶段检查清单和覆盖检查列表。仅在执
6
6
 
7
7
  ## 阶段 0:工作区变更检查 ⚠️ 强制检查
8
8
 
9
- > 有未提交业务变更(排除 `.harness/`)→ **默认 baseline 隔离**,append `decision` 事件,**不 AskUserQuestion**,继续规划。PowerShell 失败 → ❌ 停止。
9
+ > 有未提交业务变更(排除 `.harness/`)→ **默认 baseline 隔离**,append `decision` 事件,**不 blocking user confirmation**,继续规划。PowerShell 失败 → ❌ 停止。
10
10
 
11
11
  **固定命令**:`powershell.exe -Command "git -C '<项目路径>' status --porcelain"`
12
12
 
@@ -27,7 +27,7 @@ description: harness-plan 的阶段检查清单和覆盖检查列表。仅在执
27
27
 
28
28
  ## 设计审批包字段:Worktree
29
29
 
30
- > worktree 不再单独询问。阶段 4 **设计审批包** 一次 AskUserQuestion 含 worktree 选项(推荐值读 `harness.json` `defaultWorktree`)。确认后写入 `meta/worktree.json`。
30
+ > worktree 不再单独询问。阶段 4 **设计审批包** 一次 blocking user confirmation 含 worktree 选项(推荐值读 `harness.json` `defaultWorktree`)。确认后写入 `meta/worktree.json`。
31
31
 
32
32
  - [ ] 审批包确认后写入 worktree.json(`requested` true/false)
33
33
  - [ ] 阶段 8 检查 worktree.json 存在
@@ -63,7 +63,7 @@ description: harness-plan 的阶段检查清单和覆盖检查列表。仅在执
63
63
 
64
64
  - [ ] 变更涉及 HTTP/RPC 客户端(Feign/RestTemplate/SDK 封装)时:取客户端注解路径(类级 + 方法级拼接),与服务提供方 controller 的 `@RequestMapping` + 方法级注解**完整拼接路径**逐一比对,在计划/执行记录中列出比对结果。只看方法级注解不算完成。
65
65
 
66
- ## 阶段 4:设计审批包 ⚠️ 强制阻断(一次 AskUserQuestion
66
+ ## 阶段 4:设计审批包 ⚠️ 强制阻断(一次 blocking user confirmation
67
67
 
68
68
  > 合并原「设计审核 + worktree + 场景表预览 + change-name」。推荐 worktree 读 `harness.json` `defaultWorktree`。
69
69
 
@@ -89,7 +89,7 @@ source: harness-plan
89
89
  ---
90
90
  ```
91
91
 
92
- 展示可审核包后,使用 `AskUserQuestion` 询问用户:
92
+ 展示可审核包后,使用 `blocking user confirmation` 询问用户:
93
93
  - **确认**:设计方向正确,继续任务拆分
94
94
  - **修改**:某个部分需要调整,修改后再审核
95
95
  - **取消**:方向不对,回到需求澄清阶段
@@ -154,7 +154,7 @@ source: harness-plan
154
154
  阶段 7.5 执行完成后,确认以下事项:
155
155
 
156
156
  ```
157
- □ 已用 **设计审批包** 一次 AskUserQuestion(设计 + 场景表摘要 + worktree + change-name)
157
+ □ 已用 **设计审批包** 一次 blocking user confirmation(设计 + 场景表摘要 + worktree + change-name)
158
158
  □ **未**单独询问 worktree 或对抗评审(对抗评审仅 `--adversarial`)
159
159
  □ 用户同意后,已用 Agent 工具委派 harness-evaluator(haiku, context:fork, plan 模式只读, maxTurns:8)
160
160
  □ 已用 context:fork 隔离上下文(evaluator 未参与规划,破除确认偏误)
@@ -21,7 +21,7 @@ disallowed-tools:
21
21
  - Bash(curl *)
22
22
  - Bash(codegraph *)
23
23
  ---
24
- <!-- generated by harness_deploy.py; core=21a7451404d2c0ff; overlay=none; agent=claude-code; do not edit -->
24
+ <!-- generated by harness_deploy.py; core=d5b51ad56d4d4535; overlay=none; agent=claude-code; do not edit -->
25
25
  # harness-review — 代码审查
26
26
 
27
27
  ## Purpose
@@ -60,6 +60,7 @@ disallowed-tools:
60
60
  9. **每个 skill 边界只刷新一次状态快照** — 先运行 `python <skills-root>/scripts/harness_state.py capture --project . --change-dir ".harness/changes/<change-name>" --base <baseCommit> --json`;`changedSegments=[]` 时复用已有 profile/rules/map/knowledge/change/code 指纹,不再重复跑全量 `harness-sync`、知识重建或代码库扫描。只有对应 segment 变化或缺失时才定向刷新;快照不能替代源码读取和验证门禁。
61
61
 
62
62
  状态目录分层:新路径优先,旧路径兼容 → [[../protocols/state-layout-protocol.md|state-layout-protocol]]
63
+ > 片段:read-protocol
63
64
 
64
65
  ## Workflow
65
66
 
@@ -125,6 +126,7 @@ review:
125
126
  - 命令结果不得靠猜测;普通 Bash 被拒 → 立即改用等价 PowerShell 重试一次
126
127
  - 仅 PowerShell 成功且有明确证据(构建/git/测试输出、文件存在、exit 0)时可标 ✅OK;否则 ❌FAIL 或 🟡WARN
127
128
  - 禁止把 hook 拒绝、静态验证、无输出、用户跳过说成成功 → 详见 [[../protocols/powershell-protocol.md|powershell-protocol]]、[[../protocols/evidence-based-reporting-protocol.md|evidence-based-reporting-protocol]]
129
+ > 片段:p0-trust
128
130
 
129
131
  ## 关键规则(硬门禁速查)
130
132
 
@@ -152,7 +154,7 @@ review 读取 `state-snapshot.json`(`harness_state.py` / state-layout-protocol
152
154
 
153
155
  ## 交互白名单
154
156
 
155
- **无** AskUserQuestion(审查全自动)。委派失败 → 主会话审查 + `decision` 事件。
157
+ **无** blocking user confirmation(审查全自动)。委派失败 → 主会话审查 + `decision` 事件。
156
158
 
157
159
  ## 执行日志
158
160
 
@@ -167,3 +169,4 @@ python <skills-root>/scripts/harness_events.py append --change-dir ".harness/cha
167
169
  > **Task 4 §6.1 写入契约**:普通 `append` = 加锁 -> 追加一行 -> fsync -> 解锁,**不 load 历史、不渲染**(O(1),跨进程锁 `events.ndjson.lock`,UUID 用完整 `uuid4().hex` 无需去重扫描)。仅 `--type phase.end` append 在追加成功后渲染一次 `execution-log.md`;显式 `harness_events.py render` 随时从完整 events 重建;`harness_archive.py finalize` 在 collect 前强制 render 一次。高频 command append 期间 log 可能滞后,phase 边界保持最新。
168
170
 
169
171
  每次阶段结束必须写 `--status OK|WARN|FAIL|BLOCKED`;重试同一阶段时增加 `--attempt <n>`,不得覆盖或伪装成一次执行。跨工具继续执行时写 `--executor-tool <codex|claude-code|codebuddy|cursor>`,并在接棒事件写 `--handoff-from-tool` / `--handoff-reason`;也可由 `HUNTER_HARNESS_TOOL/AGENT/MODEL/RUN_ID` 环境变量统一注入。
172
+ > 片段:logging · phase=`review` · 事件:phase/decision/verification/issue/artifact
@@ -21,12 +21,12 @@ disallowed-tools:
21
21
  - Bash(curl *)
22
22
  - Bash(codegraph *)
23
23
  ---
24
- <!-- generated by harness_deploy.py; core=21a7451404d2c0ff; overlay=none; agent=claude-code; do not edit -->
24
+ <!-- generated by harness_deploy.py; core=d5b51ad56d4d4535; overlay=none; agent=claude-code; do not edit -->
25
25
  # harness-run — 需求编码
26
26
 
27
27
  ## Purpose
28
28
 
29
- 基于 plan + test-scenarios,按**变更簇**执行 TDD(RED→GREEN→REFACTOR→构建验证),写入 verification-ledger。负责 worktree 创建/切换(见 [[shared/worktree-gate.md|worktree-gate]])。
29
+ 基于 plan + test-scenarios,按**变更簇**执行 TDD(RED→GREEN→REFACTOR→构建验证),写入 verification-ledger。负责 worktree 创建/切换(见 worktree-gate)。
30
30
 
31
31
  ## When to Use
32
32
 
@@ -47,11 +47,12 @@ disallowed-tools:
47
47
  | `requested=true` + path 存在 | 切换 worktree 执行 |
48
48
  | `requested=true` + path 不存在 | **必须创建**(run)或 **停止**(test/review/submit) |
49
49
 
50
- **严禁** `requested=true` 时静默回主目录。创建失败 → 停止或 AskUserQuestion 降级(须 🟡WARN + 用户确认)。
50
+ **严禁** `requested=true` 时静默回主目录。创建失败 → 停止或 blocking user confirmation 降级(须 🟡WARN + 用户确认)。
51
51
 
52
52
  **状态与代码分离**:代码/编译/测试在 `worktreeRoot`;`stateDir`(logs/events/ledger/reports)写回 `.harness/changes/<change-name>/`。
53
53
 
54
54
  创建命令与 JSON 模板 → 各 skill `reference.md`(plan 写决策,run 创建/更新)。
55
+ > 片段:worktree-gate · 创建命令 → `reference.md`
55
56
 
56
57
  ## 统一读取协议
57
58
 
@@ -66,6 +67,7 @@ disallowed-tools:
66
67
  9. **每个 skill 边界只刷新一次状态快照** — 先运行 `python <skills-root>/scripts/harness_state.py capture --project . --change-dir ".harness/changes/<change-name>" --base <baseCommit> --json`;`changedSegments=[]` 时复用已有 profile/rules/map/knowledge/change/code 指纹,不再重复跑全量 `harness-sync`、知识重建或代码库扫描。只有对应 segment 变化或缺失时才定向刷新;快照不能替代源码读取和验证门禁。
67
68
 
68
69
  状态目录分层:新路径优先,旧路径兼容 → [[../protocols/state-layout-protocol.md|state-layout-protocol]]
70
+ > 片段:read-protocol · run 必读文件优先级 → `reference.md` Step 0
69
71
 
70
72
  ## 执行模式
71
73
 
@@ -89,6 +91,7 @@ disallowed-tools:
89
91
  - 命令结果不得靠猜测;普通 Bash 被拒 → 立即改用等价 PowerShell 重试一次
90
92
  - 仅 PowerShell 成功且有明确证据(构建/git/测试输出、文件存在、exit 0)时可标 ✅OK;否则 ❌FAIL 或 🟡WARN
91
93
  - 禁止把 hook 拒绝、静态验证、无输出、用户跳过说成成功 → 详见 [[../protocols/powershell-protocol.md|powershell-protocol]]、[[../protocols/evidence-based-reporting-protocol.md|evidence-based-reporting-protocol]]
94
+ > 片段:p0-trust
92
95
 
93
96
  ## 关键规则(硬门禁速查)
94
97
 
@@ -148,3 +151,4 @@ python <skills-root>/scripts/harness_events.py append --change-dir ".harness/cha
148
151
  > **Task 4 §6.1 写入契约**:普通 `append` = 加锁 -> 追加一行 -> fsync -> 解锁,**不 load 历史、不渲染**(O(1),跨进程锁 `events.ndjson.lock`,UUID 用完整 `uuid4().hex` 无需去重扫描)。仅 `--type phase.end` append 在追加成功后渲染一次 `execution-log.md`;显式 `harness_events.py render` 随时从完整 events 重建;`harness_archive.py finalize` 在 collect 前强制 render 一次。高频 command append 期间 log 可能滞后,phase 边界保持最新。
149
152
 
150
153
  每次阶段结束必须写 `--status OK|WARN|FAIL|BLOCKED`;重试同一阶段时增加 `--attempt <n>`,不得覆盖或伪装成一次执行。跨工具继续执行时写 `--executor-tool <codex|claude-code|codebuddy|cursor>`,并在接棒事件写 `--handoff-from-tool` / `--handoff-reason`;也可由 `HUNTER_HARNESS_TOOL/AGENT/MODEL/RUN_ID` 环境变量统一注入。
154
+ > 片段:logging · phase=`run`
@@ -19,7 +19,7 @@ description: harness-run 的执行检查清单。仅在编码执行时读取。
19
19
  - [ ] worktree 创建命令必须使用 PowerShell:`git worktree add ...`
20
20
  - [ ] 创建后验证 `<adapter-worktree-root>/<change-name>/.git` 存在;Codex 必须是 `.codex/worktrees/<change-name>`
21
21
  - [ ] 创建成功后更新 `meta/worktree.json` 的 `created=true/createdAt/createdBy`
22
- - [ ] 创建失败 → 停止,或 AskUserQuestion 询问是否改为主目录执行
22
+ - [ ] 创建失败 → 停止,或 blocking user confirmation 询问是否改为主目录执行
23
23
  - [ ] 禁止 `requested=true && worktree 不存在` 时直接主目录执行
24
24
  - [ ] 记录 `projectRoot / worktreeRoot / stateDir`
25
25
 
@@ -46,7 +46,7 @@ description: harness-run 的执行检查清单。仅在编码执行时读取。
46
46
  - [ ] 统计任务数量和涉及模块数
47
47
  - [ ] 如果处于 `--fixback` 模式,将 RED/YELLOW fixback 条目映射为本轮变更簇,并记录 `fixback: applied`
48
48
  - [ ] 默认 Inline Execution;`--subagent` / `--inline` 参数覆盖
49
- - [ ] **禁止**因任务数/模块数 AskUserQuestion 选择执行模式
49
+ - [ ] **禁止**因任务数/模块数 blocking user confirmation 选择执行模式
50
50
 
51
51
  ## 步骤 0.5:测试基础设施探测(⚠️ 必须先于任何 TDD 降级结论)
52
52
 
@@ -67,7 +67,7 @@ description: harness-run 的执行检查清单。仅在编码执行时读取。
67
67
  > 如果 run 开始前检测到已有未提交变更,必须执行此步骤。
68
68
 
69
69
  - [ ] 检查 git status 是否有 run 前的预存变更
70
- - [ ] 如果有预存变更 → 使用 AskUserQuestion 询问用户处理方式(保留/暂存/终止)
70
+ - [ ] 如果有预存变更 → 使用 blocking user confirmation 询问用户处理方式(保留/暂存/终止)
71
71
  - [ ] 用户选择保留 → 创建 `.harness/changes/<change>/pre-existing-files.json`(文件列表 + diff hash + 用户选择)
72
72
  - [ ] 用户选择保留 → 创建 `.harness/changes/<change>/pre-existing-diff.patch`(完整 diff 备份)
73
73
  - [ ] 在执行日志中记录预存变更检测结果和用户选择
@@ -223,7 +223,7 @@ description: harness-run 的执行检查清单。仅在编码执行时读取。
223
223
  - [ ] 确认当前 cwd 在 `<adapter-worktree-root>/<change-name>/` 下,且 branch 使用 adapter 的 prefix
224
224
  - [ ] 生成变更摘要:`git diff --stat` + `git diff --stat --cached`
225
225
  - [ ] 构建 commit message:`wip(<scope>): <change-name> 编码完成 — N任务/M文件变更`
226
- - [ ] **⚠️ 强制阻断**:用 AskUserQuestion 展示变更列表 + commit message,等待用户确认
226
+ - [ ] **⚠️ 强制阻断**:用 blocking user confirmation 展示变更列表 + commit message,等待用户确认
227
227
  - [ ] 用户确认 → 精确暂存业务文件;若存在 test-tracking manifest,先执行 `harness_test_guard.py stage --project . --change-dir ".harness/changes/<change-name>" --json`;禁止 `git add -A` 与目录级 force-add
228
228
  - [ ] `git diff --cached --name-only` 包含 manifest 的全部精确测试路径后再 `git commit`(不用 --no-verify、--no-gpg-sign)
229
229
  - [ ] 用户拒绝 → 记录 `❌用户拒绝`,继续后续流程
@@ -20,7 +20,7 @@ disallowed-tools:
20
20
  - Bash(awk *)
21
21
  - Bash(curl *)
22
22
  ---
23
- <!-- generated by harness_deploy.py; core=21a7451404d2c0ff; overlay=none; agent=claude-code; do not edit -->
23
+ <!-- generated by harness_deploy.py; core=d5b51ad56d4d4535; overlay=none; agent=claude-code; do not edit -->
24
24
  # harness-submit — 最终提交(含 worktree 合并)
25
25
 
26
26
  ## Purpose
@@ -60,6 +60,7 @@ disallowed-tools:
60
60
  9. **每个 skill 边界只刷新一次状态快照** — 先运行 `python <skills-root>/scripts/harness_state.py capture --project . --change-dir ".harness/changes/<change-name>" --base <baseCommit> --json`;`changedSegments=[]` 时复用已有 profile/rules/map/knowledge/change/code 指纹,不再重复跑全量 `harness-sync`、知识重建或代码库扫描。只有对应 segment 变化或缺失时才定向刷新;快照不能替代源码读取和验证门禁。
61
61
 
62
62
  状态目录分层:新路径优先,旧路径兼容 → [[../protocols/state-layout-protocol.md|state-layout-protocol]]
63
+ > 片段:read-protocol
63
64
 
64
65
  ## 状态目录分层
65
66
 
@@ -77,7 +78,7 @@ worktree 合并前必须运行 `harness_change.py integration-lock acquire --run
77
78
  1. **合并最新代码** — 主目录与 worktree 均**不在业务工作区 stash/pull**;远端同步由合并段 integration transaction 在隔离 integration worktree 内完成(见「worktree 合并流程」);**正常路径禁止 `git stash` / `stash pop`**
78
79
  2. **最终验证** — ledger 复用优先;**提交前最终门禁只调 `can-reuse`**(删除与 coverage 冲突的二次全量门禁):`harness_ledger.py can-reuse --verification unitTestFull --scope module --project . --profile-input unitTestFull --command <resolved commands.unitTestFull.command>`。`--command` **按 profile key resolve**:读 `build-profile.json` 的 `commands.unitTestFull.command`(v2),或 `harness_profile.py resolve --project . --key unitTestFull --json` 取 resolved command,**不复制示例模块名**(文档示例只展示 key)。`--profile-input unitTestFull` 从 `verificationInputs.unitTestFull`(v2 由 `commands.unitTestFull.inputs` 派生)展开依赖闭包,**禁止用仅含 staged 文件的 `--files` 快捷方式**冒充全量闭包。`reuse=true` → 不再执行二次全量测试;仅 `reuse=false` 时执行**同一 resolved verification**(profile `unitTestFull` 命令),成功后用同一文件集、command、`scope=module` 经 **`harness_ledger.py record`** 写回 ledger `unitTestFull` 项。增量 `unitTest` 永远不能冒充 `unitTestFull` 门禁。
79
80
  3. **.gitignore + 精确暂存** ⚠️ — 检查 `.harness/` 在 `.gitignore`;**禁止 `git add -A`**。若存在 `evidence/test-tracking.json`,先执行 `python <skills-root>/scripts/harness_test_guard.py stage --project . --change-dir ".harness/changes/<change-name>" --json`;失败即硬停止。无 manifest 时不使用 `-f`。manifest 之外的文件按精确业务路径正常暂存,**禁止全局 force-add**。
80
- 4. **提交方式** — 主目录:AskUserQuestion 三选项(commit+push / 仅本地 / 取消);**worktree:固定仅本地 commit**
81
+ 4. **提交方式** — 主目录:blocking user confirmation 三选项(commit+push / 仅本地 / 取消);**worktree:固定仅本地 commit**
81
82
  5. **commit-message.txt** ⚠️ — 展示 staged、diff stat、完整中文 message;用户确认
82
83
  6. **commit / push** — `git commit -F`;主目录按选项 push(push 前 fetch 检查远端);**worktree:只 commit,记录 local hash**
83
84
  7. **收尾** — **`harness_gate.py close --phase submit --status ...`**;主目录:可选 worktree 清理 + 提示 `/harness-archive`;**worktree:接续下方合并流程**
@@ -106,6 +107,7 @@ M7. **ledger + 收尾** — 经 `harness_ledger.py record` 写入 `mergeFinalHas
106
107
  - 命令结果不得靠猜测;普通 Bash 被拒 → 立即改用等价 PowerShell 重试一次
107
108
  - 仅 PowerShell 成功且有明确证据(构建/git/测试输出、文件存在、exit 0)时可标 ✅OK;否则 ❌FAIL 或 🟡WARN
108
109
  - 禁止把 hook 拒绝、静态验证、无输出、用户跳过说成成功 → 详见 [[../protocols/powershell-protocol.md|powershell-protocol]]、[[../protocols/evidence-based-reporting-protocol.md|evidence-based-reporting-protocol]]
110
+ > 片段:p0-trust
109
111
 
110
112
  ## 关键规则(硬门禁速查)
111
113
 
@@ -151,7 +153,7 @@ git 经 PowerShell;commit/报告不得含明文密钥。遵循 `../protocols/s
151
153
 
152
154
  ## 交互白名单
153
155
 
154
- 本 skill **仅允许**以下 AskUserQuestion;其余默认值 + `decision` 事件:
156
+ 本 skill **仅允许**以下 blocking user confirmation;其余默认值 + `decision` 事件:
155
157
 
156
158
  1. **提交方式 + commit message**(主目录一次确认);worktree 固定仅本地 commit,仅确认 message
157
159
  2. **远程有新提交**(push 前):重新验证 / 停止 push
@@ -169,3 +171,4 @@ python <skills-root>/scripts/harness_events.py append --change-dir ".harness/cha
169
171
  > **Task 4 §6.1 写入契约**:普通 `append` = 加锁 -> 追加一行 -> fsync -> 解锁,**不 load 历史、不渲染**(O(1),跨进程锁 `events.ndjson.lock`,UUID 用完整 `uuid4().hex` 无需去重扫描)。仅 `--type phase.end` append 在追加成功后渲染一次 `execution-log.md`;显式 `harness_events.py render` 随时从完整 events 重建;`harness_archive.py finalize` 在 collect 前强制 render 一次。高频 command append 期间 log 可能滞后,phase 边界保持最新。
170
172
 
171
173
  每次阶段结束必须写 `--status OK|WARN|FAIL|BLOCKED`;重试同一阶段时增加 `--attempt <n>`,不得覆盖或伪装成一次执行。跨工具继续执行时写 `--executor-tool <codex|claude-code|codebuddy|cursor>`,并在接棒事件写 `--handoff-from-tool` / `--handoff-reason`;也可由 `HUNTER_HARNESS_TOOL/AGENT/MODEL/RUN_ID` 环境变量统一注入。
174
+ > 片段:logging · phase=`submit`/`merge`
@@ -12,7 +12,7 @@ description: harness-submit 的8 步工作流详细步骤和执行日志记录
12
12
  - commit message 必须写入 `.harness/changes/<change>/runtime/commit-message.txt`。
13
13
  - 使用 `git commit -F`,禁止先英文 commit 再 amend。
14
14
  - commit message 禁止 `Co-Authored-By`、`Generated by`、`AI generated`。
15
- - AskUserQuestion 参数错误时不得自行绕过,必须改用固定模板重问。
15
+ - blocking user confirmation 参数错误时不得自行绕过,必须改用固定模板重问。
16
16
  - staged diff 是唯一提交依据。
17
17
 
18
18
 
@@ -130,7 +130,7 @@ powershell.exe -Command "Select-String -Path '<项目路径>\.gitignore' -Patter
130
130
 
131
131
  如果未包含:
132
132
  - **必须提醒用户**:`⚠️ .gitignore 未包含 .harness/,会导致 .harness/ 下文件被提交(含日志、报告、可能含敏感信息)`
133
- - **默认不提交 .harness/ 下文件**:使用 AskUserQuestion 询问用户是否:
133
+ - **默认不提交 .harness/ 下文件**:使用 blocking user confirmation 询问用户是否:
134
134
  1. 添加 .harness/ 到 .gitignore(推荐)
135
135
  2. 仅 stage 业务代码文件,不提交 .harness/
136
136
  3. 取消提交
@@ -146,7 +146,7 @@ powershell.exe -Command "git -C '<项目路径>' status --porcelain | Select-Str
146
146
 
147
147
  **worktree 模式(requested=true)**:固定为「仅本地 commit」,不展示「commit+push」选项;commit 完成后继续下方「worktree 合并流程」,跳过下方三选项询问。
148
148
 
149
- `harness-submit` 不调用 Superpowers 呈现合并选项。只允许使用固定 AskUserQuestion 模板:
149
+ `harness-submit` 不调用 Superpowers 呈现合并选项。只允许使用固定 blocking user confirmation 模板:
150
150
 
151
151
  ```text
152
152
  本次变更已完成验证,请选择提交方式:
@@ -156,7 +156,7 @@ powershell.exe -Command "git -C '<项目路径>' status --porcelain | Select-Str
156
156
  3. 取消提交
157
157
  ```
158
158
 
159
- 禁止在此步骤引入“创建 PR”“丢弃所有变更”“直接合并到主分支”等旧选项,避免 AskUserQuestion 参数错误和流程歧义。
159
+ 禁止在此步骤引入"创建 PR""丢弃所有变更""直接合并到主分支"等旧选项,避免 blocking user confirmation 参数错误和流程歧义。
160
160
 
161
161
  ## 步骤 5:展示提交摘要 + 确认 ⚠️ 强制阻断
162
162
 
@@ -256,7 +256,7 @@ powershell.exe -Command "git -C '<项目路径>' log HEAD..@{u} --oneline"
256
256
  - **不得直接 pull 后 push**
257
257
  - 必须 pull/rebase 后**重新构建/测试**(ledger 复用条件被破坏,须重跑并写回 ledger)
258
258
  - 验证通过后再 push
259
- - 使用 AskUserQuestion 询问用户:
259
+ - 使用 blocking user confirmation 询问用户:
260
260
  ```
261
261
  远程有新提交(N 个),需要 pull/rebase 后重新验证:
262
262
  1. 重新验证(pull/rebase + 构建 + 测试)
@@ -4,7 +4,7 @@ description: harness-submit 的提交格式、固定交互模板和中文 commit
4
4
 
5
5
  # harness-submit 参考
6
6
 
7
- ## 提交方式 AskUserQuestion 固定模板
7
+ ## 提交方式 blocking user confirmation 固定模板
8
8
 
9
9
  问题标题:`请选择提交方式`
10
10
 
@@ -14,7 +14,7 @@ description: harness-submit 的提交格式、固定交互模板和中文 commit
14
14
  2. `仅本地 commit,不 push`
15
15
  3. `取消提交`
16
16
 
17
- 不得临场增加复杂对象或嵌套参数,避免 AskUserQuestion 参数错误。
17
+ 不得临场增加复杂对象或嵌套参数,避免 blocking user confirmation 参数错误。
18
18
 
19
19
  > **worktree 模式(meta/worktree.json requested=true)**:固定选项 2「仅本地 commit」,不展示「commit+push」;commit 成功后 skill **自动接续** worktree 合并流程(`/harness-merge` 为别名)。push 只在主分支完成,产出 `mergeFinalHash`。
20
20
 
@@ -148,5 +148,5 @@ powershell.exe -NoProfile -Command "git -C '<项目路径>' log HEAD..@{u} --one
148
148
 
149
149
  - 步骤 1(合并最新代码):按无 upstream / 远端无新提交判定 N/A,在执行日志记录理由。
150
150
  - 步骤 5(commit-message.txt + `git commit -F`)N/A:无可暂存 diff,无新 commit 需生成。执行日志标注 `commit-message.txt / git commit -F: N/A(工作树 clean,无新 commit;N 个 wip 提交已存在,原样推送)`。
151
- - 步骤 4(提交方式选择):固定三选项仍适用。但当 review 标了 RED 兼容性破坏等需人工确认项时,可在"commit + push"选项的描述中注明"并确认 <RED 项>",**不得新增第四选项**、不得临场拼复杂 AskUserQuestion 参数。
151
+ - 步骤 4(提交方式选择):固定三选项仍适用。但当 review 标了 RED 兼容性破坏等需人工确认项时,可在"commit + push"选项的描述中注明"并确认 <RED 项>",**不得新增第四选项**、不得临场拼复杂 blocking user confirmation 参数。
152
152
  - push 仍按步骤 6:fetch 检查远端 → `git push -u`(无 upstream 则新建远端分支)→ 记录 pre-pull hash + final pushed hash。
@@ -19,7 +19,7 @@ disallowed-tools:
19
19
  - Bash(awk *)
20
20
  - Bash(curl *)
21
21
  ---
22
- <!-- generated by harness_deploy.py; core=21a7451404d2c0ff; overlay=none; agent=claude-code; do not edit -->
22
+ <!-- generated by harness_deploy.py; core=d5b51ad56d4d4535; overlay=none; agent=claude-code; do not edit -->
23
23
  # harness-sync — 元数据同步
24
24
 
25
25
  ## Purpose
@@ -55,7 +55,7 @@ python <skills-root>/scripts/harness_sync.py finalize --project . --run-id <run-
55
55
  | 3 | `.harness/codebase/map/` 是否过期 → 报告建议 `/harness-codebase-map` |
56
56
  | 3.5 | `harness_knowledge.py sync`;可 `sync --update`;失败不得假装可用。**知识闭环主入口**是 `/harness-knowledge-ingest auto`(含 Agent judge),sync 不重复列人工知识待办 |
57
57
  | 3.6 | 单次运行 `harness_knowledge.py maintain --project . --drain --json`,有界推进全部 `.harness/knowledge/maintenance-outbox/{pending,failed}`;不得为每个条目重复启动 Python/重建索引(§8.2:archive close 只 enqueue,sync 异步推进 outbox 到 completed/pending-judge) |
58
- | 4 | CLAUDE.md 完整性/行数 → 超限 AskUserQuestion 瘦身 |
58
+ | 4 | CLAUDE.md 完整性/行数 → 超限 blocking user confirmation 瘦身 |
59
59
  | 5 | AGENTS.md 与各 Agent 指令入口一致;Claude Code 启用时验证 CLAUDE.md 引用 AGENTS.md,禁止反向循环引用 |
60
60
  | 6 | `.harness/` 结构(init 规程 → `reference.md` 第 6 步);已装 skill 新鲜度只经 `hunter-harness refresh --dry-run --json` 的 post-adaptation freshness 判断,禁止 raw build 字节比较 |
61
61
  | 7–9 | `项目规则(见 .harness/context-index.json)/`、构建配置、测试目录 — **只提示不自动修复** |
@@ -67,6 +67,7 @@ python <skills-root>/scripts/harness_sync.py finalize --project . --run-id <run-
67
67
  - 命令结果不得靠猜测;普通 Bash 被拒 → 立即改用等价 PowerShell 重试一次
68
68
  - 仅 PowerShell 成功且有明确证据(构建/git/测试输出、文件存在、exit 0)时可标 ✅OK;否则 ❌FAIL 或 🟡WARN
69
69
  - 禁止把 hook 拒绝、静态验证、无输出、用户跳过说成成功 → 详见 [[../protocols/powershell-protocol.md|powershell-protocol]]、[[../protocols/evidence-based-reporting-protocol.md|evidence-based-reporting-protocol]]
70
+ > 片段:p0-trust
70
71
 
71
72
  ## 关键规则
72
73
 
@@ -97,3 +98,4 @@ python <skills-root>/scripts/harness_events.py append --change-dir ".harness/cha
97
98
  > **Task 4 §6.1 写入契约**:普通 `append` = 加锁 -> 追加一行 -> fsync -> 解锁,**不 load 历史、不渲染**(O(1),跨进程锁 `events.ndjson.lock`,UUID 用完整 `uuid4().hex` 无需去重扫描)。仅 `--type phase.end` append 在追加成功后渲染一次 `execution-log.md`;显式 `harness_events.py render` 随时从完整 events 重建;`harness_archive.py finalize` 在 collect 前强制 render 一次。高频 command append 期间 log 可能滞后,phase 边界保持最新。
98
99
 
99
100
  每次阶段结束必须写 `--status OK|WARN|FAIL|BLOCKED`;重试同一阶段时增加 `--attempt <n>`,不得覆盖或伪装成一次执行。跨工具继续执行时写 `--executor-tool <codex|claude-code|codebuddy|cursor>`,并在接棒事件写 `--handoff-from-tool` / `--handoff-reason`;也可由 `HUNTER_HARNESS_TOOL/AGENT/MODEL/RUN_ID` 环境变量统一注入。
101
+ > 片段:logging · phase=`sync`;有未归档变更时写入其 change-dir events
@@ -58,7 +58,7 @@ powershell.exe -Command "git -C '<项目路径>' diff --stat HEAD~5 2>$null"
58
58
 
59
59
  **瘦身策略**:如果超过 200 行,不是简单截断——而是把可独立成篇的细节(如完整编码规范、详细架构图)迁移到 `项目规则(见 .harness/context-index.json)/` 下,CLAUDE.md 保留简洁的索引和关键命令。
60
60
 
61
- > ⚠️ CLAUDE.md 需要瘦身时,必须用 AskUserQuestion 与用户确认拆分方案后再执行。
61
+ > ⚠️ CLAUDE.md 需要瘦身时,必须用 blocking user confirmation 与用户确认拆分方案后再执行。
62
62
 
63
63
  ### 5. AGENTS.md 一致性
64
64