@hunter-harness/workflow-harness 0.4.0 → 0.4.2

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 (386) hide show
  1. package/harness/bundles/general/claude-code/.harness-build.json +1 -1
  2. package/harness/bundles/general/claude-code/harness-archive/SKILL.md +1 -1
  3. package/harness/bundles/general/claude-code/harness-codebase-map/SKILL.md +1 -1
  4. package/harness/bundles/general/claude-code/harness-execute/SKILL.md +1 -1
  5. package/harness/bundles/general/claude-code/harness-knowledge-ingest/SKILL.md +1 -1
  6. package/harness/bundles/general/claude-code/harness-knowledge-query/SKILL.md +1 -1
  7. package/harness/bundles/general/claude-code/harness-plan/SKILL.md +1 -1
  8. package/harness/bundles/general/claude-code/harness-pull/SKILL.md +1 -1
  9. package/harness/bundles/general/claude-code/harness-push/SKILL.md +1 -1
  10. package/harness/bundles/general/claude-code/harness-review/SKILL.md +1 -1
  11. package/harness/bundles/general/claude-code/harness-run/SKILL.md +1 -1
  12. package/harness/bundles/general/claude-code/harness-submit/SKILL.md +1 -1
  13. package/harness/bundles/general/claude-code/harness-sync/SKILL.md +1 -1
  14. package/harness/bundles/general/claude-code/harness-test/SKILL.md +1 -1
  15. package/harness/bundles/general/claude-code/scripts/harness_archive.py +29 -6
  16. package/harness/bundles/general/claude-code/scripts/harness_deploy.py +1 -1
  17. package/harness/bundles/general/claude-code/scripts/harness_knowledge_candidates.py +398 -0
  18. package/harness/bundles/general/codebuddy/.harness-build.json +1 -1
  19. package/harness/bundles/general/codebuddy/harness-archive/SKILL.md +1 -1
  20. package/harness/bundles/general/codebuddy/harness-codebase-map/SKILL.md +1 -1
  21. package/harness/bundles/general/codebuddy/harness-execute/SKILL.md +1 -1
  22. package/harness/bundles/general/codebuddy/harness-knowledge-ingest/SKILL.md +1 -1
  23. package/harness/bundles/general/codebuddy/harness-knowledge-query/SKILL.md +1 -1
  24. package/harness/bundles/general/codebuddy/harness-plan/SKILL.md +1 -1
  25. package/harness/bundles/general/codebuddy/harness-pull/SKILL.md +1 -1
  26. package/harness/bundles/general/codebuddy/harness-push/SKILL.md +1 -1
  27. package/harness/bundles/general/codebuddy/harness-review/SKILL.md +1 -1
  28. package/harness/bundles/general/codebuddy/harness-run/SKILL.md +1 -1
  29. package/harness/bundles/general/codebuddy/harness-submit/SKILL.md +1 -1
  30. package/harness/bundles/general/codebuddy/harness-sync/SKILL.md +1 -1
  31. package/harness/bundles/general/codebuddy/harness-test/SKILL.md +1 -1
  32. package/harness/bundles/general/codebuddy/scripts/harness_archive.py +29 -6
  33. package/harness/bundles/general/codebuddy/scripts/harness_deploy.py +1 -1
  34. package/harness/bundles/general/codebuddy/scripts/harness_knowledge_candidates.py +398 -0
  35. package/harness/bundles/general/codex/.harness-build.json +1 -1
  36. package/harness/bundles/general/codex/harness-archive/SKILL.md +1 -1
  37. package/harness/bundles/general/codex/harness-codebase-map/SKILL.md +1 -1
  38. package/harness/bundles/general/codex/harness-execute/SKILL.md +1 -1
  39. package/harness/bundles/general/codex/harness-knowledge-ingest/SKILL.md +1 -1
  40. package/harness/bundles/general/codex/harness-knowledge-query/SKILL.md +1 -1
  41. package/harness/bundles/general/codex/harness-plan/SKILL.md +1 -1
  42. package/harness/bundles/general/codex/harness-pull/SKILL.md +1 -1
  43. package/harness/bundles/general/codex/harness-push/SKILL.md +1 -1
  44. package/harness/bundles/general/codex/harness-review/SKILL.md +1 -1
  45. package/harness/bundles/general/codex/harness-run/SKILL.md +1 -1
  46. package/harness/bundles/general/codex/harness-submit/SKILL.md +1 -1
  47. package/harness/bundles/general/codex/harness-sync/SKILL.md +1 -1
  48. package/harness/bundles/general/codex/harness-test/SKILL.md +1 -1
  49. package/harness/bundles/general/codex/scripts/harness_archive.py +29 -6
  50. package/harness/bundles/general/codex/scripts/harness_deploy.py +1 -1
  51. package/harness/bundles/general/codex/scripts/harness_knowledge_candidates.py +398 -0
  52. package/harness/bundles/general/cursor/.harness-build.json +1 -1
  53. package/harness/bundles/general/cursor/harness-archive/SKILL.md +1 -1
  54. package/harness/bundles/general/cursor/harness-codebase-map/SKILL.md +1 -1
  55. package/harness/bundles/general/cursor/harness-execute/SKILL.md +1 -1
  56. package/harness/bundles/general/cursor/harness-knowledge-ingest/SKILL.md +1 -1
  57. package/harness/bundles/general/cursor/harness-knowledge-query/SKILL.md +1 -1
  58. package/harness/bundles/general/cursor/harness-plan/SKILL.md +1 -1
  59. package/harness/bundles/general/cursor/harness-pull/SKILL.md +1 -1
  60. package/harness/bundles/general/cursor/harness-push/SKILL.md +1 -1
  61. package/harness/bundles/general/cursor/harness-review/SKILL.md +1 -1
  62. package/harness/bundles/general/cursor/harness-run/SKILL.md +1 -1
  63. package/harness/bundles/general/cursor/harness-submit/SKILL.md +1 -1
  64. package/harness/bundles/general/cursor/harness-sync/SKILL.md +1 -1
  65. package/harness/bundles/general/cursor/harness-test/SKILL.md +1 -1
  66. package/harness/bundles/general/cursor/scripts/harness_archive.py +29 -6
  67. package/harness/bundles/general/cursor/scripts/harness_deploy.py +1 -1
  68. package/harness/bundles/general/cursor/scripts/harness_knowledge_candidates.py +398 -0
  69. package/harness/bundles/general/pi/.harness-build.json +6 -0
  70. package/harness/bundles/general/pi/CONTEXT.md +98 -0
  71. package/harness/bundles/general/pi/README.md +478 -0
  72. package/harness/bundles/general/pi/contracts/build-profile-v3.schema.json +302 -0
  73. package/harness/bundles/general/pi/contracts/ci-metrics.schema.json +36 -0
  74. package/harness/bundles/general/pi/contracts/doctor-capability.schema.json +43 -0
  75. package/harness/bundles/general/pi/contracts/external-platform-observation.schema.json +62 -0
  76. package/harness/bundles/general/pi/contracts/fixtures/managed-execution.json +341 -0
  77. package/harness/bundles/general/pi/contracts/process-identity.schema.json +132 -0
  78. package/harness/bundles/general/pi/contracts/run-session.schema.json +142 -0
  79. package/harness/bundles/general/pi/contracts/service-retirement-receipt.schema.json +85 -0
  80. package/harness/bundles/general/pi/contracts/service-session.schema.json +147 -0
  81. package/harness/bundles/general/pi/contracts/workflow-policy.json +574 -0
  82. package/harness/bundles/general/pi/harness-archive/SKILL.md +322 -0
  83. package/harness/bundles/general/pi/harness-archive/checklist.md +71 -0
  84. package/harness/bundles/general/pi/harness-archive/reference.md +150 -0
  85. package/harness/bundles/general/pi/harness-archive/scripts/gen-manifest.ps1 +31 -0
  86. package/harness/bundles/general/pi/harness-archive/templates/summary-data-template.json +218 -0
  87. package/harness/bundles/general/pi/harness-codebase-map/SKILL.md +116 -0
  88. package/harness/bundles/general/pi/harness-codebase-map/checklist.md +126 -0
  89. package/harness/bundles/general/pi/harness-codebase-map/reference.md +364 -0
  90. package/harness/bundles/general/pi/harness-codebase-map/templates/ARCHITECTURE.md +57 -0
  91. package/harness/bundles/general/pi/harness-codebase-map/templates/CONCERNS.md +49 -0
  92. package/harness/bundles/general/pi/harness-codebase-map/templates/CONVENTIONS.md +57 -0
  93. package/harness/bundles/general/pi/harness-codebase-map/templates/INTEGRATIONS.md +52 -0
  94. package/harness/bundles/general/pi/harness-codebase-map/templates/STACK.md +55 -0
  95. package/harness/bundles/general/pi/harness-codebase-map/templates/STRUCTURE.md +69 -0
  96. package/harness/bundles/general/pi/harness-codebase-map/templates/TESTING.md +64 -0
  97. package/harness/bundles/general/pi/harness-codebase-map/templates/map-manifest.schema.json +73 -0
  98. package/harness/bundles/general/pi/harness-codebase-map/templates/map-summary.md +64 -0
  99. package/harness/bundles/general/pi/harness-execute/SKILL.md +170 -0
  100. package/harness/bundles/general/pi/harness-knowledge-ingest/SKILL.md +103 -0
  101. package/harness/bundles/general/pi/harness-knowledge-query/SKILL.md +97 -0
  102. package/harness/bundles/general/pi/harness-plan/SKILL.md +157 -0
  103. package/harness/bundles/general/pi/harness-plan/checklist.md +243 -0
  104. package/harness/bundles/general/pi/harness-plan/protocols.md +133 -0
  105. package/harness/bundles/general/pi/harness-plan/reference.md +468 -0
  106. package/harness/bundles/general/pi/harness-pull/SKILL.md +55 -0
  107. package/harness/bundles/general/pi/harness-push/SKILL.md +83 -0
  108. package/harness/bundles/general/pi/harness-review/SKILL.md +166 -0
  109. package/harness/bundles/general/pi/harness-review/checklist.md +124 -0
  110. package/harness/bundles/general/pi/harness-review/protocols.md +69 -0
  111. package/harness/bundles/general/pi/harness-review/reference.md +114 -0
  112. package/harness/bundles/general/pi/harness-run/SKILL.md +188 -0
  113. package/harness/bundles/general/pi/harness-run/checklist.md +279 -0
  114. package/harness/bundles/general/pi/harness-run/protocols.md +141 -0
  115. package/harness/bundles/general/pi/harness-run/reference.md +886 -0
  116. package/harness/bundles/general/pi/harness-submit/SKILL.md +182 -0
  117. package/harness/bundles/general/pi/harness-submit/checklist.md +452 -0
  118. package/harness/bundles/general/pi/harness-submit/reference.md +152 -0
  119. package/harness/bundles/general/pi/harness-sync/SKILL.md +72 -0
  120. package/harness/bundles/general/pi/harness-sync/reference.md +176 -0
  121. package/harness/bundles/general/pi/harness-test/SKILL.md +250 -0
  122. package/harness/bundles/general/pi/harness-test/checklist.md +359 -0
  123. package/harness/bundles/general/pi/harness-test/pitfalls-java.md +14 -0
  124. package/harness/bundles/general/pi/harness-test/pitfalls.md +307 -0
  125. package/harness/bundles/general/pi/harness-test/reference.md +880 -0
  126. package/harness/bundles/general/pi/harness-test/scripts/runtime-helpers.mjs +216 -0
  127. package/harness/bundles/general/pi/protocols/archive-report-protocol.md +196 -0
  128. package/harness/bundles/general/pi/protocols/ci-layering-protocol.md +22 -0
  129. package/harness/bundles/general/pi/protocols/evidence-based-reporting-protocol.md +134 -0
  130. package/harness/bundles/general/pi/protocols/execution-session-protocol.md +52 -0
  131. package/harness/bundles/general/pi/protocols/external-platform-protocol.md +27 -0
  132. package/harness/bundles/general/pi/protocols/ledger-protocol.md +365 -0
  133. package/harness/bundles/general/pi/protocols/memory-closeout-protocol.md +21 -0
  134. package/harness/bundles/general/pi/protocols/model-routing-protocol.md +22 -0
  135. package/harness/bundles/general/pi/protocols/powershell-protocol.md +238 -0
  136. package/harness/bundles/general/pi/protocols/registry-governance-protocol.md +31 -0
  137. package/harness/bundles/general/pi/protocols/report-pipeline-protocol.md +172 -0
  138. package/harness/bundles/general/pi/protocols/sensitive-info-protocol.md +110 -0
  139. package/harness/bundles/general/pi/protocols/state-layout-protocol.md +209 -0
  140. package/harness/bundles/general/pi/protocols/submit-protocol.md +78 -0
  141. package/harness/bundles/general/pi/protocols/verification-graph-protocol.md +32 -0
  142. package/harness/bundles/general/pi/scripts/harness_adoption_metrics.py +391 -0
  143. package/harness/bundles/general/pi/scripts/harness_apidoc.py +53 -0
  144. package/harness/bundles/general/pi/scripts/harness_archive.py +11345 -0
  145. package/harness/bundles/general/pi/scripts/harness_change.py +1626 -0
  146. package/harness/bundles/general/pi/scripts/harness_check_gate.py +113 -0
  147. package/harness/bundles/general/pi/scripts/harness_context.py +1774 -0
  148. package/harness/bundles/general/pi/scripts/harness_deploy.py +968 -0
  149. package/harness/bundles/general/pi/scripts/harness_efficiency.py +443 -0
  150. package/harness/bundles/general/pi/scripts/harness_environment.py +1690 -0
  151. package/harness/bundles/general/pi/scripts/harness_events.py +2234 -0
  152. package/harness/bundles/general/pi/scripts/harness_events_sync.py +1425 -0
  153. package/harness/bundles/general/pi/scripts/harness_execution_contracts.py +596 -0
  154. package/harness/bundles/general/pi/scripts/harness_fixback.py +1975 -0
  155. package/harness/bundles/general/pi/scripts/harness_gate.py +3816 -0
  156. package/harness/bundles/general/pi/scripts/harness_headless.py +37 -0
  157. package/harness/bundles/general/pi/scripts/harness_integration.py +2564 -0
  158. package/harness/bundles/general/pi/scripts/harness_knowledge_candidates.py +796 -0
  159. package/harness/bundles/general/pi/scripts/harness_ledger.py +3556 -0
  160. package/harness/bundles/general/pi/scripts/harness_migration_head.py +220 -0
  161. package/harness/bundles/general/pi/scripts/harness_orchestration.py +344 -0
  162. package/harness/bundles/general/pi/scripts/harness_paths.py +676 -0
  163. package/harness/bundles/general/pi/scripts/harness_phase.py +1726 -0
  164. package/harness/bundles/general/pi/scripts/harness_plan_aggregate.py +249 -0
  165. package/harness/bundles/general/pi/scripts/harness_plan_finalize.py +1016 -0
  166. package/harness/bundles/general/pi/scripts/harness_preflight.py +650 -0
  167. package/harness/bundles/general/pi/scripts/harness_process.py +1065 -0
  168. package/harness/bundles/general/pi/scripts/harness_profile.py +1817 -0
  169. package/harness/bundles/general/pi/scripts/harness_report_model.py +442 -0
  170. package/harness/bundles/general/pi/scripts/harness_retry.py +175 -0
  171. package/harness/bundles/general/pi/scripts/harness_review.py +631 -0
  172. package/harness/bundles/general/pi/scripts/harness_runtime.py +2243 -0
  173. package/harness/bundles/general/pi/scripts/harness_service.py +3355 -0
  174. package/harness/bundles/general/pi/scripts/harness_state.py +365 -0
  175. package/harness/bundles/general/pi/scripts/harness_sync.py +407 -0
  176. package/harness/bundles/general/pi/scripts/harness_test_cleanup.py +175 -0
  177. package/harness/bundles/general/pi/scripts/harness_test_guard.py +1899 -0
  178. package/harness/bundles/general/pi/scripts/harness_test_runner.py +1586 -0
  179. package/harness/bundles/general/pi/scripts/harness_verification.py +593 -0
  180. package/harness/bundles/general/pi/scripts/harness_workflow_policy.py +266 -0
  181. package/harness/bundles/java/claude-code/.harness-build.json +1 -1
  182. package/harness/bundles/java/claude-code/harness-apidoc/SKILL.md +1 -1
  183. package/harness/bundles/java/claude-code/harness-archive/SKILL.md +1 -1
  184. package/harness/bundles/java/claude-code/harness-codebase-map/SKILL.md +1 -1
  185. package/harness/bundles/java/claude-code/harness-execute/SKILL.md +1 -1
  186. package/harness/bundles/java/claude-code/harness-knowledge-ingest/SKILL.md +1 -1
  187. package/harness/bundles/java/claude-code/harness-knowledge-query/SKILL.md +1 -1
  188. package/harness/bundles/java/claude-code/harness-package/SKILL.md +1 -1
  189. package/harness/bundles/java/claude-code/harness-plan/SKILL.md +1 -1
  190. package/harness/bundles/java/claude-code/harness-pull/SKILL.md +1 -1
  191. package/harness/bundles/java/claude-code/harness-push/SKILL.md +1 -1
  192. package/harness/bundles/java/claude-code/harness-review/SKILL.md +1 -1
  193. package/harness/bundles/java/claude-code/harness-run/SKILL.md +1 -1
  194. package/harness/bundles/java/claude-code/harness-submit/SKILL.md +1 -1
  195. package/harness/bundles/java/claude-code/harness-sync/SKILL.md +1 -1
  196. package/harness/bundles/java/claude-code/harness-test/SKILL.md +1 -1
  197. package/harness/bundles/java/claude-code/scripts/harness_archive.py +29 -6
  198. package/harness/bundles/java/claude-code/scripts/harness_deploy.py +1 -1
  199. package/harness/bundles/java/claude-code/scripts/harness_knowledge_candidates.py +398 -0
  200. package/harness/bundles/java/codebuddy/.harness-build.json +1 -1
  201. package/harness/bundles/java/codebuddy/harness-apidoc/SKILL.md +1 -1
  202. package/harness/bundles/java/codebuddy/harness-archive/SKILL.md +1 -1
  203. package/harness/bundles/java/codebuddy/harness-codebase-map/SKILL.md +1 -1
  204. package/harness/bundles/java/codebuddy/harness-execute/SKILL.md +1 -1
  205. package/harness/bundles/java/codebuddy/harness-knowledge-ingest/SKILL.md +1 -1
  206. package/harness/bundles/java/codebuddy/harness-knowledge-query/SKILL.md +1 -1
  207. package/harness/bundles/java/codebuddy/harness-package/SKILL.md +1 -1
  208. package/harness/bundles/java/codebuddy/harness-plan/SKILL.md +1 -1
  209. package/harness/bundles/java/codebuddy/harness-pull/SKILL.md +1 -1
  210. package/harness/bundles/java/codebuddy/harness-push/SKILL.md +1 -1
  211. package/harness/bundles/java/codebuddy/harness-review/SKILL.md +1 -1
  212. package/harness/bundles/java/codebuddy/harness-run/SKILL.md +1 -1
  213. package/harness/bundles/java/codebuddy/harness-submit/SKILL.md +1 -1
  214. package/harness/bundles/java/codebuddy/harness-sync/SKILL.md +1 -1
  215. package/harness/bundles/java/codebuddy/harness-test/SKILL.md +1 -1
  216. package/harness/bundles/java/codebuddy/scripts/harness_archive.py +29 -6
  217. package/harness/bundles/java/codebuddy/scripts/harness_deploy.py +1 -1
  218. package/harness/bundles/java/codebuddy/scripts/harness_knowledge_candidates.py +398 -0
  219. package/harness/bundles/java/codex/.harness-build.json +1 -1
  220. package/harness/bundles/java/codex/harness-apidoc/SKILL.md +1 -1
  221. package/harness/bundles/java/codex/harness-archive/SKILL.md +1 -1
  222. package/harness/bundles/java/codex/harness-codebase-map/SKILL.md +1 -1
  223. package/harness/bundles/java/codex/harness-execute/SKILL.md +1 -1
  224. package/harness/bundles/java/codex/harness-knowledge-ingest/SKILL.md +1 -1
  225. package/harness/bundles/java/codex/harness-knowledge-query/SKILL.md +1 -1
  226. package/harness/bundles/java/codex/harness-package/SKILL.md +1 -1
  227. package/harness/bundles/java/codex/harness-plan/SKILL.md +1 -1
  228. package/harness/bundles/java/codex/harness-pull/SKILL.md +1 -1
  229. package/harness/bundles/java/codex/harness-push/SKILL.md +1 -1
  230. package/harness/bundles/java/codex/harness-review/SKILL.md +1 -1
  231. package/harness/bundles/java/codex/harness-run/SKILL.md +1 -1
  232. package/harness/bundles/java/codex/harness-submit/SKILL.md +1 -1
  233. package/harness/bundles/java/codex/harness-sync/SKILL.md +1 -1
  234. package/harness/bundles/java/codex/harness-test/SKILL.md +1 -1
  235. package/harness/bundles/java/codex/scripts/harness_archive.py +29 -6
  236. package/harness/bundles/java/codex/scripts/harness_deploy.py +1 -1
  237. package/harness/bundles/java/codex/scripts/harness_knowledge_candidates.py +398 -0
  238. package/harness/bundles/java/cursor/.harness-build.json +1 -1
  239. package/harness/bundles/java/cursor/harness-apidoc/SKILL.md +1 -1
  240. package/harness/bundles/java/cursor/harness-archive/SKILL.md +1 -1
  241. package/harness/bundles/java/cursor/harness-codebase-map/SKILL.md +1 -1
  242. package/harness/bundles/java/cursor/harness-execute/SKILL.md +1 -1
  243. package/harness/bundles/java/cursor/harness-knowledge-ingest/SKILL.md +1 -1
  244. package/harness/bundles/java/cursor/harness-knowledge-query/SKILL.md +1 -1
  245. package/harness/bundles/java/cursor/harness-package/SKILL.md +1 -1
  246. package/harness/bundles/java/cursor/harness-plan/SKILL.md +1 -1
  247. package/harness/bundles/java/cursor/harness-pull/SKILL.md +1 -1
  248. package/harness/bundles/java/cursor/harness-push/SKILL.md +1 -1
  249. package/harness/bundles/java/cursor/harness-review/SKILL.md +1 -1
  250. package/harness/bundles/java/cursor/harness-run/SKILL.md +1 -1
  251. package/harness/bundles/java/cursor/harness-submit/SKILL.md +1 -1
  252. package/harness/bundles/java/cursor/harness-sync/SKILL.md +1 -1
  253. package/harness/bundles/java/cursor/harness-test/SKILL.md +1 -1
  254. package/harness/bundles/java/cursor/scripts/harness_archive.py +29 -6
  255. package/harness/bundles/java/cursor/scripts/harness_deploy.py +1 -1
  256. package/harness/bundles/java/cursor/scripts/harness_knowledge_candidates.py +398 -0
  257. package/harness/bundles/java/pi/.harness-build.json +6 -0
  258. package/harness/bundles/java/pi/CONTEXT.md +98 -0
  259. package/harness/bundles/java/pi/README.md +478 -0
  260. package/harness/bundles/java/pi/contracts/build-profile-v3.schema.json +302 -0
  261. package/harness/bundles/java/pi/contracts/ci-metrics.schema.json +36 -0
  262. package/harness/bundles/java/pi/contracts/doctor-capability.schema.json +43 -0
  263. package/harness/bundles/java/pi/contracts/external-platform-observation.schema.json +62 -0
  264. package/harness/bundles/java/pi/contracts/fixtures/managed-execution.json +341 -0
  265. package/harness/bundles/java/pi/contracts/process-identity.schema.json +132 -0
  266. package/harness/bundles/java/pi/contracts/run-session.schema.json +142 -0
  267. package/harness/bundles/java/pi/contracts/service-retirement-receipt.schema.json +85 -0
  268. package/harness/bundles/java/pi/contracts/service-session.schema.json +147 -0
  269. package/harness/bundles/java/pi/contracts/workflow-policy.json +574 -0
  270. package/harness/bundles/java/pi/harness-apidoc/SKILL.md +97 -0
  271. package/harness/bundles/java/pi/harness-apidoc/checklist.md +142 -0
  272. package/harness/bundles/java/pi/harness-apidoc/reference.md +233 -0
  273. package/harness/bundles/java/pi/harness-archive/SKILL.md +322 -0
  274. package/harness/bundles/java/pi/harness-archive/checklist.md +71 -0
  275. package/harness/bundles/java/pi/harness-archive/reference.md +150 -0
  276. package/harness/bundles/java/pi/harness-archive/scripts/gen-manifest.ps1 +31 -0
  277. package/harness/bundles/java/pi/harness-archive/templates/summary-data-template.json +218 -0
  278. package/harness/bundles/java/pi/harness-codebase-map/SKILL.md +116 -0
  279. package/harness/bundles/java/pi/harness-codebase-map/checklist.md +126 -0
  280. package/harness/bundles/java/pi/harness-codebase-map/reference.md +364 -0
  281. package/harness/bundles/java/pi/harness-codebase-map/templates/ARCHITECTURE.md +57 -0
  282. package/harness/bundles/java/pi/harness-codebase-map/templates/CONCERNS.md +49 -0
  283. package/harness/bundles/java/pi/harness-codebase-map/templates/CONVENTIONS.md +57 -0
  284. package/harness/bundles/java/pi/harness-codebase-map/templates/INTEGRATIONS.md +52 -0
  285. package/harness/bundles/java/pi/harness-codebase-map/templates/STACK.md +55 -0
  286. package/harness/bundles/java/pi/harness-codebase-map/templates/STRUCTURE.md +69 -0
  287. package/harness/bundles/java/pi/harness-codebase-map/templates/TESTING.md +64 -0
  288. package/harness/bundles/java/pi/harness-codebase-map/templates/map-manifest.schema.json +73 -0
  289. package/harness/bundles/java/pi/harness-codebase-map/templates/map-summary.md +64 -0
  290. package/harness/bundles/java/pi/harness-execute/SKILL.md +170 -0
  291. package/harness/bundles/java/pi/harness-knowledge-ingest/SKILL.md +103 -0
  292. package/harness/bundles/java/pi/harness-knowledge-query/SKILL.md +97 -0
  293. package/harness/bundles/java/pi/harness-package/SKILL.md +94 -0
  294. package/harness/bundles/java/pi/harness-package/checklist.md +322 -0
  295. package/harness/bundles/java/pi/harness-package/reference.md +210 -0
  296. package/harness/bundles/java/pi/harness-plan/SKILL.md +157 -0
  297. package/harness/bundles/java/pi/harness-plan/checklist.md +243 -0
  298. package/harness/bundles/java/pi/harness-plan/protocols.md +133 -0
  299. package/harness/bundles/java/pi/harness-plan/reference.md +468 -0
  300. package/harness/bundles/java/pi/harness-pull/SKILL.md +55 -0
  301. package/harness/bundles/java/pi/harness-push/SKILL.md +83 -0
  302. package/harness/bundles/java/pi/harness-review/SKILL.md +166 -0
  303. package/harness/bundles/java/pi/harness-review/checklist.md +124 -0
  304. package/harness/bundles/java/pi/harness-review/protocols.md +69 -0
  305. package/harness/bundles/java/pi/harness-review/reference.md +114 -0
  306. package/harness/bundles/java/pi/harness-run/SKILL.md +206 -0
  307. package/harness/bundles/java/pi/harness-run/checklist.md +252 -0
  308. package/harness/bundles/java/pi/harness-run/protocols.md +141 -0
  309. package/harness/bundles/java/pi/harness-run/reference.md +820 -0
  310. package/harness/bundles/java/pi/harness-submit/SKILL.md +189 -0
  311. package/harness/bundles/java/pi/harness-submit/checklist.md +452 -0
  312. package/harness/bundles/java/pi/harness-submit/reference.md +152 -0
  313. package/harness/bundles/java/pi/harness-sync/SKILL.md +72 -0
  314. package/harness/bundles/java/pi/harness-sync/reference.md +176 -0
  315. package/harness/bundles/java/pi/harness-test/SKILL.md +264 -0
  316. package/harness/bundles/java/pi/harness-test/checklist.md +320 -0
  317. package/harness/bundles/java/pi/harness-test/pitfalls-java.md +16 -0
  318. package/harness/bundles/java/pi/harness-test/pitfalls.md +307 -0
  319. package/harness/bundles/java/pi/harness-test/reference.md +792 -0
  320. package/harness/bundles/java/pi/harness-test/scripts/runtime-helpers.mjs +216 -0
  321. package/harness/bundles/java/pi/protocols/archive-report-protocol.md +196 -0
  322. package/harness/bundles/java/pi/protocols/ci-layering-protocol.md +22 -0
  323. package/harness/bundles/java/pi/protocols/evidence-based-reporting-protocol.md +134 -0
  324. package/harness/bundles/java/pi/protocols/execution-session-protocol.md +52 -0
  325. package/harness/bundles/java/pi/protocols/external-platform-protocol.md +27 -0
  326. package/harness/bundles/java/pi/protocols/ledger-protocol.md +365 -0
  327. package/harness/bundles/java/pi/protocols/memory-closeout-protocol.md +21 -0
  328. package/harness/bundles/java/pi/protocols/model-routing-protocol.md +22 -0
  329. package/harness/bundles/java/pi/protocols/powershell-protocol.md +238 -0
  330. package/harness/bundles/java/pi/protocols/registry-governance-protocol.md +31 -0
  331. package/harness/bundles/java/pi/protocols/report-pipeline-protocol.md +172 -0
  332. package/harness/bundles/java/pi/protocols/sensitive-info-protocol.md +110 -0
  333. package/harness/bundles/java/pi/protocols/state-layout-protocol.md +209 -0
  334. package/harness/bundles/java/pi/protocols/submit-protocol.md +78 -0
  335. package/harness/bundles/java/pi/protocols/verification-graph-protocol.md +32 -0
  336. package/harness/bundles/java/pi/scripts/harness_adoption_metrics.py +391 -0
  337. package/harness/bundles/java/pi/scripts/harness_apidoc.py +53 -0
  338. package/harness/bundles/java/pi/scripts/harness_archive.py +11345 -0
  339. package/harness/bundles/java/pi/scripts/harness_change.py +1626 -0
  340. package/harness/bundles/java/pi/scripts/harness_check_gate.py +113 -0
  341. package/harness/bundles/java/pi/scripts/harness_context.py +1774 -0
  342. package/harness/bundles/java/pi/scripts/harness_deploy.py +968 -0
  343. package/harness/bundles/java/pi/scripts/harness_efficiency.py +443 -0
  344. package/harness/bundles/java/pi/scripts/harness_environment.py +1690 -0
  345. package/harness/bundles/java/pi/scripts/harness_events.py +2234 -0
  346. package/harness/bundles/java/pi/scripts/harness_events_sync.py +1425 -0
  347. package/harness/bundles/java/pi/scripts/harness_execution_contracts.py +596 -0
  348. package/harness/bundles/java/pi/scripts/harness_fixback.py +1975 -0
  349. package/harness/bundles/java/pi/scripts/harness_gate.py +3816 -0
  350. package/harness/bundles/java/pi/scripts/harness_headless.py +37 -0
  351. package/harness/bundles/java/pi/scripts/harness_integration.py +2564 -0
  352. package/harness/bundles/java/pi/scripts/harness_knowledge_candidates.py +796 -0
  353. package/harness/bundles/java/pi/scripts/harness_ledger.py +3556 -0
  354. package/harness/bundles/java/pi/scripts/harness_migration_head.py +220 -0
  355. package/harness/bundles/java/pi/scripts/harness_orchestration.py +344 -0
  356. package/harness/bundles/java/pi/scripts/harness_paths.py +676 -0
  357. package/harness/bundles/java/pi/scripts/harness_phase.py +1726 -0
  358. package/harness/bundles/java/pi/scripts/harness_plan_aggregate.py +249 -0
  359. package/harness/bundles/java/pi/scripts/harness_plan_finalize.py +1016 -0
  360. package/harness/bundles/java/pi/scripts/harness_preflight.py +650 -0
  361. package/harness/bundles/java/pi/scripts/harness_process.py +1065 -0
  362. package/harness/bundles/java/pi/scripts/harness_profile.py +1817 -0
  363. package/harness/bundles/java/pi/scripts/harness_report_model.py +442 -0
  364. package/harness/bundles/java/pi/scripts/harness_retry.py +175 -0
  365. package/harness/bundles/java/pi/scripts/harness_review.py +631 -0
  366. package/harness/bundles/java/pi/scripts/harness_runtime.py +2243 -0
  367. package/harness/bundles/java/pi/scripts/harness_service.py +3355 -0
  368. package/harness/bundles/java/pi/scripts/harness_state.py +365 -0
  369. package/harness/bundles/java/pi/scripts/harness_sync.py +407 -0
  370. package/harness/bundles/java/pi/scripts/harness_test_cleanup.py +175 -0
  371. package/harness/bundles/java/pi/scripts/harness_test_guard.py +1899 -0
  372. package/harness/bundles/java/pi/scripts/harness_test_runner.py +1586 -0
  373. package/harness/bundles/java/pi/scripts/harness_verification.py +593 -0
  374. package/harness/bundles/java/pi/scripts/harness_workflow_policy.py +266 -0
  375. package/harness/manifests/general/claude-code.json +17 -17
  376. package/harness/manifests/general/codebuddy.json +17 -17
  377. package/harness/manifests/general/codex.json +17 -17
  378. package/harness/manifests/general/cursor.json +17 -17
  379. package/harness/manifests/general/pi.json +475 -0
  380. package/harness/manifests/java/claude-code.json +19 -19
  381. package/harness/manifests/java/codebuddy.json +19 -19
  382. package/harness/manifests/java/codex.json +19 -19
  383. package/harness/manifests/java/cursor.json +19 -19
  384. package/harness/manifests/java/pi.json +499 -0
  385. package/hunter-workflow-family.json +2 -2
  386. package/package.json +1 -1
