@bolloon/bolloon-agent 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (581) hide show
  1. package/bin/bolloon-cli.cjs +157 -0
  2. package/bin/bolloon-daemon.sh +207 -0
  3. package/bin/bolloon.cmd +11 -0
  4. package/dist/agents/constraint-layer.js +10 -15
  5. package/dist/agents/pi-sdk.js +433 -106
  6. package/dist/agents/protocol.js +82 -1
  7. package/dist/agents/subagent-manager.js +2 -2
  8. package/dist/agents/workflow-engine.js +15 -20
  9. package/dist/agents/workflow-pivot-loop.js +541 -0
  10. package/dist/bollharness/src/index.js +5 -0
  11. package/dist/bollharness/src/scripts/checks/check_adr_plan_numbering.js +6 -0
  12. package/dist/bollharness/src/scripts/checks/check_api_types.js +45 -0
  13. package/dist/bollharness/src/scripts/checks/check_artifact_link.js +146 -0
  14. package/dist/bollharness/src/scripts/checks/check_bridge_deps.js +6 -0
  15. package/dist/bollharness/src/scripts/checks/check_bugfix_binding.js +6 -0
  16. package/dist/bollharness/src/scripts/checks/check_bugfix_binding_ci.js +6 -0
  17. package/dist/bollharness/src/scripts/checks/check_doc_file_references.js +6 -0
  18. package/dist/bollharness/src/scripts/checks/check_doc_freshness.js +135 -0
  19. package/dist/bollharness/src/scripts/checks/check_doc_links.js +31 -0
  20. package/dist/bollharness/src/scripts/checks/check_file_existence_claims.js +6 -0
  21. package/dist/bollharness/src/scripts/checks/check_fragment_integrity.js +34 -0
  22. package/dist/bollharness/src/scripts/checks/check_hook_installed.js +63 -0
  23. package/dist/bollharness/src/scripts/checks/check_issue_closure.js +41 -0
  24. package/dist/bollharness/src/scripts/checks/check_mcp_parity.js +6 -0
  25. package/dist/bollharness/src/scripts/checks/check_security.js +48 -0
  26. package/dist/bollharness/src/scripts/checks/check_skill_parity.js +6 -0
  27. package/dist/bollharness/src/scripts/checks/check_versions.js +6 -0
  28. package/dist/bollharness/src/scripts/checks/finding.js +13 -0
  29. package/dist/bollharness/src/scripts/checks/next_decision_number.js +20 -0
  30. package/dist/bollharness/src/scripts/checks/regenerate_magic_docs.js +6 -0
  31. package/dist/bollharness/src/scripts/ci/detect_rebaseline_triggers.js +8 -0
  32. package/dist/bollharness/src/scripts/ci/scan_subprocess_cfg.js +8 -0
  33. package/dist/bollharness/src/scripts/ci/scan_verify_artifacts.js +8 -0
  34. package/dist/bollharness/src/scripts/ci/scan_yaml_schema.js +8 -0
  35. package/dist/bollharness/src/scripts/context_router.js +67 -0
  36. package/dist/bollharness/src/scripts/deploy-guard.js +157 -0
  37. package/dist/bollharness/src/scripts/guard-feedback.js +192 -0
  38. package/dist/bollharness/src/scripts/guard_router.js +158 -0
  39. package/dist/bollharness/src/scripts/hooks/_hook_output.js +6 -0
  40. package/dist/bollharness/src/scripts/hooks/auto-python3.js +6 -0
  41. package/dist/bollharness/src/scripts/hooks/deploy-progress-on-session-end.js +6 -0
  42. package/dist/bollharness/src/scripts/hooks/failure-analyzer.js +6 -0
  43. package/dist/bollharness/src/scripts/hooks/gate-judgment-inject.js +92 -0
  44. package/dist/bollharness/src/scripts/hooks/gate-transition-judgment.js +63 -0
  45. package/dist/bollharness/src/scripts/hooks/inbox-ack.js +6 -0
  46. package/dist/bollharness/src/scripts/hooks/inbox-inject-on-start.js +6 -0
  47. package/dist/bollharness/src/scripts/hooks/inbox-validate.js +6 -0
  48. package/dist/bollharness/src/scripts/hooks/inbox-write-ledger.js +6 -0
  49. package/dist/bollharness/src/scripts/hooks/initializer-agent.js +6 -0
  50. package/dist/bollharness/src/scripts/hooks/loop-detection.js +73 -0
  51. package/dist/bollharness/src/scripts/hooks/owner-guard.js +6 -0
  52. package/dist/bollharness/src/scripts/hooks/precompact.js +6 -0
  53. package/dist/bollharness/src/scripts/hooks/review-agent-gatekeeper.js +6 -0
  54. package/dist/bollharness/src/scripts/hooks/risk-tracker.js +108 -0
  55. package/dist/bollharness/src/scripts/hooks/sanitize-on-read.js +6 -0
  56. package/dist/bollharness/src/scripts/hooks/session-reflection.js +7 -0
  57. package/dist/bollharness/src/scripts/hooks/session-start-magic-docs.js +7 -0
  58. package/dist/bollharness/src/scripts/hooks/session-start-reset-risk.js +7 -0
  59. package/dist/bollharness/src/scripts/hooks/session-start-toolkit-reminder.js +7 -0
  60. package/dist/bollharness/src/scripts/hooks/stop-evaluator.js +157 -0
  61. package/dist/bollharness/src/scripts/hooks/tool-call-counter.js +6 -0
  62. package/dist/bollharness/src/scripts/hooks/trace-analyzer.js +10 -0
  63. package/dist/bollharness/src/scripts/install/install-trust-token.js +7 -0
  64. package/dist/bollharness/src/scripts/install/multi_project_registry.js +9 -0
  65. package/dist/bollharness/src/scripts/install/phase2_auto.js +21 -0
  66. package/dist/bollharness/src/scripts/install/pre_commit_installer.js +6 -0
  67. package/dist/bollharness/src/scripts/install/tier_selector.js +7 -0
  68. package/dist/bollharness/src/scripts/install/transcript_miner.js +7 -0
  69. package/dist/bollharness/src/scripts/lib/claim_patterns.js +10 -0
  70. package/dist/bollharness/src/scripts/lib/sanitize_patterns.js +12 -0
  71. package/dist/bollharness/src/scripts/sanitize.js +6 -0
  72. package/dist/bollharness-integration/channel-judgment-engine.js +530 -0
  73. package/dist/bollharness-integration/context-chain-router.js +383 -0
  74. package/dist/bollharness-integration/context-router-judgment.js +13 -21
  75. package/dist/bollharness-integration/context-router.js +22 -64
  76. package/dist/bollharness-integration/gate-state-machine.js +14 -19
  77. package/dist/bollharness-integration/gate-transition-hooks.js +16 -61
  78. package/dist/bollharness-integration/guard-checker.js +21 -68
  79. package/dist/bollharness-integration/index.js +14 -124
  80. package/dist/bollharness-integration/integration.js +13 -20
  81. package/dist/bollharness-integration/llm-judgment-engine.js +569 -0
  82. package/dist/bollharness-integration/skill-adapter.js +18 -64
  83. package/dist/cli-entry.js +261 -0
  84. package/dist/constraint-runtime/src/commands.js +17 -7
  85. package/dist/constraint-runtime/src/constraint/budget.js +1 -6
  86. package/dist/constraint-runtime/src/constraint/permission.js +1 -6
  87. package/dist/constraint-runtime/src/models.js +1 -3
  88. package/dist/constraint-runtime/src/tools.js +17 -7
  89. package/dist/constraints/index.js +1 -7
  90. package/dist/documents/reader.js +8 -49
  91. package/dist/heartbeat/DaemonManager.js +242 -0
  92. package/dist/heartbeat/HealthMonitor.js +285 -0
  93. package/dist/heartbeat/StartupVerifier.js +205 -0
  94. package/dist/heartbeat/Watchdog.js +168 -0
  95. package/dist/heartbeat/index.js +84 -0
  96. package/dist/heartbeat/types.js +5 -0
  97. package/dist/index.js +381 -28
  98. package/dist/llm/config-store.js +31 -57
  99. package/dist/llm/llm-judgment-client.js +389 -0
  100. package/dist/llm/pi-ai.js +9 -52
  101. package/dist/network/agent-network.js +46 -90
  102. package/dist/network/hybrid-messenger.js +125 -0
  103. package/dist/network/iroh-bootstrap.js +38 -0
  104. package/dist/network/iroh-discovery.js +145 -0
  105. package/dist/network/iroh-integration.js +9 -16
  106. package/dist/network/iroh-transport.js +10 -48
  107. package/dist/network/p2p.js +23 -62
  108. package/dist/network/storage/adapters/json-adapter.js +4 -42
  109. package/dist/network/storage/index.js +147 -0
  110. package/dist/network/storage/types.js +14 -0
  111. package/dist/pi-ecosystem/index.js +233 -0
  112. package/dist/pi-ecosystem-colony/index.js +29 -90
  113. package/dist/pi-ecosystem-goals/index.js +20 -74
  114. package/dist/pi-ecosystem-judgment/decision.js +29 -47
  115. package/dist/pi-ecosystem-judgment/distillation.js +16 -29
  116. package/dist/pi-ecosystem-judgment/human-value-store.js +13 -60
  117. package/dist/pi-ecosystem-judgment/index.js +21 -74
  118. package/dist/pi-ecosystem-judgment/value-injection.js +26 -72
  119. package/dist/pi-ecosystem-mcp/index.js +24 -78
  120. package/dist/pi-ecosystem-subagents/index.js +20 -69
  121. package/dist/social/ant-colony/AdaptiveHeartbeat.js +3 -8
  122. package/dist/social/ant-colony/PheromoneEngine.js +11 -49
  123. package/dist/social/ant-colony/index.js +6 -0
  124. package/dist/social/ant-colony/types.js +4 -8
  125. package/dist/social/channels/ChannelManager.js +8 -46
  126. package/dist/social/channels/DiapChannelBridge.js +9 -47
  127. package/dist/social/channels/InterestMatcher.js +2 -7
  128. package/dist/social/channels/channel-agent-session.js +309 -0
  129. package/dist/social/channels/channel-heartbeat-agent.js +494 -0
  130. package/dist/social/channels/diap-doc-parser.js +204 -0
  131. package/dist/social/channels/harness-workflow-integrator.js +446 -0
  132. package/dist/social/channels/index.js +9 -0
  133. package/dist/social/channels/types.js +3 -7
  134. package/dist/social/global-shared-context.js +6 -47
  135. package/dist/social/heartbeat.js +29 -72
  136. package/dist/social/persona/enhanced-persona.js +299 -0
  137. package/dist/web/client.js +302 -136
  138. package/dist/web/components/p2p/index.js +159 -9
  139. package/dist/web/components/p2p/p2p-connection.js +136 -0
  140. package/dist/web/components/p2p/p2p-manager.js +24 -0
  141. package/dist/web/components/p2p/p2p-store-memory.js +1 -1
  142. package/dist/web/components/p2p/types.js +7 -0
  143. package/dist/web/index.html +5 -0
  144. package/dist/web/style.css +118 -0
  145. package/package.json +12 -6
  146. package/scripts/build-cli.js +206 -0
  147. package/scripts/postinstall.js +153 -0
  148. package/src/agents/pi-sdk.ts +347 -28
  149. package/src/agents/protocol.ts +95 -1
  150. package/src/agents/workflow-pivot-loop.ts +674 -0
  151. package/src/bollharness/scripts/context-fragments/pi-agent-operations.md +34 -0
  152. package/src/cli-entry.ts +304 -0
  153. package/src/heartbeat/DaemonManager.ts +283 -0
  154. package/src/heartbeat/HealthMonitor.ts +316 -0
  155. package/src/heartbeat/StartupVerifier.ts +223 -0
  156. package/src/heartbeat/Watchdog.ts +198 -0
  157. package/src/heartbeat/index.ts +108 -0
  158. package/src/heartbeat/types.ts +82 -0
  159. package/src/llm/config-store.ts +23 -5
  160. package/src/network/iroh-transport.ts +3 -3
  161. package/src/web/client.js +302 -136
  162. package/src/web/components/p2p/P2PModal.tsx +91 -3
  163. package/src/web/components/p2p/index.ts +171 -9
  164. package/src/web/components/p2p/p2p-connection.ts +153 -1
  165. package/src/web/components/p2p/p2p-manager.ts +39 -1
  166. package/src/web/components/p2p/p2p-store-memory.ts +1 -1
  167. package/src/web/components/p2p/p2p-tools.ts +315 -0
  168. package/src/web/components/p2p/types.ts +58 -0
  169. package/src/web/index.html +5 -0
  170. package/src/web/server.ts +353 -36
  171. package/src/web/style.css +118 -0
  172. package/tsconfig.cli.json +16 -0
  173. package/tsconfig.electron.json +1 -1
  174. package/tsconfig.json +1 -2
  175. package/dist/constraint-runtime/tests/agent.test.js +0 -16
  176. package/dist/constraint-runtime/tests/constraint.test.js +0 -41
  177. package/dist/constraint-runtime/tests/skill.test.js +0 -19
  178. package/dist/constraint-runtime/tests/thinking.test.js +0 -22
  179. package/dist/electron-preload.js +0 -15
  180. package/dist/electron-preload.js.map +0 -1
  181. package/dist/electron.js +0 -206
  182. package/dist/electron.js.map +0 -1
  183. package/dist/test/constraint-layer.test.js +0 -164
  184. package/dist/test/global-shared-context.test.js +0 -315
  185. package/dist/test/pi-sdk.test.js +0 -47
  186. package/dist/test/set-persona.test.js +0 -38
  187. package/dist/test/subagent-manager.test.js +0 -276
  188. package/dist/test/workflow-engine.test.js +0 -87
  189. package/dist/web/server.js +0 -1647
  190. package/dist/web/server.js.map +0 -1
  191. package/dist/workflows/collaboration.js +0 -374
  192. package/dist/workflows/index.js +0 -54
  193. package/docs/agent-communication.md +0 -333
  194. package/docs/plans/2026-05-15-document-agent-design.md +0 -479
  195. package/docs/plans/2026-05-15-document-agent-implementation-plan.md +0 -792
  196. package/docs/plans/2026-05-16-chat-ui-design.md +0 -86
  197. package/docs/plans/2026-05-16-constraint-runtime-design.md +0 -106
  198. package/docs/plans/2026-05-16-constraint-runtime-implementation.md +0 -441
  199. package/docs//346/225/260/345/255/246/350/276/205/345/212/251/346/231/272/350/203/275/344/275/223-/346/240/270/345/277/203/346/225/210/346/236/234/345/256/232/344/271/211.md +0 -287
  200. package/src/bollharness/.boll/CLAUDE.md.template +0 -34
  201. package/src/bollharness/.boll/MANIFEST.yaml +0 -213
  202. package/src/bollharness/.boll/active-review-agents/.gitkeep +0 -0
  203. package/src/bollharness/.boll/agents/review-base.yaml +0 -108
  204. package/src/bollharness/.boll/deploy-allowlist.yaml +0 -38
  205. package/src/bollharness/.boll/inbox/schema/message-v1.json +0 -99
  206. package/src/bollharness/.boll/install-staging/.gitkeep +0 -0
  207. package/src/bollharness/.boll/issue-adapter.yaml +0 -31
  208. package/src/bollharness/.boll/plugins/boll-mode-toolkit/contracts/mode-contract.md +0 -85
  209. package/src/bollharness/.boll/plugins/boll-review-toolkit/contracts/evidence-packet-schema.json +0 -102
  210. package/src/bollharness/.boll/plugins/boll-review-toolkit/contracts/review-contract.yaml +0 -247
  211. package/src/bollharness/.boll/rules/backend-routes.md +0 -31
  212. package/src/bollharness/.boll/rules/closure-semantics.md +0 -30
  213. package/src/bollharness/.boll/rules/env-vars.md +0 -32
  214. package/src/bollharness/.boll/rules/hanis-protocol.md +0 -145
  215. package/src/bollharness/.boll/rules/repo-structure.md +0 -42
  216. package/src/bollharness/.boll/rules/review-agent-isolation.md +0 -73
  217. package/src/bollharness/.boll/rules/source-of-truth.md +0 -33
  218. package/src/bollharness/.boll/settings.json +0 -180
  219. package/src/bollharness/.boll/settings.json.template +0 -31
  220. package/src/bollharness/.boll/skills/arch/SKILL.md +0 -372
  221. package/src/bollharness/.boll/skills/bug-pipeline/SKILL.md +0 -168
  222. package/src/bollharness/.boll/skills/bug-triage/SKILL.md +0 -161
  223. package/src/bollharness/.boll/skills/context-chains/SKILL.md +0 -250
  224. package/src/bollharness/.boll/skills/context-chains/context-chain-index.md +0 -48
  225. package/src/bollharness/.boll/skills/context-chains/work-type-extractors/code_change_extractor.ts +0 -142
  226. package/src/bollharness/.boll/skills/context-chains/work-type-extractors/debugging_extractor.ts +0 -126
  227. package/src/bollharness/.boll/skills/context-chains/work-type-extractors/design_extractor.ts +0 -148
  228. package/src/bollharness/.boll/skills/context-chains/work-type-extractors/planning_extractor.ts +0 -162
  229. package/src/bollharness/.boll/skills/context-chains/work-type-extractors/question_extractor.ts +0 -116
  230. package/src/bollharness/.boll/skills/context-chains/work-type-extractors/review_extractor.ts +0 -136
  231. package/src/bollharness/.boll/skills/crystal-learn/SKILL.md +0 -93
  232. package/src/bollharness/.boll/skills/crystal-learn/invariants/INV-0.md +0 -34
  233. package/src/bollharness/.boll/skills/crystal-learn/invariants/INV-1.md +0 -34
  234. package/src/bollharness/.boll/skills/crystal-learn/invariants/INV-2.md +0 -35
  235. package/src/bollharness/.boll/skills/crystal-learn/invariants/INV-3.md +0 -34
  236. package/src/bollharness/.boll/skills/crystal-learn/invariants/INV-4.md +0 -43
  237. package/src/bollharness/.boll/skills/crystal-learn/invariants/INV-5.md +0 -34
  238. package/src/bollharness/.boll/skills/crystal-learn/invariants/INV-6.md +0 -37
  239. package/src/bollharness/.boll/skills/crystal-learn/invariants/INV-7.md +0 -46
  240. package/src/bollharness/.boll/skills/guardian-fixer/PROMPT.md +0 -415
  241. package/src/bollharness/.boll/skills/guardian-fixer/SKILL.md +0 -320
  242. package/src/bollharness/.boll/skills/harness-dev/SKILL.md +0 -93
  243. package/src/bollharness/.boll/skills/harness-dev/examples/README.md +0 -227
  244. package/src/bollharness/.boll/skills/harness-dev-handoff/SKILL.md +0 -165
  245. package/src/bollharness/.boll/skills/harness-eng/SKILL.md +0 -110
  246. package/src/bollharness/.boll/skills/harness-eng-test/SKILL.md +0 -79
  247. package/src/bollharness/.boll/skills/harness-lab/SKILL.md +0 -170
  248. package/src/bollharness/.boll/skills/harness-ops/SKILL.md +0 -57
  249. package/src/bollharness/.boll/skills/harness-voice/SKILL.md +0 -183
  250. package/src/bollharness/.boll/skills/judgment/SKILL.md +0 -115
  251. package/src/bollharness/.boll/skills/lead/SKILL.md +0 -245
  252. package/src/bollharness/.boll/skills/lead/install-wow-harness.md +0 -77
  253. package/src/bollharness/.boll/skills/lead/ref-review-sop.md +0 -91
  254. package/src/bollharness/.boll/skills/lead/ref-stages.md +0 -129
  255. package/src/bollharness/.boll/skills/skill-discovery/SKILL.md +0 -169
  256. package/src/bollharness/.boll/skills/task-arch/SKILL.md +0 -106
  257. package/src/bollharness/.boll/skills/toolkit/SKILL.md +0 -57
  258. package/src/bollharness/.boll/tasks/.gitkeep +0 -0
  259. package/src/bollharness/.boll/toolkit-index.yaml +0 -112
  260. package/src/bollharness/.claude/agents/review-base.yaml +0 -108
  261. package/src/bollharness/.claude/plugins/boll-mode-toolkit/.claude-plugin/plugin.json +0 -44
  262. package/src/bollharness/.claude/plugins/boll-review-toolkit/.claude-plugin/plugin.json +0 -24
  263. package/src/bollharness/.claude/plugins/boll-review-toolkit/contracts/evidence-packet-schema.json +0 -102
  264. package/src/bollharness/.claude/plugins/boll-review-toolkit/contracts/review-contract.yaml +0 -247
  265. package/src/bollharness/.claude/settings.json +0 -157
  266. package/src/bollharness/.claude/skills/arch/SKILL.md +0 -64
  267. package/src/bollharness/.claude/skills/crystal-learn/SKILL.md +0 -93
  268. package/src/bollharness/.claude/skills/guardian-fixer/PROMPT.md +0 -44
  269. package/src/bollharness/.claude/skills/guardian-fixer/SKILL.md +0 -324
  270. package/src/bollharness/.claude/skills/harness-dev/SKILL.md +0 -93
  271. package/src/bollharness/.claude/skills/harness-dev/examples/README.md +0 -17
  272. package/src/bollharness/.claude/skills/harness-dev-handoff/SKILL.md +0 -165
  273. package/src/bollharness/.claude/skills/harness-eng/SKILL.md +0 -183
  274. package/src/bollharness/.claude/skills/harness-eng-test/SKILL.md +0 -57
  275. package/src/bollharness/.claude/skills/harness-ops/SKILL.md +0 -57
  276. package/src/bollharness/.claude/skills/harness-voice/SKILL.md +0 -84
  277. package/src/bollharness/.claude/skills/lead/INDEX.md +0 -28
  278. package/src/bollharness/.claude/skills/lead/SKILL.md +0 -24
  279. package/src/bollharness/.claude/skills/lead/install-wow-harness.md +0 -77
  280. package/src/bollharness/.claude/skills/lead/ref-review-sop.md +0 -48
  281. package/src/bollharness/.claude/skills/lead/ref-stages.md +0 -58
  282. package/src/bollharness/.claude/skills/plan-lock/SKILL.md +0 -74
  283. package/src/bollharness/.claude/skills/skill-discovery/SKILL.md +0 -120
  284. package/src/bollharness/.claude/skills/task-arch/SKILL.md +0 -106
  285. package/src/bollharness/.claude/skills/toolkit/SKILL.md +0 -57
  286. package/src/bollharness/.claude/skills/toolkit/list.sh +0 -92
  287. package/src/bollharness/.githooks/pre-commit +0 -21
  288. package/src/bollharness/.github/workflows/ci.yml +0 -88
  289. package/src/bollharness/docs/decisions/ADR-030-guard-signal-protocol-and-governance-reload.md +0 -1076
  290. package/src/bollharness/docs/decisions/ADR-038-harness-optimization-strategy.md +0 -2039
  291. package/src/bollharness/docs/decisions/ADR-041-codex-claude-code-division-of-labor.md +0 -128
  292. package/src/bollharness/docs/decisions/ADR-H1-crystal-learn-revival.md +0 -188
  293. package/src/bollharness/docs/decisions/ADR-H2-identity-isolation.md +0 -183
  294. package/src/bollharness/docs/decisions/ADR-H3-memory-scope.md +0 -133
  295. package/src/bollharness/docs/decisions/ADR-H4-prompt-governance.md +0 -146
  296. package/src/bollharness/docs/decisions/ADR-H5-gate-quantization.md +0 -212
  297. package/src/bollharness/docs/decisions/ADR-H6-state-file-health.md +0 -211
  298. package/src/bollharness/docs/decisions/ADR-H8-issue-and-doc-compliance.md +0 -202
  299. package/src/bollharness/docs/decisions/ADR-H9-mailbox.md +0 -231
  300. package/src/bollharness/docs/decisions/PLAN-H1-crystal-learn-revival.md +0 -270
  301. package/src/bollharness/docs/decisions/PLAN-H2-identity-isolation.md +0 -291
  302. package/src/bollharness/docs/decisions/PLAN-H3-memory-scope.md +0 -228
  303. package/src/bollharness/docs/decisions/PLAN-H4-prompt-governance.md +0 -227
  304. package/src/bollharness/docs/decisions/PLAN-H5-gate-quantization.md +0 -239
  305. package/src/bollharness/docs/decisions/PLAN-H6-state-file-health.md +0 -325
  306. package/src/bollharness/docs/decisions/PLAN-H8-issue-and-doc-compliance.md +0 -242
  307. package/src/bollharness/docs/decisions/PLAN-H9-mailbox.md +0 -378
  308. package/src/bollharness/docs/launch-article-en.md +0 -276
  309. package/src/bollharness/docs/launch-article-zh.md +0 -305
  310. package/src/bollharness/docs/practice.html +0 -356
  311. package/src/bollharness/docs/practice.md +0 -82
  312. package/src/bollharness/docs/research/round-1/README.md +0 -11
  313. package/src/bollharness/docs/research/round-2/README.md +0 -11
  314. package/src/bollharness/docs/research/round-3/README.md +0 -11
  315. package/src/bollharness/docs/research/round-4/README.md +0 -11
  316. package/src/bollharness/docs/research/round-5/README.md +0 -11
  317. package/src/bollharness/docs/research/round-6/README.md +0 -11
  318. package/src/bollharness/package-lock.json +0 -48
  319. package/src/bollharness/reference/boll-reference/.claude/rules/backend-routes.md +0 -268
  320. package/src/bollharness/reference/boll-reference/.claude/rules/bridge.md +0 -20
  321. package/src/bollharness/reference/boll-reference/.claude/rules/closure-semantics.md +0 -30
  322. package/src/bollharness/reference/boll-reference/.claude/rules/coaching.md +0 -13
  323. package/src/bollharness/reference/boll-reference/.claude/rules/env-vars.md +0 -50
  324. package/src/bollharness/reference/boll-reference/.claude/rules/hackathon.md +0 -12
  325. package/src/bollharness/reference/boll-reference/.claude/rules/repo-structure.md +0 -184
  326. package/src/bollharness/reference/boll-reference/.claude/rules/review-agent-isolation.md +0 -112
  327. package/src/bollharness/reference/boll-reference/.claude/rules/scenes.md +0 -12
  328. package/src/bollharness/reference/boll-reference/.claude/skills/arch/SKILL.md +0 -551
  329. package/src/bollharness/reference/boll-reference/.claude/skills/boll-animation/SKILL.md +0 -26
  330. package/src/bollharness/reference/boll-reference/.claude/skills/boll-bridge/SKILL.md +0 -227
  331. package/src/bollharness/reference/boll-reference/.claude/skills/boll-bridge/agents/openai.yaml +0 -4
  332. package/src/bollharness/reference/boll-reference/.claude/skills/boll-bridge/references/bridge-failure-taxonomy.md +0 -142
  333. package/src/bollharness/reference/boll-reference/.claude/skills/boll-bridge/references/bridge-validation-ladder.md +0 -107
  334. package/src/bollharness/reference/boll-reference/.claude/skills/boll-crystal/SKILL.md +0 -893
  335. package/src/bollharness/reference/boll-reference/.claude/skills/boll-crystal-learn/SKILL.md +0 -89
  336. package/src/bollharness/reference/boll-reference/.claude/skills/boll-dev/SKILL.md +0 -93
  337. package/src/bollharness/reference/boll-reference/.claude/skills/boll-dev/examples/README.md +0 -209
  338. package/src/bollharness/reference/boll-reference/.claude/skills/boll-dev-handoff/SKILL.md +0 -165
  339. package/src/bollharness/reference/boll-reference/.claude/skills/boll-eng/SKILL.md +0 -110
  340. package/src/bollharness/reference/boll-reference/.claude/skills/boll-eng-frontend/SKILL.md +0 -203
  341. package/src/bollharness/reference/boll-reference/.claude/skills/boll-eng-hdc/SKILL.md +0 -27
  342. package/src/bollharness/reference/boll-reference/.claude/skills/boll-eng-orchestrator/SKILL.md +0 -28
  343. package/src/bollharness/reference/boll-reference/.claude/skills/boll-eng-prompt/SKILL.md +0 -27
  344. package/src/bollharness/reference/boll-reference/.claude/skills/boll-eng-test/SKILL.md +0 -79
  345. package/src/bollharness/reference/boll-reference/.claude/skills/boll-lab/SKILL.md +0 -372
  346. package/src/bollharness/reference/boll-reference/.claude/skills/boll-run/SKILL.md +0 -437
  347. package/src/bollharness/reference/boll-reference/.claude/skills/boll-ux-appstore/SKILL.md +0 -27
  348. package/src/bollharness/reference/boll-reference/.claude/skills/boll-voice/SKILL.md +0 -442
  349. package/src/bollharness/reference/boll-reference/.claude/skills/guardian-fixer/PROMPT.md +0 -421
  350. package/src/bollharness/reference/boll-reference/.claude/skills/guardian-fixer/SKILL.md +0 -326
  351. package/src/bollharness/reference/boll-reference/.claude/skills/lead/SKILL.md +0 -155
  352. package/src/bollharness/reference/boll-reference/.claude/skills/lead/ref-review-sop.md +0 -91
  353. package/src/bollharness/reference/boll-reference/.claude/skills/lead/ref-stages.md +0 -129
  354. package/src/bollharness/reference/boll-reference/.claude/skills/nature-designer/output/skill-map-preview.png +0 -0
  355. package/src/bollharness/reference/boll-reference/.claude/skills/nature-designer/output/skill-map-v2.png +0 -0
  356. package/src/bollharness/reference/boll-reference/.claude/skills/nature-designer/output/skill-map-v3.png +0 -0
  357. package/src/bollharness/reference/boll-reference/.claude/skills/nature-designer/output/skill-map-v4.png +0 -0
  358. package/src/bollharness/reference/boll-reference/.claude/skills/plan-lock/SKILL.md +0 -425
  359. package/src/bollharness/reference/boll-reference/.claude/skills/plan-lock/ref-three-checks.md +0 -62
  360. package/src/bollharness/reference/boll-reference/.claude/skills/plan-lock/ref-wp-templates.md +0 -78
  361. package/src/bollharness/reference/boll-reference/.claude/skills/task-arch/SKILL.md +0 -76
  362. package/src/bollharness/reference/boll-reference/.claude/skills/vibedevteam-graph/SKILL.md +0 -57
  363. package/src/bollharness/reference/boll-reference/.claude/skills/vibedevteam-graph/beads-graph.sh +0 -153
  364. package/src/bollharness/reference/boll-reference/.claude/skills/vibedevteam-init/SKILL.md +0 -52
  365. package/src/bollharness/reference/boll-reference/.claude/skills/vibedevteam-init/beads-auto-link.sh +0 -76
  366. package/src/bollharness/reference/boll-reference/.claude/skills/vibedevteam-sync/SKILL.md +0 -50
  367. package/src/bollharness/reference/boll-reference/.claude/skills/vibedevteam-sync/beads-sync-proj.sh +0 -108
  368. package/src/bollharness/reference/boll-reference/docs/architecture/AGENT-PROFILE.md +0 -151
  369. package/src/bollharness/reference/boll-reference/docs/architecture/COST-STRUCTURE.md +0 -56
  370. package/src/bollharness/reference/boll-reference/docs/architecture/INDEX.md +0 -76
  371. package/src/bollharness/reference/boll-reference/docs/architecture/MODULE1-INTENT-FIELD.md +0 -116
  372. package/src/bollharness/reference/boll-reference/docs/architecture/MODULE2-CRYSTALLIZATION.md +0 -200
  373. package/src/bollharness/reference/boll-reference/docs/architecture/PRINCIPLES.md +0 -84
  374. package/src/bollharness/reference/boll-reference/docs/architecture/PROTOCOL-CORE.md +0 -209
  375. package/src/bollharness/reference/boll-reference/docs/architecture/VISION.md +0 -181
  376. package/src/bollharness/reference/boll-reference/docs/architecture/discussions/D-01-MARKET-SCENE-PROTOCOL.md +0 -754
  377. package/src/bollharness/templates/scaffold/.boll/guard/.gitkeep +0 -0
  378. package/src/bollharness/templates/scaffold/.boll/metrics/.gitkeep +0 -0
  379. package/src/bollharness/templates/scaffold/.boll/state/.gitkeep +0 -0
  380. package/src/bollharness/templates/scaffold/docs/INDEX.md +0 -3
  381. package/src/bollharness/templates/scaffold/docs/decisions/ADR_TEMPLATE.md +0 -38
  382. package/src/bollharness/templates/scaffold/docs/decisions/PLAN_TEMPLATE.md +0 -45
  383. package/src/bollharness/templates/scaffold/docs/decisions/tasks/.gitkeep +0 -2
  384. package/src/bollharness/templates/scaffold/docs/issues/.gitkeep +0 -0
  385. package/src/bollharness/templates/scaffold/docs/issues/GUARD_ISSUE_TEMPLATE.md +0 -35
  386. package/src/bollharness/templates/scaffold/docs/issues/ISSUE_TEMPLATE.md +0 -51
  387. package/src/bollharness/tsconfig.json +0 -26
  388. package/src/constraint-runtime/package-lock.json +0 -48
  389. package/src/constraint-runtime/package.json +0 -34
  390. package/src/constraint-runtime/src/_archive_helper.ts +0 -16
  391. package/src/constraint-runtime/src/agent/coordinator.ts +0 -71
  392. package/src/constraint-runtime/src/agent/index.ts +0 -1
  393. package/src/constraint-runtime/src/assistant/index.ts +0 -15
  394. package/src/constraint-runtime/src/bootstrap/index.ts +0 -15
  395. package/src/constraint-runtime/src/bootstrap_graph.ts +0 -17
  396. package/src/constraint-runtime/src/bridge/index.ts +0 -15
  397. package/src/constraint-runtime/src/buddy/index.ts +0 -15
  398. package/src/constraint-runtime/src/cli/index.ts +0 -15
  399. package/src/constraint-runtime/src/command_graph.ts +0 -20
  400. package/src/constraint-runtime/src/commands.ts +0 -83
  401. package/src/constraint-runtime/src/components/index.ts +0 -15
  402. package/src/constraint-runtime/src/constants/index.ts +0 -15
  403. package/src/constraint-runtime/src/constraint/budget.ts +0 -25
  404. package/src/constraint-runtime/src/constraint/index.ts +0 -3
  405. package/src/constraint-runtime/src/constraint/permission.ts +0 -28
  406. package/src/constraint-runtime/src/context.ts +0 -45
  407. package/src/constraint-runtime/src/coordinator/index.ts +0 -15
  408. package/src/constraint-runtime/src/cost_hook.ts +0 -6
  409. package/src/constraint-runtime/src/cost_tracker.ts +0 -9
  410. package/src/constraint-runtime/src/deferred_init.ts +0 -18
  411. package/src/constraint-runtime/src/direct_modes.ts +0 -13
  412. package/src/constraint-runtime/src/dynamic-tool-loader.ts +0 -115
  413. package/src/constraint-runtime/src/entrypoints/index.ts +0 -15
  414. package/src/constraint-runtime/src/execution_registry.ts +0 -41
  415. package/src/constraint-runtime/src/history.ts +0 -16
  416. package/src/constraint-runtime/src/hooks/index.ts +0 -15
  417. package/src/constraint-runtime/src/index.ts +0 -28
  418. package/src/constraint-runtime/src/ink.ts +0 -4
  419. package/src/constraint-runtime/src/keybindings/index.ts +0 -15
  420. package/src/constraint-runtime/src/memdir/index.ts +0 -15
  421. package/src/constraint-runtime/src/migrations/index.ts +0 -15
  422. package/src/constraint-runtime/src/models.ts +0 -49
  423. package/src/constraint-runtime/src/moreright/index.ts +0 -15
  424. package/src/constraint-runtime/src/native_ts/index.ts +0 -15
  425. package/src/constraint-runtime/src/output_styles/index.ts +0 -15
  426. package/src/constraint-runtime/src/parity_audit.ts +0 -23
  427. package/src/constraint-runtime/src/plugins/index.ts +0 -15
  428. package/src/constraint-runtime/src/port_manifest.ts +0 -20
  429. package/src/constraint-runtime/src/prefetch.ts +0 -17
  430. package/src/constraint-runtime/src/query.ts +0 -7
  431. package/src/constraint-runtime/src/reference_data/archive_surface_snapshot.json +0 -63
  432. package/src/constraint-runtime/src/reference_data/commands_snapshot.json +0 -1037
  433. package/src/constraint-runtime/src/reference_data/subsystems/OpenCLI.json +0 -10
  434. package/src/constraint-runtime/src/reference_data/subsystems/PolymarketSDK.json +0 -12
  435. package/src/constraint-runtime/src/reference_data/subsystems/SafeSDK.json +0 -14
  436. package/src/constraint-runtime/src/reference_data/subsystems/assistant.json +0 -8
  437. package/src/constraint-runtime/src/reference_data/subsystems/bootstrap.json +0 -8
  438. package/src/constraint-runtime/src/reference_data/subsystems/bridge.json +0 -32
  439. package/src/constraint-runtime/src/reference_data/subsystems/buddy.json +0 -13
  440. package/src/constraint-runtime/src/reference_data/subsystems/cli.json +0 -26
  441. package/src/constraint-runtime/src/reference_data/subsystems/components.json +0 -32
  442. package/src/constraint-runtime/src/reference_data/subsystems/constants.json +0 -28
  443. package/src/constraint-runtime/src/reference_data/subsystems/coordinator.json +0 -8
  444. package/src/constraint-runtime/src/reference_data/subsystems/entrypoints.json +0 -15
  445. package/src/constraint-runtime/src/reference_data/subsystems/hooks.json +0 -32
  446. package/src/constraint-runtime/src/reference_data/subsystems/keybindings.json +0 -21
  447. package/src/constraint-runtime/src/reference_data/subsystems/memdir.json +0 -15
  448. package/src/constraint-runtime/src/reference_data/subsystems/migrations.json +0 -18
  449. package/src/constraint-runtime/src/reference_data/subsystems/moreright.json +0 -8
  450. package/src/constraint-runtime/src/reference_data/subsystems/native_ts.json +0 -11
  451. package/src/constraint-runtime/src/reference_data/subsystems/outputStyles.json +0 -8
  452. package/src/constraint-runtime/src/reference_data/subsystems/plugins.json +0 -9
  453. package/src/constraint-runtime/src/reference_data/subsystems/remote.json +0 -11
  454. package/src/constraint-runtime/src/reference_data/subsystems/schemas.json +0 -8
  455. package/src/constraint-runtime/src/reference_data/subsystems/screens.json +0 -10
  456. package/src/constraint-runtime/src/reference_data/subsystems/server.json +0 -10
  457. package/src/constraint-runtime/src/reference_data/subsystems/services.json +0 -32
  458. package/src/constraint-runtime/src/reference_data/subsystems/skills.json +0 -27
  459. package/src/constraint-runtime/src/reference_data/subsystems/state.json +0 -13
  460. package/src/constraint-runtime/src/reference_data/subsystems/types.json +0 -18
  461. package/src/constraint-runtime/src/reference_data/subsystems/upstreamproxy.json +0 -9
  462. package/src/constraint-runtime/src/reference_data/subsystems/utils.json +0 -32
  463. package/src/constraint-runtime/src/reference_data/subsystems/vim.json +0 -12
  464. package/src/constraint-runtime/src/reference_data/subsystems/voice.json +0 -8
  465. package/src/constraint-runtime/src/reference_data/tools_snapshot.json +0 -1042
  466. package/src/constraint-runtime/src/remote/index.ts +0 -15
  467. package/src/constraint-runtime/src/remote_runtime.ts +0 -17
  468. package/src/constraint-runtime/src/runtime/index.ts +0 -1
  469. package/src/constraint-runtime/src/runtime/session.ts +0 -42
  470. package/src/constraint-runtime/src/schemas/index.ts +0 -15
  471. package/src/constraint-runtime/src/screens/index.ts +0 -15
  472. package/src/constraint-runtime/src/server/index.ts +0 -15
  473. package/src/constraint-runtime/src/services/index.ts +0 -15
  474. package/src/constraint-runtime/src/session_store.ts +0 -32
  475. package/src/constraint-runtime/src/setup.ts +0 -50
  476. package/src/constraint-runtime/src/skills/index.ts +0 -1
  477. package/src/constraint-runtime/src/skills/skill-registry.ts +0 -40
  478. package/src/constraint-runtime/src/state/index.ts +0 -15
  479. package/src/constraint-runtime/src/system_init.ts +0 -21
  480. package/src/constraint-runtime/src/thinking/engine.ts +0 -61
  481. package/src/constraint-runtime/src/thinking/index.ts +0 -1
  482. package/src/constraint-runtime/src/tool_pool.ts +0 -20
  483. package/src/constraint-runtime/src/tools/OpenCLI/execAdapter.ts +0 -12
  484. package/src/constraint-runtime/src/tools/OpenCLI/listAdapters.ts +0 -12
  485. package/src/constraint-runtime/src/tools/OpenCLI/runCommand.ts +0 -13
  486. package/src/constraint-runtime/src/tools/PolymarketSDK/cancelOrder.ts +0 -10
  487. package/src/constraint-runtime/src/tools/PolymarketSDK/createOrder.ts +0 -13
  488. package/src/constraint-runtime/src/tools/PolymarketSDK/getMarket.ts +0 -14
  489. package/src/constraint-runtime/src/tools/PolymarketSDK/getOrders.ts +0 -10
  490. package/src/constraint-runtime/src/tools/PolymarketSDK/listMarkets.ts +0 -24
  491. package/src/constraint-runtime/src/tools/SafeSDK/confirmTransaction.ts +0 -13
  492. package/src/constraint-runtime/src/tools/SafeSDK/createTransaction.ts +0 -23
  493. package/src/constraint-runtime/src/tools/SafeSDK/deploySafe.ts +0 -12
  494. package/src/constraint-runtime/src/tools/SafeSDK/executeTransaction.ts +0 -12
  495. package/src/constraint-runtime/src/tools/SafeSDK/getBalance.ts +0 -10
  496. package/src/constraint-runtime/src/tools/SafeSDK/getPendingTransactions.ts +0 -10
  497. package/src/constraint-runtime/src/tools/SafeSDK/proposeTransaction.ts +0 -14
  498. package/src/constraint-runtime/src/tools/WalletTools/autoPay.ts +0 -58
  499. package/src/constraint-runtime/src/tools/WalletTools/createWallet.ts +0 -19
  500. package/src/constraint-runtime/src/tools/WalletTools/getBalance.ts +0 -28
  501. package/src/constraint-runtime/src/tools/WalletTools/importWallet.ts +0 -34
  502. package/src/constraint-runtime/src/tools/WalletTools/sendTransaction.ts +0 -50
  503. package/src/constraint-runtime/src/tools/WalletTools/signMessage.ts +0 -23
  504. package/src/constraint-runtime/src/tools/WalletTools/transferToken.ts +0 -49
  505. package/src/constraint-runtime/src/tools.ts +0 -100
  506. package/src/constraint-runtime/src/transcript.ts +0 -23
  507. package/src/constraint-runtime/src/types/index.ts +0 -15
  508. package/src/constraint-runtime/src/upstream_proxy/index.ts +0 -15
  509. package/src/constraint-runtime/src/utils/index.ts +0 -15
  510. package/src/constraint-runtime/src/vim/index.ts +0 -15
  511. package/src/constraint-runtime/src/voice/index.ts +0 -15
  512. package/src/constraint-runtime/tests/agent.test.ts +0 -20
  513. package/src/constraint-runtime/tests/constraint.test.ts +0 -47
  514. package/src/constraint-runtime/tests/skill.test.ts +0 -23
  515. package/src/constraint-runtime/tests/thinking.test.ts +0 -28
  516. package/src/constraint-runtime/tsconfig.json +0 -13
  517. package/src/pi-ecosystem/index.ts +0 -453
  518. package/src/pi-ecosystem-colony/index.ts +0 -482
  519. package/src/pi-ecosystem-goals/index.ts +0 -585
  520. package/src/pi-ecosystem-judgment/decision.ts +0 -431
  521. package/src/pi-ecosystem-judgment/distillation.ts +0 -398
  522. package/src/pi-ecosystem-judgment/human-value-store.ts +0 -580
  523. package/src/pi-ecosystem-judgment/index.ts +0 -678
  524. package/src/pi-ecosystem-judgment/value-injection.ts +0 -744
  525. package/src/pi-ecosystem-mcp/index.ts +0 -427
  526. package/src/pi-ecosystem-subagents/index.ts +0 -408
  527. package/src/test/ai-judgment-test.ts +0 -92
  528. package/src/test/bollharness-integration.test.ts +0 -398
  529. package/src/test/channel-agent-multi-dialogue.ts +0 -265
  530. package/src/test/channel-heartbeat-agent-test.ts +0 -244
  531. package/src/test/constraint-layer.test.ts +0 -191
  532. package/src/test/diap-identity-test.ts +0 -222
  533. package/src/test/diap-quick-test.ts +0 -73
  534. package/src/test/global-shared-context.test.ts +0 -393
  535. package/src/test/harness-judgment-injection.test.ts +0 -353
  536. package/src/test/harness-workflow-integrator-test.ts +0 -285
  537. package/src/test/human-value-store.test.ts +0 -316
  538. package/src/test/hybrid-integration-test.ts +0 -126
  539. package/src/test/hybrid-messenger-verify.ts +0 -68
  540. package/src/test/iroh-bistream-debug.ts +0 -50
  541. package/src/test/iroh-communication.test.ts +0 -81
  542. package/src/test/iroh-debug-test.ts +0 -69
  543. package/src/test/iroh-diap-test.ts +0 -90
  544. package/src/test/iroh-direct-connect.ts +0 -65
  545. package/src/test/iroh-e2e-fixed.ts +0 -106
  546. package/src/test/iroh-e2e-same-process.ts +0 -83
  547. package/src/test/iroh-e2e.ts +0 -83
  548. package/src/test/iroh-final-e2e.ts +0 -84
  549. package/src/test/iroh-relay-test.ts +0 -46
  550. package/src/test/iroh-simple-test.ts +0 -49
  551. package/src/test/iroh-transport-verify.ts +0 -60
  552. package/src/test/iroh-transport.test.ts +0 -47
  553. package/src/test/iroh-two-nodes.ts +0 -87
  554. package/src/test/iroh-verify.ts +0 -55
  555. package/src/test/judgment-decision.test.ts +0 -373
  556. package/src/test/llm-judgment-integration.test.ts +0 -257
  557. package/src/test/p2p-agent-complex-dialogue.ts +0 -490
  558. package/src/test/p2p-agent-dialogue.ts +0 -423
  559. package/src/test/p2p-agent-full-bidirectional.ts +0 -686
  560. package/src/test/p2p-agent-harness-flow.ts +0 -562
  561. package/src/test/p2p-agent-harness-single.ts +0 -175
  562. package/src/test/p2p-ai-dialogue-test.ts +0 -374
  563. package/src/test/p2p-cid-connect-test.ts +0 -245
  564. package/src/test/p2p-connect-receiver.ts +0 -85
  565. package/src/test/p2p-iroh-test.ts +0 -214
  566. package/src/test/p2p-minimal-test.ts +0 -264
  567. package/src/test/p2p-node-1.ts +0 -172
  568. package/src/test/p2p-node-2.ts +0 -172
  569. package/src/test/p2p-server.ts +0 -335
  570. package/src/test/p2p-two-nodes-test.ts +0 -542
  571. package/src/test/pi-sdk.test.ts +0 -47
  572. package/src/test/set-persona.ts +0 -56
  573. package/src/test/simple.test.ts +0 -11
  574. package/src/test/storage-integration.test.ts +0 -191
  575. package/src/test/subagent-manager.test.ts +0 -392
  576. package/src/test/test-gate-flow.test.ts +0 -92
  577. package/src/test/workflow-engine.test.ts +0 -101
  578. package/src/workflows/collaboration.ts +0 -455
  579. package/src/workflows/index.ts +0 -64
  580. package/vitest.config.ts +0 -12
  581. package//346/203/263/346/263/225.md +0 -79
