@hunter-harness/workflow-harness 0.3.1 → 0.4.1

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 (402) 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-archive/reference.md +30 -1
  4. package/harness/bundles/general/claude-code/harness-archive/templates/summary-data-template.json +1 -0
  5. package/harness/bundles/general/claude-code/harness-codebase-map/SKILL.md +1 -1
  6. package/harness/bundles/general/claude-code/harness-execute/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-pull/SKILL.md +1 -1
  11. package/harness/bundles/general/claude-code/harness-push/SKILL.md +1 -1
  12. package/harness/bundles/general/claude-code/harness-review/SKILL.md +1 -1
  13. package/harness/bundles/general/claude-code/harness-run/SKILL.md +1 -1
  14. package/harness/bundles/general/claude-code/harness-submit/SKILL.md +1 -1
  15. package/harness/bundles/general/claude-code/harness-sync/SKILL.md +1 -1
  16. package/harness/bundles/general/claude-code/harness-test/SKILL.md +1 -1
  17. package/harness/bundles/general/claude-code/scripts/harness_archive.py +146 -8
  18. package/harness/bundles/general/claude-code/scripts/harness_deploy.py +1 -1
  19. package/harness/bundles/general/claude-code/scripts/harness_knowledge_candidates.py +538 -4
  20. package/harness/bundles/general/codebuddy/.harness-build.json +1 -1
  21. package/harness/bundles/general/codebuddy/harness-archive/SKILL.md +1 -1
  22. package/harness/bundles/general/codebuddy/harness-archive/reference.md +30 -1
  23. package/harness/bundles/general/codebuddy/harness-archive/templates/summary-data-template.json +1 -0
  24. package/harness/bundles/general/codebuddy/harness-codebase-map/SKILL.md +1 -1
  25. package/harness/bundles/general/codebuddy/harness-execute/SKILL.md +1 -1
  26. package/harness/bundles/general/codebuddy/harness-knowledge-ingest/SKILL.md +1 -1
  27. package/harness/bundles/general/codebuddy/harness-knowledge-query/SKILL.md +1 -1
  28. package/harness/bundles/general/codebuddy/harness-plan/SKILL.md +1 -1
  29. package/harness/bundles/general/codebuddy/harness-pull/SKILL.md +1 -1
  30. package/harness/bundles/general/codebuddy/harness-push/SKILL.md +1 -1
  31. package/harness/bundles/general/codebuddy/harness-review/SKILL.md +1 -1
  32. package/harness/bundles/general/codebuddy/harness-run/SKILL.md +1 -1
  33. package/harness/bundles/general/codebuddy/harness-submit/SKILL.md +1 -1
  34. package/harness/bundles/general/codebuddy/harness-sync/SKILL.md +1 -1
  35. package/harness/bundles/general/codebuddy/harness-test/SKILL.md +1 -1
  36. package/harness/bundles/general/codebuddy/scripts/harness_archive.py +146 -8
  37. package/harness/bundles/general/codebuddy/scripts/harness_deploy.py +1 -1
  38. package/harness/bundles/general/codebuddy/scripts/harness_knowledge_candidates.py +538 -4
  39. package/harness/bundles/general/codex/.harness-build.json +1 -1
  40. package/harness/bundles/general/codex/harness-archive/SKILL.md +1 -1
  41. package/harness/bundles/general/codex/harness-archive/reference.md +30 -1
  42. package/harness/bundles/general/codex/harness-archive/templates/summary-data-template.json +1 -0
  43. package/harness/bundles/general/codex/harness-codebase-map/SKILL.md +1 -1
  44. package/harness/bundles/general/codex/harness-execute/SKILL.md +1 -1
  45. package/harness/bundles/general/codex/harness-knowledge-ingest/SKILL.md +1 -1
  46. package/harness/bundles/general/codex/harness-knowledge-query/SKILL.md +1 -1
  47. package/harness/bundles/general/codex/harness-plan/SKILL.md +1 -1
  48. package/harness/bundles/general/codex/harness-pull/SKILL.md +1 -1
  49. package/harness/bundles/general/codex/harness-push/SKILL.md +1 -1
  50. package/harness/bundles/general/codex/harness-review/SKILL.md +1 -1
  51. package/harness/bundles/general/codex/harness-run/SKILL.md +1 -1
  52. package/harness/bundles/general/codex/harness-submit/SKILL.md +1 -1
  53. package/harness/bundles/general/codex/harness-sync/SKILL.md +1 -1
  54. package/harness/bundles/general/codex/harness-test/SKILL.md +1 -1
  55. package/harness/bundles/general/codex/scripts/harness_archive.py +146 -8
  56. package/harness/bundles/general/codex/scripts/harness_deploy.py +1 -1
  57. package/harness/bundles/general/codex/scripts/harness_knowledge_candidates.py +538 -4
  58. package/harness/bundles/general/cursor/.harness-build.json +1 -1
  59. package/harness/bundles/general/cursor/harness-archive/SKILL.md +1 -1
  60. package/harness/bundles/general/cursor/harness-archive/reference.md +30 -1
  61. package/harness/bundles/general/cursor/harness-archive/templates/summary-data-template.json +1 -0
  62. package/harness/bundles/general/cursor/harness-codebase-map/SKILL.md +1 -1
  63. package/harness/bundles/general/cursor/harness-execute/SKILL.md +1 -1
  64. package/harness/bundles/general/cursor/harness-knowledge-ingest/SKILL.md +1 -1
  65. package/harness/bundles/general/cursor/harness-knowledge-query/SKILL.md +1 -1
  66. package/harness/bundles/general/cursor/harness-plan/SKILL.md +1 -1
  67. package/harness/bundles/general/cursor/harness-pull/SKILL.md +1 -1
  68. package/harness/bundles/general/cursor/harness-push/SKILL.md +1 -1
  69. package/harness/bundles/general/cursor/harness-review/SKILL.md +1 -1
  70. package/harness/bundles/general/cursor/harness-run/SKILL.md +1 -1
  71. package/harness/bundles/general/cursor/harness-submit/SKILL.md +1 -1
  72. package/harness/bundles/general/cursor/harness-sync/SKILL.md +1 -1
  73. package/harness/bundles/general/cursor/harness-test/SKILL.md +1 -1
  74. package/harness/bundles/general/cursor/scripts/harness_archive.py +146 -8
  75. package/harness/bundles/general/cursor/scripts/harness_deploy.py +1 -1
  76. package/harness/bundles/general/cursor/scripts/harness_knowledge_candidates.py +538 -4
  77. package/harness/bundles/general/pi/.harness-build.json +6 -0
  78. package/harness/bundles/general/pi/CONTEXT.md +98 -0
  79. package/harness/bundles/general/pi/README.md +478 -0
  80. package/harness/bundles/general/pi/contracts/build-profile-v3.schema.json +302 -0
  81. package/harness/bundles/general/pi/contracts/ci-metrics.schema.json +36 -0
  82. package/harness/bundles/general/pi/contracts/doctor-capability.schema.json +43 -0
  83. package/harness/bundles/general/pi/contracts/external-platform-observation.schema.json +62 -0
  84. package/harness/bundles/general/pi/contracts/fixtures/managed-execution.json +341 -0
  85. package/harness/bundles/general/pi/contracts/process-identity.schema.json +132 -0
  86. package/harness/bundles/general/pi/contracts/run-session.schema.json +142 -0
  87. package/harness/bundles/general/pi/contracts/service-retirement-receipt.schema.json +85 -0
  88. package/harness/bundles/general/pi/contracts/service-session.schema.json +147 -0
  89. package/harness/bundles/general/pi/contracts/workflow-policy.json +574 -0
  90. package/harness/bundles/general/pi/harness-archive/SKILL.md +322 -0
  91. package/harness/bundles/general/pi/harness-archive/checklist.md +71 -0
  92. package/harness/bundles/general/pi/harness-archive/reference.md +150 -0
  93. package/harness/bundles/general/pi/harness-archive/scripts/gen-manifest.ps1 +31 -0
  94. package/harness/bundles/general/pi/harness-archive/templates/summary-data-template.json +218 -0
  95. package/harness/bundles/general/pi/harness-codebase-map/SKILL.md +116 -0
  96. package/harness/bundles/general/pi/harness-codebase-map/checklist.md +126 -0
  97. package/harness/bundles/general/pi/harness-codebase-map/reference.md +364 -0
  98. package/harness/bundles/general/pi/harness-codebase-map/templates/ARCHITECTURE.md +57 -0
  99. package/harness/bundles/general/pi/harness-codebase-map/templates/CONCERNS.md +49 -0
  100. package/harness/bundles/general/pi/harness-codebase-map/templates/CONVENTIONS.md +57 -0
  101. package/harness/bundles/general/pi/harness-codebase-map/templates/INTEGRATIONS.md +52 -0
  102. package/harness/bundles/general/pi/harness-codebase-map/templates/STACK.md +55 -0
  103. package/harness/bundles/general/pi/harness-codebase-map/templates/STRUCTURE.md +69 -0
  104. package/harness/bundles/general/pi/harness-codebase-map/templates/TESTING.md +64 -0
  105. package/harness/bundles/general/pi/harness-codebase-map/templates/map-manifest.schema.json +73 -0
  106. package/harness/bundles/general/pi/harness-codebase-map/templates/map-summary.md +64 -0
  107. package/harness/bundles/general/pi/harness-execute/SKILL.md +170 -0
  108. package/harness/bundles/general/pi/harness-knowledge-ingest/SKILL.md +103 -0
  109. package/harness/bundles/general/pi/harness-knowledge-query/SKILL.md +97 -0
  110. package/harness/bundles/general/pi/harness-plan/SKILL.md +158 -0
  111. package/harness/bundles/general/pi/harness-plan/checklist.md +243 -0
  112. package/harness/bundles/general/pi/harness-plan/protocols.md +133 -0
  113. package/harness/bundles/general/pi/harness-plan/reference.md +468 -0
  114. package/harness/bundles/general/pi/harness-pull/SKILL.md +55 -0
  115. package/harness/bundles/general/pi/harness-push/SKILL.md +83 -0
  116. package/harness/bundles/general/pi/harness-review/SKILL.md +175 -0
  117. package/harness/bundles/general/pi/harness-review/checklist.md +124 -0
  118. package/harness/bundles/general/pi/harness-review/protocols.md +69 -0
  119. package/harness/bundles/general/pi/harness-review/reference.md +114 -0
  120. package/harness/bundles/general/pi/harness-run/SKILL.md +188 -0
  121. package/harness/bundles/general/pi/harness-run/checklist.md +279 -0
  122. package/harness/bundles/general/pi/harness-run/protocols.md +141 -0
  123. package/harness/bundles/general/pi/harness-run/reference.md +886 -0
  124. package/harness/bundles/general/pi/harness-submit/SKILL.md +182 -0
  125. package/harness/bundles/general/pi/harness-submit/checklist.md +452 -0
  126. package/harness/bundles/general/pi/harness-submit/reference.md +152 -0
  127. package/harness/bundles/general/pi/harness-sync/SKILL.md +72 -0
  128. package/harness/bundles/general/pi/harness-sync/reference.md +176 -0
  129. package/harness/bundles/general/pi/harness-test/SKILL.md +250 -0
  130. package/harness/bundles/general/pi/harness-test/checklist.md +359 -0
  131. package/harness/bundles/general/pi/harness-test/pitfalls-java.md +14 -0
  132. package/harness/bundles/general/pi/harness-test/pitfalls.md +307 -0
  133. package/harness/bundles/general/pi/harness-test/reference.md +880 -0
  134. package/harness/bundles/general/pi/harness-test/scripts/runtime-helpers.mjs +216 -0
  135. package/harness/bundles/general/pi/protocols/archive-report-protocol.md +196 -0
  136. package/harness/bundles/general/pi/protocols/ci-layering-protocol.md +22 -0
  137. package/harness/bundles/general/pi/protocols/evidence-based-reporting-protocol.md +134 -0
  138. package/harness/bundles/general/pi/protocols/execution-session-protocol.md +52 -0
  139. package/harness/bundles/general/pi/protocols/external-platform-protocol.md +27 -0
  140. package/harness/bundles/general/pi/protocols/ledger-protocol.md +365 -0
  141. package/harness/bundles/general/pi/protocols/memory-closeout-protocol.md +21 -0
  142. package/harness/bundles/general/pi/protocols/model-routing-protocol.md +22 -0
  143. package/harness/bundles/general/pi/protocols/powershell-protocol.md +238 -0
  144. package/harness/bundles/general/pi/protocols/registry-governance-protocol.md +31 -0
  145. package/harness/bundles/general/pi/protocols/report-pipeline-protocol.md +172 -0
  146. package/harness/bundles/general/pi/protocols/sensitive-info-protocol.md +110 -0
  147. package/harness/bundles/general/pi/protocols/state-layout-protocol.md +209 -0
  148. package/harness/bundles/general/pi/protocols/submit-protocol.md +78 -0
  149. package/harness/bundles/general/pi/protocols/verification-graph-protocol.md +32 -0
  150. package/harness/bundles/general/pi/scripts/harness_adoption_metrics.py +391 -0
  151. package/harness/bundles/general/pi/scripts/harness_apidoc.py +53 -0
  152. package/harness/bundles/general/pi/scripts/harness_archive.py +11345 -0
  153. package/harness/bundles/general/pi/scripts/harness_change.py +1626 -0
  154. package/harness/bundles/general/pi/scripts/harness_check_gate.py +113 -0
  155. package/harness/bundles/general/pi/scripts/harness_context.py +1774 -0
  156. package/harness/bundles/general/pi/scripts/harness_deploy.py +968 -0
  157. package/harness/bundles/general/pi/scripts/harness_efficiency.py +443 -0
  158. package/harness/bundles/general/pi/scripts/harness_environment.py +1690 -0
  159. package/harness/bundles/general/pi/scripts/harness_events.py +2234 -0
  160. package/harness/bundles/general/pi/scripts/harness_events_sync.py +1425 -0
  161. package/harness/bundles/general/pi/scripts/harness_execution_contracts.py +596 -0
  162. package/harness/bundles/general/pi/scripts/harness_fixback.py +1975 -0
  163. package/harness/bundles/general/pi/scripts/harness_gate.py +3816 -0
  164. package/harness/bundles/general/pi/scripts/harness_headless.py +37 -0
  165. package/harness/bundles/general/pi/scripts/harness_integration.py +2564 -0
  166. package/harness/bundles/general/pi/scripts/harness_knowledge_candidates.py +796 -0
  167. package/harness/bundles/general/pi/scripts/harness_ledger.py +3556 -0
  168. package/harness/bundles/general/pi/scripts/harness_migration_head.py +220 -0
  169. package/harness/bundles/general/pi/scripts/harness_orchestration.py +344 -0
  170. package/harness/bundles/general/pi/scripts/harness_paths.py +676 -0
  171. package/harness/bundles/general/pi/scripts/harness_phase.py +1726 -0
  172. package/harness/bundles/general/pi/scripts/harness_plan_aggregate.py +249 -0
  173. package/harness/bundles/general/pi/scripts/harness_plan_finalize.py +1016 -0
  174. package/harness/bundles/general/pi/scripts/harness_preflight.py +650 -0
  175. package/harness/bundles/general/pi/scripts/harness_process.py +1065 -0
  176. package/harness/bundles/general/pi/scripts/harness_profile.py +1817 -0
  177. package/harness/bundles/general/pi/scripts/harness_report_model.py +442 -0
  178. package/harness/bundles/general/pi/scripts/harness_retry.py +175 -0
  179. package/harness/bundles/general/pi/scripts/harness_review.py +631 -0
  180. package/harness/bundles/general/pi/scripts/harness_runtime.py +2243 -0
  181. package/harness/bundles/general/pi/scripts/harness_service.py +3355 -0
  182. package/harness/bundles/general/pi/scripts/harness_state.py +365 -0
  183. package/harness/bundles/general/pi/scripts/harness_sync.py +407 -0
  184. package/harness/bundles/general/pi/scripts/harness_test_cleanup.py +175 -0
  185. package/harness/bundles/general/pi/scripts/harness_test_guard.py +1899 -0
  186. package/harness/bundles/general/pi/scripts/harness_test_runner.py +1586 -0
  187. package/harness/bundles/general/pi/scripts/harness_verification.py +593 -0
  188. package/harness/bundles/general/pi/scripts/harness_workflow_policy.py +266 -0
  189. package/harness/bundles/java/claude-code/.harness-build.json +1 -1
  190. package/harness/bundles/java/claude-code/harness-apidoc/SKILL.md +1 -1
  191. package/harness/bundles/java/claude-code/harness-archive/SKILL.md +1 -1
  192. package/harness/bundles/java/claude-code/harness-archive/reference.md +30 -1
  193. package/harness/bundles/java/claude-code/harness-archive/templates/summary-data-template.json +1 -0
  194. package/harness/bundles/java/claude-code/harness-codebase-map/SKILL.md +1 -1
  195. package/harness/bundles/java/claude-code/harness-execute/SKILL.md +1 -1
  196. package/harness/bundles/java/claude-code/harness-knowledge-ingest/SKILL.md +1 -1
  197. package/harness/bundles/java/claude-code/harness-knowledge-query/SKILL.md +1 -1
  198. package/harness/bundles/java/claude-code/harness-package/SKILL.md +1 -1
  199. package/harness/bundles/java/claude-code/harness-plan/SKILL.md +1 -1
  200. package/harness/bundles/java/claude-code/harness-pull/SKILL.md +1 -1
  201. package/harness/bundles/java/claude-code/harness-push/SKILL.md +1 -1
  202. package/harness/bundles/java/claude-code/harness-review/SKILL.md +1 -1
  203. package/harness/bundles/java/claude-code/harness-run/SKILL.md +1 -1
  204. package/harness/bundles/java/claude-code/harness-submit/SKILL.md +1 -1
  205. package/harness/bundles/java/claude-code/harness-sync/SKILL.md +1 -1
  206. package/harness/bundles/java/claude-code/harness-test/SKILL.md +1 -1
  207. package/harness/bundles/java/claude-code/scripts/harness_archive.py +146 -8
  208. package/harness/bundles/java/claude-code/scripts/harness_deploy.py +1 -1
  209. package/harness/bundles/java/claude-code/scripts/harness_knowledge_candidates.py +538 -4
  210. package/harness/bundles/java/codebuddy/.harness-build.json +1 -1
  211. package/harness/bundles/java/codebuddy/harness-apidoc/SKILL.md +1 -1
  212. package/harness/bundles/java/codebuddy/harness-archive/SKILL.md +1 -1
  213. package/harness/bundles/java/codebuddy/harness-archive/reference.md +30 -1
  214. package/harness/bundles/java/codebuddy/harness-archive/templates/summary-data-template.json +1 -0
  215. package/harness/bundles/java/codebuddy/harness-codebase-map/SKILL.md +1 -1
  216. package/harness/bundles/java/codebuddy/harness-execute/SKILL.md +1 -1
  217. package/harness/bundles/java/codebuddy/harness-knowledge-ingest/SKILL.md +1 -1
  218. package/harness/bundles/java/codebuddy/harness-knowledge-query/SKILL.md +1 -1
  219. package/harness/bundles/java/codebuddy/harness-package/SKILL.md +1 -1
  220. package/harness/bundles/java/codebuddy/harness-plan/SKILL.md +1 -1
  221. package/harness/bundles/java/codebuddy/harness-pull/SKILL.md +1 -1
  222. package/harness/bundles/java/codebuddy/harness-push/SKILL.md +1 -1
  223. package/harness/bundles/java/codebuddy/harness-review/SKILL.md +1 -1
  224. package/harness/bundles/java/codebuddy/harness-run/SKILL.md +1 -1
  225. package/harness/bundles/java/codebuddy/harness-submit/SKILL.md +1 -1
  226. package/harness/bundles/java/codebuddy/harness-sync/SKILL.md +1 -1
  227. package/harness/bundles/java/codebuddy/harness-test/SKILL.md +1 -1
  228. package/harness/bundles/java/codebuddy/scripts/harness_archive.py +146 -8
  229. package/harness/bundles/java/codebuddy/scripts/harness_deploy.py +1 -1
  230. package/harness/bundles/java/codebuddy/scripts/harness_knowledge_candidates.py +538 -4
  231. package/harness/bundles/java/codex/.harness-build.json +1 -1
  232. package/harness/bundles/java/codex/harness-apidoc/SKILL.md +1 -1
  233. package/harness/bundles/java/codex/harness-archive/SKILL.md +1 -1
  234. package/harness/bundles/java/codex/harness-archive/reference.md +30 -1
  235. package/harness/bundles/java/codex/harness-archive/templates/summary-data-template.json +1 -0
  236. package/harness/bundles/java/codex/harness-codebase-map/SKILL.md +1 -1
  237. package/harness/bundles/java/codex/harness-execute/SKILL.md +1 -1
  238. package/harness/bundles/java/codex/harness-knowledge-ingest/SKILL.md +1 -1
  239. package/harness/bundles/java/codex/harness-knowledge-query/SKILL.md +1 -1
  240. package/harness/bundles/java/codex/harness-package/SKILL.md +1 -1
  241. package/harness/bundles/java/codex/harness-plan/SKILL.md +1 -1
  242. package/harness/bundles/java/codex/harness-pull/SKILL.md +1 -1
  243. package/harness/bundles/java/codex/harness-push/SKILL.md +1 -1
  244. package/harness/bundles/java/codex/harness-review/SKILL.md +1 -1
  245. package/harness/bundles/java/codex/harness-run/SKILL.md +1 -1
  246. package/harness/bundles/java/codex/harness-submit/SKILL.md +1 -1
  247. package/harness/bundles/java/codex/harness-sync/SKILL.md +1 -1
  248. package/harness/bundles/java/codex/harness-test/SKILL.md +1 -1
  249. package/harness/bundles/java/codex/scripts/harness_archive.py +146 -8
  250. package/harness/bundles/java/codex/scripts/harness_deploy.py +1 -1
  251. package/harness/bundles/java/codex/scripts/harness_knowledge_candidates.py +538 -4
  252. package/harness/bundles/java/cursor/.harness-build.json +1 -1
  253. package/harness/bundles/java/cursor/harness-apidoc/SKILL.md +1 -1
  254. package/harness/bundles/java/cursor/harness-archive/SKILL.md +1 -1
  255. package/harness/bundles/java/cursor/harness-archive/reference.md +30 -1
  256. package/harness/bundles/java/cursor/harness-archive/templates/summary-data-template.json +1 -0
  257. package/harness/bundles/java/cursor/harness-codebase-map/SKILL.md +1 -1
  258. package/harness/bundles/java/cursor/harness-execute/SKILL.md +1 -1
  259. package/harness/bundles/java/cursor/harness-knowledge-ingest/SKILL.md +1 -1
  260. package/harness/bundles/java/cursor/harness-knowledge-query/SKILL.md +1 -1
  261. package/harness/bundles/java/cursor/harness-package/SKILL.md +1 -1
  262. package/harness/bundles/java/cursor/harness-plan/SKILL.md +1 -1
  263. package/harness/bundles/java/cursor/harness-pull/SKILL.md +1 -1
  264. package/harness/bundles/java/cursor/harness-push/SKILL.md +1 -1
  265. package/harness/bundles/java/cursor/harness-review/SKILL.md +1 -1
  266. package/harness/bundles/java/cursor/harness-run/SKILL.md +1 -1
  267. package/harness/bundles/java/cursor/harness-submit/SKILL.md +1 -1
  268. package/harness/bundles/java/cursor/harness-sync/SKILL.md +1 -1
  269. package/harness/bundles/java/cursor/harness-test/SKILL.md +1 -1
  270. package/harness/bundles/java/cursor/scripts/harness_archive.py +146 -8
  271. package/harness/bundles/java/cursor/scripts/harness_deploy.py +1 -1
  272. package/harness/bundles/java/cursor/scripts/harness_knowledge_candidates.py +538 -4
  273. package/harness/bundles/java/pi/.harness-build.json +6 -0
  274. package/harness/bundles/java/pi/CONTEXT.md +98 -0
  275. package/harness/bundles/java/pi/README.md +478 -0
  276. package/harness/bundles/java/pi/contracts/build-profile-v3.schema.json +302 -0
  277. package/harness/bundles/java/pi/contracts/ci-metrics.schema.json +36 -0
  278. package/harness/bundles/java/pi/contracts/doctor-capability.schema.json +43 -0
  279. package/harness/bundles/java/pi/contracts/external-platform-observation.schema.json +62 -0
  280. package/harness/bundles/java/pi/contracts/fixtures/managed-execution.json +341 -0
  281. package/harness/bundles/java/pi/contracts/process-identity.schema.json +132 -0
  282. package/harness/bundles/java/pi/contracts/run-session.schema.json +142 -0
  283. package/harness/bundles/java/pi/contracts/service-retirement-receipt.schema.json +85 -0
  284. package/harness/bundles/java/pi/contracts/service-session.schema.json +147 -0
  285. package/harness/bundles/java/pi/contracts/workflow-policy.json +574 -0
  286. package/harness/bundles/java/pi/harness-apidoc/SKILL.md +97 -0
  287. package/harness/bundles/java/pi/harness-apidoc/checklist.md +142 -0
  288. package/harness/bundles/java/pi/harness-apidoc/reference.md +233 -0
  289. package/harness/bundles/java/pi/harness-archive/SKILL.md +322 -0
  290. package/harness/bundles/java/pi/harness-archive/checklist.md +71 -0
  291. package/harness/bundles/java/pi/harness-archive/reference.md +150 -0
  292. package/harness/bundles/java/pi/harness-archive/scripts/gen-manifest.ps1 +31 -0
  293. package/harness/bundles/java/pi/harness-archive/templates/summary-data-template.json +218 -0
  294. package/harness/bundles/java/pi/harness-codebase-map/SKILL.md +116 -0
  295. package/harness/bundles/java/pi/harness-codebase-map/checklist.md +126 -0
  296. package/harness/bundles/java/pi/harness-codebase-map/reference.md +364 -0
  297. package/harness/bundles/java/pi/harness-codebase-map/templates/ARCHITECTURE.md +57 -0
  298. package/harness/bundles/java/pi/harness-codebase-map/templates/CONCERNS.md +49 -0
  299. package/harness/bundles/java/pi/harness-codebase-map/templates/CONVENTIONS.md +57 -0
  300. package/harness/bundles/java/pi/harness-codebase-map/templates/INTEGRATIONS.md +52 -0
  301. package/harness/bundles/java/pi/harness-codebase-map/templates/STACK.md +55 -0
  302. package/harness/bundles/java/pi/harness-codebase-map/templates/STRUCTURE.md +69 -0
  303. package/harness/bundles/java/pi/harness-codebase-map/templates/TESTING.md +64 -0
  304. package/harness/bundles/java/pi/harness-codebase-map/templates/map-manifest.schema.json +73 -0
  305. package/harness/bundles/java/pi/harness-codebase-map/templates/map-summary.md +64 -0
  306. package/harness/bundles/java/pi/harness-execute/SKILL.md +170 -0
  307. package/harness/bundles/java/pi/harness-knowledge-ingest/SKILL.md +103 -0
  308. package/harness/bundles/java/pi/harness-knowledge-query/SKILL.md +97 -0
  309. package/harness/bundles/java/pi/harness-package/SKILL.md +94 -0
  310. package/harness/bundles/java/pi/harness-package/checklist.md +322 -0
  311. package/harness/bundles/java/pi/harness-package/reference.md +210 -0
  312. package/harness/bundles/java/pi/harness-plan/SKILL.md +158 -0
  313. package/harness/bundles/java/pi/harness-plan/checklist.md +243 -0
  314. package/harness/bundles/java/pi/harness-plan/protocols.md +133 -0
  315. package/harness/bundles/java/pi/harness-plan/reference.md +468 -0
  316. package/harness/bundles/java/pi/harness-pull/SKILL.md +55 -0
  317. package/harness/bundles/java/pi/harness-push/SKILL.md +83 -0
  318. package/harness/bundles/java/pi/harness-review/SKILL.md +175 -0
  319. package/harness/bundles/java/pi/harness-review/checklist.md +124 -0
  320. package/harness/bundles/java/pi/harness-review/protocols.md +69 -0
  321. package/harness/bundles/java/pi/harness-review/reference.md +114 -0
  322. package/harness/bundles/java/pi/harness-run/SKILL.md +206 -0
  323. package/harness/bundles/java/pi/harness-run/checklist.md +252 -0
  324. package/harness/bundles/java/pi/harness-run/protocols.md +141 -0
  325. package/harness/bundles/java/pi/harness-run/reference.md +820 -0
  326. package/harness/bundles/java/pi/harness-submit/SKILL.md +189 -0
  327. package/harness/bundles/java/pi/harness-submit/checklist.md +452 -0
  328. package/harness/bundles/java/pi/harness-submit/reference.md +152 -0
  329. package/harness/bundles/java/pi/harness-sync/SKILL.md +72 -0
  330. package/harness/bundles/java/pi/harness-sync/reference.md +176 -0
  331. package/harness/bundles/java/pi/harness-test/SKILL.md +264 -0
  332. package/harness/bundles/java/pi/harness-test/checklist.md +320 -0
  333. package/harness/bundles/java/pi/harness-test/pitfalls-java.md +16 -0
  334. package/harness/bundles/java/pi/harness-test/pitfalls.md +307 -0
  335. package/harness/bundles/java/pi/harness-test/reference.md +792 -0
  336. package/harness/bundles/java/pi/harness-test/scripts/runtime-helpers.mjs +216 -0
  337. package/harness/bundles/java/pi/protocols/archive-report-protocol.md +196 -0
  338. package/harness/bundles/java/pi/protocols/ci-layering-protocol.md +22 -0
  339. package/harness/bundles/java/pi/protocols/evidence-based-reporting-protocol.md +134 -0
  340. package/harness/bundles/java/pi/protocols/execution-session-protocol.md +52 -0
  341. package/harness/bundles/java/pi/protocols/external-platform-protocol.md +27 -0
  342. package/harness/bundles/java/pi/protocols/ledger-protocol.md +365 -0
  343. package/harness/bundles/java/pi/protocols/memory-closeout-protocol.md +21 -0
  344. package/harness/bundles/java/pi/protocols/model-routing-protocol.md +22 -0
  345. package/harness/bundles/java/pi/protocols/powershell-protocol.md +238 -0
  346. package/harness/bundles/java/pi/protocols/registry-governance-protocol.md +31 -0
  347. package/harness/bundles/java/pi/protocols/report-pipeline-protocol.md +172 -0
  348. package/harness/bundles/java/pi/protocols/sensitive-info-protocol.md +110 -0
  349. package/harness/bundles/java/pi/protocols/state-layout-protocol.md +209 -0
  350. package/harness/bundles/java/pi/protocols/submit-protocol.md +78 -0
  351. package/harness/bundles/java/pi/protocols/verification-graph-protocol.md +32 -0
  352. package/harness/bundles/java/pi/scripts/harness_adoption_metrics.py +391 -0
  353. package/harness/bundles/java/pi/scripts/harness_apidoc.py +53 -0
  354. package/harness/bundles/java/pi/scripts/harness_archive.py +11345 -0
  355. package/harness/bundles/java/pi/scripts/harness_change.py +1626 -0
  356. package/harness/bundles/java/pi/scripts/harness_check_gate.py +113 -0
  357. package/harness/bundles/java/pi/scripts/harness_context.py +1774 -0
  358. package/harness/bundles/java/pi/scripts/harness_deploy.py +968 -0
  359. package/harness/bundles/java/pi/scripts/harness_efficiency.py +443 -0
  360. package/harness/bundles/java/pi/scripts/harness_environment.py +1690 -0
  361. package/harness/bundles/java/pi/scripts/harness_events.py +2234 -0
  362. package/harness/bundles/java/pi/scripts/harness_events_sync.py +1425 -0
  363. package/harness/bundles/java/pi/scripts/harness_execution_contracts.py +596 -0
  364. package/harness/bundles/java/pi/scripts/harness_fixback.py +1975 -0
  365. package/harness/bundles/java/pi/scripts/harness_gate.py +3816 -0
  366. package/harness/bundles/java/pi/scripts/harness_headless.py +37 -0
  367. package/harness/bundles/java/pi/scripts/harness_integration.py +2564 -0
  368. package/harness/bundles/java/pi/scripts/harness_knowledge_candidates.py +796 -0
  369. package/harness/bundles/java/pi/scripts/harness_ledger.py +3556 -0
  370. package/harness/bundles/java/pi/scripts/harness_migration_head.py +220 -0
  371. package/harness/bundles/java/pi/scripts/harness_orchestration.py +344 -0
  372. package/harness/bundles/java/pi/scripts/harness_paths.py +676 -0
  373. package/harness/bundles/java/pi/scripts/harness_phase.py +1726 -0
  374. package/harness/bundles/java/pi/scripts/harness_plan_aggregate.py +249 -0
  375. package/harness/bundles/java/pi/scripts/harness_plan_finalize.py +1016 -0
  376. package/harness/bundles/java/pi/scripts/harness_preflight.py +650 -0
  377. package/harness/bundles/java/pi/scripts/harness_process.py +1065 -0
  378. package/harness/bundles/java/pi/scripts/harness_profile.py +1817 -0
  379. package/harness/bundles/java/pi/scripts/harness_report_model.py +442 -0
  380. package/harness/bundles/java/pi/scripts/harness_retry.py +175 -0
  381. package/harness/bundles/java/pi/scripts/harness_review.py +631 -0
  382. package/harness/bundles/java/pi/scripts/harness_runtime.py +2243 -0
  383. package/harness/bundles/java/pi/scripts/harness_service.py +3355 -0
  384. package/harness/bundles/java/pi/scripts/harness_state.py +365 -0
  385. package/harness/bundles/java/pi/scripts/harness_sync.py +407 -0
  386. package/harness/bundles/java/pi/scripts/harness_test_cleanup.py +175 -0
  387. package/harness/bundles/java/pi/scripts/harness_test_guard.py +1899 -0
  388. package/harness/bundles/java/pi/scripts/harness_test_runner.py +1586 -0
  389. package/harness/bundles/java/pi/scripts/harness_verification.py +593 -0
  390. package/harness/bundles/java/pi/scripts/harness_workflow_policy.py +266 -0
  391. package/harness/manifests/general/claude-code.json +19 -19
  392. package/harness/manifests/general/codebuddy.json +19 -19
  393. package/harness/manifests/general/codex.json +19 -19
  394. package/harness/manifests/general/cursor.json +19 -19
  395. package/harness/manifests/general/pi.json +475 -0
  396. package/harness/manifests/java/claude-code.json +21 -21
  397. package/harness/manifests/java/codebuddy.json +21 -21
  398. package/harness/manifests/java/codex.json +21 -21
  399. package/harness/manifests/java/cursor.json +21 -21
  400. package/harness/manifests/java/pi.json +499 -0
  401. package/hunter-workflow-family.json +2 -2
  402. package/package.json +1 -1
