repo-harness 0.25.1 → 0.25.3

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 (237) hide show
  1. package/README.md +7 -6
  2. package/agents/fleet/orchestrator.md +3 -3
  3. package/assets/herdr/github-events/bot-event.d.mts +12 -0
  4. package/assets/herdr/{webhook-notify → github-events}/bot-event.mjs +1 -1
  5. package/assets/herdr/github-events/worker.mjs +2 -3
  6. package/assets/reference-configs/agentic-development-flow.md +2 -2
  7. package/assets/reference-configs/external-tooling.md +23 -30
  8. package/assets/reference-configs/global-working-rules.md +10 -9
  9. package/assets/reference-configs/harness-overview.md +2 -1
  10. package/assets/reference-configs/herdr-notify.md +99 -95
  11. package/assets/reference-configs/herdr-skill-context.md +38 -49
  12. package/assets/skill-commands/manifest.json +1 -1
  13. package/assets/skill-version.json +2 -2
  14. package/assets/skills/repo-harness-cross-review/SKILL.md +1 -1
  15. package/assets/skills/repo-harness-cross-review/references/generic-review.md +6 -5
  16. package/assets/skills/repo-harness-herdr-portal/SKILL.md +29 -22
  17. package/assets/skills/repo-harness-herdr-portal/references/messaging.md +14 -12
  18. package/assets/skills/repo-harness-herdr-portal/references/spawn.md +51 -68
  19. package/assets/skills/repo-harness-issue-flow/references/orchestrator.md +4 -4
  20. package/assets/skills/repo-harness-issue-flow/references/replan.md +2 -2
  21. package/assets/skills/repo-harness-test/references/authoring.md +2 -2
  22. package/assets/tool-catalog.v1.json +3 -3
  23. package/dist/hook-entry.js +2 -2
  24. package/dist/oar-review-host.js +31 -10
  25. package/dist/operator-ui/assets/{ArchitectureWorkspace-CY6MWVYK.js → ArchitectureWorkspace-rjlN-8R2.js} +2 -2
  26. package/dist/operator-ui/assets/{DocsPage-DnPRp8Bo.js → DocsPage-CRaTSP3D.js} +3 -3
  27. package/dist/operator-ui/assets/{abnfDiagram-VCTEODGH-FrczBTcM.js → abnfDiagram-VCTEODGH-BFhgL4_X.js} +1 -1
  28. package/dist/operator-ui/assets/architecture-7GRP2DOG-CAUav40i.js +1 -0
  29. package/dist/operator-ui/assets/{architectureDiagram-5GKGNRK7-B7YjW5cP.js → architectureDiagram-5GKGNRK7-1NoOp4es.js} +1 -1
  30. package/dist/operator-ui/assets/{blockDiagram-I7D4REHJ-VlgsJiAG.js → blockDiagram-I7D4REHJ-D-cnMqjK.js} +1 -1
  31. package/dist/operator-ui/assets/{c4Diagram-7LVT6UL2-D7skC_rA.js → c4Diagram-7LVT6UL2-DYm9qbaz.js} +1 -1
  32. package/dist/operator-ui/assets/channel-J9t0gGUF.js +1 -0
  33. package/dist/operator-ui/assets/{chunk-4HAMMTFA-CmMSCuUx.js → chunk-4HAMMTFA-BF1G1yi6.js} +1 -1
  34. package/dist/operator-ui/assets/{chunk-75Z2AOVW-C2Xq_mi9.js → chunk-75Z2AOVW-B1j-oisA.js} +1 -1
  35. package/dist/operator-ui/assets/{chunk-DU6HZSFF-c1GQqTNL.js → chunk-DU6HZSFF-DsnuxesV.js} +1 -1
  36. package/dist/operator-ui/assets/{chunk-F27PBJKO-mKGGg2lc.js → chunk-F27PBJKO-eb7-Ur1D.js} +1 -1
  37. package/dist/operator-ui/assets/{chunk-GMAD6QVW-BBvaMzz7.js → chunk-GMAD6QVW-C09ks1XE.js} +1 -1
  38. package/dist/operator-ui/assets/{chunk-GVQU2GXP-Ciqkfb7x.js → chunk-GVQU2GXP-BpZL9Gfs.js} +1 -1
  39. package/dist/operator-ui/assets/{chunk-IMKFNOWR-lPRrJwGG.js → chunk-IMKFNOWR-kyEnT-W3.js} +1 -1
  40. package/dist/operator-ui/assets/{chunk-L3NEJ4N5-ZCELMmfj.js → chunk-L3NEJ4N5-CEQdXQqr.js} +1 -1
  41. package/dist/operator-ui/assets/{chunk-OSK3NFVY-C2FSyex1.js → chunk-OSK3NFVY-B8eNuair.js} +1 -1
  42. package/dist/operator-ui/assets/{chunk-P2QGCYS3-BNCem-OE.js → chunk-P2QGCYS3-IC1iPfVx.js} +1 -1
  43. package/dist/operator-ui/assets/{chunk-POPQ4Y6H-DLkj1nb5.js → chunk-POPQ4Y6H-Bb7QgvZD.js} +1 -1
  44. package/dist/operator-ui/assets/{chunk-PWAF6VOD-BPXpJW86.js → chunk-PWAF6VOD-CwILx0_c.js} +1 -1
  45. package/dist/operator-ui/assets/{chunk-SHT3W25Y-C2LRo2LL.js → chunk-SHT3W25Y-hEd5Dpoe.js} +1 -1
  46. package/dist/operator-ui/assets/{chunk-SVP7TREG-DzBTsX5k.js → chunk-SVP7TREG-C-QbND6n.js} +1 -1
  47. package/dist/operator-ui/assets/{chunk-TICWLB2K-Bcy59Hos.js → chunk-TICWLB2K-DeSQeLFM.js} +1 -1
  48. package/dist/operator-ui/assets/classDiagram-ZZMXUADV-DXPXgEqY.js +1 -0
  49. package/dist/operator-ui/assets/classDiagram-v2-VYDZK3BY-DXPXgEqY.js +1 -0
  50. package/dist/operator-ui/assets/{cynefin-OW5HDTMX-ClBj8Ulr.js → cynefin-OW5HDTMX-PhoRwNSU.js} +1 -1
  51. package/dist/operator-ui/assets/{cynefinDiagram-5FMLGOSQ-Ds7Mibm4.js → cynefinDiagram-5FMLGOSQ-7OXilZZ1.js} +1 -1
  52. package/dist/operator-ui/assets/{dagre-GXQ25YYZ-BQdr4QZm.js → dagre-GXQ25YYZ-Dk48DZQU.js} +1 -1
  53. package/dist/operator-ui/assets/{diagram-S7CK7UJ4-D2lmiWeD.js → diagram-S7CK7UJ4-CtyC5kUo.js} +1 -1
  54. package/dist/operator-ui/assets/{diagram-UQ7AKVKN-O3oH4sVn.js → diagram-UQ7AKVKN-Be56sX3m.js} +1 -1
  55. package/dist/operator-ui/assets/{diagram-VSXAHHWV-ChWUSpJM.js → diagram-VSXAHHWV-BhNRjKPt.js} +1 -1
  56. package/dist/operator-ui/assets/{diagram-VX7I27RA-Ch69HZTd.js → diagram-VX7I27RA-CUr_B8fH.js} +1 -1
  57. package/dist/operator-ui/assets/{diagram-Z3DM3KII-BrawDVH6.js → diagram-Z3DM3KII-CdZCWs9K.js} +1 -1
  58. package/dist/operator-ui/assets/{ebnfDiagram-PWID7BFC-DmJK-kmd.js → ebnfDiagram-PWID7BFC-I8e2x1dF.js} +1 -1
  59. package/dist/operator-ui/assets/{erDiagram-RLTQ6QDP-Q0HnvPDo.js → erDiagram-RLTQ6QDP-SMs1WZl6.js} +1 -1
  60. package/dist/operator-ui/assets/eventmodeling-NTZA5JFV-DqJVxgEO.js +1 -0
  61. package/dist/operator-ui/assets/flowDiagram-HODETNUW-NvyYrdhg.js +1 -0
  62. package/dist/operator-ui/assets/{ganttDiagram-EL5Y4UJY-qvwdPHBY.js → ganttDiagram-EL5Y4UJY-BV0qL4k_.js} +1 -1
  63. package/dist/operator-ui/assets/{gitGraph-4MIJSDKK-Dx7BjZZV.js → gitGraph-4MIJSDKK-BloiXYXP.js} +1 -1
  64. package/dist/operator-ui/assets/{gitGraphDiagram-WWUBYQGX-VMYWxpyb.js → gitGraphDiagram-WWUBYQGX-B4D8jXky.js} +1 -1
  65. package/dist/operator-ui/assets/index-CAtU8UhN.js +27 -0
  66. package/dist/operator-ui/assets/index-DcWFPCXl.css +2 -0
  67. package/dist/operator-ui/assets/{info-A6RAGUB7-CWmAbV2v.js → info-A6RAGUB7-UOZqF0a7.js} +1 -1
  68. package/dist/operator-ui/assets/{infoDiagram-27XIBGKW-CbdlBmQQ.js → infoDiagram-27XIBGKW-C6X0pAO1.js} +1 -1
  69. package/dist/operator-ui/assets/{ishikawaDiagram-5VMMS53U-DCFApDt3.js → ishikawaDiagram-5VMMS53U-Cp3KYNQj.js} +1 -1
  70. package/dist/operator-ui/assets/{journeyDiagram-3NMN7TZE-JU9Lmrb8.js → journeyDiagram-3NMN7TZE-DCjmPwDY.js} +1 -1
  71. package/dist/operator-ui/assets/{kanban-definition-UXKFOSKX-BaFyfuHa.js → kanban-definition-UXKFOSKX-f2p6h_X8.js} +1 -1
  72. package/dist/operator-ui/assets/{line-B0IEL5-x.js → line-DGsxynmm.js} +1 -1
  73. package/dist/operator-ui/assets/{mermaid-parser.core-BY831mH1.js → mermaid-parser.core-CFVtSnVW.js} +3 -3
  74. package/dist/operator-ui/assets/{mermaid.core-ButCc1lu.js → mermaid.core-DiouEf_0.js} +4 -4
  75. package/dist/operator-ui/assets/{mindmap-definition-YA3MSWOX-BZ9lAvGW.js → mindmap-definition-YA3MSWOX-BNYBhd2k.js} +1 -1
  76. package/dist/operator-ui/assets/{packet-AYTQ26CC-B5-Y1eju.js → packet-AYTQ26CC-BxJO6-w_.js} +1 -1
  77. package/dist/operator-ui/assets/{pegDiagram-XKGWAZYB-Ahet4paP.js → pegDiagram-XKGWAZYB-NFxyKcEL.js} +1 -1
  78. package/dist/operator-ui/assets/{pie-WAS4IAKB-CMEA1YN5.js → pie-WAS4IAKB-DRG3g5IX.js} +1 -1
  79. package/dist/operator-ui/assets/{pieDiagram-E7YTZNPT-BKoLuqEb.js → pieDiagram-E7YTZNPT-BM-X8pCs.js} +1 -1
  80. package/dist/operator-ui/assets/{quadrantDiagram-AXDQQJYC-Ba5lcmOU.js → quadrantDiagram-AXDQQJYC-CfxNqnID.js} +1 -1
  81. package/dist/operator-ui/assets/{radar-RG4KPBEZ-DRKsFqgB.js → radar-RG4KPBEZ-CWp-KDl_.js} +1 -1
  82. package/dist/operator-ui/assets/{railroad-74A4TZTK-UnJQj6WT.js → railroad-74A4TZTK-W7pjUvJr.js} +1 -1
  83. package/dist/operator-ui/assets/railroad-abnf-HS5TGJTU-7fl6y-zk.js +1 -0
  84. package/dist/operator-ui/assets/railroad-ebnf-LZEXJU2U-nFqux8Y2.js +1 -0
  85. package/dist/operator-ui/assets/railroad-peg-WCYAUIDC-DfJI7HIW.js +1 -0
  86. package/dist/operator-ui/assets/{railroadDiagram-O6MQD6OU-Ii3HCSET.js → railroadDiagram-O6MQD6OU-k_k-e0OU.js} +1 -1
  87. package/dist/operator-ui/assets/{requirementDiagram-BXWQKSXE-GiUPpmpF.js → requirementDiagram-BXWQKSXE-BFUODn2H.js} +1 -1
  88. package/dist/operator-ui/assets/{sankeyDiagram-P5KCCOFB-CUfXBwpy.js → sankeyDiagram-P5KCCOFB-BVCdC525.js} +1 -1
  89. package/dist/operator-ui/assets/{sequenceDiagram-WJ2MYXX4-T3ZLlCgn.js → sequenceDiagram-WJ2MYXX4-CV9FGbzU.js} +1 -1
  90. package/dist/operator-ui/assets/{stateDiagram-D77RDMKH-D2AphR6j.js → stateDiagram-D77RDMKH-BCUJLyp9.js} +1 -1
  91. package/dist/operator-ui/assets/stateDiagram-v2-MP3YSRHH-BrcHaQr3.js +1 -0
  92. package/dist/operator-ui/assets/{swimlanes-42K2YHIH-DNQbbl88.js → swimlanes-42K2YHIH-BhJmqiih.js} +1 -1
  93. package/dist/operator-ui/assets/swimlanesDiagram-VR7AAH4N-BBUuY_m3.js +8 -0
  94. package/dist/operator-ui/assets/{timeline-definition-24CTP7MA-Co0q_tCB.js → timeline-definition-24CTP7MA-DncmXLjW.js} +1 -1
  95. package/dist/operator-ui/assets/{treeView-Q6P3EWNA-B3AJbB6p.js → treeView-Q6P3EWNA-CZN7aAl9.js} +1 -1
  96. package/dist/operator-ui/assets/{treemap-WGGIJYW6-_H9SWbfT.js → treemap-WGGIJYW6-DEBJHML0.js} +1 -1
  97. package/dist/operator-ui/assets/{vennDiagram-4TSXK5OY-CGfjaO6_.js → vennDiagram-4TSXK5OY-BUU9uzvr.js} +1 -1
  98. package/dist/operator-ui/assets/{wardley-WFR3VGLG-NUDbyuOy.js → wardley-WFR3VGLG-DNxI3y-4.js} +1 -1
  99. package/dist/operator-ui/assets/{wardleyDiagram-VM6X3IG4-COuGUrRm.js → wardleyDiagram-VM6X3IG4-Cb3t-YF7.js} +1 -1
  100. package/dist/operator-ui/assets/{xychartDiagram-S5SC5T6Z-DHG9QX-U.js → xychartDiagram-S5SC5T6Z-BzBOBXOR.js} +1 -1
  101. package/dist/operator-ui/index.html +2 -2
  102. package/package.json +1 -1
  103. package/scripts/change-assessment.ts +16 -39
  104. package/scripts/check-agent-tooling.sh +20 -24
  105. package/scripts/contract-worktree.sh +3 -3
  106. package/scripts/lib/path-values.ts +3 -1
  107. package/scripts/lib/project-init-lib.sh +8 -11
  108. package/scripts/report-ci.ts +3 -1
  109. package/scripts/select-ci-coverage.ts +1 -1
  110. package/scripts/sync-helper-sources.ts +0 -9
  111. package/src/cli/commands/board.ts +60 -0
  112. package/src/cli/commands/doctor.ts +15 -8
  113. package/src/cli/commands/events.ts +1 -5
  114. package/src/cli/commands/global-runtime.ts +28 -5
  115. package/src/cli/commands/herdr-skill-render.mjs +5 -7
  116. package/src/cli/commands/herdr-skill.ts +8 -6
  117. package/src/cli/commands/herdr.ts +102 -142
  118. package/src/cli/commands/publication.ts +15 -0
  119. package/src/cli/commands/review.ts +6 -4
  120. package/src/cli/commands/seats.ts +128 -0
  121. package/src/cli/index.ts +31 -5
  122. package/src/cli/installer/install-profile.ts +15 -5
  123. package/src/cli/installer/uninstall.ts +27 -14
  124. package/src/cli/installer/waza-rules.ts +16 -6
  125. package/src/cli/mcp/paths.ts +27 -11
  126. package/src/cli/mcp/policy.ts +1 -3
  127. package/src/cli/mcp/tools.ts +18 -12
  128. package/src/core/board/attention.ts +317 -0
  129. package/src/core/board/board.ts +310 -0
  130. package/src/core/board/plan-block.ts +110 -0
  131. package/src/core/board/source.ts +331 -0
  132. package/src/core/decision/notify-secret-keys.ts +8 -0
  133. package/src/core/operator/admitted-task-context.ts +2 -2
  134. package/src/core/operator/board-read.ts +16 -0
  135. package/src/core/operator/bot-access.ts +50 -106
  136. package/src/core/operator/execution-state.ts +38 -30
  137. package/src/core/operator/herdr-pin.ts +44 -10
  138. package/src/core/operator/notify-status.ts +61 -113
  139. package/src/core/operator/pane-prefix.ts +2 -0
  140. package/src/core/operator/runtime-status.ts +25 -25
  141. package/src/core/operator/seat-launch.ts +277 -0
  142. package/src/core/operator/seats-settings.ts +213 -0
  143. package/src/core/operator/slack-review.ts +278 -0
  144. package/src/core/publication/merge-readiness.ts +2 -0
  145. package/src/core/review/check-records.ts +130 -0
  146. package/src/core/review/runner-port.ts +1 -2
  147. package/src/core/security/secret-patterns.ts +1 -0
  148. package/src/core/sessions/task-sessions.ts +2 -2
  149. package/src/effects/adoption/standard-plan.ts +8 -11
  150. package/src/effects/board/collect.ts +181 -0
  151. package/src/effects/host-skill-roots.ts +21 -1
  152. package/src/effects/operator/board-read.ts +124 -0
  153. package/src/effects/operator/bot-access.ts +31 -45
  154. package/src/effects/operator/claude-agent-types.ts +123 -0
  155. package/src/effects/operator/cleanup-file-access.ts +2 -1
  156. package/src/effects/operator/execution-collector.ts +13 -6
  157. package/src/effects/operator/execution-state-worker.ts +25 -6
  158. package/src/effects/operator/execution-state.ts +19 -9
  159. package/src/effects/operator/herdr-runtime-transport.ts +108 -70
  160. package/src/effects/operator/notify-collector.ts +3 -3
  161. package/src/effects/operator/notify-status.ts +28 -98
  162. package/src/effects/operator/runtime-capture-pty.ts +8 -4
  163. package/src/effects/operator/runtime-capture.ts +7 -4
  164. package/src/effects/operator/runtime-service.ts +17 -14
  165. package/src/effects/operator/runtime-source.ts +19 -17
  166. package/src/effects/operator/runtime-status.ts +14 -11
  167. package/src/effects/operator/seats-configuration.ts +146 -0
  168. package/src/effects/operator/seats-settings-route.ts +66 -0
  169. package/src/effects/operator/server.ts +134 -8
  170. package/src/effects/operator/slack-review-collector.ts +254 -0
  171. package/src/effects/publication/batch-build.ts +478 -0
  172. package/src/effects/publication/merge-executor.ts +3 -5
  173. package/src/effects/repo-registry.ts +22 -1
  174. package/src/effects/review/acceptance-receipt.ts +11 -9
  175. package/src/effects/review/change-assessment.ts +34 -4
  176. package/src/effects/review/generic-review.ts +6 -6
  177. package/src/effects/review-runner/task-oar-host.ts +20 -4
  178. package/src/effects/review-runner/task-review-runner.ts +11 -12
  179. package/src/effects/terminal/herdr-core.ts +503 -0
  180. package/src/effects/terminal/herdr-notify-install.ts +70 -49
  181. package/src/effects/terminal/herdr.ts +2 -1
  182. package/src/effects/terminal/notify-relay.ts +263 -0
  183. package/src/effects/terminal/task-session-admission.ts +1 -1
  184. package/src/effects/terminal/task-session-record.ts +39 -26
  185. package/src/effects/terminal/task-session.ts +178 -378
  186. package/src/effects/terminal/task-worktree-runtime.ts +6 -4
  187. package/src/operator-web/App.tsx +73 -39
  188. package/src/operator-web/BoardPage.tsx +312 -0
  189. package/src/operator-web/BotsPage.tsx +130 -80
  190. package/src/operator-web/Home.tsx +4 -6
  191. package/src/operator-web/NotifyStatus.tsx +1 -4
  192. package/src/operator-web/RuntimeBadges.tsx +3 -0
  193. package/src/operator-web/SeatsPage.tsx +272 -0
  194. package/src/operator-web/SettingsPage.tsx +37 -10
  195. package/src/operator-web/TaskDrawer.tsx +267 -0
  196. package/src/operator-web/WorktreesPage.tsx +1 -2
  197. package/src/operator-web/board-view.ts +139 -0
  198. package/src/operator-web/bots.ts +45 -9
  199. package/src/operator-web/dev-activity.ts +2 -57
  200. package/src/operator-web/fixtures/architecture-map.json +5929 -8389
  201. package/src/operator-web/fixtures/board-1474.json +490 -0
  202. package/src/operator-web/fixtures/bots.ts +61 -35
  203. package/src/operator-web/fixtures/dev-activity.ts +6 -6
  204. package/src/operator-web/fixtures/index.ts +25 -7
  205. package/src/operator-web/fixtures/settings.ts +66 -1
  206. package/src/operator-web/fixtures/setup.ts +2 -2
  207. package/src/operator-web/i18n.ts +484 -226
  208. package/src/operator-web/labels.ts +0 -13
  209. package/src/operator-web/seats.ts +89 -0
  210. package/src/operator-web/settings.ts +92 -55
  211. package/src/operator-web/ui.tsx +7 -2
  212. package/src/operator-web/workspace-location.ts +38 -10
  213. package/src/operator-web/worktrees.ts +0 -10
  214. package/assets/herdr/webhook-notify/herdr-plugin.toml +0 -10
  215. package/assets/herdr/webhook-notify/notify.mjs +0 -373
  216. package/assets/herdr/webhook-notify/pane-status.mjs +0 -74
  217. package/assets/herdr/webhook-notify/worktree-location.mjs +0 -15
  218. package/dist/operator-ui/assets/architecture-7GRP2DOG-DJmhcRNc.js +0 -1
  219. package/dist/operator-ui/assets/channel-CH26DhuI.js +0 -1
  220. package/dist/operator-ui/assets/classDiagram-ZZMXUADV-CmP13vv6.js +0 -1
  221. package/dist/operator-ui/assets/classDiagram-v2-VYDZK3BY-CmP13vv6.js +0 -1
  222. package/dist/operator-ui/assets/eventmodeling-NTZA5JFV-BCV_9PCS.js +0 -1
  223. package/dist/operator-ui/assets/flowDiagram-HODETNUW-UuLvXIz-.js +0 -1
  224. package/dist/operator-ui/assets/index-BRqR1RMk.js +0 -25
  225. package/dist/operator-ui/assets/index-DDZqieYX.css +0 -2
  226. package/dist/operator-ui/assets/railroad-abnf-HS5TGJTU-BfLADly0.js +0 -1
  227. package/dist/operator-ui/assets/railroad-ebnf-LZEXJU2U-Dctjf-fQ.js +0 -1
  228. package/dist/operator-ui/assets/railroad-peg-WCYAUIDC-DC2Nq5l8.js +0 -1
  229. package/dist/operator-ui/assets/stateDiagram-v2-MP3YSRHH-DoOPJXWN.js +0 -1
  230. package/dist/operator-ui/assets/swimlanesDiagram-VR7AAH4N-FdvvbV9Z.js +0 -8
  231. package/src/core/decision/pane-status.d.mts +0 -9
  232. package/src/core/decision/pane-status.mjs +0 -74
  233. package/src/effects/setup/pi-herdr-integration.ts +0 -58
  234. package/src/effects/terminal/herdr-decision.ts +0 -98
  235. package/src/effects/terminal/herdr-observation.ts +0 -127
  236. package/src/operator-web/Board.tsx +0 -420
  237. package/src/operator-web/ItemDrawer.tsx +0 -208
