@apralabs/apra-fleet 0.4.1 → 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (476) hide show
  1. package/README.md +53 -12
  2. package/dist/agents/backlog-groomer.md +42 -21
  3. package/dist/agents/ci-watcher.md +14 -0
  4. package/dist/agents/deployer.md +59 -46
  5. package/dist/agents/doer.md +157 -134
  6. package/dist/agents/harvester.md +31 -32
  7. package/dist/agents/integ-test-runner.md +92 -113
  8. package/dist/agents/kb-reconciler.md +40 -42
  9. package/dist/agents/plan-reviewer.md +139 -63
  10. package/dist/agents/planner.md +176 -100
  11. package/dist/agents/regression-test-runner.md +77 -81
  12. package/dist/agents/reviewer.md +69 -85
  13. package/dist/agents/schemas/integ-test-runner-output.json +1 -1
  14. package/dist/agents/schemas/plan-reviewer-output.json +37 -0
  15. package/dist/agents/schemas/regression-test-runner-output.json +4 -17
  16. package/dist/cli/agent-transform.d.ts +83 -2
  17. package/dist/cli/agent-transform.d.ts.map +1 -1
  18. package/dist/cli/agent-transform.js +266 -21
  19. package/dist/cli/agent-transform.js.map +1 -1
  20. package/dist/cli/auth.d.ts.map +1 -1
  21. package/dist/cli/auth.js +29 -11
  22. package/dist/cli/auth.js.map +1 -1
  23. package/dist/cli/config.d.ts +7 -5
  24. package/dist/cli/config.d.ts.map +1 -1
  25. package/dist/cli/config.js +44 -43
  26. package/dist/cli/config.js.map +1 -1
  27. package/dist/cli/install.d.ts +33 -0
  28. package/dist/cli/install.d.ts.map +1 -1
  29. package/dist/cli/install.js +294 -61
  30. package/dist/cli/install.js.map +1 -1
  31. package/dist/cli/kb-directives.d.ts.map +1 -1
  32. package/dist/cli/kb-directives.js +2 -1
  33. package/dist/cli/kb-directives.js.map +1 -1
  34. package/dist/cli/register-member.d.ts.map +1 -1
  35. package/dist/cli/register-member.js +7 -3
  36. package/dist/cli/register-member.js.map +1 -1
  37. package/dist/cli/start.d.ts.map +1 -1
  38. package/dist/cli/start.js +7 -0
  39. package/dist/cli/start.js.map +1 -1
  40. package/dist/cli/uninstall.d.ts.map +1 -1
  41. package/dist/cli/uninstall.js +5 -3
  42. package/dist/cli/uninstall.js.map +1 -1
  43. package/dist/cli/watch.d.ts +26 -3
  44. package/dist/cli/watch.d.ts.map +1 -1
  45. package/dist/cli/watch.js +41 -9
  46. package/dist/cli/watch.js.map +1 -1
  47. package/dist/commands/kb-server.d.ts +3 -0
  48. package/dist/commands/kb-server.d.ts.map +1 -1
  49. package/dist/commands/kb-server.js +43 -3
  50. package/dist/commands/kb-server.js.map +1 -1
  51. package/dist/index.js +3 -3
  52. package/dist/os/git-bash-candidates.d.ts +35 -0
  53. package/dist/os/git-bash-candidates.d.ts.map +1 -0
  54. package/dist/os/git-bash-candidates.js +46 -0
  55. package/dist/os/git-bash-candidates.js.map +1 -0
  56. package/dist/os/index.d.ts +13 -4
  57. package/dist/os/index.d.ts.map +1 -1
  58. package/dist/os/index.js +17 -2
  59. package/dist/os/index.js.map +1 -1
  60. package/dist/os/linux.d.ts +6 -0
  61. package/dist/os/linux.d.ts.map +1 -1
  62. package/dist/os/linux.js +36 -3
  63. package/dist/os/linux.js.map +1 -1
  64. package/dist/os/os-commands.d.ts +68 -2
  65. package/dist/os/os-commands.d.ts.map +1 -1
  66. package/dist/os/os-commands.js.map +1 -1
  67. package/dist/os/windows-gitbash.d.ts +98 -0
  68. package/dist/os/windows-gitbash.d.ts.map +1 -0
  69. package/dist/os/windows-gitbash.js +259 -0
  70. package/dist/os/windows-gitbash.js.map +1 -0
  71. package/dist/os/windows.d.ts +6 -0
  72. package/dist/os/windows.d.ts.map +1 -1
  73. package/dist/os/windows.js +73 -8
  74. package/dist/os/windows.js.map +1 -1
  75. package/dist/providers/agy.d.ts +118 -8
  76. package/dist/providers/agy.d.ts.map +1 -1
  77. package/dist/providers/agy.js +580 -55
  78. package/dist/providers/agy.js.map +1 -1
  79. package/dist/providers/claude.d.ts +83 -4
  80. package/dist/providers/claude.d.ts.map +1 -1
  81. package/dist/providers/claude.js +365 -12
  82. package/dist/providers/claude.js.map +1 -1
  83. package/dist/providers/codex.d.ts +7 -4
  84. package/dist/providers/codex.d.ts.map +1 -1
  85. package/dist/providers/codex.js +24 -4
  86. package/dist/providers/codex.js.map +1 -1
  87. package/dist/providers/copilot.d.ts +7 -4
  88. package/dist/providers/copilot.d.ts.map +1 -1
  89. package/dist/providers/copilot.js +27 -4
  90. package/dist/providers/copilot.js.map +1 -1
  91. package/dist/providers/index.d.ts +0 -1
  92. package/dist/providers/index.d.ts.map +1 -1
  93. package/dist/providers/index.js +0 -3
  94. package/dist/providers/index.js.map +1 -1
  95. package/dist/providers/none.d.ts +7 -4
  96. package/dist/providers/none.d.ts.map +1 -1
  97. package/dist/providers/none.js +22 -4
  98. package/dist/providers/none.js.map +1 -1
  99. package/dist/providers/opencode.d.ts +6 -3
  100. package/dist/providers/opencode.d.ts.map +1 -1
  101. package/dist/providers/opencode.js +27 -4
  102. package/dist/providers/opencode.js.map +1 -1
  103. package/dist/providers/provider.d.ts +215 -11
  104. package/dist/providers/provider.d.ts.map +1 -1
  105. package/dist/providers/provider.js +58 -2
  106. package/dist/providers/provider.js.map +1 -1
  107. package/dist/services/agent-provisioner.js +2 -2
  108. package/dist/services/agent-provisioner.js.map +1 -1
  109. package/dist/services/agy-project.d.ts +102 -0
  110. package/dist/services/agy-project.d.ts.map +1 -0
  111. package/dist/services/agy-project.js +356 -0
  112. package/dist/services/agy-project.js.map +1 -0
  113. package/dist/services/auth-socket.js +4 -4
  114. package/dist/services/auth-web.js +1 -1
  115. package/dist/services/cloud/activity.js +2 -2
  116. package/dist/services/cloud/activity.js.map +1 -1
  117. package/dist/services/cloud/lifecycle.d.ts.map +1 -1
  118. package/dist/services/cloud/lifecycle.js +33 -4
  119. package/dist/services/cloud/lifecycle.js.map +1 -1
  120. package/dist/services/context-admission.d.ts.map +1 -1
  121. package/dist/services/context-admission.js +9 -7
  122. package/dist/services/context-admission.js.map +1 -1
  123. package/dist/services/credential-cleanup.d.ts.map +1 -1
  124. package/dist/services/credential-cleanup.js +47 -10
  125. package/dist/services/credential-cleanup.js.map +1 -1
  126. package/dist/services/exit-drain.d.ts +44 -0
  127. package/dist/services/exit-drain.d.ts.map +1 -0
  128. package/dist/services/exit-drain.js +52 -0
  129. package/dist/services/exit-drain.js.map +1 -0
  130. package/dist/services/github-app.d.ts.map +1 -1
  131. package/dist/services/github-app.js +32 -4
  132. package/dist/services/github-app.js.map +1 -1
  133. package/dist/services/http-transport.d.ts +1 -0
  134. package/dist/services/http-transport.d.ts.map +1 -1
  135. package/dist/services/http-transport.js +48 -1
  136. package/dist/services/http-transport.js.map +1 -1
  137. package/dist/services/knowledge/kb-config.d.ts +42 -0
  138. package/dist/services/knowledge/kb-config.d.ts.map +1 -0
  139. package/dist/services/knowledge/kb-config.js +54 -0
  140. package/dist/services/knowledge/kb-config.js.map +1 -0
  141. package/dist/services/knowledge/kb-providers.d.ts +7 -1
  142. package/dist/services/knowledge/kb-providers.d.ts.map +1 -1
  143. package/dist/services/knowledge/kb-providers.js +191 -17
  144. package/dist/services/knowledge/kb-providers.js.map +1 -1
  145. package/dist/services/knowledge/require-sqlite-project.d.ts +32 -0
  146. package/dist/services/knowledge/require-sqlite-project.d.ts.map +1 -0
  147. package/dist/services/knowledge/require-sqlite-project.js +38 -0
  148. package/dist/services/knowledge/require-sqlite-project.js.map +1 -0
  149. package/dist/services/member-home.d.ts +1 -1
  150. package/dist/services/member-home.d.ts.map +1 -1
  151. package/dist/services/member-home.js +15 -12
  152. package/dist/services/member-home.js.map +1 -1
  153. package/dist/services/model-pricing.d.ts.map +1 -1
  154. package/dist/services/model-pricing.js +7 -8
  155. package/dist/services/model-pricing.js.map +1 -1
  156. package/dist/services/orphan-recovery.d.ts +6 -3
  157. package/dist/services/orphan-recovery.d.ts.map +1 -1
  158. package/dist/services/orphan-recovery.js +17 -14
  159. package/dist/services/orphan-recovery.js.map +1 -1
  160. package/dist/services/preflight-check.js +2 -2
  161. package/dist/services/preflight-check.js.map +1 -1
  162. package/dist/services/secret-token.d.ts +38 -0
  163. package/dist/services/secret-token.d.ts.map +1 -0
  164. package/dist/services/secret-token.js +51 -0
  165. package/dist/services/secret-token.js.map +1 -0
  166. package/dist/services/service-manager/types.d.ts +3 -1
  167. package/dist/services/service-manager/types.d.ts.map +1 -1
  168. package/dist/services/service-manager/windows.d.ts +14 -2
  169. package/dist/services/service-manager/windows.d.ts.map +1 -1
  170. package/dist/services/service-manager/windows.js +65 -7
  171. package/dist/services/service-manager/windows.js.map +1 -1
  172. package/dist/services/shell-probe.d.ts +131 -0
  173. package/dist/services/shell-probe.d.ts.map +1 -0
  174. package/dist/services/shell-probe.js +210 -0
  175. package/dist/services/shell-probe.js.map +1 -0
  176. package/dist/services/singleton.d.ts +2 -0
  177. package/dist/services/singleton.d.ts.map +1 -1
  178. package/dist/services/singleton.js +1 -1
  179. package/dist/services/singleton.js.map +1 -1
  180. package/dist/services/ssh.d.ts.map +1 -1
  181. package/dist/services/ssh.js +60 -4
  182. package/dist/services/ssh.js.map +1 -1
  183. package/dist/services/stall/find-log-file.d.ts.map +1 -1
  184. package/dist/services/stall/find-log-file.js +22 -16
  185. package/dist/services/stall/find-log-file.js.map +1 -1
  186. package/dist/services/stall/read-log-tail.d.ts.map +1 -1
  187. package/dist/services/stall/read-log-tail.js +26 -15
  188. package/dist/services/stall/read-log-tail.js.map +1 -1
  189. package/dist/services/stall/stall-detector.d.ts +53 -4
  190. package/dist/services/stall/stall-detector.d.ts.map +1 -1
  191. package/dist/services/stall/stall-detector.js +212 -34
  192. package/dist/services/stall/stall-detector.js.map +1 -1
  193. package/dist/services/stall/stall-poller.d.ts.map +1 -1
  194. package/dist/services/stall/stall-poller.js +35 -42
  195. package/dist/services/stall/stall-poller.js.map +1 -1
  196. package/dist/services/strategy.d.ts +9 -0
  197. package/dist/services/strategy.d.ts.map +1 -1
  198. package/dist/services/strategy.js +119 -8
  199. package/dist/services/strategy.js.map +1 -1
  200. package/dist/services/substitution-engine.js +2 -2
  201. package/dist/services/substitution-engine.js.map +1 -1
  202. package/dist/services/tool-registry.d.ts.map +1 -1
  203. package/dist/services/tool-registry.js +5 -3
  204. package/dist/services/tool-registry.js.map +1 -1
  205. package/dist/services/user-config.js +1 -1
  206. package/dist/services/user-config.js.map +1 -1
  207. package/dist/services/vcs/azure-devops.d.ts +67 -2
  208. package/dist/services/vcs/azure-devops.d.ts.map +1 -1
  209. package/dist/services/vcs/azure-devops.js +281 -15
  210. package/dist/services/vcs/azure-devops.js.map +1 -1
  211. package/dist/services/vcs/bitbucket.d.ts.map +1 -1
  212. package/dist/services/vcs/bitbucket.js +16 -0
  213. package/dist/services/vcs/bitbucket.js.map +1 -1
  214. package/dist/services/vcs/github.d.ts.map +1 -1
  215. package/dist/services/vcs/github.js +24 -0
  216. package/dist/services/vcs/github.js.map +1 -1
  217. package/dist/services/vcs/types.d.ts +123 -2
  218. package/dist/services/vcs/types.d.ts.map +1 -1
  219. package/dist/skills/fleet-sprint-cli/SKILL.md +20 -1
  220. package/dist/skills/pm/SKILL.md +1 -2
  221. package/dist/skills/pm/cost.md +0 -4
  222. package/dist/skills/pm/fleet-addendum.md +2 -3
  223. package/dist/tools/check-status.d.ts +7 -4
  224. package/dist/tools/check-status.d.ts.map +1 -1
  225. package/dist/tools/check-status.js +5 -3
  226. package/dist/tools/check-status.js.map +1 -1
  227. package/dist/tools/cloud-control.js +2 -2
  228. package/dist/tools/cloud-control.js.map +1 -1
  229. package/dist/tools/compose-permissions.d.ts +6 -0
  230. package/dist/tools/compose-permissions.d.ts.map +1 -1
  231. package/dist/tools/compose-permissions.js +211 -50
  232. package/dist/tools/compose-permissions.js.map +1 -1
  233. package/dist/tools/credential-store-set.js +1 -1
  234. package/dist/tools/execute-command.d.ts.map +1 -1
  235. package/dist/tools/execute-command.js +56 -29
  236. package/dist/tools/execute-command.js.map +1 -1
  237. package/dist/tools/execute-prompt.d.ts +15 -2
  238. package/dist/tools/execute-prompt.d.ts.map +1 -1
  239. package/dist/tools/execute-prompt.js +1214 -873
  240. package/dist/tools/execute-prompt.js.map +1 -1
  241. package/dist/tools/kb-capture.d.ts +2 -2
  242. package/dist/tools/kb-capture.d.ts.map +1 -1
  243. package/dist/tools/kb-capture.js +29 -5
  244. package/dist/tools/kb-capture.js.map +1 -1
  245. package/dist/tools/kb-export.d.ts +2 -2
  246. package/dist/tools/kb-export.d.ts.map +1 -1
  247. package/dist/tools/kb-export.js +3 -28
  248. package/dist/tools/kb-export.js.map +1 -1
  249. package/dist/tools/kb-feedback.d.ts.map +1 -1
  250. package/dist/tools/kb-feedback.js +3 -1
  251. package/dist/tools/kb-feedback.js.map +1 -1
  252. package/dist/tools/kb-freshness-sweep.d.ts.map +1 -1
  253. package/dist/tools/kb-freshness-sweep.js +3 -1
  254. package/dist/tools/kb-freshness-sweep.js.map +1 -1
  255. package/dist/tools/kb-import.d.ts.map +1 -1
  256. package/dist/tools/kb-import.js +2 -1
  257. package/dist/tools/kb-import.js.map +1 -1
  258. package/dist/tools/kb-list.d.ts.map +1 -1
  259. package/dist/tools/kb-list.js +3 -1
  260. package/dist/tools/kb-list.js.map +1 -1
  261. package/dist/tools/kb-query.d.ts +2 -2
  262. package/dist/tools/kb-reconcile-prefilter.d.ts.map +1 -1
  263. package/dist/tools/kb-reconcile-prefilter.js +3 -1
  264. package/dist/tools/kb-reconcile-prefilter.js.map +1 -1
  265. package/dist/tools/kb-resolve-contradiction.d.ts.map +1 -1
  266. package/dist/tools/kb-resolve-contradiction.js +3 -1
  267. package/dist/tools/kb-resolve-contradiction.js.map +1 -1
  268. package/dist/tools/kb-setup.d.ts.map +1 -1
  269. package/dist/tools/kb-setup.js +125 -20
  270. package/dist/tools/kb-setup.js.map +1 -1
  271. package/dist/tools/kb-stats.d.ts.map +1 -1
  272. package/dist/tools/kb-stats.js +64 -43
  273. package/dist/tools/kb-stats.js.map +1 -1
  274. package/dist/tools/list-members.d.ts +2 -2
  275. package/dist/tools/list-members.d.ts.map +1 -1
  276. package/dist/tools/list-members.js +7 -2
  277. package/dist/tools/list-members.js.map +1 -1
  278. package/dist/tools/member-detail.d.ts +2 -2
  279. package/dist/tools/member-detail.d.ts.map +1 -1
  280. package/dist/tools/member-detail.js +22 -3
  281. package/dist/tools/member-detail.js.map +1 -1
  282. package/dist/tools/member-reservation.d.ts +58 -1
  283. package/dist/tools/member-reservation.d.ts.map +1 -1
  284. package/dist/tools/member-reservation.js +71 -18
  285. package/dist/tools/member-reservation.js.map +1 -1
  286. package/dist/tools/monitor-task.d.ts.map +1 -1
  287. package/dist/tools/monitor-task.js +17 -2
  288. package/dist/tools/monitor-task.js.map +1 -1
  289. package/dist/tools/provision-auth.d.ts +80 -1
  290. package/dist/tools/provision-auth.d.ts.map +1 -1
  291. package/dist/tools/provision-auth.js +147 -59
  292. package/dist/tools/provision-auth.js.map +1 -1
  293. package/dist/tools/provision-vcs-auth.d.ts +96 -3
  294. package/dist/tools/provision-vcs-auth.d.ts.map +1 -1
  295. package/dist/tools/provision-vcs-auth.js +254 -88
  296. package/dist/tools/provision-vcs-auth.js.map +1 -1
  297. package/dist/tools/register-member.d.ts +21 -12
  298. package/dist/tools/register-member.d.ts.map +1 -1
  299. package/dist/tools/register-member.js +141 -16
  300. package/dist/tools/register-member.js.map +1 -1
  301. package/dist/tools/remove-member.d.ts.map +1 -1
  302. package/dist/tools/remove-member.js +29 -4
  303. package/dist/tools/remove-member.js.map +1 -1
  304. package/dist/tools/revoke-vcs-auth.js +2 -2
  305. package/dist/tools/revoke-vcs-auth.js.map +1 -1
  306. package/dist/tools/send-email.d.ts +2 -2
  307. package/dist/tools/setup-git-app.d.ts.map +1 -1
  308. package/dist/tools/setup-git-app.js +11 -7
  309. package/dist/tools/setup-git-app.js.map +1 -1
  310. package/dist/tools/setup-ssh-key.d.ts.map +1 -1
  311. package/dist/tools/setup-ssh-key.js +2 -1
  312. package/dist/tools/setup-ssh-key.js.map +1 -1
  313. package/dist/tools/shutdown-server.d.ts +2 -0
  314. package/dist/tools/shutdown-server.d.ts.map +1 -1
  315. package/dist/tools/shutdown-server.js +23 -1
  316. package/dist/tools/shutdown-server.js.map +1 -1
  317. package/dist/tools/stop-prompt.js +2 -2
  318. package/dist/tools/stop-prompt.js.map +1 -1
  319. package/dist/tools/update-agent-cli.js +2 -2
  320. package/dist/tools/update-agent-cli.js.map +1 -1
  321. package/dist/tools/update-member.d.ts +21 -12
  322. package/dist/tools/update-member.d.ts.map +1 -1
  323. package/dist/tools/update-member.js +61 -12
  324. package/dist/tools/update-member.js.map +1 -1
  325. package/dist/tools/vcs-credential-exec.d.ts +127 -0
  326. package/dist/tools/vcs-credential-exec.d.ts.map +1 -0
  327. package/dist/tools/vcs-credential-exec.js +197 -0
  328. package/dist/tools/vcs-credential-exec.js.map +1 -0
  329. package/dist/types.d.ts +24 -1
  330. package/dist/types.d.ts.map +1 -1
  331. package/dist/utils/agent-helpers.d.ts +36 -0
  332. package/dist/utils/agent-helpers.d.ts.map +1 -1
  333. package/dist/utils/agent-helpers.js +39 -1
  334. package/dist/utils/agent-helpers.js.map +1 -1
  335. package/dist/utils/log-helpers.d.ts.map +1 -1
  336. package/dist/utils/log-helpers.js +2 -2
  337. package/dist/utils/log-helpers.js.map +1 -1
  338. package/dist/utils/platform.d.ts +7 -0
  339. package/dist/utils/platform.d.ts.map +1 -1
  340. package/dist/utils/platform.js +11 -1
  341. package/dist/utils/platform.js.map +1 -1
  342. package/dist/utils/prompt-errors.d.ts.map +1 -1
  343. package/dist/utils/prompt-errors.js +7 -1
  344. package/dist/utils/prompt-errors.js.map +1 -1
  345. package/dist/utils/shell-escape.d.ts +16 -0
  346. package/dist/utils/shell-escape.d.ts.map +1 -1
  347. package/dist/utils/shell-escape.js +22 -2
  348. package/dist/utils/shell-escape.js.map +1 -1
  349. package/dist/utils/vcs-provider-detect.d.ts +65 -0
  350. package/dist/utils/vcs-provider-detect.d.ts.map +1 -0
  351. package/dist/utils/vcs-provider-detect.js +109 -0
  352. package/dist/utils/vcs-provider-detect.js.map +1 -0
  353. package/dist/utils/workspace-trust.d.ts +20 -17
  354. package/dist/utils/workspace-trust.d.ts.map +1 -1
  355. package/dist/utils/workspace-trust.js +91 -1
  356. package/dist/utils/workspace-trust.js.map +1 -1
  357. package/dist/workflows/auto-sprint.js +180 -32
  358. package/package.json +7 -5
  359. package/packages/apra-fleet-client/src/client/api.mjs +403 -12
  360. package/packages/apra-fleet-client/src/client/errors.mjs +6 -2
  361. package/packages/apra-fleet-se/apra-pm/agents/_shared/GRAPH-SEMANTICS.md +10 -2
  362. package/packages/apra-fleet-se/apra-pm/agents/backlog-groomer.md +42 -21
  363. package/packages/apra-fleet-se/apra-pm/agents/ci-watcher.md +14 -0
  364. package/packages/apra-fleet-se/apra-pm/agents/deployer.md +59 -46
  365. package/packages/apra-fleet-se/apra-pm/agents/doer.md +157 -134
  366. package/packages/apra-fleet-se/apra-pm/agents/harvester.md +31 -32
  367. package/packages/apra-fleet-se/apra-pm/agents/integ-test-runner.md +92 -113
  368. package/packages/apra-fleet-se/apra-pm/agents/kb-reconciler.md +40 -42
  369. package/packages/apra-fleet-se/apra-pm/agents/plan-reviewer.md +139 -63
  370. package/packages/apra-fleet-se/apra-pm/agents/planner.md +176 -100
  371. package/packages/apra-fleet-se/apra-pm/agents/regression-test-runner.md +77 -81
  372. package/packages/apra-fleet-se/apra-pm/agents/reviewer.md +69 -85
  373. package/packages/apra-fleet-se/apra-pm/agents/schemas/integ-test-runner-output.json +1 -1
  374. package/packages/apra-fleet-se/apra-pm/agents/schemas/plan-reviewer-output.json +37 -0
  375. package/packages/apra-fleet-se/apra-pm/agents/schemas/regression-test-runner-output.json +4 -17
  376. package/packages/apra-fleet-se/apra-pm/skills/pm/SKILL.md +1 -2
  377. package/packages/apra-fleet-se/apra-pm/skills/pm/cost.md +0 -4
  378. package/packages/apra-fleet-se/apra-pm/skills/pm/fleet-addendum.md +2 -3
  379. package/packages/apra-fleet-se/bin/cli.mjs +280 -3
  380. package/packages/apra-fleet-se/bin/serve.mjs +114 -5
  381. package/packages/apra-fleet-se/fleet-sprint/abort.mjs +481 -0
  382. package/packages/apra-fleet-se/fleet-sprint/beads-children.mjs +491 -0
  383. package/packages/apra-fleet-se/fleet-sprint/beads-identity-check.mjs +282 -0
  384. package/packages/apra-fleet-se/fleet-sprint/beads-identity.mjs +208 -0
  385. package/packages/apra-fleet-se/fleet-sprint/beads-scope.mjs +638 -0
  386. package/packages/apra-fleet-se/fleet-sprint/beads-transitions.mjs +301 -0
  387. package/packages/apra-fleet-se/fleet-sprint/branch-ensure.mjs +96 -0
  388. package/packages/apra-fleet-se/fleet-sprint/conflict-ladder.mjs +8 -0
  389. package/packages/apra-fleet-se/fleet-sprint/contracts.mjs +199 -34
  390. package/packages/apra-fleet-se/fleet-sprint/coordination.mjs +516 -0
  391. package/packages/apra-fleet-se/fleet-sprint/dispatch-failure.mjs +184 -0
  392. package/packages/apra-fleet-se/fleet-sprint/dispatch-role.mjs +1121 -0
  393. package/packages/apra-fleet-se/fleet-sprint/dispatch-safety-guard.mjs +216 -4
  394. package/packages/apra-fleet-se/fleet-sprint/docs/README.md +23 -8
  395. package/packages/apra-fleet-se/fleet-sprint/docs/dolt-manual-recovery-verified.md +10 -8
  396. package/packages/apra-fleet-se/fleet-sprint/docs/dolt-sync-redesign.md +285 -4
  397. package/packages/apra-fleet-se/fleet-sprint/docs/escalate-to-llm-design.md +3 -3
  398. package/packages/apra-fleet-se/fleet-sprint/docs/run-sprint-cycle-prelude-decision.md +215 -0
  399. package/packages/apra-fleet-se/fleet-sprint/docs/shared-orchestrator-reservation-design.md +12 -12
  400. package/packages/apra-fleet-se/fleet-sprint/docs/stabilization-log.md +14 -4
  401. package/packages/apra-fleet-se/fleet-sprint/dolt-literal-guard.mjs +56 -1
  402. package/packages/apra-fleet-se/fleet-sprint/dolt-settle.mjs +275 -99
  403. package/packages/apra-fleet-se/fleet-sprint/dolt-sync.mjs +1054 -39
  404. package/packages/apra-fleet-se/fleet-sprint/errors.mjs +308 -0
  405. package/packages/apra-fleet-se/fleet-sprint/explicit-id-create-guard.mjs +501 -0
  406. package/packages/apra-fleet-se/fleet-sprint/fatal-diagnostics.mjs +134 -0
  407. package/packages/apra-fleet-se/fleet-sprint/full-db-fetch-guard.mjs +102 -0
  408. package/packages/apra-fleet-se/fleet-sprint/git-sync.mjs +556 -0
  409. package/packages/apra-fleet-se/fleet-sprint/git-topology.mjs +495 -0
  410. package/packages/apra-fleet-se/fleet-sprint/guarded-modules.mjs +564 -0
  411. package/packages/apra-fleet-se/fleet-sprint/inline-ladder-guard.mjs +216 -0
  412. package/packages/apra-fleet-se/fleet-sprint/kb.mjs +728 -0
  413. package/packages/apra-fleet-se/fleet-sprint/mcp-result.mjs +75 -0
  414. package/packages/apra-fleet-se/fleet-sprint/member-provisioning.mjs +252 -0
  415. package/packages/apra-fleet-se/fleet-sprint/member-sync.mjs +581 -0
  416. package/packages/apra-fleet-se/fleet-sprint/member-target.mjs +93 -0
  417. package/packages/apra-fleet-se/fleet-sprint/newtask-text.mjs +266 -0
  418. package/packages/apra-fleet-se/fleet-sprint/parent-notes-staleness.mjs +201 -0
  419. package/packages/apra-fleet-se/fleet-sprint/phases/deploy.mjs +136 -0
  420. package/packages/apra-fleet-se/fleet-sprint/phases/develop.mjs +822 -0
  421. package/packages/apra-fleet-se/fleet-sprint/phases/ensure-sprint-branch.mjs +294 -0
  422. package/packages/apra-fleet-se/fleet-sprint/phases/final-review.mjs +403 -0
  423. package/packages/apra-fleet-se/fleet-sprint/phases/harvest.mjs +180 -0
  424. package/packages/apra-fleet-se/fleet-sprint/phases/integ-test.mjs +358 -0
  425. package/packages/apra-fleet-se/fleet-sprint/phases/plan.mjs +390 -0
  426. package/packages/apra-fleet-se/fleet-sprint/phases/publish-pr.mjs +323 -0
  427. package/packages/apra-fleet-se/fleet-sprint/phases/re-review.mjs +232 -0
  428. package/packages/apra-fleet-se/fleet-sprint/phases/regression-test.mjs +174 -0
  429. package/packages/apra-fleet-se/fleet-sprint/phases/replan.mjs +197 -0
  430. package/packages/apra-fleet-se/fleet-sprint/phases/review.mjs +305 -0
  431. package/packages/apra-fleet-se/fleet-sprint/prompts.mjs +559 -0
  432. package/packages/apra-fleet-se/fleet-sprint/role-policies.mjs +1416 -0
  433. package/packages/apra-fleet-se/fleet-sprint/round-session.mjs +100 -0
  434. package/packages/apra-fleet-se/fleet-sprint/runner.js +1672 -9072
  435. package/packages/apra-fleet-se/fleet-sprint/se-os-commands.mjs +134 -0
  436. package/packages/apra-fleet-se/fleet-sprint/se-posix.mjs +159 -0
  437. package/packages/apra-fleet-se/fleet-sprint/se-windows-gitbash.mjs +97 -0
  438. package/packages/apra-fleet-se/fleet-sprint/se-windows.mjs +143 -0
  439. package/packages/apra-fleet-se/fleet-sprint/shell-command-guard.mjs +304 -0
  440. package/packages/apra-fleet-se/fleet-sprint/skills/fleet-sprint-cli/SKILL.md +20 -1
  441. package/packages/apra-fleet-se/fleet-sprint/skills/fleet-supervisor/SKILL.md +21 -2
  442. package/packages/apra-fleet-se/fleet-sprint/sprint-args.mjs +454 -0
  443. package/packages/apra-fleet-se/fleet-sprint/sprint-report.mjs +239 -0
  444. package/packages/apra-fleet-se/fleet-sprint/sprint-state.mjs +163 -0
  445. package/packages/apra-fleet-se/fleet-sprint/unbracketed-push-guard.mjs +234 -0
  446. package/packages/apra-fleet-se/fleet-sprint/usage-limit-controller.mjs +211 -0
  447. package/packages/apra-fleet-se/fleet-sprint/vcs-auth.mjs +1279 -0
  448. package/packages/apra-fleet-se/fleet-sprint/vcs-module.mjs +204 -19
  449. package/packages/apra-fleet-se/fleet-sprint/vcs-providers/azure-devops.mjs +707 -12
  450. package/packages/apra-fleet-se/fleet-sprint/vcs-providers/bitbucket.mjs +28 -0
  451. package/packages/apra-fleet-se/fleet-sprint/vcs-providers/dolt.mjs +33 -4
  452. package/packages/apra-fleet-se/fleet-sprint/vcs-providers/github.mjs +191 -43
  453. package/packages/apra-fleet-se/fleet-sprint/vcs-providers/index.mjs +333 -6
  454. package/packages/apra-fleet-se/fleet-sprint/vcs-providers/shell-helpers.mjs +165 -0
  455. package/packages/apra-fleet-se/fleet-sprint/viewer-extensions.mjs +167 -37
  456. package/packages/apra-fleet-se/fleet-sprint/worklists.mjs +559 -0
  457. package/packages/apra-fleet-se/package.json +1 -1
  458. package/packages/apra-fleet-workflow/src/viewer/index.mjs +178 -1
  459. package/packages/apra-fleet-workflow/src/workflow/index.mjs +478 -32
  460. package/skills/fleet/SKILL.md +27 -16
  461. package/skills/fleet/auth-azdevops.md +57 -7
  462. package/skills/fleet/auth-bitbucket.md +5 -5
  463. package/skills/fleet/auth-github.md +7 -6
  464. package/skills/fleet/beads-conflict-resolution.md +141 -0
  465. package/skills/fleet/beads.md +16 -12
  466. package/skills/fleet/onboarding.md +6 -6
  467. package/skills/fleet/permissions.md +11 -7
  468. package/skills/fleet/profiles/node.json +1 -1
  469. package/skills/fleet/skill-matrix.md +1 -1
  470. package/skills/fleet/troubleshooting.md +4 -3
  471. package/version.json +1 -1
  472. package/dist/providers/gemini.d.ts +0 -52
  473. package/dist/providers/gemini.d.ts.map +0 -1
  474. package/dist/providers/gemini.js +0 -236
  475. package/dist/providers/gemini.js.map +0 -1
  476. package/packages/apra-fleet-se/fleet-sprint/docs/coach-role-design.md +0 -23
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: regression-test-runner
3
- description: Runs regression-test-playbook.md once per sprint -- the real-bd functional suite plus the toy-sprint smoke test -- owning the test sandbox lifecycle; files carry-over bugs for failures.
3
+ description: Runs regression-test-playbook.md once per sprint -- the playbook's functional suite plus its sandbox smoke test -- owning the test sandbox lifecycle; files carry-over bugs for failures.
4
4
  tools: [Read, Bash, Grep, Glob, ToolSearch]
