@chankov/agent-fleet 1.0.3 → 1.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 (310) hide show
  1. package/.pi/harnesses/agent-hub/README.md +25 -11
  2. package/.pi/harnesses/agent-hub/delegate.ts +14 -3
  3. package/.pi/harnesses/agent-hub/index.ts +212 -40
  4. package/.pi/harnesses/agent-hub/package.json +1 -1
  5. package/.pi/harnesses/agent-hub/spawn.ts +25 -3
  6. package/.pi/harnesses/coms/package.json +1 -1
  7. package/.pi/harnesses/damage-control-continue/package.json +1 -1
  8. package/.pi/harnesses/lib/fleet-dashboard-ops.ts +2 -2
  9. package/.pi/harnesses/lib/fleet-detail-view.ts +95 -16
  10. package/.pi/harnesses/lib/fleet-transcript-store.ts +244 -0
  11. package/.pi/prompts/af-plan.md +6 -5
  12. package/.versions/1.0.4/.pi/agents/dispatch-policy.yaml +32 -0
  13. package/.versions/1.0.4/.pi/agents/model-profiles.yaml +27 -0
  14. package/.versions/1.0.4/.pi/agents/peers.yaml +142 -0
  15. package/.versions/1.0.4/.pi/agents/teams.yaml +41 -0
  16. package/.versions/1.0.4/.pi/damage-control-rules.yaml +297 -0
  17. package/.versions/1.0.4/.pi/extensions/agent-fleet-update-check/README.md +57 -0
  18. package/.versions/1.0.4/.pi/extensions/agent-fleet-update-check/index.ts +161 -0
  19. package/.versions/1.0.4/.pi/extensions/agent-fleet-update-check/package.json +6 -0
  20. package/.versions/1.0.4/.pi/extensions/btw/README.md +120 -0
  21. package/.versions/1.0.4/.pi/extensions/btw/index.ts +914 -0
  22. package/.versions/1.0.4/.pi/extensions/btw/package.json +6 -0
  23. package/.versions/1.0.4/.pi/extensions/btw/state.js +179 -0
  24. package/.versions/1.0.4/.pi/extensions/chrome-devtools-mcp/README.md +55 -0
  25. package/.versions/1.0.4/.pi/extensions/chrome-devtools-mcp/index.ts +93 -0
  26. package/.versions/1.0.4/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
  27. package/.versions/1.0.4/.pi/extensions/compact-and-continue/README.md +42 -0
  28. package/.versions/1.0.4/.pi/extensions/compact-and-continue/index.ts +120 -0
  29. package/.versions/1.0.4/.pi/extensions/compact-and-continue/package.json +6 -0
  30. package/.versions/1.0.4/.pi/extensions/mcp-bridge/README.md +46 -0
  31. package/.versions/1.0.4/.pi/extensions/mcp-bridge/index.ts +206 -0
  32. package/.versions/1.0.4/.pi/extensions/mcp-bridge/package.json +6 -0
  33. package/.versions/1.0.4/.pi/extensions/package-lock.json +1175 -0
  34. package/.versions/1.0.4/.pi/extensions/package.json +9 -0
  35. package/.versions/1.0.4/.pi/extensions/pi-voice-stt/README.md +205 -0
  36. package/.versions/1.0.4/.pi/extensions/pi-voice-stt/config.ts +198 -0
  37. package/.versions/1.0.4/.pi/extensions/pi-voice-stt/examples/stt.json +35 -0
  38. package/.versions/1.0.4/.pi/extensions/pi-voice-stt/index.ts +248 -0
  39. package/.versions/1.0.4/.pi/extensions/pi-voice-stt/package.json +6 -0
  40. package/.versions/1.0.4/.pi/extensions/pi-voice-stt/providers.ts +214 -0
  41. package/.versions/1.0.4/.pi/extensions/pi-voice-stt/recorder.ts +158 -0
  42. package/.versions/1.0.4/.pi/harnesses/agent-hub/README.md +1170 -0
  43. package/.versions/1.0.4/.pi/harnesses/agent-hub/access-approval.ts +135 -0
  44. package/.versions/1.0.4/.pi/harnesses/agent-hub/artifacts.js +146 -0
  45. package/.versions/1.0.4/.pi/harnesses/agent-hub/assertion-ledger.js +58 -0
  46. package/.versions/1.0.4/.pi/harnesses/agent-hub/backend-policy.js +174 -0
  47. package/.versions/1.0.4/.pi/harnesses/agent-hub/budget-continuation.ts +73 -0
  48. package/.versions/1.0.4/.pi/harnesses/agent-hub/capability-confirmation.ts +47 -0
  49. package/.versions/1.0.4/.pi/harnesses/agent-hub/capability-packs.ts +180 -0
  50. package/.versions/1.0.4/.pi/harnesses/agent-hub/context-budget-snapshot.ts +105 -0
  51. package/.versions/1.0.4/.pi/harnesses/agent-hub/context-pressure.ts +191 -0
  52. package/.versions/1.0.4/.pi/harnesses/agent-hub/context-window.js +106 -0
  53. package/.versions/1.0.4/.pi/harnesses/agent-hub/delegate.ts +446 -0
  54. package/.versions/1.0.4/.pi/harnesses/agent-hub/docs-lane.js +122 -0
  55. package/.versions/1.0.4/.pi/harnesses/agent-hub/drift-watchdog.js +218 -0
  56. package/.versions/1.0.4/.pi/harnesses/agent-hub/evidence-rules.js +96 -0
  57. package/.versions/1.0.4/.pi/harnesses/agent-hub/execution-profile.ts +69 -0
  58. package/.versions/1.0.4/.pi/harnesses/agent-hub/external-blocker.js +85 -0
  59. package/.versions/1.0.4/.pi/harnesses/agent-hub/footer.ts +36 -0
  60. package/.versions/1.0.4/.pi/harnesses/agent-hub/helpers.ts +266 -0
  61. package/.versions/1.0.4/.pi/harnesses/agent-hub/hub-state-audit.js +59 -0
  62. package/.versions/1.0.4/.pi/harnesses/agent-hub/index.ts +10171 -0
  63. package/.versions/1.0.4/.pi/harnesses/agent-hub/monitor-control.ts +9 -0
  64. package/.versions/1.0.4/.pi/harnesses/agent-hub/monitor-invoke-journal.ts +131 -0
  65. package/.versions/1.0.4/.pi/harnesses/agent-hub/monitor-invoke.ts +92 -0
  66. package/.versions/1.0.4/.pi/harnesses/agent-hub/monitor-lifecycle.ts +13 -0
  67. package/.versions/1.0.4/.pi/harnesses/agent-hub/monitor-publisher.ts +59 -0
  68. package/.versions/1.0.4/.pi/harnesses/agent-hub/monitor-recovery.ts +3 -0
  69. package/.versions/1.0.4/.pi/harnesses/agent-hub/monitor-runtime.ts +3 -0
  70. package/.versions/1.0.4/.pi/harnesses/agent-hub/monitor-session-bridge.ts +266 -0
  71. package/.versions/1.0.4/.pi/harnesses/agent-hub/package.json +7 -0
  72. package/.versions/1.0.4/.pi/harnesses/agent-hub/peer-spawn-plan.ts +116 -0
  73. package/.versions/1.0.4/.pi/harnesses/agent-hub/posture.ts +158 -0
  74. package/.versions/1.0.4/.pi/harnesses/agent-hub/provider-semaphore.js +138 -0
  75. package/.versions/1.0.4/.pi/harnesses/agent-hub/research-retention.js +34 -0
  76. package/.versions/1.0.4/.pi/harnesses/agent-hub/research-watchdog.ts +40 -0
  77. package/.versions/1.0.4/.pi/harnesses/agent-hub/return-contract.js +293 -0
  78. package/.versions/1.0.4/.pi/harnesses/agent-hub/return-extract.js +75 -0
  79. package/.versions/1.0.4/.pi/harnesses/agent-hub/review-findings.js +102 -0
  80. package/.versions/1.0.4/.pi/harnesses/agent-hub/run-budget.js +537 -0
  81. package/.versions/1.0.4/.pi/harnesses/agent-hub/run-namespace.js +87 -0
  82. package/.versions/1.0.4/.pi/harnesses/agent-hub/safety-routing.ts +22 -0
  83. package/.versions/1.0.4/.pi/harnesses/agent-hub/scope-gate.js +103 -0
  84. package/.versions/1.0.4/.pi/harnesses/agent-hub/session-health.js +110 -0
  85. package/.versions/1.0.4/.pi/harnesses/agent-hub/spawn.ts +388 -0
  86. package/.versions/1.0.4/.pi/harnesses/agent-hub/version.ts +42 -0
  87. package/.versions/1.0.4/.pi/harnesses/ask-user-remote/README.md +53 -0
  88. package/.versions/1.0.4/.pi/harnesses/ask-user-remote/index.ts +532 -0
  89. package/.versions/1.0.4/.pi/harnesses/ask-user-remote/race-core.js +106 -0
  90. package/.versions/1.0.4/.pi/harnesses/coms/README.md +100 -0
  91. package/.versions/1.0.4/.pi/harnesses/coms/index.ts +1767 -0
  92. package/.versions/1.0.4/.pi/harnesses/coms/package.json +7 -0
  93. package/.versions/1.0.4/.pi/harnesses/coms/version.ts +42 -0
  94. package/.versions/1.0.4/.pi/harnesses/damage-control-continue/README.md +124 -0
  95. package/.versions/1.0.4/.pi/harnesses/damage-control-continue/index.ts +536 -0
  96. package/.versions/1.0.4/.pi/harnesses/damage-control-continue/package.json +7 -0
  97. package/.versions/1.0.4/.pi/harnesses/damage-control-continue/version.ts +42 -0
  98. package/.versions/1.0.4/.pi/harnesses/lib/coms-registry-entry.ts +94 -0
  99. package/.versions/1.0.4/.pi/harnesses/lib/context-budget-child-prompt.ts +179 -0
  100. package/.versions/1.0.4/.pi/harnesses/lib/context-budget-hub-prompt.ts +116 -0
  101. package/.versions/1.0.4/.pi/harnesses/lib/context-budget-view.ts +107 -0
  102. package/.versions/1.0.4/.pi/harnesses/lib/context-budget.ts +114 -0
  103. package/.versions/1.0.4/.pi/harnesses/lib/damage-control-shared.ts +197 -0
  104. package/.versions/1.0.4/.pi/harnesses/lib/fixtures/context-budget-profiles.json +11 -0
  105. package/.versions/1.0.4/.pi/harnesses/lib/fixtures/hub-prompt-operator.legacy.txt +73 -0
  106. package/.versions/1.0.4/.pi/harnesses/lib/fixtures/hub-prompt-orchestrator.legacy.txt +73 -0
  107. package/.versions/1.0.4/.pi/harnesses/lib/fleet-dashboard-ops.ts +155 -0
  108. package/.versions/1.0.4/.pi/harnesses/lib/fleet-dashboard-view.ts +142 -0
  109. package/.versions/1.0.4/.pi/harnesses/lib/fleet-detail-view.ts +247 -0
  110. package/.versions/1.0.4/.pi/harnesses/lib/fleet-overlay.ts +26 -0
  111. package/.versions/1.0.4/.pi/harnesses/lib/fleet-panel.ts +34 -0
  112. package/.versions/1.0.4/.pi/harnesses/lib/fleet-read-model.ts +131 -0
  113. package/.versions/1.0.4/.pi/harnesses/lib/fleet-selection.ts +24 -0
  114. package/.versions/1.0.4/.pi/harnesses/lib/fleet-transcript-store.ts +244 -0
  115. package/.versions/1.0.4/.pi/harnesses/lib/herdr-client.ts +472 -0
  116. package/.versions/1.0.4/.pi/harnesses/lib/herdr-presence.ts +399 -0
  117. package/.versions/1.0.4/.pi/harnesses/lib/hermes-monitor-events.ts +136 -0
  118. package/.versions/1.0.4/.pi/harnesses/lib/hermes-monitor-herdr.ts +28 -0
  119. package/.versions/1.0.4/.pi/harnesses/lib/hermes-monitor-model.ts +18 -0
  120. package/.versions/1.0.4/.pi/harnesses/lib/hermes-monitor-registry.ts +6 -0
  121. package/.versions/1.0.4/.pi/harnesses/lib/hermes-monitor-socket.ts +163 -0
  122. package/.versions/1.0.4/.pi/harnesses/lib/hermes-monitor-store.ts +31 -0
  123. package/.versions/1.0.4/.pi/harnesses/lib/spawned-peers.js +190 -0
  124. package/.versions/1.0.4/.pi/harnesses/package-lock.json +2039 -0
  125. package/.versions/1.0.4/.pi/harnesses/package.json +10 -0
  126. package/.versions/1.0.4/.pi/prompts/af-build.md +24 -0
  127. package/.versions/1.0.4/.pi/prompts/af-code-simplify.md +22 -0
  128. package/.versions/1.0.4/.pi/prompts/af-plan.md +17 -0
  129. package/.versions/1.0.4/.pi/prompts/af-review.md +16 -0
  130. package/.versions/1.0.4/.pi/prompts/af-set-hermes-telegram.md +15 -0
  131. package/.versions/1.0.4/.pi/prompts/af-set-hermes-watchdog.md +6 -0
  132. package/.versions/1.0.4/.pi/prompts/af-ship.md +17 -0
  133. package/.versions/1.0.4/.pi/prompts/af-spec.md +15 -0
  134. package/.versions/1.0.4/.pi/prompts/af-test.md +19 -0
  135. package/.versions/1.0.4/.pi/skills/bowser/SKILL.md +145 -0
  136. package/.versions/1.0.4/.version +1 -0
  137. package/.versions/1.0.4/agents/architect.md +25 -0
  138. package/.versions/1.0.4/agents/bowser.md +28 -0
  139. package/.versions/1.0.4/agents/builder.md +56 -0
  140. package/.versions/1.0.4/agents/code-reviewer.md +209 -0
  141. package/.versions/1.0.4/agents/deep-researcher.md +33 -0
  142. package/.versions/1.0.4/agents/documenter.md +19 -0
  143. package/.versions/1.0.4/agents/orchestrator.md +21 -0
  144. package/.versions/1.0.4/agents/plan-reviewer.md +84 -0
  145. package/.versions/1.0.4/agents/planner.md +71 -0
  146. package/.versions/1.0.4/agents/releaser.md +25 -0
  147. package/.versions/1.0.4/agents/researcher.md +29 -0
  148. package/.versions/1.0.4/agents/security-auditor.md +168 -0
  149. package/.versions/1.0.4/agents/test-engineer.md +154 -0
  150. package/.versions/1.0.4/agents/web-debugger.md +44 -0
  151. package/.versions/1.0.4/agents/web-performance-auditor.md +194 -0
  152. package/.versions/1.0.4/bin/catalog/harness-runtime-closure.json +38 -0
  153. package/.versions/1.0.4/codex/CONDUCTOR.md +148 -0
  154. package/.versions/1.0.4/docs/ARCHITECTURE.md +375 -0
  155. package/.versions/1.0.4/docs/agent-fleet-setup.md +468 -0
  156. package/.versions/1.0.4/docs/claude-code-coms-bridge.md +128 -0
  157. package/.versions/1.0.4/docs/codex-remote-conductor.md +170 -0
  158. package/.versions/1.0.4/docs/coms-hermes-bridge.md +189 -0
  159. package/.versions/1.0.4/docs/getting-started.md +98 -0
  160. package/.versions/1.0.4/docs/npm-install.md +292 -0
  161. package/.versions/1.0.4/docs/pi-extensions.md +441 -0
  162. package/.versions/1.0.4/docs/pi-setup.md +74 -0
  163. package/.versions/1.0.4/docs/skill-anatomy.md +150 -0
  164. package/.versions/1.0.4/hermes/README.md +347 -0
  165. package/.versions/1.0.4/hermes/desktop-plugins/agent-fleet-herdr/plugin.js +1291 -0
  166. package/.versions/1.0.4/hermes/desktop-plugins/agent-fleet-herdr/presentation.js +672 -0
  167. package/.versions/1.0.4/hermes/desktop-plugins/agent-fleet-monitor/plugin.js +19 -0
  168. package/.versions/1.0.4/hermes/desktop-plugins/agent-fleet-monitor/state.js +10 -0
  169. package/.versions/1.0.4/hermes/gates/gate-o-capability.md +8 -0
  170. package/.versions/1.0.4/hermes/gates/gate-o-validator-fixtures.json +1 -0
  171. package/.versions/1.0.4/hermes/plugins/agent-fleet-herdr/dashboard/activity.py +770 -0
  172. package/.versions/1.0.4/hermes/plugins/agent-fleet-herdr/dashboard/coms_registry.py +134 -0
  173. package/.versions/1.0.4/hermes/plugins/agent-fleet-herdr/dashboard/coms_send.py +350 -0
  174. package/.versions/1.0.4/hermes/plugins/agent-fleet-herdr/dashboard/herdr_source.py +193 -0
  175. package/.versions/1.0.4/hermes/plugins/agent-fleet-herdr/dashboard/manifest.json +4 -0
  176. package/.versions/1.0.4/hermes/plugins/agent-fleet-herdr/dashboard/plugin_api.py +444 -0
  177. package/.versions/1.0.4/hermes/plugins/agent-fleet-herdr/dashboard/sessions.py +205 -0
  178. package/.versions/1.0.4/hermes/plugins/agent-fleet-herdr/dashboard/tasks.py +300 -0
  179. package/.versions/1.0.4/hermes/plugins/agent-fleet-herdr/dashboard/watch.py +819 -0
  180. package/.versions/1.0.4/hermes/plugins/agent-fleet-herdr/plugin.yaml +8 -0
  181. package/.versions/1.0.4/hermes/plugins/agent-fleet-monitor/dashboard/adapter.py +139 -0
  182. package/.versions/1.0.4/hermes/plugins/agent-fleet-monitor/dashboard/manifest.json +11 -0
  183. package/.versions/1.0.4/hermes/plugins/agent-fleet-monitor/dashboard/plugin_api.py +50 -0
  184. package/.versions/1.0.4/hermes/skills/hub-conductor/SKILL.md +84 -0
  185. package/.versions/1.0.4/hermes/skills/hub-liaison/SKILL.md +84 -0
  186. package/.versions/1.0.4/hermes/skills/hub-watchdog/SKILL.md +76 -0
  187. package/.versions/1.0.4/hermes/skills/hub-watchdog/manifest.json +1 -0
  188. package/.versions/1.0.4/hermes/skills/hub-watchdog/scripts/watchdog.py +249 -0
  189. package/.versions/1.0.4/hermes/skills/hub-watchdog/scripts/watchdog_actions.py +124 -0
  190. package/.versions/1.0.4/hermes/skills/hub-watchdog/scripts/watchdog_contract.py +76 -0
  191. package/.versions/1.0.4/hermes/skills/hub-watchdog/scripts/watchdog_delivery.py +10 -0
  192. package/.versions/1.0.4/hermes/skills/hub-watchdog/scripts/watchdog_engine.py +128 -0
  193. package/.versions/1.0.4/hermes/skills/hub-watchdog/scripts/watchdog_judgment.py +41 -0
  194. package/.versions/1.0.4/hermes/skills/hub-watchdog/scripts/watchdog_recovery.py +103 -0
  195. package/.versions/1.0.4/hermes/skills/hub-watchdog/scripts/watchdog_state.py +163 -0
  196. package/.versions/1.0.4/hermes/skills/hub-watchdog/scripts/watchdog_transport.py +138 -0
  197. package/.versions/1.0.4/hermes/watchdog-tests/__init__.py +0 -0
  198. package/.versions/1.0.4/hooks/coms-stop-hook.mjs +84 -0
  199. package/.versions/1.0.4/install-manifest.json +2745 -0
  200. package/.versions/1.0.4/justfile +272 -0
  201. package/.versions/1.0.4/manifest-meta.json +882 -0
  202. package/.versions/1.0.4/references/accessibility-checklist.md +160 -0
  203. package/.versions/1.0.4/references/definition-of-done.md +67 -0
  204. package/.versions/1.0.4/references/fleet-coordination-patterns.md +151 -0
  205. package/.versions/1.0.4/references/observability-checklist.md +91 -0
  206. package/.versions/1.0.4/references/orchestration-patterns.md +370 -0
  207. package/.versions/1.0.4/references/performance-checklist.md +153 -0
  208. package/.versions/1.0.4/references/prompting-patterns.md +380 -0
  209. package/.versions/1.0.4/references/security-checklist.md +179 -0
  210. package/.versions/1.0.4/references/testing-patterns.md +236 -0
  211. package/.versions/1.0.4/scripts/codex-conductor.ts +41 -0
  212. package/.versions/1.0.4/scripts/codex-remote-control.ts +167 -0
  213. package/.versions/1.0.4/scripts/coms-claude-bridge.ts +411 -0
  214. package/.versions/1.0.4/scripts/coms-cli.ts +484 -0
  215. package/.versions/1.0.4/scripts/coms-hermes-bridge.ts +413 -0
  216. package/.versions/1.0.4/scripts/fleet.ts +185 -0
  217. package/.versions/1.0.4/scripts/hermes-monitor-capability-runner.ts +25 -0
  218. package/.versions/1.0.4/scripts/hermes-monitor-scenario.ts +474 -0
  219. package/.versions/1.0.4/scripts/hermes-watchdog-capability-probe.ts +45 -0
  220. package/.versions/1.0.4/scripts/install-hermes-plugin.sh +180 -0
  221. package/.versions/1.0.4/scripts/lib/claude-bridge-core.ts +210 -0
  222. package/.versions/1.0.4/scripts/lib/codex-conductor.ts +88 -0
  223. package/.versions/1.0.4/scripts/lib/codex-remote-control.ts +480 -0
  224. package/.versions/1.0.4/scripts/lib/coms-envelope.ts +582 -0
  225. package/.versions/1.0.4/scripts/lib/fake-herdr-server.ts +88 -0
  226. package/.versions/1.0.4/scripts/lib/fleet-command.ts +266 -0
  227. package/.versions/1.0.4/scripts/lib/herdr-layout.ts +281 -0
  228. package/.versions/1.0.4/scripts/lib/hermes-bridge-core.ts +241 -0
  229. package/.versions/1.0.4/scripts/lib/hermes-monitor-events.ts +1 -0
  230. package/.versions/1.0.4/scripts/lib/hermes-monitor-herdr.ts +2 -0
  231. package/.versions/1.0.4/scripts/lib/hermes-monitor-model.ts +3 -0
  232. package/.versions/1.0.4/scripts/lib/hermes-monitor-registry.ts +2 -0
  233. package/.versions/1.0.4/scripts/lib/hermes-monitor-socket.ts +2 -0
  234. package/.versions/1.0.4/scripts/lib/hermes-monitor-store.ts +2 -0
  235. package/.versions/1.0.4/scripts/lib/monitor-env.ts +146 -0
  236. package/.versions/1.0.4/scripts/lib/peer-launch.ts +318 -0
  237. package/.versions/1.0.4/scripts/lib/persona-banner.ts +62 -0
  238. package/.versions/1.0.4/scripts/lib/spawn-stagger.ts +101 -0
  239. package/.versions/1.0.4/scripts/lib/team-project.ts +213 -0
  240. package/.versions/1.0.4/scripts/lib/team-snapshot.ts +147 -0
  241. package/.versions/1.0.4/scripts/peer-banner.ts +40 -0
  242. package/.versions/1.0.4/scripts/peer-launch.ts +259 -0
  243. package/.versions/1.0.4/scripts/team-snapshot.ts +237 -0
  244. package/.versions/1.0.4/scripts/team-up.ts +406 -0
  245. package/.versions/1.0.4/skills/_internal/grilling.md +59 -0
  246. package/.versions/1.0.4/skills/browser-testing-with-devtools/SKILL.md +351 -0
  247. package/.versions/1.0.4/skills/code-review-and-quality/SKILL.md +381 -0
  248. package/.versions/1.0.4/skills/compound-learning/SKILL.md +137 -0
  249. package/.versions/1.0.4/skills/context-engineering/SKILL.md +291 -0
  250. package/.versions/1.0.4/skills/deprecation-and-migration/SKILL.md +206 -0
  251. package/.versions/1.0.4/skills/designing-agents/SKILL.md +394 -0
  252. package/.versions/1.0.4/skills/designing-agents/pi-harness-authoring.md +222 -0
  253. package/.versions/1.0.4/skills/frontend-ui-engineering/SKILL.md +328 -0
  254. package/.versions/1.0.4/skills/git-workflow-and-versioning/SKILL.md +316 -0
  255. package/.versions/1.0.4/skills/idea-refine/SKILL.md +182 -0
  256. package/.versions/1.0.4/skills/idea-refine/examples.md +238 -0
  257. package/.versions/1.0.4/skills/idea-refine/frameworks.md +99 -0
  258. package/.versions/1.0.4/skills/idea-refine/refinement-criteria.md +113 -0
  259. package/.versions/1.0.4/skills/idea-refine/scripts/idea-refine.sh +15 -0
  260. package/.versions/1.0.4/skills/incremental-implementation/SKILL.md +298 -0
  261. package/.versions/1.0.4/skills/interview-me/SKILL.md +226 -0
  262. package/.versions/1.0.4/skills/orchestration-verification/SKILL.md +181 -0
  263. package/.versions/1.0.4/skills/peer-coms/SKILL.md +90 -0
  264. package/.versions/1.0.4/skills/performance-optimization/SKILL.md +350 -0
  265. package/.versions/1.0.4/skills/planning-and-task-breakdown/SKILL.md +263 -0
  266. package/.versions/1.0.4/skills/security-and-hardening/SKILL.md +461 -0
  267. package/.versions/1.0.4/skills/spec-driven-development/SKILL.md +256 -0
  268. package/.versions/1.0.4/skills/using-agent-skills/SKILL.md +197 -0
  269. package/.versions/1.0.4/systemd/user/agent-fleet-codex-remote-control.service.in +23 -0
  270. package/.versions/1.0.4/vendor/agent-skills-upstream/LICENSE +21 -0
  271. package/.versions/1.0.4/vendor/agent-skills-upstream/README.md +11 -0
  272. package/.versions/1.0.4/vendor/agent-skills-upstream/skills/api-and-interface-design/SKILL.md +294 -0
  273. package/.versions/1.0.4/vendor/agent-skills-upstream/skills/browser-testing-with-devtools/SKILL.md +317 -0
  274. package/.versions/1.0.4/vendor/agent-skills-upstream/skills/ci-cd-and-automation/SKILL.md +390 -0
  275. package/.versions/1.0.4/vendor/agent-skills-upstream/skills/code-review-and-quality/SKILL.md +396 -0
  276. package/.versions/1.0.4/vendor/agent-skills-upstream/skills/code-simplification/SKILL.md +331 -0
  277. package/.versions/1.0.4/vendor/agent-skills-upstream/skills/context-engineering/SKILL.md +289 -0
  278. package/.versions/1.0.4/vendor/agent-skills-upstream/skills/debugging-and-error-recovery/SKILL.md +300 -0
  279. package/.versions/1.0.4/vendor/agent-skills-upstream/skills/deprecation-and-migration/SKILL.md +247 -0
  280. package/.versions/1.0.4/vendor/agent-skills-upstream/skills/documentation-and-adrs/SKILL.md +278 -0
  281. package/.versions/1.0.4/vendor/agent-skills-upstream/skills/doubt-driven-development/SKILL.md +243 -0
  282. package/.versions/1.0.4/vendor/agent-skills-upstream/skills/frontend-ui-engineering/SKILL.md +328 -0
  283. package/.versions/1.0.4/vendor/agent-skills-upstream/skills/git-workflow-and-versioning/SKILL.md +355 -0
  284. package/.versions/1.0.4/vendor/agent-skills-upstream/skills/idea-refine/SKILL.md +178 -0
  285. package/.versions/1.0.4/vendor/agent-skills-upstream/skills/idea-refine/examples.md +238 -0
  286. package/.versions/1.0.4/vendor/agent-skills-upstream/skills/idea-refine/frameworks.md +99 -0
  287. package/.versions/1.0.4/vendor/agent-skills-upstream/skills/idea-refine/refinement-criteria.md +113 -0
  288. package/.versions/1.0.4/vendor/agent-skills-upstream/skills/idea-refine/scripts/idea-refine.sh +15 -0
  289. package/.versions/1.0.4/vendor/agent-skills-upstream/skills/incremental-implementation/SKILL.md +249 -0
  290. package/.versions/1.0.4/vendor/agent-skills-upstream/skills/interview-me/SKILL.md +225 -0
  291. package/.versions/1.0.4/vendor/agent-skills-upstream/skills/observability-and-instrumentation/SKILL.md +203 -0
  292. package/.versions/1.0.4/vendor/agent-skills-upstream/skills/performance-optimization/SKILL.md +350 -0
  293. package/.versions/1.0.4/vendor/agent-skills-upstream/skills/planning-and-task-breakdown/SKILL.md +234 -0
  294. package/.versions/1.0.4/vendor/agent-skills-upstream/skills/security-and-hardening/SKILL.md +467 -0
  295. package/.versions/1.0.4/vendor/agent-skills-upstream/skills/shipping-and-launch/SKILL.md +310 -0
  296. package/.versions/1.0.4/vendor/agent-skills-upstream/skills/source-driven-development/SKILL.md +194 -0
  297. package/.versions/1.0.4/vendor/agent-skills-upstream/skills/spec-driven-development/SKILL.md +206 -0
  298. package/.versions/1.0.4/vendor/agent-skills-upstream/skills/test-driven-development/SKILL.md +383 -0
  299. package/.versions/1.0.4/vendor/agent-skills-upstream/skills/using-agent-skills/SKILL.md +191 -0
  300. package/CHANGELOG.md +7 -0
  301. package/agents/builder.md +1 -0
  302. package/agents/planner.md +1 -1
  303. package/install-manifest.json +3 -3
  304. package/package.json +2 -2
  305. package/skills/_internal/grilling.md +53 -5
  306. package/skills/idea-refine/SKILL.md +2 -2
  307. package/skills/incremental-implementation/SKILL.md +12 -1
  308. package/skills/planning-and-task-breakdown/SKILL.md +14 -5
  309. package/skills/spec-driven-development/SKILL.md +10 -11
  310. package/skills/using-agent-skills/SKILL.md +13 -15