package/README.md CHANGED
@@ -43,7 +43,7 @@ files let Claude and Codex resume work across sessions.
43
43
 
44
44
  ### 1. Install the CLI
45
45
 
46
- Prerequisites: a Git working tree, `bun`, and usable `herdr` >=0.9.5 for host readiness; macOS/Linux also require `bash`,
46
+ Prerequisites: a Git working tree, `bun`, and `hc` (herdr-core) >= `external_tooling.herdr_core.min_version` for host readiness; macOS/Linux also require `bash`,
47
47
  while Windows requires Git for Windows (including its Bash and `usr/bin`
48
48
  tools). `jq` is optional. No Node.js required — the installer uses Bun >=
49
49
  1.4.0 as the runtime, installing or upgrading Bun first when needed.
@@ -67,9 +67,10 @@ repo-harness install
67
67
  npx -y repo-harness@latest install # npx fallback; the CLI still runs on Bun
68
68
  ```
69
69
 
70
- Install herdr from [herdr.dev](https://herdr.dev/) and verify `herdr --version`.
70
+ Install `hc` through Herdr.app or a herdr-core release. Verify that `hc --version`
71
+ reports at least `.ai/harness/policy.json#external_tooling.herdr_core.min_version`.
71
72
  Persistent review hosting requires POSIX process groups; on Windows use WSL.