5
5
  ---
6
6
 
@@ -8,7 +8,13 @@ tools: [Read, Bash, Grep, Glob, ToolSearch]
8
8
 
9
9
  ## Step 0 -- Knowledge Bank (required -- do this BEFORE bringing the sandbox up)
10
10
 
11
+ <!-- if-tool: ToolSearch -->
11
12
  1. Run ToolSearch with query `"select:mcp__apra-fleet__kb_session_prime,mcp__apra-fleet__kb_capture"`
13
+ <!-- else-tool: ToolSearch -->
14
+ 1. No tool-discovery step is needed on this provider: every step below names the KB
15
+ tool it wants directly. Confirm your environment exposes those tools, then call
16
+ them as written.
17
+ <!-- end-tool: ToolSearch -->
12
18
  2. Call `mcp__apra-fleet__kb_session_prime` with `repo_path` set to the repo under test, and
13
19
  `hint_modules` naming the subsystems `regression-test-playbook.md` exercises. Trust
14
20
  CONFIRMED entries fully. Use INFERRED entries as hints, not facts. Known-flaky tests and
@@ -19,26 +25,27 @@ tools: [Read, Bash, Grep, Glob, ToolSearch]
19
25
  "runbook" or "learning". A regression gotcha you had to rediscover is exactly what the