@@ -391,6 +391,404 @@ def count_unadjudicated_findings(summary: dict[str, Any]) -> int:
391
391
  return count
392
392
 
393
393
 
394
+ # --- plan/design-derived knowledge candidates ---------------------------------
395
+ #
396
+ # reviewFindings/knownRisks/decisions 只覆盖“经对抗评审的变更”。没有评审的简单
397
+ # 变更(无 RED/YELLOW 发现、无 knownRisks、无 adopted decisions)仍产出了
398
+ # 经用户确认批准的 design/plan/test-scenarios——这些也是值得沉淀的知识。
399
+ # 这里把 plans/*.md(v2 finalize 派生的机器契约)解析回结构化的自然内容,
400
+ # 与 summary 三源并列,但 confidence 略低(机器派生而非独立评审)。
401
+
402
+ _PLAN_CONFIDENCE = 0.85
403
+ _PLAN_SOURCE_KIND = "plan"
404
+
405
+
406
+ def _unescape_markdown(value: str) -> str:
407
+ """Reverse the renderer's markdown escaping for clean knowledge text.
408
+
409
+ harness-plan finalize 的渲染器对自由文本做了反斜杠/实体转义。知识候选存
410
+ 的是自然语言,不需要保留渲染转义。顺序有讲究:先反转义实体,再反转义
411
+ 反斜杠序列(从长到短)。
412
+ """
413
+ value = (
414
+ value.replace("&lt;", "<")
415
+ .replace("&gt;", ">")
416
+ .replace("&amp;", "&")
417
+ .replace("<br>", "\n")
418
+ )
419
+ return (
420
+ value.replace("\\`", "`")
421
+ .replace("\\#", "#")
422
+ .replace("\\*", "*")
423
+ .replace("\\[", "[")
424
+ .replace("\\]", "]")
425
+ .replace("\\\\", "\\")
426
+ )
427
+
428
+
429
+ def _markdown_sections(text: str) -> dict[str, list[str]]:
430
+ """Split a v2 rendered markdown artifact into its ``## Header`` sections.
431
+
432
+ Returns ``{header: [lines...]}``. Only the ``##`` level is split; ``###``
433
+ and ``####`` content stays inside its parent section's lines.
434
+ """
435
+ sections: dict[str, list[str]] = {}
436
+ current: str | None = None
437
+ for line in text.splitlines():
438
+ if line.startswith("## ") and not line.startswith("### "):
439
+ current = line[3:].strip()
440
+ sections[current] = []
441
+ elif current is not None:
442
+ sections[current].append(line)
443
+ return sections
444
+
445
+
446
+ def _plan_source_refs(change_key: str, package_path: str) -> list[str]:
447
+ """source_refs must exist in the package (core-v1 containment check)."""
448
+ return [package_path]
449
+
450
+
451
+ def _plan_candidate(
452
+ *,
453
+ change_key: str,
454
+ archive_id: str,
455
+ producer_version: str,
456
+ created_at: str,
457
+ kind: str,
458
+ entry_type: str,
459
+ summary: str,
460
+ body: str,
461
+ keywords: list[str],
462
+ source_refs: list[str],
463
+ reusability_scope: str = "project",
464
+ ) -> dict[str, Any]:
465
+ return {
466
+ "schema_version": SCHEMA_VERSION,
467
+ "candidate_id": _candidate_id(change_key, kind, summary),
468
+ "source_change_key": change_key,
469
+ "source_refs": source_refs,
470
+ "summary": summary,
471
+ "reusability_scope": reusability_scope,
472
+ "content_hash": _content_hash(entry_type, summary, body, keywords),
473
+ "confidence": _PLAN_CONFIDENCE,
474
+ "status": "pending",
475
+ "entry_type": entry_type,
476
+ "body": body,
477
+ "keywords": keywords,
478
+ "provenance": {
479
+ "source_kind": _PLAN_SOURCE_KIND,
480
+ "source_ref": f"archive:{archive_id}",
481
+ "producer": PRODUCER,
482
+ "producer_version": producer_version,
483
+ "created_at": created_at,
484
+ },
485
+ }
486
+
487
+
488
+ def _requirements_from_design(
489
+ design_text: str,
490
+ *,
491
+ change_key: str,
492
+ archive_id: str,
493
+ producer_version: str,
494
+ created_at: str,
495
+ ) -> list[dict[str, Any]]:
496
+ """Parse ``## Requirements`` from design.md into requirement candidates.
497
+
498
+ Each line is ``- requirement:sha256:... [kind]: text`` where kind is
499
+ behavior | invariant | failure_behavior.
500
+ """
501
+ sections = _markdown_sections(design_text)
502
+ lines = sections.get("Requirements", [])
503
+ out: list[dict[str, Any]] = []
504
+ for line in lines:
505
+ stripped = line.strip()
506
+ if not stripped.startswith("- "):
507
+ continue
508
+ prefix = stripped[2:]
509
+ # kind 位于第一个 `]: ` 之前的方括号内。
510
+ close_bracket = prefix.find("]")
511
+ if close_bracket <= 0 or not prefix.startswith("requirement:"):
512
+ continue
513
+ kind = prefix[1:close_bracket].strip()
514
+ if kind not in {"behavior", "invariant", "failure_behavior"}:
515
+ continue
516
+ colon = prefix.find(": ", close_bracket + 1)
517
+ if colon == -1:
518
+ continue
519
+ text = _unescape_markdown(prefix[colon + 2:].strip())
520
+ if not text:
521
+ continue
522
+ entry_type = "requirement"
523
+ body = f"需求类型:{kind}\n{text}"
524
+ keywords = _keywords(kind, entry_type)
525
+ out.append(_plan_candidate(
526
+ change_key=change_key,
527
+ archive_id=archive_id,
528
+ producer_version=producer_version,
529
+ created_at=created_at,
530
+ kind="requirement",
531
+ entry_type=entry_type,
532
+ summary=text,
533
+ body=body,
534
+ keywords=keywords,
535
+ source_refs=_plan_source_refs(change_key, f"plans/{change_key}-design.md"),
536
+ ))
537
+ return out
538
+
539
+
540
+ def _risks_from_design(
541
+ design_text: str,
542
+ *,
543
+ change_key: str,
544
+ archive_id: str,
545
+ producer_version: str,
546
+ created_at: str,
547
+ ) -> list[dict[str, Any]]:
548
+ """Parse ``## Risks`` (``- risk`` + `` - Mitigation: ...``) into risk candidates."""
549
+ sections = _markdown_sections(design_text)
550
+ lines = sections.get("Risks", [])
551
+ out: list[dict[str, Any]] = []
552
+ index = 0
553
+ while index < len(lines):
554
+ stripped = lines[index].strip()
555
+ if not stripped.startswith("- "):
556
+ index += 1
557
+ continue
558
+ risk = _unescape_markdown(stripped[2:].strip())
559
+ if not risk or risk == "None.":
560
+ index += 1
561
+ continue
562
+ mitigation = ""
563
+ if index + 1 < len(lines) and lines[index + 1].strip().startswith("- Mitigation:"):
564
+ mitigation = _unescape_markdown(
565
+ lines[index + 1].strip()[len("- Mitigation:"):].strip()
566
+ )
567
+ index += 1
568
+ body = risk if not mitigation else f"{risk}\n缓解:{mitigation}"
569
+ out.append(_plan_candidate(
570
+ change_key=change_key,
571
+ archive_id=archive_id,
572
+ producer_version=producer_version,
573
+ created_at=created_at,
574
+ kind="risk",
575
+ entry_type="risk",
576
+ summary=risk,
577
+ body=body,
578
+ keywords=_keywords("risk"),
579
+ source_refs=_plan_source_refs(change_key, f"plans/{change_key}-design.md"),
580
+ ))
581
+ index += 1
582
+ return out
583
+
584
+
585
+ def _invariants_from_design(
586
+ design_text: str,
587
+ *,
588
+ change_key: str,
589
+ archive_id: str,
590
+ producer_version: str,
591
+ created_at: str,
592
+ ) -> list[dict[str, Any]]:
593
+ """Parse ``## Invariants`` bullet list into requirement candidates."""
594
+ sections = _markdown_sections(design_text)
595
+ out: list[dict[str, Any]] = []
596
+ for line in sections.get("Invariants", []):
597
+ stripped = line.strip()
598
+ if not stripped.startswith("- "):
599
+ continue
600
+ text = _unescape_markdown(stripped[2:].strip())
601
+ if not text or text == "None.":
602
+ continue
603
+ out.append(_plan_candidate(
604
+ change_key=change_key,
605
+ archive_id=archive_id,
606
+ producer_version=producer_version,
607
+ created_at=created_at,
608
+ kind="invariant",
609
+ entry_type="requirement",
610
+ summary=text,
611
+ body=f"需求类型:invariant\n{text}",
612
+ keywords=_keywords("invariant", "requirement"),
613
+ source_refs=_plan_source_refs(change_key, f"plans/{change_key}-design.md"),
614
+ ))
615
+ return out
616
+
617
+
618
+ def _tasks_from_plan(
619
+ plan_text: str,
620
+ *,
621
+ change_key: str,
622
+ archive_id: str,
623
+ producer_version: str,
624
+ created_at: str,
625
+ ) -> list[dict[str, Any]]:
626
+ """Parse ``## Tasks`` from plan.md into implementation candidates.
627
+
628
+ Task headings are ``### T1``; the objective is the non-empty text between
629
+ the heading and the first ``- `` metadata bullet.
630
+ """
631
+ sections = _markdown_sections(plan_text)
632
+ lines = sections.get("Tasks", [])
633
+ out: list[dict[str, Any]] = []
634
+ index = 0
635
+ while index < len(lines):
636
+ stripped = lines[index].strip()
637
+ if not stripped.startswith("### "):
638
+ index += 1
639
+ continue
640
+ task_id = stripped[4:].strip()
641
+ index += 1
642
+ objective_parts: list[str] = []
643
+ while index < len(lines):
644
+ current = lines[index].strip()
645
+ if current.startswith("### ") or current.startswith("- "):
646
+ break
647
+ if current:
648
+ objective_parts.append(current)
649
+ index += 1
650
+ objective = " ".join(objective_parts).strip()
651
+ if not objective:
652
+ continue
653
+ body = f"任务:{task_id}\n{objective}"
654
+ out.append(_plan_candidate(
655
+ change_key=change_key,
656
+ archive_id=archive_id,
657
+ producer_version=producer_version,
658
+ created_at=created_at,
659
+ kind="task",
660
+ entry_type="implementation",
661
+ summary=objective,
662
+ body=body,
663
+ keywords=_keywords(task_id, "implementation"),
664
+ source_refs=_plan_source_refs(change_key, f"plans/{change_key}-plan.md"),
665
+ ))
666
+ return out
667
+
668
+
669
+ def _scenarios_from_test_scenarios(
670
+ scenarios_text: str,
671
+ *,
672
+ change_key: str,
673
+ archive_id: str,
674
+ producer_version: str,
675
+ created_at: str,
676
+ ) -> list[dict[str, Any]]:
677
+ """Parse ``## <id>: <title>`` headings into test-evidence candidates."""
678
+ out: list[dict[str, Any]] = []
679
+ for line in scenarios_text.splitlines():
680
+ stripped = line.strip()
681
+ if not stripped.startswith("## ") or stripped.startswith("### "):
682
+ continue
683
+ heading = stripped[3:].strip()
684
+ if heading == "Coverage":
685
+ continue
686
+ if ":" not in heading:
687
+ continue
688
+ scenario_id, title = heading.split(":", 1)
689
+ title = title.strip()
690
+ if not title:
691
+ continue
692
+ out.append(_plan_candidate(
693
+ change_key=change_key,
694
+ archive_id=archive_id,
695
+ producer_version=producer_version,
696
+ created_at=created_at,
697
+ kind="scenario",
698
+ entry_type="test-evidence",
699
+ summary=title,
700
+ body=f"场景:{scenario_id.strip()}\n{title}",
701
+ keywords=_keywords(scenario_id.strip(), "test-evidence"),
702
+ source_refs=_plan_source_refs(
703
+ change_key, f"plans/{change_key}-test-scenarios.md"
704
+ ),
705
+ ))
706
+ return out
707
+
708
+
709
+ def build_plan_candidates(
710
+ archive_dir,
711
+ *,
712
+ change_key: str,
713
+ archive_id: str,
714
+ producer_version: str,
715
+ created_at: str,
716
+ ) -> list[dict[str, Any]]:
717
+ """Extract knowledge candidates from the archive's plans/*.md artifacts.
718
+
719
+ Complements ``build_knowledge_candidates`` (summary 三源)。没有评审的简单
720
+ 变更仍然产出 plans/*.md;这些是经用户确认批准的结构化真相源,parse 回来
721
+ 就是可沉淀的知识。缺文件/解析失败返回 [](软失败)。
722
+ """
723
+ candidates: list[dict[str, Any]] = []
724
+ seen_ids: set[str] = set()
725
+
726
+ def collect(items: list[dict[str, Any]]) -> None:
727
+ for candidate in items:
728
+ if candidate["candidate_id"] in seen_ids:
729
+ continue
730
+ seen_ids.add(candidate["candidate_id"])
731
+ candidates.append(candidate)
732
+
733
+ design_path = archive_dir / "plans" / f"{change_key}-design.md"
734
+ if design_path.is_file():
735
+ try:
736
+ design_text = design_path.read_text(encoding="utf-8-sig")
737
+ except OSError:
738
+ design_text = ""
739
+ collect(_requirements_from_design(
740
+ design_text,
741
+ change_key=change_key,
742
+ archive_id=archive_id,
743
+ producer_version=producer_version,
744
+ created_at=created_at,
745
+ ))
746
+ collect(_risks_from_design(
747
+ design_text,
748
+ change_key=change_key,
749
+ archive_id=archive_id,
750
+ producer_version=producer_version,
751
+ created_at=created_at,
752
+ ))
753
+ collect(_invariants_from_design(
754
+ design_text,
755
+ change_key=change_key,
756
+ archive_id=archive_id,
757
+ producer_version=producer_version,
758
+ created_at=created_at,
759
+ ))
760
+
761
+ plan_path = archive_dir / "plans" / f"{change_key}-plan.md"
762
+ if plan_path.is_file():
763
+ try:
764
+ plan_text = plan_path.read_text(encoding="utf-8-sig")
765
+ except OSError:
766
+ plan_text = ""
767
+ collect(_tasks_from_plan(
768
+ plan_text,
769
+ change_key=change_key,
770
+ archive_id=archive_id,
771
+ producer_version=producer_version,
772
+ created_at=created_at,
773
+ ))
774
+
775
+ scenarios_path = archive_dir / "plans" / f"{change_key}-test-scenarios.md"
776
+ if scenarios_path.is_file():
777
+ try:
778
+ scenarios_text = scenarios_path.read_text(encoding="utf-8-sig")
779
+ except OSError:
780
+ scenarios_text = ""
781
+ collect(_scenarios_from_test_scenarios(
782
+ scenarios_text,
783
+ change_key=change_key,
784
+ archive_id=archive_id,
785
+ producer_version=producer_version,
786
+ created_at=created_at,
787
+ ))
788
+
789
+ return candidates
790
+
791
+
394
792
  def render_knowledge_candidates_json(candidates: list[dict[str, Any]]) -> str:
