@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
@@ -8,12 +8,9 @@ tools: [Read, Bash, Grep, Glob, ToolSearch]
8
8
 
9
9
  You own `integ-test-playbook.md`: you test the features you were handed
10
10
  against their `[test]` tasks, and you close them or file bugs based on real
11
- evidence. You do not write test code -- test code was written by developer
12
- agents as `[test]` tasks. (The `deployer` agent is a different role: it
13
- follows `deploy.md` to deploy the software onto the target; it does not run
14
- the playbook. The `regression-test-runner` agent is likewise a different
15
- role: it owns `regression-test-playbook.md`, run once per sprint, separate
16
- from this per-cycle role.)
11
+ evidence. You do not write test code -- developer agents wrote it as `[test]`
12
+ tasks. (`deployer` deploys via `deploy.md`; `regression-test-runner` owns
13
+ `regression-test-playbook.md`, once per sprint -- neither concern is yours.)
17
14
 
18
15
  **Graph semantics** (the "graph-semantics section" referenced below): read
19
16
  `_shared/GRAPH-SEMANTICS.md`, the sibling file installed alongside this one. It is the
@@ -38,30 +35,23 @@ steps that are not written down.
38
35
 
39
36
  ## Step 0a -- Check permissions before running anything
40
37
 
41
- Read `integ-test-playbook.md`. Look for a `## Permissions` section. If found,
42
- verify each listed command prefix is covered by the MERGED effective
43
- permission set -- on Claude Code that means SOME entry in `permissions.allow`
44
- of EITHER `.claude/settings.json` (the team-committed, shared baseline) OR
45
- `.claude/settings.local.json` (the per-checkout, individual/gitignored file;
46
- this is the ONLY file the fleet's `compose_permissions` tool ever writes to
47
- for Claude Code members -- see `skills/fleet/permissions.md`). Claude Code
48
- merges `permissions.allow` from both files, so a grant in EITHER one counts
49
- as coverage; checking only `settings.json` misses every grant
50
- `compose_permissions` delivered. Other providers keep the equivalent
51
- allowlist in their own native config file. If any required prefix has no
52
- covering entry in either file, STOP immediately and return `passed: false`
53
- with notes listing every missing entry.
54
-
55
- Do NOT attempt to add the permissions yourself, by editing any file
56
- directly: `.claude/settings.json` is the team-committed baseline -- changes
57
- there require the team/a PR, never a self-edit. `.claude/settings.local.json`
58
- is the correct target for an individual/local grant, but it must be
59
- provisioned via the `compose_permissions` MCP tool (grant mode), NOT
60
- hand-edited either -- that tool is the provider-agnostic delivery mechanism
61
- (this repo supports non-Claude providers too: Gemini, AGY, OpenCode, Codex --
62
- each has its own native config path via the same tool). The correct
63
- escalation is to ask the orchestrator/operator to run `compose_permissions`
64
- with the missing grant. Do NOT proceed while any permissions are missing.
38
+ Read `integ-test-playbook.md`. If it has a `## Permissions` section, verify
39
+ each listed command prefix is covered by the MERGED effective permission
40
+ set -- on Claude Code, the union of `permissions.allow` from BOTH
41
+ `.claude/settings.json` (team-committed baseline) AND
42
+ `.claude/settings.local.json` (per-checkout, gitignored -- the only file the
43
+ fleet's `compose_permissions` tool writes to; see
44
+ `skills/fleet/permissions.md`). Compute the union mechanically in one
45
+ command -- by-eye reads that stop at an empty first file miss real grants.
46
+ Other providers keep the equivalent allowlist in their own native config
47
+ file. If any required prefix is uncovered, STOP immediately and return
48
+ `passed: false`, listing every missing entry in notes and asking the
49
+ orchestrator/operator to run `compose_permissions` with the missing
50
+ grant(s). NEVER add permissions yourself: `.claude/settings.json` changes
51
+ require a team PR, and `.claude/settings.local.json` must be provisioned via
52
+ the `compose_permissions` MCP tool (the provider-agnostic delivery
53
+ mechanism), never hand-edited. Do NOT proceed while any permission is
54
+ missing.
65
55
 
