hunter-harness 0.1.2 → 0.2.0

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 (566) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +11 -0
  3. package/dist/bin.js +955 -318
  4. package/package.json +1 -1
  5. package/resources/harness/bundles/general/claude-code/.harness-build.json +6 -0
  6. package/resources/harness/{general → bundles/general/claude-code}/agents/harness-reviewer.md +2 -2
  7. package/resources/harness/{general → bundles/general/claude-code}/harness-archive/SKILL.md +1 -1
  8. package/resources/harness/{java → bundles/general/claude-code}/harness-codebase-map/SKILL.md +1 -1
  9. package/resources/harness/{java → bundles/general/claude-code}/harness-knowledge-ingest/SKILL.md +1 -1
  10. package/resources/harness/{general → bundles/general/claude-code}/harness-knowledge-ingest/reference.md +1 -1
  11. package/resources/harness/{general → bundles/general/claude-code}/harness-knowledge-query/SKILL.md +1 -1
  12. package/resources/harness/{general → bundles/general/claude-code}/harness-plan/SKILL.md +1 -1
  13. package/resources/harness/{java → bundles/general/claude-code}/harness-review/SKILL.md +8 -4
  14. package/resources/harness/{general → bundles/general/claude-code}/harness-review/checklist.md +3 -3
  15. package/resources/harness/{general → bundles/general/claude-code}/harness-run/SKILL.md +1 -1
  16. package/resources/harness/{general → bundles/general/claude-code}/harness-run/checklist.md +1 -1
  17. package/resources/harness/{general → bundles/general/claude-code}/harness-run/reference.md +2 -2
  18. package/resources/harness/{general → bundles/general/claude-code}/harness-submit/SKILL.md +1 -1
  19. package/resources/harness/{java → bundles/general/claude-code}/harness-sync/SKILL.md +2 -2
  20. package/resources/harness/{general → bundles/general/claude-code}/harness-sync/reference.md +7 -7
  21. package/resources/harness/{general → bundles/general/claude-code}/harness-test/SKILL.md +1 -1
  22. package/resources/harness/{general → bundles/general/claude-code}/harness-test/checklist.md +1 -1
  23. package/resources/harness/{java → bundles/general/claude-code}/scripts/harness_archive.py +2300 -2300
  24. package/resources/harness/{general → bundles/general/claude-code}/scripts/harness_deploy.py +74 -13
  25. package/resources/harness/{general → bundles/general/claude-code}/scripts/harness_events.py +680 -680
  26. package/resources/harness/{general → bundles/general/claude-code}/scripts/harness_ledger.py +660 -660
  27. package/resources/harness/{java → bundles/general/claude-code}/scripts/harness_preflight.py +765 -765
  28. package/resources/harness/{general → bundles/general/claude-code}/scripts/harness_service.py +1331 -1331
  29. package/resources/harness/bundles/general/codebuddy/.harness-build.json +6 -0
  30. package/resources/harness/bundles/general/codebuddy/agents/harness-evaluator.md +94 -0
  31. package/resources/harness/bundles/general/codebuddy/agents/harness-explorer.md +53 -0
  32. package/resources/harness/bundles/general/codebuddy/agents/harness-reviewer.md +52 -0
  33. package/resources/harness/bundles/general/codebuddy/harness-archive/SKILL.md +198 -0
  34. package/resources/harness/bundles/general/codebuddy/harness-codebase-map/SKILL.md +95 -0
  35. package/resources/harness/bundles/general/codebuddy/harness-knowledge-ingest/SKILL.md +229 -0
  36. package/resources/harness/{java → bundles/general/codebuddy}/harness-knowledge-ingest/reference.md +1 -1
  37. package/resources/harness/bundles/general/codebuddy/harness-knowledge-query/SKILL.md +147 -0
  38. package/resources/harness/bundles/general/codebuddy/harness-plan/SKILL.md +109 -0
  39. package/resources/harness/bundles/general/codebuddy/harness-review/SKILL.md +142 -0
  40. package/resources/harness/{java → bundles/general/codebuddy}/harness-review/checklist.md +3 -3
  41. package/resources/harness/bundles/general/codebuddy/harness-run/SKILL.md +113 -0
  42. package/resources/harness/bundles/general/codebuddy/harness-run/checklist.md +259 -0
  43. package/resources/harness/bundles/general/codebuddy/harness-run/reference.md +834 -0
  44. package/resources/harness/bundles/general/codebuddy/harness-submit/SKILL.md +142 -0
  45. package/resources/harness/bundles/general/codebuddy/harness-sync/SKILL.md +65 -0
  46. package/resources/harness/{java → bundles/general/codebuddy}/harness-sync/reference.md +7 -7
  47. package/resources/harness/bundles/general/codebuddy/harness-test/SKILL.md +160 -0
  48. package/resources/harness/bundles/general/codebuddy/harness-test/checklist.md +319 -0
  49. package/resources/harness/bundles/general/codebuddy/harness-test/reference.md +791 -0
  50. package/resources/harness/{general → bundles/general/codebuddy}/scripts/harness_archive.py +2300 -2300
  51. package/resources/harness/{java → bundles/general/codebuddy}/scripts/harness_deploy.py +74 -13
  52. package/resources/harness/{java → bundles/general/codebuddy}/scripts/harness_events.py +680 -680
  53. package/resources/harness/{java → bundles/general/codebuddy}/scripts/harness_ledger.py +660 -660
  54. package/resources/harness/{general → bundles/general/codebuddy}/scripts/harness_preflight.py +765 -765
  55. package/resources/harness/{java → bundles/general/codebuddy}/scripts/harness_service.py +1331 -1331
  56. package/resources/harness/bundles/general/codex/.harness-build.json +6 -0
  57. package/resources/harness/bundles/general/codex/CONTEXT.md +65 -0
  58. package/resources/harness/bundles/general/codex/README.md +478 -0
  59. package/resources/harness/bundles/general/codex/harness-archive/SKILL.md +198 -0
  60. package/resources/harness/bundles/general/codex/harness-archive/checklist.md +52 -0
  61. package/resources/harness/bundles/general/codex/harness-archive/reference.md +103 -0
  62. package/resources/harness/bundles/general/codex/harness-archive/scripts/gen-manifest.ps1 +31 -0
  63. package/resources/harness/bundles/general/codex/harness-archive/templates/render-summary.mjs +171 -0
  64. package/resources/harness/bundles/general/codex/harness-archive/templates/summary-data-template.json +128 -0
  65. package/resources/harness/bundles/general/codex/harness-codebase-map/SKILL.md +95 -0
  66. package/resources/harness/bundles/general/codex/harness-codebase-map/checklist.md +126 -0
  67. package/resources/harness/bundles/general/codex/harness-codebase-map/reference.md +364 -0
  68. package/resources/harness/bundles/general/codex/harness-codebase-map/templates/ARCHITECTURE.md +57 -0
  69. package/resources/harness/bundles/general/codex/harness-codebase-map/templates/CONCERNS.md +49 -0
  70. package/resources/harness/bundles/general/codex/harness-codebase-map/templates/CONVENTIONS.md +57 -0
  71. package/resources/harness/bundles/general/codex/harness-codebase-map/templates/INTEGRATIONS.md +52 -0
  72. package/resources/harness/bundles/general/codex/harness-codebase-map/templates/STACK.md +55 -0
  73. package/resources/harness/bundles/general/codex/harness-codebase-map/templates/STRUCTURE.md +69 -0
  74. package/resources/harness/bundles/general/codex/harness-codebase-map/templates/TESTING.md +64 -0
  75. package/resources/harness/bundles/general/codex/harness-codebase-map/templates/map-manifest.schema.json +73 -0
  76. package/resources/harness/bundles/general/codex/harness-codebase-map/templates/map-summary.md +64 -0
  77. package/resources/harness/bundles/general/codex/harness-knowledge-ingest/SKILL.md +229 -0
  78. package/resources/harness/bundles/general/codex/harness-knowledge-ingest/design.md +842 -0
  79. package/resources/harness/bundles/general/codex/harness-knowledge-ingest/evaluations/harness_knowledge_evaluation.xml +42 -0
  80. package/resources/harness/bundles/general/codex/harness-knowledge-ingest/mcp-config.example.json +10 -0
  81. package/resources/harness/bundles/general/codex/harness-knowledge-ingest/reference.md +309 -0
  82. package/resources/harness/bundles/general/codex/harness-knowledge-ingest/scripts/harness_knowledge.py +4082 -0
  83. package/resources/harness/bundles/general/codex/harness-knowledge-ingest/scripts/harness_knowledge_mcp.py +273 -0
  84. package/resources/harness/bundles/general/codex/harness-knowledge-query/SKILL.md +147 -0
  85. package/resources/harness/bundles/general/codex/harness-plan/SKILL.md +109 -0
  86. package/resources/harness/bundles/general/codex/harness-plan/checklist.md +243 -0
  87. package/resources/harness/bundles/general/codex/harness-plan/protocols.md +124 -0
  88. package/resources/harness/bundles/general/codex/harness-plan/reference.md +376 -0
  89. package/resources/harness/bundles/general/codex/harness-review/SKILL.md +137 -0
  90. package/resources/harness/bundles/general/codex/harness-review/checklist.md +124 -0
  91. package/resources/harness/bundles/general/codex/harness-review/protocols.md +68 -0
  92. package/resources/harness/bundles/general/codex/harness-review/reference.md +86 -0
  93. package/resources/harness/bundles/general/codex/harness-run/SKILL.md +113 -0
  94. package/resources/harness/bundles/general/codex/harness-run/checklist.md +259 -0
  95. package/resources/harness/bundles/general/codex/harness-run/protocols.md +78 -0
  96. package/resources/harness/bundles/general/codex/harness-run/reference.md +834 -0
  97. package/resources/harness/bundles/general/codex/harness-submit/SKILL.md +142 -0
  98. package/resources/harness/bundles/general/codex/harness-submit/checklist.md +407 -0
  99. package/resources/harness/bundles/general/codex/harness-submit/reference.md +152 -0
  100. package/resources/harness/bundles/general/codex/harness-sync/SKILL.md +65 -0
  101. package/resources/harness/bundles/general/codex/harness-sync/reference.md +153 -0
  102. package/resources/harness/bundles/general/codex/harness-test/SKILL.md +160 -0
  103. package/resources/harness/bundles/general/codex/harness-test/checklist.md +319 -0
  104. package/resources/harness/bundles/general/codex/harness-test/pitfalls.md +260 -0
  105. package/resources/harness/bundles/general/codex/harness-test/reference.md +791 -0
  106. package/resources/harness/bundles/general/codex/protocols/archive-report-protocol.md +175 -0
  107. package/resources/harness/bundles/general/codex/protocols/evidence-based-reporting-protocol.md +134 -0
  108. package/resources/harness/bundles/general/codex/protocols/ledger-protocol.md +270 -0
  109. package/resources/harness/bundles/general/codex/protocols/powershell-protocol.md +181 -0
  110. package/resources/harness/bundles/general/codex/protocols/report-pipeline-protocol.md +150 -0
  111. package/resources/harness/bundles/general/codex/protocols/sensitive-info-protocol.md +92 -0
  112. package/resources/harness/bundles/general/codex/protocols/state-layout-protocol.md +131 -0
  113. package/resources/harness/bundles/general/codex/protocols/submit-protocol.md +78 -0
  114. package/resources/harness/bundles/general/codex/scripts/harness_archive.py +2319 -0
  115. package/resources/harness/bundles/general/codex/scripts/harness_deploy.py +674 -0
  116. package/resources/harness/bundles/general/codex/scripts/harness_events.py +680 -0
  117. package/resources/harness/bundles/general/codex/scripts/harness_ledger.py +671 -0
  118. package/resources/harness/bundles/general/codex/scripts/harness_preflight.py +780 -0
  119. package/resources/harness/bundles/general/codex/scripts/harness_service.py +1331 -0
  120. package/resources/harness/bundles/general/cursor/.harness-build.json +6 -0
  121. package/resources/harness/bundles/general/cursor/CONTEXT.md +65 -0
  122. package/resources/harness/bundles/general/cursor/README.md +478 -0
  123. package/resources/harness/bundles/general/cursor/harness-archive/SKILL.md +198 -0
  124. package/resources/harness/bundles/general/cursor/harness-archive/checklist.md +52 -0
  125. package/resources/harness/bundles/general/cursor/harness-archive/reference.md +103 -0
  126. package/resources/harness/bundles/general/cursor/harness-archive/scripts/gen-manifest.ps1 +31 -0
  127. package/resources/harness/bundles/general/cursor/harness-archive/templates/render-summary.mjs +171 -0
  128. package/resources/harness/bundles/general/cursor/harness-archive/templates/summary-data-template.json +128 -0
  129. package/resources/harness/bundles/general/cursor/harness-codebase-map/SKILL.md +95 -0
  130. package/resources/harness/bundles/general/cursor/harness-codebase-map/checklist.md +126 -0
  131. package/resources/harness/bundles/general/cursor/harness-codebase-map/reference.md +364 -0
  132. package/resources/harness/bundles/general/cursor/harness-codebase-map/templates/ARCHITECTURE.md +57 -0
  133. package/resources/harness/bundles/general/cursor/harness-codebase-map/templates/CONCERNS.md +49 -0
  134. package/resources/harness/bundles/general/cursor/harness-codebase-map/templates/CONVENTIONS.md +57 -0
  135. package/resources/harness/bundles/general/cursor/harness-codebase-map/templates/INTEGRATIONS.md +52 -0
  136. package/resources/harness/bundles/general/cursor/harness-codebase-map/templates/STACK.md +55 -0
  137. package/resources/harness/bundles/general/cursor/harness-codebase-map/templates/STRUCTURE.md +69 -0
  138. package/resources/harness/bundles/general/cursor/harness-codebase-map/templates/TESTING.md +64 -0
  139. package/resources/harness/bundles/general/cursor/harness-codebase-map/templates/map-manifest.schema.json +73 -0
  140. package/resources/harness/bundles/general/cursor/harness-codebase-map/templates/map-summary.md +64 -0
  141. package/resources/harness/bundles/general/cursor/harness-knowledge-ingest/SKILL.md +229 -0
  142. package/resources/harness/bundles/general/cursor/harness-knowledge-ingest/design.md +842 -0
  143. package/resources/harness/bundles/general/cursor/harness-knowledge-ingest/evaluations/harness_knowledge_evaluation.xml +42 -0
  144. package/resources/harness/bundles/general/cursor/harness-knowledge-ingest/mcp-config.example.json +10 -0
  145. package/resources/harness/bundles/general/cursor/harness-knowledge-ingest/reference.md +309 -0
  146. package/resources/harness/bundles/general/cursor/harness-knowledge-ingest/scripts/harness_knowledge.py +4082 -0
  147. package/resources/harness/bundles/general/cursor/harness-knowledge-ingest/scripts/harness_knowledge_mcp.py +273 -0
  148. package/resources/harness/bundles/general/cursor/harness-knowledge-query/SKILL.md +147 -0
  149. package/resources/harness/bundles/general/cursor/harness-plan/SKILL.md +109 -0
  150. package/resources/harness/bundles/general/cursor/harness-plan/checklist.md +243 -0
  151. package/resources/harness/bundles/general/cursor/harness-plan/protocols.md +124 -0
  152. package/resources/harness/bundles/general/cursor/harness-plan/reference.md +376 -0
  153. package/resources/harness/bundles/general/cursor/harness-review/SKILL.md +137 -0
  154. package/resources/harness/bundles/general/cursor/harness-review/checklist.md +124 -0
  155. package/resources/harness/bundles/general/cursor/harness-review/protocols.md +68 -0
  156. package/resources/harness/bundles/general/cursor/harness-review/reference.md +86 -0
  157. package/resources/harness/bundles/general/cursor/harness-run/SKILL.md +113 -0
  158. package/resources/harness/bundles/general/cursor/harness-run/checklist.md +259 -0
  159. package/resources/harness/bundles/general/cursor/harness-run/protocols.md +78 -0
  160. package/resources/harness/bundles/general/cursor/harness-run/reference.md +834 -0
  161. package/resources/harness/bundles/general/cursor/harness-submit/SKILL.md +142 -0
  162. package/resources/harness/bundles/general/cursor/harness-submit/checklist.md +407 -0
  163. package/resources/harness/bundles/general/cursor/harness-submit/reference.md +152 -0
  164. package/resources/harness/bundles/general/cursor/harness-sync/SKILL.md +65 -0
  165. package/resources/harness/bundles/general/cursor/harness-sync/reference.md +153 -0
  166. package/resources/harness/bundles/general/cursor/harness-test/SKILL.md +160 -0
  167. package/resources/harness/bundles/general/cursor/harness-test/checklist.md +319 -0
  168. package/resources/harness/bundles/general/cursor/harness-test/pitfalls.md +260 -0
  169. package/resources/harness/bundles/general/cursor/harness-test/reference.md +791 -0
  170. package/resources/harness/bundles/general/cursor/protocols/archive-report-protocol.md +175 -0
  171. package/resources/harness/bundles/general/cursor/protocols/evidence-based-reporting-protocol.md +134 -0
  172. package/resources/harness/bundles/general/cursor/protocols/ledger-protocol.md +270 -0
  173. package/resources/harness/bundles/general/cursor/protocols/powershell-protocol.md +181 -0
  174. package/resources/harness/bundles/general/cursor/protocols/report-pipeline-protocol.md +150 -0
  175. package/resources/harness/bundles/general/cursor/protocols/sensitive-info-protocol.md +92 -0
  176. package/resources/harness/bundles/general/cursor/protocols/state-layout-protocol.md +131 -0
  177. package/resources/harness/bundles/general/cursor/protocols/submit-protocol.md +78 -0
  178. package/resources/harness/bundles/general/cursor/scripts/harness_archive.py +2319 -0
  179. package/resources/harness/bundles/general/cursor/scripts/harness_deploy.py +674 -0
  180. package/resources/harness/bundles/general/cursor/scripts/harness_events.py +680 -0
  181. package/resources/harness/bundles/general/cursor/scripts/harness_ledger.py +671 -0
  182. package/resources/harness/bundles/general/cursor/scripts/harness_preflight.py +780 -0
  183. package/resources/harness/bundles/general/cursor/scripts/harness_service.py +1331 -0
  184. package/resources/harness/bundles/java/claude-code/.harness-build.json +6 -0
  185. package/resources/harness/bundles/java/claude-code/CONTEXT.md +65 -0
  186. package/resources/harness/bundles/java/claude-code/README.md +478 -0
  187. package/resources/harness/{java → bundles/java/claude-code}/agents/harness-reviewer.md +2 -2
  188. package/resources/harness/{java → bundles/java/claude-code}/harness-apidoc/SKILL.md +1 -1
  189. package/resources/harness/{java → bundles/java/claude-code}/harness-archive/SKILL.md +1 -1
  190. package/resources/harness/bundles/java/claude-code/harness-archive/checklist.md +52 -0
  191. package/resources/harness/bundles/java/claude-code/harness-archive/reference.md +103 -0
  192. package/resources/harness/bundles/java/claude-code/harness-archive/scripts/gen-manifest.ps1 +31 -0
  193. package/resources/harness/bundles/java/claude-code/harness-archive/templates/render-summary.mjs +171 -0
  194. package/resources/harness/bundles/java/claude-code/harness-archive/templates/summary-data-template.json +128 -0
  195. package/resources/harness/{general → bundles/java/claude-code}/harness-codebase-map/SKILL.md +1 -1
  196. package/resources/harness/bundles/java/claude-code/harness-codebase-map/checklist.md +126 -0
  197. package/resources/harness/bundles/java/claude-code/harness-codebase-map/reference.md +364 -0
  198. package/resources/harness/bundles/java/claude-code/harness-codebase-map/templates/ARCHITECTURE.md +57 -0
  199. package/resources/harness/bundles/java/claude-code/harness-codebase-map/templates/CONCERNS.md +49 -0
  200. package/resources/harness/bundles/java/claude-code/harness-codebase-map/templates/CONVENTIONS.md +57 -0
  201. package/resources/harness/bundles/java/claude-code/harness-codebase-map/templates/INTEGRATIONS.md +52 -0
  202. package/resources/harness/bundles/java/claude-code/harness-codebase-map/templates/STACK.md +55 -0
  203. package/resources/harness/bundles/java/claude-code/harness-codebase-map/templates/STRUCTURE.md +69 -0
  204. package/resources/harness/bundles/java/claude-code/harness-codebase-map/templates/TESTING.md +64 -0
  205. package/resources/harness/bundles/java/claude-code/harness-codebase-map/templates/map-manifest.schema.json +73 -0
  206. package/resources/harness/bundles/java/claude-code/harness-codebase-map/templates/map-summary.md +64 -0
  207. package/resources/harness/{general → bundles/java/claude-code}/harness-knowledge-ingest/SKILL.md +1 -1
  208. package/resources/harness/bundles/java/claude-code/harness-knowledge-ingest/design.md +842 -0
  209. package/resources/harness/bundles/java/claude-code/harness-knowledge-ingest/evaluations/harness_knowledge_evaluation.xml +42 -0
  210. package/resources/harness/bundles/java/claude-code/harness-knowledge-ingest/mcp-config.example.json +10 -0
  211. package/resources/harness/bundles/java/claude-code/harness-knowledge-ingest/reference.md +309 -0
  212. package/resources/harness/bundles/java/claude-code/harness-knowledge-ingest/scripts/harness_knowledge.py +4082 -0
  213. package/resources/harness/bundles/java/claude-code/harness-knowledge-ingest/scripts/harness_knowledge_mcp.py +273 -0
  214. package/resources/harness/{java → bundles/java/claude-code}/harness-knowledge-query/SKILL.md +1 -1
  215. package/resources/harness/{java → bundles/java/claude-code}/harness-package/SKILL.md +1 -1
  216. package/resources/harness/{java → bundles/java/claude-code}/harness-package/reference.md +1 -1
  217. package/resources/harness/{java → bundles/java/claude-code}/harness-plan/SKILL.md +1 -1
  218. package/resources/harness/bundles/java/claude-code/harness-plan/checklist.md +243 -0
  219. package/resources/harness/bundles/java/claude-code/harness-plan/protocols.md +124 -0
  220. package/resources/harness/bundles/java/claude-code/harness-plan/reference.md +376 -0
  221. package/resources/harness/{general → bundles/java/claude-code}/harness-review/SKILL.md +8 -4
  222. package/resources/harness/bundles/java/claude-code/harness-review/checklist.md +124 -0
  223. package/resources/harness/bundles/java/claude-code/harness-review/protocols.md +68 -0
  224. package/resources/harness/bundles/java/claude-code/harness-review/reference.md +86 -0
  225. package/resources/harness/{java → bundles/java/claude-code}/harness-run/SKILL.md +1 -1
  226. package/resources/harness/{java → bundles/java/claude-code}/harness-run/checklist.md +1 -1
  227. package/resources/harness/bundles/java/claude-code/harness-run/protocols.md +78 -0
  228. package/resources/harness/{java → bundles/java/claude-code}/harness-run/reference.md +2 -2
  229. package/resources/harness/{java → bundles/java/claude-code}/harness-submit/SKILL.md +1 -1
  230. package/resources/harness/bundles/java/claude-code/harness-submit/checklist.md +407 -0
  231. package/resources/harness/bundles/java/claude-code/harness-submit/reference.md +152 -0
  232. package/resources/harness/{general → bundles/java/claude-code}/harness-sync/SKILL.md +2 -2
  233. package/resources/harness/bundles/java/claude-code/harness-sync/reference.md +153 -0
  234. package/resources/harness/{java → bundles/java/claude-code}/harness-test/SKILL.md +1 -1
  235. package/resources/harness/{java → bundles/java/claude-code}/harness-test/checklist.md +316 -316
  236. package/resources/harness/bundles/java/claude-code/harness-test/pitfalls.md +260 -0
  237. package/resources/harness/{java → bundles/java/claude-code}/harness-test/reference.md +788 -788
  238. package/resources/harness/bundles/java/claude-code/protocols/archive-report-protocol.md +175 -0
  239. package/resources/harness/bundles/java/claude-code/protocols/evidence-based-reporting-protocol.md +134 -0
  240. package/resources/harness/bundles/java/claude-code/protocols/ledger-protocol.md +270 -0
  241. package/resources/harness/bundles/java/claude-code/protocols/powershell-protocol.md +181 -0
  242. package/resources/harness/bundles/java/claude-code/protocols/report-pipeline-protocol.md +150 -0
  243. package/resources/harness/bundles/java/claude-code/protocols/sensitive-info-protocol.md +92 -0
  244. package/resources/harness/bundles/java/claude-code/protocols/state-layout-protocol.md +131 -0
  245. package/resources/harness/bundles/java/claude-code/protocols/submit-protocol.md +78 -0
  246. package/resources/harness/bundles/java/claude-code/scripts/harness_archive.py +2319 -0
  247. package/resources/harness/bundles/java/claude-code/scripts/harness_deploy.py +674 -0
  248. package/resources/harness/bundles/java/claude-code/scripts/harness_events.py +680 -0
  249. package/resources/harness/bundles/java/claude-code/scripts/harness_ledger.py +671 -0
  250. package/resources/harness/bundles/java/claude-code/scripts/harness_preflight.py +780 -0
  251. package/resources/harness/bundles/java/claude-code/scripts/harness_service.py +1331 -0
  252. package/resources/harness/bundles/java/codebuddy/.harness-build.json +6 -0
  253. package/resources/harness/bundles/java/codebuddy/CONTEXT.md +65 -0
  254. package/resources/harness/bundles/java/codebuddy/README.md +478 -0
  255. package/resources/harness/bundles/java/codebuddy/agents/harness-evaluator.md +94 -0
  256. package/resources/harness/bundles/java/codebuddy/agents/harness-explorer.md +53 -0
  257. package/resources/harness/bundles/java/codebuddy/agents/harness-reviewer.md +52 -0
  258. package/resources/harness/bundles/java/codebuddy/harness-apidoc/SKILL.md +68 -0
  259. package/resources/harness/bundles/java/codebuddy/harness-apidoc/checklist.md +142 -0
  260. package/resources/harness/bundles/java/codebuddy/harness-apidoc/reference.md +233 -0
  261. package/resources/harness/bundles/java/codebuddy/harness-archive/SKILL.md +198 -0
  262. package/resources/harness/bundles/java/codebuddy/harness-archive/checklist.md +52 -0
  263. package/resources/harness/bundles/java/codebuddy/harness-archive/reference.md +103 -0
  264. package/resources/harness/bundles/java/codebuddy/harness-archive/scripts/gen-manifest.ps1 +31 -0
  265. package/resources/harness/bundles/java/codebuddy/harness-archive/templates/render-summary.mjs +171 -0
  266. package/resources/harness/bundles/java/codebuddy/harness-archive/templates/summary-data-template.json +128 -0
  267. package/resources/harness/bundles/java/codebuddy/harness-codebase-map/SKILL.md +95 -0
  268. package/resources/harness/bundles/java/codebuddy/harness-codebase-map/checklist.md +126 -0
  269. package/resources/harness/bundles/java/codebuddy/harness-codebase-map/reference.md +364 -0
  270. package/resources/harness/bundles/java/codebuddy/harness-codebase-map/templates/ARCHITECTURE.md +57 -0
  271. package/resources/harness/bundles/java/codebuddy/harness-codebase-map/templates/CONCERNS.md +49 -0
  272. package/resources/harness/bundles/java/codebuddy/harness-codebase-map/templates/CONVENTIONS.md +57 -0
  273. package/resources/harness/bundles/java/codebuddy/harness-codebase-map/templates/INTEGRATIONS.md +52 -0
  274. package/resources/harness/bundles/java/codebuddy/harness-codebase-map/templates/STACK.md +55 -0
  275. package/resources/harness/bundles/java/codebuddy/harness-codebase-map/templates/STRUCTURE.md +69 -0
  276. package/resources/harness/bundles/java/codebuddy/harness-codebase-map/templates/TESTING.md +64 -0
  277. package/resources/harness/bundles/java/codebuddy/harness-codebase-map/templates/map-manifest.schema.json +73 -0
  278. package/resources/harness/bundles/java/codebuddy/harness-codebase-map/templates/map-summary.md +64 -0
  279. package/resources/harness/bundles/java/codebuddy/harness-knowledge-ingest/SKILL.md +229 -0
  280. package/resources/harness/bundles/java/codebuddy/harness-knowledge-ingest/design.md +842 -0
  281. package/resources/harness/bundles/java/codebuddy/harness-knowledge-ingest/evaluations/harness_knowledge_evaluation.xml +42 -0
  282. package/resources/harness/bundles/java/codebuddy/harness-knowledge-ingest/mcp-config.example.json +10 -0
  283. package/resources/harness/bundles/java/codebuddy/harness-knowledge-ingest/reference.md +309 -0
  284. package/resources/harness/bundles/java/codebuddy/harness-knowledge-ingest/scripts/harness_knowledge.py +4082 -0
  285. package/resources/harness/bundles/java/codebuddy/harness-knowledge-ingest/scripts/harness_knowledge_mcp.py +273 -0
  286. package/resources/harness/bundles/java/codebuddy/harness-knowledge-query/SKILL.md +147 -0
  287. package/resources/harness/bundles/java/codebuddy/harness-package/SKILL.md +69 -0
  288. package/resources/harness/bundles/java/codebuddy/harness-package/checklist.md +322 -0
  289. package/resources/harness/bundles/java/codebuddy/harness-package/reference.md +210 -0
  290. package/resources/harness/bundles/java/codebuddy/harness-plan/SKILL.md +109 -0
  291. package/resources/harness/bundles/java/codebuddy/harness-plan/checklist.md +243 -0
  292. package/resources/harness/bundles/java/codebuddy/harness-plan/protocols.md +124 -0
  293. package/resources/harness/bundles/java/codebuddy/harness-plan/reference.md +376 -0
  294. package/resources/harness/bundles/java/codebuddy/harness-review/SKILL.md +142 -0
  295. package/resources/harness/bundles/java/codebuddy/harness-review/checklist.md +124 -0
  296. package/resources/harness/bundles/java/codebuddy/harness-review/protocols.md +68 -0
  297. package/resources/harness/bundles/java/codebuddy/harness-review/reference.md +86 -0
  298. package/resources/harness/bundles/java/codebuddy/harness-run/SKILL.md +129 -0
  299. package/resources/harness/bundles/java/codebuddy/harness-run/checklist.md +250 -0
  300. package/resources/harness/bundles/java/codebuddy/harness-run/protocols.md +78 -0
  301. package/resources/harness/bundles/java/codebuddy/harness-run/reference.md +814 -0
  302. package/resources/harness/bundles/java/codebuddy/harness-submit/SKILL.md +149 -0
  303. package/resources/harness/bundles/java/codebuddy/harness-submit/checklist.md +407 -0
  304. package/resources/harness/bundles/java/codebuddy/harness-submit/reference.md +152 -0
  305. package/resources/harness/bundles/java/codebuddy/harness-sync/SKILL.md +65 -0
  306. package/resources/harness/bundles/java/codebuddy/harness-sync/reference.md +153 -0
  307. package/resources/harness/bundles/java/codebuddy/harness-test/SKILL.md +172 -0
  308. package/resources/harness/bundles/java/codebuddy/harness-test/checklist.md +317 -0
  309. package/resources/harness/bundles/java/codebuddy/harness-test/pitfalls-java.md +16 -0
  310. package/resources/harness/bundles/java/codebuddy/harness-test/pitfalls.md +260 -0
  311. package/resources/harness/bundles/java/codebuddy/harness-test/reference.md +788 -0
  312. package/resources/harness/bundles/java/codebuddy/protocols/archive-report-protocol.md +175 -0
  313. package/resources/harness/bundles/java/codebuddy/protocols/evidence-based-reporting-protocol.md +134 -0
  314. package/resources/harness/bundles/java/codebuddy/protocols/ledger-protocol.md +270 -0
  315. package/resources/harness/bundles/java/codebuddy/protocols/powershell-protocol.md +181 -0
  316. package/resources/harness/bundles/java/codebuddy/protocols/report-pipeline-protocol.md +150 -0
  317. package/resources/harness/bundles/java/codebuddy/protocols/sensitive-info-protocol.md +92 -0
  318. package/resources/harness/bundles/java/codebuddy/protocols/state-layout-protocol.md +131 -0
  319. package/resources/harness/bundles/java/codebuddy/protocols/submit-protocol.md +78 -0
  320. package/resources/harness/bundles/java/codebuddy/scripts/harness_archive.py +2319 -0
  321. package/resources/harness/bundles/java/codebuddy/scripts/harness_deploy.py +674 -0
  322. package/resources/harness/bundles/java/codebuddy/scripts/harness_events.py +680 -0
  323. package/resources/harness/bundles/java/codebuddy/scripts/harness_ledger.py +671 -0
  324. package/resources/harness/bundles/java/codebuddy/scripts/harness_preflight.py +780 -0
  325. package/resources/harness/bundles/java/codebuddy/scripts/harness_service.py +1331 -0
  326. package/resources/harness/bundles/java/codex/.harness-build.json +6 -0
  327. package/resources/harness/bundles/java/codex/CONTEXT.md +65 -0
  328. package/resources/harness/bundles/java/codex/README.md +478 -0
  329. package/resources/harness/bundles/java/codex/harness-apidoc/SKILL.md +68 -0
  330. package/resources/harness/bundles/java/codex/harness-apidoc/checklist.md +142 -0
  331. package/resources/harness/bundles/java/codex/harness-apidoc/reference.md +233 -0
  332. package/resources/harness/bundles/java/codex/harness-archive/SKILL.md +198 -0
  333. package/resources/harness/bundles/java/codex/harness-archive/checklist.md +52 -0
  334. package/resources/harness/bundles/java/codex/harness-archive/reference.md +103 -0
  335. package/resources/harness/bundles/java/codex/harness-archive/scripts/gen-manifest.ps1 +31 -0
  336. package/resources/harness/bundles/java/codex/harness-archive/templates/render-summary.mjs +171 -0
  337. package/resources/harness/bundles/java/codex/harness-archive/templates/summary-data-template.json +128 -0
  338. package/resources/harness/bundles/java/codex/harness-codebase-map/SKILL.md +95 -0
  339. package/resources/harness/bundles/java/codex/harness-codebase-map/checklist.md +126 -0
  340. package/resources/harness/bundles/java/codex/harness-codebase-map/reference.md +364 -0
  341. package/resources/harness/bundles/java/codex/harness-codebase-map/templates/ARCHITECTURE.md +57 -0
  342. package/resources/harness/bundles/java/codex/harness-codebase-map/templates/CONCERNS.md +49 -0
  343. package/resources/harness/bundles/java/codex/harness-codebase-map/templates/CONVENTIONS.md +57 -0
  344. package/resources/harness/bundles/java/codex/harness-codebase-map/templates/INTEGRATIONS.md +52 -0
  345. package/resources/harness/bundles/java/codex/harness-codebase-map/templates/STACK.md +55 -0
  346. package/resources/harness/bundles/java/codex/harness-codebase-map/templates/STRUCTURE.md +69 -0
  347. package/resources/harness/bundles/java/codex/harness-codebase-map/templates/TESTING.md +64 -0
  348. package/resources/harness/bundles/java/codex/harness-codebase-map/templates/map-manifest.schema.json +73 -0
  349. package/resources/harness/bundles/java/codex/harness-codebase-map/templates/map-summary.md +64 -0
  350. package/resources/harness/bundles/java/codex/harness-knowledge-ingest/SKILL.md +229 -0
  351. package/resources/harness/bundles/java/codex/harness-knowledge-ingest/design.md +842 -0
  352. package/resources/harness/bundles/java/codex/harness-knowledge-ingest/evaluations/harness_knowledge_evaluation.xml +42 -0
  353. package/resources/harness/bundles/java/codex/harness-knowledge-ingest/mcp-config.example.json +10 -0
  354. package/resources/harness/bundles/java/codex/harness-knowledge-ingest/reference.md +309 -0
  355. package/resources/harness/bundles/java/codex/harness-knowledge-ingest/scripts/harness_knowledge.py +4082 -0
  356. package/resources/harness/bundles/java/codex/harness-knowledge-ingest/scripts/harness_knowledge_mcp.py +273 -0
  357. package/resources/harness/bundles/java/codex/harness-knowledge-query/SKILL.md +147 -0
  358. package/resources/harness/bundles/java/codex/harness-package/SKILL.md +69 -0
  359. package/resources/harness/bundles/java/codex/harness-package/checklist.md +322 -0
  360. package/resources/harness/bundles/java/codex/harness-package/reference.md +210 -0
  361. package/resources/harness/bundles/java/codex/harness-plan/SKILL.md +109 -0
  362. package/resources/harness/bundles/java/codex/harness-plan/checklist.md +243 -0
  363. package/resources/harness/bundles/java/codex/harness-plan/protocols.md +124 -0
  364. package/resources/harness/bundles/java/codex/harness-plan/reference.md +376 -0
  365. package/resources/harness/bundles/java/codex/harness-review/SKILL.md +137 -0
  366. package/resources/harness/bundles/java/codex/harness-review/checklist.md +124 -0
  367. package/resources/harness/bundles/java/codex/harness-review/protocols.md +68 -0
  368. package/resources/harness/bundles/java/codex/harness-review/reference.md +86 -0
  369. package/resources/harness/bundles/java/codex/harness-run/SKILL.md +129 -0
  370. package/resources/harness/bundles/java/codex/harness-run/checklist.md +250 -0
  371. package/resources/harness/bundles/java/codex/harness-run/protocols.md +78 -0
  372. package/resources/harness/bundles/java/codex/harness-run/reference.md +814 -0
  373. package/resources/harness/bundles/java/codex/harness-submit/SKILL.md +149 -0
  374. package/resources/harness/bundles/java/codex/harness-submit/checklist.md +407 -0
  375. package/resources/harness/bundles/java/codex/harness-submit/reference.md +152 -0
  376. package/resources/harness/bundles/java/codex/harness-sync/SKILL.md +65 -0
  377. package/resources/harness/bundles/java/codex/harness-sync/reference.md +153 -0
  378. package/resources/harness/bundles/java/codex/harness-test/SKILL.md +172 -0
  379. package/resources/harness/bundles/java/codex/harness-test/checklist.md +317 -0
  380. package/resources/harness/bundles/java/codex/harness-test/pitfalls-java.md +16 -0
  381. package/resources/harness/bundles/java/codex/harness-test/pitfalls.md +260 -0
  382. package/resources/harness/bundles/java/codex/harness-test/reference.md +788 -0
  383. package/resources/harness/bundles/java/codex/protocols/archive-report-protocol.md +175 -0
  384. package/resources/harness/bundles/java/codex/protocols/evidence-based-reporting-protocol.md +134 -0
  385. package/resources/harness/bundles/java/codex/protocols/ledger-protocol.md +270 -0
  386. package/resources/harness/bundles/java/codex/protocols/powershell-protocol.md +181 -0
  387. package/resources/harness/bundles/java/codex/protocols/report-pipeline-protocol.md +150 -0
  388. package/resources/harness/bundles/java/codex/protocols/sensitive-info-protocol.md +92 -0
  389. package/resources/harness/bundles/java/codex/protocols/state-layout-protocol.md +131 -0
  390. package/resources/harness/bundles/java/codex/protocols/submit-protocol.md +78 -0
  391. package/resources/harness/bundles/java/codex/scripts/harness_archive.py +2319 -0
  392. package/resources/harness/bundles/java/codex/scripts/harness_deploy.py +674 -0
  393. package/resources/harness/bundles/java/codex/scripts/harness_events.py +680 -0
  394. package/resources/harness/bundles/java/codex/scripts/harness_ledger.py +671 -0
  395. package/resources/harness/bundles/java/codex/scripts/harness_preflight.py +780 -0
  396. package/resources/harness/bundles/java/codex/scripts/harness_service.py +1331 -0
  397. package/resources/harness/bundles/java/cursor/.harness-build.json +6 -0
  398. package/resources/harness/bundles/java/cursor/CONTEXT.md +65 -0
  399. package/resources/harness/bundles/java/cursor/README.md +478 -0
  400. package/resources/harness/bundles/java/cursor/harness-apidoc/SKILL.md +68 -0
  401. package/resources/harness/bundles/java/cursor/harness-apidoc/checklist.md +142 -0
  402. package/resources/harness/bundles/java/cursor/harness-apidoc/reference.md +233 -0
  403. package/resources/harness/bundles/java/cursor/harness-archive/SKILL.md +198 -0
  404. package/resources/harness/bundles/java/cursor/harness-archive/checklist.md +52 -0
  405. package/resources/harness/bundles/java/cursor/harness-archive/reference.md +103 -0
  406. package/resources/harness/bundles/java/cursor/harness-archive/scripts/gen-manifest.ps1 +31 -0
  407. package/resources/harness/bundles/java/cursor/harness-archive/templates/render-summary.mjs +171 -0
  408. package/resources/harness/bundles/java/cursor/harness-archive/templates/summary-data-template.json +128 -0
  409. package/resources/harness/bundles/java/cursor/harness-codebase-map/SKILL.md +95 -0
  410. package/resources/harness/bundles/java/cursor/harness-codebase-map/checklist.md +126 -0
  411. package/resources/harness/bundles/java/cursor/harness-codebase-map/reference.md +364 -0
  412. package/resources/harness/bundles/java/cursor/harness-codebase-map/templates/ARCHITECTURE.md +57 -0
  413. package/resources/harness/bundles/java/cursor/harness-codebase-map/templates/CONCERNS.md +49 -0
  414. package/resources/harness/bundles/java/cursor/harness-codebase-map/templates/CONVENTIONS.md +57 -0
  415. package/resources/harness/bundles/java/cursor/harness-codebase-map/templates/INTEGRATIONS.md +52 -0
  416. package/resources/harness/bundles/java/cursor/harness-codebase-map/templates/STACK.md +55 -0
  417. package/resources/harness/bundles/java/cursor/harness-codebase-map/templates/STRUCTURE.md +69 -0
  418. package/resources/harness/bundles/java/cursor/harness-codebase-map/templates/TESTING.md +64 -0
  419. package/resources/harness/bundles/java/cursor/harness-codebase-map/templates/map-manifest.schema.json +73 -0
  420. package/resources/harness/bundles/java/cursor/harness-codebase-map/templates/map-summary.md +64 -0
  421. package/resources/harness/bundles/java/cursor/harness-knowledge-ingest/SKILL.md +229 -0
  422. package/resources/harness/bundles/java/cursor/harness-knowledge-ingest/design.md +842 -0
  423. package/resources/harness/bundles/java/cursor/harness-knowledge-ingest/evaluations/harness_knowledge_evaluation.xml +42 -0
  424. package/resources/harness/bundles/java/cursor/harness-knowledge-ingest/mcp-config.example.json +10 -0
  425. package/resources/harness/bundles/java/cursor/harness-knowledge-ingest/reference.md +309 -0
  426. package/resources/harness/bundles/java/cursor/harness-knowledge-ingest/scripts/harness_knowledge.py +4082 -0
  427. package/resources/harness/bundles/java/cursor/harness-knowledge-ingest/scripts/harness_knowledge_mcp.py +273 -0
  428. package/resources/harness/bundles/java/cursor/harness-knowledge-query/SKILL.md +147 -0
  429. package/resources/harness/bundles/java/cursor/harness-package/SKILL.md +69 -0
  430. package/resources/harness/bundles/java/cursor/harness-package/checklist.md +322 -0
  431. package/resources/harness/bundles/java/cursor/harness-package/reference.md +210 -0
  432. package/resources/harness/bundles/java/cursor/harness-plan/SKILL.md +109 -0
  433. package/resources/harness/bundles/java/cursor/harness-plan/checklist.md +243 -0
  434. package/resources/harness/bundles/java/cursor/harness-plan/protocols.md +124 -0
  435. package/resources/harness/bundles/java/cursor/harness-plan/reference.md +376 -0
  436. package/resources/harness/bundles/java/cursor/harness-review/SKILL.md +137 -0
  437. package/resources/harness/bundles/java/cursor/harness-review/checklist.md +124 -0
  438. package/resources/harness/bundles/java/cursor/harness-review/protocols.md +68 -0
  439. package/resources/harness/bundles/java/cursor/harness-review/reference.md +86 -0
  440. package/resources/harness/bundles/java/cursor/harness-run/SKILL.md +129 -0
  441. package/resources/harness/bundles/java/cursor/harness-run/checklist.md +250 -0
  442. package/resources/harness/bundles/java/cursor/harness-run/protocols.md +78 -0
  443. package/resources/harness/bundles/java/cursor/harness-run/reference.md +814 -0
  444. package/resources/harness/bundles/java/cursor/harness-submit/SKILL.md +149 -0
  445. package/resources/harness/bundles/java/cursor/harness-submit/checklist.md +407 -0
  446. package/resources/harness/bundles/java/cursor/harness-submit/reference.md +152 -0
  447. package/resources/harness/bundles/java/cursor/harness-sync/SKILL.md +65 -0
  448. package/resources/harness/bundles/java/cursor/harness-sync/reference.md +153 -0
  449. package/resources/harness/bundles/java/cursor/harness-test/SKILL.md +172 -0
  450. package/resources/harness/bundles/java/cursor/harness-test/checklist.md +317 -0
  451. package/resources/harness/bundles/java/cursor/harness-test/pitfalls-java.md +16 -0
  452. package/resources/harness/bundles/java/cursor/harness-test/pitfalls.md +260 -0
  453. package/resources/harness/bundles/java/cursor/harness-test/reference.md +788 -0
  454. package/resources/harness/bundles/java/cursor/protocols/archive-report-protocol.md +175 -0
  455. package/resources/harness/bundles/java/cursor/protocols/evidence-based-reporting-protocol.md +134 -0
  456. package/resources/harness/bundles/java/cursor/protocols/ledger-protocol.md +270 -0
  457. package/resources/harness/bundles/java/cursor/protocols/powershell-protocol.md +181 -0
  458. package/resources/harness/bundles/java/cursor/protocols/report-pipeline-protocol.md +150 -0
  459. package/resources/harness/bundles/java/cursor/protocols/sensitive-info-protocol.md +92 -0
  460. package/resources/harness/bundles/java/cursor/protocols/state-layout-protocol.md +131 -0
  461. package/resources/harness/bundles/java/cursor/protocols/submit-protocol.md +78 -0
  462. package/resources/harness/bundles/java/cursor/scripts/harness_archive.py +2319 -0
  463. package/resources/harness/bundles/java/cursor/scripts/harness_deploy.py +674 -0
  464. package/resources/harness/bundles/java/cursor/scripts/harness_events.py +680 -0
  465. package/resources/harness/bundles/java/cursor/scripts/harness_ledger.py +671 -0
  466. package/resources/harness/bundles/java/cursor/scripts/harness_preflight.py +780 -0
  467. package/resources/harness/bundles/java/cursor/scripts/harness_service.py +1331 -0
  468. package/resources/harness/manifests/{general.json → general/claude-code.json} +27 -26
  469. package/resources/harness/manifests/general/codebuddy.json +277 -0
  470. package/resources/harness/manifests/general/codex.json +265 -0
  471. package/resources/harness/manifests/general/cursor.json +265 -0
  472. package/resources/harness/manifests/{java.json → java/claude-code.json} +31 -30
  473. package/resources/harness/manifests/java/codebuddy.json +305 -0
  474. package/resources/harness/manifests/java/codex.json +293 -0
  475. package/resources/harness/manifests/java/cursor.json +293 -0
  476. package/resources/harness/general/.harness-build.json +0 -5
  477. package/resources/harness/java/.harness-build.json +0 -5
  478. /package/resources/harness/{general → bundles/general/claude-code}/CONTEXT.md +0 -0
  479. /package/resources/harness/{general → bundles/general/claude-code}/README.md +0 -0
  480. /package/resources/harness/{general → bundles/general/claude-code}/agents/harness-evaluator.md +0 -0
  481. /package/resources/harness/{general → bundles/general/claude-code}/agents/harness-explorer.md +0 -0
  482. /package/resources/harness/{general → bundles/general/claude-code}/harness-archive/checklist.md +0 -0
  483. /package/resources/harness/{general → bundles/general/claude-code}/harness-archive/reference.md +0 -0
  484. /package/resources/harness/{general → bundles/general/claude-code}/harness-archive/scripts/gen-manifest.ps1 +0 -0
  485. /package/resources/harness/{general → bundles/general/claude-code}/harness-archive/templates/render-summary.mjs +0 -0
  486. /package/resources/harness/{general → bundles/general/claude-code}/harness-archive/templates/summary-data-template.json +0 -0
  487. /package/resources/harness/{general → bundles/general/claude-code}/harness-codebase-map/checklist.md +0 -0
  488. /package/resources/harness/{general → bundles/general/claude-code}/harness-codebase-map/reference.md +0 -0
  489. /package/resources/harness/{general → bundles/general/claude-code}/harness-codebase-map/templates/ARCHITECTURE.md +0 -0
  490. /package/resources/harness/{general → bundles/general/claude-code}/harness-codebase-map/templates/CONCERNS.md +0 -0
  491. /package/resources/harness/{general → bundles/general/claude-code}/harness-codebase-map/templates/CONVENTIONS.md +0 -0
  492. /package/resources/harness/{general → bundles/general/claude-code}/harness-codebase-map/templates/INTEGRATIONS.md +0 -0
  493. /package/resources/harness/{general → bundles/general/claude-code}/harness-codebase-map/templates/STACK.md +0 -0
  494. /package/resources/harness/{general → bundles/general/claude-code}/harness-codebase-map/templates/STRUCTURE.md +0 -0
  495. /package/resources/harness/{general → bundles/general/claude-code}/harness-codebase-map/templates/TESTING.md +0 -0
  496. /package/resources/harness/{general → bundles/general/claude-code}/harness-codebase-map/templates/map-manifest.schema.json +0 -0
  497. /package/resources/harness/{general → bundles/general/claude-code}/harness-codebase-map/templates/map-summary.md +0 -0
  498. /package/resources/harness/{general → bundles/general/claude-code}/harness-knowledge-ingest/design.md +0 -0
  499. /package/resources/harness/{general → bundles/general/claude-code}/harness-knowledge-ingest/evaluations/harness_knowledge_evaluation.xml +0 -0
  500. /package/resources/harness/{general → bundles/general/claude-code}/harness-knowledge-ingest/mcp-config.example.json +0 -0
  501. /package/resources/harness/{general → bundles/general/claude-code}/harness-knowledge-ingest/scripts/harness_knowledge.py +0 -0
  502. /package/resources/harness/{general → bundles/general/claude-code}/harness-knowledge-ingest/scripts/harness_knowledge_mcp.py +0 -0
  503. /package/resources/harness/{general → bundles/general/claude-code}/harness-plan/checklist.md +0 -0
  504. /package/resources/harness/{general → bundles/general/claude-code}/harness-plan/protocols.md +0 -0
  505. /package/resources/harness/{general → bundles/general/claude-code}/harness-plan/reference.md +0 -0
  506. /package/resources/harness/{general → bundles/general/claude-code}/harness-review/protocols.md +0 -0
  507. /package/resources/harness/{general → bundles/general/claude-code}/harness-review/reference.md +0 -0
  508. /package/resources/harness/{general → bundles/general/claude-code}/harness-run/protocols.md +0 -0
  509. /package/resources/harness/{general → bundles/general/claude-code}/harness-submit/checklist.md +0 -0
  510. /package/resources/harness/{general → bundles/general/claude-code}/harness-submit/reference.md +0 -0
  511. /package/resources/harness/{general → bundles/general/claude-code}/harness-test/pitfalls.md +0 -0
  512. /package/resources/harness/{general → bundles/general/claude-code}/harness-test/reference.md +0 -0
  513. /package/resources/harness/{general → bundles/general/claude-code}/protocols/archive-report-protocol.md +0 -0
  514. /package/resources/harness/{general → bundles/general/claude-code}/protocols/evidence-based-reporting-protocol.md +0 -0
  515. /package/resources/harness/{general → bundles/general/claude-code}/protocols/ledger-protocol.md +0 -0
  516. /package/resources/harness/{general → bundles/general/claude-code}/protocols/powershell-protocol.md +0 -0
  517. /package/resources/harness/{general → bundles/general/claude-code}/protocols/report-pipeline-protocol.md +0 -0
  518. /package/resources/harness/{general → bundles/general/claude-code}/protocols/sensitive-info-protocol.md +0 -0
  519. /package/resources/harness/{general → bundles/general/claude-code}/protocols/state-layout-protocol.md +0 -0
  520. /package/resources/harness/{general → bundles/general/claude-code}/protocols/submit-protocol.md +0 -0
  521. /package/resources/harness/{java → bundles/general/codebuddy}/CONTEXT.md +0 -0
  522. /package/resources/harness/{java → bundles/general/codebuddy}/README.md +0 -0
  523. /package/resources/harness/{java → bundles/general/codebuddy}/harness-archive/checklist.md +0 -0
  524. /package/resources/harness/{java → bundles/general/codebuddy}/harness-archive/reference.md +0 -0
  525. /package/resources/harness/{java → bundles/general/codebuddy}/harness-archive/scripts/gen-manifest.ps1 +0 -0
  526. /package/resources/harness/{java → bundles/general/codebuddy}/harness-archive/templates/render-summary.mjs +0 -0
  527. /package/resources/harness/{java → bundles/general/codebuddy}/harness-archive/templates/summary-data-template.json +0 -0
  528. /package/resources/harness/{java → bundles/general/codebuddy}/harness-codebase-map/checklist.md +0 -0
  529. /package/resources/harness/{java → bundles/general/codebuddy}/harness-codebase-map/reference.md +0 -0
  530. /package/resources/harness/{java → bundles/general/codebuddy}/harness-codebase-map/templates/ARCHITECTURE.md +0 -0
  531. /package/resources/harness/{java → bundles/general/codebuddy}/harness-codebase-map/templates/CONCERNS.md +0 -0
  532. /package/resources/harness/{java → bundles/general/codebuddy}/harness-codebase-map/templates/CONVENTIONS.md +0 -0
  533. /package/resources/harness/{java → bundles/general/codebuddy}/harness-codebase-map/templates/INTEGRATIONS.md +0 -0
  534. /package/resources/harness/{java → bundles/general/codebuddy}/harness-codebase-map/templates/STACK.md +0 -0
  535. /package/resources/harness/{java → bundles/general/codebuddy}/harness-codebase-map/templates/STRUCTURE.md +0 -0
  536. /package/resources/harness/{java → bundles/general/codebuddy}/harness-codebase-map/templates/TESTING.md +0 -0
  537. /package/resources/harness/{java → bundles/general/codebuddy}/harness-codebase-map/templates/map-manifest.schema.json +0 -0
  538. /package/resources/harness/{java → bundles/general/codebuddy}/harness-codebase-map/templates/map-summary.md +0 -0
  539. /package/resources/harness/{java → bundles/general/codebuddy}/harness-knowledge-ingest/design.md +0 -0
  540. /package/resources/harness/{java → bundles/general/codebuddy}/harness-knowledge-ingest/evaluations/harness_knowledge_evaluation.xml +0 -0
  541. /package/resources/harness/{java → bundles/general/codebuddy}/harness-knowledge-ingest/mcp-config.example.json +0 -0
  542. /package/resources/harness/{java → bundles/general/codebuddy}/harness-knowledge-ingest/scripts/harness_knowledge.py +0 -0
  543. /package/resources/harness/{java → bundles/general/codebuddy}/harness-knowledge-ingest/scripts/harness_knowledge_mcp.py +0 -0
  544. /package/resources/harness/{java → bundles/general/codebuddy}/harness-plan/checklist.md +0 -0
  545. /package/resources/harness/{java → bundles/general/codebuddy}/harness-plan/protocols.md +0 -0
  546. /package/resources/harness/{java → bundles/general/codebuddy}/harness-plan/reference.md +0 -0
  547. /package/resources/harness/{java → bundles/general/codebuddy}/harness-review/protocols.md +0 -0
  548. /package/resources/harness/{java → bundles/general/codebuddy}/harness-review/reference.md +0 -0
  549. /package/resources/harness/{java → bundles/general/codebuddy}/harness-run/protocols.md +0 -0
  550. /package/resources/harness/{java → bundles/general/codebuddy}/harness-submit/checklist.md +0 -0
  551. /package/resources/harness/{java → bundles/general/codebuddy}/harness-submit/reference.md +0 -0
  552. /package/resources/harness/{java → bundles/general/codebuddy}/harness-test/pitfalls.md +0 -0
  553. /package/resources/harness/{java → bundles/general/codebuddy}/protocols/archive-report-protocol.md +0 -0
  554. /package/resources/harness/{java → bundles/general/codebuddy}/protocols/evidence-based-reporting-protocol.md +0 -0
  555. /package/resources/harness/{java → bundles/general/codebuddy}/protocols/ledger-protocol.md +0 -0
  556. /package/resources/harness/{java → bundles/general/codebuddy}/protocols/powershell-protocol.md +0 -0
  557. /package/resources/harness/{java → bundles/general/codebuddy}/protocols/report-pipeline-protocol.md +0 -0
  558. /package/resources/harness/{java → bundles/general/codebuddy}/protocols/sensitive-info-protocol.md +0 -0
  559. /package/resources/harness/{java → bundles/general/codebuddy}/protocols/state-layout-protocol.md +0 -0
  560. /package/resources/harness/{java → bundles/general/codebuddy}/protocols/submit-protocol.md +0 -0
  561. /package/resources/harness/{java → bundles/java/claude-code}/agents/harness-evaluator.md +0 -0
  562. /package/resources/harness/{java → bundles/java/claude-code}/agents/harness-explorer.md +0 -0
  563. /package/resources/harness/{java → bundles/java/claude-code}/harness-apidoc/checklist.md +0 -0
  564. /package/resources/harness/{java → bundles/java/claude-code}/harness-apidoc/reference.md +0 -0
  565. /package/resources/harness/{java → bundles/java/claude-code}/harness-package/checklist.md +0 -0
  566. /package/resources/harness/{java → bundles/java/claude-code}/harness-test/pitfalls-java.md +0 -0