395
793
  """Deterministic bytes for the archive package entry."""
396
794
  return json.dumps(
@@ -2,5 +2,5 @@
2
2
  "schemaVersion": 1,
3
3
  "overlay": "java",
4
4
  "agent": "codex",
5
- "coreHash": "8285116e6303495f"
5
+ "coreHash": "bb4e811a5442f018"
6
6
  }
@@ -3,7 +3,7 @@ name: harness-apidoc
3
3
  description: 从 Java 后端代码生成结构化前端 API 文档(Controller/VO/ErrorCode)。仅当用户显式调用
4
4
  /harness-apidoc 时使用,不得自动触发。
5
5
  ---
6
- <!-- generated by harness_deploy.py; core=8285116e6303495f; overlay=java; agent=codex; do not edit -->
6
+ <!-- generated by harness_deploy.py; core=bb4e811a5442f018; overlay=java; agent=codex; do not edit -->
7
7
  # harness-apidoc — 前端接口文档(Java overlay)
8
8
 
9
9
  ## Purpose
@@ -3,7 +3,7 @@ name: harness-archive
3
3
  description: 归档所有变更产出(计划/测试报告/审查/SQL/API文档)到 .harness/archive/,含归档元数据。仅当用户显式调用
4
4
  /harness-archive 时使用;不得被其他阶段 skill 自动接续触发。