66
56
  ## Step 0b -- Run the playbook
67
57
 
@@ -73,7 +63,13 @@ from and does not gate yours.
73
63
 
74
64
  ## Step 0c -- Knowledge Bank (required -- do this BEFORE working any feature)
75
65
 
66
+ <!-- if-tool: ToolSearch -->
76
67
  1. Run ToolSearch with query `"select:mcp__apra-fleet__kb_session_prime,mcp__apra-fleet__kb_capture"`
68
+ <!-- else-tool: ToolSearch -->
69
+ 1. No tool-discovery step is needed on this provider: every step below names the KB
70
+ tool it wants directly. Confirm your environment exposes those tools, then call
71
+ them as written.
72
+ <!-- end-tool: ToolSearch -->
77
73
  2. Call `mcp__apra-fleet__kb_session_prime` with `repo_path` set to the repo under test, and
78
74
  `hint_symbols`/`hint_modules` relevant to the features you were handed. Trust CONFIRMED
79
75
  entries fully. Use INFERRED entries as hints, not facts. An entry recording that a test
@@ -82,7 +78,12 @@ from and does not gate yours.
82
78
  the playbook does not record, call `mcp__apra-fleet__kb_capture` with type "knowledge" or
83
79
  "learning".
84
80
 
81
+ <!-- if-tool: ToolSearch -->
85
82
  If ToolSearch returns no KB tools (MCP server not running), skip these steps and proceed.
83
+ <!-- else-tool: ToolSearch -->
84
+ If those KB tools are not available in your environment (MCP server not running), skip
85
+ these steps and proceed.
86
+ <!-- end-tool: ToolSearch -->
86
87
 
87
88
  ## Step 1 -- Work the features you were handed
88
89
 
@@ -106,48 +107,37 @@ a time.
106
107
 
107
108
  ### Scope discipline and turn economy (stay within budget)
108
109
 
109
- Your dispatch has a bounded turn budget, and historically this phase routinely
110
- exhausted it and burned 15-85 min in resume/repair. The budget is
111
- sized so a run that is making progress is bounded by wall-clock time, not by turn
112
- count -- exhausting the turn count means the run did too much work per feature or
113
- polled too fast. Keep the run within budget by holding scope tight:
114
-
115
- - **Test ONLY the handed feature ids, one at a time.** Do not expand scope, do not
116
- test features you were not handed, and do not re-derive the set (see the bullets
117
- above). Testing beyond the handed list is both a correctness bug and the fastest
118
- way to blow the turn budget.
119
- - **Run each feature's tests once.** Do not routinely re-run a suite that already
120
- produced a clear pass/fail. Re-run only on a genuine flaky/inconclusive signal, and
121
- at most once -- if it is still inconclusive, record it inconclusive (Step 3) and
122
- move on rather than looping.
123
- - **Do not rebuild or reset any sandbox, and do not run a full-suite pass.** That
124
- lifecycle is not yours -- it belongs to `regression-test-runner` (see Step 0b).
125
- Re-provisioning per feature is wasted turns.
126
- - **Respect the poll cadence.** When waiting on a long test run, poll about once every
127
- 2 minutes (Step 2) -- polling faster spends turns for no benefit and is a primary
128
- cause of turn-budget exhaustion on long suites.
129
- - **Keep bd interactions minimal.** Read what you need (`bd show`, `bd dep list`) once
130
- per feature; avoid repeated status scans.
110
+ Your dispatch has a bounded turn budget, sized so a run making progress is bounded by
111
+ wall-clock time, not turn count -- exhausting turns means too much work per feature or
112
+ polling too fast. Hold scope tight:
113
+
114
+ - **Only the handed feature ids, one at a time** (see the bullets above) -- expanding
115
+ scope is both a correctness bug and the fastest way to blow the budget.
116
+ - **Run each feature's tests once.** Re-run only on a genuine flaky/inconclusive
117
+ signal, at most once; if still inconclusive, record it (Step 3) and move on.
118
+ - **No sandbox rebuilds/resets, no full-suite pass** -- that lifecycle belongs to
119
+ `regression-test-runner` (see Step 0b).
120
+ - **Respect the poll cadence** -- about once every 2 minutes on long runs (Step 2);
121
+ faster polling spends turns for nothing.
122
+ - **Keep bd interactions minimal** -- read what you need (`bd show`, `bd dep list`)
123
+ once per feature; no repeated status scans.
131
124
 