@@ -0,0 +1,375 @@
1
+ # Agent Fleet Architecture
2
+
3
+ Agent Fleet is a Pi-centered multi-agent orchestration system. This page maps
4
+ the runtime responsibilities and where each module lives in the repository.
5
+
6
+ ## Runtime layers
7
+
8
+ | Layer | Role | Implementation |
9
+ | --- | --- | --- |
10
+ | **Pi Coding Agent** | Primary local runtime — runs the dispatcher and specialist subagents | `.pi/harnesses/`, `.pi/extensions/`, `.pi/agents/`, `.pi/prompts/` |
11
+ | **agent-hub** | Thin-context multi-agent harness: dispatcher + specialists + research helpers + Verification Contract | `.pi/harnesses/agent-hub/` |
12
+ | **Herdr** | Fleet/workspace control plane — spawns peer teams as tiled workspaces, presence via push events, snapshot/resume | [herdr.dev](https://herdr.dev); client in `.pi/harnesses/lib/herdr-client.ts`, layout in `scripts/lib/herdr-layout.ts` |
13
+ | **coms** | Peer communication protocol/data plane — envelope-based P2P messaging between agents | `.pi/harnesses/coms/`, `scripts/lib/coms-envelope.ts`, `scripts/coms-cli.ts` |
14
+ | **Claude Code bridge** | Makes an interactive Claude Code pane a bidirectional coms peer | `scripts/coms-claude-bridge.ts`, `hooks/coms-stop-hook.mjs`, `skills/peer-coms/` — see [claude-code-coms-bridge.md](claude-code-coms-bridge.md) |
15
+ | **Hermes bridge** | Remote human control — relays hub questions to Telegram, races phone vs. local answers, conductor/liaison skills | `scripts/coms-hermes-bridge.ts`, `.pi/harnesses/ask-user-remote/`, `hermes/skills/` — see [coms-hermes-bridge.md](coms-hermes-bridge.md) |
16
+ | **Hermes local monitor transport** | Local, authenticated monitor contract for Hub-owned task generations; consumers supply their own presentation | `.pi/harnesses/agent-hub/monitor-*.ts`, `.pi/harnesses/lib/hermes-monitor-{model,store,registry,socket}.ts` (with compatibility re-exports under `scripts/lib/`) — see [Hermes artifacts](../hermes/README.md#local-agent-hub-monitor-integration) and [watchdog limits](hermes-watchdog-supervisor.md) |
17
+ | **Hermes Desktop plugin** (`agent-fleet-herdr`) | Fleet observability surface — read-only panel of every live session joined from the coms registry, herdr presence, agent transcripts, and the monitor transport; `focus` and subagent `cancel` are its only write doors | `hermes/desktop-plugins/agent-fleet-herdr/` (Electron pane), `hermes/plugins/agent-fleet-herdr/dashboard/` (FastAPI backend), installed by `scripts/install-hermes-plugin.sh` — see [hermes-desktop-plugins.md](hermes-desktop-plugins.md) |
18
+ | **Codex remote-control conductor** | Experimental outbound-only, user-systemd-managed Android conductor; verified on Codex CLI 0.144.x | `scripts/codex-remote-control.ts`, `scripts/codex-conductor.ts`, `codex/CONDUCTOR.md`, `systemd/user/`; runtime under `~/.local/state/agent-fleet/codex-conductor/` — see [codex-remote-conductor.md](codex-remote-conductor.md) |
19
+ | **Skill library** | Lifecycle workflows and quality gates every agent follows | `skills/` (native) + `vendor/agent-skills-upstream/skills/` (vendored) — see [UPSTREAM-SKILLS.md](UPSTREAM-SKILLS.md) |
20
+ | **Personas** | Reusable specialist definitions, installed verbatim | `agents/`, `bin/lib/personas.js` |
21
+
22
+ ## One Hub runtime, independent axes
23
+
24
+ Every public Pi launch through `just fleet` loads Fleet Core and the `agent-hub`
25
+ harness. Three independent choices shape that runtime:
26
+
27
+ | Axis | Choices | What it controls |
28
+ | --- | --- | --- |
29
+ | **Posture** | `operator`, `orchestrator` | Whether the main agent may use direct coding tools. Operator retains the captured `read`/`bash`/`edit`/`write` and approved extension surface; orchestrator removes direct coding tools and keeps dispatch, research, assertions, `ask_user`, and available coms/Herdr tools. `/af-posture` and `/af-work-mode` / **Alt+M** switch this axis. |
30
+ | **Native roster** | empty or one entry from `.pi/agents/teams.yaml` | Which in-process Pi specialist personas `dispatch_agent` may start. Roster changes do not change posture in a live session. |
31
+ | **Peer topology** | current terminal, Hub-only Herdr workspace, or Hub plus a `.pi/agents/peers.yaml` preset | Which separate, addressable Pi/Claude processes occupy sibling panes. Starting or spawning peers does not change posture or the native roster. |
32
+
33
+ Bare `just fleet` therefore means operator posture, an empty native roster, and
34
+ the current terminal. At startup an explicit `--posture` wins; otherwise
35
+ `--agents <roster>` implies orchestrator; otherwise operator is used. An
36
+ orchestrator startup requires a roster. `/af-posture` and `/af-work-mode` /
37
+ **Alt+M** switch only posture in the live session, and `/af-agents-*` changes
38
+ only the native roster. Dispatch, research, nested delegation, and Verification
39
+ Contract rigor follow the **task tier** (`trivial`/`small`/`feature`/`project`),
40
+ not a session execution mode.
41
+
42
+ All Hub-owned slash commands remain registered in both postures. Capability packs are resolved automatically from explicit task intent, posture, tier, pending work, and compaction state—there is no activation command. Runtime **readiness** (a coms or Herdr connection) is not model-visible capability: ready-but-unrequested peer/workspace packs remain inactive. Ambiguous fleet, peer, and workspace requests are provisionally visible but require one `ask_user` confirmation before their first side effect; a rejection removes the provisional pack. Task packs persist across follow-ups and reset only through `set_task_tier(new_task: true)`, while mandatory posture and pending-operation leases remain.
43
+
44
+ `/af-context` is a standalone, read-only full-screen budget diagnostic; it separates stable prompt cost, volatile state, active schemas, and zero-cost inactive/loaded-excluded inputs. Provider totals and cache read/write fields are authoritative where Pi supplies them; it never fabricates provider usage or combines capacity percentages across Hub, child, and peer planes. Managed specialists and research children use explicit replacement prompts/context manifests with selected persona, policy, and skill paths instead of inherited global skills/context files. Runtime gates control whether an action can proceed: without coms, Herdr, a visible target, or an active roster, the corresponding command refuses with an actionable message rather than disappearing. `--browser` and `--all-extensions` expand the captured operator surface only when those optional extensions are installed.
45
+
46
+ ### Context pressure and recovery
47
+
48
+ Standing prompt ceilings constrain the repeatable replacement prompt and active schemas; they do not
49
+ bound conversation messages or results accumulated inside a long tool loop. The Hub therefore has a
50
+ second, runtime pressure guard. It samples provider usage, projects a finalized tool result at
51
+ `message_end`, warns and exposes transient compaction support at **80%**, then at **90%** aborts the
52
+ pre-model continuation and waits for `agent_settled` before requesting one Pi compaction. This
53
+ ordering ensures the result is persisted before summarization and prevents an ordinary provider call
54
+ from escaping between pressure detection and recovery.
55
+
56
+ Recovery is single-flight. High-context startup or concurrent input is retained in memory and
57
+ replayed exactly once after success; failure retains it for `/compact` or a larger-context model.
58
+ `/af-context` and the status line report phase, usage, thresholds, episode, and last outcome. Session
59
+ entries store only numeric/enumerated pressure metadata, never prompts, tool payloads, credentials,
60
+ error bodies, or summaries.
61
+
62
+ A persisted native roster is also metadata, not copied configuration: only its team name is stored
63
+ and it is re-resolved against current teams and persona definitions. A stale or absent roster in a
64
+ resumed orchestrator session fails closed—posture remains orchestrator, direct tools remain removed,
65
+ and model input is blocked until `/af-agents-team`, an explicit `--agent-team <name>` restart, or an
66
+ explicit operator selection resolves it. Explicit CLI posture and roster selections retain
67
+ precedence.
68
+
69
+ Pi's session JSONL is the authoritative append-only record for rebuilding a session, including
70
+ compaction and Hub metadata. Pressure and roster recovery operate through Pi/Hub lifecycle APIs;
71
+ they never rewrite prior entries. Operators must not edit, truncate, reorder, or synthesize JSONL to
72
+ recover a session.
73
+
74
+ The project selected by `--project <name>` is the coms namespace for the Hub
75
+ and every standing or dynamically spawned peer. The Hub-facing peer spawn API
76
+ cannot override it. Native subagents remain children of that Hub and inherit
77
+ its repository context; peers are separate processes in their own panes.
78
+
79
+ At dispatch time, `backend: "auto"` applies
80
+ `.pi/agents/dispatch-policy.yaml`; `backend: "native"` bypasses same-name peer
81
+ substitution; and `backend: "coms"` requires a visible same-name peer and never
82
+ falls back to a native child. `.pi/agents/peers.yaml` owns how a peer runs
83
+ (`runner`, persona, model, extensions, and declared `env_file`), not whether a
84
+ dispatch uses it.
85
+
86
+ ## Fleet hierarchy
87
+
88
+ Agent Fleet is layered on purpose. Work flows **down** (delegate); evidence and status flow **up** — as compact structured returns, never raw dumps.
89
+
90
+ ```mermaid
91
+ flowchart TD
92
+ You(["You · Hermes inbound relay · Codex outbound conductor on your phone"])
93
+
94
+ subgraph HUBL["HUB — guarded runtime (bare just fleet)"]
95
+ Hub["agent-hub harness<br/>operator or orchestrator posture · routes tasks<br/>owns the Verification Contract on disk · keeps research dumps out of its own context"]
96
+ end
97
+
98
+ subgraph TEAML["OPTIONAL NATIVE ROSTER (.pi/agents/teams.yaml)"]
99
+ Team["default: builder · test-engineer · code-reviewer · documenter<br/>also: plan · debug · frontend · security · hotfix · release · info"]
100
+ end
101
+
102
+ subgraph RESL["RESEARCH HELPERS — read-only, always available"]
103
+ Research["researcher (fast tier — simple reads)<br/>deep-researcher (deep tier — hard, cross-cutting questions)"]
104
+ end
105
+
106
+ subgraph SUBL["SUB-AGENTS — focused children, narrow tools + models"]
107
+ Subs["planner → scout · rules · risk<br/>plan-reviewer → feasibility · deps<br/>builder → recon · verifier<br/>test-engineer → coverage-scout · conventions<br/>code-reviewer → preflight · quality · perf · docs<br/>security-auditor → recon · input-sweep · secrets-sweep"]
108
+ end
109
+
110
+ You -->|task| Hub
111
+ Hub -->|"dispatch_agent — one persona = one specialist session"| Team
112
+ Hub -->|"spawn_research"| Research
113
+ Research -.->|"findings written to disk — hub gets paths, not dumps"| Hub
114
+ Team -->|"subagents: block (delegate_depth ≥ 1)"| Subs
115
+ Subs -.->|"results return to the parent agent only"| Team
116
+ Team -.->|"structured return + evidence"| Hub
117
+ Hub -.->|"one status line: Assertions: 2✓ 1○ 1✗"| You
118
+ ```
119
+
120
+ Every specialist session is one persona from [`agents/`](../agents/) — *skills* tell each agent **how** to work; *personas* define **who** they are (see [agents.md](agents.md)).
121
+
122
+ The same idea as a tree:
123
+
124
+ ```text
125
+ hub (operator by default; orchestrator when selected)
126
+ ├── optional native roster (empty by default; example: default)
127
+ │ ├── builder → recon · verifier
128
+ │ ├── test-engineer → coverage-scout · conventions
129
+ │ ├── code-reviewer → preflight · quality · perf · docs
130
+ │ └── documenter
131
+ ├── research helpers (spawn_research, any time)
132
+ │ ├── researcher
133
+ │ └── deep-researcher
134
+ └── optional fleet peers (herdr + coms)
135
+ ├── architect / releaser / web-debugger panes
136
+ ├── Claude Code peer (coms bridge)
137
+ ├── Hermes (phone human · inbound ask_user)
138
+ └── Codex Remote Control (Android · outbound coms delegation)
139
+ ```
140
+
141
+ Composition rule: **the hub (or a slash command) orchestrates; personas do not invoke other personas as peers.** Specialists may only fan out to their configured **sub-agents**. Research helpers write findings to disk; the hub resumes specialists with paths, not raw dumps.
142
+
143
+ ### Research search supervision
144
+
145
+ The shared `spawnPiAgent` seam supervises every `read`/`grep`/`find`/`ls` call from native
146
+ research helpers and nested delegate children. The supervisor tracks JSONL `toolCallId` values
147
+ independently, with a default 120-second deadline (`recon-search-timeout-s: 1..3600|off` under
148
+ `## agent-hub`). It is a per-tool watchdog; the whole-run bound is separate — the task-tier
149
+ per-run deadline (`agent-turn-timeout-s`), which terminates a hung run as `turn_timeout`.
150
+ On timeout or caller cancellation it owns and terminates the child's process group (SIGTERM,
151
+ then SIGKILL after a bounded grace), has a separate settlement timer for missing `close`/pipe
152
+ drain, and reports timeout separately from cancellation. Research helpers and nested delegates
153
+ are each given safe process-group ownership; delegates forward parent termination so no detached
154
+ child is orphaned. Full pattern catalog: [references/orchestration-patterns.md](../references/orchestration-patterns.md).
155
+
156
+ ### Task-tier budgets
157
+
158
+ The hub enforces per-user-turn budgets in code (`run-budget.js`): the current **task tier**
159
+ caps `dispatch_agent` calls, `spawn_research` calls, and active time per turn, sets the
160
+ per-run deadline above, and controls nested delegation (`off` at trivial/small). Exhausted
161
+ budgets make the dispatch tools refuse and request one Yes/No `ask_user` confirmation; Yes
162
+ renews the turn in the same tool loop. A normal new user message also opens a fresh turn
163
+ window.
164
+ Specialist context pressure is measured over input + cacheRead + cacheWrite against **that
165
+ agent's own** model window, resolved from pi's model registry with the source recorded
166
+ (`context-window.js`) — measuring a 49k local model against the dispatcher's window is what
167
+ made readings like "315%" unactionable; anything over 100% now emits a one-time diagnostic
168
+ naming the window and where it came from. Specialist sessions are recycled (fresh spawn
169
+ instead of `-c` resume) after `session-recycle-runs` runs, at ≥60% measured context, and
170
+ unconditionally at a full window; a resumed session whose *projected* prompt would overflow
171
+ is recycled before the spawn rather than after the run. Requests to one provider are capped
172
+ per process (`provider-semaphore.js`: 2 in flight for `custom/*` by default, unlimited
173
+ elsewhere, `AGENT_HUB_PROVIDER_LIMITS` to override) — the cap is per level of the delegation
174
+ tree, and a nested spawn reuses its parent's permit so it can never wait on its own ancestor.
175
+ Configured under `## agent-hub` (`max-dispatches-per-turn`,
176
+ `max-research-per-turn`, `turn-wall-time-s`, `agent-turn-timeout-s`, `session-recycle-runs`,
177
+ `run-history-keep`) as ceilings (`min` with the tier). A leftover `mode:` key is ignored with
178
+ a warning.
179
+
180
+ A per-message allowance cannot bound a task, so a second envelope sits above the turn one:
181
+ the **task budget** (`run-budget.js`, `3×` the turn envelope) counts dispatches, research
182
+ runs and **active** time across the WHOLE task and is *not* reset by a user message. Both turn
183
+ and task active time exclude `ask_user` waits — billing human idle false-stops a normal steered
184
+ session and teaches people to reset reflexively. The auto-research pipe is exempt from the turn
185
+ budget but charged against the task envelope, so it cannot smuggle 8 helpers per dispatch past
186
+ the outer bound.
187
+
188
+ Either envelope stops before another dispatch/research call and asks one localized Yes/No
189
+ `ask_user` question. A confirmed turn continuation renews its counters/clock in the same tool
190
+ loop. A confirmed task continuation opens one audited tranche, also renews the turn, and
191
+ preserves task tier, assertions, capability packs, label, blockers, and progress. No typed
192
+ `continue` message or slash command is required. `set_task_tier` with `new_task: true` is only
193
+ for genuinely different work and clears task identity/state. This is the guardrail the
194
+ post-mortem run never hit: every steering message reopened the turn window,
195
+ so one workspace stayed open 47 hours on a change that took 13 minutes in a narrow one.
196
+
197
+ On top of the tier envelope sit several qualitative guardrails. **Task triage**: the dispatcher
198
+ classifies the current TASK via the `set_task_tier` tool (`trivial`/`small`/`feature`/`project`)
199
+ and that classification *is* the budget. The tier is task-scoped and **ratcheted** — it survives
200
+ the user's next message, lowering is free, raising needs a stated `reason` — because a
201
+ turn-scoped tier reset to `feature` on every correction. Three refusals enforce
202
+ proportionality in code rather than prose: a duplicate-dispatch guard (near-identical
203
+ re-dispatches within a turn), a **tier persona gate** (`planner`, `plan-reviewer`,
204
+ `architect`, `security-auditor`, `deep-researcher` are refused at trivial/small — each opens
205
+ a document/finding loop), and a **review round cap** (review dispatches per task, by tier).
206
+ Skipping triage assumes `small`, not `feature`: the tier latches for the task, and the case
207
+ where it was never declared is exactly the case where proportionality was not being
208
+ considered. The review **finding** budget is the one thing deliberately left advisory — the
209
+ hub counts blocking findings (`review-findings.js`) and reports an over-budget return, but
210
+ never reclassifies one, because no rule it can evaluate separates an invented manifest from
211
+ a leaked credential; the round cap is what carries the enforcement.
212
+ **Docs lane** (`docs-lane.js`): a dispatch whose whole declared `scope` is documentation
213
+ refuses review personas (overridable with `review_reason`) and tells the dispatcher not to
214
+ open a review gate; an absent scope is never the lighter lane. **External-blocker stop**
215
+ (`external-blocker.js`): a specialist emits `EXTERNAL_BLOCKED: …` when it needs something
216
+ outside the fleet's reach (account, permission, credential, telemetry destination), and the
217
+ hub refuses the next dispatch with an owner-escalation packet until the human is addressed —
218
+ the alternative, observed, is hours spent approximating the missing fact with scripts,
219
+ manifests and fixtures while the assertion still ends UNPROVEN. **Drift watchdog**
220
+ (`drift-watchdog.js`): armed dispatches are
221
+ observed in-flight from the JSON event stream — deterministic rules (out-of-scope writes
222
+ against the declared `scope` globs, tool-call loops, consecutive failures, tool-call cap)
223
+ escalate to a one-shot cheap LLM judge whose DRIFTING/STUCK verdict terminates the run as
224
+ `drift_stop` (exit 125, partial output preserved); enabled per hub/agent/dispatch
225
+ (`watchdog` key, `/af-watchdog`, `watchdog` param). Orchestrator posture auto-arms the
226
+ watchdog when the hub setting is `auto`/`on`; a dispatch `watchdog: false` cannot disarm it
227
+ there. Hub or per-agent `off` remains the opt-out. Two rules about scope: the session's
228
+ own `artifacts/`, `findings/`, and `delegations/` subtrees are implicitly in scope (the
229
+ deliverable protocol *orders* specialists to write there, and the judge is told so), and the
230
+ `scope` rule is non-terminal — it reports a drift advisory on the result and never stops a
231
+ run by itself, matching the post-run scope gate, which reverts nothing. **Dynamic teams**: `/af-agents-add`,
232
+ `/af-agents-drop`, `/af-agents-save` restructure the roster live (the system prompt rebuilds
233
+ every turn), and the gated `team_adjust` tool lets the dispatcher itself adjust the roster
234
+ when nested delegation is on (feature/project), with user notification. `/af-hub-report` accounts each turn's dispatches,
235
+ tokens (billed = input + cacheRead + cacheWrite), recycles, drift stops, and refusals.
236
+
237
+ ## Runtime stack (tools the fleet sits on)
238
+
239
+ ```mermaid
240
+ flowchart TD
241
+ AF["<b>Agent Fleet</b><br/>agent-hub · personas · skills · coms · bridges · CLI"]
242
+ AF -->|primary runtime| PI["<b>pi</b><br/>coding agent — loads harnesses,<br/>extensions, prompts, personas"]
243
+ AF -->|control plane| HERDR["<b>herdr</b><br/>tiled peer workspaces,<br/>presence, snapshot/resume"]
244
+ AF -->|coms peer only| CC["<b>Claude Code</b><br/>bidirectional peer via<br/>the coms bridge<br/><i>not an install target</i>"]
245
+ AF -->|remote human| HERMES["<b>Hermes</b><br/>hub questions relayed to your phone,<br/>plus the Desktop fleet panel"]
246
+ AF -->|outbound remote delegation| CODEX["<b>Codex Remote Control</b><br/>Android-approved calls to<br/>listed coms peers (experimental)"]
247
+ ```
248
+
249
+ ### External dependencies
250
+
251
+ These are the external systems Agent Fleet assumes or integrates with — not npm packages, but the **runtime stack** the fleet operates on top of.
252
+
253
+ | Dependency | Role | Required? |
254
+ | --- | --- | --- |
255
+ | **[pi](https://github.com/badlogic/pi-mono)** (or your pi install) | Primary coding-agent runtime; loads harnesses, extensions, prompts, and personas | Yes for `just fleet` |
256
+ | **[herdr](https://herdr.dev)** | Workspace control plane: Hub/peer panes, presence push events, team snapshot/resume | Required for `--herdr` or `--peers`; optional for bare `just fleet` |
257
+ | **[Claude Code](https://docs.anthropic.com/en/docs/claude-code)** | First-class coms peer via the [coms bridge](claude-code-coms-bridge.md) — cross-model review and analysis. Never an install target: it hosts no skills, commands, or personas | Optional peer |
258
+ | **Hermes** | Remote human-in-the-loop (Telegram relay for hub questions — [coms-hermes-bridge](coms-hermes-bridge.md)) and the Desktop fleet panel ([hermes-desktop-plugins](hermes-desktop-plugins.md), needs v0.19.0+ and the Desktop app) | Optional |
259
+ | **Codex CLI + ChatGPT Android** | Experimental outbound remote-control conductor on supported `0.144.x`; requires Node `22.6+`, user systemd, interactive pairing, and per-command mobile approvals — [runbook](codex-remote-conductor.md) | Optional / revalidate after minor-version or mobile-client changes |
260
+ | **[addyosmani/agent-skills](https://github.com/addyosmani/agent-skills)** | Upstream skill library (manually vendored) | Bundled (vendored) |
261
+ | **[disler/pi-vs-claude-code](https://github.com/disler/pi-vs-claude-code)** | Source inspiration / MIT port origin for pi harnesses | Design lineage (ported in-repo) |
262
+ | **LLM providers** | Models per persona (`model:` / `models:` in agent frontmatter) — e.g. OpenAI Codex, GitHub Copilot, Ollama, … | Yes (at least one provider your agents can call) |
263
+ | **Chrome DevTools MCP** / **Playwright Agent CLI** | Browser verify (`browser-testing-with-devtools`) and headless automation (`bowser`) | Optional, feature-specific |
264
+ | **Node.js + npm** | CLI (`npx @chankov/agent-fleet`), package install, `just` recipes | Yes for install & tooling |
265
+
266
+ ## Repository module map
267
+
268
+ ```text
269
+ .pi/ # Pi runtime: harnesses, extensions, agents config, prompts
270
+ skills/ # Agent Fleet-native skills (shadow vendored names)
271
+ agents/ # Personas/subagents used by Agent Fleet
272
+ scripts/ # CLI helpers, bridges, team + one-off peer launchers (pure logic in scripts/lib/)
273
+ hermes/ # Hermes-facing skills/integration assets
274
+ codex/ # Canonical Codex conductor contract (runtime copy lives outside checkout)
275
+ systemd/user/ # Owned user-unit template for Codex remote control
276
+ vendor/agent-skills-upstream/ # Manually imported upstream skills (pinned SHA)
277
+ bin/ # npm CLI: init/update/doctor + the installer engine
278
+ hooks/ # The coms bridge Stop hook
279
+ references/ # Supplementary checklists, installed with the skills that cite them
280
+ docs/ # This file, setup guides, bridge references, vendoring policy
281
+ ```
282
+
283
+ Reserved for future modules (do not repurpose these paths):
284
+
285
+ ```text
286
+ apps/dashboard/ # future dashboard: Kanban state, Herdr workspaces, peer status
287
+ packages/fleet-core/ # future extracted core orchestration library
288
+ packages/herdr-bridge/ # future Herdr integration package
289
+ packages/hermes-bridge/ # future Hermes integration package
290
+ ```
291
+
292
+ ## Design rules
293
+
294
+ - **Thin dispatcher context.** Nothing lands persistently in the dispatcher's
295
+ context if it can live on disk or in a one-line status. Research findings,
296
+ the Verification Contract ledger, and team snapshots are all disk-first.
297
+ - **A harness fault must never look like a specialist fault.** The hub passes
298
+ `--session <file>` on every run, so one corrupt session file used to fail a
299
+ persona in ~1s with no output — indistinguishable from a bad agent, and
300
+ unrecoverable by drop + re-add. Unusable session files are now validated and
301
+ quarantined (`session-health.js`) with the reset named in the result. Same rule
302
+ for the return contract: a report the parser cannot read gets one cheap
303
+ read-only extraction pass (`return-extract.js`) before its assertions are
304
+ written off as unproven, and extracted evidence is always labelled as weaker
305
+ than declared evidence. The converse also holds: a run that errored or timed
306
+ out writes to `artifacts/failures/`, never `returns/` — an error stub filed
307
+ as a return reads as a specialist verdict and gets acted on as one.
308
+ - **A pool status field beats reading the screen.** `coms_list` publishes each
309
+ peer's `pane_id` and `status` (`idle`/`working`/`booting`), and
310
+ `herdr_spawn_peer` waits for the peer to register and returns `peer_ready`
311
+ rather than a bare pane id. A spawned peer boots idle and does nothing until
312
+ addressed, so peers spawned and never sent to are named at turn end and in
313
+ `/af-hub-report` (`spawned-peers.js`); closing stays the human's call.
314
+ - **A declared requirement carries its origin.** Every assertion in the ledger
315
+ names its source (`assertion-ledger.js`), and the open ledger is soft-capped
316
+ at 8 — an id nobody can trace back to a plan line costs a dispatch and an
317
+ ASK_USER cycle to re-derive.
318
+ - **Pre-flight validation is free.** Anything the hub can reject before spawning
319
+ — an unresolvable artifact path, an unknown research persona, a heavy persona
320
+ at a low tier, a reviewer on a docs-only scope — is refused without spending a
321
+ budget slot. Artifact paths also resolve across artifact kinds when the name is
322
+ unique, since the hub writes every auto-return under `returns/` while
323
+ dispatchers reasonably guess `reviews/`.
324
+ - **Evidence is archived, never overwritten.** Session start moves the previous
325
+ session's `artifacts/` into an immutable `.pi/agent-sessions/runs/<runId>/`
326
+ namespace with a read-only `meta.json` and an appended `runs/index.json`
327
+ (`run-namespace.js`), retained per `run-history-keep` (default 10). The old
328
+ behaviour — delete `artifacts/` at start, name returns by a per-session counter
329
+ — collided two ways at once and made a post-mortem record eleven specialist
330
+ returns and two reviews as NOT RECOVERABLE. A failed archive leaves the
331
+ artifacts in place: a stale tree is recoverable, a deleted one is not.
332
+ - **Herdr owns panes, presence, and lifecycle; coms owns messages.** Herdr
333
+ topology recipes (`--herdr` or `--peers`) require a running server and refuse
334
+ with an actionable message otherwise. Bare Fleet does not require Herdr.
335
+ `--no-coms` leaves direct/native execution available but disables peer
336
+ messaging, peer-backed dispatch, and handoff from the Hub.
337
+ - **External agents are peers, not plugins.** Claude Code (and future CLI
338
+ agents) join the fleet through bridge adaptors that speak coms envelopes —
339
+ the fleet core stays agent-agnostic. Hermes remains the inbound `ask_user`/
340
+ Telegram route; the experimental Codex conductor is outbound-initiated only,
341
+ approval-gated, and restricted to listed peers through the validated wrapper.
342
+ - **Hermes monitor presentation is outside the fleet core.** Agent Fleet exposes owner-only
343
+ local monitor operations for Hub-owned state; a consumer owns its UI and lifecycle. The
344
+ worktree contains additive monitor/event/invoke code, but that implementation and its local
345
+ tests are not proof of a durable external identity or live delivery contract. `invoke`, where
346
+ available, is Hub-owned and queues dispatcher work rather than exposing tools directly.
347
+ - **Packaged Hermes source is opt-in, never auto-installed.** The npm tarball carries the
348
+ `hub-watchdog` skill (`hermes/skills/`) plus the backend and Desktop monitor plugin source
349
+ (`hermes/plugins/`, `hermes/desktop-plugins/`) as runtime-only source. Shipping that source
350
+ makes it available to an operator; installing it into a Hermes profile is always an explicit
351
+ action through `agent-fleet set-hermes-watchdog` (skill) or the consumer's own flow (plugins).
352
+ Nothing is enabled, launched, or configured by installing the package.
353
+ - **Watchdog delivery is capability-gated and currently unproven.** No checked-in
354
+ Gate O live artifact proves Hermes origin identity, updates, reconnect, or two-chat isolation,
355
+ so its supported posture is journal-only/dormant: no delivery, steering, or surgical use. It
356
+ never manages services, gateways, Herdr, or shell commands. Local runtime evidence — including
357
+ a real foreground watcher against a disposable Hub UDS — is `synthetic-local` and proves none of
358
+ those capabilities; see [the watchdog runbook](hermes-watchdog-supervisor.md).
359
+ - **External conductor contracts are advisory.** Pi damage-control wraps Pi
360
+ tool calls, not Hermes or Codex processes; human approvals and their
361
+ contracts reduce risk but do not provide an OS command allowlist.
362
+ - **Destructive fleet verbs are damage-control-guarded.** Specialists cannot
363
+ spawn/close herdr panes; the human confirms destructive actions.
364
+ - **Native-over-vendored skills.** The skill catalogue resolves `skills/`
365
+ first, then the vendored upstream import; upstream updates are explicit
366
+ maintainer actions ([UPSTREAM-SKILLS.md](UPSTREAM-SKILLS.md)).
367
+
368
+ ## History
369
+
370
+ Agent Fleet began as a fork of `addyosmani/agent-skills` and was split into a
371
+ standalone repository in July 2026, with upstream demoted to vendored content.
372
+ The one-time migration record, including the history-filtering commands, lives
373
+ in [MIGRATION-agent-fleet.md](MIGRATION-agent-fleet.md); the product
374
+ requirements that drove the split are in
375
+ [prd-agent-fleet-split.md](prd-agent-fleet-split.md).