5
5
  ---
6
- <!-- generated by harness_deploy.py; core=8285116e6303495f; overlay=java; agent=codex; do not edit -->
6
+ <!-- generated by harness_deploy.py; core=bb4e811a5442f018; overlay=java; agent=codex; do not edit -->
7
7
  # harness-archive — 变更归档
8
8
 
9
9
  ## Purpose
@@ -3,7 +3,7 @@ name: harness-codebase-map
3
3
  description: 分析现有代码库并生成 .harness/codebase/map/
4
4
  下的结构化代码库地图。用于陌生项目理解、重大改造前梳理、harness-sync 提示 map 过期后的人工刷新。
5
5
  ---
6
- <!-- generated by harness_deploy.py; core=8285116e6303495f; overlay=java; agent=codex; do not edit -->
6
+ <!-- generated by harness_deploy.py; core=bb4e811a5442f018; overlay=java; agent=codex; do not edit -->
7
7
  # harness-codebase-map — 代码库地图
8
8
 
9
9
  ## Purpose
@@ -4,7 +4,7 @@ description: 执行阶段:按变更簇执行 TDD
4
4
  编码循环(RED→GREEN→REFACTOR→编译验证),随后完成单元/接口/数据兼容验证并输出测试报告。仅当用户显式调用
5
5
  /harness-execute 时使用;不得因用户提到编码/实现/测试就自动触发,也不得被其他阶段 skill 自动接续。