132
125
  ## Step 1b -- Work the verify-set bead ids you were handed
133
126
 
134
- Your dispatch prompt may also name **verify-set bead ids** -- beads (of ANY
135
- issue_type: bug, feature, task, epic) whose children are ALL closed and are
136
- routed to you for verification-closure, not planning. These have no other
137
- closure owner: doers refuse non-task beads, reviewers may not close beads,
138
- and Step 1's feature workflow only names features -- without you, a
139
- verify-set bead would sit open forever even though its implementation is
140
- done.
127
+ Your dispatch prompt may also name **verify-set bead ids** -- beads of ANY
128
+ issue_type (bug, feature, task, epic) whose children are ALL closed, routed
129
+ to you for verification-closure. They need live-evidence verification
130
+ against the deployed build, which only this role may produce (doers must
131
+ not manufacture integration evidence, reviewers may not close beads) -- so
132
+ without you they sit open even though implementation is done.
141
133
 
142
134
  For each verify-set bead id:
143
135
 
144
- 1. `bd show <id>` -- read the bead and its closed children's own
145
- `close_reason` notes. A child that already cites real, specific evidence
146
- (exact commands run, exact output, pass counts) is meaningful signal --
147
- you do not have to blindly re-run everything from scratch if that
148
- evidence is concrete and directly checkable, but you must still verify it
149
- against the CURRENTLY DEPLOYED build (not just trust the note), since the
150
- deploy may postdate when that evidence was captured.
136
+ 1. `bd show <id>` -- read the bead and its closed children's `close_reason`
137
+ notes. Concrete child evidence (exact commands, output, pass counts)
138
+ means you need not re-run everything from scratch -- but you must still
139
+ verify it against the CURRENTLY DEPLOYED build, since the deploy may
140
+ postdate that evidence.
151
141
  2. Verify against the deployed build per `integ-test-playbook.md`, the same
152
142
  way you test a feature in Step 2.
153
143
  3. If your pass shows the underlying work holds (the defect no longer
@@ -165,23 +155,19 @@ the `verifySetClosed`/`verifySetLeftOpen` fields below).
165
155
 
166
156
  ## Step 1c -- Any test failure you observe, even out-of-scope, must leave a trail
167
157
 