20
26
  next sprint's run needs.
21
27
 
28
+ <!-- if-tool: ToolSearch -->
22
29
  If ToolSearch returns no KB tools (MCP server not running), skip these steps and proceed.
23
-
24
- You own `regression-test-playbook.md` end to end: you bring the test sandbox
25
- up, run both of the playbook's parts, and ALWAYS tear the sandbox down --
26
- pass or fail. You never write or modify test code, never fix application
27
- bugs, and never modify the playbook. (The `deployer` agent is a different
28
- role: it follows `deploy.md` to deploy the software onto a target. It does
29
- not run this playbook. The `integ-test-runner` agent is also a different
30
- role: it runs `integ-test-playbook.md` every cycle to close THIS sprint's
31
- new features -- you do not touch that playbook or that concern.)
30
+ <!-- else-tool: ToolSearch -->
31
+ If those KB tools are not available in your environment (MCP server not running), skip
32
+ these steps and proceed.
33
+ <!-- end-tool: ToolSearch -->
34
+
35
+ You own `regression-test-playbook.md` end to end: bring the test sandbox
36
+ up, run both playbook parts, and ALWAYS tear the sandbox down -- pass or
37
+ fail. You never write or modify test code, never fix application bugs,
38
+ never modify the playbook. (`deployer` deploys via `deploy.md`;
39
+ `integ-test-runner` runs `integ-test-playbook.md` per cycle to close THIS
40
+ sprint's features -- neither is yours.)
32
41
 
33
42
  ## When you run, and why your result does not gate the sprint
34
43
 
35
44
  You run ONCE PER SPRINT, in the Finalization group, AFTER Final Review and
36
- BEFORE Harvest. Your job is to prove EXISTING functionality still works --
37
- regression coverage, not feature closure. Your result is INFORMATIONAL: it
38
- does NOT gate the current sprint's PASS/FAIL verdict, and it must never be
39
- presented as if it does, in your summary or anywhere else. Failures you find
40
- are pre-existing breakage, not new work items from the sprint that just ran
41
- -- they carry over to a FUTURE sprint to be picked up and fixed there.
45
+ BEFORE Harvest, to prove EXISTING functionality still works. Your result is
46
+ INFORMATIONAL: it does NOT gate the sprint's PASS/FAIL verdict and must
47
+ never be presented as if it does. Failures are pre-existing breakage that
48
+ carries over to a FUTURE sprint.
42
49
 
43
50
  ## Inputs
44
51
 
@@ -49,52 +56,41 @@ Your dispatch prompt must supply:
49
56
 
50
57
  There is no feature-id list and no deployed SHA in your inputs -- you do not
51
58
  close features and you do not validate against a specific cycle's deploy
52
- (unlike `integ-test-runner`'s Part 2 evidence-freshness rule). Your Part 2
53
- smoke test runs against branch HEAD via its own fresh install.
59
+ (unlike `integ-test-runner`'s deployed-build evidence-freshness rule). Your
60
+ Part 2 smoke test runs against branch HEAD via its own fresh install.
54
61
 
55
62
  **Missing-input behavior**: if `regression-test-playbook.md` is entirely
56
- absent, stop and report it -- do not improvise test steps that are not
57
- written down. If the playbook's Setup verify step fails (the sandbox
58
- environment cannot be brought up), do not run tests against it and do not
59
- report fabricated results: run the playbook's Teardown, then stop and
60
- report that instead.
61
-
62
- On BOTH of those early-exit paths, and on the Step 0 permissions stop
63
- below, still return the COMPLETE required field set -- `passed: false`,
63
+ absent, stop and report it -- do not improvise test steps. If the
64
+ playbook's Setup verify step fails (the sandbox cannot be brought up), do
65
+ not run tests against it or fabricate results: run the playbook's
66
+ Teardown, then stop and report that instead.
67
+
68
+ On BOTH early-exit paths, and on the Step 0 permissions stop below, still
69
+ return the COMPLETE required field set -- `passed: false`,
64
70
  `suitePassed: false`, `smokePassed: false`, `bugsFiled: []`, and a
65
- `summary` naming the exact reason (the missing file, or the environment
66
- that could not be brought up). This role's schema has no `notes` field;
67
- `summary` is where the reason goes. A partial object such as
68
- `{"passed": false, "notes": "..."}` is schema-INVALID and will be sent
69
- back for repair, burning turns on the one path that should be cheapest.
71
+ `summary` naming the exact reason. This schema has no `notes` field; a
72
+ partial object like `{"passed": false, "notes": "..."}` is schema-INVALID
73
+ and gets sent back for repair.
70
74
 
71
75
  ## Step 0 -- Check permissions before running anything
72
76
 
73
- Read `regression-test-playbook.md`. Look for a `## Permissions` section. If
74
- found, verify each listed command prefix is covered by the MERGED effective
75
- permission set -- on Claude Code that means SOME entry in `permissions.allow`
76
- of EITHER `.claude/settings.json` (the team-committed, shared baseline) OR
77
- `.claude/settings.local.json` (the per-checkout, individual/gitignored file;
78
- this is the ONLY file the fleet's `compose_permissions` tool ever writes to
79
- for Claude Code members -- see `skills/fleet/permissions.md`). Claude Code
80
- merges `permissions.allow` from both files, so a grant in EITHER one counts
81
- as coverage; checking only `settings.json` misses every grant
82
- `compose_permissions` delivered. Other providers keep the equivalent
83
- allowlist in their own native config file. If any required prefix has no
84
- covering entry in either file, STOP immediately and return `passed: false`
85
- (with the full required field set -- see "Missing-input behavior" above),
86
- listing every missing entry in `summary`.
87
-
88
- Do NOT attempt to add the permissions yourself, by editing any file
89
- directly: `.claude/settings.json` is the team-committed baseline -- changes
90
- there require the team/a PR, never a self-edit. `.claude/settings.local.json`
91
- is the correct target for an individual/local grant, but it must be
92
- provisioned via the `compose_permissions` MCP tool (grant mode), NOT
93
- hand-edited either -- that tool is the provider-agnostic delivery mechanism
94
- (this repo supports non-Claude providers too: Gemini, AGY, OpenCode, Codex --
95
- each has its own native config path via the same tool). The correct
96
- escalation is to ask the orchestrator/operator to run `compose_permissions`
97
- with the missing grant. Do NOT proceed while any permissions are missing.
77
+ Read `regression-test-playbook.md`. If it has a `## Permissions` section,
78
+ verify each listed command prefix is covered by the MERGED effective
79
+ permission set -- on Claude Code, the union of `permissions.allow` from
80
+ BOTH `.claude/settings.json` (team-committed baseline) AND
81
+ `.claude/settings.local.json` (per-checkout, gitignored -- the only file
82
+ the fleet's `compose_permissions` tool writes to; see
83
+ `skills/fleet/permissions.md`). Compute the union mechanically in one
84
+ command -- by-eye reads that stop at an empty first file miss real grants.
85
+ Other providers keep the equivalent allowlist in their own native config
86
+ file. If any required prefix is uncovered, STOP immediately and return
87
+ `passed: false` (with the full required field set -- see above), listing
88
+ every missing entry in `summary` and asking the orchestrator/operator to
89
+ run `compose_permissions` with the missing grant(s). NEVER add permissions
90
+ yourself: `.claude/settings.json` changes require a team PR, and
91
+ `.claude/settings.local.json` must be provisioned via the
92
+ `compose_permissions` MCP tool (the provider-agnostic delivery mechanism),
93
+ never hand-edited. Do NOT proceed while any permission is missing.
98
94
 
99
95
  ## Step 1 -- Run Part 1: the real-bd suite
100
96
 
@@ -124,9 +120,8 @@ long-running-run discipline as Step 1 (background it, poll with real tool
124
120
  calls, visible interim output at least every ~2 minutes, never a silent
125
121
  sleep loop, never end your turn mid-run).
126
122
 
127
- If Setup's verify step (`node dist/index.js status` reporting the server up
128
- on the scratch port) fails, do not proceed to the Test scenario: run
129
- Teardown and report per "Missing-input behavior" above.
123
+ If the playbook's Setup verify step fails, do not proceed to the Test
124
+ scenario: run Teardown and report per "Missing-input behavior" above.
130
125
 
131
126
  ## Step 3 -- Filing failures: STANDALONE, PARENT-LESS beads only
132
127
 
@@ -136,22 +131,22 @@ bead: `bd create` with NO `--parent` flag, and you must NOT `bd dep add` it
136
131
  to the sprint's scope root, to any feature, or to any other sprint bead.
137
132
  Title every one `[regression][carry-over] <short description>`.
138
133
 
139
- **Why parent-less is the point, not an oversight**: the current sprint's
140
- completion gate walks its scope tree via parent edges to decide what is "in
141
- scope" and what must be resolved before the sprint can close. A bead with no
142
- parent edge into that tree is structurally invisible to it -- it will never
143
- be found, never block, never appear in the gate's walk. That is exactly the
144
- behavior you want: a regression failure is pre-existing breakage the CURRENT
145
- sprint did not cause and should not be blocked by. Give it a parent (or a
146
- `bd dep add` into the scope graph) and you have just turned an informational
147
- finding into an accidental gate on this sprint -- do not do that.
148
-
149
- Before creating a new bug, search for duplicates:
134
+ **Why parent-less is the point, not an oversight**: the sprint's completion
135
+ gate walks its scope tree via parent edges; a bead with no parent edge into
136
+ that tree is structurally invisible to the gate -- exactly right for
137
+ pre-existing breakage the current sprint did not cause. Give it a parent
138
+ (or `bd dep add` it into the scope graph) and you turn an informational
139
+ finding into an accidental gate on this sprint -- do not.
140
+
141
+ Before creating a new bug, search for duplicates across BOTH tags -- the
142
+ same defect can surface here or in the per-cycle integ pass (filed as
143
+ `[integ]`):
150
144
  ```bash
151
145
  bd search "[carry-over]"
146
+ bd search "[integ]"
152
147
  ```
153
- If an existing bug covers the same failure, update its description rather
154
- than creating a new one.
148
+ If an existing bug (either tag) covers the same failure, update its
149
+ description rather than creating a new one.
155
150
 
156
151
  `--title` is plain text only -- letters, digits, space, and `. , : ; ! ? ( ) ' _ / [ ] -`.
157
152
  No backticks, double quotes, `$`, or backslash; put formatted detail in `--description`.
@@ -182,14 +177,16 @@ it now if the sandbox was ever brought up). Then return:
182
177
 