6
6
  ---
7
- <!-- generated by harness_deploy.py; core=8285116e6303495f; overlay=java; agent=codex; do not edit -->
7
+ <!-- generated by harness_deploy.py; core=bb4e811a5442f018; overlay=java; agent=codex; do not edit -->
8
8
  # harness-execute — 执行(编码 + 验证)
9
9
 
10
10
  > 2026-08 阶段合并:原 `run`(编码)与 `test`(验证)合并为单一 `execute` 阶段。
@@ -2,7 +2,7 @@
2
2
  name: harness-knowledge-ingest
3
3
  description: 确认归档 ZIP 已上传并由 Hunter Platform 在服务端解包、校验和入库。客户端不再构建或维护本地知识索引。
4
4
  ---
5
- <!-- generated by harness_deploy.py; core=8285116e6303495f; overlay=java; agent=codex; do not edit -->
5
+ <!-- generated by harness_deploy.py; core=bb4e811a5442f018; overlay=java; agent=codex; do not edit -->
6
6
  # harness-knowledge-ingest
7
7
 
8
8
  知识 ingest 完全由 Hunter Platform 负责。归档完成时,客户端生成一个确定性 ZIP;
@@ -2,7 +2,7 @@
2
2
  name: harness-knowledge-query
3
3
  description: 在规划、实现或排查前,通过 hunter-harness CLI 查询远端项目知识库。远端不可用时直接报告不可用,不建立本地索引或离线回退。