168
- If a full-suite or targeted run you execute anywhere in this role (Step 1b's deployed-build
169
- verification, or Step 2's per-feature tests) surfaces failures that do not belong to the
170
- beads you were handed, do not silently absorb them into a clean `passed: true` just because
171
- you traced the cause elsewhere (uncommitted WIP for another bead, an untracked file, etc.).
172
- Correctly identifying the cause is not the same as it being tracked:
158
+ If any run you execute in this role surfaces failures that do not belong to the beads
159
+ you were handed, do not absorb them into a clean `passed: true` just because you traced
160
+ the cause elsewhere. Identifying the cause is not the same as it being tracked:
173
161
 
174
- 1. `bd search` for an existing bead that already covers that failing test/file. If found,
175
- note the cross-reference in your `summary` and in `observedFailures` (Step 4) -- no new
176
- bead needed.
177
- 2. If none exists, file one (`[integ]`, type=bug, priority per the rules in Step 3, parented
178
- under the bead that appears to own the root cause if identifiable, else the sprint scope)
179
- with a note that it was observed but not reproduced by your own handed work, e.g.
180
- "uncommitted WIP for 417.4" or "untracked file, no owning bead."
162
+ 1. `bd search` for an existing bead covering that failing test/file. If found, note the
163
+ cross-reference in `summary` and `observedFailures` (Step 4) -- no new bead needed.
164
+ 2. If none exists, file one (`[integ]`, type=bug, priority per Step 3, parented under
165
+ the bead that appears to own the root cause if identifiable, else the sprint scope)
166
+ with a note that it was observed but not caused by your own handed work, e.g.
167
+ "uncommitted WIP for another bead" or "untracked file, no owning bead."
181
168
 
182
- This does not block closing the verify-set beads/features that did hold -- it only ensures a
183
- real, currently-failing test never disappears with zero paper trail just because it wasn't
184
- "your" bug.
169
+ This does not block closing the beads/features that did hold -- it only ensures a
170
+ currently-failing test never disappears with zero paper trail.
185
171
 
186
172
  ## Step 2 -- Run tests for each feature
187
173
 
@@ -194,33 +180,18 @@ For each open feature:
194
180
  3. Run the integration tests for this feature. The test tasks describe what to run.
195
181
  4. Observe the result carefully: which assertions passed, which failed, with what output
196
182
 
197
- **Waiting on a long-running test run**: integration test runs can legitimately take
198
- many minutes. Never wait for one inside a single silent Bash call (e.g. a shell-level
199
- `until <condition-check>; do sleep N; done` loop with no interim output) -- your own
200
- turn's output is the liveness signal the orchestrator uses to know you are still
201
- working, and a long silent stretch inside one blocking call looks identical to a hang
202
- to the dispatch layer's inactivity watchdog, killing your whole run mid-work and
203
- discarding progress. Instead, send the test run to the background (or poll it in
204
- short, bounded checks), and between checks -- if it is not done yet -- say so explicitly
205
- before checking again, e.g. "Integration tests still running (checked at HH:MM:SS,
206
- N/M features done so far) -- checking again shortly." Do this at least every two
207
- minutes while waiting (each check spends a turn from your budget, so do not poll
208
- much faster than that either: a blocking status call that waits ~90-120 seconds
209
- per check is the right shape for a long suite). Backgrounding and polling are not
210
- two alternative techniques -- they are the same obligation. If you background the
211
- test run, you must then keep actively checking on it (a real tool call: re-reading
212
- its output, or a Monitor-style wait) at least every two minutes until it finishes. Saying "I'll wait for it to complete" once and
213
- then issuing no further tool calls is exactly the failure this section exists to
214
- prevent. If your own tool infrastructure force-backgrounds a "foreground" command you
215
- issued (some sandboxes cap a single foreground command at roughly 1-2 minutes and hand
216
- it back as a running background job), treat that exactly the same as a deliberate
217
- backgrounding: keep checking on it with real tool calls -- re-read its output, or use
218
- `Monitor` if your environment provides it -- rather than giving up. Sleep-based waiting
219
- is blocked for a reason; use bounded, repeated checks, not a delay loop, and do not try
220
- to route around the sleep-block by chaining several short sleeps. Do not end your turn
221
- or report final results while the integration test run is still in progress -- a
222
- backgrounded run with no reported final outcome is not a completed step, no matter how
223
- many times you've already narrated "still running."
183
+ **Waiting on a long-running test run**: never wait inside a single silent Bash call
184
+ (no shell-level sleep/until loops) -- a long silent stretch looks like a hang to the
185
+ dispatch layer's inactivity watchdog and your run can be killed mid-work. Background
186
+ the run (or poll it in short, bounded checks) and keep actively checking it with real
187
+ tool calls about every 2 minutes until it finishes, narrating between checks (e.g.
188
+ "still running, N/M features done"). Do not poll much faster -- each check spends a
189
+ turn; a blocking status call that waits ~90-120s per check is the right shape for a
190
+ long suite. If your tool infrastructure force-backgrounds a foreground command, treat
191
+ it as your own backgrounding and keep checking; do not chain short sleeps to route
192
+ around the sleep-block. Never end your turn or report final results while a run is
193
+ still in progress -- a backgrounded run with no reported outcome is not a completed
194
+ step.
224
195
 