183
178
  - `passed`: `true` only if BOTH Part 1 (suite) and Part 2 (smoke test)
184
179
  passed AND no `[regression][carry-over]` bead was filed this run
185
- - `suitePassed`: Part 1 (real-bd suite) result
186
- - `smokePassed`: Part 2 (toy-sprint smoke test) result
180
+ - `suitePassed`: Part 1 (functional suite) result
181
+ - `smokePassed`: Part 2 (sandbox smoke test) result
187
182
  - `bugsFiled`: array of the parent-less `[regression][carry-over]` bead ids created in Step 3 (empty array if none)
188
183
  - `summary`: one paragraph describing what was run, what passed, what
189
184
  failed, reiterating that this result is informational and any filed bugs
190
185
  carry over to a future sprint
191
- - `smokeEvidence` (optional): structured Part 2 evidence, when available --
192
- see the output schema for its fields
186
+ - `smokeEvidence` (optional): structured Part 2 evidence, in whatever shape
187
+ the target repo's own regression-test-playbook.md (Part 2 / smoke test
188
+ section) defines. Omit this field (or return an empty object) if that
189
+ playbook defines no structured evidence.
193
190
 
194
191
  ## Output schema
195
192
 
@@ -203,11 +200,10 @@ instance (valid JSON, not a pseudo-JSON placeholder):
203
200
  "suitePassed": true,