@@ -1,242 +0,0 @@
1
- # PLAN-H8: 已知 issue + 文档合规 工程计划
2
-
3
- **版本**:v1.0
4
- **Owner**:H 系列 / hanis-main
5
- **前置 ADR**:`docs/decisions/ADR-H8-issue-and-doc-compliance.md`
6
- **前置 commit**:H6 verdict commit `7976bd41`(H 系列拓扑 D 倒数第二站闭合)
7
-
8
- ## §H0 自检
9
-
10
- - 起草人:当前 session(H6 closure 后立即起草)
11
- - ≤500 行:本 PLAN 实测 < 500(见 §6 verification)
12
- - 不引用未来 H 产物:仅引用 H0/H1/H2/H3/H4/H5/H6/H9
13
- - 不写"待协调员决定" / "TBD" / "后续讨论"
14
-
15
- ## §1 起跑基线
16
-
17
- ### 1.1 数字盘点(实测,2026-04-28 20:10)
18
-
19
- | 指标 | 实测 | INV-H8 红线 | 缺口 |
20
- |------|------|-------------|------|
21
- | ADR 文件总数 | 74 | — | — |
22
- | ADR-INDEX.md 是否存在 | ❌ | INV-H8-1 必须存在 | 缺 1 索引 |
23
- | open issue 数 | 93 | INV-H8-3 ≤ 80 | 需关闭 ≥ 13 |
24
- | issue 文件总数 | 383 | — | — |
25
- | 4 月新建 guard issue | 235 | — | — |
26
- | CHANGELOG 顶 5 版本 | 0.4.6 / 0.4.5 / 0.4.4 / 0.4.3 / 0.4.2 | INV-H8-2 间隙 ≤ 14 天 | 0.4.4→0.4.5 间隙 20 天,超 |
27
- | 0.4.4→0.4.5 间 commit 数 | 672 | — | 重大 PLAN 上线未入 changelog |
28
-
29
- ### 1.2 race risk(实施期间)
30
-
31
- | 风险 | 缓解 |
32
- |------|------|
33
- | Parallel session 同时改 docs/issues/* | H8 只做 status frontmatter flip,不改 body;冲突风险低 |
34
- | Parallel session 改 CHANGELOG.md | H8 backfill 用 patch-level 0.4.5.1(增量段)而非动 0.4.5 段头,避免冲突 |
35
- | ADR-INDEX.md 起草期间新增 ADR | 索引落地后立即开 INV-H8-1 检测命令实测,发现遗漏即追加 |
36
-
37
- ### 1.3 ADR-042 D3/D4/D9 抗 compact 接口签字
38
-
39
- 按 ADR-H8 §5 要求,本 PLAN 在交付时签字接受:
40
-
41
- - **D3 Session-Owner**:H8 实施 session owner = h8-window
42
- - **D4 owner-guard**:批量 issue flip 不被 owner-guard 拦
43
- - **D9 AGENTS.md 梯度加载**:H8 段按 stage 懒加载
44
-
45
- ## §2 WP 拆解
46
-
47
- ### WP-01 盘点(已完成)
48
-
49
- DoD:§1.1 数字 7 项实测 + §1.2 race risk 列出 + §1.3 抗 compact 签字。
50
- 实测:✅ 本 PLAN §1 即证据。
51
-
52
- ### WP-02 起草 ADR-H8 + PLAN-H8(已完成)
53
-
54
- DoD:ADR-H8 ≤300(实测 202) + PLAN-H8 ≤500(实测 < 500) + INV ≥ 3(实测 3)+ §1.1 缺口表 ≥ 5 行(实测 7 行)+ ADR-042 D3/D4/D9 签字(实测 §1.3 完成)。
55
- 实测:✅
56
-
57
- ### WP-03 实施(待执行)
58
-
59
- #### 3a 建 ADR-INDEX.md
60
-
61
- ```bash
62
- # 自动生成 74 ADR 一行 hook 索引
63
- ls docs/decisions/ADR-*.md | sort | while read f; do
64
- id=$(basename "$f" .md)
65
- title=$(head -1 "$f" | sed 's/^# *//')
66
- echo "- [$id]($id.md) — $title"
67
- done > /tmp/adr-index-body.md
68
- ```
69
-
70
- ADR-INDEX.md 结构:
71
-
72
- ```markdown
73
- # ADR Index
74
-
75
- > 全 74 条 ADR 的 1 行 hook 索引。每个 ADR 必须在此处有 1 行;新增 ADR 必须同步索引。
76
- > 检测:`diff <(ls docs/decisions/ADR-*.md | ...) <(awk -F'[][]' '/^- \[ADR-/{print $2}' ADR-INDEX.md)`
77
-
78
- ## 全部 ADR(按编号升序)
79
-
80
- <74 行 hook>
81
- ```
82
-
83
- DoD:
84
- - ADR-INDEX.md 存在 ✓
85
- - 含 74 行 hook ✓
86
- - INV-H8-1 检测命令 0 输出(双向集合相等)✓
87
-
88
- #### 3b CHANGELOG 0.4.5 增 H 系列 backfill 段
89
-
90
- 在 0.4.5 段(已存在 PLAN-101 + PLAN-104)追加:
91
-
92
- ```markdown
93
- ### Internal — Harness 自我修复(H 系列拓扑 D)
94
-
95
- - **H 系列 ADR/PLAN 全员就位**(`docs/decisions/ADR-H*.md` + `PLAN-H*.md`):
96
- H0 元规约 / H1 学习层复活 / H2 身份隔离 / H3 memory scope / H4 prompt 治理 /
97
- H5 Gate 量纲化 / H6 state 健康度 / H9 邮箱机制;H8(已知 issue + 文档合规)
98
- 在本版本同步关闭。
99
-
100
- - **review-contract.yaml schema 化**(`.claude/plugins/boll-review-toolkit/contracts/review-contract.yaml`):
101
- H5 注入 `line_caps` (4) + `inflation` (3) + `drafter_reviewer_separation`;
102
- H6 注入 `state_inventory` (13) + `state_health_indicators` (3)。所有 governance
103
- 从 ADR 文字升级到 yaml 字段(ADR-038 D11.2 schema-level 100% adherence)。
104
-
105
- - **state 资产 stale 清理**:`.boll/state/_archived/` 新增;2 archived 资产
106
- 归档 + .DS_Store 删除。
107
- ```
108
-
109
- DoD:
110
- - 在 0.4.5 段下方追加 ≥ 1 个 "### Internal" 子段 ✓
111
- - 含 ≥ 3 行可引用 commit hash 的 ship 证据 ✓
112
- - 不动 0.4.5 段头(避免与 release flow 冲突)✓
113
-
114
- #### 3c 批量 issue triage(关闭 ≥ 13 条)
115
-
116
- 策略:
117
-
118
- 1. 优先 flip 已被 superseded 的 issue(grep "superseded" / "替代为" 字样)
119
- 2. 次优 flip 30 天前的 demo/spike issue(status=open + age > 30d + 业务无 owner)
120
- 3. 每条 flip 必须附 1 行 justification + 至少 1 个 commit hash 引用
121
-
122
- 不动:
123
- - guard-202604* 时间戳为 4 月内的 active issue(owner 在追的)
124
- - 任何 status=open 但 prevention_status 标 "open" 的 issue(仍有复发面)
125
-
126
- DoD:
127
- - 关闭 ≥ 13 issue(93 - 13 = 80,恰达 INV-H8-3 红线)✓
128
- - 每条 flip commit message 含引用 ✓
129
-
130
- #### 3d 合规清单(≥ 5 条)
131
-
132
- 新建 `docs/decisions/tasks/PLAN-H8/WP-03/compliance-checklist.md`,列:
133
-
134
- 1. ADR-INDEX.md 与 `docs/decisions/ADR-*.md` 集合一致性(INV-H8-1)
135
- 2. CHANGELOG 相邻版本号间隙 ≤ 14 天(INV-H8-2)
136
- 3. open issue 总数 ≤ 80(INV-H8-3)
137
- 4. ADR 索引主页含状态字段(draft / accepted / superseded / retired)
138
- 5. Guardian issue YAML frontmatter 完整性(status / opened / verified_in_prod 三字段必填)
139
-
140
- ### WP-04 dogfood(待执行)
141
-
142
- dogfood 目标:H8 自身**不违反 H8.1 INV-H8-1/2/3**。
143
-
144
- DoD:
145
- - INV-H8-1:`diff <(ls...) <(awk...)` 输出 0 行 ✓
146
- - INV-H8-2:CHANGELOG 0.4.5→0.4.6 间隙 = 0 天(同日发布)✓
147
- - INV-H8-3:open issue ≤ 80 ✓
148
- - 无未来 H 引用:`awk '/^```/{f=!f; next} !f' PLAN-H8 | grep -cE "H(10|11|12)"` = 0
149
- - 不重新发明 D3/D4/D9:本 PLAN §1.3 签字复用 ADR-042
150
-
151
- ### WP-05 reviewer signoff(待执行)
152
-
153
- spawn `pr-review-toolkit:code-reviewer`(opus, read-only),14 维度审:
154
-
155
- 1. ADR-H8 ≤300 行
156
- 2. PLAN-H8 ≤500 行
157
- 3. INV count ≥ 3
158
- 4. INV-H8-1 检测命令 0 输出
159
- 5. ADR-INDEX.md 存在 + 74 行 hook
160
- 6. CHANGELOG 0.4.5 段含 ≥ 1 H 系列 internal subsection
161
- 7. CHANGELOG 0.4.4→0.4.5/0.4.6 间隙说明 ≥ 1 行(intermediate notes)
162
- 8. open issue ≤ 80
163
- 9. 关闭 issue ≥ 13 + 每条引用 commit hash
164
- 10. 合规清单 ≥ 5 条
165
- 11. ADR-042 D3/D4/D9 签字
166
- 12. 不引未来 H
167
- 13. 不重新发明 governance(按 §7 不做什么)
168
- 14. self-reference paradox awk + text fence 避免
169
-
170
- verdict 至 `docs/decisions/tasks/PLAN-H8/WP-05/reviewer-verdict-<ts>.md`
171
-
172
- ## §3 commit 链规划
173
-
174
- | commit | 内容 | 预期落点 |
175
- |--------|------|----------|
176
- | 1 | ADR-H8 + PLAN-H8(本对话即将提交) | 起草段,独立 commit |
177
- | 2 | ADR-INDEX.md + CHANGELOG backfill + 13 issue flip + 合规清单 | 实施段;可拆 2-3 个子 commit |
178
- | 3 | dogfood + reviewer verdict | 闭关段 |
179
-
180
- race-safe:每个 commit 用 `git commit --only <path1> <path2>...` 限定路径,不 `git add -a`。
181
-
182
- ## §4 H 系列与 main 的关系
183
-
184
- H8 闭合后,H 系列拓扑 D 全部就位。**H 系列 → main 整体 merge 不在 H8 scope**——这是 hanis-main 维护者的独立动作。
185
-
186
- 本 PLAN **不强制** H 系列改名/搬家/收尾文档;只交付 H8 的 5 WP。
187
-
188
- ## §5 风险与回滚
189
-
190
- | 风险 | 处置 |
191
- |------|------|
192
- | race-absorbed by parallel session | H6 已 2 次复现,证明 H 实质交付不会因 race 损失;接受 attribution drift,evidence 文件留 audit trail |
193
- | issue flip 误关 | 每条 flip 必须 1 行 justification;误关后任何人可重开(ADR-030 工作流) |
194
- | ADR-INDEX.md 漂移 | INV-H8-1 检测命令进 dogfood;将来 H 系列收尾时建议进 review-contract.yaml line_caps |
195
- | CHANGELOG 内容错误 | 每条 backfill 引用 ≥ 1 ship commit hash;reviewer 抽检 ≥ 3 条 |
196
-
197
- 回滚:
198
-
199
- - 轻 broken(ADR-INDEX 漏几条):fix commit 在 hanis-main 上,不 revert
200
- - 中 broken(issue 误 flip):被报告者 / owner 重开 issue,不 revert H8
201
- - 重 broken(CHANGELOG backfill 让用户混淆):revert WP-03 的 changelog commit,保留其余 WP
202
-
203
- ## §6 verification
204
-
205
- ```bash
206
- # 行数
207
- wc -l docs/decisions/PLAN-H8-issue-and-doc-compliance.md
208
- # 期望: ≤ 500
209
-
210
- # H 引用范围
211
- awk '/^```/{f=!f; next} !f' docs/decisions/PLAN-H8-issue-and-doc-compliance.md | grep -cE "H(10|11|12)"
212
- # 期望: 0
213
-
214
- # H0 自检段
215
- grep -c "^## §H0 自检" docs/decisions/PLAN-H8-issue-and-doc-compliance.md
216
- # 期望: 1
217
-
218
- # WP 数
219
- grep -c "^### WP-0" docs/decisions/PLAN-H8-issue-and-doc-compliance.md
220
- # 期望: 5
221
-
222
- # DoD 个数
223
- grep -c "^DoD:" docs/decisions/PLAN-H8-issue-and-doc-compliance.md
224
- # 期望: ≥ 4
225
- ```
226
-
227
- ## §7 实施时间表
228
-
229
- - 2026-04-28 20:10 起草本 PLAN(同时间 ADR-H8 已起草)
230
- - 2026-04-28 20:15 commit 1(ADR + PLAN)
231
- - 2026-04-28 20:20-20:50 commit 2(实施:ADR-INDEX + CHANGELOG + issue flip + 合规清单)
232
- - 2026-04-28 20:50-21:00 commit 3(dogfood + reviewer)
233
- - 2026-04-28 21:00 H8 closure,H 系列拓扑 D 全员闭合
234
-
235
- ## §8 H 系列收尾(H8 闭合后建议,非本 PLAN scope)
236
-
237
- 留给 hanis-main 维护者:
238
-
239
- 1. `.boll/log/hanis-self-symptoms.md` 完整复盘
240
- 2. P3 informational 整合(INV-H1-3 / INV-H5-3 / INV-H6-3 修正建议)
241
- 3. hanis-main → main merge 前 vNext smoke 重跑
242
- 4. 关闭 H 系列拓扑 D 总结 ADR
@@ -1,378 +0,0 @@
1
- ---
2
- plan_id: PLAN-H9
3
- title: harness 多窗口邮箱机制工程化(inbox 路径 + 5 hook + Nature 演练)
4
- status: Accepted (5 hook 落地 + Nature 真实演练 PASS 2026-04-28 [ADR-H9 附录 A.2] + reviewer task #17 完成)
5
- drafted: 2026-04-28
6
- drafter: Nature(AI 助手协助)
7
- signer: 待非起草 reviewer 复核(task #17)— 不享 H0 §3.4 单签例外
8
- related_adrs:
9
- - ADR-H9-mailbox.md(本 PLAN 决策真相源)
10
- - ADR-H0-meta-charter.md(6+1 元规约 + commit body 治理)
11
- - ADR-058 §D1(hook IO schema 红线 + 16 helper API)
12
- - ADR-038 D10(.boll/proposals/ self-trace 来源)
13
- related_issues: []
14
- line_budget: ≤500 行(H0.2);预算 ~400 行
15
- verification_chokepoint: lint-hook-output.py(pre-commit)+ schema/message-v1.json(jsonschema validate)+ Nature 演练录像
16
- ---
17
-
18
- # PLAN-H9 — harness 多窗口邮箱机制工程化
19
-
20
- ## 0. 本 PLAN 在 H 系列拓扑中的位置
21
-
22
- - 拓扑序:`H0 → H9 → H2 → H3 → H4 → H1 → {H5/H6/H8 并行}`(H7 已撤销见 `.boll/log/harness-self-symptoms.md` §4.3)
23
- - 上游:ADR-H0 6+1 元规约(已落地 commit `2c162d04`)+ ADR-H9 决策(本 PLAN 同期 commit `be03f44b`)
24
- - 下游:H2 / H3 / H4 / H1 / H5 / H6 / H8 都依赖 H9 邮箱作为多窗口通信底座
25
- - 出口条件:本 PLAN 8 WP 全部 PASS + Nature 演练录像/截图附 ADR-H9 末尾 + 非起草 reviewer 签字 → ADR-H9 status 转 Accepted
26
-
27
- ## 1. 目标
28
-
29
- 把"主窗口人脑协调员"物理化为"文件队列 + hook 自动注入 + ScheduleWakeup 自循环"。Nature 启动主窗口后只说"开始 harness 系列",后续多窗口通信全部走 `.boll/inbox/`,不再手动 ping / 复制粘贴。
30
-
31
- ## 2. 范围
32
-
33
- **In scope**:
34
- - `.boll/inbox/` 路径树初始化 + JSON Schema 真相源
35
- - 5 个 hook 实施(write-ledger / validate / inject-on-start / poll / ack)
36
- - `.claude/settings.json` PostToolUse + SessionStart 注册
37
- - pre-commit lint chokepoint 校验(lint-hook-output.py = 0 violation)
38
- - Nature 演练 1 次(端到端 ≤ 60s + 录像/截图)
39
-
40
- **Out of scope**:
41
- - 现有 hook(guard-feedback / loop-detection / risk-tracker / session-start-magic-docs / session-start-reset-risk)的改造——H9 是追加,不改既有
42
- - proposal-v1 schema 迁移——ADR-H9 §4 已签字"schema 分歧不复用",本 PLAN 不动 trace-analyzer.py
43
- - 多窗口物理隔离——交给 ADR-042 worktree 模式,H9 只管通信
44
-
45
- ## 3. WP 拆解表(8 WP)
46
-
47
- | WP | 主题 | 产物 | DoD 关键证据命令 | 估时 | depends_on |
48
- |----|------|------|------------------|------|------------|
49
- | WP-01 | schema 真相源 | `.boll/inbox/schema/message-v1.json` + 路径树 | `python3 -c "import jsonschema, json; jsonschema.Draft202012Validator.check_schema(json.load(open('.boll/inbox/schema/message-v1.json')))"` 退出码 0 | 0.3d | — |
50
- | WP-02 | write-ledger | `scripts/hooks/inbox-write-ledger.py` | `python3 scripts/checks/lint-hook-output.py scripts/hooks/inbox-write-ledger.py` 0 violation;写测试 inbox 文件后 `.boll/log/hook/inbox-write.jsonl` 新增 1 行 | 0.5d | WP-01 |
51
- | WP-03 | validate | `scripts/hooks/inbox-validate.py` | lint 0;写非 schema-v1 文件后该文件被 mv 到 `.boll/inbox/quarantine/` + ledger 1 行 | 0.5d | WP-01 |
52
- | WP-04 | inject-on-start | `scripts/hooks/inbox-inject-on-start.py` | lint 0;启动一个 CC session(main/unread/ 有 1 文件)后 systemMessage 中能 grep 到该消息 msg_id | 0.5d | WP-01 |
53
- | WP-05 | poll 自循环 | `scripts/hooks/inbox-poll.sh` + ScheduleWakeup 调用 | lint 0(虽 shell 不出 stdout JSON 也确认无手搓 print);模拟 1200s wakeup 后再次注入 | 0.5d | WP-04 |
54
- | WP-06 | ack 回执 | `scripts/hooks/inbox-ack.py` | lint 0;调用后 main/unread/<msg> 消失、main/processed/<msg> 出现、对应 window-Hx/acks/<msg-id>.md 出现 | 0.4d | WP-01 |
55
- | WP-07 | settings 注册 + 全 lint | `.claude/settings.json` PostToolUse + SessionStart 增段 | `python3 -c "import json; d=json.load(open('.claude/settings.json')); print(any('inbox-write-ledger' in str(d['hooks'])))"` True;`python3 scripts/checks/lint-hook-output.py scripts/hooks/inbox-*.py` 0 violation | 0.3d | WP-02..06 |
56
- | WP-08 | Nature 演练 | 录像/截图 + ADR-H9 末尾附录 + symptoms.md §4.4 通过记录(无症状则也写一行 PASS) | 录像可见:子窗口写消息 → ≤60s 主窗口 SessionStart 注入 → 主窗口 ack → 子窗口下次启动看到 ack | 0.5d | WP-07 |
57
-
58
- **总估时**:3.5d 串行 + 0.5d Gate / reviewer = ~4d(plan §3.3 估时 3d,多 0.5d 用于 schema 真相源 + 全 lint,可接受)
59
-
60
- ## 4. WP 详细
61
-
62
- ### 4.1 WP-01 schema 真相源 + 路径树初始化
63
-
64
- **产物**:
65
- - `.boll/inbox/schema/message-v1.json`(JSON Schema Draft 2020-12)
66
- - `.boll/inbox/{main/{unread,in-flight,processed},quarantine,window-h0,window-h1,window-h2,window-h3,window-h4,window-h5,window-h6,window-h8,window-h9}/`(含每个 window-Hx 下的 acks/)
67
- - `.boll/inbox/.gitkeep` 让 git track 空目录
68
-
69
- **JSON Schema 字段**:见 ADR-H9 §4;message-v1.json 必须 1:1 反映 ADR-H9 §4 frontmatter 字段,所有必填字段 `required` 列出,`kind` / `priority` / `related_h` 用 enum 锁死。
70
-
71
- **DoD**:
72
- - `python3 -c "import jsonschema, json; jsonschema.Draft202012Validator.check_schema(json.load(open('.boll/inbox/schema/message-v1.json')))"` 退出码 0
73
- - `find .boll/inbox/ -type d | wc -l` ≥ 14
74
- - `git status` 显示路径树进入 git track(通过 .gitkeep)
75
-
76
- ### 4.2 WP-02 inbox-write-ledger.py
77
-
78
- **触发**:PostToolUse Edit|Write,matcher 路径含 `.boll/inbox/`
79
-
80
- **职责**:检测 inbox 写入 → 追加 jsonl ledger(`.boll/log/hook/inbox-write.jsonl`)→ 不阻断主流程
81
-
82
- **实施关键**:
83
- - 不绕开 `_hook_output`:要么 `from _hook_output import post_tool_use_inject` 用 helper,要么完全沉默 early return(PostToolUse 空 stdout = no-op;模型对照 `scripts/hooks/risk-tracker.py`)。绝对禁止手搓 `print(json.dumps(...))` 等三种 banned form(ADR-058 §D1)
84
- - ledger 字段:ts / ts_unix / rel_path / tool / size_bytes / sender / msg_id / kind / priority / related_h(落地实现比初版 spec 多 4 字段,可观测性更全)
85
- - 检测 `len(.boll/inbox/main/unread/) ≥ INBOX_OVERFLOW_THRESHOLD`(默认 50,env 可覆盖)时同步写 `.boll/log/hook/inbox-overflow.jsonl`(§6.1 失败模式 1)
86
- - 顶层 `try/except BaseException → sys.exit(0)` 兜底:非零 exit = CC 解读 deny → 锁仓,业务 hook 必须吞掉所有异常
87
-
88
- **DoD**(落地实证 ✓ 2026-04-28 commit-anchor 见 §11):
89
- - `LINT_HOOK_OUTPUT_INCLUDE_ALL=1 python3 scripts/checks/lint-hook-output.py scripts/hooks/inbox-write-ledger.py` 0 violation ✓
90
- - 模拟 Write `.boll/inbox/window-h9/h9-20260428-160000-smoke01.md` 后,`.boll/log/hook/inbox-write.jsonl` 末行 `msg_id == "h9-20260428-160000-smoke01"` ✓
91
- - 模拟 4 文件 + 阈值=3,`.boll/log/hook/inbox-overflow.jsonl` 一行 `unread_count=4 / threshold=3` ✓
92
- - 性能:out-of-scope 路径 p50=32ms(含 python startup),< 50ms ADR-058 §D1 budget ✓
93
-
94
- ### 4.3 WP-03 inbox-validate.py
95
-
96
- **触发**:PostToolUse Edit|Write,matcher 同 WP-02
97
-
98
- **职责**:用 message-v1.json schema 校验 frontmatter;不合规 mv 到 quarantine/
99
-
100
- **实施关键**:
101
- - `import jsonschema, yaml` 解析 frontmatter
102
- - 不合规:原文件 mv 到 `.boll/inbox/quarantine/<orig-name>-<ts>.md`,写 `.boll/log/hook/inbox-quarantine.jsonl` 一行
103
- - 合规:不动文件,inject_context 空
104
- - ack 类型消息(kind=ack)必须有 ack_for 字段,否则 quarantine
105
-
106
- **DoD**:
107
- - lint 0 violation
108
- - 写非 schema-v1 文件 → 文件移到 quarantine + ledger 1 行
109
- - 写合规文件 → 文件保留原位 + 无 quarantine 事件
110
-
111
- ### 4.4 WP-04 inbox-inject-on-start.py
112
-
113
- **触发**:SessionStart matcher=*
114
-
115
- **职责**:主窗口启动时读 `.boll/inbox/main/unread/`,把所有未读消息以 systemMessage 注入;同时清理 `in-flight/` 中的崩溃残留(§6.2 失败模式 2)
116
-
117
- **实施关键**:
118
- - `from _hook_output import session_start_inject`
119
- - 检测 cwd 是否是主仓 root(`scripts/hooks/find-boll-root.sh`);不是则 inject 空
120
- - 注入格式:分章节列出每条 unread msg(msg_id / sender / ts / kind / priority / 正文摘要 ≤200 字)
121
- - in-flight/ 残留 mv 回 unread/(msg_id 幂等,重新注入不重复处理)
122
- - 注入文本总长度 ≤ 4096 字(CC SystemMessage 友好上限);超额则注入"unread overflow,请人工 archive"
123
-
124
- **DoD**:
125
- - lint 0 violation
126
- - 启动 CC session(main/unread/ 1 测试文件)后,session systemMessage 中 grep msg_id 命中
127
- - in-flight/ 1 残留 → 启动后 mv 回 unread/
128
-
129
- ### 4.5 WP-05 inbox-poll.sh(agent/shell 切分版)
130
-
131
- **触发**:主 agent 在 ScheduleWakeup 触发后用 Bash tool 主动调用本脚本
132
-
133
- **职责**:纯状态检查 + 推荐间隔输出(KV 文本)。不直接调 ScheduleWakeup——见下方 spec letter 修订 disclosure。
134
-
135
- **Spec letter 修订(落地阶段发现的工程不可行性,2026-04-28 落地 commit-anchor 见 §11)**:
136
-
137
- PLAN-H9 §4.5 草稿原文写"shell 脚本 ... 内部调用 ScheduleWakeup MCP"。落地阶段发现 ScheduleWakeup 是 **CC agent loop 内部 tool API**,shell 进程没有合法 RPC 入口直接调用——必须由主 agent(CC 主窗口)在 agent loop 里调用。本脚本因此切分为两层:
138
-
139
- - **[shell 层] inbox-poll.sh**:状态检查 + 推荐间隔 → stdout KV 文本
140
- - **[agent 层] 主 agent**:读 stdout 后自行决定下次 ScheduleWakeup 时机
141
-
142
- 切分边界已落 ADR-H0 修订建议(`note=` 行直接写在脚本输出里供未来 grep)。
143
-
144
- **实施关键**:
145
- - shell 脚本(KV 文本输出,不出 stdout JSON)
146
- - `set -euo pipefail`;GNU/BSD `stat` 兼容性(`stat -c %Y` Linux vs `stat -f %m` macOS)
147
- - 默认间隔常量:`INBOX_POLL_NORMAL_WAKE=1200s`(20min cache 友好),`INBOX_POLL_P0_WAKE=300s`(CC ScheduleWakeup 最短允许下限)
148
- - 输出字段:`unread_count`、`p0_exists`、`oldest_unread_age_seconds`、`recommended_wake_seconds`、`note`
149
-
150
- **DoD**(落地实证 ✓ 2026-04-28 commit-anchor 见 §11):
151
- - shell 脚本不出 stdout JSON 的物理校验(reviewer P1-1 修法:lint-hook-output.py AST 是 Python-only,对 .sh 必然 vacuously 0 命中 = misleading;改为显式 grep):`grep -nE '^[^#]*(print\(json\.dumps|echo.*permissionDecision|echo.*systemMessage)' scripts/hooks/inbox-poll.sh` 必须 0 命中(active-code only;comment 内的 banned form 词法引用是 disclosure,不是活路径)✓
152
- - Smoke 1(empty unread)→ `unread_count=0 / p0_exists=false / recommended_wake_seconds=1200` ✓
153
- - Smoke 2(P1 only)→ `unread_count=1 / p0_exists=false / oldest_unread_age_seconds>0 / recommended_wake_seconds=1200` ✓
154
- - Smoke 3(P0 present)→ `p0_exists=true / recommended_wake_seconds=300` ✓
155
- - 主 agent 演练:ScheduleWakeup → Bash 调脚本 → 读 stdout → 决定下次 wake → 留待 WP-08 端到端演练验证
156
-
157
- ### 4.6 WP-06 inbox-ack.py
158
-
159
- **触发**:主窗口手动调用(处理完一条 unread 消息后);CLI 工具,**不是** CC hook
160
-
161
- **职责**:mv unread/<msg> → processed/<msg> + 在原 sender 的 acks/ 目录写 ack 文件
162
-
163
- **实施关键**:
164
- - 命令行参数:`python3 scripts/hooks/inbox-ack.py --msg-id <id> --sender <window-Hx>`
165
- - 写 ack 时生成新 msg_id(格式 `main-<YYYYMMDD>-<HHMMSS>-<sha256[:6]>`;同秒重 ack 同 orig 撞名→被 Step 2 反扫捕获不双写)
166
- - 幂等:反扫 `<sender>/acks/` 找 frontmatter `kind=ack && ack_for==<orig>`,命中→直接 noop
167
- - mv 阶段:unread 不在则跳过(已 processed 或丢失);processed 已存在同名→删 unread 副本(msg_id 幂等保证内容一致)
168
- - 主消息 related_h fallback:unread/→processed/→默认 H9
169
- - ack 不出 stdout JSON;error 走 stderr(参数错误提示用,不是 hook decision)
170
- - 顶层 try/except BaseException → exit 0
171
-
172
- **DoD**(落地实证 ✓ 2026-04-28 commit-anchor 见 §11):
173
- - lint 0 violation:`LINT_HOOK_OUTPUT_INCLUDE_ALL=1 python3 scripts/checks/lint-hook-output.py scripts/hooks/inbox-ack.py` exit=0 ✓
174
- - AST 物理校验 banned form hits=0 ✓
175
- - 行数 202 ≤ 300 ✓
176
- - Smoke 1(basic)→ unread mv processed + window-h9/acks/main-*.md 生成 + frontmatter schema-v1 jsonschema validate PASS(含 `kind=ack → ack_for required + ack_required=false` allOf 子句)✓
177
- - Smoke 2(idempotency)→ 同 msg-id 重 ack 仍只 1 份 ack 文件 ✓
178
- - Smoke 3(invalid sender)→ stderr 人类可读错误 + exit 0 ✓
179
- - Smoke 4(second message)→ 不同 msg-id 新 ack 文件正确生成(共 2 份)✓
180
-
181
- ### 4.7 WP-07 settings 注册 + 全 lint
182
-
183
- **产物**:`.claude/settings.json` PostToolUse + SessionStart 段追加 inbox-write-ledger.py / inbox-validate.py / inbox-inject-on-start.py 三条注册(poll.sh / ack.py 不走 CC hook 注册)
184
-
185
- **实施关键**:
186
- - 现有 PostToolUse Edit|Write 段已有 3 hook(guard-feedback / loop-detection / risk-tracker);H9 追加 2 个,total 5 个
187
- - 现有 SessionStart 段已有 2 hook(reset-risk / magic-docs);H9 追加 1 个,total 3 个
188
- - 顺序:H9 hook 排在最后(不影响现有 hook 时延)
189
-
190
- **DoD**(落地实证 ✓ 2026-04-28 commit-anchor 见 §11):
191
- - PostToolUse 段 H9 hook 注册 ≥ 2:`python3 -c "import json; d=json.load(open('.claude/settings.json')); print(sum('inbox-' in str(h) for h in d['hooks']['PostToolUse'][0]['hooks']))"` = 2(inbox-write-ledger + inbox-validate)✓
192
- - SessionStart 段 H9 hook 注册 ≥ 1:`python3 -c "import json; d=json.load(open('.claude/settings.json')); print(sum('inbox-inject' in str(h) for h in d['hooks']['SessionStart'][0]['hooks']))"` = 1(inbox-inject-on-start)✓
193
- - JSON syntax valid:`python3 -c "import json; json.load(open('.claude/settings.json'))"` exit=0 ✓
194
- - 4 个 H9 Python hook 各自 lint exit=0:`LINT_HOOK_OUTPUT_INCLUDE_ALL=1 python3 scripts/checks/lint-hook-output.py scripts/hooks/inbox-{write-ledger,validate,inject-on-start,ack}.py` 全 0 ✓
195
- - inbox-poll.sh active-code banned form grep exit=1(无匹配)✓
196
- - 端到端 hook chain integration smoke:合规消息写入 unread/ → write-ledger 写 jsonl 1 行(含 sender/msg_id/kind/priority/related_h 5 字段)+ validate 不动消息 + inject-on-start 输出 schema-correct `{"hookSpecificOutput": {"hookEventName": "SessionStart", "additionalContext": ...}}` ✓
197
- - 现有 hook 未被打乱(guard-feedback / loop-detection / risk-tracker / reset-risk / magic-docs 仍按原顺序)✓
198
-
199
- ### 4.8 WP-08 Nature 演练 + 录像
200
-
201
- **目标**:端到端验证 H9 邮箱机制可用 → ADR-H9 转 Accepted 的最后凭证
202
-
203
- **演练脚本**:
204
- 1. 启动主窗口(CC session A),不说"开始 harness 系列"以外的指令
205
- 2. 启动子窗口(CC session B in `.worktrees/hanis-Hx-test/`),写测试消息到 `.boll/inbox/window-Hx/unread/test-XXX.md`(按 message-v1 schema)
206
- 3. 等待主窗口 ScheduleWakeup 触发(≤ 1200s)或子窗口 P0 强制 wake(≤ 60s)
207
- 4. 主窗口 SessionStart 注入测试消息内容
208
- 5. 主窗口调 inbox-ack.py 写 ack
209
- 6. 子窗口下次启动 SessionStart 看到 ack
210
-
211
- **DoD**:
212
- - 录像 / 截图序列附 ADR-H9 末尾"附录 A"段
213
- - 端到端时间机器证据(reviewer P1-2 修法:录像 timer 是人眼读,不算 H0.6 机器可生成):`.boll/log/hook/inbox-write.jsonl` 子→主消息行 + `.boll/inbox/main/processed/<msg-id>.md` 文件 mtime 对比,delta ≤ 60s(P0 路径)或 ≤ 1200s(默认轮询);命令:`python3 -c "import json,os,sys; sub=json.loads(open('.boll/log/hook/inbox-write.jsonl').readlines()[-2]); main_mtime=os.path.getmtime('.boll/inbox/main/processed/'+sub['msg_id']+'.md'); print(main_mtime - sub['ts_unix'])"` ≤ 60 / 1200
214
- - `.boll/log/harness-self-symptoms.md` 追加一行 WP-08 PASS 记录(如有症状则记录新症状)
215
- - ADR-H9 status: Proposed → Accepted(带签字 reviewer)
216
-
217
- ## 5. Verification Matrix(DoD 汇总)
218
-
219
- | 维度 | 命令 | 期望 | WP |
220
- |------|------|------|-----|
221
- | schema 合法 | `python3 -c "import jsonschema, json; jsonschema.Draft202012Validator.check_schema(json.load(open('.boll/inbox/schema/message-v1.json')))"` | 退出码 0 | WP-01 |
222
- | 5 hook lint | `python3 scripts/checks/lint-hook-output.py scripts/hooks/inbox-*.py scripts/hooks/inbox-*.sh` | 0 violation | WP-02..07 |
223
- | 行数限制 | `wc -l docs/decisions/ADR-H9-mailbox.md docs/decisions/PLAN-H9-mailbox.md scripts/hooks/inbox-*.py` | ADR ≤300 / PLAN ≤500 / 单 hook ≤500 | 全 WP |
224
- | 端到端时延 P0 | 演练录像 timer | ≤ 60s | WP-08 |
225
- | 端到端时延默认 | 演练录像 timer | ≤ 1200s | WP-08 |
226
- | ledger 落盘 | `wc -l .boll/log/hook/inbox-write.jsonl` 写入测试后 | ≥ 1 | WP-02 |
227
- | quarantine 工作 | 写非 schema-v1 文件后 `ls .boll/inbox/quarantine/` | ≥ 1 文件 | WP-03 |
228
- | ack 幂等 | 重复调用 inbox-ack.py 同 msg_id | 退出码 0 + acks/ 目录文件数不增 | WP-06 |
229
- | settings 注册 | `grep inbox- .claude/settings.json` | 命中 ≥ 3 行 | WP-07 |
230
- | H0.2 ADR 行数 | `wc -l docs/decisions/ADR-H9-mailbox.md` | ≤ 300 | 收尾自检 |
231
- | H0.2 PLAN 行数 | `wc -l docs/decisions/PLAN-H9-mailbox.md` | ≤ 500 | 收尾自检 |
232
- | H0.4 自指 | `grep -nE '(TBD\|后续讨论\|待协调员决定)' docs/decisions/ADR-H9-mailbox.md docs/decisions/PLAN-H9-mailbox.md` | 仅元层定义命中(参 ADR-H0 §6 例 4) | 收尾自检 |
233
-
234
- ## 6. 跨子计划冲突登记(H0.5)
235
-
236
- | 文件 | 与谁冲突 | 处置 |
237
- |------|---------|------|
238
- | `.claude/settings.json` PostToolUse 段 | 后续 H 子计划如需注册新 PostToolUse hook | 顺序追加,H9 排前;后续 H 起草前先 grep 当前 settings.json 状态 |
239
- | `.claude/settings.json` SessionStart 段 | 后续 H 子计划如需注册新 SessionStart hook | 同上 |
240
- | `scripts/hooks/_hook_output.py` | 不动 | H9 仅消费 helper API,不动真相源;如需扩展 helper 走 ADR-058 修订路径 |
241
- | `scripts/checks/lint-hook-output.py` | 不动 | H9 仅消费 lint,不动;新 hook 文件名 `inbox-*` 自动被 lint 扫到 |
242
- | `.boll/inbox/` 路径树 | H9 独占 | 后续 H 子计划如需写邮箱必须按 message-v1 schema |
243
- | `.boll/log/hook/inbox-*.jsonl` | H9 独占落点 | 后续 H 子计划不得写同名 ledger |
244
-
245
- **未登记冲突处置**:git 时间戳先到先得;后到方在 commit body "未登记冲突"段补述(H0.5)。
246
-
247
- ## 7. 自检(H0.1-H0.6 + H0.meta)
248
-
249
- - **H0.1 施工隔离**:本 PLAN scope = `docs/decisions/PLAN-H9-mailbox.md`;各 WP 实施 scope 详见 §3 表格 / §4 各 WP 产物列;每 WP commit body 必须显式列出 scope 路径
250
- - **H0.2 节流限速**:本 PLAN 目标 ≤ 500 行(实际行数 wc -l 自报);ADR-H9 ≤ 300 已落地
251
- - **H0.3 执检分离**:起草人 Nature(AI 助手协助),签字人待非起草 reviewer 复核(task #17 spawn `boll-review-toolkit:reviewer`);H9 不享 H0 §3.4 单签例外
252
- - **H0.4 自指禁止**:H9 修"协调断裂",本 PLAN 自身不许提议新 branch 隔离(已遵守,沿用 ADR-H0 main 直接 commit);不许"待协调员决定"(已遵守,§4.7 主窗口由 inbox 注入而非人手协调)
253
- - **H0.5 跨子计划协调**:见 §6 冲突表
254
- - **H0.6 证据机械化**:每 WP DoD 都括注证据生成命令(§3 表格 + §5 verification matrix);reviewer 复跑命令必须返回相同结果
255
- - **H0.meta**:本 PLAN 引用 H0(已落地)+ H9 自身 + ADR-H9 / PLAN-H9 配套;其他兄弟用"后续 H 子计划"中性表述(§6 / §7)
256
-
257
- **症状词字面命中检查**:本 PLAN §4.4 / §6 / §7 出现"协调断裂""人脑协调员""待协调员决定(反例)"以**陈述实例 / 元层反例**形式出现,自身行为命中 = 0;元层定义不计入。
258
-
259
- ## 8. 生效与变更
260
-
261
- - **生效**:本 PLAN 所有 8 WP PASS + Nature 演练录像 + 非起草 reviewer 签字 → ADR-H9 status 转 Accepted
262
- - **变更**:WP 拆解可在每 WP 实施时 inline 微调(不影响 ADR-H9 schema),微调记入对应 WP commit body;新增 WP / 删除 WP 必须本 PLAN 修订 + Nature 单签
263
- - **回滚**:参 plan §3.3.4 失败回滚策略 4 档;H9 任一 WP broken 触发"重 broken"时 `git revert` 该 WP commit + 写 symptoms.md 新症状
264
-
265
- ## 9. RACE-DISCLOSURE — 本 PLAN 入库 race 真实时序
266
-
267
- > **登记于**: 2026-04-28 14:56 CST(首次披露),后续随本 commit 落入 git history
268
- > **失败模式**: parallel session git race(同日同一 PLAN-102 协调员 session 第三次复发;前两次见 memory `feedback_parallel_session_git_race_post_commit_verify` + `docs/decisions/tasks/PLAN-101-WP-08/RACE-DISCLOSURE.md`)
269
- > **代码影响**: 零(PLAN-H9-mailbox.md 240 行全部正确落 main)
270
- > **真相源影响**: commit message 错配,git log/blame 后续追溯需配合本节解读
271
-
272
- ### 9.1 时间线
273
-
274
- | 时刻 | session A(H9 起草,本 dev session) | session B(PLAN-102 协调员 session) |
275
- |---|---|---|
276
- | 14:54:50 | `git add docs/decisions/PLAN-H9-mailbox.md` staged | (在做 Gate 6 review 3 文件 + PLAN-101 WP-04/08 5 文件) |
277
- | 14:55:??(数十秒内) | (准备 commit) | `git add` Gate 6 + WP-08 共 8 文件 staged,叠在 A 的 1 文件之上 |
278
- | 14:56:08 | `git commit -- docs/decisions/PLAN-H9-mailbox.md` 试图执行 | 同时 `git commit` (no pathspec) 执行 → **B 的 commit 先到达,把全部 9 文件一锅端** |
279
- | 14:56:08 | A 收到 ref-lock mismatch | B 完成 commit `fcdb83c1`,message 后续被改为"docs(mixed)"承认 race |
280
-
281
- ### 9.2 实际 commit 内容(git show --stat fcdb83c1)
282
-
283
- ```
284
- commit fcdb83c1 (docs(mixed): Gate 6 task review 3 报告 + PLAN-101 WP-04/WP-08 平行 session hitchhike)
285
- docs/decisions/PLAN-H9-mailbox.md | 240 +++++++++++ ← H9(本 PLAN)
286
- docs/decisions/tasks/PLAN-101-WP-08/LOG.md | 135 +++++- ← PLAN-101 WP-08
287
- .../freeze-account/gate6-reviews/01-arch-review.md | 177 ++++++++ ← PLAN-102 Gate 6
288
- .../gate6-reviews/02-consistency-review.md | 290 +++++++++++++ ← PLAN-102 Gate 6
289
- .../gate6-reviews/03-security-redteam-review.md | 148 +++++++ ← PLAN-102 Gate 6
290
- scenes/业务场景示例-admin/demo-app/src/App.tsx | 2 + ← PLAN-101 WP-08
291
- .../demo-app/src/layouts/AdminLayout.tsx | 1 + ← PLAN-101 WP-08
292
- .../demo-app/src/lib/admin-client.ts | 91 ++++ ← PLAN-101 WP-08
293
- .../demo-app/src/pages/OnboardingScenesPage.tsx | 458 +++++++++++++ ← PLAN-101 WP-08
294
- 9 files changed, 1535 insertions(+), 7 deletions(-)
295
- ```
296
-
297
- 3 个独立 session(H9 / PLAN-101 WP-08 / PLAN-102 Gate 6)的工作混在同一 commit 下,message 是协调员 session 的"docs(mixed)"。
298
-
299
- ### 9.3 为什么 `git commit -- <pathspec>` 没救
300
-
301
- `git commit -- file` 只在执行该命令的 git 进程内部生效——它告诉**自己的 commit** 只包含这些 pathspec。但 race window 在 `git add` 完成到 `git commit` 启动之间:别的 session 此时调用 `git commit`(不带 pathspec)会把 index 里**所有 staged 的内容**一锅端,包括我已 staged 但还没来得及 commit 的 PLAN-H9-mailbox.md。
302
-
303
- memory `feedback_parallel_session_git_race_post_commit_verify` 已记录该升级路径。今天是同款问题第三次发生(前两次:上午 PLAN-102 Batch C+D `ca37b2c5/301a4780` amend pair;下午 PLAN-101 WP-08 `b6d53e48`)。
304
-
305
- ### 9.4 实际影响评估
306
-
307
- | 维度 | 影响 | 备注 |
308
- |---|---|---|
309
- | 代码完整性 | ✅ 0 | PLAN-H9-mailbox.md 240 行正确落 main,本 §9 追加后行数升至 ~290(仍 ≤500 行 H0.2 限) |
310
- | ADR-H0 §4 commit body 必填段 | ❌ 错配 | fcdb83c1 message 不含"自指自检"/"行数自报"段(被协调员 session 的 race-survivor message 覆盖) |
311
- | H0.1 施工隔离 | ⚠ 名义违反 | fcdb83c1 scope 跨 H9 + PLAN-101 + PLAN-102,但 race 不可控;该 commit message 已自报混合 scope 真相 |
312
- | git history 可追溯性 | ⚠ 降级 | git blame PLAN-H9-mailbox.md 会指向 fcdb83c1 而非独立 H9 commit;本 §9 + symptoms.md §4.4 形成双向引用兜底 |
313
- | 下游 H9 实施(WP-01..08) | ✅ 不影响 | 本 PLAN 已在 main HEAD 链上,WP-01 schema 真相源等可正常起跑 |
314
-
315
- ### 9.5 不做 reset / amend 的理由
316
-
317
- 1. **fcdb83c1 不是 H9 独有**——含 PLAN-101 + PLAN-102 共 8 文件别 session 真实工作,reset 会破坏别人的工作(与 PLAN-101 WP-08 RACE-DISCLOSURE §"不做 reset / amend 的理由" §1 同源)
318
- 2. **本 §9 + `.boll/log/harness-self-symptoms.md` §4.4** 已经形成双向 disclosure,git blame 落到 fcdb83c1 的人会被引导到本节
319
- 3. **commit message 真相源升级**:fcdb83c1 在 race 后已被改为"docs(mixed)"承认 race,git log 上读者第一眼就看到 race 标签,不再误以为 H9 没起草
320
-
321
- ### 9.6 ADR-H0 §4 必填段补落(在本 §9 入库 commit 中)
322
-
323
- 由于 fcdb83c1 message 错配,ADR-H0 §4 commit body 模板的"自指自检"+"行数自报"段无法在 fcdb83c1 中补齐(该 commit 不归 H9 owner 控制)。本 §9 入库 commit `01c2efca` 已显式包含(reviewer P1-6 修法:补落实证 hash,便于事后 audit 跑 `git log --format=%B 01c2efca` 复核):
324
-
325
- - **修问题症状词**:协调断裂 / 同 commit 冲突 / race
326
- - **自身在产物中字面命中(应为 0;元层定义除外)**:0(本 §9 + symptoms §4.4 出现"协调断裂""race""同 commit 冲突"均为元层声明实例:disclosure 描述 + 反例陈述 + 处置规则;自身行为命中 = 0)
327
- - **scope 路径列表(H0.1)**:`docs/decisions/PLAN-H9-mailbox.md`(追加 §9)+ `.boll/log/harness-self-symptoms.md`(追加 §4.4)—— 双文件 disclosure 互引用,scope-coupled 例外
328
- - **跨子计划冲突登记(H0.5)**:本 commit 与 fcdb83c1 race 冲突已在 §9.1 / §9.2 / §9.3 显式登记
329
- - **本 commit 新增/修改子计划文档单文件最大行数**:PLAN-H9-mailbox.md 324 行(≤500,行数自报段 ✓)
330
- - **ADR 总行数(如有)**:本 commit 不动 ADR
331
-
332
- ### 9.7 后续动作
333
-
334
- 1. **本节落入 PLAN-H9-mailbox.md**: 单独 commit,与 symptoms.md §4.4 同 commit 入库(H0.1 例外:disclosure 双向引用 scope-coupled)
335
- 2. **三段式 git stash 协议落地**: 本 commit 起 H 系列后续全部走 `git stash --keep-index → git add <path> → git commit -- <path> → git stash pop`,彻底关闭 race window(symptoms.md §4.4 处置 #3)
336
- 3. **ADR-H0 修订建议清单**:
337
- - "H 文件入库于非 H commit"边界 case 处置规则(symptoms.md §4.4 处置 #5)
338
- - 三段式 git stash 协议作为 H 系列 commit 治理硬规(symptoms.md §4.4 处置 #4)
339
- 4. **memory 升级**: `feedback_parallel_session_git_race_post_commit_verify` 应增加"2026-04-28 同日三次复发 + 三段式 stash 协议"标注(待 Nature 复盘时整理)
340
-
341
- ### 9.8 引用
342
-
343
- - 本 §9 入库 commit: `01c2efca` (docs(harness-H9 H0): RACE-DISCLOSURE — 双向引用 commit,pathspec lock + 原子 -o 协议关闭 race window)
344
- - 本次 race commit: `fcdb83c1` (docs(mixed) message, 含 H9 + PLAN-101 WP-08 + PLAN-102 Gate 6 共 9 文件)
345
- - 同日前次 race: `b6d53e48` (PLAN-101 WP-08 hitchhike, 见 `docs/decisions/tasks/PLAN-101-WP-08/RACE-DISCLOSURE.md`)
346
- - 同日首次 race: `ca37b2c5` / `301a4780` amend pair(PLAN-102 Batch C+D,见 memory `feedback_parallel_session_git_race_post_commit_verify`)
347
- - 防护教训: memory `feedback_parallel_session_git_race_post_commit_verify`, `feedback_local_worktrees_only`
348
- - 双向引用: `.boll/log/harness-self-symptoms.md` §4.4 PLAN-H9-mailbox.md 入库 race
349
- - reviewer 复核: feature-dev:code-reviewer (claude-opus-4-7, 2026-04-28) PASS_WITH_NOTES → 修 P0-1 + P1-1/3/4/5/6 + P2-3 → 本 commit 收口
350
-
351
- ## 10. reviewer 复核 followup(未修 P2 登记)
352
-
353
- reviewer feature-dev:code-reviewer (claude-opus-4-7, 2026-04-28) 第一轮 PASS_WITH_NOTES:1 P0 + 6 P1 + 3 P2,已修 P0-1 + 5 P1 + 1 P2(详见 §9.6 / §9.8 reviewer 复核段)。剩余 P2 不阻断本 PLAN 转 Accepted,登记此处供 H 系列收尾整理:
354
-
355
- | ID | 严重度 | 内容 | 处置 |
356
- |----|--------|------|------|
357
- | P2-1 | 讨论项 | ADR-H9 §6.1 P0 wake "300s 内重唤只生效一次"防雪崩 — 300s 是经验值还是有依据? | 不阻断;CC ScheduleWakeup 限制 60s-3600s 已在 §6.3 说明,300s ≈ 5min 是中位经验值;H9 演练(WP-08)有数据后再决定是否调整或补依据段 |
358
- | P2-2 | 讨论项 | PLAN-H9 §3 总估时 3.5d + 0.5d Gate = 4d 与 plan §3.3 估时 3d 多 0.5d;§0 line_budget 段未同步预算调整说明 | 不阻断;§3 段内已说明合理性(schema 真相源 + 全 lint 多出的 0.5d);plan 文件 §4.1 / §4.2 / §4.3 约定整体复盘时再 align,本 PLAN 不动 plan |
359
- | reviewer 二审 | 可选 | reviewer 第一轮已条件 PASS("修 P0 后建议 PASS"),P0 + 5 P1 + 1 P2 已修 | 不强制二审;如 H 系列收尾时发现修法误差,再 spawn |
360
-
361
- **signer** 状态升级:
362
- - ADR-H9 / PLAN-H9 起草: Nature(AI 助手协助)
363
- - ADR-H9 / PLAN-H9 reviewer 第一轮: feature-dev:code-reviewer (claude-opus-4-7, 2026-04-28) PASS_WITH_NOTES
364
- - ADR-H9 / PLAN-H9 起草人收口(修 P0+多 P1+1 P2): 本 commit
365
- - 转 Accepted 触发条件:WP-08 Nature 演练录像 + WP-01..07 全 PASS(保持 PLAN-H9 §0 / §8 既定生效条件)
366
-
367
- ## 11. 实施进度追踪(commit-anchor 表)
368
-
369
- | WP | 状态 | 落地 commit | 关键证据 |
370
- |----|------|-------------|----------|
371
- | WP-01 | ✓ DONE | 8bdc662e (2026-04-28) | 25 dirs + 22 .gitkeep + message-v1 JSON Schema 真相源 + 7 round-trip 用例 PASS |
372
- | WP-02 | ✓ DONE | 202dff63 (2026-04-28) | inbox-write-ledger.py 183 行 / lint 0 violation / 3 smoke PASS / p50=32ms |
373
- | WP-03 | ✓ DONE | 39cc402b (2026-04-28) | inbox-validate.py 211 行 / lint 0 / 4 smoke PASS(合规保留 / 缺必填 quarantine / P0+false quarantine / ack 缺 ack_for quarantine)/ in-scope p50=105ms(schema 校验开销)/ out p50=30ms |
374
- | WP-04 | ✓ DONE | 1eb1f764 (2026-04-28) | inbox-inject-on-start.py 212 行 / lint 0 / 3 smoke PASS(空 unread 沉默 / 1 unread → SessionStart additionalContext JSON 含 msg_id / in-flight 残留 mv 回 unread)/ 4096 字节降级提示 |
375
- | WP-05 | ✓ DONE | 37a15972 (2026-04-28) | inbox-poll.sh 78 行 / lint active-code 0 / 3 smoke PASS(empty=1200s / P1=1200s+age>0 / P0=300s)/ spec letter 修订:shell 不能调 CC 内部 ScheduleWakeup tool API,落地切分 shell 输出 KV state + agent 决定调度 |
376
- | WP-06 | ✓ DONE | 38262642 (2026-04-28) | inbox-ack.py 202 行 / lint INCLUDE_ALL exit=0 / AST banned form 0 / 4 smoke PASS(basic mv+ack+schema validate / idempotency 不双写 / invalid sender stderr / 二次 ack 不同 msg-id 正确生成)|
377
- | WP-07 | ✓ DONE | 8b442216 (2026-04-28) | .claude/settings.json PostToolUse +2 hook(inbox-write-ledger + inbox-validate)+ SessionStart +1 hook(inbox-inject-on-start);JSON valid + 4 lint exit=0 + poll.sh banned form 0;端到端 chain integration smoke:write-ledger 写 jsonl + validate 保留合规 + inject-on-start 输出正确 schema additionalContext |
378
- | WP-08 | ✓ DONE | 本 commit (2026-04-28) | Nature 真实演练 PASS(ADR-H9 附录 A.2):session B Write h9-20260428-163305-rehearsal → PostToolUse 链落 ledger(6 字段)→ session A `/exit` + 重启 → SessionStart hook 链触发 → `inbox-inject-on-start.py` emit additionalContext → session A 接 `<system-reminder>` 转述原文(CC integration 黑盒 Path A 实证)→ ack mv processed + window-h9/acks/main-20260428-163701-6f40f7.md。端到端 ≈ 4min(人工切换主导,远 ≪ 1200s 预算)。UX spec 澄清:additionalContext 是 AI 系统消息层(不是 banner),修订原 PLAN §4.4 截屏 banner 设想。Path B(ScheduleWakeup poll)留待 H 系列首次跨窗口实战 |