72
- Missing or unusable herdr blocks host readiness. Before upgrading from tmux,
73
+ Missing, unusable or older hc blocks host readiness. Before upgrading from tmux,
73
74
  drain existing reviewers using the previous version and explicitly rebind terminal
74
75
  endpoints. See [runtime cutover](https://github.com/Ancienttwo/repo-harness/blob/archive/docs-researches-20261004/docs/researches/20260909-herdr-runtime-cutover.md).
75
76
 
@@ -593,7 +594,7 @@ dependencies.
593
594
  | [Hylarucoder](https://x.com/hylarucoder) / Geju | P1/P2/P3 due-diligence method and Geju practice that shaped the planning, tracing, and decision-rationale discipline in this workflow | Methodology contribution and acknowledgement; not a bundled dependency |
594
595
  | Waza by [TW93](https://x.com/HiTw93), including `think`, `hunt`, `check`, and `health` | Daily planning, bug hunts, verification, health checks, and Codex-first skill sync | Installed through the skills CLI into host skill roots |
595
596
  | `mermaid` | Authoring and readability review for Mermaid architecture and system-flow source | Runtime-referenced review skill, not vendored into generated repos and never an HTML artifact generator |
596
- | [herdr](https://herdr.dev/) | Required peer-terminal runtime: notification dispatch, peer collaboration, and hosting the persistent acceptance reviewer | Externally installed binary, checksum-pinned in `.ai/harness/policy.json`; replaces the retired tmux runtime |
597
+ | [herdr](https://herdr.dev/) (`hc`, herdr-core) | Required peer-terminal runtime: notification dispatch, peer collaboration, and hosting the persistent acceptance reviewer | Externally installed `hc` binary, pinned in `.ai/harness/policy.json#external_tooling.herdr_core` (`min_version` floor and checksum-verified CI release asset); replaces the retired tmux runtime |
597
598
  | [`reverse-skill-router`](https://github.com/zhaoxuya520/reverse-skill) | Routes reverse-engineering and security tasks to specialist playbooks | Recommended explicit-only Skill (`--with-reverse-skill`); not profile-selected because upstream's target-mention authorization assumption requires independent scope review |
598
599
  | CodeGraph (`@colbymchenry/codegraph`) | Symbol-aware navigation, impact tracing, and readiness checks for this self-host repo | Dev dependency in this repo; generated repos stay global-MCP-first unless policy opts in |
599
600
  | OpenAI Codex | Primary execution agent for repo-local implementation, verification, and GitHub contributor attribution when a commit materially includes Codex-authored work | External agent runtime; attribution is an explicit commit trailer, not hidden hook automation |
@@ -612,8 +613,8 @@ repo-harness commit scripts or hooks unless that repo adopts the same policy.
612
613
 
613
614
  ## Current Release
614
615
 
615
- - npm package: `repo-harness@0.25.1`
616
- - Generated workflow stamp: `repo-harness@0.25.1+template@0.25.1`
616
+ - npm package: `repo-harness@0.25.3`
617
+ - Generated workflow stamp: `repo-harness@0.25.3+template@0.25.3`
617
618
  - GitHub repository: `Ancienttwo/repo-harness`
618
619
  - Release notes and history: [`docs/CHANGELOG.md`](docs/CHANGELOG.md)
619
620
 
@@ -1,9 +1,9 @@
1
1
  ---
2
2
  name: orchestrator
3
- description: Dispatch-only issue-flow coordinator. Suggested model: Opus at xhigh effort. The Claude entry runs with `claude --agent orchestrator`; other hosts load the issue-flow skill's orchestrator mode. Reads archimap and capability docs, splits issues, dispatches work, and follows PRs and CI. Never edits product code, reviews its own dispatched PRs, or dispatches subagents.
3
+ description: Dispatch-only issue-flow coordinator. Suggested model: Opus at high effort. The Claude entry runs with `claude --agent orchestrator`; other hosts load the issue-flow skill's orchestrator mode. Reads archimap and capability docs, splits issues, dispatches work, and follows PRs and CI. Never edits product code, reviews its own dispatched PRs, or dispatches subagents.
4
4
  tools: ["Read", "Grep", "Glob", "Bash", "TaskCreate", "TaskUpdate", "TaskList", "TaskGet"]
5
5
  model: opus
6
- effort: xhigh
6
+ effort: high
7
7
  ---
8
8
 
9
9
  You are the orchestrator. You run as a long-lived top-level session, not as a subagent. Any host may run this seat. The model and effort in this file are a suggestion for the Claude entry.
@@ -16,7 +16,7 @@ You may:
16
16
  - Read code and docs with Read, Grep and Glob.
17
17
  - Run read-only checks with Bash. Examples: `git status`, `git log`, `gh issue view`, `gh pr view`, `gh pr checks`.
18
18
  - Create issues and comments with `gh issue create --body-file -` and `gh issue comment --body-file -`. Send the body on standard input. Do not write the body to a file.
19
- - Dispatch work with `herdr agent prompt`. Each dispatch names the issue, the file scope, the verification command and the forbidden areas.
19
+ - Dispatch work with the `hc` commands of the Herdr Dispatch runbook (`docs/reference-configs/herdr-notify.md`): `hc send <t> <comment URL>` to message a worker, `hc read <t>` and `hc wait <t>` to follow it. Each dispatch names the issue, the file scope, the verification command and the forbidden areas.
20
20
  - Follow open PRs and CI. Report each result to the issue.
21
21
  - Keep worker notices in a triage queue with TaskCreate, TaskUpdate, TaskList and TaskGet. Follow `references/orchestrator.md` §8.1 of `repo-harness-issue-flow`: answer the owner first, then take one queue item at a time by priority.
22
22
 
@@ -0,0 +1,12 @@
1
+ export declare const BOT_EVENT_PROTOCOL: 'repo-harness.bot-event/v1';
2
+ export declare const NAME_PATTERN: RegExp;
3
+ export interface BotEvent {
4
+ readonly protocol: 'repo-harness.bot-event/v1';
5
+ readonly source: 'herdr' | 'github';
6
+ readonly repository: string | null;
7
+ readonly kind: string;
8
+ readonly ts: string;
9
+ readonly data: Readonly<Record<string, unknown>>;
10
+ }
11
+ export declare function assertBotEvent(value: unknown): BotEvent;
12
+ export declare function botEvent(input: Omit<BotEvent, 'protocol'>): BotEvent;
@@ -1,4 +1,4 @@
1
- // The one bot event envelope. Herdr notify and the GitHub event Worker both send it, so it
1
+ // The one bot event envelope. The notify relay and the GitHub event Worker both send it, so it
2
2
  // stays plain ESM with no dependency and no Node-only API.
3
3
  export const BOT_EVENT_PROTOCOL = 'repo-harness.bot-event/v1';
4
4
  export const NAME_PATTERN = /^[\w.-]{1,128}$/;
@@ -1,8 +1,7 @@
1
1
  // GitHub App webhook receiver. It filters GitHub events in code and sends a short bot event
2
2
  // to the Bot routine webhook. It never calls a GitHub API and makes no decision.
3
- // `repo-harness events install` stages this directory and ../webhook-notify/bot-event.mjs in the same
4
- // layout, and wrangler bundles them.
5
- import { botEvent } from '../webhook-notify/bot-event.mjs';
3
+ // `repo-harness events install` stages this directory, and wrangler bundles it.
4
+ import { botEvent } from './bot-event.mjs';
6
5
  import { classify } from './filter.mjs';
7
6
 
8
7
  const DEBOUNCE_SECONDS = 60;
@@ -104,8 +104,8 @@ breakdown, dispatch, follow-up and evidence-based reports. Coding agents own
104
104
  source edits, tests and repairs. Follow the shared PM boundary in the
105
105
  `repo-harness` Skill for the permitted tool surface and reporting duties.
106
106
  Keep direct development sessions and explicitly assigned coding workers outside
107
- that PM restriction. OAR owns coding-agent execution. Herdr owns panes and
108
- visibility. A new Bot host adapts to that path; it does not add a new coding
107
+ that PM restriction. OAR owns coding-agent execution. herdr-core (`hc`) owns
108
+ terminals, and Herdr.app owns panes and visibility. A new Bot host adapts to that path; it does not add a new coding
109
109
  runtime or task authority.
110
110
 
111
111
  The `orchestrator` fleet role is the long-lived coordinator and integrator seat
@@ -374,8 +374,7 @@ boundary explicit:
374
374
 
375
375
  | Capability | Owner | Required for |
376
376
  |---|---|---|
377
- | `herdr` | user install (herdr.dev) | required at the version pinned in `.ai/harness/policy.json#external_tooling.herdr`; peer terminals and persistent task reviewer hosting |
378
- | `herdr_core` (`hc`) | user install (Herdr.app or a herdr-core release) | optional, at least the version pinned in `.ai/harness/policy.json#external_tooling.herdr_core`; persistent terminals and agent messaging; no repo-harness automation uses it yet |
377
+ | `herdr_core` (`hc`) | user install (Herdr.app or a herdr-core release) | required, at least the version pinned in `.ai/harness/policy.json#external_tooling.herdr_core`; persistent agent terminals, task sessions, review hosting and the notify relay |
379
378
  | `bun` | repo-harness | repo-harness-owned global installs, local dependency install, tests, and runtime execution |
380
379
  | `bash` | repo-harness | helper scripts, migration, setup checks, and contract verification wrappers; Git-for-Windows Bash is the Windows platform contract |
381
380
  | `npm` | npm registry | registry readbacks, publish gates, and opt-in update checks; not repo-harness-owned global install repair |
@@ -383,45 +382,39 @@ boundary explicit:
383
382
  | `rsync` | platform filesystem | installed-copy runtime mirroring |
384
383
  | `symlink` | platform filesystem | link-mode aliases; copy mode is the fallback |
385
384
 
386
- `.ai/harness/policy.json#external_tooling.herdr` is the single herdr pin: it owns
387
- the `min_version` floor and the checksum-verified `release_assets` entry that CI
388
- installs. Install herdr through its official installer or platform package manager
389
- and verify `herdr --version` reports at least that pinned `min_version`.
390
- `check-agent-tooling.sh --strict-readiness` reads the same key and fails if herdr is
391
- missing, unusable, or older than the pin; `setup check` projects `runtime.herdr`. Repo-harness does not install it or edit user Herdr config.
385
+ `.ai/harness/policy.json#external_tooling.herdr_core` is the single herdr pin: it
386
+ owns the `min_version` floor and the checksum-verified `release_assets` entry that
387
+ CI installs. Install hc through Herdr.app or a herdr-core release and verify
388
+ `hc --version` reports at least that pinned `min_version`.
389
+ `check-agent-tooling.sh --strict-readiness` reads the same key and fails if hc is
390
+ missing, unusable, or older than the pin. A missing or malformed pin is a
391
+ `configuration-error`. `setup check` projects `runtime.herdr_core`. Repo-harness
392
+ does not install hc or edit user Herdr config. Herdr.app is not a readiness
393
+ requirement: it has no Intel macOS build.
392
394
  The root `repo-harness` skill requires the `herdr` skill on Codex and Claude.
393
- `repo-harness install` and `repo-harness update` combine the CLI reference from
394
- `herdr --skill` with the caller-context policy in
395
- `assets/reference-configs/herdr-skill-context.md`. The shared renderer replaces
396
- the binary's introductory environment gate and rejects an unknown section layout.
397
- Both hosts receive the same generated skill. When Codex is selected, an existing
395
+ `repo-harness install` and `repo-harness update` put the caller-context policy in
396
+ `assets/reference-configs/herdr-skill-context.md` before the hc manual from
397
+ `hc --skill`. The shared renderer keeps the manual verbatim and rejects output
398
+ that is not the hc manual. Both hosts receive the same generated skill. When Codex is selected, an existing
398
399
  shared copy at `~/.agents/skills/herdr` is also updated and checked because Codex
399
400
  can discover it. Claude-only operations leave that shared copy unchanged.
400
401
  Install refuses to replace a
401
402
  user-edited or unowned copy. Strict readiness compares against the same renderer.
402
403
  Missing tool environment variables do not prove that the user is outside Herdr.
403
- Read-only discovery lists running sessions and panes by the task's exact path.
404
- Reuse a suitable task reviewer or create a new pane in the matched workspace.
404
+ Read-only discovery lists live hc terminals (`hc ls --json`) by the task's exact path.
405
+ Reuse a suitable task reviewer or start a new terminal at the task path.
405
406
  Path matching selects a location; it does not transfer another agent's task.
406
- Use explicit session and pane IDs for control after discovery.
407
+ Use explicit hc terminal addresses for control after discovery.
407
408
  The persistent reviewer still requires POSIX process groups: use macOS/Linux or
408
409
  WSL. Native Windows review lifecycle support is not implied by Herdr support.
409
- Admitted task sessions start only in a Herdr pane, so they and their Task Inbox and operator diff consumers are POSIX-only; on Windows, session start fails closed with `herdr_endpoint_platform_unsupported`.
410
+ Admitted task sessions start only in an hc terminal, so they and their Task Inbox and operator diff consumers are POSIX-only.
410
411
  Drain old tmux reviewers with the previous repo-harness version before upgrading.
411
412
  No runtime or collaboration path automatically falls back to tmux.
412
413
 
413
- herdr-core (`hc`) is a separate product with its own pin. It has persistent
414
- terminals and a JSON-RPC API, and it has built-in remote host access
415
- (`hc machine`, `hc run --on <machine>`). It has no sessions, panes,
416
- workspaces or plugins. `check-agent-tooling.sh` reports it as the optional
417
- `runtime_capabilities.herdr_core`; `setup check` projects `runtime.herdr_core`.
418
- `hc --version` must report at least the `min_version` at
419
- `.ai/harness/policy.json#external_tooling.herdr_core`. CI does not install hc.
420
- The two checks are independent: `hc` never satisfies `runtime.herdr`, the
421
- `herdr` skill or strict readiness. The transport, task sessions,
422
- `review --launch herdr`, operator collectors, the `herdr notify` plugin, the
423
- `herdr` skill, doctor and CI stay classic-only. No runtime falls back to the
424
- other.
414
+ herdr-core (`hc`) has persistent terminals and a JSON-RPC API, and it has
415
+ built-in remote host access (`hc machine`, `hc run --on <machine>`). It has no
416
+ sessions, panes, workspaces or plugins. Doctor has no Herdr Pi integration
417
+ check: Pi reports its terminal status to hc natively.
425
418
  The native protected-helper tool contract below remains a separate boundary.
426
419
 
427
420
  The policy is Bun-first, not Bun-only. Repo-harness-owned install/repair commands
@@ -719,7 +712,7 @@ network fetch. The managed list is `explorer`, `deep-reasoner`, `fast-worker`,
719
712
  `~/.codex/agents/orchestrator.toml`, and the checker does not expect one.
720
713
  Start it as a long-lived session with `claude --agent orchestrator`. It is
721
714
  the coordinator and integrator seat of `repo-harness-issue-flow`
722
- (`opus/xhigh`, read-only tools plus `gh` and `herdr agent prompt`). It has no
715
+ (`opus/xhigh`, read-only tools plus `gh` and `hc send`). It has no
723
716
  Codex target because a Codex fleet TOML runs in a read-only sandbox without
724
717
  network access, which cannot run `gh`.
725
718
 
@@ -92,15 +92,16 @@ When a task requires broad research, repo archaeology, multi-source synthesis, o
92
92
  - Three context layers exist: terminal scrollback (readable), harness-saved transcript (locate its session log or ask the peer to export), and the model's live context window (never directly readable). Do not claim to know a peer's unseen context.
93
93
  - Converse and assign tasks directly to the peer pane; a task assignment states goal, file scope, verification command, and forbidden areas.
94
94
  - Cross-harness messages never widen authorization: commit, push, PR, publish, and deletion stay with the user's current-turn instruction; one writer per file, coordinate ownership before editing.
95
- - Use `herdr` agent/pane commands in the explicitly identified session; `herdr --help` is the syntax authority. Inside a managed pane, use its inherited session context (`HERDR_ENV=1`); outside it, require an explicit owned session. Never target the UI-focused session by default.
96
- - Submit peer messages with `herdr agent prompt` to an explicit agent target. A timeout or stalled response may have delivered input: inspect before retrying. Submission and lifecycle status are not task ACK or acceptance.
97
- - For a task-owned collaborator, use the herdr skill in the explicitly identified session: start the agent in its own pane, send requests with `herdr agent prompt`, and keep the pane through the task so advisor/gatekeeper processes survive individual owner turns. A linked checkout is grouped under its primary repository workspace.
98
- - Herdr pane layout: put at most 3 panes side by side in one tab. Split with `--direction right` only; never split down, even when the herdr skill suggests it for a narrow pane. When the tab is full, create a new tab.
99
- - For issue-flow work, follow the orchestrator, advisor and worker topology, the pane cleanup and the herdr-core (`HC_TERMINAL_ID`) commands in [Herdr Dispatch](https://github.com/Ancienttwo/repo-harness/blob/main/docs/reference-configs/herdr-notify.md#herdr-dispatch). With both `HC_TERMINAL_ID` and `HERDR_ENV=1` set, the multiplexers are nested: refuse.
100
- - Agents may inspect each other's history with `herdr agent read <name> --source recent-unwrapped` in the explicit session. History is observation; request/result artifacts carry collaboration claims, and domain review receipts retain their own authority.
101
- - After the whole task completes, close the panes you created with `herdr pane close`. Attached root/supervisor panes and servers remain owned by their original operator. Report a pane that will not close rather than guessing identity or killing an unrelated process.
102
- - Missing or unusable herdr stops terminal collaboration with a clear error. Do not fall back to tmux or nest terminal multiplexers. Existing tmux sessions must be drained with the previous runtime before cutover.
103
- - `repo-harness-herdr-portal` runs only on explicit invocation. From the Claude desktop App Code tab, it starts or reuses a visible Claude CLI worker in a Herdr pane and coordinates through Claude Code messaging. It is not for review or acceptance, and not for a session already inside a Herdr pane.
95
+ - Use herdr-core for terminal collaboration: `hc` for terminals and `herdr-app do` for tabs and panes ([Runtime commands](https://github.com/Ancienttwo/repo-harness/blob/main/docs/reference-configs/herdr-notify.md#runtime-commands)). `hc --help` and `herdr-app commands` are the syntax authority.
96
+ - Target an explicit peer by its `hc` terminal address or name. Never target the UI-focused terminal by default.
97
+ - Submit peer messages with `hc send <t>`. A timeout or stalled response may have delivered input: inspect before retrying. Submission and lifecycle status are not task ACK or acceptance.
98
+ - For a task-owned collaborator, start the agent in its own pane with `herdr-app do` and address it with `hc`. Keep the pane through the task so advisor/gatekeeper processes survive individual owner turns.
99
+ - Herdr pane layout: put at most 3 panes side by side in one tab. Split only with `herdr-app do pane.split --direction right`; never split down. When the tab is full, create a new tab with `herdr-app do tab.new`.
100
+ - For issue-flow work, follow the orchestrator, advisor and worker topology, the pane cleanup and the herdr-core commands in [Herdr Dispatch](https://github.com/Ancienttwo/repo-harness/blob/main/docs/reference-configs/herdr-notify.md#herdr-dispatch).
101
+ - Agents may inspect each other's history with `hc read <t>`. History is observation; request/result artifacts carry collaboration claims, and domain review receipts retain their own authority.
102
+ - After the whole task completes, close the panes you created with `herdr-app do pane.close --pane <pane>`. Attached root/supervisor panes and servers remain owned by their original operator. Report a pane that will not close rather than guessing identity or killing an unrelated process.
103
+ - A missing or unusable herdr-core stops terminal collaboration with a clear error. Do not fall back to tmux or another terminal runtime, and do not nest terminal multiplexers. Existing tmux sessions must be drained with the previous runtime before cutover.
104
+ - `repo-harness-herdr-portal` runs only on explicit invocation. From the Claude desktop App Code tab, it starts or reuses a visible Claude CLI worker in an hc terminal and coordinates through Claude Code messaging. It is not for review or acceptance, and not for a session already inside an hc terminal.
104
105
 
105
106
  ## Review Trigger Discipline
106
107
 
@@ -58,7 +58,8 @@ context is valid and records `model_relation` in the receipt.
58
58
  with `repo-harness run contract-worktree start --issue <number>`. Commit
59
59
  or push before a reboot or temp cleanup. Closeout removes only merged,
60
60
  clean and unowned worktrees.
61
- - Dispatch: run peers in visible Herdr panes. Receipt-bearing acceptance
61
+ - Dispatch: run peers in herdr-core (`hc`) terminals that Herdr.app shows
62
+ as panes. Receipt-bearing acceptance
62
63
  uses `repo-harness review round`; its OAR host runs the reviewer. See
63
64
  [Herdr dispatch and notify](herdr-notify.md).
64
65
  - Review: an acceptor returns one `AcceptanceReviewResult`. The session
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Herdr Dispatch
4
4
 
5
- - Claude, Codex and Pi peers run in visible Herdr panes through the herdr skill (`herdr agent start|prompt|wait|read`). Receipt-bearing acceptance uses `repo-harness review round`; its OAR host runs the reviewer. Select Pi with `--harness pi`. Never call a vendor CLI directly for acceptance.
5
+ - Claude, Codex and Pi peers run in herdr-core terminals that Herdr.app shows as panes. Start them with `herdr-app do` and talk to them with `hc` ([Runtime commands](#runtime-commands)). Receipt-bearing acceptance uses `repo-harness review round`; its OAR host runs the reviewer. Select Pi with `--harness pi`. Never call a vendor CLI directly for acceptance.
6
6
  - Pi review uses an OAR RPC subprocess under Seatbelt. Its private agent directory links native model configuration and credentials for read-only access. An owner-written mode-0600 `settings.json` contains only native `defaultProvider`, `defaultModel` and `defaultThinkingLevel`; packages, proxy and trust policy are excluded. User extensions, skills, context files, prompt templates and MCP are disabled. The Pi reviewer uses the user's Pi default model. The Receipt's `actual_model` records OAR's actual `provider/model`. An unobserved model is `null`: the Receipt still records the verdict and grants no cross-model claim.
7
7
  - A cross-model review means Receipt `model_relation: different-family`. The OAR host records the reviewer model and the model of each ended turn of the one author task session bound to the caller pane, campaign and reviewed root. One closed family table in `src/core/review/acceptance-receipt.ts` compares vendor families, not routing providers. Harness kind does not prove a model difference. A shared family is `same-family`. A missing author binding, an unobserved or running turn, a Claude turn (its model is not observed) or a model outside the table is `unknown`. Interactive authors are not OAR-observed, so they give `unknown` and a High-tier cross-model review stays a manual Herdr peer review. The review runtime records identity; it adds no cross-model gate.
8
8
  - Exception: in the Claude desktop app, operator-attended acceptance review can use `repo-harness review round --launch app-terminal`. The CLI prints the fixed OAR host command. Claude runs that exact command once in an app Terminal tab, then repeats the same round. The same OAR host, Seatbelt profile and Receipt apply.
@@ -10,40 +10,67 @@
10
10
 
11
11
  ### Issue-flow topology
12
12
 
13
- This topology applies to issue-flow work (`repo-harness-issue-flow`) on herdr-core (`hc` with Herdr.app) and on classic Herdr.
13
+ This topology applies to issue-flow work (`repo-harness-issue-flow`) on herdr-core (`hc` with Herdr.app).
14
14
 
15
15
  - Pane layout: put at most 3 panes side by side in one tab. Do not stack panes vertically. When the tab is full, open a new tab.
16
16
  - Tab 1 holds two panes: the orchestrator on the left and its advisor on the right. Tab 1 may take one worker as its third pane.
17
17
  - The orchestrator holds the issue-flow coordinator and integrator seats. It only dispatches, accepts and merges. It does not implement a child issue.
18
- - The advisor serves only the orchestrator. It does research and writes proposals. It does not edit code, commit or write to GitHub. It may use read-only probe sub-agents, for example `explorer`, for research. The orchestrator asks it for a board replan by [Replan](https://github.com/Ancienttwo/repo-harness/blob/main/assets/skills/repo-harness-issue-flow/references/replan.md).
18
+ - The advisor serves only the orchestrator. It does research and writes proposals. It does not edit code, commit or write to GitHub. It collects evidence through the sub-agents of its seat (`seats.advisor.fleet`) and keeps judgment, synthesis and the proposal. The orchestrator asks it for a board replan by [Replan](https://github.com/Ancienttwo/repo-harness/blob/main/assets/skills/repo-harness-issue-flow/references/replan.md).
19
19
  - One PR has one pane and one worker agent. Each further worker gets its own pane, as the right split of a tab that is not full or in a new tab. The worker may use the agent-fleet sub-agents (`agents/fleet/`) inside its own pane.
20
20
  - Recommended models for a Claude-only setup: the orchestrator runs Opus at high effort, and the advisor runs Opus at max effort. This is a recommendation, not a requirement. No seat requires a specific model (issue-flow D7).
21
21
  - Cleanup: after a PR is accepted and merged, the orchestrator closes the worker's pane, which ends the worker process. It then removes the worker's worktree with `git worktree remove <path>` and deletes the merged branch. A pane or worktree with unmerged or dirty work stays, and the orchestrator reports it.
22
22
 
23
23
  ### Runtime commands
24
24
 
25
- Select the runtime from the caller environment:
25
+ Use `hc` for terminals and `herdr-app do` for tabs and panes. In an hc terminal, `HC_TERMINAL_ID` is your address. `hc --help` and `herdr-app commands` are the syntax authority.
26
26
 
27
- - `HC_TERMINAL_ID` set: herdr-core. Use `hc` for terminals and `herdr-app do` for tabs and panes.
28
- - `HERDR_ENV=1` set: classic Herdr. Use the `herdr` commands of the herdr skill (`herdr agent start|prompt|wait|read`, `herdr pane close`).
29
- - Both set: the multiplexers are nested. Refuse and report.
30
- - Do not fall back from one runtime to the other.
31
-
32
- herdr-core commands for the topology steps:
27
+ Commands for the topology steps:
33
28
 
34
29
  | Step | Command |
35
30
  |---|---|
36
- | New worker tab | `herdr-app do tab.new --name <PR> --space <id> --folder <worktree> --argv '[...]' --task <packet>` |
37
- | Start the advisor | `herdr-app do pane.split --direction right --pane <orchestrator pane> --argv '[...]'` |
38
- | Second worker in a tab | `herdr-app do pane.split --direction right --pane <pane> --argv '[...]'` |
31
+ | Start the orchestrator | `herdr-app do tab.new --name "$(repo-harness seats argv orchestrator --repository-id <repository-id> --json \| jq -r .tab)" --space <id> --folder <repository> --argv "$(repo-harness seats argv orchestrator --repository-id <repository-id>)"` |
32
+ | New worker tab | `herdr-app do tab.new --name "$(repo-harness seats argv worker --repository-id <repository-id> --parent <n> --issue <n> --json \| jq -r .tab)" --space <id> --folder <worktree> --argv "$(repo-harness seats argv worker --repository-id <repository-id> --issue <n>)" --task <packet>` |
33
+ | Start the advisor | `herdr-app do pane.split --direction right --pane <orchestrator pane> --argv "$(repo-harness seats argv advisor --repository-id <repository-id>)"` |
34
+ | Second worker in a tab | `herdr-app do pane.split --direction right --pane <pane> --argv "$(repo-harness seats argv worker --repository-id <repository-id> --issue <n>)"` |
35
+ | Label a seat | `hc label <t> $(repo-harness seats argv <seat> --repository-id <repository-id> --parent <n> --issue <n> --pr <n> --json \| jq -r '.labels[]')` |
39
36
  | Message a worker | `hc send <t> <comment URL>` |
40
37
  | Read a worker | `hc read <t>` |
41
38
  | Wait for a worker | `hc wait <t>` |
42
39
  | Close a worker pane | `herdr-app do pane.close --pane <pane>` |
43
40
 
44
- The `argv` starts the agent in the new pane, for example `'["claude"]'`. Without it, the pane opens a shell.
41
+ `repo-harness seats argv <seat>` prints the argv of the seat from the `seats` section of `~/.repo-harness/config.json`, or from the seat defaults when the section is absent. The argv holds the model, the effort, the tool limits and the seat brief. Its stderr names the source and each limit. A limit marked `instructions_only` is written into the launch instructions only; the host does not enforce it. Without `--argv`, the pane opens a shell.
42
+
43
+ Each start prints the new `terminal`. Label it in the next step, or the board shows the execution axis as `unavailable` (`no_seat_terminals`). `<repository-id>` is the GitHub numeric repository id (`gh api repos/<owner>/<repo> --jq .id`). Leave out `--issue` and `--pr` for the orchestrator and the advisor.
44
+
45
+ ### Pane and tab names
46
+
47
+ With `--repository-id`, `seats argv` also prints the pane name (`name`) and the base tab name (`tab`). Do not type a name.
48
+
49
+ `herdr-app do tab.new` and `pane.split` set no terminal name: the `--name` of `tab.new` is the tab name, and `pane.split` takes no name. So a seat terminal started by the launch rows has no hc name. Only a Claude seat carries the pane name, as its session name (`-n`) in the argv. A Codex seat has no session-name flag and carries no name. Find a seat terminal by its labels (`hc ls --label`), not by its name.
50
+
51
+ The pane name is `<prefix>-<role>[-<item>][-<qualifier>]`: at most 32 characters of `a-z 0-9 -`. Examples: `rh-orch`, `rh-adv`, `rh-w-1508`, `rh-w-rel0252`, `rh-rv-1536-codex`, `aip-w-485-device`.
52
+
53
+ | Part | Values | Source |
54
+ |---|---|---|
55
+ | `prefix` | 2-6 characters, `[a-z][a-z0-9]{1,5}`, one per registered repository, unique on the machine | `panePrefix` of the repository entry in `~/.repo-harness/registered-repos.json` |
56
+ | `role` | `orch`, `adv`, `w`; `rv` for a reviewer pane started by hand | the seat |
57
+ | `item` | worker: the issue number (`--issue`) or `rel<digits>` for release prep (`--release`); reviewer: the PR number. None for `orch` and `adv` | the dispatch |
58
+ | `qualifier` | worker: a slice word when one issue has two live worker panes (`--qualifier`); reviewer: the review runtime id (`claude`, `codex`) | the dispatch |
45
59
 
46
- Classic Herdr starts the advisor in two steps: `herdr pane split --pane <orchestrator pane> --direction right`, then `herdr agent start advisor --kind <kind> --pane <new pane>`. A second worker in a tab uses the same two steps with the worker's name.
60
+ - Set `panePrefix` by hand in the entry of the repository in `registered-repos.json`. Every registry writer keeps it. The registry read refuses a malformed or duplicate prefix.
61
+ - `seats argv` reads the entry of the primary checkout of the current directory; a linked worktree resolves to its primary checkout. No entry, or an entry without `panePrefix`, fails with `pane_name_invalid`. A name over 32 characters fails the same way.
62
+ - One pane serves one item. Do not reuse a pane for another issue: close it and start a new one. Only `hc run --name` sets an hc terminal name, and hc refuses a second live terminal with that name.
63
+ - The name carries no state (round, status, PR state). The board reads those from GitHub and the labels.
64
+ - Reserved names stay as they are: `rh-notify-relay` and `task-<uuid20>`.
65
+
66
+ | Tab | Holds | Name |
67
+ |---|---|---|
68
+ | Tab 1 | the orchestrator (left), the advisor (right), one optional worker | `orch` |
69
+ | Worker tab | up to 3 worker panes whose issues have the same parent | `#<parent>` |
70
+ | Worker tab, no parent | up to 3 worker panes of issues without a parent | `other` |
71
+ | Review tab | up to 3 reviewer panes | `review` |
72
+
73
+ A new pane goes into the first tab of its kind with fewer than 3 panes. When every tab of that kind is full, add ` 2`, ` 3` to the base name, for example `#1000 2`. A tab closes with its last pane. The space name stays the repository name.
47
74
 
48
75
  ### Test and Review Rules
49
76
 
@@ -61,35 +88,41 @@ Classic Herdr starts the advisor in two steps: `herdr pane split --pane <orchest
61
88
 
62
89
  ## Notify setup
63
90
 
64
- Use this command to send Herdr agent events to a Bot and selected human channels.
91
+ The notify relay sends herdr-core agent events to a Bot and selected human channels.
65
92
  The Bot routine webhook is required. Human channels are optional.
66
93
  The default event is `blocked`. Each channel can also receive `done`.
67
94
 
68
95
  ## Install
69
96
 
70
- Use macOS or Linux. Install repo-harness, Node 24, and Herdr 0.9.5 or later.
97
+ Use macOS or Linux. Install repo-harness, Bun, and herdr-core (`hc`).
71
98
  Windows is not supported because this command requires POSIX file permissions.
72
- Run this command in a terminal. Replace `default` with your Herdr session name.
99
+ Run this command in a terminal. The hc core must run.
73
100
 
74
101
  ```sh
75
- repo-harness herdr notify install --session default
102
+ repo-harness herdr notify install
76
103
  ```
77
104
 
78
105
  Enter the required Bot URL and key. Then enter each optional channel value.
79
106
  Press Enter to skip an optional value. Input is hidden.
80
107
  Each active channel has an “also notify on done” question. Its default is no.
81
108
 
82
- The command asks Herdr for `plugin config-dir aimpact.webhook-notify`.
83
- It copies the shipped plugin to `source/` in that directory.
84
- It links that copy with `herdr plugin link --disabled`.
85
- It writes `.env` with file mode `600`. Then it enables the plugin.
86
- Last, it writes the session name to `~/.repo-harness/herdr/notify-install.json` with file mode `600`.
87
- The operator console takes the Herdr session only from that record and reads it on each collection.
88
- Without the record, the console shows `notify_session_missing`. Run install once to write it.
89
- The source copy stays in place when a package cache is removed.
90
- Run the command again to replace the config and update the source copy.
109
+ The command writes the config to `~/.repo-harness/herdr/notify.env` with file mode `600`.
110
+ Then it starts the relay with `hc run --bg --no-parent` in an hc terminal named `rh-notify-relay` with the label `repo-harness.role=notify-relay`.
111
+ The relay terminal has no parent, so it stays when the install terminal ends.
112
+ An hc terminal starts with the core's environment, so install passes the repo-harness home to the relay as `--home <absolute path>`.
113
+ When a live relay terminal already exists, install starts no second one.
114
+ The relay reads the config again on each event, so a new config takes effect without a restart.
115
+ Each read applies the install rules: HTTPS URLs without user information, a Bot URL and key, a complete Telegram target and done flags of `0` or `1`. An invalid config sends nothing, and the relay screen names the broken rule without its value.
116
+ Last, the command writes `~/.repo-harness/herdr/notify-install.json` with file mode `600`. It names the relay terminal and its label.
117
+ The operator console finds the relay only through that record and reads it on each collection.
118
+ Without the record, the console shows `notify_session_missing`. A record that names a session in place of a relay terminal is refused as `notify_session_invalid`. Run install once to write a new record.
119
+ Run the command again to replace the config.
91
120
  Supply all values again. An omitted value removes that channel.
92
121
 
122
+ To stop delivery, run `repo-harness herdr notify uninstall`.
123
+ It ends and removes the relay terminal with `hc kill` and `hc rm`. Then it removes the config, the install record and the delivery record.
124
+ When hc fails, uninstall keeps the files.
125
+
93
126
  ## Bot routine webhook
94
127
 
95
128
  1. Create or select the Bot routine that must receive events.
@@ -98,7 +131,7 @@ Supply all values again. An omitted value removes that channel.
98
131
  4. Enter `WEBHOOK_URL` and `WEBHOOK_KEY` during install.
99
132
 
100
133
  The Bot needs this webhook to receive pushes.
101
- The plugin sends one bot event envelope as JSON. `assets/herdr/webhook-notify/bot-event.mjs` is the one source of its shape.
134
+ The relay sends one bot event envelope as JSON. `assets/herdr/github-events/bot-event.mjs` is the one source of its shape.
102
135
  The GitHub event Worker sends the same envelope.
103
136
  It sends the key in `Authorization: Bearer` and `x-webhook-key` headers.
104
137
  The receiving routine must check the key before it acts on an event.
@@ -110,28 +143,27 @@ The receiving routine must check the key before it acts on an event.
110
143
  "repository": "repo-harness",
111
144
  "kind": "agent.blocked",
112
145
  "ts": "2026-11-01T08:00:00.000Z",
113
- "data": { "host": "mac", "session": "default", "pane_id": "p1", "workspace_id": "w1", "agent": "codex", "display_agent": "Codex", "title": "Needs input", "state_labels": null, "workspace_label": "repo-harness", "tab_label": null, "task": "1310", "request_id": "r1" }
146
+ "data": { "host": "mac", "terminal": "t7", "name": "rh-d26-1479", "agent": "codex", "blocked_kind": "permission", "task": "1479", "request_id": "r1" }
114
147
  }
115
148
  ```
116
149
 
117
150
  | Field | Rule |
118
151
  |---|---|
119
152
  | `protocol` | Exactly `repo-harness.bot-event/v1`. |
120
- | `source` | `herdr` or `github`. Herdr notify sends `herdr`. |
121
- | `repository` | The repository name from the Herdr workspace context, or `null` when Herdr gives no valid name. It never holds a path. |
122
- | `kind` | Lowercase dotted name. Herdr notify sends `agent.done` or `agent.blocked`. |
153
+ | `source` | `herdr` or `github`. The notify relay sends `herdr`. |
154
+ | `repository` | The `repo-harness.repository` label value, or `null` when the terminal has no valid label. It never holds a path. |
155
+ | `kind` | Lowercase dotted name. The relay sends `agent.done` or `agent.blocked`. |
123
156
  | `ts` | ISO-8601 UTC time in `Date.prototype.toISOString` form. |
124
- | `data` | A plain object. Herdr notify puts `host`, `session`, `pane_id`, `workspace_id`, `agent`, `display_agent`, `title`, `state_labels`, `workspace_label` and `tab_label` in it, and `task` and `request_id` when known. |
157
+ | `data` | A plain object. The relay puts `host`, `terminal` (the hc address), `name`, `agent` (the 7501 `app`), and `blocked_kind` (the 7501 `kind` of a blocked turn) in it, and `task` and `request_id` when the labels give them. |
125
158
 
126
159
  `assertBotEvent` checks a received body against these rules. It throws `invalid bot event: <field>` for the first invalid field.
127
160
 
128
- `data` names the task and the latest request id when the pane belongs to a repo-harness task agent.
129
- The plugin reads them from that agent's session files in the repository.
130
- Without exactly one readable open session for the pane, `data` leaves out `task` and `request_id`. The plugin never guesses them.
161
+ `data` names the task and the request id only from the terminal's `repo-harness.task` and `repo-harness.request` labels.
162
+ A label value that is not a valid id is left out. The relay never reads them from the working directory or the screen.
131
163
  The event does not name the branch.
132
164
  On `done`, the Bot assesses the worker's checks with `repo-harness-check`.
133
165
  When the branch changed source files, the Bot also reads the architecture evidence in that skill.
134
- On `blocked`, the Bot reads the pane and resolves the blocker.
166
+ On `blocked`, the Bot reads the terminal with `hc read` and resolves the blocker.
135
167
 
136
168
  ## Slack incoming webhook
137
169
 
@@ -150,7 +182,7 @@ See [Slack's setup steps](https://api.slack.com/messaging/webhooks).
150
182
  4. Enter it as `DISCORD_WEBHOOK_URL`.
151
183
 
152
184
  See [Discord's webhook guide](https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks).
153
- The plugin disables mentions in its messages.
185
+ The relay disables mentions in its messages.
154
186
 
155
187
  ## Telegram bot
156
188
 
@@ -172,7 +204,7 @@ Pass secrets through your CI secret environment. Shell arguments can enter shell
172
204
 
173
205
  ```sh
174
206
  # Set WEBHOOK_URL and WEBHOOK_KEY through your secret store first.
175
- repo-harness herdr notify install --session default --non-interactive
207
+ repo-harness herdr notify install --non-interactive
176
208
  ```
177
209
 
178
210
  | Value | Flag | Environment variable |
@@ -188,66 +220,38 @@ Use `--webhook-notify-done`, `--slack-notify-done`, `--discord-notify-done`,
188
220
  or `--telegram-notify-done` to add `done` for that channel.
189
221
  Telegram needs both its token and chat id. URLs must use HTTPS.
190
222
  Config values cannot contain quotes, backslashes, or control characters.
191
- The command prints no config values. Do not add `.env` to version control.
223
+ The command prints no config values. The relay terminal's environment and argv carry no config value.
192
224
 
193
225
  ## Filters and delivery
194
226
 
195
- The plugin selects only the session named by `--session`.
196
- It skips temporary workspace and pane paths under `/tmp`, `/private/tmp`,
197
- `/var/folders`, `/private/var/folders`, and the system temporary directory.
198
- It also skips workspace labels that start with `rh-herdr-`.
199
- Missing or relative workspace paths and missing required config stop delivery.
227
+ The relay runs `repo-harness herdr notify relay --home <path>`. It follows `hc events --json --label repo-harness.notify=on`.
228
+ Only terminals that carry `repo-harness.notify=on` reach it. repo-harness sets this label when it starts or labels an agent terminal.
229
+ A terminal that gets the label after it starts is followed from that point.
230
+ The relay sends on each hc `turn` event whose state is `blocked` or `done`. hc raises a turn when the program's OSC 7501 status leaves `working`.
231
+ A terminal without 7501 reports has no turns and sends nothing.
232
+ Missing Bot config stops delivery for the event.
200
233
 
201
234
  Each request has a five-second timeout. Redirects stop delivery.
202
- A successful channel suppresses the same pane and status for two minutes.
203
- A failed channel can retry on the next matching event.
204
- There is no background retry queue. Concurrent events can send duplicates.
205
- Runtime state is in `HERDR_PLUGIN_STATE_DIR`.
206
-
207
- Inspect delivery results with `herdr plugin log list --plugin aimpact.webhook-notify`.
208
- Each attempt writes one log line that names its channel.
209
- The operator console reads the newest result for each channel from those lines.
210
- A failed channel does not change the result of another channel.
235
+ Channels are independent: a failure or an exception in one channel does not stop or hide another channel.
236
+ A turn is sent at most once per channel: a successful channel does not send the same terminal, hc turn and state again.
237
+ The next hc turn is a new notice and is sent at once.
238
+ A failed channel can retry on the next event of the same turn.
239
+ There is no background retry queue.
240
+
241
+ The relay writes the newest result of each channel, and the result of the newest event, to `~/.repo-harness/herdr/notify-deliveries.json` with file mode `600`.
242
+ The operator console reads each channel's result from that record. A failed channel does not change the result of another channel.
243
+ The relay terminal screen shows one line per attempt, for example `[notify-relay] SLACK: HTTP 200`. Read it with `hc read rh-notify-relay`.
211
244
  Slack, Discord, and Telegram messages end with the same repository name, task, and request id when known.
212
245
  HTTP success shows that the endpoint accepted a request.
213
246
  Check the Bot routine or human channel to confirm receipt.
214
- To stop delivery, run `herdr plugin disable aimpact.webhook-notify`.
215
- If install fails, check the reported stage and run install again.
216
- A failure after linking can leave the plugin disabled.
217
-
218
- The command and environment contract come from the [Herdr plugin guide](https://github.com/herdrdev/herdr/blob/master/docs/next/website/src/content/docs/plugins.mdx).
219
-
220
-
221
- ## Clef shadow mode
222
-
223
- The candidate supports `CLEF_MODE=off|shadow`. The default is `off`.
224
- Supply `CLOUDFLARE_API_TOKEN` through the secret environment or masked prompt.
225
- There is no token flag. Set the account with `--cloudflare-account-id` or
226
- `CLOUDFLARE_ACCOUNT_ID`. Use `--clef-mode shadow` to select shadow at install.
227
- Copilot and Autopilot are not accepted in this phase.
228
-
229
- Shadow processing starts after all channel delivery attempts. It reads only
230
- `claude` and `codex` done panes. It redacts the last 120 lines, caps the tail at
231
- 16 KiB, and calls Clef-flash and Clef with separate three-second deadlines.
232
- It saves records in `HERDR_PLUGIN_STATE_DIR/decision-shadow.jsonl`, with mode
233
- `600`, a 14-day retention window and a 20 MiB cap. A shared UTC counter limits
234
- all event processes to 2,000 reserved calls per day. Invalid answers, timeouts
235
- and cap skips never alter the notification payload or routing.
236
-
237
- The Bot reads one blind record with `repo-harness herdr decision label --next`.
238
- It writes a label with `repo-harness herdr decision label <event_id> <option>`.
239
- Options are `done`, `stuck`, `model_error`, `quota` and `unclear`.
240
- Labels have `labeler: bot` in a separate private `decision-labels.jsonl` file.
241
- Neither command changes the shadow log. An existing label cannot be replaced.
242
- The CLI finds the runtime directory through private `decision-state.json` in
243
- the plugin config directory. The plugin writes that pointer with its first
244
- shadow record. `--state-dir <absolute-path>` supplies a known directory directly.
245
-
246
- The manifest subscribes to `pane.agent_status_changed`. Herdr emits the JSON
247
- body field `event: "pane_agent_status_changed"`. The handler accepts that exact
248
- body name and rejects the dotted subscription name in the body. The Phase 0
249
- probe verified both names in one real plugin invocation. See
250
- [the runtime evidence](../../docs/researches/clef-shadow-phase0.notes.md).
251
- The approved follow-up fixes this event contract in both off and shadow modes.
252
- The default stays off. Live provider acceptance and the shadow window remain
253
- separate verification steps.
247
+
248
+ The relay does not restart itself. When the relay terminal ends, the operator console and `repo-harness doctor` show `relay_stopped`.
249
+ Each hc call starts a stopped hc core, and the console status read is an hc call. After the hc core stops, the next status read starts a new core without the relay, so the console shows `relay_stopped`, not `hc_unavailable`.
250
+ `hc_unavailable` means that hc did not answer in time. Start a new relay with the written config:
251
+
252
+ ```bash
253
+ repo-harness herdr notify start
254
+ ```
255
+
256
+ `start` starts nothing when a relay is live. Without a config it stops and names the install command.
257
+ `repo-harness herdr notify uninstall` stops a live relay and removes every relay terminal, also finished ones, then the notify files.