@hunter-harness/workflow-harness 0.2.60 → 0.2.61

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 (210) hide show
  1. package/harness/bundles/general/claude-code/.harness-build.json +1 -1
  2. package/harness/bundles/general/claude-code/README.md +7 -7
  3. package/harness/bundles/general/claude-code/harness-archive/SKILL.md +35 -35
  4. package/harness/bundles/general/claude-code/harness-archive/checklist.md +5 -2
  5. package/harness/bundles/general/claude-code/harness-archive/reference.md +23 -7
  6. package/harness/bundles/general/claude-code/harness-codebase-map/SKILL.md +1 -1
  7. package/harness/bundles/general/claude-code/harness-knowledge-ingest/SKILL.md +1 -1
  8. package/harness/bundles/general/claude-code/harness-knowledge-query/SKILL.md +1 -1
  9. package/harness/bundles/general/claude-code/harness-plan/SKILL.md +4 -4
  10. package/harness/bundles/general/claude-code/harness-review/SKILL.md +2 -2
  11. package/harness/bundles/general/claude-code/harness-run/SKILL.md +2 -2
  12. package/harness/bundles/general/claude-code/harness-submit/SKILL.md +2 -2
  13. package/harness/bundles/general/claude-code/harness-sync/SKILL.md +1 -1
  14. package/harness/bundles/general/claude-code/harness-test/SKILL.md +2 -2
  15. package/harness/bundles/general/claude-code/protocols/archive-report-protocol.md +7 -3
  16. package/harness/bundles/general/claude-code/protocols/ledger-protocol.md +1 -1
  17. package/harness/bundles/general/claude-code/protocols/report-pipeline-protocol.md +6 -4
  18. package/harness/bundles/general/claude-code/protocols/state-layout-protocol.md +3 -2
  19. package/harness/bundles/general/claude-code/scripts/harness_archive.py +829 -68
  20. package/harness/bundles/general/claude-code/scripts/harness_context.py +8 -2
  21. package/harness/bundles/general/claude-code/scripts/harness_events.py +5 -0
  22. package/harness/bundles/general/claude-code/scripts/harness_ledger.py +79 -2
  23. package/harness/bundles/general/claude-code/scripts/harness_profile.py +7 -0
  24. package/harness/bundles/general/claude-code/scripts/harness_state.py +22 -3
  25. package/harness/bundles/general/codebuddy/.harness-build.json +1 -1
  26. package/harness/bundles/general/codebuddy/README.md +7 -7
  27. package/harness/bundles/general/codebuddy/harness-archive/SKILL.md +35 -35
  28. package/harness/bundles/general/codebuddy/harness-archive/checklist.md +5 -2
  29. package/harness/bundles/general/codebuddy/harness-archive/reference.md +23 -7
  30. package/harness/bundles/general/codebuddy/harness-codebase-map/SKILL.md +1 -1
  31. package/harness/bundles/general/codebuddy/harness-knowledge-ingest/SKILL.md +1 -1
  32. package/harness/bundles/general/codebuddy/harness-knowledge-query/SKILL.md +1 -1
  33. package/harness/bundles/general/codebuddy/harness-plan/SKILL.md +4 -4
  34. package/harness/bundles/general/codebuddy/harness-review/SKILL.md +2 -2
  35. package/harness/bundles/general/codebuddy/harness-run/SKILL.md +2 -2
  36. package/harness/bundles/general/codebuddy/harness-submit/SKILL.md +2 -2
  37. package/harness/bundles/general/codebuddy/harness-sync/SKILL.md +1 -1
  38. package/harness/bundles/general/codebuddy/harness-test/SKILL.md +2 -2
  39. package/harness/bundles/general/codebuddy/protocols/archive-report-protocol.md +7 -3
  40. package/harness/bundles/general/codebuddy/protocols/ledger-protocol.md +1 -1
  41. package/harness/bundles/general/codebuddy/protocols/report-pipeline-protocol.md +6 -4
  42. package/harness/bundles/general/codebuddy/protocols/state-layout-protocol.md +3 -2
  43. package/harness/bundles/general/codebuddy/scripts/harness_archive.py +829 -68
  44. package/harness/bundles/general/codebuddy/scripts/harness_context.py +8 -2
  45. package/harness/bundles/general/codebuddy/scripts/harness_events.py +5 -0
  46. package/harness/bundles/general/codebuddy/scripts/harness_ledger.py +79 -2
  47. package/harness/bundles/general/codebuddy/scripts/harness_profile.py +7 -0
  48. package/harness/bundles/general/codebuddy/scripts/harness_state.py +22 -3
  49. package/harness/bundles/general/codex/.harness-build.json +1 -1
  50. package/harness/bundles/general/codex/README.md +7 -7
  51. package/harness/bundles/general/codex/harness-archive/SKILL.md +35 -35
  52. package/harness/bundles/general/codex/harness-archive/checklist.md +5 -2
  53. package/harness/bundles/general/codex/harness-archive/reference.md +23 -7
  54. package/harness/bundles/general/codex/harness-codebase-map/SKILL.md +1 -1
  55. package/harness/bundles/general/codex/harness-knowledge-ingest/SKILL.md +1 -1
  56. package/harness/bundles/general/codex/harness-knowledge-query/SKILL.md +1 -1
  57. package/harness/bundles/general/codex/harness-plan/SKILL.md +4 -4
  58. package/harness/bundles/general/codex/harness-review/SKILL.md +2 -2
  59. package/harness/bundles/general/codex/harness-run/SKILL.md +2 -2
  60. package/harness/bundles/general/codex/harness-submit/SKILL.md +2 -2
  61. package/harness/bundles/general/codex/harness-sync/SKILL.md +1 -1
  62. package/harness/bundles/general/codex/harness-test/SKILL.md +2 -2
  63. package/harness/bundles/general/codex/protocols/archive-report-protocol.md +7 -3
  64. package/harness/bundles/general/codex/protocols/ledger-protocol.md +1 -1
  65. package/harness/bundles/general/codex/protocols/report-pipeline-protocol.md +6 -4
  66. package/harness/bundles/general/codex/protocols/state-layout-protocol.md +3 -2
  67. package/harness/bundles/general/codex/scripts/harness_archive.py +829 -68
  68. package/harness/bundles/general/codex/scripts/harness_context.py +8 -2
  69. package/harness/bundles/general/codex/scripts/harness_events.py +5 -0
  70. package/harness/bundles/general/codex/scripts/harness_ledger.py +79 -2
  71. package/harness/bundles/general/codex/scripts/harness_profile.py +7 -0
  72. package/harness/bundles/general/codex/scripts/harness_state.py +22 -3
  73. package/harness/bundles/general/cursor/.harness-build.json +1 -1
  74. package/harness/bundles/general/cursor/README.md +7 -7
  75. package/harness/bundles/general/cursor/harness-archive/SKILL.md +35 -35
  76. package/harness/bundles/general/cursor/harness-archive/checklist.md +5 -2
  77. package/harness/bundles/general/cursor/harness-archive/reference.md +23 -7
  78. package/harness/bundles/general/cursor/harness-codebase-map/SKILL.md +1 -1
  79. package/harness/bundles/general/cursor/harness-knowledge-ingest/SKILL.md +1 -1
  80. package/harness/bundles/general/cursor/harness-knowledge-query/SKILL.md +1 -1
  81. package/harness/bundles/general/cursor/harness-plan/SKILL.md +4 -4
  82. package/harness/bundles/general/cursor/harness-review/SKILL.md +2 -2
  83. package/harness/bundles/general/cursor/harness-run/SKILL.md +2 -2
  84. package/harness/bundles/general/cursor/harness-submit/SKILL.md +2 -2
  85. package/harness/bundles/general/cursor/harness-sync/SKILL.md +1 -1
  86. package/harness/bundles/general/cursor/harness-test/SKILL.md +2 -2
  87. package/harness/bundles/general/cursor/protocols/archive-report-protocol.md +7 -3
  88. package/harness/bundles/general/cursor/protocols/ledger-protocol.md +1 -1
  89. package/harness/bundles/general/cursor/protocols/report-pipeline-protocol.md +6 -4
  90. package/harness/bundles/general/cursor/protocols/state-layout-protocol.md +3 -2
  91. package/harness/bundles/general/cursor/scripts/harness_archive.py +829 -68
  92. package/harness/bundles/general/cursor/scripts/harness_context.py +8 -2
  93. package/harness/bundles/general/cursor/scripts/harness_events.py +5 -0
  94. package/harness/bundles/general/cursor/scripts/harness_ledger.py +79 -2
  95. package/harness/bundles/general/cursor/scripts/harness_profile.py +7 -0
  96. package/harness/bundles/general/cursor/scripts/harness_state.py +22 -3
  97. package/harness/bundles/java/claude-code/.harness-build.json +1 -1
  98. package/harness/bundles/java/claude-code/README.md +7 -7
  99. package/harness/bundles/java/claude-code/harness-apidoc/SKILL.md +2 -2
  100. package/harness/bundles/java/claude-code/harness-archive/SKILL.md +35 -35
  101. package/harness/bundles/java/claude-code/harness-archive/checklist.md +5 -2
  102. package/harness/bundles/java/claude-code/harness-archive/reference.md +23 -7
  103. package/harness/bundles/java/claude-code/harness-codebase-map/SKILL.md +1 -1
  104. package/harness/bundles/java/claude-code/harness-knowledge-ingest/SKILL.md +1 -1
  105. package/harness/bundles/java/claude-code/harness-knowledge-query/SKILL.md +1 -1
  106. package/harness/bundles/java/claude-code/harness-package/SKILL.md +2 -2
  107. package/harness/bundles/java/claude-code/harness-plan/SKILL.md +4 -4
  108. package/harness/bundles/java/claude-code/harness-review/SKILL.md +2 -2
  109. package/harness/bundles/java/claude-code/harness-run/SKILL.md +2 -2
  110. package/harness/bundles/java/claude-code/harness-submit/SKILL.md +2 -2
  111. package/harness/bundles/java/claude-code/harness-sync/SKILL.md +1 -1
  112. package/harness/bundles/java/claude-code/harness-test/SKILL.md +2 -2
  113. package/harness/bundles/java/claude-code/protocols/archive-report-protocol.md +7 -3
  114. package/harness/bundles/java/claude-code/protocols/ledger-protocol.md +1 -1
  115. package/harness/bundles/java/claude-code/protocols/report-pipeline-protocol.md +6 -4
  116. package/harness/bundles/java/claude-code/protocols/state-layout-protocol.md +3 -2
  117. package/harness/bundles/java/claude-code/scripts/harness_archive.py +829 -68
  118. package/harness/bundles/java/claude-code/scripts/harness_context.py +8 -2
  119. package/harness/bundles/java/claude-code/scripts/harness_events.py +5 -0
  120. package/harness/bundles/java/claude-code/scripts/harness_ledger.py +79 -2
  121. package/harness/bundles/java/claude-code/scripts/harness_profile.py +7 -0
  122. package/harness/bundles/java/claude-code/scripts/harness_state.py +22 -3
  123. package/harness/bundles/java/codebuddy/.harness-build.json +1 -1
  124. package/harness/bundles/java/codebuddy/README.md +7 -7
  125. package/harness/bundles/java/codebuddy/harness-apidoc/SKILL.md +2 -2
  126. package/harness/bundles/java/codebuddy/harness-archive/SKILL.md +35 -35
  127. package/harness/bundles/java/codebuddy/harness-archive/checklist.md +5 -2
  128. package/harness/bundles/java/codebuddy/harness-archive/reference.md +23 -7
  129. package/harness/bundles/java/codebuddy/harness-codebase-map/SKILL.md +1 -1
  130. package/harness/bundles/java/codebuddy/harness-knowledge-ingest/SKILL.md +1 -1
  131. package/harness/bundles/java/codebuddy/harness-knowledge-query/SKILL.md +1 -1
  132. package/harness/bundles/java/codebuddy/harness-package/SKILL.md +2 -2
  133. package/harness/bundles/java/codebuddy/harness-plan/SKILL.md +4 -4
  134. package/harness/bundles/java/codebuddy/harness-review/SKILL.md +2 -2
  135. package/harness/bundles/java/codebuddy/harness-run/SKILL.md +2 -2
  136. package/harness/bundles/java/codebuddy/harness-submit/SKILL.md +2 -2
  137. package/harness/bundles/java/codebuddy/harness-sync/SKILL.md +1 -1
  138. package/harness/bundles/java/codebuddy/harness-test/SKILL.md +2 -2
  139. package/harness/bundles/java/codebuddy/protocols/archive-report-protocol.md +7 -3
  140. package/harness/bundles/java/codebuddy/protocols/ledger-protocol.md +1 -1
  141. package/harness/bundles/java/codebuddy/protocols/report-pipeline-protocol.md +6 -4
  142. package/harness/bundles/java/codebuddy/protocols/state-layout-protocol.md +3 -2
  143. package/harness/bundles/java/codebuddy/scripts/harness_archive.py +829 -68
  144. package/harness/bundles/java/codebuddy/scripts/harness_context.py +8 -2
  145. package/harness/bundles/java/codebuddy/scripts/harness_events.py +5 -0
  146. package/harness/bundles/java/codebuddy/scripts/harness_ledger.py +79 -2
  147. package/harness/bundles/java/codebuddy/scripts/harness_profile.py +7 -0
  148. package/harness/bundles/java/codebuddy/scripts/harness_state.py +22 -3
  149. package/harness/bundles/java/codex/.harness-build.json +1 -1
  150. package/harness/bundles/java/codex/README.md +7 -7
  151. package/harness/bundles/java/codex/harness-apidoc/SKILL.md +2 -2
  152. package/harness/bundles/java/codex/harness-archive/SKILL.md +35 -35
  153. package/harness/bundles/java/codex/harness-archive/checklist.md +5 -2
  154. package/harness/bundles/java/codex/harness-archive/reference.md +23 -7
  155. package/harness/bundles/java/codex/harness-codebase-map/SKILL.md +1 -1
  156. package/harness/bundles/java/codex/harness-knowledge-ingest/SKILL.md +1 -1
  157. package/harness/bundles/java/codex/harness-knowledge-query/SKILL.md +1 -1
  158. package/harness/bundles/java/codex/harness-package/SKILL.md +2 -2
  159. package/harness/bundles/java/codex/harness-plan/SKILL.md +4 -4
  160. package/harness/bundles/java/codex/harness-review/SKILL.md +2 -2
  161. package/harness/bundles/java/codex/harness-run/SKILL.md +2 -2
  162. package/harness/bundles/java/codex/harness-submit/SKILL.md +2 -2
  163. package/harness/bundles/java/codex/harness-sync/SKILL.md +1 -1
  164. package/harness/bundles/java/codex/harness-test/SKILL.md +2 -2
  165. package/harness/bundles/java/codex/protocols/archive-report-protocol.md +7 -3
  166. package/harness/bundles/java/codex/protocols/ledger-protocol.md +1 -1
  167. package/harness/bundles/java/codex/protocols/report-pipeline-protocol.md +6 -4
  168. package/harness/bundles/java/codex/protocols/state-layout-protocol.md +3 -2
  169. package/harness/bundles/java/codex/scripts/harness_archive.py +829 -68
  170. package/harness/bundles/java/codex/scripts/harness_context.py +8 -2
  171. package/harness/bundles/java/codex/scripts/harness_events.py +5 -0
  172. package/harness/bundles/java/codex/scripts/harness_ledger.py +79 -2
  173. package/harness/bundles/java/codex/scripts/harness_profile.py +7 -0
  174. package/harness/bundles/java/codex/scripts/harness_state.py +22 -3
  175. package/harness/bundles/java/cursor/.harness-build.json +1 -1
  176. package/harness/bundles/java/cursor/README.md +7 -7
  177. package/harness/bundles/java/cursor/harness-apidoc/SKILL.md +2 -2
  178. package/harness/bundles/java/cursor/harness-archive/SKILL.md +35 -35
  179. package/harness/bundles/java/cursor/harness-archive/checklist.md +5 -2
  180. package/harness/bundles/java/cursor/harness-archive/reference.md +23 -7
  181. package/harness/bundles/java/cursor/harness-codebase-map/SKILL.md +1 -1
  182. package/harness/bundles/java/cursor/harness-knowledge-ingest/SKILL.md +1 -1
  183. package/harness/bundles/java/cursor/harness-knowledge-query/SKILL.md +1 -1
  184. package/harness/bundles/java/cursor/harness-package/SKILL.md +2 -2
  185. package/harness/bundles/java/cursor/harness-plan/SKILL.md +4 -4
  186. package/harness/bundles/java/cursor/harness-review/SKILL.md +2 -2
  187. package/harness/bundles/java/cursor/harness-run/SKILL.md +2 -2
  188. package/harness/bundles/java/cursor/harness-submit/SKILL.md +2 -2
  189. package/harness/bundles/java/cursor/harness-sync/SKILL.md +1 -1
  190. package/harness/bundles/java/cursor/harness-test/SKILL.md +2 -2
  191. package/harness/bundles/java/cursor/protocols/archive-report-protocol.md +7 -3
  192. package/harness/bundles/java/cursor/protocols/ledger-protocol.md +1 -1
  193. package/harness/bundles/java/cursor/protocols/report-pipeline-protocol.md +6 -4
  194. package/harness/bundles/java/cursor/protocols/state-layout-protocol.md +3 -2
  195. package/harness/bundles/java/cursor/scripts/harness_archive.py +829 -68
  196. package/harness/bundles/java/cursor/scripts/harness_context.py +8 -2
  197. package/harness/bundles/java/cursor/scripts/harness_events.py +5 -0
  198. package/harness/bundles/java/cursor/scripts/harness_ledger.py +79 -2
  199. package/harness/bundles/java/cursor/scripts/harness_profile.py +7 -0
  200. package/harness/bundles/java/cursor/scripts/harness_state.py +22 -3
  201. package/harness/manifests/general/claude-code.json +26 -26
  202. package/harness/manifests/general/codebuddy.json +26 -26
  203. package/harness/manifests/general/codex.json +26 -26
  204. package/harness/manifests/general/cursor.json +26 -26
  205. package/harness/manifests/java/claude-code.json +28 -28
  206. package/harness/manifests/java/codebuddy.json +28 -28
  207. package/harness/manifests/java/codex.json +28 -28
  208. package/harness/manifests/java/cursor.json +28 -28
  209. package/hunter-workflow-family.json +5 -5
  210. package/package.json +1 -1
@@ -4,7 +4,7 @@ description: 6维度代码审查(架构/安全/规范/兼容/测试/性能)
4
4
  .harness/context-index.json)和测试场景表,在隔离上下文运行。仅当用户显式调用 /harness-review 时使用;不得在
5
5
  test 结束后自动接续执行。
6
6
  ---
7
- <!-- generated by harness_deploy.py; core=ed5c4708eeba6351; overlay=java; agent=codebuddy; do not edit -->
7
+ <!-- generated by harness_deploy.py; core=c4b98f515e0ec1ae; overlay=java; agent=codebuddy; do not edit -->
8
8
  # harness-review — 代码审查
9
9
 
10
10
  ## Purpose
@@ -38,7 +38,7 @@ description: 6维度代码审查(架构/安全/规范/兼容/测试/性能)
38
38
  6. **implementation-detail** — 自适应执行参考;legacy 缺失 🟡WARN,不阻断
39
39
  7. **test-scenarios** — 测试真相源:`plans/<change>-test-scenarios.md`
40
40
  8. **禁止读取 `docs/superpowers/` 作为正式输入** — 旧草稿仅人工线索
41
- 9. **每个 skill 边界只刷新一次状态快照** — 先运行 `python <skills-root>/scripts/harness_state.py capture --project . --change-dir ".harness/changes/<change-name>" --base <baseCommit> --json`;`changedSegments=[]` 时复用已有 profile/rules/map/change/code 指纹,不再重复跑全量 `harness-sync` 或代码库扫描。`knowledge` 段仅为兼容空段,知识始终按需远端查询;快照不能替代源码读取和验证门禁。
41
+ 9. **每个 skill 边界只刷新一次状态快照** — 先运行 `python <skills-root>/scripts/harness_state.py capture --project . --change-dir ".harness/changes/<change-name>" --json`。首次 Plan 捕获时,脚本把当时的 Git HEAD 写入不可变 `changeBase`;后续阶段只刷新 `git.head` 与各段指纹,不得用当前 HEAD 覆盖 `changeBase`。只有迁移旧 change 且已能证明真实计划起点时,才在首次补录时传 `--base <baseCommit>`。`changedSegments=[]` 时复用已有 profile/rules/map/change/code 指纹,不再重复跑全量 `harness-sync` 或代码库扫描。`knowledge` 段仅为兼容空段,知识始终按需远端查询;快照不能替代源码读取和验证门禁。
42
42
 
