@hunter-harness/workflow-harness 0.2.8 → 0.2.9

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 (222) 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 +3 -3
  3. package/harness/bundles/general/claude-code/harness-archive/SKILL.md +3 -3
  4. package/harness/bundles/general/claude-code/harness-archive/reference.md +18 -10
  5. package/harness/bundles/general/claude-code/harness-archive/templates/render-summary.mjs +5 -1
  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 +1 -1
  10. package/harness/bundles/general/claude-code/harness-plan/checklist.md +6 -0
  11. package/harness/bundles/general/claude-code/harness-review/SKILL.md +1 -1
  12. package/harness/bundles/general/claude-code/harness-run/SKILL.md +1 -1
  13. package/harness/bundles/general/claude-code/harness-run/checklist.md +5 -0
  14. package/harness/bundles/general/claude-code/harness-run/reference.md +31 -1
  15. package/harness/bundles/general/claude-code/harness-submit/SKILL.md +1 -1
  16. package/harness/bundles/general/claude-code/harness-sync/SKILL.md +1 -1
  17. package/harness/bundles/general/claude-code/harness-test/SKILL.md +1 -1
  18. package/harness/bundles/general/claude-code/harness-test/checklist.md +9 -0
  19. package/harness/bundles/general/claude-code/harness-test/pitfalls-java.md +14 -0
  20. package/harness/bundles/general/claude-code/harness-test/reference.md +36 -0
  21. package/harness/bundles/general/claude-code/protocols/archive-report-protocol.md +3 -1
  22. package/harness/bundles/general/claude-code/protocols/ledger-protocol.md +2 -0
  23. package/harness/bundles/general/claude-code/protocols/powershell-protocol.md +16 -0
  24. package/harness/bundles/general/claude-code/protocols/report-pipeline-protocol.md +17 -0
  25. package/harness/bundles/general/claude-code/scripts/harness_archive.py +568 -58
  26. package/harness/bundles/general/claude-code/scripts/harness_events.py +70 -19
  27. package/harness/bundles/general/claude-code/scripts/harness_gate.py +178 -25
  28. package/harness/bundles/general/claude-code/scripts/harness_ledger.py +17 -0
  29. package/harness/bundles/general/codebuddy/.harness-build.json +1 -1
  30. package/harness/bundles/general/codebuddy/contracts/workflow-policy.json +3 -3
  31. package/harness/bundles/general/codebuddy/harness-archive/SKILL.md +3 -3
  32. package/harness/bundles/general/codebuddy/harness-archive/reference.md +18 -10
  33. package/harness/bundles/general/codebuddy/harness-archive/templates/render-summary.mjs +5 -1
  34. package/harness/bundles/general/codebuddy/harness-codebase-map/SKILL.md +1 -1
  35. package/harness/bundles/general/codebuddy/harness-knowledge-ingest/SKILL.md +1 -1
  36. package/harness/bundles/general/codebuddy/harness-knowledge-query/SKILL.md +1 -1
  37. package/harness/bundles/general/codebuddy/harness-plan/SKILL.md +1 -1
  38. package/harness/bundles/general/codebuddy/harness-plan/checklist.md +6 -0
  39. package/harness/bundles/general/codebuddy/harness-review/SKILL.md +1 -1
  40. package/harness/bundles/general/codebuddy/harness-run/SKILL.md +1 -1
  41. package/harness/bundles/general/codebuddy/harness-run/checklist.md +5 -0
  42. package/harness/bundles/general/codebuddy/harness-run/reference.md +31 -1
  43. package/harness/bundles/general/codebuddy/harness-submit/SKILL.md +1 -1
  44. package/harness/bundles/general/codebuddy/harness-sync/SKILL.md +1 -1
  45. package/harness/bundles/general/codebuddy/harness-test/SKILL.md +1 -1
  46. package/harness/bundles/general/codebuddy/harness-test/checklist.md +9 -0
  47. package/harness/bundles/general/codebuddy/harness-test/pitfalls-java.md +14 -0
  48. package/harness/bundles/general/codebuddy/harness-test/reference.md +36 -0
  49. package/harness/bundles/general/codebuddy/protocols/archive-report-protocol.md +3 -1
  50. package/harness/bundles/general/codebuddy/protocols/ledger-protocol.md +2 -0
  51. package/harness/bundles/general/codebuddy/protocols/powershell-protocol.md +16 -0
  52. package/harness/bundles/general/codebuddy/protocols/report-pipeline-protocol.md +17 -0
  53. package/harness/bundles/general/codebuddy/scripts/harness_archive.py +568 -58
  54. package/harness/bundles/general/codebuddy/scripts/harness_events.py +70 -19
  55. package/harness/bundles/general/codebuddy/scripts/harness_gate.py +178 -25
  56. package/harness/bundles/general/codebuddy/scripts/harness_ledger.py +17 -0
  57. package/harness/bundles/general/codex/.harness-build.json +1 -1
  58. package/harness/bundles/general/codex/contracts/workflow-policy.json +3 -3
  59. package/harness/bundles/general/codex/harness-archive/SKILL.md +3 -3
  60. package/harness/bundles/general/codex/harness-archive/reference.md +18 -10
  61. package/harness/bundles/general/codex/harness-archive/templates/render-summary.mjs +5 -1
  62. package/harness/bundles/general/codex/harness-codebase-map/SKILL.md +1 -1
  63. package/harness/bundles/general/codex/harness-knowledge-ingest/SKILL.md +1 -1
  64. package/harness/bundles/general/codex/harness-knowledge-query/SKILL.md +1 -1
  65. package/harness/bundles/general/codex/harness-plan/SKILL.md +1 -1
  66. package/harness/bundles/general/codex/harness-plan/checklist.md +6 -0
  67. package/harness/bundles/general/codex/harness-review/SKILL.md +1 -1
  68. package/harness/bundles/general/codex/harness-run/SKILL.md +1 -1
  69. package/harness/bundles/general/codex/harness-run/checklist.md +5 -0
  70. package/harness/bundles/general/codex/harness-run/reference.md +31 -1
  71. package/harness/bundles/general/codex/harness-submit/SKILL.md +1 -1
  72. package/harness/bundles/general/codex/harness-sync/SKILL.md +1 -1
  73. package/harness/bundles/general/codex/harness-test/SKILL.md +1 -1
  74. package/harness/bundles/general/codex/harness-test/checklist.md +9 -0
  75. package/harness/bundles/general/codex/harness-test/pitfalls-java.md +14 -0
  76. package/harness/bundles/general/codex/harness-test/reference.md +36 -0
  77. package/harness/bundles/general/codex/protocols/archive-report-protocol.md +3 -1
  78. package/harness/bundles/general/codex/protocols/ledger-protocol.md +2 -0
  79. package/harness/bundles/general/codex/protocols/powershell-protocol.md +16 -0
  80. package/harness/bundles/general/codex/protocols/report-pipeline-protocol.md +17 -0
  81. package/harness/bundles/general/codex/scripts/harness_archive.py +568 -58
  82. package/harness/bundles/general/codex/scripts/harness_events.py +70 -19
  83. package/harness/bundles/general/codex/scripts/harness_gate.py +178 -25
  84. package/harness/bundles/general/codex/scripts/harness_ledger.py +17 -0
  85. package/harness/bundles/general/cursor/.harness-build.json +1 -1
  86. package/harness/bundles/general/cursor/contracts/workflow-policy.json +3 -3
  87. package/harness/bundles/general/cursor/harness-archive/SKILL.md +3 -3
  88. package/harness/bundles/general/cursor/harness-archive/reference.md +18 -10
  89. package/harness/bundles/general/cursor/harness-archive/templates/render-summary.mjs +5 -1
  90. package/harness/bundles/general/cursor/harness-codebase-map/SKILL.md +1 -1
  91. package/harness/bundles/general/cursor/harness-knowledge-ingest/SKILL.md +1 -1
  92. package/harness/bundles/general/cursor/harness-knowledge-query/SKILL.md +1 -1
  93. package/harness/bundles/general/cursor/harness-plan/SKILL.md +1 -1
  94. package/harness/bundles/general/cursor/harness-plan/checklist.md +6 -0
  95. package/harness/bundles/general/cursor/harness-review/SKILL.md +1 -1
  96. package/harness/bundles/general/cursor/harness-run/SKILL.md +1 -1
  97. package/harness/bundles/general/cursor/harness-run/checklist.md +5 -0
  98. package/harness/bundles/general/cursor/harness-run/reference.md +31 -1
  99. package/harness/bundles/general/cursor/harness-submit/SKILL.md +1 -1
  100. package/harness/bundles/general/cursor/harness-sync/SKILL.md +1 -1
  101. package/harness/bundles/general/cursor/harness-test/SKILL.md +1 -1
  102. package/harness/bundles/general/cursor/harness-test/checklist.md +9 -0
  103. package/harness/bundles/general/cursor/harness-test/pitfalls-java.md +14 -0
  104. package/harness/bundles/general/cursor/harness-test/reference.md +36 -0
  105. package/harness/bundles/general/cursor/protocols/archive-report-protocol.md +3 -1
  106. package/harness/bundles/general/cursor/protocols/ledger-protocol.md +2 -0
  107. package/harness/bundles/general/cursor/protocols/powershell-protocol.md +16 -0
  108. package/harness/bundles/general/cursor/protocols/report-pipeline-protocol.md +17 -0
  109. package/harness/bundles/general/cursor/scripts/harness_archive.py +568 -58
  110. package/harness/bundles/general/cursor/scripts/harness_events.py +70 -19
  111. package/harness/bundles/general/cursor/scripts/harness_gate.py +178 -25
  112. package/harness/bundles/general/cursor/scripts/harness_ledger.py +17 -0
  113. package/harness/bundles/java/claude-code/.harness-build.json +1 -1
  114. package/harness/bundles/java/claude-code/contracts/workflow-policy.json +3 -3
  115. package/harness/bundles/java/claude-code/harness-apidoc/SKILL.md +1 -1
  116. package/harness/bundles/java/claude-code/harness-archive/SKILL.md +3 -3
  117. package/harness/bundles/java/claude-code/harness-archive/reference.md +18 -10
  118. package/harness/bundles/java/claude-code/harness-archive/templates/render-summary.mjs +5 -1
  119. package/harness/bundles/java/claude-code/harness-codebase-map/SKILL.md +1 -1
  120. package/harness/bundles/java/claude-code/harness-knowledge-ingest/SKILL.md +1 -1
  121. package/harness/bundles/java/claude-code/harness-knowledge-query/SKILL.md +1 -1
  122. package/harness/bundles/java/claude-code/harness-package/SKILL.md +1 -1
  123. package/harness/bundles/java/claude-code/harness-plan/SKILL.md +1 -1
  124. package/harness/bundles/java/claude-code/harness-plan/checklist.md +6 -0
  125. package/harness/bundles/java/claude-code/harness-review/SKILL.md +1 -1
  126. package/harness/bundles/java/claude-code/harness-run/SKILL.md +1 -1
  127. package/harness/bundles/java/claude-code/harness-submit/SKILL.md +1 -1
  128. package/harness/bundles/java/claude-code/harness-sync/SKILL.md +1 -1
  129. package/harness/bundles/java/claude-code/harness-test/SKILL.md +1 -1
  130. package/harness/bundles/java/claude-code/protocols/archive-report-protocol.md +3 -1
  131. package/harness/bundles/java/claude-code/protocols/ledger-protocol.md +2 -0
  132. package/harness/bundles/java/claude-code/protocols/powershell-protocol.md +16 -0
  133. package/harness/bundles/java/claude-code/protocols/report-pipeline-protocol.md +17 -0
  134. package/harness/bundles/java/claude-code/scripts/harness_archive.py +568 -58
  135. package/harness/bundles/java/claude-code/scripts/harness_events.py +70 -19
  136. package/harness/bundles/java/claude-code/scripts/harness_gate.py +178 -25
  137. package/harness/bundles/java/claude-code/scripts/harness_ledger.py +17 -0
  138. package/harness/bundles/java/codebuddy/.harness-build.json +1 -1
  139. package/harness/bundles/java/codebuddy/contracts/workflow-policy.json +3 -3
  140. package/harness/bundles/java/codebuddy/harness-apidoc/SKILL.md +1 -1
  141. package/harness/bundles/java/codebuddy/harness-archive/SKILL.md +3 -3
  142. package/harness/bundles/java/codebuddy/harness-archive/reference.md +18 -10
  143. package/harness/bundles/java/codebuddy/harness-archive/templates/render-summary.mjs +5 -1
  144. package/harness/bundles/java/codebuddy/harness-codebase-map/SKILL.md +1 -1
  145. package/harness/bundles/java/codebuddy/harness-knowledge-ingest/SKILL.md +1 -1
  146. package/harness/bundles/java/codebuddy/harness-knowledge-query/SKILL.md +1 -1
  147. package/harness/bundles/java/codebuddy/harness-package/SKILL.md +1 -1
  148. package/harness/bundles/java/codebuddy/harness-plan/SKILL.md +1 -1
  149. package/harness/bundles/java/codebuddy/harness-plan/checklist.md +6 -0
  150. package/harness/bundles/java/codebuddy/harness-review/SKILL.md +1 -1
  151. package/harness/bundles/java/codebuddy/harness-run/SKILL.md +1 -1
  152. package/harness/bundles/java/codebuddy/harness-submit/SKILL.md +1 -1
  153. package/harness/bundles/java/codebuddy/harness-sync/SKILL.md +1 -1
  154. package/harness/bundles/java/codebuddy/harness-test/SKILL.md +1 -1
  155. package/harness/bundles/java/codebuddy/protocols/archive-report-protocol.md +3 -1
  156. package/harness/bundles/java/codebuddy/protocols/ledger-protocol.md +2 -0
  157. package/harness/bundles/java/codebuddy/protocols/powershell-protocol.md +16 -0
  158. package/harness/bundles/java/codebuddy/protocols/report-pipeline-protocol.md +17 -0
  159. package/harness/bundles/java/codebuddy/scripts/harness_archive.py +568 -58
  160. package/harness/bundles/java/codebuddy/scripts/harness_events.py +70 -19
  161. package/harness/bundles/java/codebuddy/scripts/harness_gate.py +178 -25
  162. package/harness/bundles/java/codebuddy/scripts/harness_ledger.py +17 -0
  163. package/harness/bundles/java/codex/.harness-build.json +1 -1
  164. package/harness/bundles/java/codex/contracts/workflow-policy.json +3 -3
  165. package/harness/bundles/java/codex/harness-apidoc/SKILL.md +1 -1
  166. package/harness/bundles/java/codex/harness-archive/SKILL.md +3 -3
  167. package/harness/bundles/java/codex/harness-archive/reference.md +18 -10
  168. package/harness/bundles/java/codex/harness-archive/templates/render-summary.mjs +5 -1
  169. package/harness/bundles/java/codex/harness-codebase-map/SKILL.md +1 -1
  170. package/harness/bundles/java/codex/harness-knowledge-ingest/SKILL.md +1 -1
  171. package/harness/bundles/java/codex/harness-knowledge-query/SKILL.md +1 -1
  172. package/harness/bundles/java/codex/harness-package/SKILL.md +1 -1
  173. package/harness/bundles/java/codex/harness-plan/SKILL.md +1 -1
  174. package/harness/bundles/java/codex/harness-plan/checklist.md +6 -0
  175. package/harness/bundles/java/codex/harness-review/SKILL.md +1 -1
  176. package/harness/bundles/java/codex/harness-run/SKILL.md +1 -1
  177. package/harness/bundles/java/codex/harness-submit/SKILL.md +1 -1
  178. package/harness/bundles/java/codex/harness-sync/SKILL.md +1 -1
  179. package/harness/bundles/java/codex/harness-test/SKILL.md +1 -1
  180. package/harness/bundles/java/codex/protocols/archive-report-protocol.md +3 -1
  181. package/harness/bundles/java/codex/protocols/ledger-protocol.md +2 -0
  182. package/harness/bundles/java/codex/protocols/powershell-protocol.md +16 -0
  183. package/harness/bundles/java/codex/protocols/report-pipeline-protocol.md +17 -0
  184. package/harness/bundles/java/codex/scripts/harness_archive.py +568 -58
  185. package/harness/bundles/java/codex/scripts/harness_events.py +70 -19
  186. package/harness/bundles/java/codex/scripts/harness_gate.py +178 -25
  187. package/harness/bundles/java/codex/scripts/harness_ledger.py +17 -0
  188. package/harness/bundles/java/cursor/.harness-build.json +1 -1
  189. package/harness/bundles/java/cursor/contracts/workflow-policy.json +3 -3
  190. package/harness/bundles/java/cursor/harness-apidoc/SKILL.md +1 -1
  191. package/harness/bundles/java/cursor/harness-archive/SKILL.md +3 -3
  192. package/harness/bundles/java/cursor/harness-archive/reference.md +18 -10
  193. package/harness/bundles/java/cursor/harness-archive/templates/render-summary.mjs +5 -1
  194. package/harness/bundles/java/cursor/harness-codebase-map/SKILL.md +1 -1
  195. package/harness/bundles/java/cursor/harness-knowledge-ingest/SKILL.md +1 -1
  196. package/harness/bundles/java/cursor/harness-knowledge-query/SKILL.md +1 -1
  197. package/harness/bundles/java/cursor/harness-package/SKILL.md +1 -1
  198. package/harness/bundles/java/cursor/harness-plan/SKILL.md +1 -1
  199. package/harness/bundles/java/cursor/harness-plan/checklist.md +6 -0
  200. package/harness/bundles/java/cursor/harness-review/SKILL.md +1 -1
  201. package/harness/bundles/java/cursor/harness-run/SKILL.md +1 -1
  202. package/harness/bundles/java/cursor/harness-submit/SKILL.md +1 -1
  203. package/harness/bundles/java/cursor/harness-sync/SKILL.md +1 -1
  204. package/harness/bundles/java/cursor/harness-test/SKILL.md +1 -1
  205. package/harness/bundles/java/cursor/protocols/archive-report-protocol.md +3 -1
  206. package/harness/bundles/java/cursor/protocols/ledger-protocol.md +2 -0
  207. package/harness/bundles/java/cursor/protocols/powershell-protocol.md +16 -0
  208. package/harness/bundles/java/cursor/protocols/report-pipeline-protocol.md +17 -0
  209. package/harness/bundles/java/cursor/scripts/harness_archive.py +568 -58
  210. package/harness/bundles/java/cursor/scripts/harness_events.py +70 -19
  211. package/harness/bundles/java/cursor/scripts/harness_gate.py +178 -25
  212. package/harness/bundles/java/cursor/scripts/harness_ledger.py +17 -0
  213. package/harness/manifests/general/claude-code.json +32 -28
  214. package/harness/manifests/general/codebuddy.json +32 -28
  215. package/harness/manifests/general/codex.json +32 -28
  216. package/harness/manifests/general/cursor.json +32 -28
  217. package/harness/manifests/java/claude-code.json +26 -26
  218. package/harness/manifests/java/codebuddy.json +26 -26
  219. package/harness/manifests/java/codex.json +26 -26
  220. package/harness/manifests/java/cursor.json +26 -26
  221. package/hunter-workflow-family.json +2 -2
  222. package/package.json +1 -1