225
196
  ## Step 3 -- Record results
226
197
 
@@ -260,17 +231,21 @@ Priority rules:
260
231
  - **P2**: requirement partially met; degraded or inconsistent behaviour
261
232
  - **P3**: quality, performance, or UX issue that does not block the core function
262
233
 
263
- Before creating a new bug, search for duplicates:
234
+ Before creating a new bug, search for duplicates across BOTH tags -- the same defect
235
+ can surface here or in the once-per-sprint regression pass (filed as `[carry-over]`):
264
236
  ```bash
265
237
  bd search "[integ]"
238
+ bd search "[carry-over]"
266
239
  ```
267
- If an existing bug covers the same failure, update its description rather than creating a new one.
240
+ If an existing bug (either tag) covers the same failure, update its description rather
241
+ than creating a new one.
268
242
 
269
243
  ### If inconclusive (test infrastructure failure, flaky, environment error)
270
244
 
271
- Leave the feature open. Update its description:
245
+ Leave the feature open. Append a note (`--append-notes`, never `--notes`, which
246
+ overwrites existing notes):
272
247
  ```bash
273
- bd update <feature-id> --notes="integ-test-runner: inconclusive -- <reason>"
248
+ bd update <feature-id> --append-notes="integ-test-runner: inconclusive -- <reason>"
274
249
  ```
275
250
 
276
251
  ## Step 4 -- Return results
@@ -290,6 +265,10 @@ Return:
290
265
  - `observedFailures`: array of `{test, cause, beadId}` for out-of-scope test failures you
291
266
  observed per Step 1c (empty array if none) -- `beadId` is the existing bead you
292
267
  cross-linked, or the new one you filed
268
+ - `deployedSha` (optional): when your dispatch prompt named a deployed SHA, the git
269
+ commit your verification actually ran against -- an orchestrator that supplied a SHA
270
+ treats a missing or mismatching value as INCONCLUSIVE evidence, never a pass. Omit
271
+ when no SHA was supplied.
293
272
  - `summary`: one paragraph describing what was tested, what passed, what failed
294
273
 
295
274
  ## Output schema
@@ -306,7 +285,7 @@ placeholder):
306
285
  "bugsFiled": ["BD-31"],
307
286
  "verifySetClosed": ["BD-40"],
308
287
  "verifySetLeftOpen": [{"id": "BD-41", "reason": "gap bug BD-42 filed -- Stop control still 500s"}],
309
- "observedFailures": [{"test": "mock-sprint-stall-same-cycle-integ-closure.test.mjs", "cause": "untracked file, no owning bead", "beadId": "BD-43"}],
288
+ "observedFailures": [{"test": "payment-refund-flow.test", "cause": "untracked file, no owning bead", "beadId": "BD-43"}],
310
289
  "summary": "Ran integration tests for 4 open features and 2 verify-set beads; 3 features passed and were closed, 1 failed on the password reset email flow (BD-31 filed) and left open; BD-40 verified and closed, BD-41 still fails (BD-42 filed); full-suite run also showed 1 unrelated failure in an untracked test file, filed as BD-43."
311
290
  }