@@ -0,0 +1,218 @@
1
+ {
2
+ "schemaVersion": "2.3",
3
+ "changeName": "<change-name>",
4
+ "businessGoal": "本次变更为了做什么",
5
+ "finalStatus": "OK | WARN | CONDITIONAL_OK | FAIL",
6
+ "archiveIntent": "release-candidate | record-only",
7
+ "archiveIntegrity": {
8
+ "ok": true
9
+ },
10
+ "candidateVerification": {
11
+ "ok": false,
12
+ "code": "PRODUCT_CANDIDATE_VERIFIED | PRODUCT_CANDIDATE_NOT_VERIFIED | PRODUCT_CI_GREEN | PRODUCT_CI_NOT_GREEN",
13
+ "assurance": "local-reproducible | remote-claimed | remote-attested",
14
+ "message": ""
15
+ },
16
+ "releaseDecision": {
17
+ "releaseEligible": false,
18
+ "code": "RELEASE_NOT_EVALUATED",
19
+ "checks": {},
20
+ "issues": []
21
+ },
22
+ "releaseEligible": false,
23
+ "projection": {},
24
+ "finalCommit": "<commit-hash>",
25
+ "finalCommitBranch": "<origin/branch>",
26
+ "baseCommit": "<base-commit-hash>",
27
+ "diffStat": {
28
+ "filesChanged": 0,
29
+ "insertions": 0,
30
+ "deletions": 0,
31
+ "range": "<base>..<head>"
32
+ },
33
+ "stageStatus": {
34
+ "plan": "OK",
35
+ "run": "OK | WARN",
36
+ "test": "OK | PARTIAL | USER_SKIPPED | BLOCKED_BY_DBA",
37
+ "review": "ADVISORY",
38
+ "submit": "OK",
39
+ "archive": "OK"
40
+ },
41
+ "durations": {
42
+ "totalLabel": "约 N 分",
43
+ "totalMinutes": 0,
44
+ "stages": [
45
+ {
46
+ "stage": "plan",
47
+ "skill": "harness-plan",
48
+ "startedAt": "YYYY-MM-DD HH:mm:ss",
49
+ "endedAt": "YYYY-MM-DD HH:mm:ss",
50
+ "minutes": 0,
51
+ "result": "OK | WARN | FAIL"
52
+ }
53
+ ]
54
+ },
55
+ "timing": {
56
+ "workflowWallClockMs": 0,
57
+ "attributedStageUnionMs": 0,
58
+ "externalWaitMs": 0,
59
+ "pausedMs": 0,
60
+ "agentOrToolUnattributedMs": 0,
61
+ "conservationDeltaMs": 0,
62
+ "attempts": [],
63
+ "sessions": []
64
+ },
65
+ "skillCalls": [
66
+ { "skill": "harness-plan", "count": 1, "result": "OK" }
67
+ ],
68
+ "verification": {
69
+ "unitTests": {
70
+ "run": 0,
71
+ "failures": 0,
72
+ "errors": 0,
73
+ "skipped": 0,
74
+ "passRate": "183/185",
75
+ "source": "committed | uncommitted-archived | not-run"
76
+ },
77
+ "apiTests": {
78
+ "status": "OK | PARTIAL | USER_SKIPPED | NOT_RUN",
79
+ "total": 0,
80
+ "passed": 0,
81
+ "failed": 0,
82
+ "blocked": 0,
83
+ "passRate": "34/35"
84
+ },
85
+ "browserE2E": {
86
+ "status": "OK | FAIL | PARTIAL | USER_SKIPPED | NOT_RUN",
87
+ "total": 0,
88
+ "passed": 0,
89
+ "failed": 0,
90
+ "skipped": 0,
91
+ "retries": 0
92
+ },
93
+ "dbCompatibility": "OK | BLOCKED_BY_DBA | NOT_RUN",
94
+ "coverageDisplay": "例如 29/29 或 USER_SKIPPED"
95
+ },
96
+ "timeline": [],
97
+ "changedFiles": [
98
+ { "path": "src/...", "summary": "说明", "insertions": 0, "deletions": 0 }
99
+ ],
100
+ "artifacts": [],
101
+ "artifactStorage": {
102
+ "schemaVersion": 1,
103
+ "artifactCount": 0,
104
+ "bytesAdded": 0,
105
+ "bytesReused": 0,
106
+ "bytesPruned": 0,
107
+ "largestItems": []
108
+ },
109
+ "retention": {
110
+ "schemaVersion": 1,
111
+ "mode": "audit-only",
112
+ "expiredCount": 0,
113
+ "bytesPrunable": 0,
114
+ "items": []
115
+ },
116
+ "remoteCost": {
117
+ "schemaVersion": 1,
118
+ "available": false,
119
+ "candidates": [],
120
+ "totals": {
121
+ "runCount": 0,
122
+ "runnerMinutes": 0,
123
+ "queueWaitMs": 0,
124
+ "artifactBytes": 0,
125
+ "duplicateRunCount": 0
126
+ }
127
+ },
128
+ "efficiency": {
129
+ "schemaVersion": 1,
130
+ "timing": {
131
+ "wallClockMs": 0,
132
+ "activeTimeMs": 0,
133
+ "resourceWaitMs": 0
134
+ },
135
+ "verificationAttempts": 0,
136
+ "statusCounts": {},
137
+ "failureClasses": {
138
+ "launcher": 0,
139
+ "environment": 0,
140
+ "test": 0,
141
+ "external": 0,
142
+ "unknown": 0
143
+ },
144
+ "invalidationReasons": {},
145
+ "environment": {
146
+ "prepare": 0,
147
+ "reuse": 0,
148
+ "reset": 0,
149
+ "cleanup": 0
150
+ },
151
+ "productIdentityCount": 0,
152
+ "repeatedCommandsWithoutNewEvidence": 0,
153
+ "manualWrapperCount": 0,
154
+ "notes": []
155
+ },
156
+ "reviewSummary": {
157
+ "status": "ADVISORY",
158
+ "red": 0,
159
+ "yellow": 0,
160
+ "redFixed": 0,
161
+ "redConfirmed": 0,
162
+ "yellowFixed": 0,
163
+ "yellowDeferred": 0,
164
+ "summary": ""
165
+ },
166
+ "archiveManifest": {
167
+ "movedFiles": 0,
168
+ "generatedFiles": 0,
169
+ "totalArchiveFiles": 0,
170
+ "checksumStatus": "OK | WARN | FAIL"
171
+ },
172
+ "reportPipeline": {
173
+ "schema_version": 1,
174
+ "generated_at": "YYYY-MM-DDTHH:mm:ss.sssZ",
175
+ "event_count": 0,
176
+ "sources": [
177
+ "events.ndjson",
178
+ "evidence/verification-ledger.json",
179
+ "logs/execution-log.md"
180
+ ],
181
+ "phases": {
182
+ "plan": { "duration_ms": null, "event_count": 0 },
183
+ "run": { "duration_ms": null, "event_count": 0 },
184
+ "test": { "duration_ms": null, "event_count": 0 },
185
+ "review": { "duration_ms": null, "event_count": 0 },
186
+ "submit": { "duration_ms": null, "event_count": 0 },
187
+ "archive": { "duration_ms": null, "event_count": 0 }
188
+ },
189
+ "commands": [
190
+ {
191
+ "command": "npm test",
192
+ "exit_code": 0,
193
+ "duration_ms": 0,
194
+ "phase": "run",
195
+ "timestamp": "YYYY-MM-DDTHH:mm:ss.sssZ"
196
+ }
197
+ ],
198
+ "verificationChecks": [
199
+ {
200
+ "name": "unit tests",
201
+ "status": "passed | failed | skipped | unknown",
202
+ "command": "npm test",
203
+ "source": "events.ndjson | evidence/verification-ledger.json"
204
+ }
205
+ ],
206
+ "artifacts": [],
207
+ "validationIssues": [],
208
+ "sourceConsistency": {
209
+ "ok": true,
210
+ "issues": []
211
+ }
212
+ },
213
+ "uncommittedTestEvidence": [],
214
+ "maintenanceNotes": [],
215
+ "knownRisks": [],
216
+ "decisions": [],
217
+ "manualActions": []
218
+ }
@@ -0,0 +1,116 @@
1
+ ---
2
+ name: harness-codebase-map
3
+ description: 分析现有代码库并生成 .harness/codebase/map/
4
+ 下的结构化代码库地图。用于陌生项目理解、重大改造前梳理、harness-sync 提示 map 过期后的人工刷新。
5
+ ---
6
+ <!-- generated by harness_deploy.py; core=45b278c44cd66b19; overlay=java; agent=pi; do not edit -->
7
+ # harness-codebase-map — 代码库地图
8
+
9
+ ## Purpose
10
+
11
+ 生成 hunter-harness 自有代码库地图 → `.harness/codebase/map/`(7 类文档)+ `map-summary.md` + `map-manifest.json`。供 plan/run/review 快速理解项目结构。
12
+
13
+ ## 核心边界
14
+
15
+ - **内容只写** `.harness/codebase/map/`、`map-summary.md`、`map-manifest.json`、`.harness/reports/codebase-map-*.md`;平台同步只更新 Harness 协议状态
16
+ - **禁止** `.planning/`、Git 写操作、修改 `.codegraph/`、自动 commit 或 Git push
17
+ - `harness-sync` 只**建议**刷新,不自动跑全量 map
18
+
19
+ ## When to Use
20
+
21
+ 首次接入、map 过期(sync 提示)、大型重构前、用户说「刷新 codebase map」。跳过:空项目(<5 源文件)、纯符号查询(用 CodeGraph)。
22
+
23
+ ## Arguments
24
+
25
+ | 参数 | 含义 |
26
+ |------|------|
27
+ | (无) | 全量 7 文档 |
28
+ | `--fast` | STACK + STRUCTURE + CONCERNS |
29
+ | `--focus *` | tech / arch / quality / concerns / tech+arch |
30
+ | `--paths p1,p2` | 增量路径(非法路径 → WARN,全非法须确认) |
31
+ | `--status` / `--diff` | 只检查,不刷新 |
32
+ | `--refresh` | 显式全量刷新 |
33
+
34
+ ## Workflow(薄编排)
35
+
36
+ | Phase | 动作 |
37
+ |-------|------|
38
+ | 0 | 读 SKILL + `reference.md` / `checklist.md` / `templates/` + protocols |
39
+ | 1 | 解析 `$ARGUMENTS` → 模式与扫描范围 |
40
+ | 2 | 检查现有 map / manifest → `--status` 可在此结束 |
41
+ | 3 | `New-Item` 确保输出目录(PowerShell,禁止 Bash mkdir) |
42
+ | 4 | Glob/Grep/Read 扫描;git 只读查询经 PowerShell |
43
+ | 5 | 写 7 文档(`templates/` + frontmatter)— 可并行 mapper agents |
44
+ | 6 | 写 summary + manifest(schema → `templates/map-manifest.schema.json`) |
45
+ | 7 | 更新 `.harness/context-index.json` codebase 入口(若存在) |
46
+ | 8 | 控制台 + `.harness/reports/codebase-map-*.md` 报告 |
47
+ | 9 | 项目已绑定平台时,运行 `npx hunter-harness push --yes --non-interactive --json` 上传受控规则与架构快照;失败只报告“平台同步待重试”,不回滚本地地图 |
48
+
49
+ 逐步细节、frontmatter 字段、git 允许列表 → `reference.md` / `checklist.md`
50
+
51
+ ## Mapper Agent 策略
52
+
53
+ 优先并行 mapper(tech/arch/quality/concerns);Agent 直写文档,主会话汇总。不可用 → 主会话顺序扫描 + 🟡WARN。
54
+
55
+ ## P0 执行可信度规则
56
+
57
+ - 命令结果不得靠猜测;普通 Bash 被拒 → 立即改用等价 PowerShell 重试一次
58
+ - 仅 PowerShell 成功且有明确证据(构建/git/测试输出、文件存在、exit 0)时可标 ✅OK;否则 ❌FAIL 或 🟡WARN
59
+ - 禁止把 hook 拒绝、静态验证、无输出、用户跳过说成成功 → 详见 [[../protocols/powershell-protocol.md|powershell-protocol]]、[[../protocols/evidence-based-reporting-protocol.md|evidence-based-reporting-protocol]]
60
+
61
+ ## 生成内容语言约定
62
+
63
+ - sync/ingest 等生成的文档、规则、知识条目、架构说明一律**优先使用中文**撰写(标识符、命令、代码、API 字段名保持原文)
64
+ - 面向平台展示的标题/摘要/正文默认中文;仅当用户明确要求或目标系统强制时才用英文
65
+ > 片段:p0-trust · map 额外:文件存在/行数/hash 为证据
66
+
67
+ ## 关键规则
68
+
69
+ | # | 规则 |
70
+ |---|------|
71
+ | 1 | 唯一输出 `.harness/codebase/map/` |
72
+ | 2 | `generated_reviewable`,不建议手工改 map 正文 |
73
+ | 3 | 不做 Git 写操作、不改业务代码;受控平台上传不等于 Git push |
74
+ | 4 | 不管理 CodeGraph |
75
+ | 5 | 敏感信息脱敏 → `sensitive-info-protocol` |
76
+ | 6 | 证据化输出 → `evidence-based-reporting-protocol` |
77
+ | 7 | 扫描复用 `harness_profile` 的 `excludedRoots`(`DEFAULT_EXCLUDED_ROOTS`:node_modules/target/build/dist/cache 等)与 state snapshot 输入,不重复定义排除集;sync 只建议刷新,不自动触发全量 map(design §3.7) |
78
+
79
+ ## Output Format
80
+
81
+ 模式、范围、7/7 文档路径与行数、manifest/summary、context-index 状态、平台同步状态、WARN/FAIL → `reference.md` 报告模板
82
+
83
+ ## 渐进披露
84
+
85
+ - **Read `checklist.md`** — 执行前后检查
86
+ - **Read `reference.md`** — manifest、mapper、扫描模式
87
+ - **Read `templates/*`** — 各文档模板
88
+
89
+ ## 交互白名单
90
+
91
+ **无** blocking user confirmation;参数/默认值 + `decision` 事件
92
+
93
+ ## 执行日志
94
+
95
+ `events.ndjson` 为唯一事实源(schema_version 3,兼容读取 v1/v2;`note` 承载人类可读摘要);`logs/execution-log.md` 由 `harness_events.py` 渲染,**禁止用 Write/Edit 直接维护**。直接修改的内容会在 `phase.end` 或 finalize 时被完整重建覆盖,属于数据丢失;需要保留的详情必须进入事件 `note`。结构 → [[../protocols/report-pipeline-protocol.md|report-pipeline-protocol]]
96
+
97
+ **`phase.start` 由 `harness_gate.py begin` 写,不要再手工追加一次。** 两条同 `run-id` 的
98
+ `phase.start` 会让 `plan finalize` 以 `PHASE_START_DUPLICATE` 卡死,而且手工那次会先触发
99
+ auto-seal、把正在开始的 attempt 封成 `RECOVERED`。要补触发指令说明就带 `--note` 跑 `gate begin`。
100
+ (重复追加现已按 `(phase, run-id)` 判为幂等 no-op,但依赖它不如不写。)
101
+
102
+ ```powershell
103
+ # 阶段开始:gate begin 负责,note 在这里给
104
+ python <skills-root>/scripts/harness_gate.py begin --change-dir ".harness/changes/<change-name>" --phase <phase> --note "<触发指令>"
105
+ # 阶段中的其他事件才用 append
106
+ python <skills-root>/scripts/harness_events.py append --change-dir ".harness/changes/<change-name>" --phase <phase> --type <command|issue|verification> --run-id <phase-run-id> --note "<摘要>"
107
+ ```
108
+
109
+ > **脚本接线**:`harness_events.py append`;`harness_archive.py finalize`;`harness_preflight.py check`;`harness_ledger.py can-reuse`;`harness_service.py ensure/stop`(须 `--files`/`serviceStart.inputFiles`)。JSON 输出按 D13 护栏解读。
110
+
111
+ > **Task 4 §6.1 写入契约**:普通 `append` = 加锁 -> 追加一行 -> fsync -> 解锁,**不 load 历史、不渲染**(O(1),跨进程锁 `events.ndjson.lock`,UUID 用完整 `uuid4().hex` 无需去重扫描)。仅 `--type phase.end` append 在追加成功后渲染一次 `execution-log.md`;显式 `harness_events.py render` 随时从完整 events 重建;`harness_archive.py finalize` 在 collect 前强制 render 一次。高频 command append 期间 log 可能滞后,phase 边界保持最新。
112
+
113
+ 每个阶段的 `phase.start` 与对应 `phase.end` 必须复用同一 `--run-id` / `--attempt`;阶段结束必须写 `--status OK|WARN|FAIL|BLOCKED`。重试同一阶段时生成新的 run-id 并增加 `--attempt <n>`,不得覆盖或伪装成一次执行。**`attempt` 按 phase 全局递增,不是按 run-id**:一个 run-id 只绑定一个 attempt,重试必须「新 run-id + 下一个 attempt」两者同时换,只换其一会撞 `EVENT_ATTEMPT_CONFLICT` 或 `PHASE_ALREADY_CLOSED`。已发布 plan 的修订通过重跑 `plan evidence-pack` + `plan finalize` 分配新 attempt(`harness_plan_finalize.py republish` 已于 0.3.0 移除)。
114
+
115
+ 阶段跑得久(plan/run 常见)时用 `harness_context.py renew --project . --change <cn> --executor <tool>` 续租;租约到期本身不再阻断 `close`(同一 owner 的过期租约不构成冲突,收据里记 `leaseLapsed`),但续租能让 `view` 的状态如实反映在跑。跨工具继续执行时写 `--executor-tool <codex|claude-code|codebuddy|cursor>`,并在接棒事件写 `--handoff-from-tool` / `--handoff-reason`;也可由 `HUNTER_HARNESS_TOOL/AGENT/MODEL/RUN_ID` 环境变量统一注入。
116
+ > 片段:logging · phase=`codebase-map`;默认写 reports,有未归档变更时另写 change events
@@ -0,0 +1,126 @@
1
+ # harness-codebase-map 检查清单
2
+
3
+ ## 执行前检查
4
+
5
+ | 检查项 | 必须 | 说明 |
6
+ |---|:---:|---|
7
+ | 当前目录是项目根或已给出项目路径 | 是 | 需要能定位源码、配置和 `.harness/` |
8
+ | 参数已解析 | 是 | 识别 full / fast / focus / paths / status / diff |
9
+ | `--paths` 已做安全校验 | 条件 | 拒绝 `..`、绝对路径、shell 元字符 |
10
+ | 已读取 `.harness/project.yaml` | 否 | 不存在时 profile 记为 unknown |
11
+ | 已读取 `.harness/context-index.json` | 否 | 不存在时可创建最小结构 |
12
+ | 已检查旧 map 状态 | 是 | 判断首次、缺失、过期、部分刷新 |
13
+ | 已确认输出路径为 `.harness/codebase/map/` | 是 | 禁止 `.planning/codebase/` |
14
+ | 已确认不执行 Git 写操作 | 是 | 禁止 add/commit/pull/merge/push/reset/checkout/rebase/clean;只允许 status / diff --name-only / rev-parse |
15
+
16
+ ## 参数模式检查
17
+
18
+ | 模式 | 需要生成/检查 |
19
+ |---|---|
20
+ | `--status` | 只检查 map 完整性、manifest、summary、stale 状态 |
21
+ | `--diff` | 对比 manifest 与当前代码状态,输出可能过期范围 |
22
+ | full / `--refresh` | 生成或刷新 7 个文档 |
23
+ | `--fast` | 默认刷新 `STACK.md`、`STRUCTURE.md`、`CONCERNS.md` |
24
+ | `--focus tech` | `STACK.md`、`INTEGRATIONS.md` |
25
+ | `--focus arch` | `ARCHITECTURE.md`、`STRUCTURE.md` |
26
+ | `--focus quality` | `CONVENTIONS.md`、`TESTING.md` |
27
+ | `--focus concerns` | `CONCERNS.md` |
28
+ | `--paths` | 只扫描合法 repo-relative 路径,仍按 focus 决定输出文档 |
29
+
30
+ ## 输出文件检查
31
+
32
+ 全量模式必须存在:
33
+
34
+ ```text
35
+ .harness/codebase/map/STACK.md
36
+ .harness/codebase/map/INTEGRATIONS.md
37
+ .harness/codebase/map/ARCHITECTURE.md
38
+ .harness/codebase/map/STRUCTURE.md
39
+ .harness/codebase/map/CONVENTIONS.md
40
+ .harness/codebase/map/TESTING.md
41
+ .harness/codebase/map/CONCERNS.md
42
+ .harness/codebase/map-summary.md
43
+ .harness/codebase/map-manifest.json
44
+ ```
45
+
46
+ 模板目录必须包含:
47
+
48
+ ```text
49
+ templates/STACK.md
50
+ templates/INTEGRATIONS.md
51
+ templates/ARCHITECTURE.md
52
+ templates/STRUCTURE.md
53
+ templates/CONVENTIONS.md
54
+ templates/TESTING.md
55
+ templates/CONCERNS.md
56
+ templates/map-summary.md
57
+ templates/map-manifest.schema.json
58
+ ```
59
+
60
+ 局部刷新模式中,未刷新文件如果已存在,可以保留;如果不存在,必须在报告中标记 WARN。
61
+
62
+ ## 文档质量检查
63
+
64
+ 每个生成文档必须满足:
65
+
66
+ - 有 YAML frontmatter。
67
+ - 标明 `generator: harness-codebase-map`。
68
+ - 标明 `file_kind: generated_reviewable`。
69
+ - 包含实际文件路径,路径使用反引号包裹。
70
+ - 不包含明文 token、password、secret、Authorization、Cookie、API key。
71
+ - 不把猜测写成事实;不确定内容用“推测 / 待验证”。
72
+ - 至少包含 “Analysis Date” 或 “Mapped At”。
73
+
74
+ ## Manifest 检查
75
+
76
+ `map-manifest.json` 必须包含:
77
+
78
+ - `generator`
79
+ - `generated_at`
80
+ - `mode`
81
+ - `profile`
82
+ - `last_mapped_commit`
83
+ - `path_scope`
84
+ - `documents[]`
85
+ - 每个文档的 `path` / `document_type` / `sha256` / `line_count`
86
+ - `warnings[]`
87
+
88
+ ## Context Index 检查
89
+
90
+ 如果 `.harness/context-index.json` 存在:
91
+
92
+ - 必须保留未知字段。
93
+ - 只更新 `codebase.map` 相关字段。
94
+ - 不得覆盖 rules、knowledge、skills 其他索引。
95
+
96
+ 如果不存在:
97
+
98
+ - 可创建最小结构。
99
+ - 报告中标记 `context-index: created-minimal`。
100
+
101
+ ## 失败判定
102
+
103
+ 以下情况必须标记 `❌FAIL`:
104
+
105
+ - 无法写入 `.harness/codebase/map/`。
106
+ - 全量模式下 7 个文档未全部生成,且不是用户明确选择局部模式。
107
+ - manifest 无法生成或 JSON 不可读。
108
+ - 写入后的文件无法 Read 验证。
109
+
110
+ 以下情况标记 `🟡WARN`:
111
+
112
+ - Agent 工具不可用,降级为顺序扫描。
113
+ - 部分路径非法,被剔除。
114
+ - 无法获取 git commit,使用 `unknown`。
115
+ - context-index 不存在并创建了最小结构。
116
+ - 局部刷新导致部分文档仍缺失。
117
+ - 检测到可能敏感信息并已脱敏。
118
+
119
+ ## 结束前必检
120
+
121
+ - [ ] 输出目录是 `.harness/codebase/map/`。
122
+ - [ ] 没有创建 `.planning/`。
123
+ - [ ] 没有修改 `.codegraph/`。
124
+ - [ ] 没有执行 Git 写操作。
125
+ - [ ] 所有写入文件已通过 Read 或文件存在检查验证。
126
+ - [ ] 最终回复中列出生成文件、行数、状态和 warnings。