@@ -56,6 +56,10 @@ const actions = list(data.manualActions);
56
56
  const files = list(data.changedFiles);
57
57
  const commands = list(record(data.reportPipeline).commands);
58
58
  const timeline = list(data.timeline);
59
+ const statusReasons = list(data.finalStatusReasons);
60
+ const reasonHtml = statusReasons.length
61
+ ? `<small>${statusReasons.map((item) => esc(item)).join(" · ")}</small>`
62
+ : "";
59
63
 
60
64
  const stageHtml = stages.map(([name, status]) => `<div class="row"><span>${esc(name)}</span>${pill(status)}</div>`).join("") || '<p class="empty">没有阶段状态记录</p>';
61
65
  const verificationHtml = [
@@ -81,7 +85,7 @@ const html = `<!doctype html><html lang="zh-CN"><head><meta charset="utf-8"><met
81
85
  *{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font:14px/1.5 Inter,"Segoe UI","Microsoft YaHei",sans-serif}main{width:min(1140px,calc(100% - 28px));margin:22px auto 44px}.hero,.card,.metric,details{background:var(--card);border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow)}.hero{padding:23px 25px;border-top:3px solid var(--blue)}.eyebrow{color:var(--blue);font-weight:750;letter-spacing:.08em}h1{font-size:27px;line-height:1.2;margin:5px 0 7px;overflow-wrap:anywhere}.goal,.empty,small{color:var(--muted)}.status{display:flex;align-items:center;gap:10px;margin-top:16px}.metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:11px;margin:11px 0}.metric{padding:14px 15px}.metric strong{display:block;font-size:19px;margin:4px 0}.grid{display:grid;grid-template-columns:1.12fr .88fr;gap:11px}.card{padding:17px;margin-bottom:11px}h2{font-size:16px;margin:0 0 10px}.row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 0;border-bottom:1px solid var(--line)}.row:last-child{border:0}.row small{display:block;margin-top:2px}.pill{display:inline-flex;border-radius:999px;padding:3px 9px;font-size:11px;font-weight:750;white-space:nowrap}.pill.success{color:var(--good);background:color-mix(in srgb,var(--good) 13%,transparent)}.pill.warning{color:var(--warn);background:color-mix(in srgb,var(--warn) 14%,transparent)}.pill.danger{color:var(--bad);background:color-mix(in srgb,var(--bad) 13%,transparent)}.pill.neutral{color:var(--blue);background:color-mix(in srgb,var(--blue) 12%,transparent)}.duration{margin:11px 0}.duration>div{display:flex;justify-content:space-between;color:var(--muted);font-size:12px}.duration>div span:first-child{color:var(--text);font-weight:650}.duration i{display:block;height:7px;background:var(--soft);border-radius:99px;overflow:hidden;margin-top:6px}.duration b{display:block;height:100%;background:linear-gradient(90deg,var(--blue),#7c70ff)}.risk{display:grid;grid-template-columns:1fr 1fr;gap:10px}.risk>div{background:var(--soft);border-radius:10px;padding:11px}.risk h3{font-size:13px;margin:0 0 5px}.risk ul{padding-left:18px;margin:0;color:var(--muted)}details{margin:9px 0}summary{cursor:pointer;padding:13px 15px;font-weight:650}details>div{padding:0 15px 15px;overflow:auto}table{width:100%;border-collapse:collapse}th,td{text-align:left;padding:8px 9px;border-bottom:1px solid var(--line);vertical-align:top}th{color:var(--muted);font-size:11px;letter-spacing:.04em}code{font-family:"Cascadia Code",Consolas,monospace;color:var(--blue);overflow-wrap:anywhere}.plus{color:var(--good)}.minus{color:var(--bad)}dl{display:grid;grid-template-columns:145px 1fr;gap:7px 11px}dt{color:var(--muted)}dd{margin:0;overflow-wrap:anywhere}
82
86
  @media(max-width:800px){.metrics{grid-template-columns:1fr 1fr}.grid,.risk{grid-template-columns:1fr}}@media(max-width:480px){main{width:calc(100% - 18px);margin-top:9px}.metrics{grid-template-columns:1fr}.hero{padding:19px}h1{font-size:23px}dl{grid-template-columns:1fr}}
83
87
  </style></head><body><main>
84
- <section class="hero"><div class="eyebrow">HARNESS EXECUTION REPORT</div><h1>${esc(data.changeName || "未命名变更")}</h1><p class="goal">${esc(data.businessGoal || "未记录业务目标")}</p><div class="status">${pill(data.finalStatus)}<span>基于事件、验证账本与 Git 证据生成</span></div></section>
88
+ <section class="hero"><div class="eyebrow">HARNESS EXECUTION REPORT</div><h1>${esc(data.changeName || "未命名变更")}</h1><p class="goal">${esc(data.businessGoal || "未记录业务目标")}</p><div class="status">${pill(data.finalStatus)}<span>基于事件、验证账本与 Git 证据生成${data.riskTier ? ` · riskTier=${esc(data.riskTier)}` : ""}</span></div>${reasonHtml ? `<div class="status">${reasonHtml}</div>` : ""}</section>
85
89
  <section class="metrics"><article class="metric"><small>任务提交</small><strong><code title="${esc(data.finalCommit)}">${esc(shortHash(data.finalCommit))}</code></strong><small>${esc(data.finalCommitBranch || "未记录分支")}</small></article><article class="metric"><small>代码范围</small><strong>${number(diff.filesChanged)} 个文件</strong><small><span class="plus">+${number(diff.insertions)}</span> · <span class="minus">-${number(diff.deletions)}</span></small></article><article class="metric"><small>总耗时</small><strong>${esc(durations.totalLabel || duration(durations.totalMinutes))}</strong><small>${durationStages.length} 个阶段</small></article><article class="metric"><small>归档完整性</small><strong>${esc(record(data.archiveManifest).checksumStatus || "UNKNOWN")}</strong><small>${number(record(data.archiveManifest).totalArchiveFiles)} 个归档文件</small></article></section>
86
90
  <section class="grid"><div><article class="card"><h2>验证结论</h2>${verificationHtml}</article><article class="card"><h2>阶段耗时</h2>${durationHtml}</article></div><div><article class="card"><h2>阶段状态</h2>${stageHtml}</article><article class="card"><h2>风险与后续</h2><div class="risk"><div><h3>已知风险</h3><ul>${riskHtml}</ul></div><div><h3>人工动作</h3><ul>${actionHtml}</ul></div></div></article></div></section>
87
91
  <details><summary>变更文件(${files.length})</summary><div><table><thead><tr><th>文件</th><th>新增</th><th>删除</th></tr></thead><tbody>${fileRows}</tbody></table></div></details>
@@ -20,7 +20,7 @@ disallowed-tools:
20
20
  - Bash(awk *)
21
21
  - Bash(curl *)
22
22
  ---
23
- <!-- generated by harness_deploy.py; core=b4f114b99a359f4d; overlay=java; agent=claude-code; do not edit -->
23
+ <!-- generated by harness_deploy.py; core=8d70b36389868486; overlay=java; agent=claude-code; do not edit -->
24
24
  # harness-codebase-map — 代码库地图
25
25
 
26
26
  ## Purpose
@@ -20,7 +20,7 @@ disallowed-tools:
20
20
  - Bash(awk *)
21
21
  - Bash(curl *)
22
22
  ---
23
- <!-- generated by harness_deploy.py; core=b4f114b99a359f4d; overlay=java; agent=claude-code; do not edit -->
23
+ <!-- generated by harness_deploy.py; core=8d70b36389868486; overlay=java; agent=claude-code; do not edit -->
24
24
  # harness-knowledge-ingest
25
25
 
26
26
  从 `.harness/archive/**/reports/final/summary-data.json` 抽取项目知识,生成并维护本地 `.harness/knowledge/` 索引。
@@ -20,7 +20,7 @@ disallowed-tools:
20
20
  - Bash(awk *)
21
21
  - Bash(curl *)
22
22
  ---
23
- <!-- generated by harness_deploy.py; core=b4f114b99a359f4d; overlay=java; agent=claude-code; do not edit -->
23
+ <!-- generated by harness_deploy.py; core=8d70b36389868486; overlay=java; 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 的上下文归属。
@@ -20,7 +20,7 @@ disallowed-tools:
20
20
  - Bash(awk *)
21
21
  - Bash(curl *)
22
22
  ---
23
- <!-- generated by harness_deploy.py; core=b4f114b99a359f4d; overlay=java; agent=claude-code; do not edit -->
23
+ <!-- generated by harness_deploy.py; core=8d70b36389868486; overlay=java; agent=claude-code; do not edit -->
24
24
  # harness-package — 增量模块打包(Java overlay)
25
25
 
26
26
  ## Purpose
@@ -20,7 +20,7 @@ disallowed-tools:
20
20
  - Bash(awk *)
21
21
  - Bash(curl *)
22
22
  ---
23
- <!-- generated by harness_deploy.py; core=b4f114b99a359f4d; overlay=java; agent=claude-code; do not edit -->
23
+ <!-- generated by harness_deploy.py; core=8d70b36389868486; overlay=java; agent=claude-code; do not edit -->
24
24
  # harness-plan — 需求规划
25
25
 
26
26
  ## Purpose
@@ -57,6 +57,12 @@ description: harness-plan 的阶段检查清单和覆盖检查列表。仅在执
57
57
  > - CodeGraph 如通过 MCP 调用,必须优先用 MCP 工具,不允许通过普通 Bash 调 codegraph 命令
58
58
  > - 禁止把子代理未经工具验证的文本结论当作"详尽报告"或代码证据采纳
59
59
 
60
+ ## 影响面检查(远程客户端路径)
61
+
62
+ 变更涉及 HTTP/RPC 客户端时,在设计/任务拆分前完成路径静态比对:
63
+
64
+ - [ ] 变更涉及 HTTP/RPC 客户端(Feign/RestTemplate/SDK 封装)时:取客户端注解路径(类级 + 方法级拼接),与服务提供方 controller 的 `@RequestMapping` + 方法级注解**完整拼接路径**逐一比对,在计划/执行记录中列出比对结果。只看方法级注解不算完成。
65
+
60
66
  ## 阶段 4:设计审批包 ⚠️ 强制阻断(一次 AskUserQuestion)
61
67
 
62
68
  > 合并原「设计审核 + worktree + 场景表预览 + change-name」。推荐 worktree 读 `harness.json` `defaultWorktree`。
@@ -21,7 +21,7 @@ disallowed-tools:
21
21
  - Bash(curl *)
22
22
  - Bash(codegraph *)
23
23
  ---
24
- <!-- generated by harness_deploy.py; core=b4f114b99a359f4d; overlay=java; agent=claude-code; do not edit -->
24
+ <!-- generated by harness_deploy.py; core=8d70b36389868486; overlay=java; agent=claude-code; do not edit -->
25
25
  # harness-review — 代码审查
26
26
 
27
27
  ## Purpose
@@ -21,7 +21,7 @@ disallowed-tools:
21
21
  - Bash(curl *)
22
22
  - Bash(codegraph *)
23
23
  ---
24
- <!-- generated by harness_deploy.py; core=b4f114b99a359f4d; overlay=java; agent=claude-code; do not edit -->
24
+ <!-- generated by harness_deploy.py; core=8d70b36389868486; overlay=java; agent=claude-code; do not edit -->
25
25
  # harness-run — 需求编码
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=b4f114b99a359f4d; overlay=java; agent=claude-code; do not edit -->
23
+ <!-- generated by harness_deploy.py; core=8d70b36389868486; overlay=java; agent=claude-code; do not edit -->
24
24
  # harness-submit — 最终提交(含 worktree 合并)
25
25
 
26
26
  ## Purpose
@@ -19,7 +19,7 @@ disallowed-tools:
19
19
  - Bash(awk *)
20
20
  - Bash(curl *)
21
21
  ---
22
- <!-- generated by harness_deploy.py; core=b4f114b99a359f4d; overlay=java; agent=claude-code; do not edit -->
22
+ <!-- generated by harness_deploy.py; core=8d70b36389868486; overlay=java; agent=claude-code; do not edit -->
23
23
  # harness-sync — 元数据同步
24
24
 
25
25
  ## Purpose
@@ -22,7 +22,7 @@ disallowed-tools:
22
22
  - Bash(node *)
23
23
  - Bash(codegraph *)
24
24
  ---
25
- <!-- generated by harness_deploy.py; core=b4f114b99a359f4d; overlay=java; agent=claude-code; do not edit -->
25
+ <!-- generated by harness_deploy.py; core=8d70b36389868486; overlay=java; agent=claude-code; do not edit -->
26
26
  # harness-test — 测试执行
27
27
 
28
28
  ## Purpose
@@ -6,7 +6,9 @@ description: harness-archive 的数据化归档和 final-summary 渲染协议。
6
6
 
7
7
  ## 原则
8
8
 
9
- archive 不应让模型临场生成 500+ 行 HTML。事实收集与校验由 `harness_archive.py finalize` 单命令完成(collect → render → validate 内嵌);模型仅补写 `maintenanceNotes` / `knownRisks` / `manualActions`。历史 archive 回放用 `harness_archive.py replay`。
9
+ archive 不应让模型临场生成 500+ 行 HTML。事实收集与校验由 `harness_archive.py finalize` 单命令完成(cleanup → collect → render → validate archive-meta 内嵌);模型仅通过 events 写入维护结论。`meta/archive-meta.md` 由 finalize 生成,禁止手写。历史 archive 回放用 `harness_archive.py replay`(只读,不写 archive-meta / 不跑 cleanup)。
10
+
11
+ `knownRisks` 仅收录 severity∈{warning,error,critical} 的 issue 事件;无 severity 的 issue 进入 `maintenanceNotes`。`finalStatusReasons` 解释 CONDITIONAL_OK/WARN/FAIL 原因。finalize 在 before-manifest 前 cleanup:删除 lock/pid/launcher/credential,截断超大日志。
10
12
 
11
13
  详见 `report-pipeline-protocol.md`。本协议保留 archive final report 的维度要求,report pipeline 负责把这些维度程序化生成和校验。
12
14
 
@@ -67,6 +67,7 @@ verification-ledger 把每次验证(compile / unit test / api test / package
67
67
  "errors": 0,
68
68
  "skipped": 0,
69
69
  "evidence": "<测试通过证据(Java=Tests run: 14, Failures: 0, Errors: 0, Skipped: 0;前端/Python 按各自工具成功标志)>",
70
+ "metrics": {"run": 14, "failures": 0, "errors": 0, "skipped": 0},
70
71
  "startedAt": "2026-06-22T10:02:00+08:00",
71
72
  "finishedAt": "2026-06-22T10:05:00+08:00",
72
73
  "durationMs": 180000
@@ -284,6 +285,7 @@ ledger 的 `status` 与 final-summary 展示状态对应:
284
285
  | `algorithmVersion` | 固定 `harness-ledger-2`;缺失即 v1 entry |
285
286
  | `coverage` | 覆盖层级 `incremental`/`module`/`module-am`/`full`,由 verification+scope 派生或 `--coverage` 显式指定 |
286
287
  | `toolchainHash`/`profileHash`/`environmentHash` | 可选;`record --toolchain-hash` 等写入,`can-reuse --toolchain-hash` 等比对(UT-017) |
288
+ | `metrics` | 可选;`record --metrics-json '{"run":155,"failures":0,...}'` 写入结构化计数(不参与 inputsHash)。archive 读取顺序:`metrics` → evidence dict → evidence 文本正则 → `runtime/api-test-results.json` |
287
289
 
288
290
  ### 9.2 coverage lattice
289
291
 
@@ -179,3 +179,19 @@ powershell.exe -NoProfile -ExecutionPolicy Bypass -File ".harness/changes/<chang
179
179
  ```
180
180
 
181
181
  原因:Claude Code 的 Bash 工具外壳会先处理双引号内容,`$log`、`$_` 这类变量可能被外层 shell 吃掉,导致命令变形。简单命令可以 inline;复杂命令必须 `-File`。
182
+
183
+
184
+ ## 12. PowerShell 5.1 兼容清单
185
+
186
+ Windows 默认常为 Windows PowerShell **5.1**。下列特性在 5.1 不可用,禁止写进可复制命令模板:
187
+
188
+ | 特性 | 最低版本 | PowerShell 5.1 替代 |
189
+ |------|---------|--------------------|
190
+ | `Invoke-WebRequest -SkipHttpErrorCheck` | 7.0 | `try/catch` 包裹或 `$ErrorActionPreference` 处理非 2xx |
191
+ | `Join-String` | 6.2 | `-join` 运算符 |
192
+ | `ForEach-Object -Parallel` | 7.0 | 顺序执行 |
193
+
194
+ ### 非 ASCII 路径与 Bash 拒绝后的切换
195
+
196
+ - 非 ASCII 路径(含中文)仓库:git/构建/文件操作一律 PowerShell;Bash 被 hook 拒绝(如 `Denied: non-ASCII path`)后**立即**改用 PowerShell 重发等价命令,禁止原样重试 Bash。
197
+ - Maven `-D` 参数在 PowerShell 中加引号:`"-Dmaven.test.skip=true"`。
@@ -78,6 +78,23 @@ python <skills-root>/scripts/harness_events.py append --change-dir ".harness/cha
78
78
  | `issue` | code, severity, message | 问题和校验发现 |
79
79
  | `decision` | decision, reason | 人工确认、跳过、复用等决策 |
80
80
 
81
+ ## 事件语义与必填字段
82
+
83
+ 写入 `events.ndjson` 时按用途选 type;渲染侧会对缺失字段做 note 兜底,但写入侧仍应填齐语义字段。
84
+
85
+ | type | 用途 | 必填 | 常见误用 |
86
+ |------|------|------|----------|
87
+ | `issue` | 需要跟进/影响结论的异常 | severity, message | 把信息性结论记成 issue(应使用 decision) |
88
+ | `decision` | 决策/结论/知识引用 | note 或 decision+reason | - |
89
+ | `verification` | 验证执行结果 | name, status | 漏 name 导致 "(unnamed)" |
90
+ | `artifact` | 产物落盘 | path | 只传 note |
91
+ | `command` | 命令执行 | command, exit_code | - |
92
+
93
+ 兼容提示(不失败、exit 0):
94
+
95
+ - `--type issue` 未传 `--severity` → 默认 `info` 并在 stderr 提示
96
+ - `--type verification` 未传 `--name` 或 `--status` → stderr 提示,照常写入
97
+
81
98
  ## summary-data.json
82
99
 
83
100
  summary-data 必须保留原 archive final report 维度,并增加事件层摘要: