@chankov/agent-fleet 2.0.21 → 2.0.22

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 (633) hide show
  1. package/.pi/harnesses/agent-hub/README.md +10 -0
  2. package/.pi/harnesses/agent-hub/acceptance.ts +2 -1
  3. package/.pi/harnesses/agent-hub/damage-guard-hub.ts +7 -2
  4. package/.pi/harnesses/agent-hub/dispatch-native-spawn.ts +3 -1
  5. package/.pi/harnesses/agent-hub/external-blocker.js +9 -2
  6. package/.pi/harnesses/agent-hub/no-progress.ts +4 -2
  7. package/.pi/harnesses/agent-hub/package.json +1 -1
  8. package/.pi/harnesses/agent-hub/runtime-test-check.ts +16 -2
  9. package/.pi/harnesses/agent-hub/tools/dispatch-execution.ts +3 -2
  10. package/.pi/harnesses/coms/package.json +1 -1
  11. package/.pi/harnesses/damage-control-continue/index.ts +2 -2
  12. package/.pi/harnesses/damage-control-continue/package.json +1 -1
  13. package/.pi/harnesses/damage-control-continue/system1-child.ts +16 -6
  14. package/.pi/harnesses/lib/bash-policy-analysis.ts +31 -1
  15. package/.versions/2.0.22/.pi/agent-fleet/hermes/README.md +347 -0
  16. package/.versions/2.0.22/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/plugin.js +1291 -0
  17. package/.versions/2.0.22/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-herdr/presentation.js +672 -0
  18. package/.versions/2.0.22/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/plugin.js +19 -0
  19. package/.versions/2.0.22/.pi/agent-fleet/hermes/desktop-plugins/agent-fleet-monitor/state.js +10 -0
  20. package/.versions/2.0.22/.pi/agent-fleet/hermes/gates/gate-o-capability.md +8 -0
  21. package/.versions/2.0.22/.pi/agent-fleet/hermes/gates/gate-o-validator-fixtures.json +1 -0
  22. package/.versions/2.0.22/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/activity.py +773 -0
  23. package/.versions/2.0.22/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_registry.py +134 -0
  24. package/.versions/2.0.22/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/coms_send.py +350 -0
  25. package/.versions/2.0.22/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/herdr_source.py +193 -0
  26. package/.versions/2.0.22/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/manifest.json +4 -0
  27. package/.versions/2.0.22/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/plugin_api.py +444 -0
  28. package/.versions/2.0.22/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/sessions.py +205 -0
  29. package/.versions/2.0.22/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/tasks.py +300 -0
  30. package/.versions/2.0.22/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/dashboard/watch.py +819 -0
  31. package/.versions/2.0.22/.pi/agent-fleet/hermes/plugins/agent-fleet-herdr/plugin.yaml +8 -0
  32. package/.versions/2.0.22/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/adapter.py +139 -0
  33. package/.versions/2.0.22/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/manifest.json +11 -0
  34. package/.versions/2.0.22/.pi/agent-fleet/hermes/plugins/agent-fleet-monitor/dashboard/plugin_api.py +50 -0
  35. package/.versions/2.0.22/.pi/agent-fleet/hermes/skills/hub-conductor/SKILL.md +84 -0
  36. package/.versions/2.0.22/.pi/agent-fleet/hermes/skills/hub-liaison/SKILL.md +84 -0
  37. package/.versions/2.0.22/.pi/agent-fleet/hermes/skills/hub-watchdog/SKILL.md +76 -0
  38. package/.versions/2.0.22/.pi/agent-fleet/hermes/skills/hub-watchdog/manifest.json +1 -0
  39. package/.versions/2.0.22/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog.py +249 -0
  40. package/.versions/2.0.22/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_actions.py +124 -0
  41. package/.versions/2.0.22/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_contract.py +76 -0
  42. package/.versions/2.0.22/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_delivery.py +10 -0
  43. package/.versions/2.0.22/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_engine.py +128 -0
  44. package/.versions/2.0.22/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_judgment.py +41 -0
  45. package/.versions/2.0.22/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_recovery.py +103 -0
  46. package/.versions/2.0.22/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_state.py +163 -0
  47. package/.versions/2.0.22/.pi/agent-fleet/hermes/skills/hub-watchdog/scripts/watchdog_transport.py +138 -0
  48. package/.versions/2.0.22/.pi/agent-fleet/hermes/watchdog-tests/__init__.py +0 -0
  49. package/.versions/2.0.22/.pi/agent-fleet/hooks/coms-stop-hook.mjs +84 -0
  50. package/.versions/2.0.22/.pi/agent-fleet/scripts/claude-code-preflight.ts +70 -0
  51. package/.versions/2.0.22/.pi/agent-fleet/scripts/coms-claude-bridge.ts +437 -0
  52. package/.versions/2.0.22/.pi/agent-fleet/scripts/coms-cli.ts +425 -0
  53. package/.versions/2.0.22/.pi/agent-fleet/scripts/coms-hermes-bridge.ts +413 -0
  54. package/.versions/2.0.22/.pi/agent-fleet/scripts/fleet-codex-client.ts +69 -0
  55. package/.versions/2.0.22/.pi/agent-fleet/scripts/fleet-codex-read.py +148 -0
  56. package/.versions/2.0.22/.pi/agent-fleet/scripts/fleet.ts +217 -0
  57. package/.versions/2.0.22/.pi/agent-fleet/scripts/flow.ts +157 -0
  58. package/.versions/2.0.22/.pi/agent-fleet/scripts/hermes-monitor-capability-runner.ts +25 -0
  59. package/.versions/2.0.22/.pi/agent-fleet/scripts/hermes-monitor-scenario.ts +474 -0
  60. package/.versions/2.0.22/.pi/agent-fleet/scripts/hermes-watchdog-capability-probe.ts +45 -0
  61. package/.versions/2.0.22/.pi/agent-fleet/scripts/install-hermes-plugin.sh +180 -0
  62. package/.versions/2.0.22/.pi/agent-fleet/scripts/lib/claude-bridge-core.ts +208 -0
  63. package/.versions/2.0.22/.pi/agent-fleet/scripts/lib/coms-envelope.ts +582 -0
  64. package/.versions/2.0.22/.pi/agent-fleet/scripts/lib/fake-herdr-server.ts +88 -0
  65. package/.versions/2.0.22/.pi/agent-fleet/scripts/lib/fleet-codex-catalog.ts +63 -0
  66. package/.versions/2.0.22/.pi/agent-fleet/scripts/lib/fleet-codex-operations.ts +190 -0
  67. package/.versions/2.0.22/.pi/agent-fleet/scripts/lib/fleet-codex-session.ts +166 -0
  68. package/.versions/2.0.22/.pi/agent-fleet/scripts/lib/fleet-codex-transport.ts +124 -0
  69. package/.versions/2.0.22/.pi/agent-fleet/scripts/lib/fleet-command.ts +252 -0
  70. package/.versions/2.0.22/.pi/agent-fleet/scripts/lib/flow-command.ts +98 -0
  71. package/.versions/2.0.22/.pi/agent-fleet/scripts/lib/flow-maintenance.ts +230 -0
  72. package/.versions/2.0.22/.pi/agent-fleet/scripts/lib/herdr-layout.ts +281 -0
  73. package/.versions/2.0.22/.pi/agent-fleet/scripts/lib/hermes-bridge-core.ts +241 -0
  74. package/.versions/2.0.22/.pi/agent-fleet/scripts/lib/hermes-monitor-events.ts +1 -0
  75. package/.versions/2.0.22/.pi/agent-fleet/scripts/lib/hermes-monitor-herdr.ts +2 -0
  76. package/.versions/2.0.22/.pi/agent-fleet/scripts/lib/hermes-monitor-model.ts +3 -0
  77. package/.versions/2.0.22/.pi/agent-fleet/scripts/lib/hermes-monitor-registry.ts +2 -0
  78. package/.versions/2.0.22/.pi/agent-fleet/scripts/lib/hermes-monitor-socket.ts +2 -0
  79. package/.versions/2.0.22/.pi/agent-fleet/scripts/lib/hermes-monitor-store.ts +2 -0
  80. package/.versions/2.0.22/.pi/agent-fleet/scripts/lib/monitor-env.ts +146 -0
  81. package/.versions/2.0.22/.pi/agent-fleet/scripts/lib/peer-launch.ts +318 -0
  82. package/.versions/2.0.22/.pi/agent-fleet/scripts/lib/persona-banner.ts +62 -0
  83. package/.versions/2.0.22/.pi/agent-fleet/scripts/lib/persona-dirs.ts +25 -0
  84. package/.versions/2.0.22/.pi/agent-fleet/scripts/lib/runtime-dependencies.js +124 -0
  85. package/.versions/2.0.22/.pi/agent-fleet/scripts/lib/spawn-stagger.ts +101 -0
  86. package/.versions/2.0.22/.pi/agent-fleet/scripts/lib/team-project.ts +178 -0
  87. package/.versions/2.0.22/.pi/agent-fleet/scripts/lib/team-snapshot.ts +147 -0
  88. package/.versions/2.0.22/.pi/agent-fleet/scripts/package-lock.json +35 -0
  89. package/.versions/2.0.22/.pi/agent-fleet/scripts/package.json +9 -0
  90. package/.versions/2.0.22/.pi/agent-fleet/scripts/peer-banner.ts +41 -0
  91. package/.versions/2.0.22/.pi/agent-fleet/scripts/peer-launch.ts +283 -0
  92. package/.versions/2.0.22/.pi/agent-fleet/scripts/team-snapshot.ts +237 -0
  93. package/.versions/2.0.22/.pi/agent-fleet/scripts/team-up.ts +378 -0
  94. package/.versions/2.0.22/.pi/agent-fleet/scripts/workflows/lib/agent-phase.ts +179 -0
  95. package/.versions/2.0.22/.pi/agent-fleet/scripts/workflows/lib/changes.ts +61 -0
  96. package/.versions/2.0.22/.pi/agent-fleet/scripts/workflows/lib/debate.ts +149 -0
  97. package/.versions/2.0.22/.pi/agent-fleet/scripts/workflows/lib/env.ts +34 -0
  98. package/.versions/2.0.22/.pi/agent-fleet/scripts/workflows/lib/envelopes.ts +169 -0
  99. package/.versions/2.0.22/.pi/agent-fleet/scripts/workflows/lib/gates.ts +81 -0
  100. package/.versions/2.0.22/.pi/agent-fleet/scripts/workflows/lib/git.ts +96 -0
  101. package/.versions/2.0.22/.pi/agent-fleet/scripts/workflows/lib/isolated-snapshot.ts +125 -0
  102. package/.versions/2.0.22/.pi/agent-fleet/scripts/workflows/lib/merge.ts +95 -0
  103. package/.versions/2.0.22/.pi/agent-fleet/scripts/workflows/lib/model-profile.ts +22 -0
  104. package/.versions/2.0.22/.pi/agent-fleet/scripts/workflows/lib/model-visibility.ts +92 -0
  105. package/.versions/2.0.22/.pi/agent-fleet/scripts/workflows/lib/permissions.ts +130 -0
  106. package/.versions/2.0.22/.pi/agent-fleet/scripts/workflows/lib/personas.ts +57 -0
  107. package/.versions/2.0.22/.pi/agent-fleet/scripts/workflows/lib/poll.ts +86 -0
  108. package/.versions/2.0.22/.pi/agent-fleet/scripts/workflows/lib/project-policy.ts +36 -0
  109. package/.versions/2.0.22/.pi/agent-fleet/scripts/workflows/lib/quality.ts +64 -0
  110. package/.versions/2.0.22/.pi/agent-fleet/scripts/workflows/lib/run.ts +108 -0
  111. package/.versions/2.0.22/.pi/agent-fleet/scripts/workflows/lib/scout-data-boundary.ts +55 -0
  112. package/.versions/2.0.22/.pi/agent-fleet/scripts/workflows/lib/trace.ts +34 -0
  113. package/.versions/2.0.22/.pi/agent-fleet/scripts/workflows/lib/voices.ts +128 -0
  114. package/.versions/2.0.22/.pi/agent-fleet/scripts/workflows/lib/writer-lease.ts +112 -0
  115. package/.versions/2.0.22/.pi/agent-fleet/scripts/workflows/tsconfig.json +22 -0
  116. package/.versions/2.0.22/.pi/agent-fleet/scripts/workflows/wf-build-test.ts +61 -0
  117. package/.versions/2.0.22/.pi/agent-fleet/scripts/workflows/wf-debate.ts +87 -0
  118. package/.versions/2.0.22/.pi/agent-fleet/scripts/workflows/wf-document.ts +50 -0
  119. package/.versions/2.0.22/.pi/agent-fleet/scripts/workflows/wf-poll.ts +95 -0
  120. package/.versions/2.0.22/.pi/agent-fleet/scripts/workflows/wf-quality.ts +20 -0
  121. package/.versions/2.0.22/.pi/agent-fleet/scripts/workflows/wf-scout.ts +40 -0
  122. package/.versions/2.0.22/.pi/agents/dispatch-policy.yaml +32 -0
  123. package/.versions/2.0.22/.pi/agents/model-profiles.yaml +134 -0
  124. package/.versions/2.0.22/.pi/agents/peers.yaml +147 -0
  125. package/.versions/2.0.22/.pi/agents/teams.yaml +41 -0
  126. package/.versions/2.0.22/.pi/agents/voices.yaml +13 -0
  127. package/.versions/2.0.22/.pi/damage-control-rules.yaml +297 -0
  128. package/.versions/2.0.22/.pi/extensions/btw/README.md +120 -0
  129. package/.versions/2.0.22/.pi/extensions/btw/index.ts +914 -0
  130. package/.versions/2.0.22/.pi/extensions/btw/package.json +6 -0
  131. package/.versions/2.0.22/.pi/extensions/btw/state.js +179 -0
  132. package/.versions/2.0.22/.pi/extensions/chrome-devtools-mcp/README.md +55 -0
  133. package/.versions/2.0.22/.pi/extensions/chrome-devtools-mcp/index.ts +93 -0
  134. package/.versions/2.0.22/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
  135. package/.versions/2.0.22/.pi/extensions/compact-and-continue/README.md +42 -0
  136. package/.versions/2.0.22/.pi/extensions/compact-and-continue/index.ts +136 -0
  137. package/.versions/2.0.22/.pi/extensions/compact-and-continue/package.json +6 -0
  138. package/.versions/2.0.22/.pi/extensions/mcp-bridge/README.md +46 -0
  139. package/.versions/2.0.22/.pi/extensions/mcp-bridge/index.ts +206 -0
  140. package/.versions/2.0.22/.pi/extensions/mcp-bridge/package.json +6 -0
  141. package/.versions/2.0.22/.pi/extensions/package-lock.json +1175 -0
  142. package/.versions/2.0.22/.pi/extensions/package.json +9 -0
  143. package/.versions/2.0.22/.pi/extensions/pi-voice-stt/README.md +224 -0
  144. package/.versions/2.0.22/.pi/extensions/pi-voice-stt/config.ts +198 -0
  145. package/.versions/2.0.22/.pi/extensions/pi-voice-stt/examples/stt.json +35 -0
  146. package/.versions/2.0.22/.pi/extensions/pi-voice-stt/index.ts +248 -0
  147. package/.versions/2.0.22/.pi/extensions/pi-voice-stt/package.json +6 -0
  148. package/.versions/2.0.22/.pi/extensions/pi-voice-stt/providers.ts +214 -0
  149. package/.versions/2.0.22/.pi/extensions/pi-voice-stt/recorder.ts +158 -0
  150. package/.versions/2.0.22/.pi/harnesses/agent-hub/README.md +1527 -0
  151. package/.versions/2.0.22/.pi/harnesses/agent-hub/acceptance.ts +200 -0
  152. package/.versions/2.0.22/.pi/harnesses/agent-hub/access-approval.ts +141 -0
  153. package/.versions/2.0.22/.pi/harnesses/agent-hub/action-authorization.ts +10 -0
  154. package/.versions/2.0.22/.pi/harnesses/agent-hub/agentic-contract.ts +43 -0
  155. package/.versions/2.0.22/.pi/harnesses/agent-hub/agentic-evidence.ts +64 -0
  156. package/.versions/2.0.22/.pi/harnesses/agent-hub/agentic-hub.ts +54 -0
  157. package/.versions/2.0.22/.pi/harnesses/agent-hub/agentic-runtime.ts +56 -0
  158. package/.versions/2.0.22/.pi/harnesses/agent-hub/agentic-sources-worker.mjs +4 -0
  159. package/.versions/2.0.22/.pi/harnesses/agent-hub/agentic-sources.ts +74 -0
  160. package/.versions/2.0.22/.pi/harnesses/agent-hub/agentic-state.ts +23 -0
  161. package/.versions/2.0.22/.pi/harnesses/agent-hub/approval-wait.ts +1 -0
  162. package/.versions/2.0.22/.pi/harnesses/agent-hub/artifacts.js +146 -0
  163. package/.versions/2.0.22/.pi/harnesses/agent-hub/assertion-ledger.js +67 -0
  164. package/.versions/2.0.22/.pi/harnesses/agent-hub/assist-profile.ts +19 -0
  165. package/.versions/2.0.22/.pi/harnesses/agent-hub/backend-policy.js +174 -0
  166. package/.versions/2.0.22/.pi/harnesses/agent-hub/bounded-output.ts +26 -0
  167. package/.versions/2.0.22/.pi/harnesses/agent-hub/budget-recovery.ts +123 -0
  168. package/.versions/2.0.22/.pi/harnesses/agent-hub/capability-confirmation.ts +47 -0
  169. package/.versions/2.0.22/.pi/harnesses/agent-hub/capability-packs.ts +184 -0
  170. package/.versions/2.0.22/.pi/harnesses/agent-hub/commands/agent-model-thinking.ts +10 -0
  171. package/.versions/2.0.22/.pi/harnesses/agent-hub/commands/agent-model.ts +10 -0
  172. package/.versions/2.0.22/.pi/harnesses/agent-hub/commands/agent-models-substitute.ts +10 -0
  173. package/.versions/2.0.22/.pi/harnesses/agent-hub/commands/agents-add.ts +9 -0
  174. package/.versions/2.0.22/.pi/harnesses/agent-hub/commands/agents-drop.ts +9 -0
  175. package/.versions/2.0.22/.pi/harnesses/agent-hub/commands/agents-history.ts +9 -0
  176. package/.versions/2.0.22/.pi/harnesses/agent-hub/commands/agents-kill.ts +10 -0
  177. package/.versions/2.0.22/.pi/harnesses/agent-hub/commands/agents-list.ts +9 -0
  178. package/.versions/2.0.22/.pi/harnesses/agent-hub/commands/agents-restart.ts +10 -0
  179. package/.versions/2.0.22/.pi/harnesses/agent-hub/commands/agents-save.ts +9 -0
  180. package/.versions/2.0.22/.pi/harnesses/agent-hub/commands/agents-team.ts +9 -0
  181. package/.versions/2.0.22/.pi/harnesses/agent-hub/commands/audit.ts +9 -0
  182. package/.versions/2.0.22/.pi/harnesses/agent-hub/commands/compound.ts +9 -0
  183. package/.versions/2.0.22/.pi/harnesses/agent-hub/commands/coms.ts +9 -0
  184. package/.versions/2.0.22/.pi/harnesses/agent-hub/commands/context-command.ts +9 -0
  185. package/.versions/2.0.22/.pi/harnesses/agent-hub/commands/context.ts +46 -0
  186. package/.versions/2.0.22/.pi/harnesses/agent-hub/commands/debate.ts +9 -0
  187. package/.versions/2.0.22/.pi/harnesses/agent-hub/commands/dispatch-policy.ts +9 -0
  188. package/.versions/2.0.22/.pi/harnesses/agent-hub/commands/handoff.ts +10 -0
  189. package/.versions/2.0.22/.pi/harnesses/agent-hub/commands/hub-report.ts +9 -0
  190. package/.versions/2.0.22/.pi/harnesses/agent-hub/commands/models.ts +10 -0
  191. package/.versions/2.0.22/.pi/harnesses/agent-hub/commands/poll.ts +9 -0
  192. package/.versions/2.0.22/.pi/harnesses/agent-hub/commands/recover.ts +61 -0
  193. package/.versions/2.0.22/.pi/harnesses/agent-hub/commands/retry.ts +10 -0
  194. package/.versions/2.0.22/.pi/harnesses/agent-hub/commands/task-triage-recover.ts +12 -0
  195. package/.versions/2.0.22/.pi/harnesses/agent-hub/commands/task-triage-waive.ts +12 -0
  196. package/.versions/2.0.22/.pi/harnesses/agent-hub/commands/watchdog.ts +9 -0
  197. package/.versions/2.0.22/.pi/harnesses/agent-hub/commands/work-mode.ts +29 -0
  198. package/.versions/2.0.22/.pi/harnesses/agent-hub/commands/zoom.ts +10 -0
  199. package/.versions/2.0.22/.pi/harnesses/agent-hub/config/agents.ts +178 -0
  200. package/.versions/2.0.22/.pi/harnesses/agent-hub/config/model-profiles.ts +237 -0
  201. package/.versions/2.0.22/.pi/harnesses/agent-hub/config/overrides.ts +165 -0
  202. package/.versions/2.0.22/.pi/harnesses/agent-hub/context/agent-state.ts +30 -0
  203. package/.versions/2.0.22/.pi/harnesses/agent-hub/context/assertions-artifacts.ts +221 -0
  204. package/.versions/2.0.22/.pi/harnesses/agent-hub/context/budgets.ts +152 -0
  205. package/.versions/2.0.22/.pi/harnesses/agent-hub/context/hub-state.ts +40 -0
  206. package/.versions/2.0.22/.pi/harnesses/agent-hub/context-budget-snapshot.ts +105 -0
  207. package/.versions/2.0.22/.pi/harnesses/agent-hub/context-compaction-monitor.ts +35 -0
  208. package/.versions/2.0.22/.pi/harnesses/agent-hub/context-compaction-preflight.ts +21 -0
  209. package/.versions/2.0.22/.pi/harnesses/agent-hub/context-compaction-runtime.ts +69 -0
  210. package/.versions/2.0.22/.pi/harnesses/agent-hub/context-compaction.ts +34 -0
  211. package/.versions/2.0.22/.pi/harnesses/agent-hub/context-continuity-broker.ts +42 -0
  212. package/.versions/2.0.22/.pi/harnesses/agent-hub/context-continuity-child.ts +83 -0
  213. package/.versions/2.0.22/.pi/harnesses/agent-hub/context-continuity-client.ts +19 -0
  214. package/.versions/2.0.22/.pi/harnesses/agent-hub/context-continuity-compat.ts +30 -0
  215. package/.versions/2.0.22/.pi/harnesses/agent-hub/context-continuity-owners.ts +15 -0
  216. package/.versions/2.0.22/.pi/harnesses/agent-hub/context-continuity-registry.ts +8 -0
  217. package/.versions/2.0.22/.pi/harnesses/agent-hub/context-continuity.ts +82 -0
  218. package/.versions/2.0.22/.pi/harnesses/agent-hub/context-pressure.ts +222 -0
  219. package/.versions/2.0.22/.pi/harnesses/agent-hub/context-window.js +108 -0
  220. package/.versions/2.0.22/.pi/harnesses/agent-hub/damage-guard-approval.ts +59 -0
  221. package/.versions/2.0.22/.pi/harnesses/agent-hub/damage-guard-broker.ts +125 -0
  222. package/.versions/2.0.22/.pi/harnesses/agent-hub/damage-guard-contract.ts +22 -0
  223. package/.versions/2.0.22/.pi/harnesses/agent-hub/damage-guard-descendant.ts +76 -0
  224. package/.versions/2.0.22/.pi/harnesses/agent-hub/damage-guard-hub.ts +254 -0
  225. package/.versions/2.0.22/.pi/harnesses/agent-hub/damage-guard-identity.ts +12 -0
  226. package/.versions/2.0.22/.pi/harnesses/agent-hub/damage-guard-owners.ts +54 -0
  227. package/.versions/2.0.22/.pi/harnesses/agent-hub/damage-guard-state.ts +43 -0
  228. package/.versions/2.0.22/.pi/harnesses/agent-hub/damage-guard-test-tsconfig.json +19 -0
  229. package/.versions/2.0.22/.pi/harnesses/agent-hub/debate-command.ts +176 -0
  230. package/.versions/2.0.22/.pi/harnesses/agent-hub/delegate.ts +478 -0
  231. package/.versions/2.0.22/.pi/harnesses/agent-hub/deterministic-fs.ts +195 -0
  232. package/.versions/2.0.22/.pi/harnesses/agent-hub/diagnostic-probe-extension.ts +26 -0
  233. package/.versions/2.0.22/.pi/harnesses/agent-hub/diagnostic-series-budget.ts +178 -0
  234. package/.versions/2.0.22/.pi/harnesses/agent-hub/dispatch-coms.ts +253 -0
  235. package/.versions/2.0.22/.pi/harnesses/agent-hub/dispatch-core.ts +27 -0
  236. package/.versions/2.0.22/.pi/harnesses/agent-hub/dispatch-native-complete.ts +173 -0
  237. package/.versions/2.0.22/.pi/harnesses/agent-hub/dispatch-native-prepare.ts +295 -0
  238. package/.versions/2.0.22/.pi/harnesses/agent-hub/dispatch-native-spawn.ts +255 -0
  239. package/.versions/2.0.22/.pi/harnesses/agent-hub/dispatch-native-types.ts +293 -0
  240. package/.versions/2.0.22/.pi/harnesses/agent-hub/dispatch-native.ts +236 -0
  241. package/.versions/2.0.22/.pi/harnesses/agent-hub/dispatch-observability.ts +225 -0
  242. package/.versions/2.0.22/.pi/harnesses/agent-hub/dispatch-triage-contract.ts +27 -0
  243. package/.versions/2.0.22/.pi/harnesses/agent-hub/dispatch-triage-eval.ts +77 -0
  244. package/.versions/2.0.22/.pi/harnesses/agent-hub/dispatch-triage-policy.ts +29 -0
  245. package/.versions/2.0.22/.pi/harnesses/agent-hub/dispatch-triage-runtime.ts +55 -0
  246. package/.versions/2.0.22/.pi/harnesses/agent-hub/dispatch-triage-state.ts +33 -0
  247. package/.versions/2.0.22/.pi/harnesses/agent-hub/docs-lane.js +123 -0
  248. package/.versions/2.0.22/.pi/harnesses/agent-hub/drift-judge.ts +352 -0
  249. package/.versions/2.0.22/.pi/harnesses/agent-hub/drift-runtime.ts +480 -0
  250. package/.versions/2.0.22/.pi/harnesses/agent-hub/drift-system1-policy.ts +39 -0
  251. package/.versions/2.0.22/.pi/harnesses/agent-hub/drift-system1.ts +469 -0
  252. package/.versions/2.0.22/.pi/harnesses/agent-hub/drift-watchdog.js +349 -0
  253. package/.versions/2.0.22/.pi/harnesses/agent-hub/evidence-manifest.ts +51 -0
  254. package/.versions/2.0.22/.pi/harnesses/agent-hub/evidence-rules.js +96 -0
  255. package/.versions/2.0.22/.pi/harnesses/agent-hub/execution-evidence.ts +80 -0
  256. package/.versions/2.0.22/.pi/harnesses/agent-hub/execution-trace.ts +241 -0
  257. package/.versions/2.0.22/.pi/harnesses/agent-hub/external-blocker.js +92 -0
  258. package/.versions/2.0.22/.pi/harnesses/agent-hub/file-discovery/adapters.ts +88 -0
  259. package/.versions/2.0.22/.pi/harnesses/agent-hub/file-discovery/broker-client.ts +62 -0
  260. package/.versions/2.0.22/.pi/harnesses/agent-hub/file-discovery/broker.ts +128 -0
  261. package/.versions/2.0.22/.pi/harnesses/agent-hub/file-discovery/child-extension.ts +42 -0
  262. package/.versions/2.0.22/.pi/harnesses/agent-hub/file-discovery/descendant.ts +67 -0
  263. package/.versions/2.0.22/.pi/harnesses/agent-hub/file-discovery/discovery-worker.mjs +15 -0
  264. package/.versions/2.0.22/.pi/harnesses/agent-hub/file-discovery/discovery.ts +126 -0
  265. package/.versions/2.0.22/.pi/harnesses/agent-hub/file-discovery/evaluate.ts +57 -0
  266. package/.versions/2.0.22/.pi/harnesses/agent-hub/file-discovery/hub.ts +169 -0
  267. package/.versions/2.0.22/.pi/harnesses/agent-hub/file-discovery/native-context.ts +8 -0
  268. package/.versions/2.0.22/.pi/harnesses/agent-hub/file-discovery/native-fixture.test-support.ts +108 -0
  269. package/.versions/2.0.22/.pi/harnesses/agent-hub/file-discovery/owners.ts +96 -0
  270. package/.versions/2.0.22/.pi/harnesses/agent-hub/file-discovery/results.ts +55 -0
  271. package/.versions/2.0.22/.pi/harnesses/agent-hub/file-discovery/runtime.ts +130 -0
  272. package/.versions/2.0.22/.pi/harnesses/agent-hub/file-discovery/semantic-profiles.ts +18 -0
  273. package/.versions/2.0.22/.pi/harnesses/agent-hub/file-discovery/sources.ts +69 -0
  274. package/.versions/2.0.22/.pi/harnesses/agent-hub/file-discovery/state.ts +22 -0
  275. package/.versions/2.0.22/.pi/harnesses/agent-hub/filesystem-tool.ts +166 -0
  276. package/.versions/2.0.22/.pi/harnesses/agent-hub/fixtures/registration-surface.json +66 -0
  277. package/.versions/2.0.22/.pi/harnesses/agent-hub/fixtures/t0a-synthetic/catalog.ts +189 -0
  278. package/.versions/2.0.22/.pi/harnesses/agent-hub/footer.ts +30 -0
  279. package/.versions/2.0.22/.pi/harnesses/agent-hub/helpers.ts +270 -0
  280. package/.versions/2.0.22/.pi/harnesses/agent-hub/history-projection.ts +116 -0
  281. package/.versions/2.0.22/.pi/harnesses/agent-hub/hub-state-audit.js +41 -0
  282. package/.versions/2.0.22/.pi/harnesses/agent-hub/index.ts +2616 -0
  283. package/.versions/2.0.22/.pi/harnesses/agent-hub/input/completions.ts +82 -0
  284. package/.versions/2.0.22/.pi/harnesses/agent-hub/input/shortcuts.ts +20 -0
  285. package/.versions/2.0.22/.pi/harnesses/agent-hub/lifecycle/context-pressure.ts +231 -0
  286. package/.versions/2.0.22/.pi/harnesses/agent-hub/lifecycle/monitor-session.ts +104 -0
  287. package/.versions/2.0.22/.pi/harnesses/agent-hub/lifecycle/session-orchestration.ts +144 -0
  288. package/.versions/2.0.22/.pi/harnesses/agent-hub/lifecycle/turn-handlers.ts +90 -0
  289. package/.versions/2.0.22/.pi/harnesses/agent-hub/monitor-control.ts +9 -0
  290. package/.versions/2.0.22/.pi/harnesses/agent-hub/monitor-invoke-journal.ts +131 -0
  291. package/.versions/2.0.22/.pi/harnesses/agent-hub/monitor-invoke.ts +92 -0
  292. package/.versions/2.0.22/.pi/harnesses/agent-hub/monitor-lifecycle.ts +13 -0
  293. package/.versions/2.0.22/.pi/harnesses/agent-hub/monitor-publisher.ts +59 -0
  294. package/.versions/2.0.22/.pi/harnesses/agent-hub/monitor-recovery.ts +3 -0
  295. package/.versions/2.0.22/.pi/harnesses/agent-hub/monitor-runtime.ts +3 -0
  296. package/.versions/2.0.22/.pi/harnesses/agent-hub/monitor-session-bridge.ts +266 -0
  297. package/.versions/2.0.22/.pi/harnesses/agent-hub/no-progress.ts +622 -0
  298. package/.versions/2.0.22/.pi/harnesses/agent-hub/operator-watchdog.ts +97 -0
  299. package/.versions/2.0.22/.pi/harnesses/agent-hub/orchestration-activation.ts +109 -0
  300. package/.versions/2.0.22/.pi/harnesses/agent-hub/orchestration-metrics.ts +78 -0
  301. package/.versions/2.0.22/.pi/harnesses/agent-hub/orchestration-route.ts +68 -0
  302. package/.versions/2.0.22/.pi/harnesses/agent-hub/package.json +7 -0
  303. package/.versions/2.0.22/.pi/harnesses/agent-hub/peer-spawn-plan.ts +116 -0
  304. package/.versions/2.0.22/.pi/harnesses/agent-hub/policy/models.ts +153 -0
  305. package/.versions/2.0.22/.pi/harnesses/agent-hub/policy/profile-activation.ts +62 -0
  306. package/.versions/2.0.22/.pi/harnesses/agent-hub/policy/profile-runtime.ts +120 -0
  307. package/.versions/2.0.22/.pi/harnesses/agent-hub/policy/roster.ts +94 -0
  308. package/.versions/2.0.22/.pi/harnesses/agent-hub/policy/work-mode.ts +142 -0
  309. package/.versions/2.0.22/.pi/harnesses/agent-hub/poll-command.ts +176 -0
  310. package/.versions/2.0.22/.pi/harnesses/agent-hub/presentation.ts +48 -0
  311. package/.versions/2.0.22/.pi/harnesses/agent-hub/proactive-config.ts +21 -0
  312. package/.versions/2.0.22/.pi/harnesses/agent-hub/proactive-evaluate.ts +138 -0
  313. package/.versions/2.0.22/.pi/harnesses/agent-hub/proactive-external-git.ts +82 -0
  314. package/.versions/2.0.22/.pi/harnesses/agent-hub/proactive-external.ts +142 -0
  315. package/.versions/2.0.22/.pi/harnesses/agent-hub/proactive-feedback.ts +104 -0
  316. package/.versions/2.0.22/.pi/harnesses/agent-hub/proactive-findings.ts +115 -0
  317. package/.versions/2.0.22/.pi/harnesses/agent-hub/proactive-local.ts +89 -0
  318. package/.versions/2.0.22/.pi/harnesses/agent-hub/proactive-observer.ts +106 -0
  319. package/.versions/2.0.22/.pi/harnesses/agent-hub/proactive-rules.ts +171 -0
  320. package/.versions/2.0.22/.pi/harnesses/agent-hub/proactive-runtime.ts +318 -0
  321. package/.versions/2.0.22/.pi/harnesses/agent-hub/proactive-selection.ts +68 -0
  322. package/.versions/2.0.22/.pi/harnesses/agent-hub/proactive-snapshot-worker.mjs +12 -0
  323. package/.versions/2.0.22/.pi/harnesses/agent-hub/proactive-snapshot.ts +271 -0
  324. package/.versions/2.0.22/.pi/harnesses/agent-hub/proactive-types.ts +67 -0
  325. package/.versions/2.0.22/.pi/harnesses/agent-hub/process-obligations.ts +159 -0
  326. package/.versions/2.0.22/.pi/harnesses/agent-hub/prompts/context.ts +55 -0
  327. package/.versions/2.0.22/.pi/harnesses/agent-hub/prompts/fragments.ts +86 -0
  328. package/.versions/2.0.22/.pi/harnesses/agent-hub/prompts/session-start.ts +90 -0
  329. package/.versions/2.0.22/.pi/harnesses/agent-hub/prompts/system-prompt.ts +125 -0
  330. package/.versions/2.0.22/.pi/harnesses/agent-hub/provider-semaphore.js +138 -0
  331. package/.versions/2.0.22/.pi/harnesses/agent-hub/reconcile.ts +26 -0
  332. package/.versions/2.0.22/.pi/harnesses/agent-hub/recover-policy.ts +44 -0
  333. package/.versions/2.0.22/.pi/harnesses/agent-hub/recover-state.ts +104 -0
  334. package/.versions/2.0.22/.pi/harnesses/agent-hub/recovery-contract.ts +151 -0
  335. package/.versions/2.0.22/.pi/harnesses/agent-hub/rerun-policy.ts +40 -0
  336. package/.versions/2.0.22/.pi/harnesses/agent-hub/research/controls.ts +74 -0
  337. package/.versions/2.0.22/.pi/harnesses/agent-hub/research/runtime.ts +215 -0
  338. package/.versions/2.0.22/.pi/harnesses/agent-hub/research/spawn-run.ts +221 -0
  339. package/.versions/2.0.22/.pi/harnesses/agent-hub/research-watchdog.ts +40 -0
  340. package/.versions/2.0.22/.pi/harnesses/agent-hub/return-contract.js +349 -0
  341. package/.versions/2.0.22/.pi/harnesses/agent-hub/return-extract.js +77 -0
  342. package/.versions/2.0.22/.pi/harnesses/agent-hub/review-closure.ts +43 -0
  343. package/.versions/2.0.22/.pi/harnesses/agent-hub/review-continuity.ts +73 -0
  344. package/.versions/2.0.22/.pi/harnesses/agent-hub/review-findings.js +96 -0
  345. package/.versions/2.0.22/.pi/harnesses/agent-hub/review-reuse.ts +47 -0
  346. package/.versions/2.0.22/.pi/harnesses/agent-hub/routing-observation.ts +41 -0
  347. package/.versions/2.0.22/.pi/harnesses/agent-hub/routing-proposal.ts +46 -0
  348. package/.versions/2.0.22/.pi/harnesses/agent-hub/run-budget.js +342 -0
  349. package/.versions/2.0.22/.pi/harnesses/agent-hub/run-namespace.js +93 -0
  350. package/.versions/2.0.22/.pi/harnesses/agent-hub/runtime-test-check.ts +68 -0
  351. package/.versions/2.0.22/.pi/harnesses/agent-hub/safety-routing.ts +22 -0
  352. package/.versions/2.0.22/.pi/harnesses/agent-hub/scope-gate.js +228 -0
  353. package/.versions/2.0.22/.pi/harnesses/agent-hub/session-audit.ts +331 -0
  354. package/.versions/2.0.22/.pi/harnesses/agent-hub/session-health.js +110 -0
  355. package/.versions/2.0.22/.pi/harnesses/agent-hub/session-start.ts +42 -0
  356. package/.versions/2.0.22/.pi/harnesses/agent-hub/spawn.ts +639 -0
  357. package/.versions/2.0.22/.pi/harnesses/agent-hub/specialist-result-receipt.ts +13 -0
  358. package/.versions/2.0.22/.pi/harnesses/agent-hub/specialist-result.ts +69 -0
  359. package/.versions/2.0.22/.pi/harnesses/agent-hub/system1-activity.ts +625 -0
  360. package/.versions/2.0.22/.pi/harnesses/agent-hub/system1-communication-store.ts +217 -0
  361. package/.versions/2.0.22/.pi/harnesses/agent-hub/system1-report.ts +275 -0
  362. package/.versions/2.0.22/.pi/harnesses/agent-hub/system1-runtime.ts +265 -0
  363. package/.versions/2.0.22/.pi/harnesses/agent-hub/task-continuation.ts +4 -0
  364. package/.versions/2.0.22/.pi/harnesses/agent-hub/task-resume-contract.ts +70 -0
  365. package/.versions/2.0.22/.pi/harnesses/agent-hub/task-triage-authorization.ts +151 -0
  366. package/.versions/2.0.22/.pi/harnesses/agent-hub/task-triage-config.ts +20 -0
  367. package/.versions/2.0.22/.pi/harnesses/agent-hub/task-triage-contract.ts +14 -0
  368. package/.versions/2.0.22/.pi/harnesses/agent-hub/task-triage-live-stage-boundary.mjs +49 -0
  369. package/.versions/2.0.22/.pi/harnesses/agent-hub/task-triage-obligations.ts +120 -0
  370. package/.versions/2.0.22/.pi/harnesses/agent-hub/task-triage-policy.ts +16 -0
  371. package/.versions/2.0.22/.pi/harnesses/agent-hub/task-triage-review-contract.mjs +43 -0
  372. package/.versions/2.0.22/.pi/harnesses/agent-hub/task-triage-reviewer-only-contract.mjs +156 -0
  373. package/.versions/2.0.22/.pi/harnesses/agent-hub/task-triage-reviewer-only-diagnostics.mjs +112 -0
  374. package/.versions/2.0.22/.pi/harnesses/agent-hub/task-triage-runtime.ts +130 -0
  375. package/.versions/2.0.22/.pi/harnesses/agent-hub/task-triage-stage-guard.ts +21 -0
  376. package/.versions/2.0.22/.pi/harnesses/agent-hub/task-triage-state.ts +46 -0
  377. package/.versions/2.0.22/.pi/harnesses/agent-hub/timeline.ts +72 -0
  378. package/.versions/2.0.22/.pi/harnesses/agent-hub/tool-catalog-runtime.ts +79 -0
  379. package/.versions/2.0.22/.pi/harnesses/agent-hub/tool-catalog-state.ts +123 -0
  380. package/.versions/2.0.22/.pi/harnesses/agent-hub/tool-protocol.ts +134 -0
  381. package/.versions/2.0.22/.pi/harnesses/agent-hub/tools/action-executors.ts +214 -0
  382. package/.versions/2.0.22/.pi/harnesses/agent-hub/tools/ask-system1-files.ts +15 -0
  383. package/.versions/2.0.22/.pi/harnesses/agent-hub/tools/ask-system1.ts +25 -0
  384. package/.versions/2.0.22/.pi/harnesses/agent-hub/tools/coms-tools.ts +139 -0
  385. package/.versions/2.0.22/.pi/harnesses/agent-hub/tools/context.ts +144 -0
  386. package/.versions/2.0.22/.pi/harnesses/agent-hub/tools/dispatch-agent.ts +88 -0
  387. package/.versions/2.0.22/.pi/harnesses/agent-hub/tools/dispatch-execution.ts +641 -0
  388. package/.versions/2.0.22/.pi/harnesses/agent-hub/tools/dispatch-triage.ts +16 -0
  389. package/.versions/2.0.22/.pi/harnesses/agent-hub/tools/execution-orchestration.ts +22 -0
  390. package/.versions/2.0.22/.pi/harnesses/agent-hub/tools/fleet-tools.ts +200 -0
  391. package/.versions/2.0.22/.pi/harnesses/agent-hub/tools/herdr-executors.ts +95 -0
  392. package/.versions/2.0.22/.pi/harnesses/agent-hub/tools/run-flow.ts +136 -0
  393. package/.versions/2.0.22/.pi/harnesses/agent-hub/tools/set-task-tier.ts +31 -0
  394. package/.versions/2.0.22/.pi/harnesses/agent-hub/tools/spawn-research.ts +67 -0
  395. package/.versions/2.0.22/.pi/harnesses/agent-hub/tools/team-adjust.ts +29 -0
  396. package/.versions/2.0.22/.pi/harnesses/agent-hub/tools/verification-contract.ts +80 -0
  397. package/.versions/2.0.22/.pi/harnesses/agent-hub/tsconfig.json +22 -0
  398. package/.versions/2.0.22/.pi/harnesses/agent-hub/types.ts +66 -0
  399. package/.versions/2.0.22/.pi/harnesses/agent-hub/ui/activity-dots.ts +25 -0
  400. package/.versions/2.0.22/.pi/harnesses/agent-hub/ui/context-budget.ts +89 -0
  401. package/.versions/2.0.22/.pi/harnesses/agent-hub/ui/detail-panel.ts +192 -0
  402. package/.versions/2.0.22/.pi/harnesses/agent-hub/ui/fleet-actions.ts +78 -0
  403. package/.versions/2.0.22/.pi/harnesses/agent-hub/ui/fleet-dashboard.ts +155 -0
  404. package/.versions/2.0.22/.pi/harnesses/agent-hub/ui/fleet-editor.ts +44 -0
  405. package/.versions/2.0.22/.pi/harnesses/agent-hub/ui/fleet-source.ts +179 -0
  406. package/.versions/2.0.22/.pi/harnesses/agent-hub/ui/grid.ts +159 -0
  407. package/.versions/2.0.22/.pi/harnesses/agent-hub/ui/history-store.ts +137 -0
  408. package/.versions/2.0.22/.pi/harnesses/agent-hub/ui/history.ts +234 -0
  409. package/.versions/2.0.22/.pi/harnesses/agent-hub/ui/pool.ts +103 -0
  410. package/.versions/2.0.22/.pi/harnesses/agent-hub/ui/running-strip.ts +2 -0
  411. package/.versions/2.0.22/.pi/harnesses/agent-hub/ui/system1-communication.ts +59 -0
  412. package/.versions/2.0.22/.pi/harnesses/agent-hub/ui/zoom.ts +206 -0
  413. package/.versions/2.0.22/.pi/harnesses/agent-hub/unknown-tool-counter.ts +116 -0
  414. package/.versions/2.0.22/.pi/harnesses/agent-hub/version.ts +42 -0
  415. package/.versions/2.0.22/.pi/harnesses/agent-hub/watchdog-evaluation.ts +110 -0
  416. package/.versions/2.0.22/.pi/harnesses/agent-hub/work-mode-controls.ts +56 -0
  417. package/.versions/2.0.22/.pi/harnesses/agent-hub/work-mode.ts +186 -0
  418. package/.versions/2.0.22/.pi/harnesses/agent-hub/write-isolation.ts +187 -0
  419. package/.versions/2.0.22/.pi/harnesses/ask-user-remote/README.md +59 -0
  420. package/.versions/2.0.22/.pi/harnesses/ask-user-remote/index.ts +569 -0
  421. package/.versions/2.0.22/.pi/harnesses/ask-user-remote/questions.ts +159 -0
  422. package/.versions/2.0.22/.pi/harnesses/ask-user-remote/race-core.js +124 -0
  423. package/.versions/2.0.22/.pi/harnesses/ask-user-remote/runtime-ask.ts +83 -0
  424. package/.versions/2.0.22/.pi/harnesses/coms/README.md +100 -0
  425. package/.versions/2.0.22/.pi/harnesses/coms/index.ts +285 -0
  426. package/.versions/2.0.22/.pi/harnesses/coms/package.json +7 -0
  427. package/.versions/2.0.22/.pi/harnesses/coms/version.ts +42 -0
  428. package/.versions/2.0.22/.pi/harnesses/damage-control-continue/README.md +161 -0
  429. package/.versions/2.0.22/.pi/harnesses/damage-control-continue/index.ts +600 -0
  430. package/.versions/2.0.22/.pi/harnesses/damage-control-continue/package.json +7 -0
  431. package/.versions/2.0.22/.pi/harnesses/damage-control-continue/result-screen.ts +98 -0
  432. package/.versions/2.0.22/.pi/harnesses/damage-control-continue/system1-child.ts +45 -0
  433. package/.versions/2.0.22/.pi/harnesses/damage-control-continue/system1-client.ts +85 -0
  434. package/.versions/2.0.22/.pi/harnesses/damage-control-continue/system1-guard.ts +65 -0
  435. package/.versions/2.0.22/.pi/harnesses/damage-control-continue/version.ts +42 -0
  436. package/.versions/2.0.22/.pi/harnesses/lib/approval-wait.ts +17 -0
  437. package/.versions/2.0.22/.pi/harnesses/lib/bash-policy-analysis.ts +185 -0
  438. package/.versions/2.0.22/.pi/harnesses/lib/changed-file-diagnostics.ts +642 -0
  439. package/.versions/2.0.22/.pi/harnesses/lib/clarification-policy.ts +9 -0
  440. package/.versions/2.0.22/.pi/harnesses/lib/coms-core-io.ts +413 -0
  441. package/.versions/2.0.22/.pi/harnesses/lib/coms-core.ts +680 -0
  442. package/.versions/2.0.22/.pi/harnesses/lib/coms-registry-entry.ts +96 -0
  443. package/.versions/2.0.22/.pi/harnesses/lib/context-budget-child-prompt.ts +214 -0
  444. package/.versions/2.0.22/.pi/harnesses/lib/context-budget-hub-prompt.ts +121 -0
  445. package/.versions/2.0.22/.pi/harnesses/lib/context-budget-view.ts +112 -0
  446. package/.versions/2.0.22/.pi/harnesses/lib/context-budget.ts +114 -0
  447. package/.versions/2.0.22/.pi/harnesses/lib/context-compaction-policy.js +35 -0
  448. package/.versions/2.0.22/.pi/harnesses/lib/damage-action-hash.ts +28 -0
  449. package/.versions/2.0.22/.pi/harnesses/lib/damage-control-shared.ts +229 -0
  450. package/.versions/2.0.22/.pi/harnesses/lib/damage-guard-port.ts +25 -0
  451. package/.versions/2.0.22/.pi/harnesses/lib/damage-result-evidence.ts +25 -0
  452. package/.versions/2.0.22/.pi/harnesses/lib/damage-result-view.ts +16 -0
  453. package/.versions/2.0.22/.pi/harnesses/lib/deterministic-handle-path.ts +25 -0
  454. package/.versions/2.0.22/.pi/harnesses/lib/execution-trace.ts +45 -0
  455. package/.versions/2.0.22/.pi/harnesses/lib/fixtures/context-budget-profiles.json +11 -0
  456. package/.versions/2.0.22/.pi/harnesses/lib/fixtures/hub-prompt-operator.legacy.txt +73 -0
  457. package/.versions/2.0.22/.pi/harnesses/lib/fixtures/hub-prompt-orchestrator.legacy.txt +73 -0
  458. package/.versions/2.0.22/.pi/harnesses/lib/fleet-dashboard-ops.ts +178 -0
  459. package/.versions/2.0.22/.pi/harnesses/lib/fleet-dashboard-view.ts +172 -0
  460. package/.versions/2.0.22/.pi/harnesses/lib/fleet-detail-view.ts +339 -0
  461. package/.versions/2.0.22/.pi/harnesses/lib/fleet-overlay.ts +26 -0
  462. package/.versions/2.0.22/.pi/harnesses/lib/fleet-panel.ts +34 -0
  463. package/.versions/2.0.22/.pi/harnesses/lib/fleet-read-model.ts +609 -0
  464. package/.versions/2.0.22/.pi/harnesses/lib/fleet-selection.ts +24 -0
  465. package/.versions/2.0.22/.pi/harnesses/lib/fleet-strip-controller.ts +75 -0
  466. package/.versions/2.0.22/.pi/harnesses/lib/fleet-strip-view.ts +179 -0
  467. package/.versions/2.0.22/.pi/harnesses/lib/fleet-transcript-store.ts +244 -0
  468. package/.versions/2.0.22/.pi/harnesses/lib/herdr-client.ts +472 -0
  469. package/.versions/2.0.22/.pi/harnesses/lib/herdr-presence.ts +399 -0
  470. package/.versions/2.0.22/.pi/harnesses/lib/hermes-monitor-events.ts +136 -0
  471. package/.versions/2.0.22/.pi/harnesses/lib/hermes-monitor-herdr.ts +28 -0
  472. package/.versions/2.0.22/.pi/harnesses/lib/hermes-monitor-model.ts +18 -0
  473. package/.versions/2.0.22/.pi/harnesses/lib/hermes-monitor-registry.ts +6 -0
  474. package/.versions/2.0.22/.pi/harnesses/lib/hermes-monitor-socket.ts +163 -0
  475. package/.versions/2.0.22/.pi/harnesses/lib/hermes-monitor-store.ts +31 -0
  476. package/.versions/2.0.22/.pi/harnesses/lib/identical-dialog.ts +27 -0
  477. package/.versions/2.0.22/.pi/harnesses/lib/installation-state.js +62 -0
  478. package/.versions/2.0.22/.pi/harnesses/lib/policy-roots.js +106 -0
  479. package/.versions/2.0.22/.pi/harnesses/lib/policy-roots.ts +31 -0
  480. package/.versions/2.0.22/.pi/harnesses/lib/process-shared.ts +9 -0
  481. package/.versions/2.0.22/.pi/harnesses/lib/safe-source-read.js +29 -0
  482. package/.versions/2.0.22/.pi/harnesses/lib/semantic-approval.ts +80 -0
  483. package/.versions/2.0.22/.pi/harnesses/lib/spawned-peers.js +191 -0
  484. package/.versions/2.0.22/.pi/harnesses/lib/system1/config-agentic.js +15 -0
  485. package/.versions/2.0.22/.pi/harnesses/lib/system1/config-context-compaction.js +16 -0
  486. package/.versions/2.0.22/.pi/harnesses/lib/system1/config-damage-guard.js +24 -0
  487. package/.versions/2.0.22/.pi/harnesses/lib/system1/config-file-discovery.js +23 -0
  488. package/.versions/2.0.22/.pi/harnesses/lib/system1/config-json.js +37 -0
  489. package/.versions/2.0.22/.pi/harnesses/lib/system1/config-loader.js +44 -0
  490. package/.versions/2.0.22/.pi/harnesses/lib/system1/config-proactive.js +68 -0
  491. package/.versions/2.0.22/.pi/harnesses/lib/system1/config-triage.js +42 -0
  492. package/.versions/2.0.22/.pi/harnesses/lib/system1/config-v2.js +112 -0
  493. package/.versions/2.0.22/.pi/harnesses/lib/system1/config.js +50 -0
  494. package/.versions/2.0.22/.pi/harnesses/lib/system1/contracts.ts +154 -0
  495. package/.versions/2.0.22/.pi/harnesses/lib/system1/demo.ts +95 -0
  496. package/.versions/2.0.22/.pi/harnesses/lib/system1/jev.ts +503 -0
  497. package/.versions/2.0.22/.pi/harnesses/lib/system1/payload-screen.ts +65 -0
  498. package/.versions/2.0.22/.pi/harnesses/lib/system1/selection.js +11 -0
  499. package/.versions/2.0.22/.pi/harnesses/lib/system1/service.ts +245 -0
  500. package/.versions/2.0.22/.pi/harnesses/lib/update-check.ts +222 -0
  501. package/.versions/2.0.22/.pi/harnesses/package-lock.json +2121 -0
  502. package/.versions/2.0.22/.pi/harnesses/package.json +13 -0
  503. package/.versions/2.0.22/.pi/prompts/af-build.md +27 -0
  504. package/.versions/2.0.22/.pi/prompts/af-code-simplify.md +22 -0
  505. package/.versions/2.0.22/.pi/prompts/af-constraints.md +31 -0
  506. package/.versions/2.0.22/.pi/prompts/af-plan.md +17 -0
  507. package/.versions/2.0.22/.pi/prompts/af-review.md +16 -0
  508. package/.versions/2.0.22/.pi/prompts/af-set-hermes-telegram.md +15 -0
  509. package/.versions/2.0.22/.pi/prompts/af-set-hermes-watchdog.md +6 -0
  510. package/.versions/2.0.22/.pi/prompts/af-setup-rules.md +20 -0
  511. package/.versions/2.0.22/.pi/prompts/af-ship.md +17 -0
  512. package/.versions/2.0.22/.pi/prompts/af-spec.md +15 -0
  513. package/.versions/2.0.22/.pi/prompts/af-test.md +19 -0
  514. package/.versions/2.0.22/.pi/skills/bowser/SKILL.md +145 -0
  515. package/.versions/2.0.22/.version +1 -0
  516. package/.versions/2.0.22/agents/architect.md +24 -0
  517. package/.versions/2.0.22/agents/bowser.md +28 -0
  518. package/.versions/2.0.22/agents/builder.md +55 -0
  519. package/.versions/2.0.22/agents/code-reviewer.md +209 -0
  520. package/.versions/2.0.22/agents/deep-researcher.md +32 -0
  521. package/.versions/2.0.22/agents/documenter.md +22 -0
  522. package/.versions/2.0.22/agents/orchestrator.md +22 -0
  523. package/.versions/2.0.22/agents/plan-reviewer.md +83 -0
  524. package/.versions/2.0.22/agents/planner.md +107 -0
  525. package/.versions/2.0.22/agents/releaser.md +24 -0
  526. package/.versions/2.0.22/agents/researcher.md +30 -0
  527. package/.versions/2.0.22/agents/security-auditor.md +167 -0
  528. package/.versions/2.0.22/agents/test-engineer.md +153 -0
  529. package/.versions/2.0.22/agents/web-debugger.md +44 -0
  530. package/.versions/2.0.22/agents/web-performance-auditor.md +194 -0
  531. package/.versions/2.0.22/bin/catalog/harness-runtime-closure.json +73 -0
  532. package/.versions/2.0.22/codex/fleet-session-client/SKILL.md +34 -0
  533. package/.versions/2.0.22/codex/fleet-session-client.zip +0 -0
  534. package/.versions/2.0.22/docs/ARCHITECTURE.md +982 -0
  535. package/.versions/2.0.22/docs/agent-fleet-setup.md +1103 -0
  536. package/.versions/2.0.22/docs/claude-code-coms-bridge.md +147 -0
  537. package/.versions/2.0.22/docs/codex-session-bridge.md +219 -0
  538. package/.versions/2.0.22/docs/coms-hermes-bridge.md +188 -0
  539. package/.versions/2.0.22/docs/getting-started.md +126 -0
  540. package/.versions/2.0.22/docs/npm-install.md +535 -0
  541. package/.versions/2.0.22/docs/pi-extensions.md +455 -0
  542. package/.versions/2.0.22/docs/pi-setup.md +92 -0
  543. package/.versions/2.0.22/docs/skill-anatomy.md +150 -0
  544. package/.versions/2.0.22/install-manifest.json +3210 -0
  545. package/.versions/2.0.22/justfile +247 -0
  546. package/.versions/2.0.22/manifest-meta.json +1088 -0
  547. package/.versions/2.0.22/references/accessibility-checklist.md +160 -0
  548. package/.versions/2.0.22/references/communication-contract.md +26 -0
  549. package/.versions/2.0.22/references/definition-of-done.md +67 -0
  550. package/.versions/2.0.22/references/fleet-coordination-patterns.md +171 -0
  551. package/.versions/2.0.22/references/observability-checklist.md +92 -0
  552. package/.versions/2.0.22/references/orchestration-patterns.md +370 -0
  553. package/.versions/2.0.22/references/performance-checklist.md +236 -0
  554. package/.versions/2.0.22/references/prompting-patterns.md +380 -0
  555. package/.versions/2.0.22/references/security-checklist.md +245 -0
  556. package/.versions/2.0.22/references/testing-patterns.md +235 -0
  557. package/.versions/2.0.22/references/workflow-authoring.md +304 -0
  558. package/.versions/2.0.22/skills/_internal/grilling.md +59 -0
  559. package/.versions/2.0.22/skills/browser-testing-with-devtools/SKILL.md +351 -0
  560. package/.versions/2.0.22/skills/code-review-and-quality/SKILL.md +396 -0
  561. package/.versions/2.0.22/skills/compound-learning/SKILL.md +137 -0
  562. package/.versions/2.0.22/skills/constraint-driven-development/SKILL.md +338 -0
  563. package/.versions/2.0.22/skills/constraint-driven-development/references/floor-guard.md +99 -0
  564. package/.versions/2.0.22/skills/context-engineering/SKILL.md +341 -0
  565. package/.versions/2.0.22/skills/deprecation-and-migration/SKILL.md +247 -0
  566. package/.versions/2.0.22/skills/designing-agents/SKILL.md +394 -0
  567. package/.versions/2.0.22/skills/designing-agents/pi-harness-authoring.md +222 -0
  568. package/.versions/2.0.22/skills/drafting-workflows/SKILL.md +143 -0
  569. package/.versions/2.0.22/skills/drafting-workflows/scripts/make-workflow.ts +177 -0
  570. package/.versions/2.0.22/skills/frontend-ui-engineering/SKILL.md +328 -0
  571. package/.versions/2.0.22/skills/git-workflow-and-versioning/SKILL.md +316 -0
  572. package/.versions/2.0.22/skills/idea-refine/SKILL.md +182 -0
  573. package/.versions/2.0.22/skills/idea-refine/examples.md +238 -0
  574. package/.versions/2.0.22/skills/idea-refine/frameworks.md +99 -0
  575. package/.versions/2.0.22/skills/idea-refine/refinement-criteria.md +113 -0
  576. package/.versions/2.0.22/skills/idea-refine/scripts/idea-refine.sh +15 -0
  577. package/.versions/2.0.22/skills/incremental-implementation/SKILL.md +353 -0
  578. package/.versions/2.0.22/skills/incremental-implementation.zip +0 -0
  579. package/.versions/2.0.22/skills/interview-me/SKILL.md +226 -0
  580. package/.versions/2.0.22/skills/orchestration-verification/SKILL.md +182 -0
  581. package/.versions/2.0.22/skills/peer-coms/SKILL.md +90 -0
  582. package/.versions/2.0.22/skills/performance-optimization/SKILL.md +496 -0
  583. package/.versions/2.0.22/skills/planning-and-task-breakdown/SKILL.md +318 -0
  584. package/.versions/2.0.22/skills/planning-and-task-breakdown.zip +0 -0
  585. package/.versions/2.0.22/skills/repository-ai-setup/SKILL.md +135 -0
  586. package/.versions/2.0.22/skills/repository-ai-setup/references/agent-fleet-ai-state.template.json +4 -0
  587. package/.versions/2.0.22/skills/repository-ai-setup/references/apply-contract.md +74 -0
  588. package/.versions/2.0.22/skills/repository-ai-setup/references/provenance-template.md +16 -0
  589. package/.versions/2.0.22/skills/repository-ai-setup/references/setup-flow.md +108 -0
  590. package/.versions/2.0.22/skills/repository-ai-setup/references/verify-setup.md +20 -0
  591. package/.versions/2.0.22/skills/repository-ai-setup.zip +0 -0
  592. package/.versions/2.0.22/skills/security-and-hardening/SKILL.md +524 -0
  593. package/.versions/2.0.22/skills/spec-driven-development/SKILL.md +295 -0
  594. package/.versions/2.0.22/skills/spec-driven-development.zip +0 -0
  595. package/.versions/2.0.22/skills/using-agent-skills/SKILL.md +198 -0
  596. package/.versions/2.0.22/vendor/agent-skills-upstream/LICENSE +21 -0
  597. package/.versions/2.0.22/vendor/agent-skills-upstream/README.md +430 -0
  598. package/.versions/2.0.22/vendor/agent-skills-upstream/skills/api-and-interface-design/SKILL.md +367 -0
  599. package/.versions/2.0.22/vendor/agent-skills-upstream/skills/browser-testing-with-devtools/SKILL.md +317 -0
  600. package/.versions/2.0.22/vendor/agent-skills-upstream/skills/ci-cd-and-automation/SKILL.md +390 -0
  601. package/.versions/2.0.22/vendor/agent-skills-upstream/skills/code-review-and-quality/SKILL.md +396 -0
  602. package/.versions/2.0.22/vendor/agent-skills-upstream/skills/code-simplification/SKILL.md +331 -0
  603. package/.versions/2.0.22/vendor/agent-skills-upstream/skills/constraint-driven-development/SKILL.md +311 -0
  604. package/.versions/2.0.22/vendor/agent-skills-upstream/skills/constraint-driven-development/references/floor-guard.md +99 -0
  605. package/.versions/2.0.22/vendor/agent-skills-upstream/skills/context-engineering/SKILL.md +337 -0
  606. package/.versions/2.0.22/vendor/agent-skills-upstream/skills/debugging-and-error-recovery/SKILL.md +300 -0
  607. package/.versions/2.0.22/vendor/agent-skills-upstream/skills/deprecation-and-migration/SKILL.md +247 -0
  608. package/.versions/2.0.22/vendor/agent-skills-upstream/skills/documentation-and-adrs/SKILL.md +288 -0
  609. package/.versions/2.0.22/vendor/agent-skills-upstream/skills/doubt-driven-development/SKILL.md +243 -0
  610. package/.versions/2.0.22/vendor/agent-skills-upstream/skills/frontend-ui-engineering/SKILL.md +328 -0
  611. package/.versions/2.0.22/vendor/agent-skills-upstream/skills/git-workflow-and-versioning/SKILL.md +355 -0
  612. package/.versions/2.0.22/vendor/agent-skills-upstream/skills/idea-refine/SKILL.md +178 -0
  613. package/.versions/2.0.22/vendor/agent-skills-upstream/skills/idea-refine/examples.md +238 -0
  614. package/.versions/2.0.22/vendor/agent-skills-upstream/skills/idea-refine/frameworks.md +99 -0
  615. package/.versions/2.0.22/vendor/agent-skills-upstream/skills/idea-refine/refinement-criteria.md +113 -0
  616. package/.versions/2.0.22/vendor/agent-skills-upstream/skills/idea-refine/scripts/idea-refine.sh +15 -0
  617. package/.versions/2.0.22/vendor/agent-skills-upstream/skills/incremental-implementation/SKILL.md +249 -0
  618. package/.versions/2.0.22/vendor/agent-skills-upstream/skills/interview-me/SKILL.md +225 -0
  619. package/.versions/2.0.22/vendor/agent-skills-upstream/skills/observability-and-instrumentation/SKILL.md +238 -0
  620. package/.versions/2.0.22/vendor/agent-skills-upstream/skills/performance-optimization/SKILL.md +496 -0
  621. package/.versions/2.0.22/vendor/agent-skills-upstream/skills/planning-and-task-breakdown/SKILL.md +257 -0
  622. package/.versions/2.0.22/vendor/agent-skills-upstream/skills/security-and-hardening/SKILL.md +524 -0
  623. package/.versions/2.0.22/vendor/agent-skills-upstream/skills/shipping-and-launch/SKILL.md +330 -0
  624. package/.versions/2.0.22/vendor/agent-skills-upstream/skills/source-driven-development/SKILL.md +216 -0
  625. package/.versions/2.0.22/vendor/agent-skills-upstream/skills/spec-driven-development/SKILL.md +245 -0
  626. package/.versions/2.0.22/vendor/agent-skills-upstream/skills/test-driven-development/SKILL.md +398 -0
  627. package/.versions/2.0.22/vendor/agent-skills-upstream/skills/using-agent-skills/SKILL.md +192 -0
  628. package/CHANGELOG.md +13 -0
  629. package/bin/cli.js +3 -2
  630. package/docs/ARCHITECTURE.md +6 -3
  631. package/docs/system1-damage-guard.md +23 -2
  632. package/install-manifest.json +1 -1
  633. package/package.json +1 -1