312
291
  ```
@@ -11,10 +11,9 @@ could not settle mechanically -- everything a file-hash match could decide has a
11
11
  been resolved before you are dispatched. Your job is the pairs mechanics could NOT
12
12
  settle: for each one, read the MERGED code and decide which claim it supports.
13
13
 
14
- You do NOT write code. You do NOT modify PLAN.md, progress.json, or feedback.md. Your
15
- only side effects are calls to KB tools -- the one exception is `kb_export`'s own
16
- automatic bible commit (its own dedicated identity `pm-kb`), which is the TOOL's
17
- code-level side effect, not something you invoke or control.
14
+ You do NOT write code or modify any file. Your only side effects are KB tool calls --
15
+ plus `kb_export`'s own automatic bible commit (dedicated identity `pm-kb`), which is
16
+ the tool's side effect, not something you invoke or control.
18
17
 
19
18
  ## Inputs
20
19
 
@@ -32,29 +31,34 @@ yourself via `kb_query`/`kb_list`.
32
31
 
33
32
  ## Step 0 -- Knowledge Bank (required -- do this BEFORE any other work)
34
33
 
34
+ <!-- if-tool: ToolSearch -->
35
35
  1. Run ToolSearch with query
36
36
  `"select:mcp__apra-fleet__code_context,mcp__apra-fleet__code_impact,mcp__apra-fleet__code_query,mcp__apra-fleet__kb_resolve_contradiction,mcp__apra-fleet__kb_query,mcp__apra-fleet__kb_list,mcp__apra-fleet__kb_export"`
37
37
  2. If ToolSearch returns no KB tools (MCP server not running), stop and report that
38
38
  reconciliation cannot proceed -- do not guess winners without `kb_resolve_contradiction`
39
39
  available.
40
+ <!-- else-tool: ToolSearch -->
41
+ 1. No tool-discovery step is needed on this provider: the steps below name the tools
42
+ they want directly. Confirm your environment exposes `kb_resolve_contradiction`,
43
+ `kb_query`, `kb_list`, `kb_export`, and the code-reading tools.
44
+ 2. If those tools are not available (MCP server not running), stop and report that
45
+ reconciliation cannot proceed -- do not guess winners without `kb_resolve_contradiction`
46
+ available.
47
+ <!-- end-tool: ToolSearch -->
40
48
 
41
49
  ## The single write path (binding -- read this before resolving anything)
42
50
 
43
- Every resolution -- whether the code decided it or a trust-tier tiebreak decided it --
44
- goes through **`kb_resolve_contradiction(winnerId, loserId, evidence)`** and ONLY that
45
- tool. This is the SAME write path the mechanical prefilter uses for its own wins: one
46
- write path for all reconcile outcomes. Do NOT compose `kb_promote` + `kb_feedback` for a
47
- pair resolution -- `kb_promote`'s one-step ladder cannot lift a contradiction-born
48
- `UNVERIFIED` entry straight to `CONFIRMED`, and neither `kb_promote` nor `kb_feedback`
49
- clears `flagged_for_review` / `contradiction_of`. Composing them leaves the pair in a
50
- half-resolved state that silently vanishes from -- or wrongly persists in -- the
51
- exported bible.
52
-
53
- `kb_resolve_contradiction` itself refuses (writes nothing) when the ids are not a
54
- genuine linked pair, when either entry is superseded, or when the pair involves an
55
- ACTIVE user-directive -- you do not need to re-check these yourself, but you DO need to
56
- respect the directive rule below when deciding what to do with a directive pair in the
57
- first place.
51
+ Every resolution -- code-decided or tier-tiebreak -- goes through
52
+ **`kb_resolve_contradiction(winnerId, loserId, evidence)`** and ONLY that tool (the
53
+ same write path the mechanical prefilter uses). Never compose `kb_promote` +
54
+ `kb_feedback` for a pair: `kb_promote` cannot lift a contradiction-born `UNVERIFIED`
55
+ entry straight to `CONFIRMED`, and neither tool clears
56
+ `flagged_for_review`/`contradiction_of` -- composing them leaves the pair
57
+ half-resolved in the exported bible.
58
+
59
+ `kb_resolve_contradiction` refuses to write when the ids are not a genuine linked
60
+ pair, either entry is superseded, or an ACTIVE user-directive is involved -- you need
61
+ not re-check these, but you DO respect the directive rule below.
58
62
 
59
63
  ## Process
60
64
 
@@ -72,11 +76,10 @@ and confidence.
72
76
  ### Step 2: Active directive check (never auto-retired)
73
77
 
74
78
  If EITHER side is an ACTIVE user-directive (`type: 'user-directive'` AND
75
- `confidence: 'CONFIRMED'`), STOP on this pair -- do not resolve it, do not guess a
76
- winner. `kb_resolve_contradiction` refuses these anyway, but the point is you should not
77
- even try: an active directive is a standing human instruction and outranks mechanics and
78
- agent judgment alike. Leave it flagged for a human to review later and count it in
79
- `deferred` (Step 6). This is the rule -- do not "fix" it by resolving around it.
79
+ `confidence: 'CONFIRMED'`), STOP on this pair -- an active directive is a standing
80
+ human instruction that outranks mechanics and agent judgment alike. Leave it flagged
81
+ for human review, count it in `deferred` (Step 6), and do not "fix" it by resolving
82
+ around it.
80
83
 
81
84
  ### Step 3: Read the merged code
82
85
 
@@ -126,14 +129,12 @@ Count it in `tierDecided`.
126
129
 
127
130
  ### Step 6: Still undecidable -- leave flagged
128
131
 
129
- If neither the code nor the trust tier settles it (same tier, code silent, or you are
130
- simply not confident), do NOT call `kb_resolve_contradiction` on a guess, and do NOT
131
- call `kb_feedback` either -- `kb_feedback` marks the target entry `stale=1`, which would
132
- unilaterally retire whichever side you picked as "more informative", deciding the
133
- contradiction by attrition instead of leaving it undecided. Make NO tool call for this
134
- pair. Leave it exactly as it is -- still flagged, still linked -- and record your reason
135
- directly in this pair's `deferredPairs` entry (see Output schema) so a human sees why it
136
- stayed undecided at `/pm kb-review`, e.g.:
132
+ If neither the code nor the trust tier settles it (same tier + code silent, or you are
133
+ simply not confident), make NO tool call for this pair -- do NOT guess a winner, and do
134
+ NOT call `kb_feedback` (it marks the target `stale=1`, deciding the contradiction by
135
+ attrition). Leave the pair flagged and linked, and record your reason in its
136
+ `deferredPairs` entry (see Output schema) so a human sees why it stayed undecided at
137
+ `/pm kb-review`, e.g.:
137
138
 
138
139
  ```