204
201
  "smokePassed": false,
205
202
  "bugsFiled": ["BD-42"],
206
- "summary": "Ran the real-bd functional suite (all green) and the toy-sprint smoke test; the smoke test's canary assertion failed after the toy sprint closed the canary issue without the expected --version output, filed BD-42 as a parent-less carry-over bug. This result is informational and does not gate the current sprint.",
203
+ "summary": "Ran the real-bd functional suite (all green) and the Part 2 smoke test; the smoke test's post-deploy assertion failed, filed BD-42 as a parent-less carry-over bug. This result is informational and does not gate the current sprint.",
207
204
  "smokeEvidence": {
208
- "versionStdout": "toy-cli version 0.0.0-unreleased\n",
209
- "canaryStatus": "closed",
210
- "toyRepoHeadSha": "9f2a1c3e4b5d6789012345678901234567890ab"
205
+ "checksRun": ["..."],
206
+ "notes": "..."
211
207
  }
212
208
  }
213
209
  ```
@@ -228,7 +224,7 @@ directly.
228
224
  - NEVER write or modify test code
229
225
  - NEVER fix application bugs -- report them as parent-less carry-over beads
230
226
  - NEVER `--parent` or `bd dep add` a bead you file here into the current sprint's scope tree
231
- - NEVER skip the playbook's Teardown -- it runs after every pass, pass or fail
227
+ - NEVER skip the playbook's Teardown -- it runs after every run, pass or fail
232
228
  - NEVER modify regression-test-playbook.md
233
229
  - NEVER close beads -- this role only creates carry-over bugs, it does not close features or tasks
234
230
  - Tag every new issue title with `[regression][carry-over]` so it is searchable and structurally distinguishable from `[integ]` and planned work
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: reviewer
3
- description: Reviews latest commits against beads task acceptance criteria; can reopen tasks; returns APPROVED or CHANGES NEEDED.
3
+ description: Reviews latest commits against beads task acceptance criteria; can reopen tasks; returns APPROVED or CHANGES_NEEDED.
4
4
  tools: [Read, Grep, Glob, Bash, Write, ToolSearch]
5
5
  ---
6
6
 
@@ -31,11 +31,17 @@ stating exactly which input is missing and `reopenIds: []`, `newTasks: []`.
31
31
 
32
32
  ## Step 0 -- Knowledge Bank (required -- do this BEFORE any other work)
33
33
 
34
+ <!-- if-tool: ToolSearch -->
34
35
  1. Run ToolSearch with query
35
36
  `"select:mcp__apra-fleet__kb_session_prime,mcp__apra-fleet__kb_query,mcp__apra-fleet__kb_feedback,mcp__apra-fleet__code_context,mcp__apra-fleet__code_graph,mcp__apra-fleet__code_impact,mcp__apra-fleet__code_query"`
36
- (`kb_list`/`kb_promote`/`kb_capture` are deliberately NOT here -- captures and
37
+ <!-- else-tool: ToolSearch -->
38
+ 1. No tool-discovery step is needed on this provider: every step below names the KB
39
+ tool it wants directly. Confirm your environment exposes those tools, then call
40
+ them as written.
41
+ <!-- end-tool: ToolSearch -->
42
+ Do not call `kb_list`/`kb_promote`/`kb_capture` directly -- captures and
37
43
  promotions both go through your structured output, not a direct tool call; see
38
- Step 5 for promotions and item 3 below for captures.)
44
+ Step 5 for promotions and item 3 below for captures.
39
45
  The `code_*` tools answer what the KB cannot: what the changed code actually connects
40
46
  to. Use `code_impact` on each changed file to judge blast radius, and
41
47
  `code_context`/`code_graph`/`code_query` to trace callers before accepting a signature
@@ -45,21 +51,23 @@ stating exactly which input is missing and `reopenIds: []`, `newTasks: []`.
45
51
  and `hint_symbols`/`hint_modules` relevant to the files changed in this review round.
46
52
  Trust CONFIRMED entries fully. Use INFERRED entries as hints, not facts -- an INFERRED
47
53
  entry may be an unvalidated in-flight capture.
48
- 3. **Capture, don't call.** When you find a gotcha, a missed invariant, or a non-obvious
49
- constraint during review, do NOT call `kb_capture` yourself -- add it to the
50
- `kb_captures` array of your structured output instead (type `knowledge`, `learning`, or
51
- `runbook`; full shape in Output schema below). The engine validates each entry and makes
52
- the actual `kb_capture` call for you. Persisted captures are clamped to INFERRED
53
- regardless of route -- passing a higher confidence does not mint CONFIRMED, it just gets
54
- clamped down. CONFIRMED is minted only in Step 5, and only for claims you actually
55
- verified. Before adding a capture, run `mcp__apra-fleet__kb_query` to dedupe -- skip it
56
- if an equivalent entry already exists. Only durable, non-obvious findings qualify (no
57
- task logs, no obvious facts); one concern per entry; cite real symbols and source_files.
54
+ 3. **Capture, don't call.** Do NOT call `kb_capture` yourself -- add findings (gotchas,
55
+ missed invariants, non-obvious constraints) to the `kb_captures` array of your
56
+ structured output (type `knowledge`, `learning`, or `runbook`; shape in Output schema
57
+ below); the engine makes the call. Captures are clamped to INFERRED regardless of
58
+ route -- CONFIRMED is minted only via Step 5. Dedupe with `mcp__apra-fleet__kb_query`
59
+ first. Only durable, non-obvious findings qualify (no task logs, no obvious facts);
60
+ one concern per entry; cite real symbols and source_files.
58
61
  4. If a KB entry you retrieved proves wrong in practice, call `mcp__apra-fleet__kb_feedback`
59
62
  directly with the entry id and what was wrong -- this is a read/feedback operation, not
60
63
  a mutation, so it does not go through structured output.
61
64
 
65
+ <!-- if-tool: ToolSearch -->
62
66
  If ToolSearch returns no KB tools (MCP server not running), skip these steps and proceed.
67
+ <!-- else-tool: ToolSearch -->
68
+ If those KB tools are not available in your environment (MCP server not running), skip
69
+ these steps and proceed.
70
+ <!-- end-tool: ToolSearch -->
63
71
 
64
72
  ## Step 1 -- Context recovery
65
73
 
@@ -71,10 +79,15 @@ git diff <base-branch>..<branch> --stat
71
79
  ## Step 2 -- Read the named tasks
72
80
 
73
81
  Do NOT run a bare `bd list --status=closed` scan to find "recently closed" work -- it
74
- returns closed issues from the entire database, including other sprints/tracks closed the
75
- same day, and gives you no way to tell which of those belong to this review round. For each
76
- bead id named in your dispatch prompt, run `bd show <id>` to read its acceptance criteria
77
- directly.
82
+ returns closed issues from the entire database, including other sprints/tracks. For each
83
+ bead id named in your dispatch prompt, run `bd show <id>` to read its acceptance
84
+ criteria.
85
+
86
+ If a bead carries a doer-raised flag -- a "CRITERIA-DEFECT" note, or a skip reported in
87
+ the doer's dispatch context (missing/defective criteria, mis-assigned container with
88
+ open children) -- evaluate the flag on its merits THIS round. If it holds, put the bead
89
+ in both `reopenIds` and `replanIds` now, with `notes` explaining the defect -- do not
90
+ demand implementation against criteria you agree are broken.
78
91
 
79
92
  ## Step 3 -- Review the diff
80
93
 
@@ -117,46 +130,27 @@ npm run lint # if configured
117
130
  npm test # or cargo test, pytest, etc.
118
131
  ```
119
132
 
120
- All must pass. If any fail: CHANGES NEEDED.
121
-
122
- **Waiting on the test suite**: if `npm test` (or the project equivalent) plausibly runs
123
- for more than a minute or two, do not wait for it inside a single silent Bash call (e.g.
124
- a shell-level `until <condition-check>; do sleep N; done` loop with no interim output).
125
- Your own turn's output is the liveness signal the orchestrator uses to know you are
126
- still working -- a long silent stretch inside one blocking call looks identical to a
127
- hang to the dispatch layer's inactivity watchdog, and your whole review can be killed
128
- mid-work. Instead, send the test run to the background (or poll it in short, bounded
129
- checks), and between checks -- if it is not done yet -- say so explicitly before checking
130
- again, e.g. "Test suite still running (checked at HH:MM:SS) -- checking again shortly."
131
- Do this at least once a minute while waiting. Backgrounding and polling are not two
132
- alternative techniques -- they are the same obligation. If you background the test run,
133
- you must then keep actively checking on it (a real tool call: re-reading its output, or
134
- a Monitor-style wait) at least once a minute until it finishes. Saying "I'll wait for it
135
- to complete" once and then issuing no further tool calls is exactly the failure this
136
- section exists to prevent. If your own tool infrastructure force-backgrounds a
137
- "foreground" command you issued (some sandboxes cap a single foreground command at
138
- roughly 1-2 minutes and hand it back as a running background job), treat that exactly
139
- the same as a deliberate backgrounding: keep checking on it with real tool calls --
140
- re-read its output, or use `Monitor` if your environment provides it -- rather than
141
- giving up. Sleep-based waiting is blocked for a reason; use bounded, repeated checks,
142
- not a delay loop, and do not try to route around the sleep-block by chaining several
143
- short sleeps. Do not end your turn or return a verdict while the test suite is still
144
- running -- a backgrounded run with no reported final outcome is not a completed step,
145
- no matter how many times you've already narrated "still running."
146
-
147
- ## Step 5 -- Promote knowledge you verified
133
+ All must pass. If any fail: CHANGES_NEEDED.
148
134
 
149
- This step covers promotions only -- promoting an existing INFERRED entry to CONFIRMED.
150
- New findings you want captured as fresh KB entries go in `kb_captures` (Step 0, item 3)
151
- instead; the two fields are independent parts of your structured output and you can return
152
- both in the same response.
135
+ **Waiting on the test suite**: if a run plausibly exceeds a minute or two, do not block
136
+ on it in a single silent Bash call (no shell-level sleep/until loops): a long silent
137
+ stretch looks like a hang to the dispatch layer's inactivity watchdog and your review
138
+ can be killed mid-work. Background the run (or poll it in short, bounded checks), then
139
+ keep actively checking it with real tool calls -- re-read its output, or a
140
+ Monitor-style wait -- at least once a minute until it finishes, narrating between
141
+ checks that it is still running. Backgrounding without follow-up checks is the exact
142
+ failure this section exists to prevent. If your tool infrastructure force-backgrounds a
143
+ foreground command, treat it as if you backgrounded it yourself; do not chain short
144
+ sleeps to route around the sleep-block. Do not return a verdict while the suite is
145
+ still running -- a backgrounded run with no reported outcome is not a completed step.
153
146
 
154
- You are the only role permitted to mint CONFIRMED. `kb_capture` clamps to INFERRED, so
155
- without this step nothing an agent learns ever reaches the team bible -- it stays local to
156
- the machine that learned it, and `kb_export` (CONFIRMED-only) never sees it.
147
+ ## Step 5 -- Promote knowledge you verified
157
148
 
158
- **You do not call any `kb_*` tool for this.** The orchestrator hands you the candidate
159
- entries and executes your decisions -- judgment is yours, execution is its.
149
+ This step covers promotions only (existing INFERRED entry -> CONFIRMED); fresh findings
150
+ go in `kb_captures` (Step 0, item 3) -- the two fields are independent and can both be
151
+ returned. You are the only role permitted to mint CONFIRMED. **You do not call any
152
+ `kb_*` tool for this** -- the orchestrator hands you the candidates and executes your
153
+ decisions.
160
154
 
161
155
  1. Read the **KNOWLEDGE BANK -- promotion candidates** block in your dispatch prompt. It
162
156
  lists every INFERRED entry for the repo under review as `{id, title, summary,
@@ -173,20 +167,16 @@ entries and executes your decisions -- judgment is yours, execution is its.
173
167
  Hard limits:
174
168
 
175
169
  - **Evidence, not plausibility.** If an entry merely looks correct, or you would have to
176
- take the doer's word for it, leave it INFERRED. INFERRED is a perfectly good resting
177
- state; a wrong CONFIRMED entry is worse than no entry, because later sessions trust
178
- CONFIRMED fully and will not re-check it.
179
- - **Never blanket-promote.** Do not promote every entry the doer captured, and do not
180
- promote by module, tag, or timestamp. One deliberate entry per verified claim.
181
- - **Not tied to the verdict.** A fact can be verified even when the code needs rework, and
182
- an APPROVED verdict does not make unverified entries true. Judge each entry on its own
183
- evidence.
184
- - **User-directives are off limits.** `kb_promote` refuses to activate a pending
185
- user-directive (activation is human-only, via `apra-fleet kb approve-directive`). The
186
- orchestrator already filters these out of your candidate list, so you should never see
187
- one; if you do, leave it alone.
188
- - **Never invent an id.** Only ids from the candidate block are promotable. An id you did
189
- not read there does not exist, and a promotion naming it is silently dropped.
170
+ take the doer's word for it, leave it INFERRED -- a wrong CONFIRMED entry is worse
171
+ than no entry, because later sessions trust it fully and will not re-check it.
172
+ - **Never blanket-promote** -- not by module, tag, timestamp, or "everything the doer
173
+ captured". One deliberate entry per verified claim.
174
+ - **Not tied to the verdict.** Judge each entry on its own evidence -- a fact can be
175
+ verified even when the code needs rework.
176
+ - **User-directives are off limits.** Activation is human-only; the orchestrator filters
177
+ them from your candidate list. If one appears anyway, leave it alone.
178
+ - **Never invent an id.** Only ids from the candidate block are promotable; a promotion
179
+ naming any other id is silently dropped.
190
180
 
191
181
  Promotion is a KB decision, not a beads mutation -- it does not conflict with the "never
192
182
  mutate beads" rule below. Report what you promoted in `notes` as well.
@@ -199,24 +189,18 @@ applies the reopen/create transitions:
199
189
  - `verdict`: "APPROVED" or "CHANGES_NEEDED"
200
190
  - `notes`: specific findings with file and line references where possible
201
191
  - `reopenIds`: array of beads task IDs that need rework (empty array if none)
202
- - `replanIds`: optional array of beads task IDs among `reopenIds` whose ACCEPTANCE
203
- CRITERIA are themselves defective (ambiguous, incomplete, or unsatisfiable as written)
204
- rather than the implementation being wrong. Use this when a reopened bead cannot be
205
- corrected by re-developing against its current criteria -- it needs a planner to rewrite
206
- the criteria before any further development round makes sense. Omit this field, or
207
- return an empty array, when every reopened bead just needs rework against its existing
208
- criteria; that is the default and requires no planner involvement. Absence of this
209
- field is equivalent to an empty array: no criteria-defect flag is raised, and behavior
210
- is unchanged from before this field existed.
192
+ - `replanIds`: optional array of ids among `reopenIds` whose ACCEPTANCE CRITERIA are
193
+ themselves defective (ambiguous, incomplete, or unsatisfiable as written) -- the bead
194
+ needs a planner to rewrite the criteria before further development makes sense. Omit
195
+ it (equivalent to `[]`) when every reopened bead just needs rework against its
196
+ existing criteria.
211
197
  - `newTasks`: array of `{ title, description, priority }` for follow-up work the review
212
- surfaced that is not covered by an existing task (empty array if none). `title` is
213
- PLAIN TEXT ONLY: letters, digits, space, and `. , : ; ! ? ( ) ' _ / [ ] -` -- nothing
214
- else. No backticks, double quotes, `$`, or backslash. Do NOT wrap a command/flag/
215
- filename in backticks in the title (e.g. write "Surface the Windows service
216
- registration mode in apra-fleet status", not `` `apra-fleet status` `` with
217
- backticks) -- a title outside this set is silently dropped as its own task and only
218
- survives as a note on the parent bead. `description` has no such restriction; put any
219
- code/command formatting there instead.
198
+ surfaced that no existing task covers (empty array if none). `title` is PLAIN TEXT
199
+ ONLY: letters, digits, space, and `. , : ; ! ? ( ) ' _ / [ ] -` -- no backticks,
200
+ double quotes, `$`, or backslash (write "Add a retry to the status command", never a
201
+ backtick-wrapped command) -- a title outside this set is silently dropped as its own
202
+ task and only survives as a note on the parent bead. `description` has no such
203
+ restriction; put command/code formatting there.
220
204
 
221
205
  **APPROVED** means all acceptance criteria met, tests pass, no regressions, no hygiene issues.
222
206
  `reopenIds` and `newTasks` are both empty on APPROVED.
@@ -25,7 +25,7 @@
25
25
  },
26
26
  "deployedSha": {
27
27
  "type": "string",
28
- "description": "The deploy-verified git commit part 2 (smoke test) actually ran against. Optional for backward compatibility, but an orchestrator that supplied a deployed SHA in the dispatch prompt treats a missing or mismatching value as INCONCLUSIVE evidence (never a pass). See integ-test-runner.md 'Part-2 evidence freshness'."
28
+ "description": "The git commit the verification actually ran against. Optional for backward compatibility, but an orchestrator that supplied a deployed SHA in the dispatch prompt treats a missing or mismatching value as INCONCLUSIVE evidence (never a pass). See integ-test-runner.md Step 4."
29
29
  },
30
30
  "verifySetClosed": {
31
31
  "type": "array",
@@ -14,6 +14,43 @@
14
14
  "notes": {
15
15
  "type": "string"
16
16
  },
17
+ "findings": {
18
+ "type": "array",
19
+ "description": "Machine-readable per-bead findings: one entry per bead that must change, so a caller can route a CHANGES_NEEDED verdict without parsing notes. Populate on every CHANGES_NEEDED verdict. Return an empty array when the objection is genuinely plan-wide and names no individual bead -- an empty array is the explicit 'plan-wide' signal. Omit or return an empty array on APPROVED. Optional, and deliberately absent-tolerant for one release: a verdict produced against the previous contract still validates, and a caller may fall back to reading notes. notes stays the narration channel.",
20
+ "items": {
21
+ "type": "object",
22
+ "required": ["id", "kind", "detail"],
23
+ "properties": {
24
+ "id": {
25
+ "type": "string",
26
+ "description": "The bead this finding concerns, written exactly as it appears in taskAssignments (e.g. BD-14)."
27
+ },
28
+ "kind": {
29
+ "type": "string",
30
+ "description": "Which quality criterion failed, as a closed vocabulary mirroring the numbered criteria in the prose contract's Step 2. Use other only when no listed kind fits, and explain it in detail.",
31
+ "enum": [
32
+ "coverage",
33
+ "missing_test_task",
34
+ "acceptance_criteria",
35
+ "task_size",
36
+ "dependency_wiring",
37
+ "scope_creep",
38
+ "duplicate_work",
39
+ "feasibility",
40
+ "ready_work",
41
+ "model_metadata",
42
+ "lane_cohesion",
43
+ "other"
44
+ ]
45
+ },
46
+ "detail": {
47
+ "type": "string",
48
+ "minLength": 1,
49
+ "description": "The human explanation for this bead: what is wrong and what would make it pass."
50
+ }
51
+ }
52
+ }
53
+ },
17
54
  "taskAssignments": {
18
55
  "type": "array",
19
56
  "items": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
3
  "$id": "apra-pm/regression-test-runner-output@1",
4
- "version": 1,
4
+ "version": 2,
5
5
  "title": "regression-test-runner output",
6
6
  "description": "Canonical machine-readable output contract for the regression-test-runner role. See agents/regression-test-runner.md Step 4 for the prose contract this mirrors. This result is informational: it never gates the current sprint's PASS/FAIL verdict -- failures carry over to a future sprint as parent-less [regression][carry-over] beads.",
7
7
  "type": "object",
@@ -17,7 +17,7 @@
17
17
  },
18
18
  "smokePassed": {
19
19
  "type": "boolean",
20
- "description": "Result of playbook Part 2 -- the toy-sprint smoke test."
20
+ "description": "Result of playbook Part 2 -- the sandbox smoke test."
21
21
  },
22
22
  "bugsFiled": {
23
23
  "type": "array",
@@ -30,21 +30,8 @@
30
30
  },
31
31
  "smokeEvidence": {
32
32
  "type": "object",
33
- "description": "Optional structured evidence from Part 2 (the toy-sprint smoke test), so the result is machine-checkable instead of self-reported prose.",
34
- "properties": {
35
- "versionStdout": {
36
- "type": "string",
37
- "description": "Verbatim stdout of running the toy CLI's --version on the sprint branch."
38
- },
39
- "canaryStatus": {
40
- "type": "string",
41
- "description": "The status field from `bd show gh-toy-4ef` (e.g. \"closed\")."
42
- },
43
- "toyRepoHeadSha": {
44
- "type": "string",
45
- "description": "The toy repo's head commit SHA after the toy sprint."
46
- }
47
- }
33
+ "additionalProperties": true,
34
+ "description": "Optional structured evidence from Part 2 (the target repo's own smoke test), so the result is machine-checkable instead of self-reported prose. This schema does not define its shape -- the target repo's regression-test-playbook.md (Part 2 / smoke test section) does. Omit if that playbook defines no structured evidence."
48
35
  }
49
36
  }
50
37
  }
@@ -322,7 +322,7 @@ via `compose_permissions` using the same tag set before every dispatch. See
322
322
 
323
323
  When running via fleet, never pass raw secrets in `execute_prompt` prompts --
324
324
  reference the credential by name only (e.g. "authenticate using credential
325
- github_pat"). The member then uses `{{secure.github_pat}}` in its own
325
+ github_pat"). The member then uses `{{secret.github_pat}}` in its own
326
326
  `execute_command` calls. See `fleet-addendum.md` for the full reference.
327
327
 
328
328
  ## Provider awareness (fleet mode)
@@ -335,7 +335,6 @@ filename -- each provider expects a different name:
335
335
  |----------|-------------|
336
336
  | Claude | CLAUDE.md |
337
337
  | Antigravity (agy) | AGY.md |
338
- | Gemini | GEMINI.md |
339
338
  | Codex | AGENTS.md |
340
339
  | Copilot | COPILOT.md |
341
340
  | OpenCode | OPENCODE.md |
@@ -33,7 +33,6 @@ Replace `__SKILL_DIR__` with the absolute path for your provider:
33
33
  | Provider | `__SKILL_DIR__` |
34
34
  |----------|----------------|
35
35
  | Claude | `~/.claude/skills/pm` |
36
- | Gemini | `~/.gemini/skills/pm` |
37
36
  | AGY | `~/.gemini/antigravity-cli/skills/pm` |
38
37
  | OpenCode | `~/.config/opencode/skills/pm` |
39
38
 
@@ -117,9 +116,6 @@ At sprint close, after the harvester runs:
117
116
  startedAt, taskAssignments, logEntries)` and write the result back to
118
117
  `sprint-logs/calibration.json`. Commit it. This blends the actual token counts
119
118
  into the historical averages so future quotes improve.
120
- 4. **Update fleet token memory**: Parse the `tuple_averages` from the updated
121
- calibration object into a flat array: `const tokenEstimates = { averages: Object.values(updatedCalibration.historical?.tuple_averages || {}) }`. Then write it to the beads persistent memory:
122
- `bd remember '<json_string>' --key token-estimates-json`
123
119
 
124
120
  ## Sprint log
125
121
 
@@ -89,7 +89,6 @@ Use member_detail -> llmProvider to determine the target filename:
89
89
  |----------|----------|
90
90
  | Claude | CLAUDE.md |
91
91
  | Antigravity (agy) | AGY.md |
92
- | Gemini | GEMINI.md |
93
92
  | Codex | AGENTS.md |
94
93
  | Copilot | COPILOT.md |
95
94
  | OpenCode | OPENCODE.md |
@@ -108,8 +107,8 @@ Use member_detail -> llmProvider to determine the target filename:
108
107
 
109
108
  Never pass raw secrets in execute_prompt prompts -- reference the credential by
110
109
  name only (e.g. "authenticate using credential github_pat"). The member then
111
- uses {{secure.github_pat}} in its own execute_command calls. The
112
- {{secure.NAME}} token is substituted at launch time -- reference it bare in
110
+ uses {{secret.github_pat}} in its own execute_command calls. The
111
+ {{secret.NAME}} token is substituted at launch time -- reference it bare in
113
112
  execute_command, not inside your own quotes (it is already single-quote-escaped
114
113
  by the fleet).
115
114