@chankov/agent-fleet 0.0.3 → 0.0.5

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 (608) hide show
  1. package/.claude/commands/set-hermes-telegram.md +15 -0
  2. package/.claude/commands/setup-agent-fleet.md +1 -1
  3. package/.opencode/commands/af-set-hermes-telegram.md +15 -0
  4. package/.opencode/commands/af-setup-agent-fleet.md +1 -1
  5. package/.pi/agents/dispatch-policy.yaml +1 -1
  6. package/.pi/agents/peers.yaml +4 -4
  7. package/.pi/extensions/chrome-devtools-mcp/README.md +1 -1
  8. package/.pi/extensions/mcp-bridge/README.md +1 -1
  9. package/.pi/harnesses/agent-hub/README.md +223 -40
  10. package/.pi/harnesses/agent-hub/access-approval.ts +135 -0
  11. package/.pi/harnesses/agent-hub/delegate.ts +32 -9
  12. package/.pi/harnesses/agent-hub/drift-watchdog.js +165 -0
  13. package/.pi/harnesses/agent-hub/footer.ts +29 -0
  14. package/.pi/harnesses/agent-hub/helpers.ts +49 -0
  15. package/.pi/harnesses/agent-hub/index.ts +1037 -246
  16. package/.pi/harnesses/agent-hub/monitor-control.ts +9 -0
  17. package/.pi/harnesses/agent-hub/monitor-lifecycle.ts +13 -0
  18. package/.pi/harnesses/agent-hub/monitor-publisher.ts +59 -0
  19. package/.pi/harnesses/agent-hub/monitor-recovery.ts +3 -0
  20. package/.pi/harnesses/agent-hub/monitor-runtime.ts +3 -0
  21. package/.pi/harnesses/agent-hub/monitor-session-bridge.ts +11 -0
  22. package/.pi/harnesses/agent-hub/package.json +5 -4
  23. package/.pi/harnesses/agent-hub/research-watchdog.ts +40 -0
  24. package/.pi/harnesses/agent-hub/run-budget.js +155 -0
  25. package/.pi/harnesses/agent-hub/safety-routing.ts +22 -0
  26. package/.pi/harnesses/agent-hub/spawn.ts +161 -94
  27. package/.pi/harnesses/agent-hub/version.ts +18 -0
  28. package/.pi/harnesses/ask-user-remote/README.md +1 -0
  29. package/.pi/harnesses/ask-user-remote/index.ts +36 -8
  30. package/.pi/harnesses/coms/README.md +15 -5
  31. package/.pi/harnesses/coms/index.ts +2 -0
  32. package/.pi/harnesses/coms/package.json +5 -4
  33. package/.pi/harnesses/coms/version.ts +18 -0
  34. package/.pi/harnesses/damage-control-continue/README.md +36 -35
  35. package/.pi/harnesses/damage-control-continue/index.ts +23 -9
  36. package/.pi/harnesses/damage-control-continue/package.json +5 -4
  37. package/.pi/harnesses/damage-control-continue/version.ts +18 -0
  38. package/.pi/harnesses/{damage-control/shared.ts → lib/damage-control-shared.ts} +20 -6
  39. package/.pi/harnesses/lib/hermes-monitor-herdr.ts +28 -0
  40. package/.pi/harnesses/lib/hermes-monitor-model.ts +9 -0
  41. package/.pi/harnesses/lib/hermes-monitor-registry.ts +6 -0
  42. package/.pi/harnesses/lib/hermes-monitor-socket.ts +118 -0
  43. package/.pi/harnesses/lib/hermes-monitor-store.ts +31 -0
  44. package/.pi/prompts/set-hermes-telegram.md +15 -0
  45. package/.pi/prompts/setup-agent-fleet.md +1 -1
  46. package/.versions/0.0.4/.claude/commands/build.md +44 -0
  47. package/.versions/0.0.4/.claude/commands/code-simplify.md +22 -0
  48. package/.versions/0.0.4/.claude/commands/design-agent.md +14 -0
  49. package/.versions/0.0.4/.claude/commands/doctor-agent-fleet.md +17 -0
  50. package/.versions/0.0.4/.claude/commands/orchestrate.md +112 -0
  51. package/.versions/0.0.4/.claude/commands/plan.md +16 -0
  52. package/.versions/0.0.4/.claude/commands/prime.md +22 -0
  53. package/.versions/0.0.4/.claude/commands/review.md +16 -0
  54. package/.versions/0.0.4/.claude/commands/setup-agent-fleet.md +25 -0
  55. package/.versions/0.0.4/.claude/commands/ship.md +72 -0
  56. package/.versions/0.0.4/.claude/commands/spec.md +15 -0
  57. package/.versions/0.0.4/.claude/commands/test.md +19 -0
  58. package/.versions/0.0.4/.claude/commands/webperf.md +32 -0
  59. package/.versions/0.0.4/.claude/orchestrate-teams.yaml +24 -0
  60. package/.versions/0.0.4/.opencode/commands/af-build.md +17 -0
  61. package/.versions/0.0.4/.opencode/commands/af-code-simplify.md +16 -0
  62. package/.versions/0.0.4/.opencode/commands/af-compound.md +16 -0
  63. package/.versions/0.0.4/.opencode/commands/af-design-agent.md +15 -0
  64. package/.versions/0.0.4/.opencode/commands/af-doctor-agent-fleet.md +17 -0
  65. package/.versions/0.0.4/.opencode/commands/af-orchestrate.md +112 -0
  66. package/.versions/0.0.4/.opencode/commands/af-plan.md +16 -0
  67. package/.versions/0.0.4/.opencode/commands/af-prime.md +22 -0
  68. package/.versions/0.0.4/.opencode/commands/af-review.md +15 -0
  69. package/.versions/0.0.4/.opencode/commands/af-setup-agent-fleet.md +15 -0
  70. package/.versions/0.0.4/.opencode/commands/af-ship.md +16 -0
  71. package/.versions/0.0.4/.opencode/commands/af-spec.md +16 -0
  72. package/.versions/0.0.4/.opencode/commands/af-test.md +21 -0
  73. package/.versions/0.0.4/.opencode/commands/af-webperf.md +32 -0
  74. package/.versions/0.0.4/.opencode/orchestrate-teams.yaml +24 -0
  75. package/.versions/0.0.4/.pi/agents/dispatch-policy.yaml +32 -0
  76. package/.versions/0.0.4/.pi/agents/model-profiles.yaml +20 -0
  77. package/.versions/0.0.4/.pi/agents/peers.yaml +146 -0
  78. package/.versions/0.0.4/.pi/agents/teams.yaml +39 -0
  79. package/.versions/0.0.4/.pi/damage-control-rules.yaml +297 -0
  80. package/.versions/0.0.4/.pi/extensions/agent-fleet-update-check/README.md +58 -0
  81. package/.versions/0.0.4/.pi/extensions/agent-fleet-update-check/index.ts +161 -0
  82. package/{.pi/harnesses/damage-control → .versions/0.0.4/.pi/extensions/agent-fleet-update-check}/package.json +1 -1
  83. package/.versions/0.0.4/.pi/extensions/btw/README.md +118 -0
  84. package/.versions/0.0.4/.pi/extensions/btw/index.ts +917 -0
  85. package/.versions/0.0.4/.pi/extensions/btw/package.json +6 -0
  86. package/.versions/0.0.4/.pi/extensions/btw/state.js +179 -0
  87. package/.versions/0.0.4/.pi/extensions/chrome-devtools-mcp/README.md +58 -0
  88. package/.versions/0.0.4/.pi/extensions/chrome-devtools-mcp/index.ts +92 -0
  89. package/.versions/0.0.4/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
  90. package/.versions/0.0.4/.pi/extensions/compact-and-continue/README.md +42 -0
  91. package/.versions/0.0.4/.pi/extensions/compact-and-continue/index.ts +120 -0
  92. package/.versions/0.0.4/.pi/extensions/compact-and-continue/package.json +6 -0
  93. package/.versions/0.0.4/.pi/extensions/mcp-bridge/README.md +46 -0
  94. package/.versions/0.0.4/.pi/extensions/mcp-bridge/index.ts +206 -0
  95. package/.versions/0.0.4/.pi/extensions/mcp-bridge/package.json +6 -0
  96. package/.versions/0.0.4/.pi/extensions/package-lock.json +1143 -0
  97. package/.versions/0.0.4/.pi/extensions/package.json +9 -0
  98. package/.versions/0.0.4/.pi/extensions/pi-voice-stt/README.md +201 -0
  99. package/.versions/0.0.4/.pi/extensions/pi-voice-stt/config.ts +198 -0
  100. package/.versions/0.0.4/.pi/extensions/pi-voice-stt/examples/stt.json +35 -0
  101. package/.versions/0.0.4/.pi/extensions/pi-voice-stt/index.ts +248 -0
  102. package/.versions/0.0.4/.pi/extensions/pi-voice-stt/package.json +6 -0
  103. package/.versions/0.0.4/.pi/extensions/pi-voice-stt/providers.ts +214 -0
  104. package/.versions/0.0.4/.pi/extensions/pi-voice-stt/recorder.ts +158 -0
  105. package/.versions/0.0.4/.pi/harnesses/agent-hub/README.md +798 -0
  106. package/.versions/0.0.4/.pi/harnesses/agent-hub/access-approval.ts +135 -0
  107. package/.versions/0.0.4/.pi/harnesses/agent-hub/artifacts.js +92 -0
  108. package/.versions/0.0.4/.pi/harnesses/agent-hub/backend-policy.js +153 -0
  109. package/.versions/0.0.4/.pi/harnesses/agent-hub/delegate.ts +386 -0
  110. package/.versions/0.0.4/.pi/harnesses/agent-hub/drift-watchdog.js +165 -0
  111. package/.versions/0.0.4/.pi/harnesses/agent-hub/evidence-rules.js +96 -0
  112. package/.versions/0.0.4/.pi/harnesses/agent-hub/footer.ts +29 -0
  113. package/.versions/0.0.4/.pi/harnesses/agent-hub/helpers.ts +214 -0
  114. package/.versions/0.0.4/.pi/harnesses/agent-hub/index.ts +8045 -0
  115. package/.versions/0.0.4/.pi/harnesses/agent-hub/monitor-control.ts +9 -0
  116. package/.versions/0.0.4/.pi/harnesses/agent-hub/monitor-lifecycle.ts +13 -0
  117. package/.versions/0.0.4/.pi/harnesses/agent-hub/monitor-publisher.ts +59 -0
  118. package/.versions/0.0.4/.pi/harnesses/agent-hub/monitor-recovery.ts +3 -0
  119. package/.versions/0.0.4/.pi/harnesses/agent-hub/monitor-runtime.ts +3 -0
  120. package/.versions/0.0.4/.pi/harnesses/agent-hub/monitor-session-bridge.ts +11 -0
  121. package/.versions/0.0.4/.pi/harnesses/agent-hub/package.json +7 -0
  122. package/.versions/0.0.4/.pi/harnesses/agent-hub/research-retention.js +34 -0
  123. package/.versions/0.0.4/.pi/harnesses/agent-hub/research-watchdog.ts +40 -0
  124. package/.versions/0.0.4/.pi/harnesses/agent-hub/return-contract.js +215 -0
  125. package/.versions/0.0.4/.pi/harnesses/agent-hub/run-budget.js +155 -0
  126. package/.versions/0.0.4/.pi/harnesses/agent-hub/safety-routing.ts +22 -0
  127. package/.versions/0.0.4/.pi/harnesses/agent-hub/scope-gate.js +103 -0
  128. package/.versions/0.0.4/.pi/harnesses/agent-hub/spawn.ts +246 -0
  129. package/.versions/0.0.4/.pi/harnesses/agent-hub/version.ts +18 -0
  130. package/.versions/0.0.4/.pi/harnesses/ask-user-remote/README.md +18 -0
  131. package/.versions/0.0.4/.pi/harnesses/ask-user-remote/index.ts +293 -0
  132. package/.versions/0.0.4/.pi/harnesses/ask-user-remote/race-core.js +106 -0
  133. package/.versions/0.0.4/.pi/harnesses/coms/README.md +92 -0
  134. package/.versions/0.0.4/.pi/harnesses/coms/index.ts +1745 -0
  135. package/.versions/0.0.4/.pi/harnesses/coms/package.json +7 -0
  136. package/.versions/0.0.4/.pi/harnesses/coms/version.ts +18 -0
  137. package/.versions/0.0.4/.pi/harnesses/damage-control-continue/README.md +117 -0
  138. package/.versions/0.0.4/.pi/harnesses/damage-control-continue/index.ts +536 -0
  139. package/.versions/0.0.4/.pi/harnesses/damage-control-continue/package.json +7 -0
  140. package/.versions/0.0.4/.pi/harnesses/damage-control-continue/version.ts +18 -0
  141. package/.versions/0.0.4/.pi/harnesses/lib/damage-control-shared.ts +197 -0
  142. package/.versions/0.0.4/.pi/harnesses/lib/herdr-client.ts +458 -0
  143. package/.versions/0.0.4/.pi/harnesses/lib/herdr-presence.ts +288 -0
  144. package/.versions/0.0.4/.pi/harnesses/package-lock.json +35 -0
  145. package/.versions/0.0.4/.pi/harnesses/package.json +9 -0
  146. package/.versions/0.0.4/.pi/prompts/build.md +24 -0
  147. package/.versions/0.0.4/.pi/prompts/code-simplify.md +22 -0
  148. package/.versions/0.0.4/.pi/prompts/doctor-agent-fleet.md +15 -0
  149. package/.versions/0.0.4/.pi/prompts/plan.md +16 -0
  150. package/.versions/0.0.4/.pi/prompts/review.md +16 -0
  151. package/.versions/0.0.4/.pi/prompts/setup-agent-fleet.md +27 -0
  152. package/.versions/0.0.4/.pi/prompts/ship.md +17 -0
  153. package/.versions/0.0.4/.pi/prompts/spec.md +15 -0
  154. package/.versions/0.0.4/.pi/prompts/test.md +19 -0
  155. package/.versions/0.0.4/.pi/skills/bowser/SKILL.md +145 -0
  156. package/.versions/0.0.4/.version +1 -0
  157. package/.versions/0.0.4/agents/architect.md +23 -0
  158. package/.versions/0.0.4/agents/bowser.md +26 -0
  159. package/.versions/0.0.4/agents/builder.md +53 -0
  160. package/.versions/0.0.4/agents/code-reviewer.md +205 -0
  161. package/.versions/0.0.4/agents/deep-researcher.md +31 -0
  162. package/.versions/0.0.4/agents/documenter.md +18 -0
  163. package/.versions/0.0.4/agents/orchestrator.md +54 -0
  164. package/.versions/0.0.4/agents/plan-reviewer.md +60 -0
  165. package/.versions/0.0.4/agents/planner.md +69 -0
  166. package/.versions/0.0.4/agents/releaser.md +24 -0
  167. package/.versions/0.0.4/agents/researcher.md +28 -0
  168. package/.versions/0.0.4/agents/security-auditor.md +166 -0
  169. package/.versions/0.0.4/agents/test-engineer.md +151 -0
  170. package/.versions/0.0.4/agents/web-debugger.md +42 -0
  171. package/.versions/0.0.4/agents/web-performance-auditor.md +192 -0
  172. package/.versions/0.0.4/codex/CONDUCTOR.md +148 -0
  173. package/.versions/0.0.4/docs/ARCHITECTURE.md +210 -0
  174. package/.versions/0.0.4/docs/agent-fleet-setup.md +366 -0
  175. package/.versions/0.0.4/docs/claude-code-coms-bridge.md +103 -0
  176. package/.versions/0.0.4/docs/codex-remote-conductor.md +170 -0
  177. package/.versions/0.0.4/docs/coms-hermes-bridge.md +121 -0
  178. package/.versions/0.0.4/docs/getting-started.md +183 -0
  179. package/.versions/0.0.4/docs/npm-install.md +337 -0
  180. package/.versions/0.0.4/docs/opencode-setup.md +248 -0
  181. package/.versions/0.0.4/docs/pi-extensions.md +288 -0
  182. package/.versions/0.0.4/docs/pi-setup.md +463 -0
  183. package/.versions/0.0.4/docs/skill-anatomy.md +150 -0
  184. package/.versions/0.0.4/hermes/README.md +228 -0
  185. package/.versions/0.0.4/hermes/desktop-plugins/agent-fleet-monitor/plugin.js +19 -0
  186. package/.versions/0.0.4/hermes/desktop-plugins/agent-fleet-monitor/state.js +10 -0
  187. package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/adapter-cap.test.py +15 -0
  188. package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/adapter-discovery.test.py +19 -0
  189. package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/adapter-envelope.test.py +13 -0
  190. package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/adapter-forged-owner.test.py +11 -0
  191. package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/adapter-lease-list.test.py +9 -0
  192. package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/adapter-multihub.test.py +17 -0
  193. package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/adapter-output.test.py +34 -0
  194. package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/adapter.py +151 -0
  195. package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/adapter.test.py +39 -0
  196. package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/manifest.json +11 -0
  197. package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/plugin-api-validation.test.py +12 -0
  198. package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/plugin_api.py +50 -0
  199. package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/review-live-wiring.red.test.py +22 -0
  200. package/.versions/0.0.4/hermes/skills/hub-conductor/SKILL.md +84 -0
  201. package/.versions/0.0.4/hermes/skills/hub-liaison/SKILL.md +84 -0
  202. package/.versions/0.0.4/hooks/SIMPLIFY-IGNORE.md +90 -0
  203. package/.versions/0.0.4/hooks/coms-stop-hook.mjs +73 -0
  204. package/.versions/0.0.4/hooks/hooks.json +14 -0
  205. package/.versions/0.0.4/hooks/session-start.sh +74 -0
  206. package/.versions/0.0.4/hooks/simplify-ignore.sh +302 -0
  207. package/.versions/0.0.4/justfile +256 -0
  208. package/.versions/0.0.4/references/accessibility-checklist.md +160 -0
  209. package/.versions/0.0.4/references/definition-of-done.md +67 -0
  210. package/.versions/0.0.4/references/fleet-coordination-patterns.md +151 -0
  211. package/.versions/0.0.4/references/observability-checklist.md +91 -0
  212. package/.versions/0.0.4/references/orchestration-patterns.md +370 -0
  213. package/.versions/0.0.4/references/performance-checklist.md +153 -0
  214. package/.versions/0.0.4/references/prompting-patterns.md +380 -0
  215. package/.versions/0.0.4/references/security-checklist.md +179 -0
  216. package/.versions/0.0.4/references/testing-patterns.md +236 -0
  217. package/.versions/0.0.4/scripts/codex-conductor.ts +41 -0
  218. package/.versions/0.0.4/scripts/codex-remote-control.ts +167 -0
  219. package/.versions/0.0.4/scripts/coms-claude-bridge.ts +286 -0
  220. package/.versions/0.0.4/scripts/coms-cli.ts +484 -0
  221. package/.versions/0.0.4/scripts/coms-hermes-bridge.ts +403 -0
  222. package/.versions/0.0.4/scripts/hermes-monitor-capability-runner.ts +25 -0
  223. package/.versions/0.0.4/scripts/hermes-monitor-scenario.ts +7 -0
  224. package/.versions/0.0.4/scripts/lib/claude-bridge-core.ts +100 -0
  225. package/.versions/0.0.4/scripts/lib/codex-conductor.ts +88 -0
  226. package/.versions/0.0.4/scripts/lib/codex-remote-control.ts +480 -0
  227. package/.versions/0.0.4/scripts/lib/coms-envelope.ts +539 -0
  228. package/.versions/0.0.4/scripts/lib/fake-herdr-server.ts +88 -0
  229. package/.versions/0.0.4/scripts/lib/herdr-layout.ts +263 -0
  230. package/.versions/0.0.4/scripts/lib/hermes-bridge-core.ts +238 -0
  231. package/.versions/0.0.4/scripts/lib/hermes-monitor-herdr.ts +28 -0
  232. package/.versions/0.0.4/scripts/lib/hermes-monitor-model.ts +9 -0
  233. package/.versions/0.0.4/scripts/lib/hermes-monitor-registry.ts +6 -0
  234. package/.versions/0.0.4/scripts/lib/hermes-monitor-socket.ts +118 -0
  235. package/.versions/0.0.4/scripts/lib/hermes-monitor-store.ts +31 -0
  236. package/.versions/0.0.4/scripts/lib/persona-banner.ts +62 -0
  237. package/.versions/0.0.4/scripts/lib/spawn-stagger.ts +101 -0
  238. package/.versions/0.0.4/scripts/lib/team-project.ts +184 -0
  239. package/.versions/0.0.4/scripts/lib/team-snapshot.ts +147 -0
  240. package/.versions/0.0.4/scripts/peer-banner.ts +40 -0
  241. package/.versions/0.0.4/scripts/team-snapshot.ts +238 -0
  242. package/.versions/0.0.4/scripts/team-up.ts +333 -0
  243. package/.versions/0.0.4/skills/_internal/grilling.md +11 -0
  244. package/.versions/0.0.4/skills/browser-testing-with-devtools/SKILL.md +352 -0
  245. package/.versions/0.0.4/skills/code-review-and-quality/SKILL.md +381 -0
  246. package/.versions/0.0.4/skills/compound-learning/SKILL.md +137 -0
  247. package/.versions/0.0.4/skills/context-engineering/SKILL.md +291 -0
  248. package/.versions/0.0.4/skills/deprecation-and-migration/SKILL.md +206 -0
  249. package/.versions/0.0.4/skills/designing-agents/SKILL.md +394 -0
  250. package/.versions/0.0.4/skills/designing-agents/pi-harness-authoring.md +222 -0
  251. package/.versions/0.0.4/skills/frontend-ui-engineering/SKILL.md +328 -0
  252. package/.versions/0.0.4/skills/git-workflow-and-versioning/SKILL.md +316 -0
  253. package/.versions/0.0.4/skills/guided-workspace-setup/SKILL.md +535 -0
  254. package/.versions/0.0.4/skills/guided-workspace-setup/companion-manifest.json +33 -0
  255. package/.versions/0.0.4/skills/idea-refine/SKILL.md +182 -0
  256. package/.versions/0.0.4/skills/idea-refine/examples.md +238 -0
  257. package/.versions/0.0.4/skills/idea-refine/frameworks.md +99 -0
  258. package/.versions/0.0.4/skills/idea-refine/refinement-criteria.md +113 -0
  259. package/.versions/0.0.4/skills/idea-refine/scripts/idea-refine.sh +15 -0
  260. package/.versions/0.0.4/skills/incremental-implementation/SKILL.md +287 -0
  261. package/.versions/0.0.4/skills/interview-me/SKILL.md +226 -0
  262. package/.versions/0.0.4/skills/orchestration-verification/SKILL.md +181 -0
  263. package/.versions/0.0.4/skills/peer-coms/SKILL.md +90 -0
  264. package/.versions/0.0.4/skills/performance-optimization/SKILL.md +350 -0
  265. package/.versions/0.0.4/skills/planning-and-task-breakdown/SKILL.md +236 -0
  266. package/.versions/0.0.4/skills/security-and-hardening/SKILL.md +461 -0
  267. package/.versions/0.0.4/skills/spec-driven-development/SKILL.md +245 -0
  268. package/.versions/0.0.4/skills/using-agent-skills/SKILL.md +199 -0
  269. package/.versions/0.0.4/systemd/user/agent-fleet-codex-remote-control.service.in +23 -0
  270. package/.versions/0.0.4/vendor/agent-skills-upstream/LICENSE +21 -0
  271. package/.versions/0.0.4/vendor/agent-skills-upstream/README.md +11 -0
  272. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/api-and-interface-design/SKILL.md +294 -0
  273. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/browser-testing-with-devtools/SKILL.md +317 -0
  274. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/ci-cd-and-automation/SKILL.md +390 -0
  275. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/code-review-and-quality/SKILL.md +396 -0
  276. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/code-simplification/SKILL.md +331 -0
  277. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/context-engineering/SKILL.md +289 -0
  278. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/debugging-and-error-recovery/SKILL.md +300 -0
  279. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/deprecation-and-migration/SKILL.md +247 -0
  280. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/documentation-and-adrs/SKILL.md +278 -0
  281. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/doubt-driven-development/SKILL.md +243 -0
  282. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/frontend-ui-engineering/SKILL.md +328 -0
  283. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/git-workflow-and-versioning/SKILL.md +355 -0
  284. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/idea-refine/SKILL.md +178 -0
  285. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/idea-refine/examples.md +238 -0
  286. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/idea-refine/frameworks.md +99 -0
  287. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/idea-refine/refinement-criteria.md +113 -0
  288. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/idea-refine/scripts/idea-refine.sh +15 -0
  289. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/incremental-implementation/SKILL.md +249 -0
  290. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/interview-me/SKILL.md +225 -0
  291. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/observability-and-instrumentation/SKILL.md +203 -0
  292. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/performance-optimization/SKILL.md +350 -0
  293. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/planning-and-task-breakdown/SKILL.md +234 -0
  294. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/security-and-hardening/SKILL.md +467 -0
  295. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/shipping-and-launch/SKILL.md +310 -0
  296. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/source-driven-development/SKILL.md +194 -0
  297. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/spec-driven-development/SKILL.md +206 -0
  298. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/test-driven-development/SKILL.md +383 -0
  299. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/using-agent-skills/SKILL.md +191 -0
  300. package/.versions/0.0.5/.claude/commands/build.md +44 -0
  301. package/.versions/0.0.5/.claude/commands/code-simplify.md +22 -0
  302. package/.versions/0.0.5/.claude/commands/design-agent.md +14 -0
  303. package/.versions/0.0.5/.claude/commands/doctor-agent-fleet.md +17 -0
  304. package/.versions/0.0.5/.claude/commands/orchestrate.md +112 -0
  305. package/.versions/0.0.5/.claude/commands/plan.md +16 -0
  306. package/.versions/0.0.5/.claude/commands/prime.md +22 -0
  307. package/.versions/0.0.5/.claude/commands/review.md +16 -0
  308. package/.versions/0.0.5/.claude/commands/set-hermes-telegram.md +15 -0
  309. package/.versions/0.0.5/.claude/commands/setup-agent-fleet.md +25 -0
  310. package/.versions/0.0.5/.claude/commands/ship.md +72 -0
  311. package/.versions/0.0.5/.claude/commands/spec.md +15 -0
  312. package/.versions/0.0.5/.claude/commands/test.md +19 -0
  313. package/.versions/0.0.5/.claude/commands/webperf.md +32 -0
  314. package/.versions/0.0.5/.claude/orchestrate-teams.yaml +24 -0
  315. package/.versions/0.0.5/.opencode/commands/af-build.md +17 -0
  316. package/.versions/0.0.5/.opencode/commands/af-code-simplify.md +16 -0
  317. package/.versions/0.0.5/.opencode/commands/af-compound.md +16 -0
  318. package/.versions/0.0.5/.opencode/commands/af-design-agent.md +15 -0
  319. package/.versions/0.0.5/.opencode/commands/af-doctor-agent-fleet.md +17 -0
  320. package/.versions/0.0.5/.opencode/commands/af-orchestrate.md +112 -0
  321. package/.versions/0.0.5/.opencode/commands/af-plan.md +16 -0
  322. package/.versions/0.0.5/.opencode/commands/af-prime.md +22 -0
  323. package/.versions/0.0.5/.opencode/commands/af-review.md +15 -0
  324. package/.versions/0.0.5/.opencode/commands/af-set-hermes-telegram.md +15 -0
  325. package/.versions/0.0.5/.opencode/commands/af-setup-agent-fleet.md +15 -0
  326. package/.versions/0.0.5/.opencode/commands/af-ship.md +16 -0
  327. package/.versions/0.0.5/.opencode/commands/af-spec.md +16 -0
  328. package/.versions/0.0.5/.opencode/commands/af-test.md +21 -0
  329. package/.versions/0.0.5/.opencode/commands/af-webperf.md +32 -0
  330. package/.versions/0.0.5/.opencode/orchestrate-teams.yaml +24 -0
  331. package/.versions/0.0.5/.pi/agents/dispatch-policy.yaml +32 -0
  332. package/.versions/0.0.5/.pi/agents/model-profiles.yaml +20 -0
  333. package/.versions/0.0.5/.pi/agents/peers.yaml +146 -0
  334. package/.versions/0.0.5/.pi/agents/teams.yaml +39 -0
  335. package/.versions/0.0.5/.pi/damage-control-rules.yaml +297 -0
  336. package/.versions/0.0.5/.pi/extensions/agent-fleet-update-check/README.md +58 -0
  337. package/.versions/0.0.5/.pi/extensions/agent-fleet-update-check/index.ts +161 -0
  338. package/.versions/0.0.5/.pi/extensions/agent-fleet-update-check/package.json +6 -0
  339. package/.versions/0.0.5/.pi/extensions/btw/README.md +118 -0
  340. package/.versions/0.0.5/.pi/extensions/btw/index.ts +917 -0
  341. package/.versions/0.0.5/.pi/extensions/btw/package.json +6 -0
  342. package/.versions/0.0.5/.pi/extensions/btw/state.js +179 -0
  343. package/.versions/0.0.5/.pi/extensions/chrome-devtools-mcp/README.md +58 -0
  344. package/.versions/0.0.5/.pi/extensions/chrome-devtools-mcp/index.ts +92 -0
  345. package/.versions/0.0.5/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
  346. package/.versions/0.0.5/.pi/extensions/compact-and-continue/README.md +42 -0
  347. package/.versions/0.0.5/.pi/extensions/compact-and-continue/index.ts +120 -0
  348. package/.versions/0.0.5/.pi/extensions/compact-and-continue/package.json +6 -0
  349. package/.versions/0.0.5/.pi/extensions/mcp-bridge/README.md +46 -0
  350. package/.versions/0.0.5/.pi/extensions/mcp-bridge/index.ts +206 -0
  351. package/.versions/0.0.5/.pi/extensions/mcp-bridge/package.json +6 -0
  352. package/.versions/0.0.5/.pi/extensions/package-lock.json +1143 -0
  353. package/.versions/0.0.5/.pi/extensions/package.json +9 -0
  354. package/.versions/0.0.5/.pi/extensions/pi-voice-stt/README.md +201 -0
  355. package/.versions/0.0.5/.pi/extensions/pi-voice-stt/config.ts +198 -0
  356. package/.versions/0.0.5/.pi/extensions/pi-voice-stt/examples/stt.json +35 -0
  357. package/.versions/0.0.5/.pi/extensions/pi-voice-stt/index.ts +248 -0
  358. package/.versions/0.0.5/.pi/extensions/pi-voice-stt/package.json +6 -0
  359. package/.versions/0.0.5/.pi/extensions/pi-voice-stt/providers.ts +214 -0
  360. package/.versions/0.0.5/.pi/extensions/pi-voice-stt/recorder.ts +158 -0
  361. package/.versions/0.0.5/.pi/harnesses/agent-hub/README.md +798 -0
  362. package/.versions/0.0.5/.pi/harnesses/agent-hub/access-approval.ts +135 -0
  363. package/.versions/0.0.5/.pi/harnesses/agent-hub/artifacts.js +92 -0
  364. package/.versions/0.0.5/.pi/harnesses/agent-hub/backend-policy.js +153 -0
  365. package/.versions/0.0.5/.pi/harnesses/agent-hub/delegate.ts +386 -0
  366. package/.versions/0.0.5/.pi/harnesses/agent-hub/drift-watchdog.js +165 -0
  367. package/.versions/0.0.5/.pi/harnesses/agent-hub/evidence-rules.js +96 -0
  368. package/.versions/0.0.5/.pi/harnesses/agent-hub/footer.ts +29 -0
  369. package/.versions/0.0.5/.pi/harnesses/agent-hub/helpers.ts +214 -0
  370. package/.versions/0.0.5/.pi/harnesses/agent-hub/index.ts +8045 -0
  371. package/.versions/0.0.5/.pi/harnesses/agent-hub/monitor-control.ts +9 -0
  372. package/.versions/0.0.5/.pi/harnesses/agent-hub/monitor-lifecycle.ts +13 -0
  373. package/.versions/0.0.5/.pi/harnesses/agent-hub/monitor-publisher.ts +59 -0
  374. package/.versions/0.0.5/.pi/harnesses/agent-hub/monitor-recovery.ts +3 -0
  375. package/.versions/0.0.5/.pi/harnesses/agent-hub/monitor-runtime.ts +3 -0
  376. package/.versions/0.0.5/.pi/harnesses/agent-hub/monitor-session-bridge.ts +11 -0
  377. package/.versions/0.0.5/.pi/harnesses/agent-hub/package.json +7 -0
  378. package/.versions/0.0.5/.pi/harnesses/agent-hub/research-retention.js +34 -0
  379. package/.versions/0.0.5/.pi/harnesses/agent-hub/research-watchdog.ts +40 -0
  380. package/.versions/0.0.5/.pi/harnesses/agent-hub/return-contract.js +215 -0
  381. package/.versions/0.0.5/.pi/harnesses/agent-hub/run-budget.js +155 -0
  382. package/.versions/0.0.5/.pi/harnesses/agent-hub/safety-routing.ts +22 -0
  383. package/.versions/0.0.5/.pi/harnesses/agent-hub/scope-gate.js +103 -0
  384. package/.versions/0.0.5/.pi/harnesses/agent-hub/spawn.ts +246 -0
  385. package/.versions/0.0.5/.pi/harnesses/agent-hub/version.ts +18 -0
  386. package/.versions/0.0.5/.pi/harnesses/ask-user-remote/README.md +19 -0
  387. package/.versions/0.0.5/.pi/harnesses/ask-user-remote/index.ts +321 -0
  388. package/.versions/0.0.5/.pi/harnesses/ask-user-remote/race-core.js +106 -0
  389. package/.versions/0.0.5/.pi/harnesses/coms/README.md +92 -0
  390. package/.versions/0.0.5/.pi/harnesses/coms/index.ts +1745 -0
  391. package/.versions/0.0.5/.pi/harnesses/coms/package.json +7 -0
  392. package/.versions/0.0.5/.pi/harnesses/coms/version.ts +18 -0
  393. package/.versions/0.0.5/.pi/harnesses/damage-control-continue/README.md +117 -0
  394. package/.versions/0.0.5/.pi/harnesses/damage-control-continue/index.ts +536 -0
  395. package/.versions/0.0.5/.pi/harnesses/damage-control-continue/package.json +7 -0
  396. package/.versions/0.0.5/.pi/harnesses/damage-control-continue/version.ts +18 -0
  397. package/.versions/0.0.5/.pi/harnesses/lib/damage-control-shared.ts +197 -0
  398. package/.versions/0.0.5/.pi/harnesses/lib/herdr-client.ts +458 -0
  399. package/.versions/0.0.5/.pi/harnesses/lib/herdr-presence.ts +288 -0
  400. package/.versions/0.0.5/.pi/harnesses/lib/hermes-monitor-herdr.ts +28 -0
  401. package/.versions/0.0.5/.pi/harnesses/lib/hermes-monitor-model.ts +9 -0
  402. package/.versions/0.0.5/.pi/harnesses/lib/hermes-monitor-registry.ts +6 -0
  403. package/.versions/0.0.5/.pi/harnesses/lib/hermes-monitor-socket.ts +118 -0
  404. package/.versions/0.0.5/.pi/harnesses/lib/hermes-monitor-store.ts +31 -0
  405. package/.versions/0.0.5/.pi/harnesses/package-lock.json +35 -0
  406. package/.versions/0.0.5/.pi/harnesses/package.json +9 -0
  407. package/.versions/0.0.5/.pi/prompts/build.md +24 -0
  408. package/.versions/0.0.5/.pi/prompts/code-simplify.md +22 -0
  409. package/.versions/0.0.5/.pi/prompts/doctor-agent-fleet.md +15 -0
  410. package/.versions/0.0.5/.pi/prompts/plan.md +16 -0
  411. package/.versions/0.0.5/.pi/prompts/review.md +16 -0
  412. package/.versions/0.0.5/.pi/prompts/set-hermes-telegram.md +15 -0
  413. package/.versions/0.0.5/.pi/prompts/setup-agent-fleet.md +27 -0
  414. package/.versions/0.0.5/.pi/prompts/ship.md +17 -0
  415. package/.versions/0.0.5/.pi/prompts/spec.md +15 -0
  416. package/.versions/0.0.5/.pi/prompts/test.md +19 -0
  417. package/.versions/0.0.5/.pi/skills/bowser/SKILL.md +145 -0
  418. package/.versions/0.0.5/.version +1 -0
  419. package/.versions/0.0.5/agents/architect.md +23 -0
  420. package/.versions/0.0.5/agents/bowser.md +26 -0
  421. package/.versions/0.0.5/agents/builder.md +53 -0
  422. package/.versions/0.0.5/agents/code-reviewer.md +205 -0
  423. package/.versions/0.0.5/agents/deep-researcher.md +31 -0
  424. package/.versions/0.0.5/agents/documenter.md +18 -0
  425. package/.versions/0.0.5/agents/orchestrator.md +54 -0
  426. package/.versions/0.0.5/agents/plan-reviewer.md +60 -0
  427. package/.versions/0.0.5/agents/planner.md +69 -0
  428. package/.versions/0.0.5/agents/releaser.md +24 -0
  429. package/.versions/0.0.5/agents/researcher.md +28 -0
  430. package/.versions/0.0.5/agents/security-auditor.md +166 -0
  431. package/.versions/0.0.5/agents/test-engineer.md +151 -0
  432. package/.versions/0.0.5/agents/web-debugger.md +42 -0
  433. package/.versions/0.0.5/agents/web-performance-auditor.md +192 -0
  434. package/.versions/0.0.5/codex/CONDUCTOR.md +148 -0
  435. package/.versions/0.0.5/docs/ARCHITECTURE.md +210 -0
  436. package/.versions/0.0.5/docs/agent-fleet-setup.md +366 -0
  437. package/.versions/0.0.5/docs/claude-code-coms-bridge.md +103 -0
  438. package/.versions/0.0.5/docs/codex-remote-conductor.md +170 -0
  439. package/.versions/0.0.5/docs/coms-hermes-bridge.md +179 -0
  440. package/.versions/0.0.5/docs/getting-started.md +183 -0
  441. package/.versions/0.0.5/docs/npm-install.md +337 -0
  442. package/.versions/0.0.5/docs/opencode-setup.md +249 -0
  443. package/.versions/0.0.5/docs/pi-extensions.md +293 -0
  444. package/.versions/0.0.5/docs/pi-setup.md +472 -0
  445. package/.versions/0.0.5/docs/skill-anatomy.md +150 -0
  446. package/.versions/0.0.5/hermes/README.md +231 -0
  447. package/.versions/0.0.5/hermes/desktop-plugins/agent-fleet-monitor/plugin.js +19 -0
  448. package/.versions/0.0.5/hermes/desktop-plugins/agent-fleet-monitor/state.js +10 -0
  449. package/.versions/0.0.5/hermes/plugins/agent-fleet-monitor/dashboard/adapter-cap.test.py +15 -0
  450. package/.versions/0.0.5/hermes/plugins/agent-fleet-monitor/dashboard/adapter-discovery.test.py +19 -0
  451. package/.versions/0.0.5/hermes/plugins/agent-fleet-monitor/dashboard/adapter-envelope.test.py +13 -0
  452. package/.versions/0.0.5/hermes/plugins/agent-fleet-monitor/dashboard/adapter-forged-owner.test.py +11 -0
  453. package/.versions/0.0.5/hermes/plugins/agent-fleet-monitor/dashboard/adapter-lease-list.test.py +9 -0
  454. package/.versions/0.0.5/hermes/plugins/agent-fleet-monitor/dashboard/adapter-multihub.test.py +17 -0
  455. package/.versions/0.0.5/hermes/plugins/agent-fleet-monitor/dashboard/adapter-output.test.py +34 -0
  456. package/.versions/0.0.5/hermes/plugins/agent-fleet-monitor/dashboard/adapter.py +151 -0
  457. package/.versions/0.0.5/hermes/plugins/agent-fleet-monitor/dashboard/adapter.test.py +39 -0
  458. package/.versions/0.0.5/hermes/plugins/agent-fleet-monitor/dashboard/manifest.json +11 -0
  459. package/.versions/0.0.5/hermes/plugins/agent-fleet-monitor/dashboard/plugin-api-validation.test.py +12 -0
  460. package/.versions/0.0.5/hermes/plugins/agent-fleet-monitor/dashboard/plugin_api.py +50 -0
  461. package/.versions/0.0.5/hermes/plugins/agent-fleet-monitor/dashboard/review-live-wiring.red.test.py +22 -0
  462. package/.versions/0.0.5/hermes/skills/hub-conductor/SKILL.md +84 -0
  463. package/.versions/0.0.5/hermes/skills/hub-liaison/SKILL.md +84 -0
  464. package/.versions/0.0.5/hooks/SIMPLIFY-IGNORE.md +90 -0
  465. package/.versions/0.0.5/hooks/coms-stop-hook.mjs +73 -0
  466. package/.versions/0.0.5/hooks/hooks.json +14 -0
  467. package/.versions/0.0.5/hooks/session-start.sh +74 -0
  468. package/.versions/0.0.5/hooks/simplify-ignore.sh +302 -0
  469. package/.versions/0.0.5/justfile +245 -0
  470. package/.versions/0.0.5/references/accessibility-checklist.md +160 -0
  471. package/.versions/0.0.5/references/definition-of-done.md +67 -0
  472. package/.versions/0.0.5/references/fleet-coordination-patterns.md +151 -0
  473. package/.versions/0.0.5/references/observability-checklist.md +91 -0
  474. package/.versions/0.0.5/references/orchestration-patterns.md +370 -0
  475. package/.versions/0.0.5/references/performance-checklist.md +153 -0
  476. package/.versions/0.0.5/references/prompting-patterns.md +380 -0
  477. package/.versions/0.0.5/references/security-checklist.md +179 -0
  478. package/.versions/0.0.5/references/testing-patterns.md +236 -0
  479. package/.versions/0.0.5/scripts/codex-conductor.ts +41 -0
  480. package/.versions/0.0.5/scripts/codex-remote-control.ts +167 -0
  481. package/.versions/0.0.5/scripts/coms-claude-bridge.ts +286 -0
  482. package/.versions/0.0.5/scripts/coms-cli.ts +484 -0
  483. package/.versions/0.0.5/scripts/coms-hermes-bridge.ts +413 -0
  484. package/.versions/0.0.5/scripts/fleet.ts +141 -0
  485. package/.versions/0.0.5/scripts/hermes-monitor-capability-runner.ts +25 -0
  486. package/.versions/0.0.5/scripts/hermes-monitor-scenario.ts +7 -0
  487. package/.versions/0.0.5/scripts/lib/claude-bridge-core.ts +100 -0
  488. package/.versions/0.0.5/scripts/lib/codex-conductor.ts +88 -0
  489. package/.versions/0.0.5/scripts/lib/codex-remote-control.ts +480 -0
  490. package/.versions/0.0.5/scripts/lib/coms-envelope.ts +539 -0
  491. package/.versions/0.0.5/scripts/lib/fake-herdr-server.ts +88 -0
  492. package/.versions/0.0.5/scripts/lib/fleet-command.ts +109 -0
  493. package/.versions/0.0.5/scripts/lib/herdr-layout.ts +263 -0
  494. package/.versions/0.0.5/scripts/lib/hermes-bridge-core.ts +241 -0
  495. package/.versions/0.0.5/scripts/lib/hermes-monitor-herdr.ts +2 -0
  496. package/.versions/0.0.5/scripts/lib/hermes-monitor-model.ts +3 -0
  497. package/.versions/0.0.5/scripts/lib/hermes-monitor-registry.ts +2 -0
  498. package/.versions/0.0.5/scripts/lib/hermes-monitor-socket.ts +2 -0
  499. package/.versions/0.0.5/scripts/lib/hermes-monitor-store.ts +2 -0
  500. package/.versions/0.0.5/scripts/lib/persona-banner.ts +62 -0
  501. package/.versions/0.0.5/scripts/lib/spawn-stagger.ts +101 -0
  502. package/.versions/0.0.5/scripts/lib/team-project.ts +191 -0
  503. package/.versions/0.0.5/scripts/lib/team-snapshot.ts +147 -0
  504. package/.versions/0.0.5/scripts/peer-banner.ts +40 -0
  505. package/.versions/0.0.5/scripts/team-snapshot.ts +237 -0
  506. package/.versions/0.0.5/scripts/team-up.ts +351 -0
  507. package/.versions/0.0.5/skills/_internal/grilling.md +11 -0
  508. package/.versions/0.0.5/skills/browser-testing-with-devtools/SKILL.md +352 -0
  509. package/.versions/0.0.5/skills/code-review-and-quality/SKILL.md +381 -0
  510. package/.versions/0.0.5/skills/compound-learning/SKILL.md +137 -0
  511. package/.versions/0.0.5/skills/context-engineering/SKILL.md +291 -0
  512. package/.versions/0.0.5/skills/deprecation-and-migration/SKILL.md +206 -0
  513. package/.versions/0.0.5/skills/designing-agents/SKILL.md +394 -0
  514. package/.versions/0.0.5/skills/designing-agents/pi-harness-authoring.md +222 -0
  515. package/.versions/0.0.5/skills/frontend-ui-engineering/SKILL.md +328 -0
  516. package/.versions/0.0.5/skills/git-workflow-and-versioning/SKILL.md +316 -0
  517. package/.versions/0.0.5/skills/guided-workspace-setup/SKILL.md +542 -0
  518. package/.versions/0.0.5/skills/guided-workspace-setup/companion-manifest.json +35 -0
  519. package/.versions/0.0.5/skills/idea-refine/SKILL.md +182 -0
  520. package/.versions/0.0.5/skills/idea-refine/examples.md +238 -0
  521. package/.versions/0.0.5/skills/idea-refine/frameworks.md +99 -0
  522. package/.versions/0.0.5/skills/idea-refine/refinement-criteria.md +113 -0
  523. package/.versions/0.0.5/skills/idea-refine/scripts/idea-refine.sh +15 -0
  524. package/.versions/0.0.5/skills/incremental-implementation/SKILL.md +287 -0
  525. package/.versions/0.0.5/skills/interview-me/SKILL.md +226 -0
  526. package/.versions/0.0.5/skills/orchestration-verification/SKILL.md +181 -0
  527. package/.versions/0.0.5/skills/peer-coms/SKILL.md +90 -0
  528. package/.versions/0.0.5/skills/performance-optimization/SKILL.md +350 -0
  529. package/.versions/0.0.5/skills/planning-and-task-breakdown/SKILL.md +236 -0
  530. package/.versions/0.0.5/skills/security-and-hardening/SKILL.md +461 -0
  531. package/.versions/0.0.5/skills/spec-driven-development/SKILL.md +245 -0
  532. package/.versions/0.0.5/skills/using-agent-skills/SKILL.md +199 -0
  533. package/.versions/0.0.5/systemd/user/agent-fleet-codex-remote-control.service.in +23 -0
  534. package/.versions/0.0.5/vendor/agent-skills-upstream/LICENSE +21 -0
  535. package/.versions/0.0.5/vendor/agent-skills-upstream/README.md +11 -0
  536. package/.versions/0.0.5/vendor/agent-skills-upstream/skills/api-and-interface-design/SKILL.md +294 -0
  537. package/.versions/0.0.5/vendor/agent-skills-upstream/skills/browser-testing-with-devtools/SKILL.md +317 -0
  538. package/.versions/0.0.5/vendor/agent-skills-upstream/skills/ci-cd-and-automation/SKILL.md +390 -0
  539. package/.versions/0.0.5/vendor/agent-skills-upstream/skills/code-review-and-quality/SKILL.md +396 -0
  540. package/.versions/0.0.5/vendor/agent-skills-upstream/skills/code-simplification/SKILL.md +331 -0
  541. package/.versions/0.0.5/vendor/agent-skills-upstream/skills/context-engineering/SKILL.md +289 -0
  542. package/.versions/0.0.5/vendor/agent-skills-upstream/skills/debugging-and-error-recovery/SKILL.md +300 -0
  543. package/.versions/0.0.5/vendor/agent-skills-upstream/skills/deprecation-and-migration/SKILL.md +247 -0
  544. package/.versions/0.0.5/vendor/agent-skills-upstream/skills/documentation-and-adrs/SKILL.md +278 -0
  545. package/.versions/0.0.5/vendor/agent-skills-upstream/skills/doubt-driven-development/SKILL.md +243 -0
  546. package/.versions/0.0.5/vendor/agent-skills-upstream/skills/frontend-ui-engineering/SKILL.md +328 -0
  547. package/.versions/0.0.5/vendor/agent-skills-upstream/skills/git-workflow-and-versioning/SKILL.md +355 -0
  548. package/.versions/0.0.5/vendor/agent-skills-upstream/skills/idea-refine/SKILL.md +178 -0
  549. package/.versions/0.0.5/vendor/agent-skills-upstream/skills/idea-refine/examples.md +238 -0
  550. package/.versions/0.0.5/vendor/agent-skills-upstream/skills/idea-refine/frameworks.md +99 -0
  551. package/.versions/0.0.5/vendor/agent-skills-upstream/skills/idea-refine/refinement-criteria.md +113 -0
  552. package/.versions/0.0.5/vendor/agent-skills-upstream/skills/idea-refine/scripts/idea-refine.sh +15 -0
  553. package/.versions/0.0.5/vendor/agent-skills-upstream/skills/incremental-implementation/SKILL.md +249 -0
  554. package/.versions/0.0.5/vendor/agent-skills-upstream/skills/interview-me/SKILL.md +225 -0
  555. package/.versions/0.0.5/vendor/agent-skills-upstream/skills/observability-and-instrumentation/SKILL.md +203 -0
  556. package/.versions/0.0.5/vendor/agent-skills-upstream/skills/performance-optimization/SKILL.md +350 -0
  557. package/.versions/0.0.5/vendor/agent-skills-upstream/skills/planning-and-task-breakdown/SKILL.md +234 -0
  558. package/.versions/0.0.5/vendor/agent-skills-upstream/skills/security-and-hardening/SKILL.md +467 -0
  559. package/.versions/0.0.5/vendor/agent-skills-upstream/skills/shipping-and-launch/SKILL.md +310 -0
  560. package/.versions/0.0.5/vendor/agent-skills-upstream/skills/source-driven-development/SKILL.md +194 -0
  561. package/.versions/0.0.5/vendor/agent-skills-upstream/skills/spec-driven-development/SKILL.md +206 -0
  562. package/.versions/0.0.5/vendor/agent-skills-upstream/skills/test-driven-development/SKILL.md +383 -0
  563. package/.versions/0.0.5/vendor/agent-skills-upstream/skills/using-agent-skills/SKILL.md +191 -0
  564. package/CHANGELOG.md +62 -0
  565. package/README.md +17 -16
  566. package/agents/builder.md +1 -1
  567. package/agents/code-reviewer.md +1 -1
  568. package/agents/deep-researcher.md +3 -3
  569. package/agents/orchestrator.md +20 -11
  570. package/agents/plan-reviewer.md +3 -3
  571. package/agents/test-engineer.md +11 -4
  572. package/bin/cli.js +83 -1
  573. package/bin/lib/set-hermes-telegram.js +323 -0
  574. package/bin/lib/validate-overrides.js +19 -0
  575. package/bin/sync-harness-versions.js +94 -0
  576. package/docs/ARCHITECTURE.md +49 -4
  577. package/docs/agent-fleet-setup.md +11 -1
  578. package/docs/claude-code-coms-bridge.md +4 -4
  579. package/docs/codex-remote-conductor.md +12 -12
  580. package/docs/coms-hermes-bridge.md +62 -4
  581. package/docs/getting-started.md +4 -4
  582. package/docs/opencode-setup.md +1 -0
  583. package/docs/pi-extensions.md +73 -33
  584. package/docs/pi-setup.md +23 -8
  585. package/hermes/README.md +191 -8
  586. package/justfile +143 -158
  587. package/package.json +13 -5
  588. package/references/fleet-coordination-patterns.md +1 -1
  589. package/scripts/coms-hermes-bridge.ts +18 -8
  590. package/scripts/fleet.ts +141 -0
  591. package/scripts/lib/fake-herdr-server.ts +88 -0
  592. package/scripts/lib/fleet-command.ts +109 -0
  593. package/scripts/lib/hermes-bridge-core.ts +5 -2
  594. package/scripts/lib/hermes-monitor-herdr.ts +2 -0
  595. package/scripts/lib/hermes-monitor-model.ts +3 -0
  596. package/scripts/lib/hermes-monitor-registry.ts +2 -0
  597. package/scripts/lib/hermes-monitor-socket.ts +2 -0
  598. package/scripts/lib/hermes-monitor-store.ts +2 -0
  599. package/scripts/lib/team-project.ts +10 -3
  600. package/scripts/team-snapshot.ts +4 -5
  601. package/scripts/team-up.ts +24 -6
  602. package/skills/designing-agents/SKILL.md +2 -2
  603. package/skills/designing-agents/pi-harness-authoring.md +26 -13
  604. package/skills/guided-workspace-setup/SKILL.md +22 -12
  605. package/skills/guided-workspace-setup/companion-manifest.json +3 -1
  606. package/skills/peer-coms/SKILL.md +1 -1
  607. package/.pi/harnesses/damage-control/README.md +0 -65
  608. package/.pi/harnesses/damage-control/index.ts +0 -250