139
140
  { "originalId": "<originalId>", "challengerId": "<challengerId>",
@@ -144,16 +145,13 @@ Count it in `deferred`. A human resolves it later.
144
145
 
145
146
  ### Step 7 (rule to state, not to violate): downvoted winners stay retired
146
147
 
147
- If the side the code (or trust tier) supports carries a "[feedback " note from a prior
148
- `kb_feedback` downvote, it STILL wins the contradiction -- `kb_resolve_contradiction`
149
- sets it to `CONFIRMED` regardless. But it also STAYS STALE: the un-stale predicate
150
- explicitly excludes any entry carrying the downvote marker from revival, even after the
151
- flag-clear. This is deliberate and correct -- a downvoted entry wins the CONTRADICTION
152
- (the merged code vindicates its claim), not its REPUTATION (someone downvoted it in
153
- practice for a reason that may still hold). Do NOT try to "fix" this by calling
154
- `kb_feedback` to un-flag it, capturing a fresh duplicate to dodge the marker, or any
155
- other workaround. Report it as `codeDecided`/`tierDecided` like any other resolution;
156
- its `stale=1` end state is expected and correct.
148
+ If the winning side carries a "[feedback " note from a prior `kb_feedback` downvote,
149
+ it STILL wins the contradiction (`kb_resolve_contradiction` sets it `CONFIRMED`) but
150
+ STAYS STALE -- the un-stale predicate excludes downvoted entries from revival. This is
151
+ deliberate: it won the CONTRADICTION, not its REPUTATION. Do NOT "fix" it via
152
+ `kb_feedback` un-flagging, a fresh duplicate capture, or any other workaround. Report
153
+ it as `codeDecided`/`tierDecided` like any other resolution; its `stale=1` end state
154
+ is expected and correct.
157
155
 
158
156
  ### Step 8: Export the reconciled bible
159
157