@chankov/agent-fleet 0.0.2 → 0.0.4

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 (362) hide show
  1. package/.claude/commands/doctor-agent-fleet.md +1 -1
  2. package/.claude/commands/setup-agent-fleet.md +5 -5
  3. package/.opencode/commands/af-doctor-agent-fleet.md +2 -0
  4. package/.opencode/commands/af-setup-agent-fleet.md +1 -1
  5. package/.pi/agents/peers.yaml +4 -0
  6. package/.pi/agents/teams.yaml +2 -2
  7. package/.pi/harnesses/agent-hub/README.md +254 -18
  8. package/.pi/harnesses/agent-hub/access-approval.ts +135 -0
  9. package/.pi/harnesses/agent-hub/delegate.ts +32 -9
  10. package/.pi/harnesses/agent-hub/drift-watchdog.js +165 -0
  11. package/.pi/harnesses/agent-hub/footer.ts +29 -0
  12. package/.pi/harnesses/agent-hub/helpers.ts +49 -0
  13. package/.pi/harnesses/agent-hub/index.ts +1269 -322
  14. package/.pi/harnesses/agent-hub/monitor-control.ts +9 -0
  15. package/.pi/harnesses/agent-hub/monitor-lifecycle.ts +13 -0
  16. package/.pi/harnesses/agent-hub/monitor-publisher.ts +59 -0
  17. package/.pi/harnesses/agent-hub/monitor-recovery.ts +3 -0
  18. package/.pi/harnesses/agent-hub/monitor-runtime.ts +3 -0
  19. package/.pi/harnesses/agent-hub/monitor-session-bridge.ts +11 -0
  20. package/.pi/harnesses/agent-hub/package.json +5 -4
  21. package/.pi/harnesses/agent-hub/research-retention.js +34 -0
  22. package/.pi/harnesses/agent-hub/research-watchdog.ts +40 -0
  23. package/.pi/harnesses/agent-hub/run-budget.js +155 -0
  24. package/.pi/harnesses/agent-hub/safety-routing.ts +22 -0
  25. package/.pi/harnesses/agent-hub/spawn.ts +161 -94
  26. package/.pi/harnesses/agent-hub/version.ts +18 -0
  27. package/.pi/harnesses/ask-user-remote/README.md +2 -0
  28. package/.pi/harnesses/coms/README.md +21 -0
  29. package/.pi/harnesses/coms/index.ts +2 -0
  30. package/.pi/harnesses/coms/package.json +5 -4
  31. package/.pi/harnesses/coms/version.ts +18 -0
  32. package/.pi/harnesses/damage-control-continue/README.md +32 -31
  33. package/.pi/harnesses/damage-control-continue/index.ts +23 -9
  34. package/.pi/harnesses/damage-control-continue/package.json +5 -4
  35. package/.pi/harnesses/damage-control-continue/version.ts +18 -0
  36. package/.pi/harnesses/{damage-control/shared.ts → lib/damage-control-shared.ts} +20 -6
  37. package/.pi/prompts/doctor-agent-fleet.md +1 -1
  38. package/.pi/prompts/setup-agent-fleet.md +5 -5
  39. package/.versions/0.0.4/.claude/commands/build.md +44 -0
  40. package/.versions/0.0.4/.claude/commands/code-simplify.md +22 -0
  41. package/.versions/0.0.4/.claude/commands/design-agent.md +14 -0
  42. package/.versions/0.0.4/.claude/commands/doctor-agent-fleet.md +17 -0
  43. package/.versions/0.0.4/.claude/commands/orchestrate.md +112 -0
  44. package/.versions/0.0.4/.claude/commands/plan.md +16 -0
  45. package/.versions/0.0.4/.claude/commands/prime.md +22 -0
  46. package/.versions/0.0.4/.claude/commands/review.md +16 -0
  47. package/.versions/0.0.4/.claude/commands/setup-agent-fleet.md +25 -0
  48. package/.versions/0.0.4/.claude/commands/ship.md +72 -0
  49. package/.versions/0.0.4/.claude/commands/spec.md +15 -0
  50. package/.versions/0.0.4/.claude/commands/test.md +19 -0
  51. package/.versions/0.0.4/.claude/commands/webperf.md +32 -0
  52. package/.versions/0.0.4/.claude/orchestrate-teams.yaml +24 -0
  53. package/.versions/0.0.4/.opencode/commands/af-build.md +17 -0
  54. package/.versions/0.0.4/.opencode/commands/af-code-simplify.md +16 -0
  55. package/.versions/0.0.4/.opencode/commands/af-compound.md +16 -0
  56. package/.versions/0.0.4/.opencode/commands/af-design-agent.md +15 -0
  57. package/.versions/0.0.4/.opencode/commands/af-doctor-agent-fleet.md +17 -0
  58. package/.versions/0.0.4/.opencode/commands/af-orchestrate.md +112 -0
  59. package/.versions/0.0.4/.opencode/commands/af-plan.md +16 -0
  60. package/.versions/0.0.4/.opencode/commands/af-prime.md +22 -0
  61. package/.versions/0.0.4/.opencode/commands/af-review.md +15 -0
  62. package/.versions/0.0.4/.opencode/commands/af-setup-agent-fleet.md +15 -0
  63. package/.versions/0.0.4/.opencode/commands/af-ship.md +16 -0
  64. package/.versions/0.0.4/.opencode/commands/af-spec.md +16 -0
  65. package/.versions/0.0.4/.opencode/commands/af-test.md +21 -0
  66. package/.versions/0.0.4/.opencode/commands/af-webperf.md +32 -0
  67. package/.versions/0.0.4/.opencode/orchestrate-teams.yaml +24 -0
  68. package/.versions/0.0.4/.pi/agents/dispatch-policy.yaml +32 -0
  69. package/.versions/0.0.4/.pi/agents/model-profiles.yaml +20 -0
  70. package/.versions/0.0.4/.pi/agents/peers.yaml +146 -0
  71. package/.versions/0.0.4/.pi/agents/teams.yaml +39 -0
  72. package/.versions/0.0.4/.pi/damage-control-rules.yaml +297 -0
  73. package/.versions/0.0.4/.pi/extensions/agent-fleet-update-check/README.md +58 -0
  74. package/.versions/0.0.4/.pi/extensions/agent-fleet-update-check/index.ts +161 -0
  75. package/{.pi/harnesses/damage-control → .versions/0.0.4/.pi/extensions/agent-fleet-update-check}/package.json +1 -1
  76. package/.versions/0.0.4/.pi/extensions/btw/README.md +118 -0
  77. package/.versions/0.0.4/.pi/extensions/btw/index.ts +917 -0
  78. package/.versions/0.0.4/.pi/extensions/btw/package.json +6 -0
  79. package/.versions/0.0.4/.pi/extensions/btw/state.js +179 -0
  80. package/.versions/0.0.4/.pi/extensions/chrome-devtools-mcp/README.md +58 -0
  81. package/.versions/0.0.4/.pi/extensions/chrome-devtools-mcp/index.ts +92 -0
  82. package/.versions/0.0.4/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
  83. package/.versions/0.0.4/.pi/extensions/compact-and-continue/README.md +42 -0
  84. package/.versions/0.0.4/.pi/extensions/compact-and-continue/index.ts +120 -0
  85. package/.versions/0.0.4/.pi/extensions/compact-and-continue/package.json +6 -0
  86. package/.versions/0.0.4/.pi/extensions/mcp-bridge/README.md +46 -0
  87. package/.versions/0.0.4/.pi/extensions/mcp-bridge/index.ts +206 -0
  88. package/.versions/0.0.4/.pi/extensions/mcp-bridge/package.json +6 -0
  89. package/.versions/0.0.4/.pi/extensions/package-lock.json +1143 -0
  90. package/.versions/0.0.4/.pi/extensions/package.json +9 -0
  91. package/.versions/0.0.4/.pi/extensions/pi-voice-stt/README.md +201 -0
  92. package/.versions/0.0.4/.pi/extensions/pi-voice-stt/config.ts +198 -0
  93. package/.versions/0.0.4/.pi/extensions/pi-voice-stt/examples/stt.json +35 -0
  94. package/.versions/0.0.4/.pi/extensions/pi-voice-stt/index.ts +248 -0
  95. package/.versions/0.0.4/.pi/extensions/pi-voice-stt/package.json +6 -0
  96. package/.versions/0.0.4/.pi/extensions/pi-voice-stt/providers.ts +214 -0
  97. package/.versions/0.0.4/.pi/extensions/pi-voice-stt/recorder.ts +158 -0
  98. package/.versions/0.0.4/.pi/harnesses/agent-hub/README.md +798 -0
  99. package/.versions/0.0.4/.pi/harnesses/agent-hub/access-approval.ts +135 -0
  100. package/.versions/0.0.4/.pi/harnesses/agent-hub/artifacts.js +92 -0
  101. package/.versions/0.0.4/.pi/harnesses/agent-hub/backend-policy.js +153 -0
  102. package/.versions/0.0.4/.pi/harnesses/agent-hub/delegate.ts +386 -0
  103. package/.versions/0.0.4/.pi/harnesses/agent-hub/drift-watchdog.js +165 -0
  104. package/.versions/0.0.4/.pi/harnesses/agent-hub/evidence-rules.js +96 -0
  105. package/.versions/0.0.4/.pi/harnesses/agent-hub/footer.ts +29 -0
  106. package/.versions/0.0.4/.pi/harnesses/agent-hub/helpers.ts +214 -0
  107. package/.versions/0.0.4/.pi/harnesses/agent-hub/index.ts +8045 -0
  108. package/.versions/0.0.4/.pi/harnesses/agent-hub/monitor-control.ts +9 -0
  109. package/.versions/0.0.4/.pi/harnesses/agent-hub/monitor-lifecycle.ts +13 -0
  110. package/.versions/0.0.4/.pi/harnesses/agent-hub/monitor-publisher.ts +59 -0
  111. package/.versions/0.0.4/.pi/harnesses/agent-hub/monitor-recovery.ts +3 -0
  112. package/.versions/0.0.4/.pi/harnesses/agent-hub/monitor-runtime.ts +3 -0
  113. package/.versions/0.0.4/.pi/harnesses/agent-hub/monitor-session-bridge.ts +11 -0
  114. package/.versions/0.0.4/.pi/harnesses/agent-hub/package.json +7 -0
  115. package/.versions/0.0.4/.pi/harnesses/agent-hub/research-retention.js +34 -0
  116. package/.versions/0.0.4/.pi/harnesses/agent-hub/research-watchdog.ts +40 -0
  117. package/.versions/0.0.4/.pi/harnesses/agent-hub/return-contract.js +215 -0
  118. package/.versions/0.0.4/.pi/harnesses/agent-hub/run-budget.js +155 -0
  119. package/.versions/0.0.4/.pi/harnesses/agent-hub/safety-routing.ts +22 -0
  120. package/.versions/0.0.4/.pi/harnesses/agent-hub/scope-gate.js +103 -0
  121. package/.versions/0.0.4/.pi/harnesses/agent-hub/spawn.ts +246 -0
  122. package/.versions/0.0.4/.pi/harnesses/agent-hub/version.ts +18 -0
  123. package/.versions/0.0.4/.pi/harnesses/ask-user-remote/README.md +18 -0
  124. package/.versions/0.0.4/.pi/harnesses/ask-user-remote/index.ts +293 -0
  125. package/.versions/0.0.4/.pi/harnesses/ask-user-remote/race-core.js +106 -0
  126. package/.versions/0.0.4/.pi/harnesses/coms/README.md +92 -0
  127. package/.versions/0.0.4/.pi/harnesses/coms/index.ts +1745 -0
  128. package/.versions/0.0.4/.pi/harnesses/coms/package.json +7 -0
  129. package/.versions/0.0.4/.pi/harnesses/coms/version.ts +18 -0
  130. package/.versions/0.0.4/.pi/harnesses/damage-control-continue/README.md +117 -0
  131. package/.versions/0.0.4/.pi/harnesses/damage-control-continue/index.ts +536 -0
  132. package/.versions/0.0.4/.pi/harnesses/damage-control-continue/package.json +7 -0
  133. package/.versions/0.0.4/.pi/harnesses/damage-control-continue/version.ts +18 -0
  134. package/.versions/0.0.4/.pi/harnesses/lib/damage-control-shared.ts +197 -0
  135. package/.versions/0.0.4/.pi/harnesses/lib/herdr-client.ts +458 -0
  136. package/.versions/0.0.4/.pi/harnesses/lib/herdr-presence.ts +288 -0
  137. package/.versions/0.0.4/.pi/harnesses/package-lock.json +35 -0
  138. package/.versions/0.0.4/.pi/harnesses/package.json +9 -0
  139. package/.versions/0.0.4/.pi/prompts/build.md +24 -0
  140. package/.versions/0.0.4/.pi/prompts/code-simplify.md +22 -0
  141. package/.versions/0.0.4/.pi/prompts/doctor-agent-fleet.md +15 -0
  142. package/.versions/0.0.4/.pi/prompts/plan.md +16 -0
  143. package/.versions/0.0.4/.pi/prompts/review.md +16 -0
  144. package/.versions/0.0.4/.pi/prompts/setup-agent-fleet.md +27 -0
  145. package/.versions/0.0.4/.pi/prompts/ship.md +17 -0
  146. package/.versions/0.0.4/.pi/prompts/spec.md +15 -0
  147. package/.versions/0.0.4/.pi/prompts/test.md +19 -0
  148. package/.versions/0.0.4/.pi/skills/bowser/SKILL.md +145 -0
  149. package/.versions/0.0.4/.version +1 -0
  150. package/.versions/0.0.4/agents/architect.md +23 -0
  151. package/.versions/0.0.4/agents/bowser.md +26 -0
  152. package/.versions/0.0.4/agents/builder.md +53 -0
  153. package/.versions/0.0.4/agents/code-reviewer.md +205 -0
  154. package/.versions/0.0.4/agents/deep-researcher.md +31 -0
  155. package/.versions/0.0.4/agents/documenter.md +18 -0
  156. package/.versions/0.0.4/agents/orchestrator.md +54 -0
  157. package/.versions/0.0.4/agents/plan-reviewer.md +60 -0
  158. package/.versions/0.0.4/agents/planner.md +69 -0
  159. package/.versions/0.0.4/agents/releaser.md +24 -0
  160. package/.versions/0.0.4/agents/researcher.md +28 -0
  161. package/.versions/0.0.4/agents/security-auditor.md +166 -0
  162. package/.versions/0.0.4/agents/test-engineer.md +151 -0
  163. package/.versions/0.0.4/agents/web-debugger.md +42 -0
  164. package/.versions/0.0.4/agents/web-performance-auditor.md +192 -0
  165. package/.versions/0.0.4/codex/CONDUCTOR.md +148 -0
  166. package/.versions/0.0.4/docs/ARCHITECTURE.md +210 -0
  167. package/.versions/0.0.4/docs/agent-fleet-setup.md +366 -0
  168. package/.versions/0.0.4/docs/claude-code-coms-bridge.md +103 -0
  169. package/.versions/0.0.4/docs/codex-remote-conductor.md +170 -0
  170. package/.versions/0.0.4/docs/coms-hermes-bridge.md +121 -0
  171. package/.versions/0.0.4/docs/getting-started.md +183 -0
  172. package/.versions/0.0.4/docs/npm-install.md +337 -0
  173. package/.versions/0.0.4/docs/opencode-setup.md +248 -0
  174. package/.versions/0.0.4/docs/pi-extensions.md +288 -0
  175. package/.versions/0.0.4/docs/pi-setup.md +463 -0
  176. package/.versions/0.0.4/docs/skill-anatomy.md +150 -0
  177. package/.versions/0.0.4/hermes/README.md +228 -0
  178. package/.versions/0.0.4/hermes/desktop-plugins/agent-fleet-monitor/plugin.js +19 -0
  179. package/.versions/0.0.4/hermes/desktop-plugins/agent-fleet-monitor/state.js +10 -0
  180. package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/adapter-cap.test.py +15 -0
  181. package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/adapter-discovery.test.py +19 -0
  182. package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/adapter-envelope.test.py +13 -0
  183. package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/adapter-forged-owner.test.py +11 -0
  184. package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/adapter-lease-list.test.py +9 -0
  185. package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/adapter-multihub.test.py +17 -0
  186. package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/adapter-output.test.py +34 -0
  187. package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/adapter.py +151 -0
  188. package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/adapter.test.py +39 -0
  189. package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/manifest.json +11 -0
  190. package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/plugin-api-validation.test.py +12 -0
  191. package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/plugin_api.py +50 -0
  192. package/.versions/0.0.4/hermes/plugins/agent-fleet-monitor/dashboard/review-live-wiring.red.test.py +22 -0
  193. package/.versions/0.0.4/hermes/skills/hub-conductor/SKILL.md +84 -0
  194. package/.versions/0.0.4/hermes/skills/hub-liaison/SKILL.md +84 -0
  195. package/.versions/0.0.4/hooks/SIMPLIFY-IGNORE.md +90 -0
  196. package/.versions/0.0.4/hooks/coms-stop-hook.mjs +73 -0
  197. package/.versions/0.0.4/hooks/hooks.json +14 -0
  198. package/.versions/0.0.4/hooks/session-start.sh +74 -0
  199. package/.versions/0.0.4/hooks/simplify-ignore.sh +302 -0
  200. package/.versions/0.0.4/justfile +256 -0
  201. package/.versions/0.0.4/references/accessibility-checklist.md +160 -0
  202. package/.versions/0.0.4/references/definition-of-done.md +67 -0
  203. package/.versions/0.0.4/references/fleet-coordination-patterns.md +151 -0
  204. package/.versions/0.0.4/references/observability-checklist.md +91 -0
  205. package/.versions/0.0.4/references/orchestration-patterns.md +370 -0
  206. package/.versions/0.0.4/references/performance-checklist.md +153 -0
  207. package/.versions/0.0.4/references/prompting-patterns.md +380 -0
  208. package/.versions/0.0.4/references/security-checklist.md +179 -0
  209. package/.versions/0.0.4/references/testing-patterns.md +236 -0
  210. package/.versions/0.0.4/scripts/codex-conductor.ts +41 -0
  211. package/.versions/0.0.4/scripts/codex-remote-control.ts +167 -0
  212. package/.versions/0.0.4/scripts/coms-claude-bridge.ts +286 -0
  213. package/.versions/0.0.4/scripts/coms-cli.ts +484 -0
  214. package/.versions/0.0.4/scripts/coms-hermes-bridge.ts +403 -0
  215. package/.versions/0.0.4/scripts/hermes-monitor-capability-runner.ts +25 -0
  216. package/.versions/0.0.4/scripts/hermes-monitor-scenario.ts +7 -0
  217. package/.versions/0.0.4/scripts/lib/claude-bridge-core.ts +100 -0
  218. package/.versions/0.0.4/scripts/lib/codex-conductor.ts +88 -0
  219. package/.versions/0.0.4/scripts/lib/codex-remote-control.ts +480 -0
  220. package/.versions/0.0.4/scripts/lib/coms-envelope.ts +539 -0
  221. package/.versions/0.0.4/scripts/lib/fake-herdr-server.ts +88 -0
  222. package/.versions/0.0.4/scripts/lib/herdr-layout.ts +263 -0
  223. package/.versions/0.0.4/scripts/lib/hermes-bridge-core.ts +238 -0
  224. package/.versions/0.0.4/scripts/lib/hermes-monitor-herdr.ts +28 -0
  225. package/.versions/0.0.4/scripts/lib/hermes-monitor-model.ts +9 -0
  226. package/.versions/0.0.4/scripts/lib/hermes-monitor-registry.ts +6 -0
  227. package/.versions/0.0.4/scripts/lib/hermes-monitor-socket.ts +118 -0
  228. package/.versions/0.0.4/scripts/lib/hermes-monitor-store.ts +31 -0
  229. package/.versions/0.0.4/scripts/lib/persona-banner.ts +62 -0
  230. package/.versions/0.0.4/scripts/lib/spawn-stagger.ts +101 -0
  231. package/.versions/0.0.4/scripts/lib/team-project.ts +184 -0
  232. package/.versions/0.0.4/scripts/lib/team-snapshot.ts +147 -0
  233. package/.versions/0.0.4/scripts/peer-banner.ts +40 -0
  234. package/.versions/0.0.4/scripts/team-snapshot.ts +238 -0
  235. package/.versions/0.0.4/scripts/team-up.ts +333 -0
  236. package/.versions/0.0.4/skills/_internal/grilling.md +11 -0
  237. package/.versions/0.0.4/skills/browser-testing-with-devtools/SKILL.md +352 -0
  238. package/.versions/0.0.4/skills/code-review-and-quality/SKILL.md +381 -0
  239. package/.versions/0.0.4/skills/compound-learning/SKILL.md +137 -0
  240. package/.versions/0.0.4/skills/context-engineering/SKILL.md +291 -0
  241. package/.versions/0.0.4/skills/deprecation-and-migration/SKILL.md +206 -0
  242. package/.versions/0.0.4/skills/designing-agents/SKILL.md +394 -0
  243. package/.versions/0.0.4/skills/designing-agents/pi-harness-authoring.md +222 -0
  244. package/.versions/0.0.4/skills/frontend-ui-engineering/SKILL.md +328 -0
  245. package/.versions/0.0.4/skills/git-workflow-and-versioning/SKILL.md +316 -0
  246. package/.versions/0.0.4/skills/guided-workspace-setup/SKILL.md +535 -0
  247. package/.versions/0.0.4/skills/guided-workspace-setup/companion-manifest.json +33 -0
  248. package/.versions/0.0.4/skills/idea-refine/SKILL.md +182 -0
  249. package/.versions/0.0.4/skills/idea-refine/examples.md +238 -0
  250. package/.versions/0.0.4/skills/idea-refine/frameworks.md +99 -0
  251. package/.versions/0.0.4/skills/idea-refine/refinement-criteria.md +113 -0
  252. package/.versions/0.0.4/skills/idea-refine/scripts/idea-refine.sh +15 -0
  253. package/.versions/0.0.4/skills/incremental-implementation/SKILL.md +287 -0
  254. package/.versions/0.0.4/skills/interview-me/SKILL.md +226 -0
  255. package/.versions/0.0.4/skills/orchestration-verification/SKILL.md +181 -0
  256. package/.versions/0.0.4/skills/peer-coms/SKILL.md +90 -0
  257. package/.versions/0.0.4/skills/performance-optimization/SKILL.md +350 -0
  258. package/.versions/0.0.4/skills/planning-and-task-breakdown/SKILL.md +236 -0
  259. package/.versions/0.0.4/skills/security-and-hardening/SKILL.md +461 -0
  260. package/.versions/0.0.4/skills/spec-driven-development/SKILL.md +245 -0
  261. package/.versions/0.0.4/skills/using-agent-skills/SKILL.md +199 -0
  262. package/.versions/0.0.4/systemd/user/agent-fleet-codex-remote-control.service.in +23 -0
  263. package/.versions/0.0.4/vendor/agent-skills-upstream/LICENSE +21 -0
  264. package/.versions/0.0.4/vendor/agent-skills-upstream/README.md +11 -0
  265. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/api-and-interface-design/SKILL.md +294 -0
  266. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/browser-testing-with-devtools/SKILL.md +317 -0
  267. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/ci-cd-and-automation/SKILL.md +390 -0
  268. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/code-review-and-quality/SKILL.md +396 -0
  269. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/code-simplification/SKILL.md +331 -0
  270. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/context-engineering/SKILL.md +289 -0
  271. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/debugging-and-error-recovery/SKILL.md +300 -0
  272. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/deprecation-and-migration/SKILL.md +247 -0
  273. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/documentation-and-adrs/SKILL.md +278 -0
  274. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/doubt-driven-development/SKILL.md +243 -0
  275. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/frontend-ui-engineering/SKILL.md +328 -0
  276. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/git-workflow-and-versioning/SKILL.md +355 -0
  277. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/idea-refine/SKILL.md +178 -0
  278. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/idea-refine/examples.md +238 -0
  279. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/idea-refine/frameworks.md +99 -0
  280. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/idea-refine/refinement-criteria.md +113 -0
  281. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/idea-refine/scripts/idea-refine.sh +15 -0
  282. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/incremental-implementation/SKILL.md +249 -0
  283. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/interview-me/SKILL.md +225 -0
  284. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/observability-and-instrumentation/SKILL.md +203 -0
  285. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/performance-optimization/SKILL.md +350 -0
  286. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/planning-and-task-breakdown/SKILL.md +234 -0
  287. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/security-and-hardening/SKILL.md +467 -0
  288. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/shipping-and-launch/SKILL.md +310 -0
  289. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/source-driven-development/SKILL.md +194 -0
  290. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/spec-driven-development/SKILL.md +206 -0
  291. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/test-driven-development/SKILL.md +383 -0
  292. package/.versions/0.0.4/vendor/agent-skills-upstream/skills/using-agent-skills/SKILL.md +191 -0
  293. package/CHANGELOG.md +53 -0
  294. package/README.md +103 -541
  295. package/agents/architect.md +1 -1
  296. package/agents/builder.md +1 -1
  297. package/agents/code-reviewer.md +1 -1
  298. package/agents/deep-researcher.md +3 -3
  299. package/agents/orchestrator.md +20 -11
  300. package/agents/plan-reviewer.md +3 -3
  301. package/agents/planner.md +1 -1
  302. package/agents/security-auditor.md +1 -1
  303. package/agents/test-engineer.md +11 -4
  304. package/bin/lib/validate-overrides.js +19 -0
  305. package/bin/snapshot-version.js +17 -1
  306. package/bin/sync-harness-versions.js +94 -0
  307. package/codex/CONDUCTOR.md +148 -0
  308. package/docs/ARCHITECTURE.md +210 -0
  309. package/docs/agent-fleet-setup.md +11 -0
  310. package/docs/claude-code-coms-bridge.md +10 -0
  311. package/docs/codex-remote-conductor.md +170 -0
  312. package/docs/coms-hermes-bridge.md +121 -0
  313. package/docs/getting-started.md +14 -0
  314. package/docs/npm-install.md +2 -0
  315. package/docs/pi-extensions.md +49 -14
  316. package/docs/pi-setup.md +12 -4
  317. package/hermes/README.md +228 -0
  318. package/hermes/desktop-plugins/agent-fleet-monitor/plugin.js +19 -0
  319. package/hermes/desktop-plugins/agent-fleet-monitor/state.js +10 -0
  320. package/hermes/plugins/agent-fleet-monitor/dashboard/adapter-cap.test.py +15 -0
  321. package/hermes/plugins/agent-fleet-monitor/dashboard/adapter-discovery.test.py +19 -0
  322. package/hermes/plugins/agent-fleet-monitor/dashboard/adapter-envelope.test.py +13 -0
  323. package/hermes/plugins/agent-fleet-monitor/dashboard/adapter-forged-owner.test.py +11 -0
  324. package/hermes/plugins/agent-fleet-monitor/dashboard/adapter-lease-list.test.py +9 -0
  325. package/hermes/plugins/agent-fleet-monitor/dashboard/adapter-multihub.test.py +17 -0
  326. package/hermes/plugins/agent-fleet-monitor/dashboard/adapter-output.test.py +34 -0
  327. package/hermes/plugins/agent-fleet-monitor/dashboard/adapter.py +151 -0
  328. package/hermes/plugins/agent-fleet-monitor/dashboard/adapter.test.py +39 -0
  329. package/hermes/plugins/agent-fleet-monitor/dashboard/dist/index.js +10 -0
  330. package/hermes/plugins/agent-fleet-monitor/dashboard/manifest.json +11 -0
  331. package/hermes/plugins/agent-fleet-monitor/dashboard/plugin-api-validation.test.py +12 -0
  332. package/hermes/plugins/agent-fleet-monitor/dashboard/plugin_api.py +50 -0
  333. package/hermes/plugins/agent-fleet-monitor/dashboard/review-live-wiring.red.test.py +22 -0
  334. package/hermes/skills/hub-conductor/SKILL.md +84 -0
  335. package/hermes/skills/hub-liaison/SKILL.md +84 -0
  336. package/justfile +106 -23
  337. package/package.json +17 -5
  338. package/scripts/codex-conductor.ts +41 -0
  339. package/scripts/codex-remote-control.ts +167 -0
  340. package/scripts/coms-cli.ts +311 -199
  341. package/scripts/coms-hermes-bridge.ts +2 -2
  342. package/scripts/lib/codex-conductor.ts +88 -0
  343. package/scripts/lib/codex-remote-control.ts +480 -0
  344. package/scripts/lib/coms-envelope.ts +51 -6
  345. package/scripts/lib/fake-herdr-server.ts +88 -0
  346. package/scripts/lib/herdr-layout.ts +18 -3
  347. package/scripts/lib/hermes-bridge-core.ts +4 -4
  348. package/scripts/lib/hermes-monitor-herdr.ts +28 -0
  349. package/scripts/lib/hermes-monitor-model.ts +9 -0
  350. package/scripts/lib/hermes-monitor-registry.ts +6 -0
  351. package/scripts/lib/hermes-monitor-socket.ts +118 -0
  352. package/scripts/lib/hermes-monitor-store.ts +31 -0
  353. package/scripts/lib/team-project.ts +85 -1
  354. package/scripts/team-up.ts +77 -18
  355. package/skills/designing-agents/SKILL.md +2 -2
  356. package/skills/designing-agents/pi-harness-authoring.md +26 -13
  357. package/skills/guided-workspace-setup/SKILL.md +131 -102
  358. package/skills/guided-workspace-setup/companion-manifest.json +33 -0
  359. package/skills/peer-coms/SKILL.md +9 -0
  360. package/systemd/user/agent-fleet-codex-remote-control.service.in +23 -0
  361. package/.pi/harnesses/damage-control/README.md +0 -65
  362. package/.pi/harnesses/damage-control/index.ts +0 -250