4
4
  ---
5
- <!-- generated by harness_deploy.py; core=8285116e6303495f; overlay=java; agent=codex; do not edit -->
5
+ <!-- generated by harness_deploy.py; core=bb4e811a5442f018; overlay=java; agent=codex; do not edit -->
6
6
  # harness-knowledge-query
7
7
 
8
8
  项目知识以 Hunter Platform 的服务端索引为唯一真源。客户端只提交查询并消费结果:
@@ -2,7 +2,7 @@
2
2
  name: harness-package
3
3
  description: 增量模块打包:拉取最新→编译验证→mvn package→汇总 jar/war。仅当用户显式调用 /harness-package 时使用,不得自动触发。
4
4
  ---
5
- <!-- generated by harness_deploy.py; core=8285116e6303495f; overlay=java; agent=codex; do not edit -->
5
+ <!-- generated by harness_deploy.py; core=bb4e811a5442f018; overlay=java; agent=codex; do not edit -->
6
6
  # harness-package — 增量模块打包(Java overlay)
7
7
 
8
8
  ## Purpose
@@ -3,7 +3,7 @@ name: harness-plan
3
3
  description: 将需求转化为设计文档+实施计划+完整测试场景表,必须在编码前完成。仅当用户显式调用 /harness-plan 或明确要求进入