43
43
  状态目录分层:新路径优先,旧路径兼容 → [[../protocols/state-layout-protocol.md|state-layout-protocol]]
44
44
  > 片段:read-protocol
@@ -3,7 +3,7 @@ name: harness-run
3
3
  description: 按变更簇执行 TDD 编码循环(RED→GREEN→REFACTOR→编译验证),逐变更簇实现计划中的任务。仅当用户显式调用
4
4
  /harness-run 时使用;不得因用户提到编码/实现就自动触发,也不得被其他阶段 skill 自动接续。
5
5
  ---
6
- <!-- generated by harness_deploy.py; core=ed5c4708eeba6351; overlay=java; agent=codebuddy; do not edit -->
6
+ <!-- generated by harness_deploy.py; core=c4b98f515e0ec1ae; overlay=java; agent=codebuddy; do not edit -->
7
7
  # harness-run — 需求编码
8
8
 
9
9
  ## Purpose
@@ -48,7 +48,7 @@ description: 按变更簇执行 TDD 编码循环(RED→GREEN→REFACTOR→编
48
48
  6. **implementation-detail** — 自适应执行参考;legacy 缺失 🟡WARN,不阻断
49
49
  7. **test-scenarios** — 测试真相源:`plans/<change>-test-scenarios.md`
50
50
  8. **禁止读取 `docs/superpowers/` 作为正式输入** — 旧草稿仅人工线索
51
- 9. **每个 skill 边界只刷新一次状态快照** — 先运行 `python <skills-root>/scripts/harness_state.py capture --project . --change-dir ".harness/changes/<change-name>" --base <baseCommit> --json`;`changedSegments=[]` 时复用已有 profile/rules/map/change/code 指纹,不再重复跑全量 `harness-sync` 或代码库扫描。`knowledge` 段仅为兼容空段,知识始终按需远端查询;快照不能替代源码读取和验证门禁。
51
+ 9. **每个 skill 边界只刷新一次状态快照** — 先运行 `python <skills-root>/scripts/harness_state.py capture --project . --change-dir ".harness/changes/<change-name>" --json`。首次 Plan 捕获时,脚本把当时的 Git HEAD 写入不可变 `changeBase`;后续阶段只刷新 `git.head` 与各段指纹,不得用当前 HEAD 覆盖 `changeBase`。只有迁移旧 change 且已能证明真实计划起点时,才在首次补录时传 `--base <baseCommit>`。`changedSegments=[]` 时复用已有 profile/rules/map/change/code 指纹,不再重复跑全量 `harness-sync` 或代码库扫描。`knowledge` 段仅为兼容空段,知识始终按需远端查询;快照不能替代源码读取和验证门禁。
52
52
 
53
53
  状态目录分层:新路径优先,旧路径兼容 → [[../protocols/state-layout-protocol.md|state-layout-protocol]]
54
54
  > 片段:read-protocol · run 必读文件优先级 → `reference.md` Step 0
@@ -3,7 +3,7 @@ name: harness-submit
3
3
  description: 最终提交封装:验证→中文 commit→提交/推送;worktree 模式含 --no-ff 合并回主分支。仅当用户显式调用
4
4
  /harness-submit(或 /harness-merge 重入合并段)时使用;用户口头说'提交/commit/push'时必须先确认,不得自动触发。
5
5
  ---
6
- <!-- generated by harness_deploy.py; core=ed5c4708eeba6351; overlay=java; agent=codebuddy; do not edit -->
6
+ <!-- generated by harness_deploy.py; core=c4b98f515e0ec1ae; overlay=java; agent=codebuddy; do not edit -->
7
7
  # harness-submit — 最终提交(含 worktree 合并)
8
8
 
9
9
  ## Purpose
@@ -37,7 +37,7 @@ description: 最终提交封装:验证→中文 commit→提交/推送;workt
37
37
  6. **implementation-detail** — 自适应执行参考;legacy 缺失 🟡WARN,不阻断
38
38
  7. **test-scenarios** — 测试真相源:`plans/<change>-test-scenarios.md`
39
39
  8. **禁止读取 `docs/superpowers/` 作为正式输入** — 旧草稿仅人工线索
40
- 9. **每个 skill 边界只刷新一次状态快照** — 先运行 `python <skills-root>/scripts/harness_state.py capture --project . --change-dir ".harness/changes/<change-name>" --base <baseCommit> --json`;`changedSegments=[]` 时复用已有 profile/rules/map/change/code 指纹,不再重复跑全量 `harness-sync` 或代码库扫描。`knowledge` 段仅为兼容空段,知识始终按需远端查询;快照不能替代源码读取和验证门禁。
40
+ 9. **每个 skill 边界只刷新一次状态快照** — 先运行 `python <skills-root>/scripts/harness_state.py capture --project . --change-dir ".harness/changes/<change-name>" --json`。首次 Plan 捕获时,脚本把当时的 Git HEAD 写入不可变 `changeBase`;后续阶段只刷新 `git.head` 与各段指纹,不得用当前 HEAD 覆盖 `changeBase`。只有迁移旧 change 且已能证明真实计划起点时,才在首次补录时传 `--base <baseCommit>`。`changedSegments=[]` 时复用已有 profile/rules/map/change/code 指纹,不再重复跑全量 `harness-sync` 或代码库扫描。`knowledge` 段仅为兼容空段,知识始终按需远端查询;快照不能替代源码读取和验证门禁。
41
41
 
42
42
  状态目录分层:新路径优先,旧路径兼容 → [[../protocols/state-layout-protocol.md|state-layout-protocol]]
43
43
  > 片段:read-protocol
@@ -4,7 +4,7 @@ description: Use when the user asks to synchronize, refresh, or validate Harness
4
4
  metadata, adapters, remote knowledge ownership, instruction entrypoints,
5
5
  config origins, or CodeGraph status.
6
6
  ---
7
- <!-- generated by harness_deploy.py; core=ed5c4708eeba6351; overlay=java; agent=codebuddy; do not edit -->
7
+ <!-- generated by harness_deploy.py; core=c4b98f515e0ec1ae; overlay=java; agent=codebuddy; do not edit -->
8
8
  # harness-sync
9
9
 
10
10
  ## Purpose
@@ -3,7 +3,7 @@ name: harness-test
3
3
  description: 测试执行:读取场景表,执行单元测试+API接口测试+数据兼容验证,输出测试报告。仅当用户显式调用 /harness-test
4
4
  时使用;不得在 run 结束后自动接续执行。
5
5
  ---
6
- <!-- generated by harness_deploy.py; core=ed5c4708eeba6351; overlay=java; agent=codebuddy; do not edit -->
6
+ <!-- generated by harness_deploy.py; core=c4b98f515e0ec1ae; overlay=java; agent=codebuddy; do not edit -->
7
7
  # harness-test — 测试执行
8
8
 
9
9
  ## Purpose
@@ -39,7 +39,7 @@ description: 测试执行:读取场景表,执行单元测试+API接口测试
39
39
  6. **implementation-detail** — 自适应执行参考;legacy 缺失 🟡WARN,不阻断
40
40
  7. **test-scenarios** — 测试真相源:`plans/<change>-test-scenarios.md`
41
41
  8. **禁止读取 `docs/superpowers/` 作为正式输入** — 旧草稿仅人工线索
42
- 9. **每个 skill 边界只刷新一次状态快照** — 先运行 `python <skills-root>/scripts/harness_state.py capture --project . --change-dir ".harness/changes/<change-name>" --base <baseCommit> --json`;`changedSegments=[]` 时复用已有 profile/rules/map/change/code 指纹,不再重复跑全量 `harness-sync` 或代码库扫描。`knowledge` 段仅为兼容空段,知识始终按需远端查询;快照不能替代源码读取和验证门禁。
42
+ 9. **每个 skill 边界只刷新一次状态快照** — 先运行 `python <skills-root>/scripts/harness_state.py capture --project . --change-dir ".harness/changes/<change-name>" --json`。首次 Plan 捕获时,脚本把当时的 Git HEAD 写入不可变 `changeBase`;后续阶段只刷新 `git.head` 与各段指纹,不得用当前 HEAD 覆盖 `changeBase`。只有迁移旧 change 且已能证明真实计划起点时,才在首次补录时传 `--base <baseCommit>`。`changedSegments=[]` 时复用已有 profile/rules/map/change/code 指纹,不再重复跑全量 `harness-sync` 或代码库扫描。`knowledge` 段仅为兼容空段,知识始终按需远端查询;快照不能替代源码读取和验证门禁。
43
43
 
44
44
  状态目录分层:新路径优先,旧路径兼容 → [[../protocols/state-layout-protocol.md|state-layout-protocol]]
45
45
  > 片段:read-protocol
@@ -6,7 +6,7 @@ description: harness-archive 的结构化归档与 summary-data 校验协议。
6
6
 
7
7
  ## 原则
8
8
 
9
- 归档不应维护与平台重复的展示文件。事实收集与校验由 `harness_archive.py finalize` 单命令完成(cleanup → **freeze(事件 cutoff)** → collect → source consistency → summary validate → archive-meta);模型仅通过 events 写入维护结论。`meta/archive-meta.md` 由 finalize 生成,禁止手写。历史 archive 回放用 `harness_archive.py replay`(只读,不写 archive-meta / 不跑 cleanup)。
9
+ 归档不应维护与平台重复的展示文件。常规入口是 `harness_archive.py execute`:它一次性完成状态采集与自动门禁,再复用预检结果调用 finalize。finalize 执行 cleanup → **freeze(事件 cutoff)** → collect → source consistency → summary validate → archive-meta。模型仅通过 events 写入维护结论。`meta/archive-meta.md` 由 finalize 生成,禁止手写。历史 archive 回放用 `harness_archive.py replay`(只读,不写 archive-meta / 不跑 cleanup)。
10
10
 
11
11
  `knownRisks` 仅收录 severity∈{warning,error,critical} 的 issue 事件;无 severity 的 issue 进入 `maintenanceNotes`。`finalStatusReasons` 解释 CONDITIONAL_OK/WARN/FAIL 原因。finalize 在 before-manifest 前 cleanup:删除 lock/pid/launcher/credential,截断超大日志。
12
12
 
@@ -141,7 +141,11 @@ powershell.exe -NoProfile -ExecutionPolicy Bypass -File "harness-skills/harness-
141
141
 
142
142
  ## 数据校验
143
143
 
144
- `validate` 是 `harness_archive.py finalize` 的内嵌同进程步骤(不存在独立 `report validate` CLI)。validate error 存在时,finalize 恢复原 changes 目录并 exit 非 0,绝不删除原 changes 目录。Hunter Platform 直接读取已校验的 `summary-data.json`。
144
+ `validate` 是 finalize 的内嵌同进程步骤(不存在独立 `report validate` CLI)。validate error 存在时,finalize 恢复原 changes 目录并 exit 非 0,绝不删除原 changes 目录。warning 保留在报告中,但不会被误判为 validate error。Hunter Platform 直接读取已校验的 `summary-data.json`。
145
+
146
+ 正常完成时,`baseCommit` 与产品 tip 相同属于 `ARCHIVE_BASE_EQUALS_FEATURE_TIP`,必须在暂存前阻断。不得手工改 ledger 或 state snapshot。已有提交确属本变更时,使用 `adopt-existing-range` 生成绑定仓库、ownership 和 diffHash 的不可变收据;主动废弃或被替代时允许零产品增量,但必须记录中文原因,且固定 `releaseEligible=false`。
147
+
148
+ 候选收据缺失时,`execute` 可以复用身份一致、范围完整的 `unitTestFull` ledger 自动生成本地候选认证。提交只改变 commit 身份而产品树和验证输入未变化时,允许安全重绑定到当前 HEAD;该过程不得执行测试。门禁策略未声明数据库能力且未要求 `dbCompatibility` 时,数据库投影为带原因的 `NOT_APPLICABLE`,不得把缺少无关数据库证据升级为归档错误。
145
149
 
146
150
  ## 冻结优先 finalize 与两层一致性(schemaVersion 2.3 起)
147
151
 
@@ -167,7 +171,7 @@ repair 先在 archive 外生成候选 derived version。来源校验与数据校
167
171
  archive close 的破坏性事务只执行确定性 close:
168
172
 
169
173
  ```text
170
- status -> manifest -> move -> collect -> validate -> compare
174
+ execute(one-shot status + gate) -> manifest -> move -> collect -> validate -> compare
171
175
  -> 生成确定性核心 ZIP -> 上传并等待服务端持久化/ingest 收据 -> stop AI service -> return
172
176
  ```
173
177
 
@@ -329,7 +329,7 @@ v2 契约下 `record` 写入前强制解析并校验顶层身份字段,缺失
329
329
  | `schemaVersion` | 固定 `3` |
330
330
  | `repositoryId` | `harness_paths.repository_identity(repo_root)`(远端规范化 + root commit;无远端回退 git common-dir,跨 worktree 稳定,RET-09) |
331
331
  | `changeName` | change 目录名 |
332
- | `baseCommit` | `--base-commit` → 既有 ledger 值 → `git rev-parse --verify HEAD` |
332
+ | `baseCommit` | `--base-commit` → 既有 ledger 值 → `state-snapshot.json.changeBase`。只有全新 change 的首次 ledger 写入可以用当时 HEAD 建立基线;旧 ledger 迁移缺少以上三种证据时必须报错,禁止用迁移时的当前 HEAD 猜测基线 |
333
333
  | `currentHead` | `git rev-parse --verify HEAD`(验证执行时) |
334
334
  | `diffHash` | `--diff-hash` → 既有 ledger 值 → 按 ownership 范围重算(§10.3) |
335
335
  | `ownershipHash` | 契约 `ownership` 段规范化 JSON 的 sha256 |
@@ -19,12 +19,12 @@ description: 结构化事件、summary-data 生成与校验,以及外部可观
19
19
  Skill-bundled 脚本(推荐):
20
20
 
21
21
  ```powershell
22
- python <skills-root>/scripts/harness_archive.py finalize --change-dir ".harness/changes/<change-name>" --archive-root ".harness/archive" --json
22
+ python <skills-root>/scripts/harness_archive.py execute --change-dir ".harness/changes/<change-name>" --archive-root ".harness/archive" --intent record-only --closure completed --json
23
23
  python <skills-root>/scripts/harness_archive.py replay --archive-dir ".harness/archive/YYYY-MM-DD-<change-name>" --json
24
24
  python <skills-root>/scripts/harness_events.py append --change-dir ".harness/changes/<change-name>" --phase "<phase>" --type <type> [--note "..."]
25
25
  ```
26
26
 
27
- 归档报告流水线只有两个入口,均由 `harness_archive.py` 提供:`collect` 与 `validate` 是 `finalize` 的内嵌同进程步骤,**不作为独立 CLI 暴露**(不存在 `report collect` / `report validate` 子命令)。`summary-data.json` 只能由 `finalize`(归档时)或 `replay`(回放时)生成;**禁止 agent 临场手写或拼装等价的 `summary-data.json`**。`harness_archive.py` 不可用时归档失败退出,不得退回手写汇总。
27
+ 归档报告流水线的常规入口是 `execute`。它只采集一次状态并复用给内部 finalize;`collect` 与 `validate` 是 finalize 的内嵌同进程步骤,**不作为独立 CLI 暴露**(不存在 `report collect` / `report validate` 子命令)。`summary-data.json` 只能由 finalize(归档时)或 `replay`(回放时)生成;**禁止 agent 临场手写或拼装等价的 `summary-data.json`**。`harness_archive.py` 不可用时归档失败退出,不得退回手写汇总。
28
28
 
29
29
  ## events.ndjson
30
30
 
@@ -141,14 +141,16 @@ summary-data 必须保留原 archive final report 维度,并增加事件层摘
141
141
 
142
142
  新增 `reportPipeline` 不替代这些字段;它负责为这些字段提供可追溯的数据来源和一致性校验结果。
143
143
 
144
- ## finalize 责任边界(`harness_archive.py finalize`)
144
+ ## execute finalize 责任边界
145
+
146
+ `execute` 负责一次性状态采集、自动门禁、准备耗时事件和对 finalize 的单次调用。常规调用者不得串行执行 `auto-gate`、`status`、`finalize`。finalize 负责正式归档尝试,并复用 execute 传入的预检结果。
145
147
 
146
148
  | 阶段 | 责任 | 写入 |
147
149
  |---|---|---|
148
150
  | `collect` | 从 events/ledger/log/manifest/report/git evidence 收集事实 | `summary-data.json` |
149
151
  | `validate` | 检查 summary-data 的身份、验证状态与事实是否一致 | issues;不得静默忽略 error |
150
152
 
151
- > **已废弃**:独立 `enrich` 步骤与 `harness-report` skill;全部并入 `finalize` 单命令。回放见 `harness_archive.py replay`。
153
+ > **已废弃**:独立 `enrich` 步骤与 `harness-report` skill;报告生成并入 finalize,常规归档由 `execute` 调用。回放见 `harness_archive.py replay`。
152
154
 
153
155
  `validate` error 存在时,`harness-archive` 不得删除原 changes 目录。
154
156
 
@@ -141,7 +141,7 @@ package SHA-256,且服务端同时确认 `archive_status=durable` 与
141
141
 
142
142
  ## state-snapshot.json(cluster 3 §3.6)
143
143
 
144
- `meta/state-snapshot.json`(由 `harness_state.py` 写入)集中记录 project/worktree rootHEAD/base、profile/rules/map/knowledge/diff 各段指纹与相关文件。plan/run/test/review/submit 读取该快照;失效时由脚本刷新,**不得仅凭缓存跳过代码或验证门禁**。
144
+ `meta/state-snapshot.json`(由 `harness_state.py` 写入)集中记录 project/worktree root、不可变 `changeBase`、当前 HEAD,以及 profile/rules/map/knowledge/diff 各段指纹与相关文件。Plan 首次捕获把当时 HEAD 写入 `changeBase`;run/test/review/submit/archive 刷新时只能更新当前 HEAD 和各段指纹。失效时由脚本刷新,**不得仅凭缓存跳过代码或验证门禁,也不得把后续 HEAD 覆盖为变更基线**。
145
145
 
146
146
  schema:
147
147
 
@@ -150,6 +150,7 @@ schema:
150
150
  "schemaVersion": 1,
151
151
  "generatedAt": "<iso>",
152
152
  "changeName": "<change-name>",
153
+ "changeBase": "<首次 Plan 捕获的 sha>",
153
154
  "project": {"root": "<abs>"},
154
155
  "worktree": {"root": "<abs>"},
155
156
  "git": {"base": "<sha>", "head": "<sha>"},
@@ -159,7 +160,7 @@ schema:
159
160
  }
160
161
  ```
161
162
 
162
- 各段独立失效:`is_segment_stale(snapshot, segment, current_fingerprint)` 比较单段指纹;段不存在 → stale(需采集)。`refresh_segments(..., segments=["profile"])` 只重采受影响段,其他段保留原 capturedAt/fingerprint(缓存失效只重采受影响段)。
163
+ 各段独立失效:`is_segment_stale(snapshot, segment, current_fingerprint)` 比较单段指纹;段不存在 → stale(需采集)。`refresh_segments(..., segments=["profile"])` 只重采受影响段,其他段保留原 capturedAt/fingerprint(缓存失效只重采受影响段)。`git.base` 是 `changeBase` 的兼容镜像,不是每次 capture 的 HEAD。
163
164
 
164
165
  segment 的文件集由调用方(各 skill)决定:`capture_snapshot(..., segment_files={"profile": [...], "rules": [...]})`。snapshot 只负责采集 + 比对 + 失效,不负责发现文件。git 段记录 base/head;diff 段指纹由调用方按需用 `harness_ledger.compute_diff_hash` 采集后填入 segment_files。
165
166