@@ -0,0 +1,798 @@
1
+ # agent-hub
2
+
3
+ A multi-agent dispatcher with [`coms`](../coms/README.md) **embedded** — so the dispatcher is
4
+ *also* a peer-to-peer node. The bundled `just hub` recipes load
5
+ [`damage-control-continue`](../damage-control-continue/README.md) first, then
6
+ [`ask-user-remote`](../ask-user-remote/README.md), so the dispatcher has guardrails and an
7
+ `ask_user` handoff tool before `agent-hub` starts. It combines local specialist
8
+ orchestration (fixed specialist grid, read-only research helpers, `/zoom`, kill/restart, per-agent
9
+ model, dispatcher persona gate) with peer-to-peer collaboration: it can **hand a session off to
10
+ another main agent** and **use a coms peer as a subagent**.
11
+
12
+ > Consolidates the retired `agent-team` dispatcher into this harness and embeds the ported `coms`
13
+ > P2P layer from [`pi-vs-claude-code`](https://github.com/disler/pi-vs-claude-code) by
14
+ > [disler](https://github.com/disler) (MIT). See the
15
+ > [extension catalog](../../../docs/pi-extensions.md) and the
16
+ > [design plan](../../../docs/plans/agent-hub/).
17
+
18
+ **Optional phone control:** `just hub-team <team> --project <name>` can supply the live peers for the experimental [Codex Android conductor](../../../docs/codex-remote-conductor.md). Configure Codex for the same project; do not also launch a second `conductor-codex <team>` peer workspace. Hermes remains the inbound `ask_user` route, while Codex performs only human-confirmed, approval-gated outbound delegation.
19
+
20
+ ## What it does
21
+
22
+ The whole dispatch loop, end to end:
23
+
24
+ ```mermaid
25
+ sequenceDiagram
26
+ autonumber
27
+ actor U as You
28
+ participant H as Hub (dispatcher)
29
+ participant S as Specialist (e.g. builder)
30
+ participant R as Research helper
31
+ participant D as Disk (.pi/agent-sessions/)
32
+
33
+ U->>H: task
34
+ H->>D: set_assertions — Verification Contract persisted
35
+ H->>S: dispatch_agent (task + advisory scope)
36
+ S-->>H: NEEDS_RESEARCH: how does X work?
37
+ H->>R: spawn_research (researcher / deep-researcher)
38
+ R->>D: write findings file
39
+ R-->>H: one-line notice + path
40
+ H->>S: resume with file paths — never raw findings
41
+ S-->>H: structured return + named evidence
42
+ H->>D: update_assertion
43
+ H-->>U: Assertions: 2✓ 1○ 1✗ · open: A4
44
+ ```
45
+
46
+ Every borrowed idea from another harness passes one test before it lands: *does this persistently enter the dispatcher context?* If yes, it goes to disk or a one-line status instead.
47
+
48
+ `agent-hub` is the supported home for the former standalone dispatcher features:
49
+
50
+ - **Dispatcher grid** — a live dashboard of fixed specialists from `.pi/agents/teams.yaml`.
51
+ - **Specialist delegation** — `dispatch_agent` sends writable tasks to configured specialists.
52
+ - **Research helpers** — `spawn_research` and `/research` launch read-only helper agents. Two
53
+ `kind: research` personas ship by default: `researcher` (fast `gpt-5.3-codex-spark`) for simple
54
+ reads and `deep-researcher` (`gpt-5.5` / xhigh) for hard, cross-cutting investigation. The
55
+ orchestrator routes by persona; each persona's model + thinking level is shown in its catalog.
56
+ Finished helpers are **auto-pruned** so the research row doesn't grow without bound: auto-research
57
+ pipe helpers disappear as soon as they finish (their findings persist as `findings/*.md` files and
58
+ their handles are never resumed), while manual/persona helpers keep only the `research-keep` most
59
+ recently finished (default 4 — resumable via `/agents-cont rN`; older cards, and their session
60
+ files, are dropped oldest-first). Set `research-keep: <n>|all` in the overrides file to change
61
+ the cap. Running helpers are never pruned and `rN` handles are never reused.
62
+ - **Human handoff path** — `ask_user` is exposed by the `ask-user-remote` wrapper (capturing stock
63
+ `pi-ask-user` and optionally racing a `user-remote` bridge), so specialists can bubble decisions
64
+ back through the dispatcher.
65
+ - **Auto-research pipe (`NEEDS_RESEARCH:`)** — a specialist that lacks information pauses by ending
66
+ its turn with `NEEDS_RESEARCH: <question>` lines (mirror of the `ASK_USER:` protocol). The hub
67
+ intercepts them **in code**: it fans out read-only research helpers (max 4 questions per pause,
68
+ 2 pauses per dispatch), writes each helper's findings to `.pi/agent-sessions/findings/*.md`, and
69
+ resumes the specialist's session with the file paths. The dispatcher LLM sees only a one-line
70
+ notice — raw findings never enter its context. Findings files are wiped at session start.
71
+ - **Verification Contract (assertion ledger)** — the dispatcher owns a ledger of checkable
72
+ acceptance assertions built from the request *before* any builder runs, so a clearly stated
73
+ requirement is never silently dropped. `set_assertions` records the numbered, tagged assertions
74
+ (`test` | `runtime-ui` | `code-grep` | `manual`, one pass condition each) and rebuilds the whole
75
+ ledger on a "wrong again" regression reset; `update_assertion` marks each one proven (named
76
+ evidence required), unproven, or failed after a verification gate; `get_assertions` reads the
77
+ full ledger (ids, tags, pass conditions, evidence) back. The hub persists the ledger to
78
+ `.pi/agent-sessions/assertions.json` (wiped at session start like `findings/`) and renders a
79
+ one-line status (`Assertions: 2✓ 1○ 1✗ · open: A4`) so the contract survives compaction without
80
+ re-flooding the dispatcher LLM context — after a compaction the dispatcher calls `get_assertions`
81
+ to recover the full text the status line omits. The `orchestrator` persona drives it — a deep-researcher
82
+ parity inventory for "behave like" requests, runtime proof for UI/visibility assertions, the
83
+ regression reset on a re-ask — per
84
+ [`orchestration-verification`](../../../skills/orchestration-verification/SKILL.md). The hub also
85
+ machine-parses each assertion-carrying specialist's structured return, writes the full raw output
86
+ to `.pi/agent-sessions/artifacts/returns/<agentKey>-run<N>.md`, surfaces only a compact
87
+ `details.structuredReturn` digest plus `details.returnPath`, and marks contract notices such as
88
+ missing assertion ids or evidence-less `assertions_proven` entries (demoted to unproven in the
89
+ tool text). `details.fullOutput` remains for `/zoom`/compatibility, but dispatcher-visible text is
90
+ digest + path oriented. `update_assertion(status: "proven")` validates evidence by assertion tag:
91
+ test evidence needs a command/test and outcome, `code-grep` needs pattern plus result sample,
92
+ manual needs user/`ask_user` confirmation, and `runtime-ui` needs an existing artifact path under
93
+ `.pi/agent-sessions/artifacts/evidence/`. **Advisory by design** (PRD open question 2): status is
94
+ surfaced and "proven" requires named evidence, but a dispatch is never hard-refused on an unproven
95
+ assertion — code-enforcement is the Checkpoint A decision.
96
+ - **Artifact bus** — session handoffs live under `.pi/agent-sessions/artifacts/` with conventional
97
+ `returns/`, `plans/`, `reviews/`, `inventories/`, and `evidence/` subdirectories, all wiped and
98
+ recreated at session start like `findings/`. `dispatch_agent` and `spawn_research` accept optional
99
+ `artifacts: string[]` paths (repo-relative or session-artifact-relative); the hub validates that
100
+ they stay inside the repo/session roots and injects only the path plus first heading/one-line
101
+ preview, never file bodies. Document-producing specialists are instructed to write plans, reviews,
102
+ inventories, and reports to the real session path
103
+ `.pi/agent-sessions/artifacts/<kind>/<agentKey>-run<N>.md` when their tools allow it, then report/pass
104
+ the artifact-relative handoff path `artifacts/<kind>/<agentKey>-run<N>.md`, finish with that path plus
105
+ a ≤10-line digest, and still include structured returns when assertions are carried. Repo-root
106
+ `./artifacts/...` files are not session artifacts. Planner's existing PLAN_FILE behavior is preserved;
107
+ the artifact path is an additional handoff channel.
108
+ - **Dispatch scope advisory** — `dispatch_agent` accepts optional `scope: string[]` for writable
109
+ builder-style runs. The orchestrator should derive these globs from the plan task's file list,
110
+ and skip scope for exploratory/reconnaissance work where the right files are not known yet. The
111
+ hub snapshots git status before the writable dispatch, diffs after the whole tool call (including
112
+ auto-research resumes), and reports out-of-scope paths in `details.scopeViolations` plus a ⚠ text
113
+ notice. This is advisory only: the hub never blocks completion, reverts files, or escalates
114
+ automatically. Known limitation: concurrent writable dispatches can only be attributed
115
+ approximately, so overlapping runs are flagged in the notice.
116
+ - **Agent controls** — `/zoom` inspects a live agent timeline; `/agents-history` replays the run as a
117
+ timeline (orchestrator turns, dispatches, research helpers) with per-agent durations, parallel-run
118
+ markers, and a grand total; kill/restart controls manage running child agents; per-agent `model:`
119
+ fields select models from team config. The `agents-*` commands address **both target kinds** —
120
+ team specialists by persona name, research helpers by `rN` handle (mirroring `/zoom`):
121
+ `/agents-kill <name|rN|all>` SIGTERMs a specialist (keeping its standing card), while on a
122
+ research helper it kills **and removes** the card + session — helpers are disposable by design
123
+ (`all` clears every helper); `/agents-restart <name|rN>` re-runs the last task fresh (a research
124
+ helper must be finished first); `/agents-cont rN <prompt>` resumes a finished helper's session.
125
+ The old `/research-rm` and `/research-clear` spellings remain as aliases of the kill semantics,
126
+ `/research-cont` of `/agents-cont`.
127
+ Restartable team specialists at or above 70% context render
128
+ their context percentage with a warning marker/color in dashboard and compact views, and their next
129
+ `dispatch_agent` result adds a `/agents-restart <persona>` hint. Research helpers are not warned,
130
+ and the hub never restarts specialists automatically.
131
+ - **Model switching** — a persona's frontmatter `models:` list declares the models it may switch to
132
+ (the default `model:` is implicitly a candidate). `/agent-model <persona>` picks from that list;
133
+ the choice lasts for the session and takes effect on the persona's next dispatch
134
+ (`/agents-restart <persona>` applies it immediately). The dot form
135
+ `/agent-model <persona>.<role>` switches a delegate sub-role's model instead — its candidates are
136
+ the role's declared default plus the parent persona's own candidate list; the switch is applied
137
+ when the parent is next dispatched (it lands in the serialized delegate config, so nested
138
+ children inherit it). `/models [profile]` applies a named profile
139
+ from `.pi/agents/model-profiles.yaml` — a macro over the same declared candidates, validated at
140
+ session start (a profile with any entry outside a persona's candidates is dropped whole, with an
141
+ error); profiles never touch sub-role models — only `/agent-model` reaches those. Nothing
142
+ outside the declared lists is ever selectable. Per project,
143
+ `model.<persona>:` / `models.<persona>:` keys under `## agent-hub` in
144
+ `.ai/agent-fleet-overrides.md` replace a persona's default model / candidate list.
145
+ Research personas (`researcher` / `deep-researcher`, `kind: research`) are switchable the same
146
+ way — `/agent-model <persona>` and `/agent-model-thinking <persona>` accept them alongside team
147
+ members. Since research helpers are spawned fresh on each `/research` / `spawn_research`, the
148
+ switch lands on their next spawn (there is no running instance to `/agents-restart`).
149
+ `/agent-models-substitute <source> <target>` is the global one-shot form: walks every loaded
150
+ persona (team + research + orchestrator), and for each whose **current effective model** is
151
+ `<source>` and whose declared candidates include `<target>`, sets the session override to
152
+ `<target>`. One-step flow — the dry-run summary (affected vs skipped, with reasons) is shown
153
+ inline, then the swap is applied immediately and takes effect on each persona's next dispatch
154
+ (`/agents-restart` to apply now). It never touches the dispatcher or delegate sub-roles.
155
+ - **Thinking levels** — each persona's frontmatter `thinking:` sets its pi `--thinking`
156
+ reasoning effort (`off` · `minimal` · `low` · `medium` · `high` · `xhigh`). `/agent-model-thinking
157
+ <persona>` switches it among those six levels for the session; like a model switch it takes effect
158
+ on the persona's next dispatch (`/agents-restart <persona>` applies it now), and selecting the
159
+ frontmatter default clears the override. The level shows as a short badge after the model
160
+ everywhere a model is rendered — `gpt-5.5 (xh)` in the dashboard cards and the compact below-editor
161
+ view (`min`/`low`/`med`/`hi`/`xh`; `off` shows no badge). Per project, a `thinking.<persona>:` key
162
+ under `## agent-hub` in `.ai/agent-fleet-overrides.md` replaces a persona's default level.
163
+ - **Mid-turn delegation (`delegate` tool)** — a persona that declares a `subagents:` map in its
164
+ frontmatter (`role: { model, tools? }` entries, or an indented `model:`/`tools:` block per role)
165
+ gets a real mid-turn `delegate(role, instruction, context?, allow_write?)` tool, injected as an
166
+ extra `-e delegate.ts` extension into its spawned process (the `delegate` tool name is appended to
167
+ its `--tools` allowlist — pi filters extension tools too). Only declared roles are spawnable, on
168
+ their declared models — model choice is configuration, never the child LLM's. Budgets are readable
169
+ refusals: at most 4 delegate children per dispatch, tree-wide, and a per-persona `delegate_depth:`
170
+ budget capped at 1 (the default). Children spawned with remaining depth 0 do not receive the
171
+ `delegate` extension/tool. Write safety: children run read-only (`read,grep,find,ls`) unless a
172
+ SINGLE live child gets `allow_write: true`, which inherits the parent's tools intersected with the
173
+ role's `tools:` cap; if a declared role cap leaves no available tools, delegation is refused.
174
+ Concurrent children are always forced read-only. Children stream timeline events through
175
+ `.pi/agent-sessions/delegations/<persona>/events.jsonl`; the hub tails it and renders nested rows
176
+ under the parent's card (child id, model, tokens, status),
177
+ each openable with `/zoom <child-id>`. Each child also writes its full final output to
178
+ `.pi/agent-sessions/delegations/<persona>/results/<childId>.md`; the parent receives only status,
179
+ a required final `DIGEST:` section (≤30 lines with path:line citations), and the result-file path.
180
+ If a child omits `DIGEST:`, the parent gets the first ~30 lines plus a no-DIGEST warning and the
181
+ result path. Spend rolls up: every child row and the parent's subtree
182
+ total show tokens, and a session-wide `Δ delegated` counter sits in the status line.
183
+ `/agents-kill` on the parent SIGTERMs its whole process group, so the delegation tree dies with
184
+ it. `context: fork` is accepted but treated as a summary brief in v1. Per project,
185
+ `subagents.<persona>.<role>:` and `delegate-depth.<persona>:` keys under `## agent-hub` in
186
+ `.ai/agent-fleet-overrides.md` replace individual sub-roles / the depth budget. Six personas
187
+ ship with declared sub-roles, on a three-tier OpenAI model ladder — `gpt-5.3-codex-spark` for
188
+ recon/grep sweeps, `gpt-5.4` for analysis sweeps, the `gpt-5.5` (or opus) parent reserved for
189
+ synthesis and verdicts:
190
+ - `code-reviewer` — `preflight`+`docs` (spark), `quality`+`perf` (gpt-5.4); its first delegate
191
+ call is always `preflight`, which studies the project rules and the files under review and
192
+ returns a summary that drives the rest of the fan-out. Deep security review is not a
193
+ sub-role — it belongs to the separate `security-auditor` persona, which the reviewer
194
+ recommends dispatching when it spots deeper risk.
195
+ - `planner` — `scout`+`rules` (spark) fan out before the plan is drafted; `risk` (gpt-5.4)
196
+ optionally challenges the draft breakdown.
197
+ - `plan-reviewer` — `feasibility` (gpt-5.4) checks plan claims against the actual codebase;
198
+ `deps` (spark) verifies dependency ordering and file overlap. No preflight — the plan is
199
+ the map.
200
+ - `security-auditor` — solo `recon` (spark) maps the attack surface first, then
201
+ `input-sweep` (gpt-5.4) and `secrets-sweep` (spark) fan out; exploit reasoning stays with
202
+ the parent.
203
+ - `builder` — `recon` (spark) maps call sites before edits; `verifier` (spark, the one
204
+ `allow_write: true` child) runs the test suite after them. Implementation is never
205
+ delegated.
206
+ - `test-engineer` — `coverage-scout`+`conventions` (spark) inventory gaps and test patterns;
207
+ test writing is never delegated.
208
+ - **Dispatcher persona gate** — optional `persona-gate: on` can require an orchestrator persona at
209
+ session start; by default the dispatcher starts without the gate.
210
+ - **Default damage-control guardrails** — `just hub` and `just hub-solo` load the
211
+ `damage-control-continue` harness before `agent-hub`, so dispatcher tool calls are checked against
212
+ `.pi/damage-control-rules.yaml` and a blocked call feeds back instead of aborting the turn. A
213
+ guardrail is also re-loaded into every native specialist, research helper, and nested delegate
214
+ (see [Safety scope](#safety-scope)). Missing safety plumbing refuses child dispatch.
215
+ - **Embedded coms** — the dispatcher is a discoverable peer on the local machine. Multiple
216
+ `agent-hub` (or plain `coms`) sessions on the same box find each other through per-project registry
217
+ files and exchange messages over a unix socket (named pipe on Windows).
218
+
219
+ Inherited `/zoom` behavior in this harness expands the latest event by default. Use `Space` or
220
+ `Ctrl+C` to copy the selected row content, and `Q` or `Esc` to close the overlay. The overlay sizes
221
+ to the terminal and keeps the selected (and last) entry fully visible while you navigate with
222
+ `↑/↓`.
223
+
224
+ ### `/agents-history`
225
+
226
+ `/agents-history` opens a read-only overlay (same chrome as `/zoom`) that replays the session as an
227
+ execution **tree**:
228
+
229
+ - **Orchestrator turns** — each dispatcher turn that actually dispatched something is a depth-0 row
230
+ labelled `(dispatcher)`. Chat-only turns add no rows.
231
+ - **Dispatched specialists and research helpers** nest one level beneath the turn that launched them;
232
+ **delegate sub-sub-agents** nest one level deeper still under the specialist that spawned them — in
233
+ start order at every level.
234
+ - **Parallel runs** — siblings whose run times overlap are marked with a `│→` connector, so a
235
+ concurrent fan-out reads as a visually grouped block.
236
+ - **Real-work durations** — each row shows that node's *own* work: its span **minus the time it spent
237
+ awaiting children**. A dispatcher blocked on six concurrent agents is credited only for the time it
238
+ actually worked between/around the awaits, never for the await itself — so the same wall-clock isn't
239
+ counted twice up the tree. The same subtraction applies to a specialist awaiting its own delegate
240
+ children. Format: plain seconds under a minute (`42sec`), `m:ss` above it (`10:20min` for 620s).
241
+ Running rows tick live (the overlay re-renders once a second) and a new dispatch appears the instant
242
+ it starts.
243
+ - **Footer** shows `Σ real work <total> · <n> runs (agents <a> + dispatchers <d>)` — the real work of
244
+ *everyone*: the dispatched specialists' and research helpers' full runtime (`agents`) plus each
245
+ dispatcher turn's own work (`dispatchers` — its span minus the time it awaited agents **and** the
246
+ human via `ask_user`). Wall-clock is deliberately **not** shown: it would fold in the idle gaps
247
+ while you're away between turns, and `ask_user` waits are subtracted for the same reason.
248
+
249
+ Navigate with `↑/↓`, press `G` to jump back to the live tail, and `Q`/`Esc` to close. The log resets
250
+ on each session start.
251
+
252
+ Press **`Alt+A`** to toggle the agent view between the full **dashboard** (bordered card grid drawn
253
+ *above* the input box) and a **compact** view that shows one line per *running* agent —
254
+ `name · context% · state` — rendered *below* the input box, just above pi's status bar. Idle and
255
+ done agents are hidden in compact mode, and the coms pool widget collapses too, so an idle session
256
+ collapses to just the prompt and footer. The current mode and binding are shown in the footer
257
+ (`Alt+A view:dashboard` / `Alt+A view:compact`).
258
+
259
+ ### Version footer
260
+
261
+ `agent-hub` renders its local harness version first in its custom footer:
262
+ `v<version> · <model><thinking> · <team>`. It replaces pi's default footer, so it does **not**
263
+ consume or render the shared version status; it reads its own adjacent stamped manifest directly.
264
+ The three persistent-UI harnesses (`agent-hub`, `coms`, and
265
+ `damage-control-continue`) still register that one shared key, which gives default footers one
266
+ version in stacked non-hub sessions. In the supported guardrail-plus-hub stack, the hub's custom
267
+ footer supplies the single visible version. Damage-Control can update its own safety status after
268
+ a violation without overwriting the shared version entry. The canonical source is the
269
+ repository-root `package.json`; the adjacent harness manifest is a synchronized stamp maintained
270
+ by `bin/sync-harness-versions.js`. Its local `version.ts` reader intentionally stays with the
271
+ harness for copied or symlinked installs, but those installs still need the pre-existing full
272
+ `.pi/harnesses/` dependency installation.
273
+
274
+ ### Voice dictation indicator
275
+
276
+ The custom footer renders the optional [`pi-voice-stt`](../../extensions/pi-voice-stt/README.md)
277
+ extension's recording indicator on a line **below the model line** — e.g.
278
+ `● REC 0:01 ⏎ send · esc cancel` while recording, or a `transcribing…` dot. Because agent-hub
279
+ replaces pi's built-in footer (where that indicator normally lives), it reads the extension's
280
+ `setStatus("voice-stt", …)` value via the footer data provider and surfaces it itself. The
281
+ indicator only appears once `pi-voice-stt` is installed and configured; otherwise the footer is
282
+ the single model line. Press **`Alt+S`** to start/stop dictation as in a normal pi session.
283
+
284
+ ### Compact-view agent switcher
285
+
286
+ In **compact view**, the running-subagents list below the input doubles as a switcher. **`Alt+]`**
287
+ and **`Alt+[`** move a marker (`›` + highlight) to the next/previous running subagent; **`Alt+\`**
288
+ opens the read-only `/zoom` overlay on the marked one (`Q`/`Esc` to close). This only changes what
289
+ you *view* — **the input box always prompts the main session**, and `main` is never a marker target
290
+ (it is the session under the input, not a subagent). There is no transcript takeover: a subagent's
291
+ stream is surfaced through the modal zoom overlay, never by replacing the main scrollback. The keys
292
+ are inert in dashboard mode (use `/zoom <name>` there).
293
+
294
+ > Terminal note: `Alt+[` emits `ESC [` (a CSI prefix) and may be swallowed by some terminals'
295
+ > escape parsers; `Alt+]` and `Alt+\` are the reliable pair. `Alt+↑/↓/←/→` are reserved by the pi
296
+ > editor, which is why the switcher uses the bracket/backslash keys.
297
+
298
+ ## Configuration
299
+
300
+ At session start, `agent-hub` reads `.ai/agent-fleet-overrides.md` in the workspace. The
301
+ canonical section name is `## agent-hub` (the legacy `## agent-team` name is still accepted):
302
+
303
+ ```markdown
304
+ ## agent-hub
305
+ # Replace Bulgarian with any language name.
306
+ language: Bulgarian
307
+ ```
308
+
309
+ Omit the section to keep the default `English`. `language` applies to dispatcher replies,
310
+ `ask_user` questions and `context` fields, handoff summaries, and user-facing status text;
311
+ specialist task strings stay in English.
312
+
313
+ The same section can point the team at the project's own rule files and documentation
314
+ entry points:
315
+
316
+ ```markdown
317
+ ## agent-hub
318
+ rules: docs/rules, .ai/rules
319
+ docs: Docs/AGENTS.md, Docs/architecture/ARCHITECTURE_OVERVIEW.md
320
+ ```
321
+
322
+ `rules:` lists repo-relative folders of HOW rules — implementation patterns the work must
323
+ comply with. Resolution is **index-first**: a folder with a top-level `README.md`/`index.md`
324
+ is treated as curated — personas read the index first and follow its loading manifest
325
+ (session bundles, conditional-load lists) instead of bulk-reading the tree; a folder without
326
+ an index is searched **recursively** through all subfolders. When set, every dispatched
327
+ specialist's system prompt gains a "Project rules" block naming the folders and the
328
+ resolution order; the planner and code-reviewer personas additionally validate their subject
329
+ against the relevant rules and pass them on (cited in plan acceptance criteria / handed to
330
+ delegate sub-reviewers).
331
+
332
+ `docs:` lists repo-relative WHAT/WHY documentation entry points — canonical files (e.g. an
333
+ `AGENTS.md`, an architecture overview) or doc folders (personas start from the folder's
334
+ README/index). Docs orient rather than bind: every dispatched specialist **and every research
335
+ helper** gains a "Project docs" block telling it to read the entry points relevant to its
336
+ task and follow their links instead of bulk-reading doc trees. The code-reviewer flags
337
+ changes that alter documented behavior without a doc update; the documenter treats the entry
338
+ points and the trees they link as the documentation it maintains.
339
+
340
+ The same section also tunes research-helper retention:
341
+
342
+ ```markdown
343
+ ## agent-hub
344
+ research-keep: 8
345
+ ```
346
+
347
+ `research-keep:` caps how many **finished** manual/persona research helpers stay resumable
348
+ (LRU by finish time, default 4; `all` disables the cap). Auto-research pipe helpers are
349
+ always pruned as soon as they finish, regardless of this key.
350
+
351
+ ### Bounded local-disk searches
352
+
353
+ Every `read`, `grep`, `find`, and `ls` call made by a native research helper or a nested
354
+ `delegate` child has a **parent-side** watchdog. The default is **120 seconds per tool call**;
355
+ it is a per-tool bound, not a whole-run deadline — the whole-run bound is the execution
356
+ mode's per-run deadline below. Configure it in the repository-standard overrides file:
357
+
358
+ ```markdown
359
+ ## agent-hub
360
+ recon-search-timeout-s: 120 # integer 1..3600
361
+ # recon-search-timeout-s: off # disable this per-tool watchdog
362
+ ```
363
+
364
+ Invalid values warn at session start and use 120. Calls are tracked independently by their
365
+ JSONL `toolCallId`; a repeated start/update cannot extend an existing deadline. A timeout returns
366
+ `tool_timeout` with the call metadata, ends the research/delegate lifecycle, sends SIGTERM to the
367
+ child's explicitly owned process group, then SIGKILL after a finite grace period. The parent also
368
+ has a final settlement timer, so it settles rather than waiting indefinitely for `close` or
369
+ inherited pipe drain. If child/process-group death cannot be confirmed after this bounded cleanup,
370
+ the timeout metadata reports `terminationConfirmed: false`: this prevents the parent hanging, but
371
+ may indicate an uninterruptible OS-level process that needs operator attention. This group
372
+ ownership covers descendants even when the pi leader exits first; nested delegates own their groups
373
+ and forward parent cancellation, avoiding detached-orphan processes. Caller
374
+ cancellation follows the same bounded cleanup path but is reported as `cancelled`, not
375
+ `tool_timeout`.
376
+
377
+ ### Execution modes & turn budgets
378
+
379
+ The hub runs one of three **execution modes** — `fast`, `standard` (default), `strict` —
380
+ with **per-user-turn budgets enforced in code**, not prose. This is the guardrail against
381
+ runaway orchestration (the observed failure mode: 100+ dispatches and 100M+ tokens for one
382
+ task, most of it re-billed stale specialist context).
383
+
384
+ | Budget (per user turn) | fast | standard | strict |
385
+ |-----------------------------------|--------|----------|---------|
386
+ | `dispatch_agent` calls | 2 | 8 | 24 |
387
+ | `spawn_research` calls | 1 | 4 | 12 |
388
+ | Turn wall clock | 15 min | 60 min | 240 min |
389
+ | Per-run deadline (specialist/research/delegate) | 10 min | 30 min | off |
390
+ | Specialist session recycled after | 3 runs | 5 runs | 5 runs |
391
+ | Nested delegation | off | on | on |
392
+
393
+ - **fast** — single-specialist path for small, low-risk asks; assertion ledger optional,
394
+ no nested delegation.
395
+ - **standard** — batched execution: one recon max, builder batches of 4–6 plan tasks with
396
+ one gate each, one review gate at the end.
397
+ - **strict** — the full Verification Contract (parity inventories, per-batch gates,
398
+ second confirming reads); use for production migrations and security-sensitive work.
399
+
400
+ When a budget is exhausted, `dispatch_agent`/`spawn_research` **refuse** with instructions
401
+ to summarize and ask the user; the next user message opens a fresh window. Switch modes
402
+ live with `/hub-mode fast|standard|strict` (no argument shows the current mode and usage);
403
+ set the project default and per-axis overrides in the overrides file:
404
+
405
+ ```markdown
406
+ ## agent-hub
407
+ mode: standard # fast|standard|strict
408
+ max-dispatches-per-turn: 8 # integer or off
409
+ max-research-per-turn: 4 # integer or off
410
+ turn-wall-time-s: 3600 # integer or off
411
+ agent-turn-timeout-s: 1800 # whole-run deadline per spawned run; integer or off
412
+ session-recycle-runs: 5 # recycle a specialist session after N resumed runs; integer or off
413
+ ```
414
+
415
+ Two related always-on behaviors: specialist **context pressure is measured over
416
+ input + cacheRead + cacheWrite** (resumed sessions re-send their whole accumulated context
417
+ as cache reads — counting `input` alone hid that entirely), and a specialist session is
418
+ **recycled** (fresh session, no `-c` resume) once it has served `session-recycle-runs` runs
419
+ or its measured context passes 60%. The dispatch result notes the recycle so the dispatcher
420
+ knows the specialist starts without session memory — task text and `artifacts:` paths must
421
+ carry the state, which the deliverable-to-file protocol already ensures.
422
+
423
+ The per-run deadline lands as `turn_timeout` (exit 124) with partial output preserved, for
424
+ dispatched specialists, research helpers, and nested delegate children alike — a hung child
425
+ can no longer hold its parent for hours.
426
+
427
+ ### Task triage (complexity tiers)
428
+
429
+ The dispatcher classifies each user turn with the `set_task_tier` tool BEFORE its first
430
+ dispatch — `trivial` / `small` / `feature` / `project` — and the hub lowers the enforced
431
+ dispatch/research caps to **min(mode, tier)**: trivial = 1 dispatch / 1 research,
432
+ small = 2 / 2, feature = 6 / 4, `project` defers to the mode. Skipping the call makes the
433
+ first dispatch assume `feature` (except in strict mode, where tiers are opt-in). The tier
434
+ resets every user turn and shows in the `hub-mode` status chip (`Mode: standard·small · …`).
435
+ The system prompt ties the tier to the anti-over-engineering rules: a provided plan is a
436
+ spec (no re-planning), assertions stay ≤3 for trivial/small asks, and "using every persona"
437
+ is called out as a smell. Two hygiene guards are enforced in code, not prose: a
438
+ **duplicate-dispatch guard** refuses re-dispatching the same agent with a near-identical
439
+ task inside one turn, and every budget/duplicate refusal is counted in `/hub-report`.
440
+
441
+ ### Drift watchdog (in-flight observation)
442
+
443
+ An armed dispatch is observed **while it runs**, from the same JSON event stream that
444
+ drives the cards — not post-hoc:
445
+
446
+ - **Layer 1 — deterministic rules, zero tokens** (`drift-watchdog.js`): a write/edit
447
+ outside the dispatch's declared `scope` globs, the identical tool call repeated 4×,
448
+ 5 consecutive failed tool calls, or 200 total tool calls in one run.
449
+ - **Layer 2 — LLM judge, escalation only**: when a rule fires (single-flight, 90 s
450
+ cooldown), a one-shot cheap run (default model: the researcher persona's; override with
451
+ `watchdog-judge-model`) reads the original task + declared scope + recent tool trail and
452
+ answers `VERDICT: ON_TRACK|DRIFTING|STUCK`. Judge failures fail open.
453
+ - **Intervention**: DRIFTING/STUCK terminates the run as **`drift_stop`** (exit 125,
454
+ partial output preserved) and the dispatch result instructs: re-dispatch ONCE with a
455
+ corrected, narrowed task — never the same task unchanged.
456
+
457
+ Enablement is dynamic, precedence top to bottom: the `watchdog: true|false` param on a
458
+ single `dispatch_agent` call → a per-agent override (`/watchdog builder on|off|clear`) →
459
+ the hub-wide setting (`/watchdog on|off|auto`, default `auto`, project default via the
460
+ `watchdog:` overrides key). Read-only research helpers are not monitored — they already
461
+ run under the per-tool watchdog + turn deadline and cannot write.
462
+
463
+ ### Dynamic teams
464
+
465
+ Rosters start from `.pi/agents/teams.yaml` but are not frozen there:
466
+
467
+ - `/agents-add <persona>…` / `/agents-drop <persona>…` — restructure the ACTIVE team
468
+ live (drop refuses running or last members; session files are kept for re-adding).
469
+ - `/agents-save <name>` — persist the current roster as a named team back into
470
+ `teams.yaml` (targeted block upsert; comments and other teams untouched).
471
+ - `team_adjust` — the dispatcher itself may add/drop a persona **with a stated reason**;
472
+ disabled in fast mode, capped at 8 roster members, and every change is notified to the
473
+ human. The system prompt is rebuilt each turn, so changes take effect immediately.
474
+
475
+ ### `/hub-report`
476
+
477
+ Per-turn cost accounting: dispatches (agent, status, elapsed, billed/output tokens),
478
+ research runs, session recycles, drift stops, and budget/duplicate refusals — for the
479
+ current turn, the last completed turn, and session totals. Billed tokens count
480
+ input + cacheRead + cacheWrite, the same measure the recycler uses.
481
+
482
+ Paths that don't exist produce a session-start warning, never an error. The full key list for
483
+ `## agent-hub` (models, sub-roles, depth budgets, persona gate, research retention, watchdog,
484
+ mode/budget keys) is documented in `docs/agent-fleet-setup.md`.
485
+
486
+ ## The coms layer
487
+
488
+ > The runtime coordination protocols this layer implements (sentinels, push over
489
+ > polling, barriers, fan-out digests, racing) are catalogued in
490
+ > [references/fleet-coordination-patterns.md](../../../references/fleet-coordination-patterns.md).
491
+
492
+ ### Fleet tools (herdr)
493
+
494
+ Inside a [herdr](https://herdr.dev) pane with a live server, the dispatcher's tool
495
+ surface additionally gets (absent otherwise, like coms):
496
+
497
+ - `herdr_spawn_peer` — stand up a persona peer (joins the coms pool via `just _peer`) or a
498
+ raw command pane in the current workspace
499
+ - `herdr_read_pane` — bounded `pane.read` (≤200 lines), read-to-decide on workers/tools;
500
+ messaging still goes through coms
501
+ - `herdr_close_pane` — kills a pane; **asks the human to confirm every call**; the
502
+ bash-level `herdr pane close`/`workspace close`/`server stop` verbs are hard-blocked
503
+ for spawned specialists by `.pi/damage-control-rules.yaml`
504
+ - `herdr_notify` — desktop notification to reach the human when they are away
505
+
506
+ This closes the fleet loop: spawn a worker, watch it, notify the human, tear it down —
507
+ without leaving the session. Claude Code panes join the same pool via the
508
+ [coms bridge](../../../docs/claude-code-coms-bridge.md).
509
+
510
+ ### Presence backend (herdr or files)
511
+
512
+ Presence is pluggable, exactly as in the standalone [coms harness](../coms/README.md#presence-backends-herdr-vs-files):
513
+ inside a [herdr](https://herdr.dev) pane with a live server, the ping cycle is replaced by
514
+ push events (`agent.list` + `events.subscribe`) and the hub reports itself into the herdr
515
+ sidebar (`custom_status` = `<name> <pct>% q<depth>`); everywhere else the original 10s
516
+ ping loop runs unchanged. The file registry is written in both backends, and the
517
+ pool-scope boundary is enforced identically.
518
+
519
+ ### Identity
520
+
521
+ Each session registers a coms identity at start-up, resolved in this precedence order:
522
+
523
+ 1. **CLI flags** — `--name`, `--purpose`, `--project`, `--color`, `--explicit`
524
+ 2. **Dispatcher persona frontmatter** — `name`, `description` (→ purpose), `color` from the
525
+ selected `kind: orchestrator` persona (see [persona sync](#persona--coms-purpose-sync))
526
+ 3. **Defaults** — auto-generated name `hub-<id>`, purpose `agent-hub dispatcher`, project
527
+ `default`, a deterministic color derived from the session id
528
+
529
+ Names are de-duplicated per project (`resolveUniqueName`), so two hubs that both want `architect`
530
+ become `architect` and `architect-2`. `--explicit` marks a **private** peer — kept out of every
531
+ pool by default, so it is neither listed nor reachable until a human opts in with `/coms --all`
532
+ (see [Pool scope is the reach boundary](#pool-scope-is-the-reach-boundary)). The registry lives
533
+ under `~/.pi/coms/projects/<project>/agents/<name>.json` and is created at runtime.
534
+
535
+ ### Commands & tools (local dispatcher plus coms)
536
+
537
+ - `/coms` — coms control surface (peer list / status)
538
+ - `/handoff <peer>` — hand the whole session off to a coms peer (see [Handoff](#handoff))
539
+ - `/compound [focus]` — end-of-session **compound-learning pass**: the dispatcher composes a
540
+ candidate-lessons brief from the session (corrections, recurring findings, root causes),
541
+ confirms it with the user, then dispatches the `documenter` to land the approved lessons as
542
+ minimal diffs on the project's `rules:`/`docs:` targets per `skills/compound-learning/SKILL.md`.
543
+ Requires the `documenter` persona in the active team; run it before `/handoff` or session end.
544
+ - `coms_list` — discover the peers in your pool: names, models, live context usage, purpose. Scoped
545
+ to your project and excluding private peers; the LLM cannot widen it (see
546
+ [Pool scope is the reach boundary](#pool-scope-is-the-reach-boundary)).
547
+ - `coms_send` — send a prompt to a peer **in your pool**; returns a `msg_id`
548
+ - `coms_await` — **block** until that `msg_id`'s reply lands (default 30 min,
549
+ `PI_COMS_TIMEOUT_MS`)
550
+ - `coms_get` — **non-blocking** poll of a `msg_id` (status `pending|complete|error`)
551
+
552
+ `/coms` and `/handoff` tab-complete live peer names **in your pool**.
553
+
554
+ ### Pool scope is the reach boundary
555
+
556
+ The set of peers shown in the pool widget is the security boundary: **a peer is reachable only if it
557
+ is in your pool.** `coms_list`, `coms_send`, and `/handoff` all resolve targets through the same
558
+ `peersInScope()` helper, so the dispatcher can never message a peer it cannot see. Two knobs define
559
+ the pool, and **both are human-only** — the LLM cannot widen scope to reach more peers:
560
+
561
+ - **Project** — defaults to your own `identity.project`. A human can retarget with `/coms --project
562
+ <name>` (one project) or `/coms --all` (every project). `coms_list`'s own parameters cannot
563
+ override this; an LLM request for a wider project is clamped back to the current pool and flagged.
564
+ - **Explicit (private) peers** — excluded from every pool by default. `/coms --all` opts them in.
565
+
566
+ This closes a cross-project leak where a peer reachable through the mesh was *not* shown in the
567
+ default project-scoped pool — so it could be messaged without being "connected." Now the reachable
568
+ set is always a subset of what the widget shows. To reach a peer outside the pool, a human widens
569
+ scope first; the dispatcher is told to **ask** rather than attempt it, and not to pass cross-project
570
+ context to a peer the human has not approved.
571
+
572
+ ### Peer as subagent
573
+
574
+ The dispatcher uses a peer as a subagent by pairing the tools: `coms_send(target, prompt)` to
575
+ issue the task, then `coms_await(msg_id)` to block for the reply (or `coms_get` to poll). This sits
576
+ alongside `dispatch_agent` — local persona specialists are dispatched as subprocesses; remote peers
577
+ are reached over coms. The two paths stay explicit for the LLM, but
578
+ [coms-backed dispatch](#coms-backed-dispatch-dispatch-policyyaml) can route a `dispatch_agent` call
579
+ to a same-name peer under the hood. (The specialist-level `delegate` tool is a third,
580
+ nested path: a dispatched specialist spawning its own declared sub-agents — it does not auto-route
581
+ between local and remote either.) Multi-hop is inherited from coms: a peer handling a dispatched task can `coms_send`
582
+ onward, hops accumulating up to `MAX_HOPS` (5).
583
+
584
+ ### Coms-backed dispatch (dispatch-policy.yaml)
585
+
586
+ `just hub-team <team>` boots the hub next to standing peers from `.pi/agents/peers.yaml` — and some
587
+ of them (e.g. `code-reviewer`, `plan-reviewer` with `runner: claude-code`) intentionally share a name
588
+ with a team member. `.pi/agents/dispatch-policy.yaml` tells the dispatcher to serve such members
589
+ **through the peer** instead of spawning a native subagent:
590
+
591
+ ```yaml
592
+ default: native # coms = substitute ANY member with a live same-name pool peer
593
+ grace_s: 30 # poll window for coms-required members
594
+ substitutions:
595
+ code-reviewer:
596
+ prefer: coms
597
+ fallback: native # none = coms-required: refuse with guidance instead of spawning
598
+ # timeout_s: 3600 # per-member reply timeout (default PI_COMS_TIMEOUT_MS, 30 min)
599
+ ```
600
+
601
+ Semantics:
602
+
603
+ - **One API.** The dispatcher LLM always calls `dispatch_agent("code-reviewer", …)`; the backend is
604
+ resolved inside `dispatchAgent()`. The whole downstream pipeline — structured return contract,
605
+ `ASK_USER:` extraction, the NEEDS_RESEARCH auto-research pipe, assertions, history, the grid —
606
+ consumes a coms reply exactly like a subagent's final output (the dispatch protocols ride in the
607
+ message body, since a standing peer only receives a user prompt).
608
+ - **Decided per dispatch, against the live pool.** Hub and peers boot in parallel, so the first
609
+ dispatch may land before the peer registers: with `fallback: native` it runs natively (one notice
610
+ per member per team activation), and later dispatches pick up the peer once it is live. With
611
+ `fallback: none` the dispatch polls the pool for `grace_s` seconds, then refuses with remediation
612
+ steps. The name match is scoped to the coms pool — the same security boundary as `coms_send`.
613
+ - **Standing context is the point.** Re-dispatches (ASK_USER answers, research resumes) go back to
614
+ the same peer session, so a Claude Code reviewer keeps its review context across rounds.
615
+ - **Visibility.** The member's grid card shows a `⇄coms <peer-model>` badge, history entries are
616
+ annotated `(coms)`, and `/dispatch-policy` prints the resolved routing per member with live-peer
617
+ status.
618
+ - **Limitations.** `/agents-kill` on a coms-backed run only abandons the wait — the peer keeps
619
+ running in its own pane and cannot be killed from the hub (`/agents-restart` abandons, then
620
+ re-dispatches). `/zoom` shows only the final reply (there is no stream), tool counts stay 0, and
621
+ context% is a registry snapshot. `/agent-model` overrides apply only to native(-fallback) runs —
622
+ the peer's model is set in `peers.yaml`.
623
+
624
+ Missing file = everything native. HOW a peer runs (persona, model, `runner: claude-code`, env) stays
625
+ in `peers.yaml`; this file only decides WHEN the hub prefers a peer over a native spawn.
626
+
627
+ ### Handoff
628
+
629
+ `/handoff <peer>` transfers the session to another **main** agent. Following the plan's
630
+ **decision G1**, it does *not* try to extract a compaction summary; instead it asks the dispatcher
631
+ LLM to compose a **self-contained brief** ("everything the target needs, assume no shared history"),
632
+ then `coms_send`s that brief to the peer, `coms_await`s the reply, and relays it back — in the
633
+ configured user-facing language. When the handoff `coms_send` fires, the hub appends machine-generated
634
+ sections after the LLM brief: `## Verification ledger (verbatim, machine-appended)` with every current
635
+ assertion in canonical ledger form, and `## Artifact index` with artifact paths plus first headings.
636
+ The target peer must treat the machine-appended ledger as the contract, not the paraphrased brief.
637
+ The target peer takes over; the source relays the result. There is no raw session copy (pi sessions
638
+ aren't portable between live agents). The target must be a peer in your pool — `/handoff` resolves
639
+ through the same [scope boundary](#pool-scope-is-the-reach-boundary) as `coms_send`, so you cannot
640
+ hand a session to a peer you cannot see.
641
+
642
+ ### Pool widget
643
+
644
+ A live "pool" widget lists connected peers with name, model, and live context usage, refreshed by a
645
+ ping cycle; a keepalive cycle re-writes this session's own registry entry (and self-heals it if an
646
+ external prune removed it). Both timers are `unref`'d so they never hold the process open.
647
+
648
+ ### Persona → coms purpose sync
649
+
650
+ The dispatcher persona gate fires *after* coms init, so the identity's `purpose` starts from the
651
+ flag/frontmatter/default and is then reconciled to the chosen persona: `syncComsPurpose()` maps the
652
+ selected `kind: orchestrator` persona to `"<Name> — <description>"` and re-writes the live registry
653
+ entry — **unless** `--purpose` was passed explicitly (an explicit flag always wins). Switching or
654
+ resetting the persona via `/persona` re-syncs.
655
+
656
+ ### Graceful degradation
657
+
658
+ If the coms socket can't bind at start-up (`comsReady` stays `false`), the session degrades to a
659
+ local dispatcher without coms: the `coms_*` tools are withheld from `setActiveTools`, the
660
+ `/handoff` command refuses with a notice, and the "Peer agents (coms)" prompt section is omitted.
661
+ Orchestration, research helpers, and the grid keep working.
662
+
663
+ ### Tool surface
664
+
665
+ `setActiveTools` always preserves the orchestration surface and adds coms when ready:
666
+
667
+ ```ts
668
+ const dispatcherTools = ["dispatch_agent", "spawn_research", "set_assertions", "update_assertion", "get_assertions"];
669
+ if (comsReady) dispatcherTools.push("coms_list", "coms_send", "coms_get", "coms_await");
670
+ if (askUserAvailable) dispatcherTools.push("ask_user");
671
+ ```
672
+
673
+ `set_assertions` / `update_assertion` / `get_assertions` are the always-on Verification Contract ledger tools (see
674
+ [What it does](#what-it-does)); like `dispatch_agent` / `spawn_research` they are part of the
675
+ orchestration surface the dispatcher persona never narrows.
676
+
677
+ The dispatcher persona is **flavor-only** (decision G4 / 9) — it enriches the role but never narrows
678
+ this tool set, so coms and dispatch stay available regardless of the chosen persona.
679
+
680
+ ## Optional Hermes local monitor transport
681
+
682
+ The optional monitor is an Agent Fleet-owned transport boundary, not a Hermes runtime API or a
683
+ bundled Hermes plugin. When enabled, `agent-hub` publishes dispatcher-turn and specialist-run
684
+ state and owns generation-safe cancellation. A separate local Hermes UI or operator client may
685
+ consume the owner-only discovery + Unix-socket contract documented in
686
+ [`hermes/README.md`](../../../hermes/README.md#local-agent-hub-monitor-integration).
687
+
688
+ Set these before the hub starts:
689
+
690
+ ```bash
691
+ export AGENT_FLEET_PROFILE_ID="approved-profile-id"
692
+ export AGENT_FLEET_MONITOR_RUNTIME_DIR="/absolute/owner-only/runtime-root"
693
+ ```
694
+
695
+ Both are required for monitor startup; the runtime root must be absolute and owner-only, and the
696
+ profile ID must be a safe identifier. The monitor also starts only for a Herdr-backed hub with
697
+ `HERDR_WORKSPACE_ID` and `HERDR_PANE_ID`; retain those values and `HERDR_SOCKET_PATH` in the
698
+ standard `just hub-team <team>` flow. Workspace labels are display metadata, not monitor identity.
699
+
700
+ The live contract exposes three authenticated newline-delimited JSON requests: `snapshot`, cursor-
701
+ based `output`, and exact-generation `cancel`. The monitor is local-only and fails closed when its
702
+ profile discovery, lease, token, or Unix socket is unavailable. A native cancel targets only the
703
+ matching hub-owned process generation. A coms cancel abandons the local wait only; its peer can
704
+ continue. Neither path controls or closes a Herdr workspace/pane.
705
+
706
+ Example startup:
707
+
708
+ ```bash
709
+ monitor_runtime="${XDG_RUNTIME_DIR:?}/agent-fleet-monitor"
710
+ install -d -m 700 "$monitor_runtime"
711
+ AGENT_FLEET_PROFILE_ID=dev \
712
+ AGENT_FLEET_MONITOR_RUNTIME_DIR="$monitor_runtime" \
713
+ just hub-team default
714
+ ```
715
+
716
+ No Desktop/backend plugin installation is required or provided. Consumers must re-discover after
717
+ lease or socket loss and must never persist or log the token.
718
+
719
+ ## Requires
720
+
721
+ - `.pi/agents/teams.yaml` for fixed specialist teams, the referenced persona `.md` files, and
722
+ (strongly recommended) [`pi-ask-user`](https://github.com/edlsh/pi-ask-user).
723
+ - `.pi/damage-control-rules.yaml` for the default guarded `just hub` / `just hub-solo` recipes.
724
+ - Nothing extra in-repo for coms — the peer registry lives at `~/.pi/coms/` and is created at
725
+ runtime.
726
+
727
+ ## Usage
728
+
729
+ ```bash
730
+ # via the justfile (loads damage-control-continue first; accepts coms identity flags)
731
+ just hub
732
+ just hub --name architect --purpose "owns the migration design" --project myrepo
733
+
734
+ # equivalent direct guarded launch
735
+ pi -e .pi/harnesses/damage-control-continue/index.ts -e .pi/harnesses/ask-user-remote/index.ts -e .pi/harnesses/agent-hub/index.ts
736
+ pi -e .pi/harnesses/damage-control-continue/index.ts -e .pi/harnesses/ask-user-remote/index.ts -e .pi/harnesses/agent-hub/index.ts --name releaser --explicit
737
+
738
+ # direct unguarded launch, only when you intentionally want to skip damage-control
739
+ pi -e .pi/harnesses/agent-hub/index.ts
740
+ ```
741
+
742
+ Identity flags: `--name`, `--purpose`, `--project`, `--color`, `--explicit`.
743
+
744
+ ### Safety scope
745
+
746
+ `just hub` and `just hub-solo` load `damage-control-continue` and `ask-user-remote` before `agent-hub`, so guardrails and `ask_user` apply
747
+ to hub/dispatcher tool calls in that parent pi process — and because it is the *continue* variant, a
748
+ blocked dispatcher call feeds back and the turn keeps going rather than aborting. Specialist and
749
+ research agents are spawned as separate pi subprocesses with `--no-extensions` — but `agent-hub`
750
+ resolves `damage-control-continue` from this session's `-e` flags, else the repo-local harness, and
751
+ re-loads it into every native specialist, research helper, and nested delegate via explicit `-e`.
752
+ `--no-extensions` keeps discovery off, so children never auto-load `.pi/extensions/` utilities or
753
+ recursively re-load `agent-hub`; the explicit guardrail still checks every child's tool calls against
754
+ `.pi/damage-control-rules.yaml`. Protected-path blocks escalate to the hub for explicit approval;
755
+ protected deletions offer only Deny or Allow once, while inherently dangerous command patterns are
756
+ non-exemptible. Denial or timeout blocks the call without aborting the child's turn. If continue
757
+ cannot be resolved, dispatch is refused—children are never spawned unguarded. Research helpers are
758
+ additionally read-only by construction. Guided setup enforces `agent-hub` ⇒
759
+ `damage-control-continue` + `ask-user-remote`.
760
+
761
+ ### Related recipes
762
+
763
+ ```bash
764
+ # the hub without the coms layer (fixed specialists + research only — lighter)
765
+ just hub-solo
766
+
767
+ # spawn every peer of a team from .pi/agents/peers.yaml into a tiled herdr workspace
768
+ # (requires a running herdr server — https://herdr.dev)
769
+ just team-up full # launch
770
+ just team-up-dry full # print the resolved layout + peer-launch commands without herdr
771
+
772
+ # hub + team in ONE workspace: guarded hub in a larger main pane, peers tiled beside it
773
+ just hub-team docs
774
+
775
+ # fleet resume: snapshot session refs / close cleanly / rebuild with conversations restored
776
+ just team-snapshot docs # proactive snapshot while the team runs (crash insurance)
777
+ just team-down docs # snapshot + close the workspace (peers get SIGTERM)
778
+ just team-resume docs # rebuild the grid; pi peers continue via `pi --session <ref>`
779
+ ```
780
+
781
+ `peers.yaml` groups reusable peers into named teams; each entry is `name` / `persona`
782
+ (+ optional `model`). The persona's frontmatter `description`/`color` become the peer's
783
+ coms purpose/color.
784
+
785
+ ## How it differs from its sources
786
+
787
+ - **Embedded, not stacked (decision 1).** coms is folded into this one `index.ts`; the identity
788
+ flags are registered once. Loading `coms` as a second `-e` would double-register
789
+ `--name/--purpose/...` and abort start-up.
790
+ - **Single `session_start`.** coms init is folded into the former dispatcher's `session_start` and
791
+ guarded by `if (!comsReady)`, so `/new` reuses the same peer identity (no leaked socket).
792
+ - **Dispatcher is also a peer.** `setActiveTools` lists `coms_*` alongside `dispatch_agent` +
793
+ `spawn_research` (+ `ask_user`); the system prompt gains a "Peer agents (coms)" section when coms
794
+ is ready. The persona's `description` drives the coms `purpose` (decision 6 / Phase 6 peer
795
+ mapping) instead of a static `--purpose`.
796
+ - **`/handoff` uses an LLM-composed brief**, not a compaction-summary extraction (decision G1).
797
+ - **Clean shutdown** SIGTERMs any running specialist/research children, clears the coms pool
798
+ widget, and removes the registry entry on `session_shutdown` / SIGINT / SIGTERM.