4
4
  Harness 规划阶段时使用;不得因用户描述需求就自动触发。
5
5
  ---
6
- <!-- generated by harness_deploy.py; core=8285116e6303495f; overlay=java; agent=codex; do not edit -->
6
+ <!-- generated by harness_deploy.py; core=bb4e811a5442f018; overlay=java; agent=codex; do not edit -->
7
7
  # harness-plan — 需求规划
8
8
 
9
9
  ## Purpose
@@ -3,7 +3,7 @@ name: harness-pull
3
3
  description: 从 Hunter Platform 下拉配置/规则/架构/指令(及显式来源分支的分支文件恢复)。仅当用户显式调用
4
4
  /harness-pull 或明确说'从平台拉取/恢复'时使用;不得自动触发。
5
5
  ---
6
- <!-- generated by harness_deploy.py; core=8285116e6303495f; overlay=java; agent=codex; do not edit -->
6
+ <!-- generated by harness_deploy.py; core=bb4e811a5442f018; overlay=java; agent=codex; do not edit -->
7
7
  # harness-pull — 从 Hunter Platform 下拉与恢复
8
8
 
9
9
  ## Purpose
@@ -3,7 +3,7 @@ name: harness-push
3
3
  description: 上传本地配置/规则/架构/指令(及显式归档)到 Hunter Platform。仅当用户显式调用 /harness-push