@@ -0,0 +1,1103 @@
1
+ # Agent Fleet — Project Files
2
+
3
+ agent-fleet keeps a few small files in a project's `.ai/` directory. They have
4
+ different readers and different lifetimes, so they are kept separate.
5
+
6
+ | File | Read by | When |
7
+ |------|---------|------|
8
+ | `.ai/agent-fleet-overrides.md` | `spec-driven-development`, `planning-and-task-breakdown`, `browser-testing-with-devtools`, `git-workflow-and-versioning`, `compound-learning` (the `rules:`/`docs:` keys of `## agent-hub`), `agent-hub` pi harness | Every run of those skills / every session start of the harness |
9
+ | `.ai/agent-fleet.json` | the deterministic `agent-fleet` lifecycle (`setup`) — human-owned desired state (preset/features); intended to be committed | Every setup plan; created/updated when setup persists desired state or migrates legacy installs |
10
+ | `.ai/agent-fleet-state.json` | the deterministic `agent-fleet` lifecycle (`setup`, `doctor`, `uninstall`) | Every lifecycle plan and apply |
11
+ | `.ai/agent-fleet-setup.md` | humans — rendered from the state file, never parsed back | Rewritten on every setup apply |
12
+ | `.ai/agent-fleet-transaction.json` | the deterministic lifecycle (`setup`, `doctor --fix`) — crash-recovery journal for in-flight file transactions | Written during apply; recovered or discarded by setup/doctor; removed when the transaction commits or is cleaned up |
13
+ | `.ai/stt.json` *(optional)* | `pi-voice-stt` extension | Every pi session start, when the extension is installed |
14
+ | `.ai/system1.json` *(optional)* | System 1 shared runtime and doctor | When `system1` is selected directly or through `system1-task-triage` |
15
+ | `consumers.taskTriage` in `.ai/system1.json` *(optional)* | Hub task-triage consumer and doctor | At Hub session start; missing/off/invalid means no new task-triage inference |
16
+ | `consumers.proactiveReview` in `.ai/system1.json` *(optional)* | Hub proactive turn review consumer | At Hub session start; missing means off |
17
+
18
+ The `.ai/system1.json` file is human-owned, non-secret provider configuration.
19
+ Selecting the foundation alone prints its required shape. Consented task-triage
20
+ setup additionally proposes this template when absent, in the same exact-plan
21
+ transaction as the consumer config; existing provider files, including explicit
22
+ off, are preserved. Its `apiKeyEnv` field names a caller-environment variable; it never contains the
23
+ credential itself. See [System 1 configuration](#system-1-configuration).
24
+
25
+ The `.ai/stt.json` file is present only when the optional `pi-voice-stt` voice-dictation
26
+ extension has been configured (by deterministic setup or by hand). Like the overrides file it holds
27
+ **no secrets** — it names the env vars (`apiKeyEnv`, plus the Azure endpoint var) whose values
28
+ live in a gitignored root `.env`. See [pi-voice-stt config](#ai-sttjson) below.
29
+
30
+ Keep them split: the overrides file is loaded into context constantly, so it
31
+ must stay minimal; the install record is read only by the CLI, so it can be
32
+ large.
33
+
34
+ ## Unified Fleet runtime configuration
35
+
36
+ A Pi workspace has one public runtime entry point. Bare Fleet loads Fleet Core
37
+ plus Agent Hub in **operator** work mode, in the current terminal, with no native
38
+ specialists active:
39
+
40
+ ```bash
41
+ just fleet
42
+ just fleet --project af
43
+ ```
44
+
45
+ Work mode, native roster, and peer topology are separate controls:
46
+
47
+ ```bash
48
+ # Direct tools plus an available native roster.
49
+ just fleet --work-mode operator --agents frontend --project af
50
+
51
+ # A roster implies orchestrator when work mode is not explicit.
52
+ just fleet --agents frontend --project af
53
+
54
+ # Herdr Hub-only and Hub-plus-peer topologies.
55
+ just fleet --herdr --project af
56
+ just fleet --agents frontend --peers frontend --project af
57
+ ```
58
+
59
+ Startup precedence is deterministic: explicit `--work-mode` wins; otherwise an
60
+ explicit `--agents` roster implies `orchestrator`; otherwise work mode is
61
+ `operator`. An orchestrator startup must name a roster. `--herdr` affects only
62
+ placement, while `--peers <preset>` implies Herdr and starts the selected peer
63
+ preset. Neither topology option selects a native roster.
64
+
65
+ `--project <name>` selects one coms namespace for the Hub and every standing or
66
+ dynamically spawned peer. Dynamic peer tools deliberately expose no project
67
+ override, so an agent cannot cross that boundary. The default project is
68
+ `default`; use an explicit project when multiple fleets share a machine.
69
+
70
+ The configuration files have distinct ownership:
71
+
72
+ | File | Controls |
73
+ | --- | --- |
74
+ | `.pi/agents/teams.yaml` | Named **native rosters** of Pi personas available to `dispatch_agent`. Bare Fleet ignores YAML ordering and starts empty; select one with `--agents`, `/af-agents-team`, or add individuals with `/af-agents-add`. |
75
+ | `.pi/agents/peers.yaml` | Named **standing peer presets** and each peer's runner (`pi` or `claude-code`), persona, model, extensions, and optional declared `env_file`. Select a preset with `--peers`; dynamic `herdr_spawn_peer` uses the same declaration resolver. |
76
+ | `.pi/agents/dispatch-policy.yaml` | Routing used only when `dispatch_agent.backend` is `auto`: native/coms preference, fallback, grace period, and peer reply timeout. |
77
+ | `.ai/agent-fleet-overrides.md` (`## agent-hub`) | Project-specific Hub language, model overrides, rule/doc roots, budget ceilings, watchdog, and related execution policy. It does not choose startup work mode or topology. |
78
+
79
+ For deterministic routing, `backend: "native"` always starts the local Pi
80
+ specialist even if a same-name peer is visible. `backend: "coms"` requires a
81
+ visible same-name peer and refuses without native fallback. The default
82
+ `backend: "auto"` follows `dispatch-policy.yaml` and preserves its configured
83
+ fallback behavior.
84
+
85
+ Capability packs load automatically—do not run an activation command. Explicit task intent activates the matching ready surface; readiness alone never exposes coms or Herdr tools to the model. Ambiguous fleet/peer/workspace intent gets one confirmation before its first side effect, and active task packs persist until the explicit `set_task_tier(new_task: true)` reset.
86
+
87
+ Capability flags and runtime gates fail closed:
88
+
89
+ - `--no-coms` keeps operator direct tools and native dispatch available, but
90
+ peer dispatch, `coms_send`/`coms_await`, and `/af-handoff` refuse actionably.
91
+ - `--herdr` and `--peers` require a running [Herdr](https://herdr.dev) server.
92
+ Without Herdr, bare Fleet still works and dynamic pane tools stay inactive.
93
+ - `--browser` adds the browser extension surface and `--all-extensions` opts
94
+ into the complete approved extension set. Missing optional dependencies do
95
+ not grant tools merely because a flag was supplied.
96
+ - Hub-owned slash commands remain registered in both work modes. A missing coms
97
+ runtime, Herdr connection, target peer, or native roster produces a
98
+ capability refusal rather than a missing command.
99
+
100
+ During the migration release, `just fleet hub`, `just fleet team <preset>`,
101
+ `just fleet team <preset> --no-hub`, and `--solo` remain accepted and print a
102
+ canonical replacement. New automation should use `just fleet` with
103
+ `--agents`, `--peers`, `--herdr`, and `--no-coms`; compatibility does not imply
104
+ that the deprecated grammar will remain indefinitely.
105
+
106
+ ### Resume and recovery
107
+
108
+ The Hub distinguishes the **pre-turn surface** (stable replacement prompt, volatile state capsule,
109
+ and active tool schemas) from **intra-turn pressure** (conversation and tool results accumulated in
110
+ the live model window). `/af-context` shows both. At 60% live usage the Hub warns and transiently makes
111
+ compaction support available; at 70% it blocks the next provider continuation and requests a
112
+ single automatic compaction after the current result is persisted. A prompt submitted during
113
+ startup/recovery is retained in memory and replayed once after success. At the 80% ceiling, work stops
114
+ only after a failed recovery or when even the compacted baseline is at or above 80%; see
115
+ [context continuity](system1-context-continuity.md#automatic-compaction-monitoring).
116
+
117
+ If automatic recovery fails, the prompt remains retained. Pi's built-in command is the bare-runtime
118
+ fallback:
119
+
120
+ ```text
121
+ /compact Preserve the current goal, decisions, modified files, pending operations, blockers, and next step.
122
+ ```
123
+
124
+ You can also switch to a larger-context model. Do not try to make room by editing the session file.
125
+ The JSONL shown by `/session` under `~/.pi/agent/sessions/` is Pi's authoritative append-only record;
126
+ resume with `/resume`, `pi -c`, or `pi --session <path|id>`. Never edit, truncate, reorder, or add
127
+ synthetic entries to recover from context pressure.
128
+
129
+ A resumed orchestrator session may instead be blocked because its persisted team name no longer
130
+ resolves against the current `.pi/agents/teams.yaml` and persona files. This is a fail-closed roster
131
+ recovery gate: orchestrator work mode and its direct-tool restrictions remain in force. Choose a valid
132
+ team with `/af-agents-team`, restart publicly with `just fleet --agents <name>`, or explicitly choose
133
+ operator work mode with `/af-work-mode operator` / `just fleet --work-mode operator`. Direct Pi launches
134
+ use `--agent-team <name>` or `--work-mode operator`. Explicit startup flags win over persisted state;
135
+ fix missing or renamed team/persona declarations before selecting them.
136
+
137
+ ## System 1 configuration
138
+
139
+ System 1 is an experimental named feature and is excluded from automatic
140
+ Default/Full selection. Select it explicitly and persist that desired state when
141
+ needed:
142
+
143
+ ```bash
144
+ npx @chankov/agent-fleet@latest setup \
145
+ --preset default --features system1 --save-desired --yes
146
+ ```
147
+
148
+ Then create the human-owned `.ai/system1.json` with exactly these version-1
149
+ fields and values:
150
+
151
+ ```json
152
+ {
153
+ "version": 2,
154
+ "mode": "auto",
155
+ "provider": "typesafe",
156
+ "model": "jev-1.13.0",
157
+ "apiKeyEnv": "TYPESAFE_API_KEY",
158
+ "consumers": {}
159
+ }
160
+ ```
161
+
162
+ `mode: "off"` disables the service even when a key exists. Selection plus
163
+ `mode: "auto"` still requires the valid configuration and a nonempty
164
+ `TYPESAFE_API_KEY` in the caller environment. Key presence alone never enables
165
+ System 1. The runtime does not execute `.env`: the managed `just` launcher can
166
+ load the root `.env`, while a direct Node invocation must receive an exported or
167
+ otherwise injected variable.
168
+
169
+ `agent-fleet doctor` reads the desired state and configuration as data. Its
170
+ System 1 result is advisory and read-only, including with `--fix`; it performs
171
+ no provider request and does not validate the key. Doctor does not inspect or
172
+ load `.env`; declaration status is unknown (`envDeclared: null`). It checks only
173
+ key presence in its current process environment and never prints the value.
174
+
175
+ The installed demo is offline unless `--live` is supplied. Both forms require a
176
+ Node runtime supporting `--experimental-strip-types`:
177
+
178
+ ```bash
179
+ # Readiness only; no provider call.
180
+ node --experimental-strip-types --preserve-symlinks --preserve-symlinks-main \
181
+ .pi/harnesses/lib/system1/demo.ts
182
+
183
+ # Explicit live request using only embedded synthetic Bulgarian/English data.
184
+ node --experimental-strip-types --preserve-symlinks --preserve-symlinks-main \
185
+ .pi/harnesses/lib/system1/demo.ts --live
186
+ ```
187
+
188
+ The only phase-0 production provider/model is TypeSafe Jev `jev-1.13.0` at its
189
+ fixed official endpoint. No local model is installed and no fallback model is
190
+ selected. Outputs preserve available uncertainty but do not establish truth,
191
+ action authority, or calibration for a particular domain/language. The native specialist drift watchdog has a separate **consumer opt-in**:
192
+ `watchdog-system1: off|shadow|active` in `## agent-hub` (default `off`).
193
+ It also requires an armed watchdog, explicit feature selection, valid shared
194
+ configuration and a key. `off` makes no System 1 evaluation. `shadow` runs the
195
+ LLM judge immediately and System 1 in parallel; only the LLM can stop a child.
196
+ `active` is an **uncalibrated, explicitly opted-in experiment**: only the
197
+ advisory `scope` rule may skip LLM when Jev `jev-1.13.0` returns provider
198
+ `on_track` with confidence and on-track distribution ≥0.95 and all three
199
+ contradiction probabilities ≤0.05. Terminal `loop`, `failures`, and `toolcap`
200
+ always use LLM. `/af-watchdog` labels this `experimental: scope only; G2 not
201
+ validated`. This can miss a scope advisory; it is not G2 approval. Missing or
202
+ mismatched provider/config returns to LLM; default consumer mode remains off. Restart Hub to apply a
203
+ consumer mode/config snapshot; `/af-watchdog on|off|auto` changes Layer 1 arming,
204
+ not the System 1 consumer mode. For rollback set `watchdog-system1: off` for the
205
+ next session (cancel the current run if needed).
206
+
207
+ **Watchdog System 1 outbound state** is limited to a redacted task, normalized relative
208
+ scope/paths, 40 structured tool events without commands, bodies, arguments or
209
+ outputs, rule facts, coverage and counters (32 KiB maximum). This does **not**
210
+ limit the existing parallel LLM judge prompt: it includes the original task,
211
+ scope and a recent trail with up to 120 characters of raw tool arguments per
212
+ call. Both paths can reveal data. For a future pilot, review the tasks, files
213
+ and likely tool arguments; never use client/production data or secrets. Manual
214
+ review cannot guarantee that an agent will not produce unexpected arguments.
215
+ The final native spawn env removes `TYPESAFE_API_KEY`; this does not protect
216
+ against file reads or other launchers. Trace (`<sessionDir>/artifacts/watchdog/events.jsonl`)
217
+ records only allowlisted metadata. `/af-watchdog` shows readiness/checks, the
218
+ strip under chat and `/af-agents` show owner badges and detail history;
219
+ `/af-hub-report` counts evaluations/LLM attempts separately; `/af-audit`
220
+ shows read-only decision status including `judge_unavailable`. Missing usage
221
+ is unknown, not zero. A failed judge gets one live, revalidated retry after 5 s
222
+ rather than the 90 s success cooldown. Offline report code and mock tests are
223
+ not a real shadow pilot. G1 requires manual/outbound review; G2 additionally
224
+ requires independent human labels identifying the snapshot **and LLM attempt**,
225
+ held-out session evaluation and an explicit maintainer-approved profile. Older
226
+ labels without an LLM attempt ID cannot qualify. No gate is inferred from doctor readiness.
227
+
228
+ ## Task triage (active experimental; off by default)
229
+
230
+ Task triage is a separate Hub consumer, not `dispatch_triage` persona advice,
231
+ watchdog calibration, or the spend classification performed by `set_task_tier`.
232
+ It uses the shared TypeSafe `jev-1.13.0` service, even with watchdog off. After
233
+ explicit configuration and remote-context consent, it assesses user input before
234
+ the first Hub model turn and adds process requirements; it is **active but not
235
+ calibrated**. Selecting the foundation, having a key, `--yes`, or automatic Full
236
+ does not grant task-context consent.
237
+
238
+ ### Enable and preserve the desired selection
239
+
240
+ In a source checkout, use the local CLI (no publishing is implied):
241
+
242
+ ```bash
243
+ # Preview only; no inference or target writes.
244
+ node bin/cli.js setup --workspace ~/projects/my-app --preset default \
245
+ --features system1-task-triage --save-desired --dry-run
246
+
247
+ # Separate task-context consent plus approval of the exact file plan.
248
+ node bin/cli.js setup --workspace ~/projects/my-app --preset default \
249
+ --features system1-task-triage --save-desired --task-triage-consent --yes
250
+ ```
251
+
252
+ For a package containing this implementation, use
253
+ `npx @chankov/agent-fleet@<version> setup` with the same options from the target
254
+ workspace. The checkout does not
255
+ change an already published package. A real TTY asks separately for task-context
256
+ consent, including Full + all features, before final exact-plan approval.
257
+
258
+ `--features` names the **complete desired feature set**, not an additive toggle;
259
+ include any features you want to keep. Over an existing `.ai/agent-fleet.json`,
260
+ flags are temporary unless `--save-desired` is passed. Use it for persistent
261
+ headless opt-in/disable: the shared service reads the saved desired features,
262
+ while the consumer separately checks applied installer selection. A temporary
263
+ opt-in can therefore install an active config while the shared service remains
264
+ unselected. `config active` alone is not runtime readiness. Task-triage implies
265
+ the `system1` dependency without rewriting it as a directly requested feature.
266
+
267
+ Setup transactionally creates an absent consumer config and an absent nonsecret
268
+ provider template. It does not collect a key or create `.env`. Existing human
269
+ files, including explicit off, remain byte-for-byte unchanged: another consent
270
+ flag does not flip them on. Runtime dependencies still require the existing
271
+ `--allow-exec` path or `just fleet deps`; file installation is not dependency
272
+ readiness. After persisting your selection, use `just fleet deps` or run setup
273
+ with `--allow-exec --yes` and no replacement feature flags to retain that selection.
274
+ Supply the key through the caller environment before launching Hub.
275
+
276
+ The exact unified v2 template (with the service initially off) is:
277
+
278
+ ```json
279
+ {
280
+ "version": 2,
281
+ "mode": "off",
282
+ "provider": "typesafe",
283
+ "model": "jev-1.13.0",
284
+ "apiKeyEnv": "TYPESAFE_API_KEY",
285
+ "consumers": {
286
+ "taskTriage": {
287
+ "mode": "experimental",
288
+ "remoteContextApproved": true,
289
+ "questionVersion": "task-triage/questions/v1",
290
+ "policyVersion": "task-triage/policy/v1",
291
+ "limits": {
292
+ "maxTaskBytes": 40960,
293
+ "maxStateBytes": 65536,
294
+ "maxCallsPerSession": 100,
295
+ "timeoutMs": 2000
296
+ }
297
+ }
298
+ }
299
+ }
300
+ ```
301
+
302
+ Unsupported versions/fields/limits or provider/model mismatch do not become
303
+ calibrated defaults. To turn this config off manually, retain its complete schema
304
+ and change **both** `mode` to `"off"` and `remoteContextApproved` to `false`.
305
+ Provider `.ai/system1.json` remains separate; provider off prevents all its
306
+ consumers from making requests. Restart Hub to adopt configuration changes.
307
+
308
+ ### Input, requirements and recovery
309
+
310
+ - The runtime input is user task/follow-up text plus its declared process scope.
311
+ The state builder supports allowlisted relative path/kind metadata, but does
312
+ not discover or read file bodies. Aggregate task/clarifications are limited to
313
+ **40 KiB UTF-8**, serialized state to **64 KiB**. Sensitive, incomplete or
314
+ oversized input is refused, not silently truncated; this is not a guarantee
315
+ that all possible private text can be detected.
316
+ - At most **100 logical evaluations per saved session**, **2,000 ms total** per
317
+ evaluation including adapter retries. Identical input/scope reuses the cache;
318
+ task adoption/compaction/resume does not refill the budget. New scope can cause
319
+ a second evaluation. Physical attempts and logical calls are distinct; unknown
320
+ usage/cost stays unknown. These are not the separate live-pilot billing caps.
321
+ - Requested `security_change` at **p ≥ 0.80** adds review before acceptance, not
322
+ before authoring. `wide_change` at **p ≥ 0.85** adds plan before dependent
323
+ effects plus review. `irreversible_execution` at **p ≥ 0.80** adds exact-action,
324
+ one-use human confirmation. Signals are independent; no multiplied score or
325
+ automatic tier/model/permission increase. A low score is not a safety clearance.
326
+ - Additions retain task/evaluation/input provenance. Provider failure, low later
327
+ scores, disable and resume do not erase them. Classification and budgets remain
328
+ separate. Pending input must be bound through `set_task_tier` before dependent
329
+ effects; genuine new-task supersession can require human authorization.
330
+ - For a missing plan producer, ask the human to use `/af-agents-add planner` or
331
+ `/af-agents-team`. For review, use `/af-agents-add code-reviewer` (or the
332
+ permitted plan-reviewer/security-auditor) or select a suitable roster. There is
333
+ no automatic roster change. Dispatch and review counts are usage, not caps;
334
+ an unfinished requirement stays open until its evidence exists.
335
+ - `/af-task-triage-waive <addition-id> <reason>` asks for a correlated human
336
+ decision over one bound addition. It stays **waived**, never satisfied, and
337
+ cannot remove baseline or other-source requirements. Stale, denied, forged or
338
+ replayed grants do not authorize anything. `/af-task-triage-recover` retries a
339
+ blocked authoritative process append/readback; refusal requires session
340
+ inspection or valid resume, not editing JSONL.
341
+ - Direct Hub `bash`/`edit`/`write` confirmation binds the exact tool call, input
342
+ fingerprint and working directory. The human question shows the **complete
343
+ tool inputs as JSON**, labelled data rather than instructions: bash command/
344
+ timeout, write path/content, or edit path/all replacements, plus cwd. The
345
+ complete detail block is capped at **8 KiB (8192 bytes)**; missing, invalid,
346
+ sensitive/credential-like/email, terminal/bidi-control, mismatched or oversized
347
+ details refuse authorization, **without truncation or partial redaction**.
348
+ Non-ASCII characters are losslessly escaped in JSON. Sensitive-text detection
349
+ is heuristic, not comprehensive secret/PII detection. Inputs/cwd/task/revision/
350
+ operation/call ID are rechecked before one-use consumption. Generic bash has
351
+ no new read-only exemption. Native stage-producer
352
+ exceptions are bounded to the existing supported path. Arbitrary child/coms/
353
+ remote action binding is not universally supported; a confirmation-required
354
+ effect without supported binding is refused. Damage-control remains separate.
355
+
356
+ ### Observe, disable and verify
357
+
358
+ Doctor is offline advisory: it distinguishes missing/unapproved/invalid config,
359
+ policy mismatch, provider off/missing key and locally missing canonical roles.
360
+ `locally_ready` means no API validation; local persona files do not prove a live
361
+ roster. Doctor/`--fix` do not activate inference or rewrite human triage/provider
362
+ files, and do not inspect `.env` or print key values.
363
+
364
+ `/af-agents-list` opens the full Fleet dashboard with session-level assessment,
365
+ probabilities, effective obligations, active/waived additions and blockers, even
366
+ without worker rows. Task triage is not added to the small below-editor strip.
367
+ Fleet `1` opens the communication viewer: `e` explicitly enables memory-only
368
+ capture, Enter inspects, left/right and Enter copy, `d` disables/clears. The
369
+ **32 KiB viewer payload limit** is unchanged: a valid larger task may be withheld,
370
+ not truncated. Clipboard may retain copied synthetic/sanitized data after clear.
371
+
372
+ `/af-audit` exposes metadata-only evaluation/action history and unknown/degraded
373
+ states. Observation failure does not change enforcement; authoritative state,
374
+ grant or consumption persistence failure refuses dependent effects. Exact action
375
+ inputs are not added to metadata audit, but the **human question is not local-only**:
376
+ it uses the existing ask-user local/remote human route and can expose action
377
+ paths/content to that configured human endpoint. That route, ordinary Pi tool/
378
+ session rendering, terminal recordings and clipboard have separate privacy
379
+ boundaries; the metadata/viewer caps do not sanitize them. Provider ok,
380
+ assessment applied, process complete, an action grant and a tool result are
381
+ separate facts; none by itself is independent semantic task acceptance.
382
+
383
+ To stop future evaluations while keeping the human config and saved obligations:
384
+
385
+ ```bash
386
+ node bin/cli.js setup --workspace ~/projects/my-app --preset default \
387
+ --features none --save-desired --yes
388
+ ```
389
+
390
+ Use your complete remaining feature set instead of `none` if retaining other
391
+ features. Restart/resume Hub after disabling; cancel in-flight work normally if
392
+ immediate stopping is required. Do not delete additions or edit session JSONL to
393
+ roll back. Re-enable only through reviewed desired selection and valid human
394
+ consent/config; a preserved explicit off must be changed by the human.
395
+
396
+ Source verification is offline: `npm run test:task-triage` runs guarded policy,
397
+ authority, runtime, real-Pi and combined extracted-tarball/disable-resume tests;
398
+ `npm run test:full` includes it and existing regressions. Node 18 checks CLI/doctor
399
+ compatibility, not the TypeScript Pi runtime. A separate live pilot requires its
400
+ own approved data/budget; offline success and UI approval do not prove accuracy,
401
+ calibration or release readiness.
402
+
403
+ ## Proactive turn review (experimental)
404
+
405
+ This is a **separate per-repository opt-in**, not a new provider or an installer
406
+ feature flag. The Hub/native consumer uses the existing shared System 1 service
407
+ (`system1` feature, `.ai/system1.json`, caller-owned key) only when selected
408
+ excerpts are explicitly permitted and the service is ready. Its config is
409
+ human-owned `consumers.proactiveReview` in `.ai/system1.json`; setup/doctor do not create or activate
410
+ it. Missing config or valid `{"version":1,"mode":"off"}` causes **zero
411
+ proactive capture, inference, and feedback**. Invalid configuration fails closed.
412
+ Nothing here authorizes a live pilot, client repository, ringithub, provider
413
+ request, release, deployment or active configuration change.
414
+
415
+ Modes: `shadow` records bounded local evidence/findings without feedback;
416
+ `advisory` additionally offers bounded feedback at the next **natural** turn,
417
+ never starting a turn itself. With `remoteContext: "disabled"` (the default),
418
+ either enabled mode is **local-only**: source-bound deterministic checks may
419
+ run, but no semantic model review; no finding does not mean reviewed. With
420
+ `remoteContext: "selected-excerpts"`, permitted included source/assistant
421
+ excerpts may be transmitted to the already configured System 1 provider for
422
+ semantic assessment. This is not a blanket secrecy guarantee: source is
423
+ selected within approved scope and bounded/excluded, but automatic comprehensive
424
+ redaction of unknown secrets is not established. Review the *exact outbound
425
+ payload* and scope before any real opt-in. No auto-fix, kill, blocking,
426
+ acceptance authority, watchdog override, or autonomous continuation follows a
427
+ finding. Feedback is restricted to the same owner/attempt/task and current
428
+ source hashes and the session-bound rule revision, once per finding revision, at an already-occurring context
429
+ hook; changed evidence is refused.
430
+
431
+ **Schema illustration only — NOT executed, NOT authorization or a recommended
432
+ repository scope:** after separate human approval of the exact repository,
433
+ paths, outbound categories, budget and payload, a human may choose values in
434
+ this shape; do not copy these example paths into active configuration:
435
+
436
+ ```json
437
+ {
438
+ "version": 1,
439
+ "mode": "shadow",
440
+ "remoteContext": "selected-excerpts",
441
+ "include": ["src/**", "docs/**"],
442
+ "maxEvaluationsPerSession": 100
443
+ }
444
+ ```
445
+
446
+ Only `version`, `mode`, `remoteContext`, `include`,
447
+ `maxEvaluationsPerSession`, `localBindings` are accepted. Version is `1`;
448
+ mode is `off|shadow|advisory`; remote context is
449
+ `disabled|selected-excerpts`. Enabled modes require a nonempty explicit
450
+ repository-relative `include` (≤32 distinct entries, ≤256 characters each;
451
+ no absolute/dot/traversal paths, hidden segments, backslashes, special
452
+ bracket/negation patterns or dependency/build/runtime directories). The
453
+ session evaluation budget is an integer 0–100, default 100 in enabled modes.
454
+ The optional `localBindings` (≤16) require reviewed source-bound Markdown
455
+ `rule` path/heading/positive occurrence/lowercase SHA-256 hash,
456
+ `applicability` paths and added/modified kinds, and explicit paths/legacy
457
+ exceptions; `new-file-placement` also needs an added-only prefix, while
458
+ `relative-markdown-links` checks link form/escape, **not target existence**.
459
+ These are not prose-rule compilation or a general Markdown/AST validator.
460
+ Off must not retain active includes, remote permission, bindings or explicit
461
+ nonzero budget: rollback uses the complete minimal off JSON above, then a
462
+ **new Hub session**. Cancel current work if immediate interruption is needed;
463
+ do not delete session evidence or user config as cleanup.
464
+
465
+ Rules come read-only from `rules:` roots in `## agent-hub` (legacy
466
+ `## agent-team`): index-first, literal Markdown links/references and bounded
467
+ recursive fallback. The catalog binds file/path, heading occurrence and hash
468
+ for the **session**; edits do not reload in-session, and a restart adopts them.
469
+ It cannot execute instructions in rules. Discovery has a 64-file/256 KiB
470
+ budget; selection at most 20 sections/32 KiB, with coverage gaps for missing,
471
+ unsafe, partial, unselected or unsupported sources. Only the explicit task
472
+ and explicitly supplied plan bind the review; absent plan is `task_only`, not
473
+ a search for the newest plan. Incomplete work, exceptions, parallel authorship
474
+ and same-turn rule edits can remain uncertain. No silence or skipped check is
475
+ proof of compliance. Hub and supported native specialists are covered;
476
+ research helpers, nested delegates, coms peers and Hermes are not.
477
+
478
+ Per turn: at most 20 source units, 256 KiB retained excerpts (64 KiB/file),
479
+ 32 KiB evaluation state, 16 questions/batch, two calls/turn, one active
480
+ job/session, one pending/owner with backlog ≤8 and 5 s queue wait. Capture
481
+ phase has a 1 s deadline; evaluation job has a 2 s deadline. Feedback is
482
+ ≤3 findings/1,500 characters; finding history/private snapshots are bounded
483
+ at 100, so readback/retention is **not** a complete session record. Captures
484
+ bind pre/post worktree bytes, hashes and offsets; private evidence can be
485
+ locally reopened with validated references, whereas trace/report summaries
486
+ contain metadata only. Exclude `.env`, credentials, `.git`, dependencies,
487
+ build/runtime/session/transcript trees, binaries and realpath escapes; never
488
+ assume redaction catches every secret. Review coverage can be `partial`, `not_checked`, `unsupported`, `stale`,
489
+ `unavailable` or `unknown` rather than a confirmed pass. Operator TUI/history retain a completed row briefly (10 s); metadata
490
+ readback persists within the bounded session record.
491
+
492
+ ### Release readiness and evaluation limits
493
+
494
+ The opt-in runtime, native observer, local validators, advisory delivery, Fleet
495
+ history/evidence, reports and package installation are implemented and
496
+ independently reviewed. Offline integration uses repo-local Pi **0.84.2**;
497
+ Node 18 compatibility applies separately to the installed CLI/doctor, not the
498
+ Pi harness. Review history and evidence retain the dashboard's fixed-height
499
+ frame, including blank rows, rather than exposing dispatcher chat underneath.
500
+
501
+ A maintainer-authorized synthetic Jev smoke has verified real provider
502
+ communication and the evaluator path. It is **not** the planned 30-case
503
+ human-labelled semantic evaluation, nor evidence of general accuracy or recall.
504
+ That evaluation and final semantic acceptance remain outstanding; findings-only
505
+ label-key access also limits operational miss/true-negative evaluation.
506
+
507
+ A release installs the capability, **not its activation**. Setup does not create
508
+ `consumers.proactiveReview` in `.ai/system1.json`, and preserves an existing human-owned file. The
509
+ maintainer's active config and repo-specific rule catalog are not release
510
+ artifacts. Each target repository needs its own explicit scope, rules and
511
+ outbound-data consent. Configuration/rules are loaded at session start; start a
512
+ fresh Fleet session after changing them. When testing file placement, verify
513
+ that the file is really inside the configured repository include path, not a
514
+ session `artifacts/` directory with a similar relative suffix.
515
+
516
+ ### Read-only reports and explicit human labels
517
+
518
+ `/af-hub-report` and `/af-audit` separate proactive and watchdog totals.
519
+ For measured comparison only, add `--labels /absolute/path/to/CURRENT_SESSION/artifacts/labels.json`
520
+ to **either** command. No default, file discovery, provider request or
521
+ automatic label inference occurs. The actual path must be an absolute regular
522
+ `.json` file below the *current* session's `artifacts/`, without symlink escape;
523
+ maximum 64 KiB and 320 labels. Only retained findings currently expose operator-readable label keys. In Fleet
524
+ Dashboard (**Alt+A**), open review history with **`p`**, select a finding with
525
+ **`n`**, then press **`e`** for its local captured evidence; alternatively open
526
+ the specialist detail, select a finding with **`n`**, and press **`e`**. Scroll
527
+ with ↑/↓ (or j/k), PgUp/PgDn, Home/End; Esc returns to the previous review-history or detail view. The evidence
528
+ view displays a JSON record with the exact `snapshotId`, slash-bearing catalog
529
+ `ruleId` (`path#heading@occurrence:hash`), session-bound `ruleHash`, and
530
+ `subject` for that finding. At narrow widths the JSON is wrapped into visual
531
+ chunks: remove one indentation column from each chunk and concatenate the
532
+ chunks to reconstruct the record. Unavailable evidence shows no template;
533
+ do not guess a key. Copy the reconstructed record into an explicit local
534
+ current-session artifacts `.json` array, leaving `expected` as `unknown` until
535
+ a human judges that finding (`violation` or `clean`). Never use raw
536
+ source/prompt payloads as label keys. This illustrative shape is not a
537
+ substitute for the evidence-view values:
538
+
539
+ ```json
540
+ [
541
+ {
542
+ "snapshotId": "<actual lowercase 64-hex snapshot ID>",
543
+ "ruleId": "<actual evidence-view catalog rule ID, including path/slashes>",
544
+ "ruleHash": "<actual bound lowercase 64-hex rule hash>",
545
+ "subject": "src/example.ts",
546
+ "expected": "unknown"
547
+ }
548
+ ]
549
+ ```
550
+
551
+ Each object has **exactly** these five keys; `expected` is
552
+ `violation|clean|unknown`. Match snapshot, rule ID, session-bound rule hash and subject to retained
553
+ finding evidence; a valid unmatched label is `unchecked`, not a false
554
+ pass/miss. Report comparison can join checked-clear verdicts, but the operator
555
+ UI exposes keys only for retained findings, not checked-clear units. Human
556
+ miss/true-negative labels cannot currently be authored from this UI; absent
557
+ human labels remain `unknown`. This is a partial finding-backed workflow, not
558
+ fully operational misses or recall evaluation. Missing/invalid labels yield `unavailable` with null
559
+ measurement counts; empty valid array is not a precision/recall score.
560
+ Counts distinguish reviewed/partial/coverage-unknown/skipped, uncovered rules,
561
+ deterministic findings versus System 1 suspicions, unknown usage and unknown
562
+ native delivery (no receipt). Trace-only readback does not reconstruct missing
563
+ coverage or invent zeroes. Any precision or miss count describes only *labelled checked* evidence, not
564
+ unlabelled clear units or universal correctness.
565
+
566
+ ### Offline installed-package runbook (not executed by this documentation change)
567
+
568
+ Use a fresh **temporary** directory/workspace, with Node supporting native
569
+ TypeScript for the observer, repo-local Pi 0.84.2, and existing dependencies;
570
+ Node 18 is checked separately for the extracted CLI. These are test-backed
571
+ instructions, **not** commands run by this documentation patch. From this
572
+ repository's root, the safest reproducible run is:
573
+
574
+ ```sh
575
+ node --test .pi/agent-fleet/scripts/docs-links.test.mjs
576
+ # Supply an actual installed Node 18 executable; the test fails if unavailable.
577
+ AF_NODE18=/absolute/path/to/node18 node --test bin/test/proactive-installed.test.js
578
+ node --test --test-name-pattern='isolated tarball supports' bin/test/package-surfaces.test.js
579
+ ```
580
+
581
+ The installed test packs with `npm pack --json --pack-destination <temp>`,
582
+ extracts with `tar -xzf <tarball> --strip-components=1 -C <temp>/package`,
583
+ and runs `node <temp>/package/bin/cli.js setup --workspace <temp>/installed
584
+ --preset default --features none --yes` under a scrubbed offline environment.
585
+ It checks the installed 12-file runtime closure and an offline fake-provider Pi
586
+ observer/capture, no auto `consumers.proactiveReview` in `.ai/system1.json` or proactive desired-state
587
+ key, preservation of a **test-only HUMAN fixture** across repeat setup and
588
+ `doctor`/`doctor --fix`, and extracted-CLI version/help/readonly doctor under
589
+ Node 18. Doctor may return 0 or findings exit 2. The smoke reuses existing
590
+ repository dependencies, not a fresh dependency install; its network guard is
591
+ limited and does not prove every step physically network-isolated. Do not
592
+ create the illustrative active config above in a real workspace while testing.
593
+ The operator must run the link test and installed test on the final changed
594
+ state; this document alone is not verification.
595
+
596
+ ### Separate live pilot and acceptance
597
+
598
+ C5 operator visibility was human accepted, and the final post-fix source/docs
599
+ review accepted the C6 offline/package work. The later review-history overlay
600
+ fix is covered by fixed-frame and real Pi compositor regression tests; its
601
+ human visual retest is separate. Implemented/offline/installed evidence is not
602
+ live semantic accuracy. Explicit advisory activation in the maintainer's
603
+ repository and a synthetic Jev transport/evaluator smoke have occurred; neither
604
+ completes the planned human-labelled pilot or C7 semantic acceptance. For a new
605
+ repository, first review synthetic/offline evidence, then require **explicit
606
+ repo-specific shadow consent**, including exact include/exclusion paths,
607
+ reviewed bindings, session budget, outbound categories and representative
608
+ exact payload review; separate explicit consent is required for advisory.
609
+ There is no implied ringithub/customer repo authorization. A subsequent pilot
610
+ requires ≥30 **human-labelled** code/text assessments including ≥10 known
611
+ violations/deviations, BG/EN, legacy/new code, interim work, exceptions,
612
+ text-only and no-plan cases; manually review selector omissions and uncertain
613
+ cases. Measure finding-backed labelled precision and false alarms alongside coverage,
614
+ capture overhead, model p50/p95 latency, queue drops and known/unknown usage.
615
+ Miss/true-negative human-label keys for checked-clear units are not exposed;
616
+ report miss joins from synthetic/offline tests do not establish operational
617
+ miss/recall measurement. Record that gap explicitly in any pilot assessment
618
+ rather than treating unknown labels as negatives. Synthetic/offline success is not semantic or live
619
+ proof; no automatic mode promotion or invented accuracy threshold. C7 asks
620
+ the maintainer to accept limitations/evidence and explicitly choose each
621
+ repository's off/shadow/advisory state. No release or deployment follows from
622
+ these docs or C6.
623
+
624
+ ## The overrides file — `.ai/agent-fleet-overrides.md`
625
+
626
+ Some skills and pi harnesses need facts specific to each project — where specs
627
+ and plans are saved, how to start a dev server, whether the agent may create
628
+ branches, or which user-facing language a dispatcher should use. Each reader
629
+ ships a sensible **default**; a project that needs something different declares
630
+ it here, and the reader picks it up.
631
+
632
+ - **Location:** `.ai/agent-fleet-overrides.md` at the project root.
633
+ - **Format:** Markdown. One `## <section-name>` section per skill or harness reader, with terse
634
+ `key: value` lines. Block values use the `key: |` multi-line form. No prose
635
+ and no install detail — readers parse it by key and load it on every run/session start.
636
+ - **Commit it.** Shared project configuration belongs in version control. Make
637
+ sure no `.gitignore` rule (for example a broad `.env*` pattern) excludes it.
638
+ - **No secrets.** For anything sensitive (test-account credentials), reference
639
+ the **name** of an environment variable; the real value lives in a gitignored
640
+ `.env`.
641
+ - If the file is absent, or a reader has no section in it, that reader uses its
642
+ built-in default.
643
+ - **Settings writer:** ordinary `agent-fleet setup` leaves non-empty overrides byte-identical. To add rule/doc roots explicitly, preview with `agent-fleet configure --rules .ai/rules --docs docs --dry-run --workspace <project>`; review `before`, `after`, and `expectedHash`, then apply with the same roots, `--expect-hash <expectedHash> --yes`. Omit a key to leave it unchanged. The CLI appends/deduplicates roots, keeps other sections/settings and the legacy `agent-team` section, and refuses duplicate/conflicting sections or keys for manual resolution. A changed setting takes effect in a new session; missing roots remain advisory. The interactive path is `/af-setup-rules` (the `repository-ai-setup` skill: discovery → proposal → grilling → diff → apply → verify); it hands accepted roots to this same CLI and never edits the file directly.
644
+ - **Validation.** Because an unknown section or key silently falls back to the
645
+ default, typos are invisible at runtime. `agent-fleet doctor` (and the
646
+ runtime's Agent Fleet doctor command) validates the file — unknown sections,
647
+ unknown keys in known sections, invalid values for the mechanically parsed
648
+ `agent-hub` keys, missing `rules:` folders, missing `append-prompt:` files,
649
+ unknown `poll-panel:` names, and unset `## env` vars — as
650
+ **advisory, warn-only findings**; it never edits the file.
651
+
652
+ ### `spec-driven-development`
653
+
654
+ | Key | Default | Meaning |
655
+ |-----|---------|---------|
656
+ | `spec-dir` | `docs/prds/{area}` | Directory specs are written to |
657
+ | `naming` | `PRD{n}-{topic}` | File name pattern; `{n}` = next free PRD number, `{topic}` = kebab-case slug |
658
+
659
+ Default output: `docs/prds/{area}/PRD{n}-{topic}.md`.
660
+
661
+ ### `planning-and-task-breakdown`
662
+
663
+ | Key | Default | Meaning |
664
+ |-----|---------|---------|
665
+ | `plan-dir` | `docs/plans/{area}` | Directory plans are written to |
666
+ | `naming` | `PLAN-{prd-name}-{phase}` | File name pattern; `{phase}` suffix only when a plan spans multiple files |
667
+ | `todo` | `embedded` | `embedded` keeps the task list inside the plan; `separate` writes a standalone `todo.md` |
668
+
669
+ Default output: `docs/plans/{area}/PLAN-{prd-name}-{phase}.md`, task list embedded.
670
+
671
+ ### `browser-testing-with-devtools`
672
+
673
+ This skill has **no default** — the section is required for browser testing,
674
+ because dev-server commands and login flows cannot be guessed.
675
+
676
+ | Key | Meaning |
677
+ |-----|---------|
678
+ | `dev-server` | Command to start the local dev server |
679
+ | `ready-check` | How to confirm the server is up |
680
+ | `base-url` | Root URL for navigation |
681
+ | `auth-flow` | Steps to log in (multi-line `|` block) |
682
+ | `roles` | Test account per privilege level, referenced by env-var name |
683
+ | `notes` | Anything else the agent should know (certs, seed data, ...) |
684
+
685
+ ### `git-workflow-and-versioning`
686
+
687
+ | Key | Default | Meaning |
688
+ |-----|---------|---------|
689
+ | `branching` | `never` | `never` = agent works in the current branch and never creates or switches branches; `allow` = agent may create feature branches |
690
+
691
+ ### `agent-hub`
692
+
693
+ Read by the `.pi/harnesses/agent-hub/` pi harness on every session start. The canonical
694
+ section name is `## agent-hub`; the harness also accepts the legacy `## agent-team` name
695
+ (from before the standalone `agent-team` harness was retired), so existing project
696
+ override files keep working unchanged. When both sections are present their keys merge,
697
+ with later lines winning.
698
+
699
+ The `rules:` and `docs:` keys are also read outside the harness: the `compound-learning`
700
+ skill (and the `/af-compound` agent-hub command built on it) resolves them as the
701
+ targets an end-of-session compound pass writes lessons to.
702
+
703
+ | Key | Default | Meaning |
704
+ |-----|---------|---------|
705
+ | `language` | `English` | User-facing language the dispatcher uses for every `ask_user` question, every `context` field, and every summary. Specialist task strings always stay in English regardless. |
706
+ | `persona-gate` | — | **Removed.** Ignored with a doctor warning; dispatcher flavor is no longer selectable. Use `/af-work-mode` for operator vs orchestrator. Delete the key. |
707
+ | `model.<persona>` | persona frontmatter `model:` | Replaces the named persona's default model for this project (a full pi model spec). If the override reports a model/provider error or aborted request before producing text or starting a tool (including a local-model memory-limit failure), agent-hub restores the child session and retries once with the original frontmatter model; it does not fallback after work starts, cancellation, timeout, drift stop, or process-spawn failure. |
708
+ | `models.<persona>` | persona frontmatter `models:` | Replaces the named persona's model-candidate list for `/af-agent-model` and `/af-models` profiles (comma-separated pi model specs). |
709
+ | `thinking.<persona>` | persona frontmatter `thinking:` | Replaces the named persona's pi `--thinking` reasoning level for this project: one of `off`, `minimal`, `low`, `medium`, `high`, `xhigh`. Switchable at runtime with `/af-agent-model-thinking <persona>`. An invalid value is ignored with a session-start warning. |
710
+ | `subagents.<persona>.<role>` | persona frontmatter `subagents:` | Replaces or adds one delegate sub-role for this project: `<model>[, tools=<caps>][, thinking=<off\|minimal\|low\|medium\|high\|xhigh>]`. Other declared roles keep their frontmatter values. Existing roles retain their original frontmatter model as the same one-shot, pre-work-only runtime fallback; model-only overrides retain the declared tool cap. An invalid `thinking=` value is ignored with a session-start warning and the role stays at `off` unless frontmatter already set a valid level. |
711
+ | `delegate-depth.<persona>` | persona frontmatter `delegate_depth:` (default/max 1) | Replaces the persona's delegation depth budget: `0` makes its delegate tool refuse (delegation off for this project), `1` lets it spawn terminal children. Values above 1 are clamped to 1; children at remaining depth 0 do not receive delegate tooling. |
712
+ | `rules` | none | Comma-separated repo-relative folders holding the project's own rule files (HOW — implementation patterns the work must comply with). Resolution is **index-first**: when a folder has a top-level `README.md`/`index.md`, personas read it first and follow its loading manifest (session bundles, conditional-load lists) instead of bulk-reading the tree; a folder without an index is searched **recursively** through all subfolders. The harness tells every dispatched specialist where the rules live and how to resolve them; the planner and code-reviewer personas read the relevant rules, validate their subject against them, and pass them on (cited in plan acceptance criteria / handed to delegate sub-reviewers). Missing folders produce a session-start warning. |
713
+ | `docs` | none | Comma-separated repo-relative documentation **entry points** (WHAT/WHY — architecture, standards, decisions): canonical files (e.g. `Docs/AGENTS.md`) or doc folders (personas start from a folder's `README.md`/index). Unlike `rules`, docs orient rather than bind: every dispatched specialist and research helper is told to read the entry points relevant to its task and follow their links instead of bulk-reading doc trees; the code-reviewer flags changes that alter documented behavior without a doc update; the documenter treats the entry points and the trees they link as the docs it maintains. Missing paths produce a session-start warning. |
714
+ | `research-keep` | — | **Removed.** Ignored with a session-start warning; live research helpers disappear from the Fleet Dashboard (`Alt+A`) on every terminal outcome. Session, transcript, and findings files plus `/af-agents-history` records remain. Delete the key. |
715
+ | `recon-search-timeout-s` | `120` | Parent-side deadline, in seconds, for each `read`, `grep`, `find`, or `ls` call made by a native research helper or nested delegate child. Accepts an integer `1`–`3600` or `off`; invalid input warns and falls back to `120`. This is **not** an agent/turn deadline: non-tool work can run indefinitely. On timeout the hub returns `tool_timeout` with call metadata, sends SIGTERM to its owned process group, escalates to SIGKILL after a finite grace period, and settles even if the child never closes or a descendant holds a pipe. If that bounded cleanup cannot confirm child/process-group death, the metadata reports `terminationConfirmed: false`; this prevents a parent hang but may indicate an uninterruptible OS-level process needing operator attention. |
716
+ | `mode` | — | **Removed.** Ignored with a warning; budgets follow task tier. Delete the key. |
717
+ | `max-dispatches-per-turn` | — | **Removed.** Ignored with a warning: continuation quotas were removed, dispatch counts stay visible and the watchdog supervises progress. Delete the key. |
718
+ | `max-research-per-turn` | — | **Removed.** Ignored with a warning, like `max-dispatches-per-turn`. Delete the key. |
719
+ | `turn-wall-time-s` | — | **Removed.** Ignored with a warning; active time stays visible, and `agent-turn-timeout-s` still bounds each child run. Delete the key. |
720
+ | `agent-turn-timeout-s` | tier default (600/600/1800/1800) | Whole-run deadline, in seconds, for each spawned specialist, research helper, and nested delegate child (unlike `recon-search-timeout-s`, this bounds the entire run). On expiry the run terminates as `turn_timeout` (exit 124) with partial output preserved. Positive integer or `off` (stays at the tier). |
721
+ | `session-recycle-runs` | tier default (3/3/5/5) | Recycle a specialist's accumulated session (fresh spawn instead of `-c` resume) after this many resumed runs. Context is also always recycled at ≥60% measured context (input + cacheRead + cacheWrite). Positive integer or `off` (stays at the tier recycle count; context threshold still applies). |
722
+ | `watchdog` | `auto` | Drift watchdog default for dispatched specialists: `auto`/`on` arm the in-flight rules (out-of-scope writes, tool-call loops, repeated failures, tool-call cap) with LLM-judge escalation; `off` disarms. Orchestrator work mode auto-arms when the setting is `auto`/`on` and ignores a dispatch `watchdog: false`. Overridable live per hub (`/af-watchdog on\|off\|auto`) and per agent (`/af-watchdog <agent> on\|off\|clear`). A DRIFTING/STUCK verdict terminates the run as `drift_stop` (exit 125) with partial output preserved. |
723
+ | `watchdog-system1` | `off` | Native specialist consumer only: `off`, `shadow`, or explicitly opted-in experimental `active` for advisory `scope` only (0.95/0.05; not G2-validated). Requires the separate selected feature and shared config; no automatic outbound request from setup/doctor. |
724
+ | `watchdog-judge-model` | researcher persona's model | pi model spec for the one-shot drift judge (e.g. `openai-codex/gpt-6-luna`). Falls back to the researcher persona's resolved model, then the dispatcher's. |
725
+ | `poll-panel` | none | Default panel name for `/af-poll` when `--panel` is omitted. Must match a panel in `.pi/agents/voices.yaml` when that file exists. Missing `--panel` and missing this key is a refusal. |
726
+ | `append-prompt` | none | Comma-separated repo-relative files appended to the system prompt of every dispatched persona. Listed files must exist. Enable the communication contract with `append-prompt: references/communication-contract.md`. |
727
+
728
+ Example — switch the dispatcher to Bulgarian, pin the builder to sonnet, raise the
729
+ code-reviewer's thinking level, move the code-reviewer's docs sub-reviewer to a
730
+ different model, and point the team at the project's rule folders and doc entry
731
+ points:
732
+
733
+ ```markdown
734
+ ## agent-hub
735
+ language: Bulgarian
736
+ model.builder: github-copilot/claude-sonnet-4.6
737
+ models.builder: github-copilot/claude-sonnet-4.6, github-copilot/claude-haiku-4.5
738
+ thinking.code-reviewer: xhigh
739
+ subagents.code-reviewer.docs: github-copilot/claude-sonnet-4.6, tools=read,grep, thinking=medium
740
+ delegate-depth.code-reviewer: 1
741
+ recon-search-timeout-s: 120 # or off to disable the per-tool watchdog
742
+ poll-panel: default
743
+ append-prompt: references/communication-contract.md
744
+ rules: docs/rules, .ai/rules
745
+ docs: Docs/AGENTS.md, Docs/architecture/ARCHITECTURE_OVERVIEW.md
746
+ ```
747
+
748
+ ### `env` (optional, read by the doctor)
749
+
750
+ The overrides file references environment variables by **name** — test-account
751
+ credentials for `browser-testing-with-devtools`, the `pi-voice-stt` API key —
752
+ while the values live in a gitignored root `.env`. The optional `## env`
753
+ section declares which names the project's readers expect, so a fresh clone
754
+ can find out what's missing *before* a skill fails mid-run:
755
+
756
+ | Key | Meaning |
757
+ |-----|---------|
758
+ | `required` | Comma-separated env-var **names** (never values) the project's sections reference |
759
+
760
+ ```markdown
761
+ ## env
762
+ required: APP_TEST_ADMIN_USER, APP_TEST_ADMIN_PASS, AZURE_SPEECH_KEY
763
+ ```
764
+
765
+ No skill or harness loads this section. Its only reader is `agent-fleet doctor`
766
+ (and the runtime's Agent Fleet doctor command), which warns when a declared name is neither set in
767
+ the environment nor declared in the workspace root `.env`.
768
+
769
+ ### Per-peer env files (`env_file:` in peers.yaml)
770
+
771
+ Fleet peers spawned through `--peers`, `just fleet peer`, or the Hub's
772
+ constrained dynamic peer tool can carry their own environment: an `env_file:`
773
+ entry in `.pi/agents/peers.yaml` names a
774
+ **repo-relative** KEY=VALUE file (same format as `.env`, no shell evaluation)
775
+ that herdr injects into the peer's pane before the command runs — no `source`,
776
+ no leaking into sibling panes. The file must exist at spawn (team-up refuses
777
+ otherwise, never mid-run), and its **values never appear in `--dry-run`
778
+ output** — only the path. Keep these files gitignored exactly like the root
779
+ `.env` this section describes.
780
+
781
+ ## The install record — `.ai/agent-fleet-state.json` and `.ai/agent-fleet-setup.md`
782
+
783
+ Two files, one source of truth. `.ai/agent-fleet-state.json` is what the
784
+ installer writes and the only thing it reads back: agent, method, package
785
+ version, source root, and one entry per installed item with a per-file sha256
786
+ (or, in symlink mode, the resolved link target). `.ai/agent-fleet-setup.md` is
787
+ **rendered from it** on every apply and never parsed back, so the two cannot
788
+ disagree — it exists for humans and for older readers that still look for
789
+ `version:` and `agent:`.
790
+
791
+ Ownership is the point of the state file. An entry means "agent-fleet installed
792
+ this"; anything not listed is never removed or overwritten. That lookup is what
793
+ replaced the prose ownership rule the setup skill used to carry.
794
+
795
+ | State-file field | Meaning |
796
+ |---|---|
797
+ | `agent`, `method`, `sourceRoot` | How and from where this workspace was installed |
798
+ | `packageVersion` | The version that performed the last apply — provenance for reconciliation and legacy three-way compatibility |
799
+ | `items` | One entry per installed artifact: strategy, method, files with hashes, JSON key paths |
800
+ | `externalPackages` | Packages the user was told to install; recorded, never installed for them |
801
+ | `events` | Last few applies (verb, version, action count, conflicts) |
802
+
803
+ **No secrets, ever.** Only env-var *names* may appear — for example in the
804
+ `pi-voice-stt` record. A test asserts nothing value-shaped is persisted.
805
+
806
+ ### The recorded version and the three-way merge
807
+
808
+ The recorded `packageVersion` gives every comparison a baseline. For each
809
+ recorded artifact, the engine compares *source@recorded* from the package's
810
+ `.versions/<x.y.z>/` snapshot tree, the installed copy on disk, and
811
+ *source@current*. Deterministic `setup` is the public reconciliation command.
812
+
813
+ | Outcome | What `setup` does |
814
+ |---|---|
815
+ | Neither moved | Kept |
816
+ | Only the source moved | Clean refresh |
817
+ | Only your copy moved | **Refreshed — your edit is overwritten.** Reported in the plan as *"locally modified — selecting it overwrites your edits"*, so `--dry-run` shows it before it happens |
818
+ | Both moved, to different content | **Conflict**: the run exits `3` before writing anything. Resolve with `--on-conflict theirs` or `--on-conflict ours` |
819
+ | Retired upstream | Kept by `setup`; the deprecated `upgrade` proposes removal by name, subject to the ownership rule |
820
+
821
+ Reconciling toward the package is the point of `setup`: the workspace is meant
822
+ to match the version it records. That is why editing a shipped artifact in place
823
+ is not a supported customization route — use `.ai/agent-fleet-overrides.md`, add
824
+ artifacts under names Agent Fleet does not ship, or leave the item out of the
825
+ selection (`setup` never removes what it does not select, so an unselected item
826
+ stays installed and frozen). The deprecated `upgrade` verb preserves local edits
827
+ instead of overwriting them; if you have relied on that, it is the behavioural
828
+ difference to plan for.
829
+
830
+ If the snapshot is missing (an unpublished local build, or a version older than
831
+ `.versions/` retention), the comparison degrades to two-way, the installed copy
832
+ is treated as canonical, and the read-only auxiliary `verify` command reports it
833
+ as an advisory finding rather than pretending a diff exists.
834
+
835
+ ### Pre-engine workspaces
836
+
837
+ A workspace with only `.ai/agent-fleet-setup.md` and no state file predates the
838
+ installer engine. `setup --migrate --dry-run` previews what it can infer from
839
+ that markdown (`agent:`, `version:`) without adopting unrecorded paths. To
840
+ mutate a legacy workspace, use `setup --migrate` with an explicit preset,
841
+ features, and `--yes`. A workspace with no `version:` at all has no recorded
842
+ baseline, so no three-way merge is attempted.
843
+
844
+ Commit these files if the team should share install state — keep paths relative
845
+ so they stay portable. A self-referencing checkout (agent-fleet itself) may
846
+ instead `.gitignore` them, since their recorded paths are local to one machine.
847
+
848
+ ## Coms-backed team members
849
+
850
+ A team member the `agent-hub` harness dispatches (`.pi/agents/teams.yaml`) can be
851
+ served by a live coms peer of the same name instead of a freshly spawned native
852
+ subagent. With the default `backend: "auto"`,
853
+ `.pi/agents/dispatch-policy.yaml` decides that per member at dispatch time;
854
+ explicit `native` bypasses substitution, while explicit `coms` requires the
855
+ peer and never falls back. `.pi/agents/peers.yaml` decides *how* each peer runs.
856
+ A peer with `runner: claude-code` is an interactive Claude Code pane plus its
857
+ bridge — the one way Claude Code takes part in a fleet. See
858
+ [claude-code-coms-bridge.md](claude-code-coms-bridge.md).
859
+
860
+ Installing `skill:peer-coms` pulls `hook:coms-stop-hook` in as a companion, which
861
+ is what gives a bridged pane exact turn text instead of scraped output.
862
+ The hook installs to `.pi/agent-fleet/hooks/coms-stop-hook.mjs` with the rest
863
+ of the fleet runtime. Registering it in `.claude/settings.json` stays the
864
+ user's step — the installer writes files, and another tool's settings file is
865
+ not its to merge. `setup` prints this snippet when the hook is applied:
866
+
867
+ ```json
868
+ { "hooks": { "Stop": [{ "hooks": [{ "type": "command",
869
+ "command": "node $CLAUDE_PROJECT_DIR/.pi/agent-fleet/hooks/coms-stop-hook.mjs" }] }] } }
870
+ ```
871
+
872
+ ## Templates
873
+
874
+ ### `.ai/agent-fleet-overrides.md`
875
+
876
+ Copy this in and delete the sections you don't need — anything absent falls
877
+ back to that reader's default.
878
+
879
+ ```markdown
880
+ # Agent Fleet — Project Overrides
881
+ #
882
+ # Each section is applied ON TOP of the skill's built-in defaults.
883
+ # Keys not listed keep the default. Absent file/section → pure defaults.
884
+
885
+ ## spec-driven-development
886
+ spec-dir: docs/prds/{area}
887
+ naming: PRD{n}-{topic}
888
+
889
+ ## planning-and-task-breakdown
890
+ plan-dir: docs/plans/{area}
891
+ naming: PLAN-{prd-name}-{phase}
892
+ todo: embedded
893
+
894
+ ## browser-testing-with-devtools
895
+ dev-server: <command to start the local dev server>
896
+ ready-check: <url or check that confirms the server is up>
897
+ base-url: <root url>
898
+ auth-flow: |
899
+ 1. Navigate to <login url>
900
+ 2. Submit credentials for the role needed by the screen under test
901
+ roles:
902
+ admin: env APP_TEST_ADMIN_USER / APP_TEST_ADMIN_PASS
903
+ player: env APP_TEST_PLAYER_USER / APP_TEST_PLAYER_PASS
904
+ notes: |
905
+ <anything else: self-signed certs, required seed data, ...>
906
+
907
+ ## git-workflow-and-versioning
908
+ branching: never
909
+
910
+ # Optional for pi agent-hub; omit this section to keep default English.
911
+ # (`## agent-team` is still accepted as a legacy alias for this section.)
912
+ ## agent-hub
913
+ language: <language name>
914
+ rules: <repo-relative rule folder>[, <another folder>]
915
+ docs: <repo-relative doc entry point>[, <another file or folder>]
916
+
917
+ # Optional; names (never values) of env vars the sections above reference.
918
+ # Only `agent-fleet doctor` reads this — it warns when one is unset.
919
+ ## env
920
+ required: <ENV_VAR_NAME>[, <ANOTHER_NAME>]
921
+ ```
922
+
923
+ ### `.ai/agent-fleet-setup.md`
924
+
925
+ Rendered from `.ai/agent-fleet-state.json` by every apply, for humans to read.
926
+ Edit the workspace, not this file — the next apply overwrites it.
927
+
928
+ ```markdown
929
+ # Agent Fleet — Workspace Setup
930
+ #
931
+ # Generated from .ai/agent-fleet-state.json by `agent-fleet setup`.
932
+ # Edit the workspace, not this file: it is rewritten on every apply.
933
+
934
+ ## workspace-summary
935
+ agent: pi
936
+ method: copy
937
+ version: 1.4.2
938
+ source: /home/you/.npm/_npx/<hash>/node_modules/@chankov/agent-fleet
939
+
940
+ ## install-status
941
+ skills: [spec-driven-development, test-driven-development, code-review-and-quality]
942
+ commands: [spec, plan, build]
943
+ personas: [code-reviewer]
944
+ extensions: []
945
+ harnesses: []
946
+ companions: [skills-internal-grilling]
947
+ external: []
948
+ updated: 2026-05-22
949
+
950
+ ## verification
951
+ - 21 item(s) recorded; run `agent-fleet doctor` for diagnostics.
952
+ - No secrets are stored in this file or in .ai/agent-fleet-state.json.
953
+ ```
954
+
955
+ ### `.ai/stt.json`
956
+
957
+ Optional. Present only when the `pi-voice-stt` extension is installed and configured. Read by
958
+ the extension on every pi session start, ahead of the global `~/.pi/agent/stt.json`. The
959
+ canonical format has a nested `provider` object. Runtime `provider.type` values are `openai`,
960
+ `openai-compatible`, `azure` (Azure Speech), and `azure-openai` (Azure OpenAI Whisper):
961
+
962
+ ```json
963
+ {
964
+ "language": "bg-BG",
965
+ "provider": {
966
+ "type": "azure",
967
+ "apiKeyEnv": "AZURE_SPEECH_KEY",
968
+ "locales": ["bg-BG", "en-US"]
969
+ }
970
+ }
971
+ ```
972
+
973
+ The setup CLI accepts the aliases `openai`, `groq`, `azure`, and `azure-openai`. These are
974
+ installer selections, not interchangeable runtime types: in particular, `groq` is not a
975
+ `provider.type`, and `azure` means Azure Speech rather than Azure OpenAI. Setup can generate
976
+ the OpenAI configuration from runtime defaults. For Groq, create a complete nested
977
+ `.ai/stt.json` with runtime type `openai-compatible` and the actual Groq endpoint/model, then
978
+ run setup without `--stt-provider groq`; the alias does not identify the prepared runtime type.
979
+ Other OpenAI-compatible services are not Groq and use their own endpoint/model. For Azure
980
+ Speech or Azure OpenAI in a workspace without STT settings, create complete nested JSON with
981
+ the provider-specific endpoint/deployment settings before setup. Setup does not guess them.
982
+
983
+ Existing valid nested files are preserved. Supported legacy flat files are also preserved and
984
+ produce a warning that runtime compatibility is not guaranteed; setup does not migrate them
985
+ automatically. Provider migration or replacement requires a separate explicit action.
986
+
987
+ The JSON stores only environment-variable names, never credential values. Put values in the
988
+ gitignored `.env` at the workspace root, which the managed justfile loads:
989
+
990
+ ```sh
991
+ export AZURE_SPEECH_ENDPOINT=https://<resource>.cognitiveservices.azure.com
992
+ export AZURE_SPEECH_KEY=<your-resource-key>
993
+ ```
994
+
995
+ Setup preserves existing `.env` declarations and values, including `export NAME=...` syntax,
996
+ and appends only missing empty placeholders. A direct `provider.endpoint` needs no endpoint
997
+ environment variable. Setup validates JSON structure and environment-variable names, but it
998
+ does not validate credentials or contact the provider. Full schema and provider examples:
999
+ [.pi/extensions/pi-voice-stt/README.md](../.pi/extensions/pi-voice-stt/README.md).
1000
+
1001
+ ### Complete model profiles
1002
+
1003
+ `/af-models <name>` reads `.pi/agents/model-profiles.yaml`. Flat persona-to-model
1004
+ maps remain supported and keep their declared-candidate validation. A `version: 2`
1005
+ profile declares the whole execution model set independently of
1006
+ `.ai/agent-fleet-overrides.md`:
1007
+
1008
+ ```yaml
1009
+ local-full:
1010
+ version: 2
1011
+ defaults:
1012
+ model: &qwen36 incoai/Qwen3.8-27B-Splash
1013
+ thinking: off
1014
+ allowed-models:
1015
+ - *qwen36
1016
+ fallback: none
1017
+ routing: native
1018
+ dispatcher: *qwen36
1019
+ agents:
1020
+ # Every shipped persona uses *qwen36 (see .pi/agents/model-profiles.yaml).
1021
+ subagents:
1022
+ # Every declared child role uses *qwen36.
1023
+ services:
1024
+ watchdog: *qwen36
1025
+ return-extractor: *qwen36
1026
+ panel:
1027
+ - { name: qwen-a, model: *qwen36 }
1028
+ - { name: qwen-b, model: *qwen36 }
1029
+ - { name: qwen-integrator, model: *qwen36, integrator: true }
1030
+ ```
1031
+
1032
+ - `defaults` supplies **every persona and every declared child**, including future
1033
+ personas, research helpers and team changes. `agents` and `subagents` contain
1034
+ exceptions. To preserve a persona's existing selection, omit it from `agents`;
1035
+ for example, `local-workers` leaves `orchestrator` out. Each selection accepts a
1036
+ model string or `{model, thinking}`.
1037
+ Unspecified thinking inherits defaults, then `off`. Tool caps and delegation
1038
+ depth remain unchanged. Unknown persona/child names are rejected.
1039
+ - `dispatcher` changes the current Pi session's model and thinking. When omitted,
1040
+ the live dispatcher keeps its current selection and may use any Pi model, even
1041
+ outside `allowed-models`; that list still applies to workers and peers. An
1042
+ `orchestrator` persona entry alone is not the live dispatcher.
1043
+ - `services` sets the watchdog and structured-return extractor independently;
1044
+ unspecified services use defaults. `panel` supplies 2–5 poll/debate voices and
1045
+ an optional single integrator. `/af-poll` and `/af-debate` select the active
1046
+ profile's panel automatically. Explicit other panel names are refused while
1047
+ the complete profile is active. Without `panel`, two default-model voices are used.
1048
+ - `routing: native` (default) keeps Hub-owned work on native Pi subprocesses.
1049
+ Without `allowed-models` it still refuses explicit coms dispatch, handoff,
1050
+ `coms_send` and peer spawning. With `allowed-models`, those peer actions are
1051
+ allowed only when the peer's advertised or planned model is on the list
1052
+ (exact `provider/model`, or a unique provider-less suffix match); a foreign,
1053
+ missing, or `unknown` model is refused, and `claude-code` peers are refused
1054
+ because their models cannot be allowlisted. Existing peer processes are not
1055
+ reconfigured or stopped. `routing: configured` opts into the existing dispatch
1056
+ policy and cannot be combined with `allowed-models`, since a peer's nested
1057
+ children cannot be verified by this hub.
1058
+ - `fallback: none` (default) disables automatic original-model fallback, including
1059
+ nested children and workflows. `declared` retains it. Optional `allowed-models`
1060
+ is an exact provider/model allowlist checked before actual child spawns and
1061
+ fallback attempts. Worker model pickers and session substitutions respect it;
1062
+ the live dispatcher is checked only when `dispatcher` is explicit.
1063
+ This governs Fleet model execution; it is not an OS/network sandbox for arbitrary
1064
+ shell commands or unrelated applications.
1065
+
1066
+ Activation validates the complete profile and Pi availability of its referenced
1067
+ models before changing settings. Missing models leave the previous configuration
1068
+ in place. Busy dispatchers, agents and poll/debate runs refuse switching: wait for
1069
+ completion first. On leaving a complete profile, the previous dispatcher, thinking
1070
+ and manual model/sub-role/substitution settings are restored before applying the
1071
+ next profile. A fresh Pi session clears the active profile; select it again there.
1072
+
1073
+ The profile is passed through the owned process tree. Workflow commands started
1074
+ from that session inherit its persona models, thinking, panel and fallback policy.
1075
+ Separately started fleet sessions/standing peers retain their own configuration.
1076
+ The bundled `local-full` profile explicitly covers all shipped child roles and needs
1077
+ no project model overrides. Every role, service and panel entry uses the single
1078
+ `incoai/Qwen3.8-27B-Splash` model. The `local-workers` profile uses that same local
1079
+ model for agents, subagents, services and panel voices, while leaving `orchestrator`
1080
+ to inherit its current selection; its peer allowlist refuses non-local coms models.
1081
+ The model must be registered in Pi and served by the incoai provider. Selecting a profile
1082
+ does not download or register models.
1083
+
1084
+ ## System 1 dispatch advice and communication
1085
+
1086
+ Fleet `1` opens the session-only System 1 communication viewer; capture requires
1087
+ explicit opt-in. The orchestrator may call `dispatch_triage` when its separate
1088
+ human-owned configuration permits it. Both remain off by default; installation
1089
+ does not authorize live requests or calibrate the policy. See the
1090
+ [configuration, keys, privacy and evaluation guide](system1-dispatch-triage.md).
1091
+
1092
+ ### Fleet Dashboard thinking shortcut
1093
+
1094
+ In the Fleet Dashboard (**Alt+A**), select a native specialist or research persona
1095
+ with **↑/↓**, then use **←/→** to decrease/increase its thinking level
1096
+ (`off`, `minimal`, `low`, `medium`, `high`, `xhigh`). The arrows stop at either end.
1097
+ Changes are session-only and apply on the next dispatch or `spawn_research`,
1098
+ not to an already-running request. External coms peers, delegates and anonymous
1099
+ research helpers do not support this shortcut.
1100
+
1101
+ ## Unified System 1 v2 configuration
1102
+
1103
+ The runtime source is `.ai/system1.json` version 2 with independent consumer sections, one immutable session snapshot and a shared service. Installation selection remains separate. See [the unified configuration contract](system1-config.md) for setup, explicit migration, retained backups, diagnostics and remote/local off semantics. Legacy JSON files and `watchdog-system1` in Markdown are not runtime sources. v1 requires explicit migration and cannot start inference. Persisted Task Triage obligations remain enforced when inference is off or unavailable. D10 is not activated by this change.