@@ -0,0 +1,248 @@
1
+ # OpenCode Setup
2
+
3
+ This guide explains how to use Agent Fleet with OpenCode in a way that closely mirrors the Claude Code experience (automatic skill selection, lifecycle-driven workflows, and strict process enforcement).
4
+
5
+ ## Overview
6
+
7
+ OpenCode supports custom `/commands`, but does not have a native plugin system or automatic skill routing like Claude Code.
8
+
9
+ Instead, we achieve parity through:
10
+
11
+ - A strong system prompt (`AGENTS.md`)
12
+ - The built-in `skill` tool
13
+ - Consistent skill discovery from the `/skills` directory
14
+ - Optional prefixed slash commands from `.opencode/commands/`
15
+
16
+ This creates an **agent-driven workflow** where skills are selected and executed automatically, with optional explicit lifecycle commands when you want them.
17
+
18
+ This integration defaults to an agent-driven approach:
19
+
20
+ - Skills are selected automatically based on intent
21
+ - Workflows are enforced via `AGENTS.md`
22
+ - Manual command invocation is optional, not required
23
+
24
+ This more closely matches how Claude Code behaves in practice, while still allowing explicit OpenCode slash commands.
25
+
26
+ ---
27
+
28
+ ## Installation
29
+
30
+ 1. Clone the repository:
31
+
32
+ ```bash
33
+ git clone https://github.com/chankov/agent-fleet.git
34
+ ```
35
+
36
+ 2. Install the global OpenCode configuration.
37
+
38
+ Set `AGENT_SKILLS_DIR` to wherever you cloned the repo (used in the snippets below):
39
+
40
+ ```bash
41
+ export AGENT_SKILLS_DIR="/path/to/agent-fleet"
42
+ ```
43
+
44
+ Add the repo's `AGENTS.md` to your global `~/.config/opencode/opencode.json` instructions list (replace `/path/to/agent-fleet` with the absolute path on your machine — `~` is not expanded inside JSON):
45
+
46
+ ```json
47
+ {
48
+ "instructions": [
49
+ "/path/to/agent-fleet/AGENTS.md"
50
+ ],
51
+ "permission": {
52
+ "skill": {
53
+ "*": "allow"
54
+ }
55
+ }
56
+ }
57
+ ```
58
+
59
+ Link the skills and commands into your global OpenCode config directory. Symlinking individual files (rather than the whole directory) avoids replacing skills or commands you may already have installed from other sources:
60
+
61
+ ```bash
62
+ mkdir -p ~/.config/opencode/skills ~/.config/opencode/commands
63
+
64
+ # Skills: link each skill directory individually.
65
+ for d in "$AGENT_SKILLS_DIR"/skills/*/; do
66
+ ln -s "$d" "$HOME/.config/opencode/skills/$(basename "$d")"
67
+ done
68
+
69
+ # Commands: link each command file individually.
70
+ for f in "$AGENT_SKILLS_DIR"/.opencode/commands/*.md; do
71
+ ln -s "$f" "$HOME/.config/opencode/commands/$(basename "$f")"
72
+ done
73
+ ```
74
+
75
+ > ⚠️ If you already have `~/.config/opencode/skills` or `~/.config/opencode/commands` populated from other sources, do **not** replace the whole directory — use the per-file symlink approach above. The previous `ln -sfn <dir>` shortcut would silently overwrite the existing directory.
76
+
77
+ 3. Restart OpenCode.
78
+
79
+ 4. Open any project in OpenCode.
80
+
81
+ 5. The following Agent Fleet assets are now available globally:
82
+
83
+ - `AGENTS.md` instructions from the repo root
84
+ - All skills from `skills/`
85
+ - Optional prefixed slash commands from `.opencode/commands/`
86
+
87
+ ### Optional Slash Commands
88
+
89
+ This repo ships OpenCode-native commands with an `af-` prefix so they are easy to distinguish from other commands:
90
+
91
+ - `/af-spec`
92
+ - `/af-plan`
93
+ - `/af-build`
94
+ - `/af-test`
95
+ - `/af-review`
96
+ - `/af-code-simplify`
97
+ - `/af-ship`
98
+ - `/af-webperf`
99
+ - `/af-design-agent`
100
+ - `/af-orchestrate`
101
+ - `/af-prime`
102
+ - `/af-setup-agent-fleet`
103
+ - `/af-doctor-agent-fleet`
104
+
105
+ These commands are optional shortcuts. The agent can still invoke the correct skills automatically from plain natural-language requests.
106
+
107
+ ---
108
+
109
+ ## How It Works
110
+
111
+ ### 1. Skill Discovery
112
+
113
+ All skills live in:
114
+
115
+ ```
116
+ skills/<skill-name>/SKILL.md
117
+ ```
118
+
119
+ OpenCode agents are instructed (via `AGENTS.md`) to:
120
+
121
+ - Detect when a skill applies
122
+ - Invoke the `skill` tool
123
+ - Follow the skill exactly
124
+
125
+ ### 2. Automatic Skill Invocation
126
+
127
+ The agent evaluates every request and maps it to the appropriate skill.
128
+
129
+ Examples:
130
+
131
+ - "build a feature" → `incremental-implementation` + `test-driven-development`
132
+ - "design a system" → `spec-driven-development`
133
+ - "fix a bug" → `debugging-and-error-recovery`
134
+ - "review this code" → `code-review-and-quality`
135
+
136
+ The user does **not** need to explicitly request skills.
137
+
138
+ ### 3. Lifecycle Mapping
139
+
140
+ The development lifecycle is encoded implicitly via `AGENTS.md` and is also exposed through optional prefixed slash commands. Both routes invoke the same underlying skills:
141
+
142
+ | Lifecycle phase | Claude Code command | OpenCode command | Underlying skill(s) |
143
+ | --------------- | ------------------- | ------------------ | ------------------------------------------------------------- |
144
+ | DEFINE | `/spec` | `/af-spec` | `spec-driven-development` |
145
+ | PLAN | `/plan` | `/af-plan` | `planning-and-task-breakdown` |
146
+ | BUILD | `/build` | `/af-build` | `incremental-implementation` + `test-driven-development` |
147
+ | TEST | `/test` | `/af-test` | `test-driven-development` |
148
+ | VERIFY | — | — | `debugging-and-error-recovery` (implicit on failure) |
149
+ | REVIEW | `/review` | `/af-review` | `code-review-and-quality` |
150
+ | SIMPLIFY | `/code-simplify` | `/af-code-simplify`| `code-simplification` |
151
+ | SHIP | `/ship` | `/af-ship` | `shipping-and-launch` |
152
+ | WEBPERF | `/webperf` | `/af-webperf` | `web-performance-auditor` persona (`performance-optimization`) |
153
+ | AUTHOR | `/design-agent` | `/af-design-agent` | `designing-agents` |
154
+ | ORCHESTRATE | `/orchestrate` | `/af-orchestrate` | `orchestration-verification` |
155
+
156
+ ---
157
+
158
+ ## Usage Examples
159
+
160
+ ### Example 1: Feature Development
161
+
162
+ User:
163
+ ```
164
+ Add authentication to this app
165
+ ```
166
+
167
+ Agent behavior:
168
+ - Detects feature work
169
+ - Invokes `spec-driven-development`
170
+ - Produces a spec before writing code
171
+ - Moves to planning and implementation skills
172
+
173
+ ---
174
+
175
+ ### Example 2: Bug Fix
176
+
177
+ User:
178
+ ```
179
+ This endpoint is returning 500 errors
180
+ ```
181
+
182
+ Agent behavior:
183
+ - Invokes `debugging-and-error-recovery`
184
+ - Reproduces → localizes → fixes → adds guards
185
+
186
+ ---
187
+
188
+ ### Example 3: Code Review
189
+
190
+ User:
191
+ ```
192
+ Review this PR
193
+ ```
194
+
195
+ Agent behavior:
196
+ - Invokes `code-review-and-quality`
197
+ - Applies structured review (correctness, design, readability, etc.)
198
+
199
+ ---
200
+
201
+ ## Agent Expectations (Critical)
202
+
203
+ For OpenCode to work correctly, the agent must follow these rules:
204
+
205
+ - Always check if a skill applies before acting
206
+ - If a skill applies, it MUST be used
207
+ - Never skip required workflows (spec, plan, test, etc.)
208
+ - Do not jump directly to implementation
209
+
210
+ These rules are enforced via `AGENTS.md`.
211
+
212
+ ---
213
+
214
+ ## Limitations
215
+
216
+ - No plugin system (handled via prompt + structure)
217
+ - Skill invocation depends on model compliance
218
+
219
+ Despite these, the workflow closely matches Claude Code in practice.
220
+
221
+ ---
222
+
223
+ ## Recommended Workflow
224
+
225
+ Just use natural language:
226
+
227
+ - "Design a feature"
228
+ - "Plan this change"
229
+ - "Implement this"
230
+ - "Fix this bug"
231
+ - "Review this"
232
+
233
+ The agent will automatically select and execute the correct skills.
234
+
235
+ If you prefer explicit entry points, use the shipped slash commands such as `/af-spec`, `/af-plan`, or `/af-review`.
236
+
237
+ ---
238
+
239
+ ## Summary
240
+
241
+ OpenCode integration works by combining:
242
+
243
+ - Structured skills (this repo)
244
+ - Strong agent rules (`AGENTS.md`)
245
+ - Automatic skill invocation via reasoning
246
+ - Optional `af-` prefixed slash commands for explicit lifecycle entry points
247
+
248
+ This results in a **production-grade engineering workflow** that works both as an agent-driven system and as an explicit command-driven workflow.
@@ -0,0 +1,288 @@
1
+ # pi Extensions
2
+
3
+ A catalog of the pi extensions in this repo — what each one does, how to run it, the
4
+ supporting data it needs, and how the ported set differs from upstream.
5
+
6
+ ---
7
+
8
+ ## Attribution
9
+
10
+ The session harnesses documented here — together with their supporting agent
11
+ definitions, design specs, and the `justfile` — are ported
12
+ from the **`pi-vs-claude-code`** project:
13
+
14
+ - **Author:** [disler](https://github.com/disler) (IndyDevDan)
15
+ - **Source:** <https://github.com/disler/pi-vs-claude-code>
16
+ - **License:** MIT — Copyright (c) 2026 IndyDevDan
17
+
18
+ Ported files retain their original authorship; this repo adapts them to its layout and
19
+ conventions. Runtime design specs for the imported harnesses live in `docs/pi-specs/`.
20
+
21
+ ---
22
+
23
+ ## What these extensions are
24
+
25
+ `.pi/extensions/` ships always-on **utility** extensions — `mcp-bridge`,
26
+ `chrome-devtools-mcp`, `compact-and-continue`, `agent-fleet-update-check`, `btw`, and
27
+ `pi-voice-stt`. pi
28
+ auto-discovers that directory, so they layer onto every session. `btw` adds a
29
+ `/btw <task>` prompt command (plus an `Alt+'` shortcut) that forks the current session
30
+ into an in-process sub-session and opens a live modal over it — full context, same
31
+ cwd, follow-up composer, with a compact result card landing in the main transcript at
32
+ idle. See [.pi/extensions/btw/README.md](../.pi/extensions/btw/README.md).
33
+
34
+ `pi-voice-stt` adds **Alt+S** push-to-talk dictation: it records the mic to a temp WAV via
35
+ `ffmpeg` and transcribes through one of three backends — a generic OpenAI-compatible endpoint,
36
+ Azure Speech (REST short-audio, with optional per-phrase language identification), or Azure
37
+ OpenAI Whisper (Azure AI Foundry). Alt+S toggles record→insert; Enter-while-recording
38
+ transcribes and sends; Esc cancels. It is **gated**: the hotkey binds only once a provider is
39
+ configured (project-local `.ai/stt.json`, the global `~/.pi/agent/stt.json`, or `PI_STT_CONFIG`),
40
+ so an unconfigured session is a no-op. `/stt doctor`
41
+ checks the setup. A simplified port of [`cgarrot/pi-voice-stt`](https://github.com/cgarrot/pi-voice-stt);
42
+ see [.pi/extensions/pi-voice-stt/README.md](../.pi/extensions/pi-voice-stt/README.md).
43
+
44
+ The documented harnesses below are different: each is a **session harness**. They
45
+ reshape the whole pi session — some remove every codebase tool and leave only an
46
+ orchestration tool, some set UI surfaces, some gate every tool call. Most are loaded
47
+ one per session; the supported stack is `damage-control-continue` + `ask-user-remote`
48
+ before `agent-hub`, which the `just hub` recipes use by default. They live in
49
+ **`.pi/harnesses/`** — a directory pi does *not* auto-discover — so a plain `pi`
50
+ run never loads them.
51
+
52
+ ### Selective loading — read this first
53
+
54
+ pi auto-discovers every extension directory under a project's `.pi/extensions/` and loads
55
+ all of them. If the harnesses lived there, a plain `pi` run would load them all at once
56
+ — UI surfaces would fight, orchestrators would collide, and harnesses that register the
57
+ same CLI flags would abort startup with duplicate registrations. So the harnesses live in
58
+ `.pi/harnesses/` instead, and you load the desired recipe explicitly:
59
+
60
+ - through the `justfile` — `just hub`, `just ext-damage-control-continue`, `just safe-coms`, …
61
+ - or directly — `pi -e .pi/harnesses/<name>/index.ts`
62
+
63
+ When you consume this repo from another project, point `pi -e` at the harness file you
64
+ want, or symlink that one directory into *its* `.pi/harnesses/` — never drop the harnesses
65
+ into `.pi/extensions/`, and never load all of them at once. The supported multi-harness
66
+ exception is loading `damage-control-continue` and `ask-user-remote` before `agent-hub` for a guarded hub session (see
67
+ [pi-setup.md](pi-setup.md#optional-pi-extensions)).
68
+
69
+ ---
70
+
71
+ ## Setup
72
+
73
+ ```bash
74
+ just install # one-time — installs runtime deps for extensions + harnesses
75
+ just hub # launch the supported multi-agent hub with damage-control guardrails
76
+ just --list # see every recipe
77
+ ```
78
+
79
+ `just install` runs `npm install` for both dependency roots: `.pi/extensions/` for the
80
+ utilities (`@modelcontextprotocol/sdk`, `typebox`) and `.pi/harnesses/` for the harnesses
81
+ (`@sinclair/typebox`, `yaml`). The `@mariozechner/pi-*` packages are provided by the pi
82
+ runtime itself.
83
+
84
+ ---
85
+
86
+ ## Catalog
87
+
88
+ | Extension | Category | What it does | Run |
89
+ |-----------|----------|--------------|-----|
90
+ | [agent-hub](../.pi/harnesses/agent-hub/README.md) | Orchestration | Supported multi-agent hub: damage-control guardrails by default via `just hub`, dispatcher grid, specialist delegation, research helpers, persona gate, embedded coms, `/handoff`, peer-as-subagent, and footer `v<version> · <model><thinking> · <team>` — plus, inside a [herdr](https://herdr.dev) pane, fleet tools (`herdr_spawn_peer` / `herdr_read_pane` / `herdr_close_pane` with human confirmation / `herdr_notify`) | `just hub` |
91
+ | [ask-user-remote](../.pi/harnesses/ask-user-remote/README.md) | Orchestration | Captures stock `pi-ask-user` and registers the default `ask_user`; with `user-remote` live it races local UI against the Hermes bridge, otherwise it is stock local behavior | loaded by `just hub` / `hub-solo` |
92
+ | [damage-control-continue](../.pi/harnesses/damage-control-continue/README.md) | Safety | Only supported safety harness; guards the hub plus every native specialist, researcher, and delegate. Blocks feed back without aborting the turn; protected paths support explicit approval, while dangerous command patterns remain non-exemptible | `just ext-damage-control-continue` |
93
+ | [coms](../.pi/harnesses/coms/README.md) | Messaging | Peer-to-peer messaging between pi agents on one machine; launches damage-control-continue-guarded under a chosen name | `just safe-coms <name>` |
94
+ | [Hermes local monitor transport](../hermes/README.md#local-agent-hub-monitor-integration) | Optional local companion | Owner-only discovery + Unix socket for agent-hub snapshots, cursor output, and exact-generation cancellation; consumed by a separate local Hermes client | Set the two monitor environment variables, then run `just hub-team <team>` |
95
+
96
+ Each extension directory has its own `README.md` with the full description, command/tool
97
+ surface, requirements, and per-extension upstream changes.
98
+
99
+ ### Migration: retired hard-stop harness
100
+
101
+ The former `.pi/harnesses/damage-control/` hard-stop harness and `just ext-damage-control`
102
+ recipe are retired. Refresh pi harnesses with guided setup: it removes only an unchanged,
103
+ setup-recorded copy (or an agent-fleet source symlink), preserves user-modified/unowned copies,
104
+ and refreshes the managed `justfile` region. Use `damage-control-continue` for standalone and
105
+ Agent Hub safety; missing child safety now fails closed instead of falling back or spawning
106
+ unguarded.
107
+
108
+ ### Harness version footer and provenance
109
+
110
+ The three persistent-UI harnesses — `agent-hub`, `coms`, and
111
+ `damage-control-continue` — each register `v<version>` on one shared status key. In pi's
112
+ default status footer, that shared key gives a supported stack exactly one version instead of one
113
+ copy per harness. `agent-hub` replaces the default footer: it does **not** consume that status
114
+ key. Its custom footer reads its own adjacent stamped manifest and renders one local version
115
+ first — `v<version> · <model><thinking> · <team>` — so an agent-hub stack also displays the
116
+ version exactly once.
117
+
118
+ The shared version status is independent of mutable owner status: for example, a
119
+ Damage-Control violation can replace its own safety message without overwriting the version
120
+ entry. The canonical value is the root `package.json` version. During a release,
121
+ `bin/sync-harness-versions.js` stamps that value into each adjacent persistent-harness
122
+ `package.json` after the root bump and before lockfile finalization and snapshotting. Each
123
+ harness keeps a local `version.ts` provenance reader so copied or symlinked harness directories
124
+ resolve their adjacent stamp rather than the launch directory. That local provenance does not
125
+ make a harness self-contained: copied target harnesses still require the existing full
126
+ `.pi/harnesses/` dependency installation described in [Setup](#setup).
127
+
128
+ ### `agent-hub` components
129
+
130
+ `agent-hub` is the consolidated orchestration harness. It replaces the retired standalone
131
+ `agent-team` recipe and absorbs the day-to-day pieces that previously required separate
132
+ harnesses:
133
+
134
+ - **Dispatcher grid** — fixed specialists from `.pi/agents/teams.yaml`, shown in a live dashboard
135
+ with compact/full view toggling.
136
+ - **Specialist delegation** — `dispatch_agent` for writable child-agent work and
137
+ `spawn_research` / `/research` for read-only investigation.
138
+ - **Verification Contract** — the dispatcher owns a ledger of checkable acceptance assertions
139
+ built before any builder runs, via the `set_assertions` / `update_assertion` tools. Each
140
+ assertion is tagged (`test` | `runtime-ui` | `code-grep` | `manual`) and advanced only on
141
+ *proven with evidence*; the ledger persists to `.pi/agent-sessions/assertions.json` (wiped at
142
+ session start like `findings/`) and shows a one-line status, keeping the contract out of the
143
+ dispatcher LLM context. It kills the parity failure (exemplar shipped, siblings missed) by
144
+ requiring a parity/touchpoint inventory for "behave like" requests and runtime proof for UI
145
+ assertions — see the [`orchestration-verification`](../skills/orchestration-verification/SKILL.md)
146
+ skill, which the `orchestrator` persona drives. Advisory in this phase (surfaced, not a hard
147
+ dispatch refusal).
148
+ - **Persona gate** — requires an orchestrator persona at startup unless disabled in the local
149
+ override file; the chosen persona also feeds the coms purpose when no explicit `--purpose` is set.
150
+ - **Operator controls** — `/zoom` timeline inspection plus child-agent kill/restart controls.
151
+ - **Damage-control + ask_user by default** — `just hub` / `just hub-solo` load the
152
+ `damage-control-continue` safety harness and `ask-user-remote` before `agent-hub`, so the
153
+ dispatcher's tool calls are checked against the rules file and the `askUserAvailable` probe sees
154
+ `ask_user`. A blocked call feeds back and the turn keeps going rather than aborting. `agent-hub` also
155
+ re-loads `damage-control-continue` into every native specialist, research helper, and nested
156
+ delegate (via an explicit `-e` that survives `--no-extensions`). Protected-path access can be
157
+ granted at runtime: `/allow <pattern> [turn|session]` in the hub pre-authorizes, a parent-session
158
+ block opens an approval dialog, and a headless child escalates to the hub. Protected deletion
159
+ offers only deny/once; other protected paths may be scoped to an agent or session. Denial and
160
+ timeout fail closed without aborting the child turn. Destructive bash patterns are never exemptible,
161
+ and a missing continue harness refuses child dispatch.
162
+ - **Embedded coms** — peer discovery, `coms_list` / `coms_send` / `coms_get` / `coms_await`,
163
+ `/handoff`, and peer-as-subagent flows.
164
+ - **Solo mode** — `just hub-solo` keeps the dispatcher grid, delegation, research helpers, persona
165
+ gate, and controls, but starts without the embedded coms layer.
166
+ - **Optional Hermes local monitor transport** — uses `AGENT_FLEET_PROFILE_ID`, the absolute
167
+ `AGENT_FLEET_MONITOR_RUNTIME_DIR`, and the Herdr `HERDR_WORKSPACE_ID` and `HERDR_PANE_ID`
168
+ required to establish its stable hub identity. It is a source-owned, local-only transport—not a
169
+ Hermes SDK task/lifecycle RPC or a bundled plugin—and fails closed without validated owner-only
170
+ discovery, lease, token, and socket state. Follow the
171
+ [Hermes integration guide](../hermes/README.md#local-agent-hub-monitor-integration) for startup,
172
+ wire examples, cancellation semantics, and reconnect behavior.
173
+
174
+ ---
175
+
176
+ ## Two browser stacks — when to use which
177
+
178
+ This repo ships **two** ways to drive a browser from a pi agent. They are complementary, not redundant — the axis that separates them is the **tool model** (and where they can run), not just headless-vs-headful, since both can do either:
179
+
180
+ | | `bowser` / `playwright-cli` | `web-debugger` / `chrome-devtools-mcp` |
181
+ |---|---|---|
182
+ | Tool model | CLI over **Bash** (no tool schemas in context) | live `chrome_devtools__*` MCP tools |
183
+ | Strength | headless, parallel named sessions, background automation, scraping, token-efficient | interactive headful debugging, live DOM/console/network, performance traces |
184
+ | Where it runs | **dispatched subagent** (survives `--no-extensions`), peer, or main session | main session or **coms peer** (the extension must be loaded into the process) |
185
+ | Persona | `bowser` | `web-debugger` |
186
+ | Skill | `.pi/skills/bowser/` | `skills/browser-testing-with-devtools/` |
187
+
188
+ **Policy:**
189
+
190
+ - **Automated / CI / background / parallel runtime-UI evidence** → `bowser` (headless `playwright-cli`). This is what the `orchestrator` delegates as a subagent to close `runtime-ui` acceptance assertions.
191
+ - **Interactive debugging of a running dev app** → `web-debugger` (headful `chrome-devtools-mcp`), reached as a coms peer or run on the main session.
192
+ - **Manual visual inspection / login flows** → `web-debugger` headful, or attach to an existing Chrome.
193
+ - **Always require runtime evidence** — snapshot + console + network before/after a critical interaction; a screenshot only for visual/layout confirmation.
194
+
195
+ Why `web-debugger` is a coms peer and not a dispatchable subagent: its `chrome_devtools__*` tools come from the always-on `chrome-devtools-mcp` extension, and agent-hub spawns subagents with `--no-extensions`, so a dispatched child would not have those tools. A coms peer is its own pi process that loads the extension explicitly (via the `extensions:` field in `.pi/agents/peers.yaml`, routed through the `_peer-plus` recipe), and a long-lived peer maps naturally onto one persistent live browser. `bowser` has no such constraint because it only needs Bash + the `playwright-cli` binary on PATH.
196
+
197
+ ## Environment variables
198
+
199
+ The `justfile` sets `dotenv-load`, so a `.env` file at the repo root is auto-loaded
200
+ (`.env` is gitignored). Only a few extensions need keys:
201
+
202
+ | Variable | Needed by | Purpose |
203
+ |----------|-----------|---------|
204
+ | `PI_CHROME_DEVTOOLS_MODE` | `chrome-devtools-mcp` | `headless` runs Chrome with no UI; anything else (default) is headed |
205
+ | `PI_CHROME_DEVTOOLS_BROWSER_URL` | `chrome-devtools-mcp` | Attach to a running Chrome (e.g. `http://127.0.0.1:9222`) instead of launching one |
206
+ | `PI_CHROME_DEVTOOLS_USER_DATA_DIR` | `chrome-devtools-mcp` | Persistent Chrome profile path (else the default ephemeral `--isolated` profile) |
207
+ | `OPENAI_API_KEY` | `pi-voice-stt` (openai backend) | API key for the OpenAI-compatible transcription endpoint (var name overridable via `provider.apiKeyEnv`) |
208
+ | `AZURE_SPEECH_KEY` | `pi-voice-stt` (azure backend) | Azure Speech resource key |
209
+ | `AZURE_SPEECH_ENDPOINT` | `pi-voice-stt` (azure backend) | Azure resource endpoint, used when `provider.endpoint` is unset |
210
+ | `PI_STT_CONFIG` / `PI_STT_KEYBIND` | `pi-voice-stt` | Override config (inline JSON or path) / the record hotkey (default `alt+s`) |
211
+ | `AGENT_FLEET_SPAWN_DELAY` | `_peer` / `_peer-plus` recipes | Seconds to sleep before launching pi in a fleet pane (set per pane by `team-up`/`team-resume`, see below) |
212
+
213
+ The `chrome-devtools-mcp` server starts once at extension load, so changing its vars needs a pi
214
+ restart / `/reload` to take effect.
215
+
216
+ ### Spawn pre-warm/stagger
217
+
218
+ pi loads its credential store (`~/.pi/agent/auth.json`) once at boot under a short-retry
219
+ file lock. When the stored OAuth token is stale, the first pi to boot refreshes it over
220
+ the network *while holding that lock*; sibling panes spawned in the same instant (as
221
+ `just team-up` / `just hub-team` / `just team-resume` do) lose the lock race and come up
222
+ with every provider showing **unconfigured**. To dodge this, the team scripts check
223
+ `auth.json` before spawning (only `type`/`expires` are read — values never leave the
224
+ process): if any OAuth credential is expired or about to expire, one pi pane (the hub
225
+ when present, else the first pi peer) starts immediately and refreshes the token, and
226
+ every other pi pane gets `AGENT_FLEET_SPAWN_DELAY` in its pane env — the `_peer` /
227
+ `_peer-plus` recipes sleep that many seconds before launching pi. Fresh tokens mean zero
228
+ delay everywhere; `claude-code` runner panes never wait. Pure logic in
229
+ `scripts/lib/spawn-stagger.ts` (under `node --test`).
230
+
231
+ ---
232
+
233
+ ## Supporting data
234
+
235
+ These ported files are runtime dependencies of the extensions above:
236
+
237
+ - **`agents/`** — canonical persona Markdown files for shared and pi-specific agents.
238
+ Read by `agent-hub`.
239
+ - **`.pi/agents/`** — pi YAML configs only (`teams.yaml`, `peers.yaml`).
240
+ The earlier `reviewer` and `red-team` personas were folded into `code-reviewer` and
241
+ `security-auditor`; the remaining team/peer configs already reference the canonical names.
242
+ A peer entry may carry an optional `extensions:` field (comma-separated names under
243
+ `.pi/extensions/`) — `team-up` then routes it through the `_peer-plus` recipe so those
244
+ extensions load into the peer process. The `web-debugger` peer uses this to get
245
+ `chrome-devtools-mcp`'s `chrome_devtools__*` tools (see the two-browser-stacks section above).
246
+ - **`.pi/damage-control-rules.yaml`** — the destructive-command / protected-path rule set
247
+ for `damage-control-continue`.
248
+ - **`.pi/skills/bowser/`** — a pi-runtime skill for headless Playwright browser
249
+ automation, used by the `bowser` agent persona. Kept separate from the core
250
+ engineering `skills/`. It drives the external **Playwright Agent CLI**
251
+ (`playwright-cli`), which is **not** bundled — install it once with
252
+ `npm install -g @playwright/cli@latest` (the guided setup checks for it when
253
+ `bowser` is selected). Docs: <https://playwright.dev/agent-cli/installation>.
254
+ - **`docs/pi-specs/`** — the original design specifications: `agent-forge` (now consolidated
255
+ into `agent-hub`), `agent-workflow` (retired `agent-chain`), and `damage-control`.
256
+
257
+ ---
258
+
259
+ ## Upstream changes
260
+
261
+ What changed relative to `disler/pi-vs-claude-code`:
262
+
263
+ - **Theme code removed.** Every ported harness imported `applyExtensionDefaults` from a
264
+ shared `themeMap.ts`. That import and its `session_start` call site were stripped from
265
+ the ported files; `themeMap.ts` and the 11 `.pi/themes/*.json` palettes are not ported.
266
+ Extensions render against pi's active theme.
267
+ - **Layout converted.** Flat `extensions/<name>.ts` files became
268
+ `.pi/harnesses/<name>/index.ts` directories, each with its own `package.json` and
269
+ `README.md`. They live under `.pi/harnesses/` — *not* `.pi/extensions/` — because pi
270
+ auto-discovers and loads everything in `.pi/extensions/`, while harnesses must be loaded
271
+ explicitly through recipes (with `damage-control-continue` + `ask-user-remote` before
272
+ `agent-hub` as the supported stack).
273
+ - **Tooling switched to npm.** `bun` / `bun.lock` are not used; the `justfile` recipes
274
+ point at the new paths and use npm.
275
+
276
+ ### Not ported
277
+
278
+ - The `pure-focus`, `theme-cycler`, and `cross-agent` extensions.
279
+ - `themeMap.ts` and all 11 `.pi/themes/*.json` theme palettes.
280
+ - The Claude Code `statusLine` config and `status_lines/status_line.py`, and the
281
+ `plan_w_team.md` command (it depended on team-agent files absent from the source).
282
+
283
+ ### A note on `.pi/settings.json`
284
+
285
+ Upstream shipped a `.pi/settings.json` that only set the (now-stripped) theme and
286
+ registered a prompt directory. This repo already keeps pi prompts in the standard
287
+ `.pi/prompts/` location, so no `.pi/settings.json` is shipped — it would carry nothing
288
+ useful.