@@ -0,0 +1,103 @@
1
+ ---
2
+ description: harness-archive 的归档流程、manifest、summary-data、final-summary 渲染、目录结构与最终状态规则。
3
+ ---
4
+
5
+ # harness-archive 参考
6
+
7
+ ## 归档流程(对齐 SKILL.md Workflow)
8
+
9
+ - **Phase 0 读取上下文**:读 SKILL.md / 本文件 / 共用协议(`../protocols/archive-report-protocol.md`、`../protocols/report-pipeline-protocol.md`、`../protocols/state-layout-protocol.md`、`../protocols/powershell-protocol.md`、`../protocols/sensitive-info-protocol.md`、`../protocols/evidence-based-reporting-protocol.md`)/ 解析 `$ARGUMENTS`。
10
+ - **Phase 1 确认归档对象**:Glob `.harness/changes/*/plans/*-plan.md`(排除 archive),展示概要;多变更让用户选择或终止。
11
+ - **Phase 2 确认归档(强制阻断)**:AskUserQuestion 确认,拒绝即终止。
12
+ - **Phase 3 执行归档**:
13
+ 1. append `phase.start` 事件(`harness_events.py append`)。
14
+ 2. 运行 `python <skills-root>/scripts/harness_archive.py status --change-dir ... --json` 做前置检查。
15
+ 3. 运行 `python <skills-root>/scripts/harness_archive.py finalize --change-dir ... --archive-root ".harness/archive" --json`;读 JSON 结果。
16
+ 4. 模型补写 `meta/archive-meta.md` 的 `maintenanceNotes` / `knownRisks` / `manualActions`(脚本留空占位)。
17
+ 5. append `phase.end` 事件。**finalize 报错或 validate 失败时不删除原 changes 目录**。
18
+ - **Phase 4 验证与提示**:见 `checklist.md` 归档后验证项。
19
+
20
+ ## manifest 生成
21
+
22
+ manifest 每项包含:
23
+
24
+ ```json
25
+ {"path":"...","size":123,"sha256":"...","lastModified":"..."}
26
+ ```
27
+
28
+ 建议使用固定脚本,禁止内联复杂 PowerShell(包含 `$`、`$_`、`@{}`、script block、管道 JSON 输出):
29
+
30
+ ```powershell
31
+ powershell.exe -NoProfile -ExecutionPolicy Bypass -File "harness-skills/harness-archive/scripts/gen-manifest.ps1" -RootPath ".harness/changes/<change>" -OutputPath ".harness/changes/<change>/evidence/archive-manifest-before.json"
32
+ ```
33
+
34
+ 移动到 archive 目录后,再生成 after manifest:
35
+
36
+ ```powershell
37
+ powershell.exe -NoProfile -ExecutionPolicy Bypass -File "harness-skills/harness-archive/scripts/gen-manifest.ps1" -RootPath ".harness/archive/<date-change>" -OutputPath ".harness/archive/<date-change>/evidence/archive-manifest-after.json"
38
+ ```
39
+
40
+ **校验 before/after 时排除 execution-log**(通用):`logs/execution-log.md` 在归档过程会追加结束记录(Phase 4),before(移动前含开始记录)与 after(含开始+结束记录)sha256 必然不同——这是预期追加,非文件损坏。校验脚本需跳过 `logs/execution-log.md`,其他 moved 文件 sha256 必须一致;若其他文件 missing/mismatch,才表示移动损坏,不得删除原目录。
41
+
42
+ ## summary-data.json 与 harness_archive.py
43
+
44
+ 默认由 `harness_archive.py finalize`(或 `replay`)生成/校验 `reports/final/summary-data.json`;CLI 不可用时按 `../protocols/report-pipeline-protocol.md` 与 `templates/summary-data-template.json`(schemaVersion 2.2)生成等价数据。必须保留原 final report 维度。必须包含:
45
+
46
+ - `businessGoal`:本次变更为了做什么;
47
+ - `stageStatus`:plan/run/test/review/submit/archive;
48
+ - `diffStat`:filesChanged/insertions/deletions/range —— 来自 `git diff --numstat` + `git diff --stat <base>..<head>`,不得手写;
49
+ - `durations`:totalMinutes + stages[{stage,skill,startedAt,endedAt,minutes,result}] —— 从 `logs/execution-log.md` 各 `[N] harness-<skill>` 小节的 `开始`/`结束`/`耗时` 解析;
50
+ - `skillCalls`:每个 skill 的调用次数(含重入)+ 结果 —— 从 execution-log 统计;
51
+ - `verification`:单元/API/覆盖展示,含 passRate —— 来自 `evidence/verification-ledger.json`;
52
+ - `changedFiles`:path/summary/insertions/deletions —— 来自 `git diff --numstat <base>..<head>`;
53
+ - `reviewSummary`:red/yellow + redFixed/redConfirmed/yellowFixed/yellowDeferred 修复进度;
54
+ - `maintenanceNotes`:给后续维护者看的结论;
55
+ - `knownRisks`:剩余风险或人工确认项。
56
+
57
+ 报告必须突出业务目标和维护者结论。所有统计数字只能来自 events、summary-data、ledger 或 manifest,不得手写另一套。历史 archive 没有 `events.ndjson` 时,允许从 ledger/log/manifest 回放,并在 `reportPipeline.sources` 中记录来源。
58
+
59
+ ## final-summary 渲染
60
+
61
+ 默认使用 Node.js 渲染器:
62
+
63
+ ```powershell
64
+ powershell.exe -NoProfile -Command "& '<node-path>' 'harness-skills/harness-archive/templates/render-summary.mjs' --summary '.harness/archive/<date-change>/reports/final/summary-data.json' --out '.harness/archive/<date-change>/reports/final/final-summary.html'"
65
+ ```
66
+
67
+ 如模板脚本位于 skill 目录,则先复制到 archive 目录或直接引用 skill 路径。
68
+
69
+ 禁止模型临场手写大段 HTML。确需临时修 HTML,只能修模板,不得让统计数字脱离 `summary-data.json`。
70
+
71
+ 渲染后必须执行:
72
+
73
+ ```powershell
74
+ powershell.exe -NoProfile -Command "npx hunter-harness report validate --change-id '<date-change>' --json"
75
+ ```
76
+
77
+ 存在 validate error 时,不得删除原 `.harness/changes/<change>` 目录。
78
+
79
+ ## archive-meta.md 模板
80
+
81
+ ```markdown
82
+ # Archive Meta — <change-name>
83
+
84
+ - archivedAt: YYYY-MM-DD HH:mm
85
+ - finalCommit: <hash>
86
+ - sourceDir: .harness/changes/<change-name>
87
+ - archiveDir: .harness/archive/YYYY-MM-DD-<change-name>
88
+ - movedFiles: <from manifest>
89
+ - generatedFiles: archive-meta.md, summary-data.json, final-summary.html, manifests
90
+ - totalArchiveFiles: <from after manifest>
91
+ ```
92
+
93
+ ## 目录结构与最终状态规则
94
+
95
+ - 默认渲染器:`templates/render-summary.mjs`,输入 `reports/final/summary-data.json`,输出 `reports/final/final-summary.html`。
96
+ - `render-summary.mjs` 是默认 UTF-8 渲染器;finalize 内嵌调用,不得由模型临场写 HTML。
97
+ - 新路径优先:`meta/`、`logs/`、`evidence/`、`reports/final/`、`scripts/`、`backups/uncommitted-tests/`。旧路径只做读取兼容,不再写大量根目录文件。
98
+ - 当 `summary-data.json.verification.apiTests.status=USER_SKIPPED` 或 `verification.dbCompatibility.status=BLOCKED_BY_DBA`,最终状态必须是 `CONDITIONAL_OK`。
99
+ - 复杂 PowerShell 命令写入 `scripts/*.ps1` 后 `-File` 执行,禁止内联 `$` / `$_`。
100
+
101
+ ## 执行日志记录
102
+
103
+ 归档只向 `events.ndjson` 追加事件(schema_version 2);`logs/execution-log.md` 由 `harness_events.py append` 自动渲染,禁止手工 Edit。事件类型与脚本用法见 SKILL.md `## 执行日志` 与 `../protocols/report-pipeline-protocol.md`。
@@ -0,0 +1,31 @@
1
+ param(
2
+ [Parameter(Mandatory=$true)][string]$RootPath,
3
+ [Parameter(Mandatory=$true)][string]$OutputPath
4
+ )
5
+
6
+ $ErrorActionPreference = 'Stop'
7
+ $root = (Resolve-Path $RootPath).Path
8
+ # 排除 OutputPath 自身:重新生成 manifest 时旧 manifest 文件会被扫到,导致递归(新 manifest 含旧 manifest 的 sha256,fileCount 虚高 +1)。
9
+ # OutputPath 不存在时(首次生成)$excludePath=$null,Where-Object 不过滤。
10
+ $excludePath = $null
11
+ if (Test-Path $OutputPath) {
12
+ $excludePath = (Resolve-Path $OutputPath).Path
13
+ }
14
+ $items = Get-ChildItem -Path $root -File -Recurse | Where-Object { $excludePath -eq $null -or $_.FullName -ne $excludePath } | Sort-Object FullName | ForEach-Object {
15
+ $relative = $_.FullName.Substring($root.Length).TrimStart('\','/') -replace '\\','/'
16
+ $hash = Get-FileHash -Path $_.FullName -Algorithm SHA256
17
+ [PSCustomObject]@{
18
+ path = $relative
19
+ sizeBytes = $_.Length
20
+ sha256 = $hash.Hash.ToLowerInvariant()
21
+ }
22
+ }
23
+ $result = [PSCustomObject]@{
24
+ root = $root
25
+ generatedAt = (Get-Date).ToString('s')
26
+ fileCount = @($items).Count
27
+ totalBytes = (@($items) | Measure-Object -Property sizeBytes -Sum).Sum
28
+ files = @($items)
29
+ }
30
+ $utf8NoBom = New-Object System.Text.UTF8Encoding($false)
31
+ [System.IO.File]::WriteAllText((Resolve-Path (Split-Path $OutputPath -Parent)).Path + [System.IO.Path]::DirectorySeparatorChar + (Split-Path $OutputPath -Leaf), ($result | ConvertTo-Json -Depth 8), $utf8NoBom)
@@ -0,0 +1,171 @@
1
+ #!/usr/bin/env node
2
+ // render-summary.mjs
3
+ // Deterministic UTF-8 renderer for harness archive final-summary.html.
4
+ // Input: summary-data.json (schemaVersion 2.2). Output: final-summary.html.
5
+ // Keeps UTF-8, avoids PowerShell string interpolation issues.
6
+ // All numbers come from summary-data.json or manifest — never re-inferred here.
7
+
8
+ import fs from 'node:fs';
9
+ import path from 'node:path';
10
+
11
+ const args = process.argv.slice(2);
12
+ function getArg(name, fallback) {
13
+ const i = args.indexOf(name);
14
+ return i >= 0 && args[i + 1] ? args[i + 1] : fallback;
15
+ }
16
+
17
+ const summaryPath = getArg('--summary', args[0]);
18
+ const outPath = getArg('--out', args[1] || 'final-summary.html');
19
+ if (!summaryPath) {
20
+ console.error('Usage: node render-summary.mjs --summary summary-data.json --out final-summary.html');
21
+ process.exit(2);
22
+ }
23
+
24
+ const data = JSON.parse(fs.readFileSync(summaryPath, 'utf8'));
25
+ const esc = (v) => String(v ?? '').replace(/[&<>"']/g, (c) => ({'&':'&amp;','<':'&lt;','>':'&gt;','"':'&quot;',"'":'&#39;'}[c]));
26
+ const arr = (v) => Array.isArray(v) ? v : [];
27
+ const obj = (v) => v && typeof v === 'object' ? v : {};
28
+ const num = (v) => Number(v) || 0;
29
+ const badgeClass = (s) => {
30
+ const v = String(s ?? '').toUpperCase();
31
+ if (v.includes('FAIL') || v.includes('ERROR')) return 'bad';
32
+ if (v.includes('WARN') || v.includes('BLOCK') || v.includes('SKIP') || v.includes('CONDITIONAL') || v.includes('PARTIAL') || v.includes('NOT_RUN')) return 'warn';
33
+ if (v.includes('ADVISORY') || v.includes('REUSED')) return 'info';
34
+ return 'ok';
35
+ };
36
+ const badge = (s) => `<span class="badge ${badgeClass(s)}">${esc(s || 'N/A')}</span>`;
37
+
38
+ // pass-rate progress bar: parses "183/185" style strings
39
+ const parseRate = (rate) => {
40
+ if (!rate) return null;
41
+ const m = String(rate).match(/(\d+)\s*\/\s*(\d+)/);
42
+ return m ? { passed: +m[1], total: +m[2] } : null;
43
+ };
44
+ const rateBar = (rateStr, status) => {
45
+ const r = parseRate(rateStr);
46
+ if (!r || r.total <= 0) return `<span class="muted">N/A</span>`;
47
+ const pct = Math.round(r.passed / r.total * 100);
48
+ const cls = badgeClass(status || (r.passed >= r.total ? 'OK' : 'WARN'));
49
+ return `<div class="rate"><div class="bar-track"><div class="bar-fill ${cls}" style="width:${pct}%"></div></div><span class="muted small">${esc(rateStr)} · ${pct}%</span></div>`;
50
+ };
51
+
52
+ const stageRows = Object.entries(obj(data.stageStatus)).map(([k,v]) => `<tr><td>${esc(k)}</td><td>${badge(v)}</td></tr>`).join('\n') || `<tr><td colspan="2" class="muted">未记录阶段状态</td></tr>`;
53
+
54
+ const verification = obj(data.verification);
55
+ const unit = obj(verification.unitTests);
56
+ const api = obj(verification.apiTests);
57
+ const unitStatus = (num(unit.failures) + num(unit.errors)) > 0 ? 'WARN' : 'OK';
58
+ const verificationRows = [
59
+ ['Unit Tests', `${rateBar(unit.passRate, unitStatus)}<div class="muted small">${esc(unit.run ?? 0)} run · ${esc(unit.failures ?? 0)} fail · ${esc(unit.errors ?? 0)} err · ${esc(unit.skipped ?? 0)} skip · ${esc(unit.source || 'not recorded')}</div>`],
60
+ ['API Tests', `${rateBar(api.passRate, api.status)}<div class="muted small">${esc(api.passed ?? 0)}/${esc(api.total ?? 0)} · ${esc(api.status || data.stageStatus?.test || 'N/A')}</div>`],
61
+ ['DB Compat', badge(verification.dbCompatibility || 'N/A')],
62
+ ['Coverage', esc(verification.coverageDisplay || 'N/A')],
63
+ ['Overall', badge(data.finalStatus || data.overallStatus || 'N/A')]
64
+ ].map(([a,b]) => `<tr><td>${a}</td><td>${b}</td></tr>`).join('\n');
65
+
66
+ const diffStat = obj(data.diffStat);
67
+ const changedRows = arr(data.changedFiles).map(f => `<tr><td><code>${esc(f.path || f.file || '')}</code></td><td>${esc(f.summary || f.change || '')}</td><td class="ins">+${esc(f.insertions ?? 0)}</td><td class="del">-${esc(f.deletions ?? 0)}</td></tr>`).join('\n') || `<tr><td colspan="4" class="muted">未记录变更文件</td></tr>`;
68
+ const artifactList = arr(data.artifacts);
69
+ const artifactRows = artifactList.map(a => `<tr><td>${esc(a.name || '')}</td><td><code>${esc(a.path || '')}</code></td><td>${esc(a.size || '')}</td><td><code>${esc(a.sha256 || '')}</code></td></tr>`).join('\n');
70
+ const artifactCard = artifactList.length > 0 ? `<div class="card"><h2>📦 产物清单</h2><table><tr><th>名称</th><th>路径</th><th>大小</th><th>SHA-256</th></tr>${artifactRows}</table></div>` : '';
71
+ const notes = arr(data.maintenanceNotes).map(n => `<li>${esc(n)}</li>`).join('\n') || `<li class="muted">无额外维护说明</li>`;
72
+ const risks = arr(data.knownRisks).map(n => `<li>${esc(n)}</li>`).join('\n') || `<li class="muted">无已知遗留风险</li>`;
73
+ const manual = arr(data.manualActions).map(n => `<li>${esc(n)}</li>`).join('\n') || `<li class="muted">无人工后续动作</li>`;
74
+ const uncommittedList = arr(data.uncommittedTestEvidence);
75
+ const uncommittedTests = uncommittedList.map(n => `<li>${esc(n)}</li>`).join('\n');
76
+ const uncommittedCard = uncommittedList.length > 0 ? `<div class="card"><h2>🧪 未提交测试证据</h2><ul>${uncommittedTests}</ul></div>` : '';
77
+ const review = obj(data.reviewSummary);
78
+ const manifest = obj(data.archiveManifest);
79
+ const timeline = arr(data.timeline).map(t => `<tr><td>${esc(t.stage || '')}</td><td>${badge(t.result || '')}</td><td>${esc(t.evidence || '')}</td></tr>`).join('\n');
80
+
81
+ // durations + skillCalls (schema 2.1); fall back to timeline when absent
82
+ const durations = obj(data.durations);
83
+ const durStages = arr(durations.stages);
84
+ const maxMin = durStages.reduce((m, s) => Math.max(m, num(s.minutes)), 0);
85
+ const durRows = durStages.map(s => {
86
+ const min = num(s.minutes);
87
+ const pct = maxMin > 0 ? Math.round(min / maxMin * 100) : 0;
88
+ return `<div class="dur-row"><div class="dur-label">${esc(s.skill || s.stage || '')} <span class="muted small">${esc(s.result || '')}</span></div><div class="dur-track"><div class="dur-bar" style="width:${pct}%"></div></div><div class="dur-min">${esc(min)}m</div></div>`;
89
+ }).join('\n');
90
+ const skillCallsHtml = arr(data.skillCalls).map(s => `${esc(s.skill)}×${esc(s.count)} ${badge(s.result)}`).join(' ') || '<span class="muted">未记录</span>';
91
+
92
+ const durCard = durStages.length > 0
93
+ ? `<div class="card"><h2>⏱️ 阶段耗时与 Skill 调用</h2>${durRows}<div class="muted small" style="margin-top:10px">Skill 调用:${skillCallsHtml}</div></div>`
94
+ : (timeline ? `<div class="card"><h2>阶段时间线</h2><table><tr><th>阶段</th><th>结果</th><th>证据</th></tr>${timeline}</table></div>` : '');
95
+
96
+ const totalLabel = durations.totalLabel || (durations.totalMinutes ? durations.totalMinutes + 'm' : 'N/A');
97
+
98
+ const html = `<!doctype html>
99
+ <html lang="zh-CN">
100
+ <head>
101
+ <meta charset="utf-8" />
102
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
103
+ <title>变更最终报告 - ${esc(data.changeName || '')}</title>
104
+ <style>
105
+ :root { color-scheme: dark; }
106
+ * { box-sizing: border-box; }
107
+ body { font-family: -apple-system,BlinkMacSystemFont,'Segoe UI','Microsoft YaHei',sans-serif; margin: 0; background: #0b1020; color: #e5e7eb; }
108
+ main { max-width: 1120px; margin: 0 auto; padding: 32px; }
109
+ .card { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 16px; padding: 20px; margin: 16px 0; box-shadow: 0 12px 40px rgba(0,0,0,.18); }
110
+ h1 { margin: 0 0 8px; font-size: 30px; }
111
+ h2 { margin: 0 0 12px; font-size: 20px; }
112
+ h3 { margin: 18px 0 8px; }
113
+ .muted { color: #94a3b8; }
114
+ .small { font-size: 12px; }
115
+ table { width: 100%; border-collapse: collapse; table-layout: fixed; }
116
+ th, td { border-bottom: 1px solid rgba(255,255,255,.12); padding: 10px; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
117
+ th { color: #cbd5e1; font-weight: 600; }
118
+ tbody tr:nth-child(even) { background: rgba(255,255,255,.03); }
119
+ tbody tr:hover { background: rgba(96,165,250,.08); }
120
+ code { color: #bfdbfe; word-break: break-all; }
121
+ .ins { color: #86efac; font-weight: 600; }
122
+ .del { color: #fca5a5; font-weight: 600; }
123
+ .badge { display: inline-block; padding: 4px 8px; border-radius: 999px; font-weight: 700; font-size: 12px; }
124
+ .badge.ok { background: rgba(34,197,94,.16); color: #86efac; }
125
+ .badge.warn { background: rgba(245,158,11,.18); color: #fcd34d; }
126
+ .badge.bad { background: rgba(239,68,68,.18); color: #fca5a5; }
127
+ .badge.info { background: rgba(59,130,246,.18); color: #93c5fd; }
128
+ .grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(200px,1fr)); gap: 16px; }
129
+ .kpi { font-size: 18px; font-weight: 700; margin-top: 4px; word-break: break-all; }
130
+ .hero { border-color: rgba(96,165,250,.35); background: linear-gradient(135deg, rgba(59,130,246,.12), rgba(255,255,255,.04)); }
131
+ ul { margin-top: 8px; }
132
+ .bar-track { background: rgba(255,255,255,.08); border-radius: 999px; height: 8px; overflow: hidden; margin: 4px 0; }
133
+ .bar-fill { height: 100%; border-radius: 999px; }
134
+ .bar-fill.ok { background: #22c55e; }
135
+ .bar-fill.warn { background: #f59e0b; }
136
+ .bar-fill.bad { background: #ef4444; }
137
+ .bar-fill.info { background: #3b82f6; }
138
+ .rate { display: flex; flex-direction: column; gap: 2px; min-width: 160px; }
139
+ .dur-row { display: grid; grid-template-columns: 150px 1fr 50px; align-items: center; gap: 10px; padding: 6px 0; }
140
+ .dur-label { color: #93c5fd; font-size: 13px; }
141
+ .dur-track { background: rgba(255,255,255,.06); border-radius: 4px; height: 18px; overflow: hidden; }
142
+ .dur-bar { height: 100%; background: linear-gradient(90deg, #3b82f6, #60a5fa); border-radius: 4px; }
143
+ .dur-min { color: #94a3b8; font-size: 13px; text-align: right; }
144
+ @media (max-width: 640px) { main { padding: 16px; } .grid { grid-template-columns: 1fr; } .dur-row { grid-template-columns: 100px 1fr 40px; } }
145
+ </style>
146
+ </head>
147
+ <body><main>
148
+ <div class="card hero">
149
+ <h1>变更最终报告:${esc(data.changeName || '')}</h1>
150
+ <p class="muted">${esc(data.businessGoal || '未记录业务目标')}</p>
151
+ </div>
152
+ <div class="grid">
153
+ <div class="card"><div class="muted">🎯 最终状态</div><div class="kpi">${badge(data.finalStatus || data.overallStatus || 'N/A')}</div></div>
154
+ <div class="card"><div class="muted">🔒 Final Commit</div><div class="kpi"><code>${esc(data.finalCommit || 'N/A')}</code></div><div class="muted small">${esc(data.finalCommitBranch || '')}</div></div>
155
+ <div class="card"><div class="muted">📊 代码变更</div><div class="kpi">${esc(diffStat.filesChanged ?? 'N/A')} 文件</div><div class="muted small"><span class="ins">+${esc(diffStat.insertions ?? 0)}</span> <span class="del">-${esc(diffStat.deletions ?? 0)}</span></div></div>
156
+ <div class="card"><div class="muted">⏱️ 总耗时</div><div class="kpi">${esc(totalLabel)}</div><div class="muted small">${esc(durStages.length)} 个阶段</div></div>
157
+ <div class="card"><div class="muted">📝 Review</div><div class="kpi">${esc(review.status || 'N/A')}</div><div class="muted small">RED ${esc(review.red ?? 0)}(修${esc(review.redFixed ?? 0)}/确${esc(review.redConfirmed ?? 0)}) · YEL ${esc(review.yellow ?? 0)}(修${esc(review.yellowFixed ?? 0)}/留${esc(review.yellowDeferred ?? 0)})</div></div>
158
+ <div class="card"><div class="muted">📦 Archive</div><div class="kpi">${esc(manifest.totalArchiveFiles ?? 'N/A')} 文件</div><div class="muted small">${esc(manifest.checksumStatus || 'N/A')}</div></div>
159
+ </div>
160
+ <div class="card"><h2>📋 阶段状态</h2><table><tr><th>阶段</th><th>状态</th></tr>${stageRows}</table></div>
161
+ ${durCard}
162
+ <div class="card"><h2>🛡️ 验证明细</h2><table><tr><th>类型</th><th>结果</th></tr>${verificationRows}</table></div>
163
+ <div class="card"><h2>📁 变更文件</h2><table><tr><th>文件</th><th>说明</th><th>+</th><th>-</th></tr>${changedRows}</table></div>
164
+ ${artifactCard}
165
+ ${uncommittedCard}
166
+ <div class="card"><h2>👨‍🔧 给后续维护者</h2><ul>${notes}</ul></div>
167
+ <div class="card"><h2>⚠️ 已知风险 / 人工确认项</h2><ul>${risks}</ul><h3>人工后续动作</h3><ul>${manual}</ul></div>
168
+ </main></body></html>`;
169
+
170
+ fs.mkdirSync(path.dirname(outPath), { recursive: true });
171
+ fs.writeFileSync(outPath, html, 'utf8');
@@ -0,0 +1,128 @@
1
+ {
2
+ "schemaVersion": "2.2",
3
+ "changeName": "<change-name>",
4
+ "businessGoal": "本次变更为了做什么",
5
+ "finalStatus": "OK | WARN | CONDITIONAL_OK | FAIL",
6
+ "finalCommit": "<commit-hash>",
7
+ "finalCommitBranch": "<origin/branch>",
8
+ "baseCommit": "<base-commit-hash>",
9
+ "diffStat": {
10
+ "filesChanged": 0,
11
+ "insertions": 0,
12
+ "deletions": 0,
13
+ "range": "<base>..<head>"
14
+ },
15
+ "stageStatus": {
16
+ "plan": "OK",
17
+ "run": "OK | WARN",
18
+ "test": "OK | PARTIAL | USER_SKIPPED | BLOCKED_BY_DBA",
19
+ "review": "ADVISORY",
20
+ "submit": "OK",
21
+ "archive": "OK"
22
+ },
23
+ "durations": {
24
+ "totalLabel": "约 N 分",
25
+ "totalMinutes": 0,
26
+ "stages": [
27
+ {
28
+ "stage": "plan",
29
+ "skill": "harness-plan",
30
+ "startedAt": "YYYY-MM-DD HH:mm:ss",
31
+ "endedAt": "YYYY-MM-DD HH:mm:ss",
32
+ "minutes": 0,
33
+ "result": "OK | WARN | FAIL"
34
+ }
35
+ ]
36
+ },
37
+ "skillCalls": [
38
+ { "skill": "harness-plan", "count": 1, "result": "OK" }
39
+ ],
40
+ "verification": {
41
+ "unitTests": {
42
+ "run": 0,
43
+ "failures": 0,
44
+ "errors": 0,
45
+ "skipped": 0,
46
+ "passRate": "183/185",
47
+ "source": "committed | uncommitted-archived | not-run"
48
+ },
49
+ "apiTests": {
50
+ "status": "OK | PARTIAL | USER_SKIPPED | NOT_RUN",
51
+ "total": 0,
52
+ "passed": 0,
53
+ "failed": 0,
54
+ "blocked": 0,
55
+ "passRate": "34/35"
56
+ },
57
+ "dbCompatibility": "OK | BLOCKED_BY_DBA | NOT_RUN",
58
+ "coverageDisplay": "例如 29/29 或 USER_SKIPPED"
59
+ },
60
+ "timeline": [],
61
+ "changedFiles": [
62
+ { "path": "src/...", "summary": "说明", "insertions": 0, "deletions": 0 }
63
+ ],
64
+ "artifacts": [],
65
+ "reviewSummary": {
66
+ "status": "ADVISORY",
67
+ "red": 0,
68
+ "yellow": 0,
69
+ "redFixed": 0,
70
+ "redConfirmed": 0,
71
+ "yellowFixed": 0,
72
+ "yellowDeferred": 0,
73
+ "summary": ""
74
+ },
75
+ "archiveManifest": {
76
+ "movedFiles": 0,
77
+ "generatedFiles": 0,
78
+ "totalArchiveFiles": 0,
79
+ "checksumStatus": "OK | WARN | FAIL"
80
+ },
81
+ "reportPipeline": {
82
+ "schema_version": 1,
83
+ "generated_at": "YYYY-MM-DDTHH:mm:ss.sssZ",
84
+ "event_count": 0,
85
+ "sources": [
86
+ "events.ndjson",
87
+ "evidence/verification-ledger.json",
88
+ "logs/execution-log.md"
89
+ ],
90
+ "phases": {
91
+ "plan": { "duration_ms": null, "event_count": 0 },
92
+ "run": { "duration_ms": null, "event_count": 0 },
93
+ "test": { "duration_ms": null, "event_count": 0 },
94
+ "review": { "duration_ms": null, "event_count": 0 },
95
+ "submit": { "duration_ms": null, "event_count": 0 },
96
+ "archive": { "duration_ms": null, "event_count": 0 }
97
+ },
98
+ "commands": [
99
+ {
100
+ "command": "npm test",
101
+ "exit_code": 0,
102
+ "duration_ms": 0,
103
+ "phase": "run",
104
+ "timestamp": "YYYY-MM-DDTHH:mm:ss.sssZ"
105
+ }
106
+ ],
107
+ "verificationChecks": [
108
+ {
109
+ "name": "unit tests",
110
+ "status": "passed | failed | skipped | unknown",
111
+ "command": "npm test",
112
+ "source": "events.ndjson | evidence/verification-ledger.json"
113
+ }
114
+ ],
115
+ "artifacts": [
116
+ {
117
+ "path": "reports/final/final-summary.html",
118
+ "kind": "final-report",
119
+ "phase": "archive"
120
+ }
121
+ ],
122
+ "validationIssues": []
123
+ },
124
+ "uncommittedTestEvidence": [],
125
+ "maintenanceNotes": [],
126
+ "knownRisks": [],
127
+ "manualActions": []
128
+ }
@@ -0,0 +1,95 @@
1
+ ---
2
+ name: harness-codebase-map
3
+ description: 分析现有代码库并生成 .harness/codebase/map/
4
+ 下的结构化代码库地图。用于陌生项目理解、重大改造前梳理、harness-sync 提示 map 过期后的人工刷新。
5
+ ---
6
+ <!-- generated by harness_deploy.py; core=9a7af3c66acaad35; overlay=java; agent=codex; 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`
16
+ - **禁止** `.planning/`、Git 写操作、修改 `.codegraph/`、自动 commit/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
+
48
+ 逐步细节、frontmatter 字段、git 允许列表 → `reference.md` / `checklist.md`
49
+
50
+ ## Mapper Agent 策略
51
+
52
+ 优先并行 mapper(tech/arch/quality/concerns);Agent 直写文档,主会话汇总。不可用 → 主会话顺序扫描 + 🟡WARN。
53
+
54
+ ## P0 执行可信度规则
55
+
56
+ - 命令结果不得靠猜测;普通 Bash 被拒 → 立即改用等价 PowerShell 重试一次
57
+ - 仅 PowerShell 成功且有明确证据(构建/git/测试输出、文件存在、exit 0)时可标 ✅OK;否则 ❌FAIL 或 🟡WARN
58
+ - 禁止把 hook 拒绝、静态验证、无输出、用户跳过说成成功 → 详见 [[../protocols/powershell-protocol.md|powershell-protocol]]、[[../protocols/evidence-based-reporting-protocol.md|evidence-based-reporting-protocol]]
59
+
60
+ ## 关键规则
61
+
62
+ | # | 规则 |
63
+ |---|------|
64
+ | 1 | 唯一输出 `.harness/codebase/map/` |
65
+ | 2 | `generated_reviewable`,不建议手工改 map 正文 |
66
+ | 3 | 不 Git 写操作、不改业务代码 |
67
+ | 4 | 不管理 CodeGraph |
68
+ | 5 | 敏感信息脱敏 → `sensitive-info-protocol` |
69
+ | 6 | 证据化输出 → `evidence-based-reporting-protocol` |
70
+
71
+ ## Output Format
72
+
73
+ 模式、范围、7/7 文档路径与行数、manifest/summary、context-index 状态、WARN/FAIL → `reference.md` 报告模板
74
+
75
+ ## 渐进披露
76
+
77
+ - **Read `checklist.md`** — 执行前后检查
78
+ - **Read `reference.md`** — manifest、mapper、扫描模式
79
+ - **Read `templates/*`** — 各文档模板
80
+
81
+ ## 交互白名单
82
+
83
+ **无** AskUserQuestion;参数/默认值 + `decision` 事件
84
+
85
+ ## 执行日志
86
+
87
+ `events.ndjson` 为唯一事实源(schema_version 2,`note` 承载人类可读摘要);`logs/execution-log.md` 由 `harness_events.py` 渲染,**禁止手工 Edit**。结构 → [[../protocols/report-pipeline-protocol.md|report-pipeline-protocol]]
88
+
89
+ ```powershell
90
+ python <skills-root>/scripts/harness_events.py append --change-dir ".harness/changes/<change-name>" --phase <phase> --type phase.start --note "<触发指令>"
91
+ ```
92
+
93
+ > **脚本接线**:`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 护栏解读。
94
+
95
+ > **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 边界保持最新。
@@ -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。