4
4
  或明确说'上传到平台'时使用;不得因存在本地修改就自动触发。
5
5
  ---
6
- <!-- generated by harness_deploy.py; core=8285116e6303495f; overlay=java; agent=codex; do not edit -->
6
+ <!-- generated by harness_deploy.py; core=bb4e811a5442f018; overlay=java; agent=codex; do not edit -->
7
7
  # harness-push — 上传到 Hunter Platform
8
8
 
9
9
  ## Purpose
@@ -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=8285116e6303495f; overlay=java; agent=codex; do not edit -->
7
+ <!-- generated by harness_deploy.py; core=bb4e811a5442f018; overlay=java; agent=codex; do not edit -->
8
8
  # harness-review — 代码审查
9
9
 
10
10
  ## Purpose
@@ -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=8285116e6303495f; overlay=java; agent=codex; do not edit -->
6
+ <!-- generated by harness_deploy.py; core=bb4e811a5442f018; overlay=java; agent=codex; do not edit -->
7
7
  # harness-run — 需求编码
8
8
 
9
9
  > **2026-08 阶段合并**:原 `run`(编码)与 `test`(验证)合并为单一 `execute` 阶段,
@@ -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=8285116e6303495f; overlay=java; agent=codex; do not edit -->
6
+ <!-- generated by harness_deploy.py; core=bb4e811a5442f018; overlay=java; agent=codex; do not edit -->
7
7
  # harness-submit — 最终提交(含 worktree 合并)
8
8
 
9
9
  ## Purpose
@@ -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=8285116e6303495f; overlay=java; agent=codex; do not edit -->
7
+ <!-- generated by harness_deploy.py; core=bb4e811a5442f018; overlay=java; agent=codex; 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=8285116e6303495f; overlay=java; agent=codex; do not edit -->
6
+ <!-- generated by harness_deploy.py; core=bb4e811a5442f018; overlay=java; agent=codex; do not edit -->
7
7
  # harness-test — 测试执行
8
8
 
9
9
  > **2026-08 阶段合并**:原 `run`(编码)与 `test`(验证)合并为单一 `execute` 阶段,
@@ -4574,22 +4574,45 @@ def write_archive_meta(work_dir: Path, summary: dict[str, Any]) -> Path:
4574
4574
 
4575
4575
 
4576
4576
  def write_knowledge_candidates(work_dir: Path, summary: dict[str, Any]) -> Path:
4577
- """Generate candidates/knowledge.json from summary-data (single ownership).
4577
+ """Generate candidates/knowledge.json from summary-data + plans/*.md.
4578
4578
 
4579
4579
  Mirrors write_archive_meta: derived from the same summary, written before the
4580
4580
  after-manifest so its bytes are covered. The archive directory name is the
4581
4581
  archive id, matching write_archive_meta's `archive-id` field.
4582
+
4583
+ Sources (in merge order):
4584
+ 1. Summary 三源 (reviewFindings / knownRisks / decisions)
4585
+ 2. Plans/*.md (design Requirements / Risks / Invariants, plan Tasks, test Scenarios)
4586
+
4587
+ Duplicates are deduplicated by candidate_id (summary 三源优先)。
4582
4588
  """
4583
4589
  archive_id = work_dir.name
4590
+ change_key = str(summary.get("changeName") or archive_id)
4591
+ producer_version = SCHEMA_VERSION
4592
+ created_at = now_iso()
4593
+
4584
4594
  candidates = hkc.build_knowledge_candidates(
4585
4595
  summary,
4586
- change_key=str(summary.get("changeName") or archive_id),
4596
+ change_key=change_key,
4587
4597
  archive_id=archive_id,
4588
- # The archive schema version identifies the producing format; there is
4589
- # no separate harness version constant to borrow here.
4590
- producer_version=SCHEMA_VERSION,
4591
- created_at=now_iso(),
4598
+ producer_version=producer_version,
4599
+ created_at=created_at,
4592
4600
  )
4601
+
4602
+ # Merge plan-derived candidates (soft-fail: empty plans still produce a valid output).
4603
+ plan_candidates = hkc.build_plan_candidates(
4604
+ work_dir,
4605
+ change_key=change_key,
4606
+ archive_id=archive_id,
4607
+ producer_version=producer_version,
4608
+ created_at=created_at,
4609
+ )
4610
+ existing_ids = {c["candidate_id"] for c in candidates}
4611
+ for candidate in plan_candidates:
4612
+ if candidate["candidate_id"] not in existing_ids:
4613
+ existing_ids.add(candidate["candidate_id"])
4614
+ candidates.append(candidate)
4615
+
4593
4616
  out = work_dir / "candidates" / "knowledge.json"
4594
4617
  out.parent.mkdir(parents=True, exist_ok=True)
4595
4618
  out.write_text(
@@ -70,7 +70,7 @@ SKIP_DIR_NAMES = {
70
70
  ".git",
71
71
  }
72
72
  SKIP_TOP_NAMES = {"harness-merge", "harness-report"}
73
- HARNESS_AGENTS = ("claude-code", "codex", "cursor", "codebuddy")
73
+ HARNESS_AGENTS = ("claude-code", "codex", "cursor", "codebuddy", "pi")
74
74
  AGENTS_WITH_CUSTOM_AGENTS = frozenset({"claude-code", "codebuddy"})
75
75
 
76
76