@apralabs/apra-fleet 0.3.6 → 0.4.1

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 (826) hide show
  1. package/README.md +378 -252
  2. package/dist/agents/backlog-groomer.md +303 -0
  3. package/dist/agents/ci-watcher.md +13 -1
  4. package/dist/agents/deployer.md +66 -13
  5. package/dist/agents/doer.md +67 -8
  6. package/dist/agents/harvester.md +22 -3
  7. package/dist/agents/integ-test-runner.md +166 -60
  8. package/dist/agents/kb-reconciler.md +216 -0
  9. package/dist/agents/plan-reviewer.md +88 -18
  10. package/dist/agents/planner.md +182 -19
  11. package/dist/agents/regression-test-runner.md +234 -0
  12. package/dist/agents/reviewer.md +125 -9
  13. package/dist/agents/schemas/backlog-groomer-input.json +35 -0
  14. package/dist/agents/schemas/backlog-groomer-output.json +164 -0
  15. package/dist/agents/schemas/doer-output.json +63 -3
  16. package/dist/agents/schemas/harvester-output.json +59 -2
  17. package/dist/agents/schemas/integ-test-runner-output.json +34 -0
  18. package/dist/agents/schemas/kb-reconciler-output.json +87 -0
  19. package/dist/agents/schemas/planner-output.json +65 -0
  20. package/dist/agents/schemas/regression-test-runner-input.json +15 -0
  21. package/dist/agents/schemas/regression-test-runner-output.json +50 -0
  22. package/dist/agents/schemas/reviewer-output.json +108 -7
  23. package/dist/cli/agent-transform.d.ts +1 -0
  24. package/dist/cli/agent-transform.d.ts.map +1 -1
  25. package/dist/cli/agent-transform.js +77 -0
  26. package/dist/cli/agent-transform.js.map +1 -1
  27. package/dist/cli/auth.d.ts +3 -0
  28. package/dist/cli/auth.d.ts.map +1 -1
  29. package/dist/cli/auth.js +181 -5
  30. package/dist/cli/auth.js.map +1 -1
  31. package/dist/cli/config.d.ts +5 -1
  32. package/dist/cli/config.d.ts.map +1 -1
  33. package/dist/cli/config.js +7 -1
  34. package/dist/cli/config.js.map +1 -1
  35. package/dist/cli/dolt-install.d.ts +91 -0
  36. package/dist/cli/dolt-install.d.ts.map +1 -0
  37. package/dist/cli/dolt-install.js +334 -0
  38. package/dist/cli/dolt-install.js.map +1 -0
  39. package/dist/cli/install-guard.d.ts +29 -0
  40. package/dist/cli/install-guard.d.ts.map +1 -0
  41. package/dist/cli/install-guard.js +153 -0
  42. package/dist/cli/install-guard.js.map +1 -0
  43. package/dist/cli/install.d.ts +45 -3
  44. package/dist/cli/install.d.ts.map +1 -1
  45. package/dist/cli/install.js +736 -109
  46. package/dist/cli/install.js.map +1 -1
  47. package/dist/cli/join.d.ts +12 -0
  48. package/dist/cli/join.d.ts.map +1 -0
  49. package/dist/cli/join.js +87 -0
  50. package/dist/cli/join.js.map +1 -0
  51. package/dist/cli/kb-commit.d.ts +12 -0
  52. package/dist/cli/kb-commit.d.ts.map +1 -0
  53. package/dist/cli/kb-commit.js +53 -0
  54. package/dist/cli/kb-commit.js.map +1 -0
  55. package/dist/cli/kb-directives.d.ts +17 -0
  56. package/dist/cli/kb-directives.d.ts.map +1 -0
  57. package/dist/cli/kb-directives.js +146 -0
  58. package/dist/cli/kb-directives.js.map +1 -0
  59. package/dist/cli/kb-import.d.ts +13 -0
  60. package/dist/cli/kb-import.d.ts.map +1 -0
  61. package/dist/cli/kb-import.js +56 -0
  62. package/dist/cli/kb-import.js.map +1 -0
  63. package/dist/cli/register-member.d.ts +2 -0
  64. package/dist/cli/register-member.d.ts.map +1 -0
  65. package/dist/cli/register-member.js +193 -0
  66. package/dist/cli/register-member.js.map +1 -0
  67. package/dist/cli/restart.d.ts +2 -0
  68. package/dist/cli/restart.d.ts.map +1 -0
  69. package/dist/cli/restart.js +7 -0
  70. package/dist/cli/restart.js.map +1 -0
  71. package/dist/cli/spoke.d.ts +35 -0
  72. package/dist/cli/spoke.d.ts.map +1 -0
  73. package/dist/cli/spoke.js +212 -0
  74. package/dist/cli/spoke.js.map +1 -0
  75. package/dist/cli/start.d.ts +2 -0
  76. package/dist/cli/start.d.ts.map +1 -0
  77. package/dist/cli/start.js +92 -0
  78. package/dist/cli/start.js.map +1 -0
  79. package/dist/cli/status.d.ts +2 -0
  80. package/dist/cli/status.d.ts.map +1 -0
  81. package/dist/cli/status.js +83 -0
  82. package/dist/cli/status.js.map +1 -0
  83. package/dist/cli/stop.d.ts +2 -0
  84. package/dist/cli/stop.d.ts.map +1 -0
  85. package/dist/cli/stop.js +51 -0
  86. package/dist/cli/stop.js.map +1 -0
  87. package/dist/cli/uninstall.d.ts.map +1 -1
  88. package/dist/cli/uninstall.js +120 -9
  89. package/dist/cli/uninstall.js.map +1 -1
  90. package/dist/cli/update.d.ts.map +1 -1
  91. package/dist/cli/update.js +10 -1
  92. package/dist/cli/update.js.map +1 -1
  93. package/dist/cli/watch.d.ts +53 -4
  94. package/dist/cli/watch.d.ts.map +1 -1
  95. package/dist/cli/watch.js +118 -17
  96. package/dist/cli/watch.js.map +1 -1
  97. package/dist/cli/workflow-assets.d.ts +37 -0
  98. package/dist/cli/workflow-assets.d.ts.map +1 -0
  99. package/dist/cli/workflow-assets.js +144 -0
  100. package/dist/cli/workflow-assets.js.map +1 -0
  101. package/dist/cli/workflow.d.ts +75 -0
  102. package/dist/cli/workflow.d.ts.map +1 -0
  103. package/dist/cli/workflow.js +397 -0
  104. package/dist/cli/workflow.js.map +1 -0
  105. package/dist/commands/kb-server.d.ts +8 -0
  106. package/dist/commands/kb-server.d.ts.map +1 -0
  107. package/dist/commands/kb-server.js +221 -0
  108. package/dist/commands/kb-server.js.map +1 -0
  109. package/dist/hub-service/activity.d.ts +30 -0
  110. package/dist/hub-service/activity.d.ts.map +1 -0
  111. package/dist/hub-service/activity.js +20 -0
  112. package/dist/hub-service/activity.js.map +1 -0
  113. package/dist/hub-service/audit-log.d.ts +19 -0
  114. package/dist/hub-service/audit-log.d.ts.map +1 -0
  115. package/dist/hub-service/audit-log.js +13 -0
  116. package/dist/hub-service/audit-log.js.map +1 -0
  117. package/dist/hub-service/db/pool.d.ts +19 -0
  118. package/dist/hub-service/db/pool.d.ts.map +1 -0
  119. package/dist/hub-service/db/pool.js +53 -0
  120. package/dist/hub-service/db/pool.js.map +1 -0
  121. package/dist/hub-service/enrollment.d.ts +29 -0
  122. package/dist/hub-service/enrollment.d.ts.map +1 -0
  123. package/dist/hub-service/enrollment.js +48 -0
  124. package/dist/hub-service/enrollment.js.map +1 -0
  125. package/dist/hub-service/envelope-routes.d.ts +46 -0
  126. package/dist/hub-service/envelope-routes.d.ts.map +1 -0
  127. package/dist/hub-service/envelope-routes.js +94 -0
  128. package/dist/hub-service/envelope-routes.js.map +1 -0
  129. package/dist/hub-service/handlers/installers.d.ts +14 -0
  130. package/dist/hub-service/handlers/installers.d.ts.map +1 -0
  131. package/dist/hub-service/handlers/installers.js +8 -0
  132. package/dist/hub-service/handlers/installers.js.map +1 -0
  133. package/dist/hub-service/http-server.d.ts +31 -0
  134. package/dist/hub-service/http-server.d.ts.map +1 -0
  135. package/dist/hub-service/http-server.js +711 -0
  136. package/dist/hub-service/http-server.js.map +1 -0
  137. package/dist/hub-service/hub-jwt.d.ts +30 -0
  138. package/dist/hub-service/hub-jwt.d.ts.map +1 -0
  139. package/dist/hub-service/hub-jwt.js +105 -0
  140. package/dist/hub-service/hub-jwt.js.map +1 -0
  141. package/dist/hub-service/jwt-revocation.d.ts +20 -0
  142. package/dist/hub-service/jwt-revocation.d.ts.map +1 -0
  143. package/dist/hub-service/jwt-revocation.js +18 -0
  144. package/dist/hub-service/jwt-revocation.js.map +1 -0
  145. package/dist/hub-service/machines.d.ts +16 -0
  146. package/dist/hub-service/machines.d.ts.map +1 -0
  147. package/dist/hub-service/machines.js +14 -0
  148. package/dist/hub-service/machines.js.map +1 -0
  149. package/dist/hub-service/main.d.ts +3 -0
  150. package/dist/hub-service/main.d.ts.map +1 -0
  151. package/dist/hub-service/main.js +64 -0
  152. package/dist/hub-service/main.js.map +1 -0
  153. package/dist/hub-service/member-tokens.d.ts +11 -0
  154. package/dist/hub-service/member-tokens.d.ts.map +1 -0
  155. package/dist/hub-service/member-tokens.js +49 -0
  156. package/dist/hub-service/member-tokens.js.map +1 -0
  157. package/dist/hub-service/member-view.d.ts +20 -0
  158. package/dist/hub-service/member-view.d.ts.map +1 -0
  159. package/dist/hub-service/member-view.js +76 -0
  160. package/dist/hub-service/member-view.js.map +1 -0
  161. package/dist/hub-service/members.d.ts +44 -0
  162. package/dist/hub-service/members.d.ts.map +1 -0
  163. package/dist/hub-service/members.js +25 -0
  164. package/dist/hub-service/members.js.map +1 -0
  165. package/dist/hub-service/presence.d.ts +40 -0
  166. package/dist/hub-service/presence.d.ts.map +1 -0
  167. package/dist/hub-service/presence.js +44 -0
  168. package/dist/hub-service/presence.js.map +1 -0
  169. package/dist/hub-service/project-view.d.ts +12 -0
  170. package/dist/hub-service/project-view.d.ts.map +1 -0
  171. package/dist/hub-service/project-view.js +34 -0
  172. package/dist/hub-service/project-view.js.map +1 -0
  173. package/dist/hub-service/projects.d.ts +48 -0
  174. package/dist/hub-service/projects.d.ts.map +1 -0
  175. package/dist/hub-service/projects.js +80 -0
  176. package/dist/hub-service/projects.js.map +1 -0
  177. package/dist/hub-service/relay-queue.d.ts +115 -0
  178. package/dist/hub-service/relay-queue.d.ts.map +1 -0
  179. package/dist/hub-service/relay-queue.js +148 -0
  180. package/dist/hub-service/relay-queue.js.map +1 -0
  181. package/dist/hub-service/session-jwt.d.ts +10 -0
  182. package/dist/hub-service/session-jwt.d.ts.map +1 -0
  183. package/dist/hub-service/session-jwt.js +69 -0
  184. package/dist/hub-service/session-jwt.js.map +1 -0
  185. package/dist/hub-service/usage.d.ts +40 -0
  186. package/dist/hub-service/usage.d.ts.map +1 -0
  187. package/dist/hub-service/usage.js +25 -0
  188. package/dist/hub-service/usage.js.map +1 -0
  189. package/dist/hub-service/users.d.ts +56 -0
  190. package/dist/hub-service/users.d.ts.map +1 -0
  191. package/dist/hub-service/users.js +72 -0
  192. package/dist/hub-service/users.js.map +1 -0
  193. package/dist/hub-service/workspaces.d.ts +20 -0
  194. package/dist/hub-service/workspaces.d.ts.map +1 -0
  195. package/dist/hub-service/workspaces.js +10 -0
  196. package/dist/hub-service/workspaces.js.map +1 -0
  197. package/dist/index.js +254 -132
  198. package/dist/index.js.map +1 -1
  199. package/dist/os/linux.d.ts +14 -0
  200. package/dist/os/linux.d.ts.map +1 -1
  201. package/dist/os/linux.js +80 -4
  202. package/dist/os/linux.js.map +1 -1
  203. package/dist/os/os-commands.d.ts +15 -0
  204. package/dist/os/os-commands.d.ts.map +1 -1
  205. package/dist/os/windows.d.ts +36 -0
  206. package/dist/os/windows.d.ts.map +1 -1
  207. package/dist/os/windows.js +74 -18
  208. package/dist/os/windows.js.map +1 -1
  209. package/dist/paths.d.ts +23 -0
  210. package/dist/paths.d.ts.map +1 -1
  211. package/dist/paths.js +29 -0
  212. package/dist/paths.js.map +1 -1
  213. package/dist/providers/agy.d.ts +20 -2
  214. package/dist/providers/agy.d.ts.map +1 -1
  215. package/dist/providers/agy.js +259 -21
  216. package/dist/providers/agy.js.map +1 -1
  217. package/dist/providers/claude.d.ts +16 -2
  218. package/dist/providers/claude.d.ts.map +1 -1
  219. package/dist/providers/claude.js +283 -16
  220. package/dist/providers/claude.js.map +1 -1
  221. package/dist/providers/codex.d.ts +13 -2
  222. package/dist/providers/codex.d.ts.map +1 -1
  223. package/dist/providers/codex.js +36 -6
  224. package/dist/providers/codex.js.map +1 -1
  225. package/dist/providers/copilot.d.ts +13 -2
  226. package/dist/providers/copilot.d.ts.map +1 -1
  227. package/dist/providers/copilot.js +34 -7
  228. package/dist/providers/copilot.js.map +1 -1
  229. package/dist/providers/email/headers.d.ts +15 -0
  230. package/dist/providers/email/headers.d.ts.map +1 -0
  231. package/dist/providers/email/headers.js +42 -0
  232. package/dist/providers/email/headers.js.map +1 -0
  233. package/dist/providers/email/index.d.ts +18 -0
  234. package/dist/providers/email/index.d.ts.map +1 -0
  235. package/dist/providers/email/index.js +60 -0
  236. package/dist/providers/email/index.js.map +1 -0
  237. package/dist/providers/email/provider.d.ts +49 -0
  238. package/dist/providers/email/provider.d.ts.map +1 -0
  239. package/dist/providers/email/provider.js +2 -0
  240. package/dist/providers/email/provider.js.map +1 -0
  241. package/dist/providers/email/sendgrid.d.ts +12 -0
  242. package/dist/providers/email/sendgrid.d.ts.map +1 -0
  243. package/dist/providers/email/sendgrid.js +67 -0
  244. package/dist/providers/email/sendgrid.js.map +1 -0
  245. package/dist/providers/email/smtp.d.ts +65 -0
  246. package/dist/providers/email/smtp.d.ts.map +1 -0
  247. package/dist/providers/email/smtp.js +373 -0
  248. package/dist/providers/email/smtp.js.map +1 -0
  249. package/dist/providers/gemini.d.ts +13 -2
  250. package/dist/providers/gemini.d.ts.map +1 -1
  251. package/dist/providers/gemini.js +49 -5
  252. package/dist/providers/gemini.js.map +1 -1
  253. package/dist/providers/index.d.ts +1 -0
  254. package/dist/providers/index.d.ts.map +1 -1
  255. package/dist/providers/index.js +3 -0
  256. package/dist/providers/index.js.map +1 -1
  257. package/dist/providers/none.d.ts +61 -0
  258. package/dist/providers/none.d.ts.map +1 -0
  259. package/dist/providers/none.js +124 -0
  260. package/dist/providers/none.js.map +1 -0
  261. package/dist/providers/opencode.d.ts +14 -2
  262. package/dist/providers/opencode.d.ts.map +1 -1
  263. package/dist/providers/opencode.js +104 -4
  264. package/dist/providers/opencode.js.map +1 -1
  265. package/dist/providers/provider.d.ts +156 -1
  266. package/dist/providers/provider.d.ts.map +1 -1
  267. package/dist/providers/provider.js +54 -0
  268. package/dist/providers/provider.js.map +1 -1
  269. package/dist/services/agent-provisioner.d.ts +3 -3
  270. package/dist/services/agent-provisioner.d.ts.map +1 -1
  271. package/dist/services/agent-provisioner.js +11 -7
  272. package/dist/services/agent-provisioner.js.map +1 -1
  273. package/dist/services/auth-socket.d.ts.map +1 -1
  274. package/dist/services/auth-socket.js +2 -0
  275. package/dist/services/auth-socket.js.map +1 -1
  276. package/dist/services/budget-awareness.d.ts +130 -0
  277. package/dist/services/budget-awareness.d.ts.map +1 -0
  278. package/dist/services/budget-awareness.js +129 -0
  279. package/dist/services/budget-awareness.js.map +1 -0
  280. package/dist/services/cloud/lifecycle.d.ts.map +1 -1
  281. package/dist/services/cloud/lifecycle.js +3 -0
  282. package/dist/services/cloud/lifecycle.js.map +1 -1
  283. package/dist/services/cloud/task-wrapper.d.ts +18 -0
  284. package/dist/services/cloud/task-wrapper.d.ts.map +1 -1
  285. package/dist/services/cloud/task-wrapper.js +157 -0
  286. package/dist/services/cloud/task-wrapper.js.map +1 -1
  287. package/dist/services/cloud-sync.d.ts +35 -0
  288. package/dist/services/cloud-sync.d.ts.map +1 -0
  289. package/dist/services/cloud-sync.js +90 -0
  290. package/dist/services/cloud-sync.js.map +1 -0
  291. package/dist/services/context-admission.d.ts +82 -0
  292. package/dist/services/context-admission.d.ts.map +1 -0
  293. package/dist/services/context-admission.js +136 -0
  294. package/dist/services/context-admission.js.map +1 -0
  295. package/dist/services/event-bus.d.ts +27 -0
  296. package/dist/services/event-bus.d.ts.map +1 -0
  297. package/dist/services/event-bus.js +20 -0
  298. package/dist/services/event-bus.js.map +1 -0
  299. package/dist/services/file-chunker.d.ts +38 -0
  300. package/dist/services/file-chunker.d.ts.map +1 -0
  301. package/dist/services/file-chunker.js +63 -0
  302. package/dist/services/file-chunker.js.map +1 -0
  303. package/dist/services/file-transfer-relay.d.ts +55 -0
  304. package/dist/services/file-transfer-relay.d.ts.map +1 -0
  305. package/dist/services/file-transfer-relay.js +115 -0
  306. package/dist/services/file-transfer-relay.js.map +1 -0
  307. package/dist/services/github-app.d.ts.map +1 -1
  308. package/dist/services/github-app.js +12 -2
  309. package/dist/services/github-app.js.map +1 -1
  310. package/dist/services/http-transport.d.ts +25 -0
  311. package/dist/services/http-transport.d.ts.map +1 -0
  312. package/dist/services/http-transport.js +371 -0
  313. package/dist/services/http-transport.js.map +1 -0
  314. package/dist/services/hub-client.d.ts +69 -0
  315. package/dist/services/hub-client.d.ts.map +1 -0
  316. package/dist/services/hub-client.js +217 -0
  317. package/dist/services/hub-client.js.map +1 -0
  318. package/dist/services/jwt.d.ts +17 -0
  319. package/dist/services/jwt.d.ts.map +1 -0
  320. package/dist/services/jwt.js +70 -0
  321. package/dist/services/jwt.js.map +1 -0
  322. package/dist/services/knowledge/audn.d.ts +37 -0
  323. package/dist/services/knowledge/audn.d.ts.map +1 -0
  324. package/dist/services/knowledge/audn.js +219 -0
  325. package/dist/services/knowledge/audn.js.map +1 -0
  326. package/dist/services/knowledge/file-hash.d.ts +11 -0
  327. package/dist/services/knowledge/file-hash.d.ts.map +1 -0
  328. package/dist/services/knowledge/file-hash.js +123 -0
  329. package/dist/services/knowledge/file-hash.js.map +1 -0
  330. package/dist/services/knowledge/http-provider.d.ts +46 -0
  331. package/dist/services/knowledge/http-provider.d.ts.map +1 -0
  332. package/dist/services/knowledge/http-provider.js +254 -0
  333. package/dist/services/knowledge/http-provider.js.map +1 -0
  334. package/dist/services/knowledge/kb-providers.d.ts +15 -0
  335. package/dist/services/knowledge/kb-providers.d.ts.map +1 -0
  336. package/dist/services/knowledge/kb-providers.js +92 -0
  337. package/dist/services/knowledge/kb-providers.js.map +1 -0
  338. package/dist/services/knowledge/kb-scope-input.d.ts +5 -0
  339. package/dist/services/knowledge/kb-scope-input.d.ts.map +1 -0
  340. package/dist/services/knowledge/kb-scope-input.js +11 -0
  341. package/dist/services/knowledge/kb-scope-input.js.map +1 -0
  342. package/dist/services/knowledge/kb-service.d.ts +3 -0
  343. package/dist/services/knowledge/kb-service.d.ts.map +1 -0
  344. package/dist/services/knowledge/kb-service.js +2 -0
  345. package/dist/services/knowledge/kb-service.js.map +1 -0
  346. package/dist/services/knowledge/path-validation.d.ts +2 -0
  347. package/dist/services/knowledge/path-validation.d.ts.map +1 -0
  348. package/dist/services/knowledge/path-validation.js +13 -0
  349. package/dist/services/knowledge/path-validation.js.map +1 -0
  350. package/dist/services/knowledge/pre-init.d.ts +14 -0
  351. package/dist/services/knowledge/pre-init.d.ts.map +1 -0
  352. package/dist/services/knowledge/pre-init.js +147 -0
  353. package/dist/services/knowledge/pre-init.js.map +1 -0
  354. package/dist/services/knowledge/project-slug.d.ts +2 -0
  355. package/dist/services/knowledge/project-slug.d.ts.map +1 -0
  356. package/dist/services/knowledge/project-slug.js +49 -0
  357. package/dist/services/knowledge/project-slug.js.map +1 -0
  358. package/dist/services/knowledge/sqlite-provider.d.ts +147 -0
  359. package/dist/services/knowledge/sqlite-provider.d.ts.map +1 -0
  360. package/dist/services/knowledge/sqlite-provider.js +1646 -0
  361. package/dist/services/knowledge/sqlite-provider.js.map +1 -0
  362. package/dist/services/knowledge/types.d.ts +163 -0
  363. package/dist/services/knowledge/types.d.ts.map +1 -0
  364. package/dist/services/knowledge/types.js +9 -0
  365. package/dist/services/knowledge/types.js.map +1 -0
  366. package/dist/services/known-sessions.d.ts +8 -0
  367. package/dist/services/known-sessions.d.ts.map +1 -0
  368. package/dist/services/known-sessions.js +40 -0
  369. package/dist/services/known-sessions.js.map +1 -0
  370. package/dist/services/member-home.d.ts +89 -0
  371. package/dist/services/member-home.d.ts.map +1 -0
  372. package/dist/services/member-home.js +256 -0
  373. package/dist/services/member-home.js.map +1 -0
  374. package/dist/services/member-remote-url.d.ts +34 -0
  375. package/dist/services/member-remote-url.d.ts.map +1 -0
  376. package/dist/services/member-remote-url.js +39 -0
  377. package/dist/services/member-remote-url.js.map +1 -0
  378. package/dist/services/model-pricing.d.ts +36 -0
  379. package/dist/services/model-pricing.d.ts.map +1 -0
  380. package/dist/services/model-pricing.js +108 -0
  381. package/dist/services/model-pricing.js.map +1 -0
  382. package/dist/services/orphan-recovery.d.ts +59 -0
  383. package/dist/services/orphan-recovery.d.ts.map +1 -0
  384. package/dist/services/orphan-recovery.js +122 -0
  385. package/dist/services/orphan-recovery.js.map +1 -0
  386. package/dist/services/pending-responses.d.ts +23 -0
  387. package/dist/services/pending-responses.d.ts.map +1 -0
  388. package/dist/services/pending-responses.js +52 -0
  389. package/dist/services/pending-responses.js.map +1 -0
  390. package/dist/services/preflight-check.d.ts +56 -0
  391. package/dist/services/preflight-check.d.ts.map +1 -0
  392. package/dist/services/preflight-check.js +277 -0
  393. package/dist/services/preflight-check.js.map +1 -0
  394. package/dist/services/registry.d.ts +4 -1
  395. package/dist/services/registry.d.ts.map +1 -1
  396. package/dist/services/registry.js +3 -0
  397. package/dist/services/registry.js.map +1 -1
  398. package/dist/services/relay-context.d.ts +23 -0
  399. package/dist/services/relay-context.d.ts.map +1 -0
  400. package/dist/services/relay-context.js +8 -0
  401. package/dist/services/relay-context.js.map +1 -0
  402. package/dist/services/relay-executor.d.ts +68 -0
  403. package/dist/services/relay-executor.d.ts.map +1 -0
  404. package/dist/services/relay-executor.js +70 -0
  405. package/dist/services/relay-executor.js.map +1 -0
  406. package/dist/services/relay-request.d.ts +65 -0
  407. package/dist/services/relay-request.d.ts.map +1 -0
  408. package/dist/services/relay-request.js +129 -0
  409. package/dist/services/relay-request.js.map +1 -0
  410. package/dist/services/relay-strategy.d.ts +19 -0
  411. package/dist/services/relay-strategy.d.ts.map +1 -0
  412. package/dist/services/relay-strategy.js +111 -0
  413. package/dist/services/relay-strategy.js.map +1 -0
  414. package/dist/services/service-manager/index.d.ts +5 -0
  415. package/dist/services/service-manager/index.d.ts.map +1 -0
  416. package/dist/services/service-manager/index.js +66 -0
  417. package/dist/services/service-manager/index.js.map +1 -0
  418. package/dist/services/service-manager/linux.d.ts +10 -0
  419. package/dist/services/service-manager/linux.d.ts.map +1 -0
  420. package/dist/services/service-manager/linux.js +97 -0
  421. package/dist/services/service-manager/linux.js.map +1 -0
  422. package/dist/services/service-manager/macos.d.ts +10 -0
  423. package/dist/services/service-manager/macos.d.ts.map +1 -0
  424. package/dist/services/service-manager/macos.js +94 -0
  425. package/dist/services/service-manager/macos.js.map +1 -0
  426. package/dist/services/service-manager/types.d.ts +18 -0
  427. package/dist/services/service-manager/types.d.ts.map +1 -0
  428. package/dist/services/service-manager/types.js +5 -0
  429. package/dist/services/service-manager/types.js.map +1 -0
  430. package/dist/services/service-manager/windows.d.ts +10 -0
  431. package/dist/services/service-manager/windows.d.ts.map +1 -0
  432. package/dist/services/service-manager/windows.js +73 -0
  433. package/dist/services/service-manager/windows.js.map +1 -0
  434. package/dist/services/session-registry.d.ts +70 -0
  435. package/dist/services/session-registry.d.ts.map +1 -0
  436. package/dist/services/session-registry.js +91 -0
  437. package/dist/services/session-registry.js.map +1 -0
  438. package/dist/services/singleton.d.ts +15 -0
  439. package/dist/services/singleton.d.ts.map +1 -0
  440. package/dist/services/singleton.js +98 -0
  441. package/dist/services/singleton.js.map +1 -0
  442. package/dist/services/sprint-coordination.d.ts +168 -0
  443. package/dist/services/sprint-coordination.d.ts.map +1 -0
  444. package/dist/services/sprint-coordination.js +564 -0
  445. package/dist/services/sprint-coordination.js.map +1 -0
  446. package/dist/services/ssh.d.ts.map +1 -1
  447. package/dist/services/ssh.js +70 -3
  448. package/dist/services/ssh.js.map +1 -1
  449. package/dist/services/stall/log-path-resolver.d.ts +11 -8
  450. package/dist/services/stall/log-path-resolver.d.ts.map +1 -1
  451. package/dist/services/stall/log-path-resolver.js +17 -33
  452. package/dist/services/stall/log-path-resolver.js.map +1 -1
  453. package/dist/services/stall/stall-detector.d.ts +32 -0
  454. package/dist/services/stall/stall-detector.d.ts.map +1 -1
  455. package/dist/services/stall/stall-detector.js +187 -12
  456. package/dist/services/stall/stall-detector.js.map +1 -1
  457. package/dist/services/stall/stall-poller.d.ts +50 -0
  458. package/dist/services/stall/stall-poller.d.ts.map +1 -1
  459. package/dist/services/stall/stall-poller.js +268 -18
  460. package/dist/services/stall/stall-poller.js.map +1 -1
  461. package/dist/services/strategy.d.ts.map +1 -1
  462. package/dist/services/strategy.js +57 -7
  463. package/dist/services/strategy.js.map +1 -1
  464. package/dist/services/substitution-engine.d.ts +20 -0
  465. package/dist/services/substitution-engine.d.ts.map +1 -0
  466. package/dist/services/substitution-engine.js +92 -0
  467. package/dist/services/substitution-engine.js.map +1 -0
  468. package/dist/services/task-cleanup.d.ts.map +1 -1
  469. package/dist/services/task-cleanup.js +1 -9
  470. package/dist/services/task-cleanup.js.map +1 -1
  471. package/dist/services/token-issuer.d.ts +47 -0
  472. package/dist/services/token-issuer.d.ts.map +1 -0
  473. package/dist/services/token-issuer.js +63 -0
  474. package/dist/services/token-issuer.js.map +1 -0
  475. package/dist/services/tool-registry.d.ts +3 -0
  476. package/dist/services/tool-registry.d.ts.map +1 -0
  477. package/dist/services/tool-registry.js +225 -0
  478. package/dist/services/tool-registry.js.map +1 -0
  479. package/dist/services/user-config.d.ts +14 -0
  480. package/dist/services/user-config.d.ts.map +1 -1
  481. package/dist/services/user-config.js +55 -0
  482. package/dist/services/user-config.js.map +1 -1
  483. package/dist/services/vcs/github.d.ts.map +1 -1
  484. package/dist/services/vcs/github.js +32 -1
  485. package/dist/services/vcs/github.js.map +1 -1
  486. package/dist/services/vcs/types.d.ts +44 -0
  487. package/dist/services/vcs/types.d.ts.map +1 -1
  488. package/dist/services/version-check.d.ts +22 -0
  489. package/dist/services/version-check.d.ts.map +1 -0
  490. package/dist/services/version-check.js +103 -0
  491. package/dist/services/version-check.js.map +1 -0
  492. package/dist/skills/fleet-sprint-cli/SKILL.md +114 -0
  493. package/dist/skills/pm/beads.md +6 -0
  494. package/dist/skills/pm/cost.md +3 -0
  495. package/dist/skills/pm/doer-reviewer-loop.md +3 -0
  496. package/dist/skills/pm/fleet-addendum.md +6 -0
  497. package/dist/skills/pm/index.md +56 -0
  498. package/dist/skills/pm/kb-reconcile.md +132 -0
  499. package/dist/skills/pm/kb-review.md +109 -0
  500. package/dist/tools/check-status.d.ts +47 -0
  501. package/dist/tools/check-status.d.ts.map +1 -1
  502. package/dist/tools/check-status.js +250 -2
  503. package/dist/tools/check-status.js.map +1 -1
  504. package/dist/tools/child-id-allocator.d.ts +45 -0
  505. package/dist/tools/child-id-allocator.d.ts.map +1 -0
  506. package/dist/tools/child-id-allocator.js +62 -0
  507. package/dist/tools/child-id-allocator.js.map +1 -0
  508. package/dist/tools/cloud-control.d.ts +2 -2
  509. package/dist/tools/code-intelligence-codebase-memory.d.ts +11 -0
  510. package/dist/tools/code-intelligence-codebase-memory.d.ts.map +1 -0
  511. package/dist/tools/code-intelligence-codebase-memory.js +270 -0
  512. package/dist/tools/code-intelligence-codebase-memory.js.map +1 -0
  513. package/dist/tools/code-intelligence-freshness.d.ts +2 -0
  514. package/dist/tools/code-intelligence-freshness.d.ts.map +1 -0
  515. package/dist/tools/code-intelligence-freshness.js +26 -0
  516. package/dist/tools/code-intelligence-freshness.js.map +1 -0
  517. package/dist/tools/code-intelligence-gitnexus.d.ts +14 -0
  518. package/dist/tools/code-intelligence-gitnexus.d.ts.map +1 -0
  519. package/dist/tools/code-intelligence-gitnexus.js +475 -0
  520. package/dist/tools/code-intelligence-gitnexus.js.map +1 -0
  521. package/dist/tools/code-intelligence-kb-enrich.d.ts +2 -0
  522. package/dist/tools/code-intelligence-kb-enrich.d.ts.map +1 -0
  523. package/dist/tools/code-intelligence-kb-enrich.js +65 -0
  524. package/dist/tools/code-intelligence-kb-enrich.js.map +1 -0
  525. package/dist/tools/code-intelligence-reindex.d.ts +7 -0
  526. package/dist/tools/code-intelligence-reindex.d.ts.map +1 -0
  527. package/dist/tools/code-intelligence-reindex.js +106 -0
  528. package/dist/tools/code-intelligence-reindex.js.map +1 -0
  529. package/dist/tools/code-intelligence-telemetry.d.ts +5 -0
  530. package/dist/tools/code-intelligence-telemetry.d.ts.map +1 -0
  531. package/dist/tools/code-intelligence-telemetry.js +52 -0
  532. package/dist/tools/code-intelligence-telemetry.js.map +1 -0
  533. package/dist/tools/code-intelligence-tests.d.ts +2 -0
  534. package/dist/tools/code-intelligence-tests.d.ts.map +1 -0
  535. package/dist/tools/code-intelligence-tests.js +24 -0
  536. package/dist/tools/code-intelligence-tests.js.map +1 -0
  537. package/dist/tools/code-intelligence.d.ts +114 -0
  538. package/dist/tools/code-intelligence.d.ts.map +1 -0
  539. package/dist/tools/code-intelligence.js +124 -0
  540. package/dist/tools/code-intelligence.js.map +1 -0
  541. package/dist/tools/compose-permissions.d.ts +38 -4
  542. package/dist/tools/compose-permissions.d.ts.map +1 -1
  543. package/dist/tools/compose-permissions.js +295 -33
  544. package/dist/tools/compose-permissions.js.map +1 -1
  545. package/dist/tools/dolt-push-mutex.d.ts +44 -0
  546. package/dist/tools/dolt-push-mutex.d.ts.map +1 -0
  547. package/dist/tools/dolt-push-mutex.js +83 -0
  548. package/dist/tools/dolt-push-mutex.js.map +1 -0
  549. package/dist/tools/execute-command.d.ts +13 -1
  550. package/dist/tools/execute-command.d.ts.map +1 -1
  551. package/dist/tools/execute-command.js +108 -21
  552. package/dist/tools/execute-command.js.map +1 -1
  553. package/dist/tools/execute-prompt.d.ts +84 -12
  554. package/dist/tools/execute-prompt.d.ts.map +1 -1
  555. package/dist/tools/execute-prompt.js +1191 -88
  556. package/dist/tools/execute-prompt.js.map +1 -1
  557. package/dist/tools/get-member-model-pricing.d.ts +21 -0
  558. package/dist/tools/get-member-model-pricing.d.ts.map +1 -0
  559. package/dist/tools/get-member-model-pricing.js +29 -0
  560. package/dist/tools/get-member-model-pricing.js.map +1 -0
  561. package/dist/tools/kb-capture.d.ts +53 -0
  562. package/dist/tools/kb-capture.d.ts.map +1 -0
  563. package/dist/tools/kb-capture.js +130 -0
  564. package/dist/tools/kb-capture.js.map +1 -0
  565. package/dist/tools/kb-context.d.ts +17 -0
  566. package/dist/tools/kb-context.d.ts.map +1 -0
  567. package/dist/tools/kb-context.js +29 -0
  568. package/dist/tools/kb-context.js.map +1 -0
  569. package/dist/tools/kb-export.d.ts +19 -0
  570. package/dist/tools/kb-export.d.ts.map +1 -0
  571. package/dist/tools/kb-export.js +344 -0
  572. package/dist/tools/kb-export.js.map +1 -0
  573. package/dist/tools/kb-feedback.d.ts +23 -0
  574. package/dist/tools/kb-feedback.d.ts.map +1 -0
  575. package/dist/tools/kb-feedback.js +43 -0
  576. package/dist/tools/kb-feedback.js.map +1 -0
  577. package/dist/tools/kb-freshness-sweep.d.ts +14 -0
  578. package/dist/tools/kb-freshness-sweep.d.ts.map +1 -0
  579. package/dist/tools/kb-freshness-sweep.js +29 -0
  580. package/dist/tools/kb-freshness-sweep.js.map +1 -0
  581. package/dist/tools/kb-harvest.d.ts +20 -0
  582. package/dist/tools/kb-harvest.d.ts.map +1 -0
  583. package/dist/tools/kb-harvest.js +143 -0
  584. package/dist/tools/kb-harvest.js.map +1 -0
  585. package/dist/tools/kb-import.d.ts +44 -0
  586. package/dist/tools/kb-import.d.ts.map +1 -0
  587. package/dist/tools/kb-import.js +239 -0
  588. package/dist/tools/kb-import.js.map +1 -0
  589. package/dist/tools/kb-invalidate.d.ts +19 -0
  590. package/dist/tools/kb-invalidate.d.ts.map +1 -0
  591. package/dist/tools/kb-invalidate.js +34 -0
  592. package/dist/tools/kb-invalidate.js.map +1 -0
  593. package/dist/tools/kb-list.d.ts +32 -0
  594. package/dist/tools/kb-list.d.ts.map +1 -0
  595. package/dist/tools/kb-list.js +43 -0
  596. package/dist/tools/kb-list.js.map +1 -0
  597. package/dist/tools/kb-promote.d.ts +20 -0
  598. package/dist/tools/kb-promote.d.ts.map +1 -0
  599. package/dist/tools/kb-promote.js +20 -0
  600. package/dist/tools/kb-promote.js.map +1 -0
  601. package/dist/tools/kb-query.d.ts +35 -0
  602. package/dist/tools/kb-query.d.ts.map +1 -0
  603. package/dist/tools/kb-query.js +111 -0
  604. package/dist/tools/kb-query.js.map +1 -0
  605. package/dist/tools/kb-reconcile-prefilter.d.ts +14 -0
  606. package/dist/tools/kb-reconcile-prefilter.d.ts.map +1 -0
  607. package/dist/tools/kb-reconcile-prefilter.js +26 -0
  608. package/dist/tools/kb-reconcile-prefilter.js.map +1 -0
  609. package/dist/tools/kb-resolve-contradiction.d.ts +23 -0
  610. package/dist/tools/kb-resolve-contradiction.d.ts.map +1 -0
  611. package/dist/tools/kb-resolve-contradiction.js +37 -0
  612. package/dist/tools/kb-resolve-contradiction.js.map +1 -0
  613. package/dist/tools/kb-session-prime.d.ts +26 -0
  614. package/dist/tools/kb-session-prime.d.ts.map +1 -0
  615. package/dist/tools/kb-session-prime.js +392 -0
  616. package/dist/tools/kb-session-prime.js.map +1 -0
  617. package/dist/tools/kb-setup.d.ts +20 -0
  618. package/dist/tools/kb-setup.d.ts.map +1 -0
  619. package/dist/tools/kb-setup.js +49 -0
  620. package/dist/tools/kb-setup.js.map +1 -0
  621. package/dist/tools/kb-stats.d.ts +20 -0
  622. package/dist/tools/kb-stats.d.ts.map +1 -0
  623. package/dist/tools/kb-stats.js +115 -0
  624. package/dist/tools/kb-stats.js.map +1 -0
  625. package/dist/tools/list-members.d.ts.map +1 -1
  626. package/dist/tools/list-members.js +39 -7
  627. package/dist/tools/list-members.js.map +1 -1
  628. package/dist/tools/member-detail.d.ts +1 -1
  629. package/dist/tools/member-detail.d.ts.map +1 -1
  630. package/dist/tools/member-detail.js +16 -2
  631. package/dist/tools/member-detail.js.map +1 -1
  632. package/dist/tools/member-reservation.d.ts +29 -0
  633. package/dist/tools/member-reservation.d.ts.map +1 -0
  634. package/dist/tools/member-reservation.js +71 -0
  635. package/dist/tools/member-reservation.js.map +1 -0
  636. package/dist/tools/monitor-task.d.ts.map +1 -1
  637. package/dist/tools/monitor-task.js +21 -3
  638. package/dist/tools/monitor-task.js.map +1 -1
  639. package/dist/tools/provision-auth.d.ts.map +1 -1
  640. package/dist/tools/provision-auth.js +10 -3
  641. package/dist/tools/provision-auth.js.map +1 -1
  642. package/dist/tools/provision-vcs-auth.d.ts +7 -7
  643. package/dist/tools/provision-vcs-auth.js +1 -1
  644. package/dist/tools/provision-vcs-auth.js.map +1 -1
  645. package/dist/tools/register-member.d.ts +20 -5
  646. package/dist/tools/register-member.d.ts.map +1 -1
  647. package/dist/tools/register-member.js +174 -6
  648. package/dist/tools/register-member.js.map +1 -1
  649. package/dist/tools/remove-member.d.ts +1 -1
  650. package/dist/tools/remove-member.d.ts.map +1 -1
  651. package/dist/tools/remove-member.js +17 -3
  652. package/dist/tools/remove-member.js.map +1 -1
  653. package/dist/tools/report-status.d.ts +33 -0
  654. package/dist/tools/report-status.d.ts.map +1 -0
  655. package/dist/tools/report-status.js +45 -0
  656. package/dist/tools/report-status.js.map +1 -0
  657. package/dist/tools/respond-to-message.d.ts +21 -0
  658. package/dist/tools/respond-to-message.d.ts.map +1 -0
  659. package/dist/tools/respond-to-message.js +23 -0
  660. package/dist/tools/respond-to-message.js.map +1 -0
  661. package/dist/tools/send-email.d.ts +69 -0
  662. package/dist/tools/send-email.d.ts.map +1 -0
  663. package/dist/tools/send-email.js +177 -0
  664. package/dist/tools/send-email.js.map +1 -0
  665. package/dist/tools/send-files.d.ts +3 -0
  666. package/dist/tools/send-files.d.ts.map +1 -1
  667. package/dist/tools/send-files.js +88 -8
  668. package/dist/tools/send-files.js.map +1 -1
  669. package/dist/tools/send-message.d.ts +27 -0
  670. package/dist/tools/send-message.d.ts.map +1 -0
  671. package/dist/tools/send-message.js +46 -0
  672. package/dist/tools/send-message.js.map +1 -0
  673. package/dist/tools/setup-ssh-key.d.ts.map +1 -1
  674. package/dist/tools/setup-ssh-key.js +2 -0
  675. package/dist/tools/setup-ssh-key.js.map +1 -1
  676. package/dist/tools/shutdown-server.d.ts +2 -0
  677. package/dist/tools/shutdown-server.d.ts.map +1 -1
  678. package/dist/tools/shutdown-server.js +19 -0
  679. package/dist/tools/shutdown-server.js.map +1 -1
  680. package/dist/tools/update-member.d.ts +11 -8
  681. package/dist/tools/update-member.d.ts.map +1 -1
  682. package/dist/tools/update-member.js +36 -2
  683. package/dist/tools/update-member.js.map +1 -1
  684. package/dist/types.d.ts +16 -3
  685. package/dist/types.d.ts.map +1 -1
  686. package/dist/utils/agent-helpers.d.ts +2 -1
  687. package/dist/utils/agent-helpers.d.ts.map +1 -1
  688. package/dist/utils/agent-helpers.js +7 -2
  689. package/dist/utils/agent-helpers.js.map +1 -1
  690. package/dist/utils/pid-helpers.d.ts +15 -0
  691. package/dist/utils/pid-helpers.d.ts.map +1 -1
  692. package/dist/utils/pid-helpers.js +23 -0
  693. package/dist/utils/pid-helpers.js.map +1 -1
  694. package/dist/utils/process-utils.d.ts +3 -0
  695. package/dist/utils/process-utils.d.ts.map +1 -0
  696. package/dist/utils/process-utils.js +42 -0
  697. package/dist/utils/process-utils.js.map +1 -0
  698. package/dist/utils/prompt-errors.d.ts +2 -1
  699. package/dist/utils/prompt-errors.d.ts.map +1 -1
  700. package/dist/utils/prompt-errors.js +13 -3
  701. package/dist/utils/prompt-errors.js.map +1 -1
  702. package/dist/utils/session-caller.d.ts +28 -0
  703. package/dist/utils/session-caller.d.ts.map +1 -0
  704. package/dist/utils/session-caller.js +24 -0
  705. package/dist/utils/session-caller.js.map +1 -0
  706. package/dist/utils/work-folder-validation.d.ts +39 -0
  707. package/dist/utils/work-folder-validation.d.ts.map +1 -0
  708. package/dist/utils/work-folder-validation.js +60 -0
  709. package/dist/utils/work-folder-validation.js.map +1 -0
  710. package/dist/utils/workspace-trust.d.ts +24 -0
  711. package/dist/utils/workspace-trust.d.ts.map +1 -0
  712. package/dist/utils/workspace-trust.js +35 -0
  713. package/dist/utils/workspace-trust.js.map +1 -0
  714. package/dist/workflows/auto-sprint.js +994 -91
  715. package/package.json +40 -9
  716. package/packages/apra-fleet-client/package.json +26 -0
  717. package/packages/apra-fleet-client/src/client/api.mjs +510 -0
  718. package/packages/apra-fleet-client/src/client/client.mjs +146 -0
  719. package/packages/apra-fleet-client/src/client/errors.mjs +71 -0
  720. package/packages/apra-fleet-client/src/client/factory.mjs +65 -0
  721. package/packages/apra-fleet-client/src/client/server-resolution.mjs +265 -0
  722. package/packages/apra-fleet-client/src/client/transport.mjs +327 -0
  723. package/packages/apra-fleet-se/apra-pm/agents/backlog-groomer.md +303 -0
  724. package/packages/apra-fleet-se/apra-pm/agents/ci-watcher.md +101 -0
  725. package/packages/apra-fleet-se/apra-pm/agents/deployer.md +151 -0
  726. package/packages/apra-fleet-se/apra-pm/agents/doer.md +259 -0
  727. package/packages/apra-fleet-se/apra-pm/agents/harvester.md +188 -0
  728. package/packages/apra-fleet-se/apra-pm/agents/integ-test-runner.md +332 -0
  729. package/packages/apra-fleet-se/apra-pm/agents/kb-reconciler.md +216 -0
  730. package/packages/apra-fleet-se/apra-pm/agents/plan-reviewer.md +201 -0
  731. package/packages/apra-fleet-se/apra-pm/agents/planner.md +322 -0
  732. package/packages/apra-fleet-se/apra-pm/agents/regression-test-runner.md +234 -0
  733. package/packages/apra-fleet-se/apra-pm/agents/reviewer.md +275 -0
  734. package/packages/apra-fleet-se/apra-pm/agents/schemas/backlog-groomer-input.json +35 -0
  735. package/packages/apra-fleet-se/apra-pm/agents/schemas/backlog-groomer-output.json +164 -0
  736. package/packages/apra-fleet-se/apra-pm/agents/schemas/ci-watcher-input.json +26 -0
  737. package/packages/apra-fleet-se/apra-pm/agents/schemas/ci-watcher-output.json +18 -0
  738. package/packages/apra-fleet-se/apra-pm/agents/schemas/deployer-input.json +19 -0
  739. package/packages/apra-fleet-se/apra-pm/agents/schemas/deployer-output.json +17 -0
  740. package/packages/apra-fleet-se/apra-pm/agents/schemas/doer-input.json +25 -0
  741. package/packages/apra-fleet-se/apra-pm/agents/schemas/doer-output.json +82 -0
  742. package/packages/apra-fleet-se/apra-pm/agents/schemas/harvester-input.json +31 -0
  743. package/packages/apra-fleet-se/apra-pm/agents/schemas/harvester-output.json +75 -0
  744. package/packages/apra-fleet-se/apra-pm/agents/schemas/integ-test-runner-input.json +20 -0
  745. package/packages/apra-fleet-se/apra-pm/agents/schemas/integ-test-runner-output.json +61 -0
  746. package/packages/apra-fleet-se/apra-pm/agents/schemas/kb-reconciler-output.json +87 -0
  747. package/packages/apra-fleet-se/apra-pm/agents/schemas/plan-reviewer-input.json +15 -0
  748. package/packages/apra-fleet-se/apra-pm/agents/schemas/plan-reviewer-output.json +30 -0
  749. package/packages/apra-fleet-se/apra-pm/agents/schemas/planner-output.json +65 -0
  750. package/packages/apra-fleet-se/apra-pm/agents/schemas/regression-test-runner-input.json +15 -0
  751. package/packages/apra-fleet-se/apra-pm/agents/schemas/regression-test-runner-output.json +50 -0
  752. package/packages/apra-fleet-se/apra-pm/agents/schemas/reviewer-input.json +25 -0
  753. package/packages/apra-fleet-se/apra-pm/agents/schemas/reviewer-output.json +135 -0
  754. package/packages/apra-fleet-se/apra-pm/skills/pm/SKILL.md +402 -0
  755. package/packages/apra-fleet-se/apra-pm/skills/pm/beads.md +148 -0
  756. package/packages/apra-fleet-se/apra-pm/skills/pm/cost.md +157 -0
  757. package/packages/apra-fleet-se/apra-pm/skills/pm/doer-reviewer-loop.md +300 -0
  758. package/packages/apra-fleet-se/apra-pm/skills/pm/fleet-addendum.md +127 -0
  759. package/packages/apra-fleet-se/apra-pm/skills/pm/index.md +56 -0
  760. package/packages/apra-fleet-se/apra-pm/skills/pm/kb-reconcile.md +132 -0
  761. package/packages/apra-fleet-se/apra-pm/skills/pm/kb-review.md +109 -0
  762. package/packages/apra-fleet-se/apra-pm/skills/pm/simple-sprint.md +65 -0
  763. package/packages/apra-fleet-se/apra-pm/skills/pm/sprint.md +327 -0
  764. package/packages/apra-fleet-se/apra-pm/skills/pm/worktrees.md +92 -0
  765. package/packages/apra-fleet-se/apra-pm/version.json +3 -0
  766. package/packages/apra-fleet-se/bin/cli.mjs +864 -0
  767. package/packages/apra-fleet-se/bin/serve.mjs +395 -0
  768. package/packages/apra-fleet-se/fleet-sprint/conflict-ladder.mjs +178 -0
  769. package/packages/apra-fleet-se/fleet-sprint/contracts.mjs +940 -0
  770. package/packages/apra-fleet-se/fleet-sprint/dispatch-safety-guard.mjs +177 -0
  771. package/packages/apra-fleet-se/fleet-sprint/docs/README.md +191 -0
  772. package/packages/apra-fleet-se/fleet-sprint/docs/coach-role-design.md +23 -0
  773. package/packages/apra-fleet-se/fleet-sprint/docs/dolt-manual-recovery-verified.md +256 -0
  774. package/packages/apra-fleet-se/fleet-sprint/docs/dolt-sync-redesign.md +1482 -0
  775. package/packages/apra-fleet-se/fleet-sprint/docs/escalate-to-llm-design.md +908 -0
  776. package/packages/apra-fleet-se/fleet-sprint/docs/fleet-sprint-diagram.md +94 -0
  777. package/packages/apra-fleet-se/fleet-sprint/docs/shared-orchestrator-reservation-design.md +399 -0
  778. package/packages/apra-fleet-se/fleet-sprint/docs/stabilization-log.md +1125 -0
  779. package/packages/apra-fleet-se/fleet-sprint/dolt-literal-guard.mjs +72 -0
  780. package/packages/apra-fleet-se/fleet-sprint/dolt-settle.mjs +972 -0
  781. package/packages/apra-fleet-se/fleet-sprint/dolt-sync.mjs +1310 -0
  782. package/packages/apra-fleet-se/fleet-sprint/errors.mjs +616 -0
  783. package/packages/apra-fleet-se/fleet-sprint/full-db-fetch-guard.mjs +118 -0
  784. package/packages/apra-fleet-se/fleet-sprint/runner.js +10747 -0
  785. package/packages/apra-fleet-se/fleet-sprint/skills/fleet-sprint-cli/SKILL.md +114 -0
  786. package/packages/apra-fleet-se/fleet-sprint/skills/fleet-supervisor/SKILL.md +350 -0
  787. package/packages/apra-fleet-se/fleet-sprint/sprint-lock.mjs +140 -0
  788. package/packages/apra-fleet-se/fleet-sprint/sprint-progress.mjs +101 -0
  789. package/packages/apra-fleet-se/fleet-sprint/vcs-module.mjs +435 -0
  790. package/packages/apra-fleet-se/fleet-sprint/vcs-providers/azure-devops.mjs +68 -0
  791. package/packages/apra-fleet-se/fleet-sprint/vcs-providers/bitbucket.mjs +53 -0
  792. package/packages/apra-fleet-se/fleet-sprint/vcs-providers/dolt.mjs +146 -0
  793. package/packages/apra-fleet-se/fleet-sprint/vcs-providers/generic-git.mjs +176 -0
  794. package/packages/apra-fleet-se/fleet-sprint/vcs-providers/github.mjs +235 -0
  795. package/packages/apra-fleet-se/fleet-sprint/vcs-providers/index.mjs +218 -0
  796. package/packages/apra-fleet-se/fleet-sprint/viewer-extensions.mjs +942 -0
  797. package/packages/apra-fleet-se/package.json +29 -0
  798. package/packages/apra-fleet-se/workflow.json +1 -0
  799. package/packages/apra-fleet-workflow/package.json +30 -0
  800. package/packages/apra-fleet-workflow/src/viewer/command-output-cap.mjs +112 -0
  801. package/packages/apra-fleet-workflow/src/viewer/debounced-writer.mjs +153 -0
  802. package/packages/apra-fleet-workflow/src/viewer/html-utils.mjs +31 -0
  803. package/packages/apra-fleet-workflow/src/viewer/index.mjs +1439 -0
  804. package/packages/apra-fleet-workflow/src/viewer/lean-state.mjs +237 -0
  805. package/packages/apra-fleet-workflow/src/viewer/run-state-paths.mjs +130 -0
  806. package/packages/apra-fleet-workflow/src/viewer/run-title.mjs +60 -0
  807. package/packages/apra-fleet-workflow/src/viewer/sprint-state-paths.mjs +29 -0
  808. package/packages/apra-fleet-workflow/src/workflow/engine.mjs +200 -0
  809. package/packages/apra-fleet-workflow/src/workflow/errors.mjs +146 -0
  810. package/packages/apra-fleet-workflow/src/workflow/index.mjs +1727 -0
  811. package/packages/apra-fleet-workflow/src/workflow/journal.mjs +291 -0
  812. package/packages/apra-fleet-workflow/src/workflow/pricing.mjs +99 -0
  813. package/packages/apra-fleet-workflow/src/workflow/vetting.mjs +111 -0
  814. package/scripts/agy-transcript-reader.js +1 -0
  815. package/scripts/fleet-statusline.sh +17 -13
  816. package/skills/fleet/SKILL.md +37 -2
  817. package/skills/fleet/beads.md +14 -7
  818. package/skills/fleet/knowledge-agent.md +66 -0
  819. package/skills/fleet/permissions.md +76 -2
  820. package/skills/fleet/profiles/base-dev.json +11 -1
  821. package/skills/fleet/profiles/base-reviewer.json +9 -1
  822. package/skills/fleet/profiles/node.json +2 -2
  823. package/skills/fleet/profiles/tag-kb-reconciler.json +20 -0
  824. package/version.json +1 -1
  825. package/scripts/agy-settings-merge.js +0 -27
  826. /package/{dist → packages/apra-fleet-se/apra-pm}/agents/_shared/GRAPH-SEMANTICS.md +0 -0
@@ -0,0 +1,1125 @@
1
+ # Auto-Sprint Stabilization Log
2
+
3
+ Running log of issues found while driving the real `apra-fleet-eft` sprint
4
+ (member: fleet-rev, branch `auto-sprint/eft-service`, base `feat/fleet-reorg`)
5
+ per `docs/README.md`, and the fixes made for each. Newest entries at the
6
+ bottom. Each entry: symptom -> root cause -> fix -> evidence.
7
+
8
+ ## Loop iteration 1 (2026-07-19)
9
+
10
+ ### Issue 1: Transport closed kills the whole sprint at start+~304s, every run
11
+
12
+ - **Symptom**: every CLI sprint run died ~5 minutes in with
13
+ `FleetTransportError: Transport closed`, regardless of which dispatch
14
+ happened to be in flight at that moment (`sprint-logs/auto-sprint-relaunch2.log`,
15
+ `relaunch3`, `relaunch4`).
16
+ - **Root cause** (deterministic, confirmed by timestamps): the
17
+ `StreamableHttpTransport` persistent SSE GET stream is normally silent
18
+ (JSON-RPC responses arrive over each POST's own SSE response). Node's
19
+ built-in fetch (undici) enforces a default ~300s idle `bodyTimeout` on
20
+ response bodies, so the single-shot GET stream died at start+~304s
21
+ (fleet server log: stream opened 23:37:40, `Transport closed` 23:42:44).
22
+ `transport.mjs`'s `finally` block then emitted `close`, and
23
+ `McpClient`'s close handler rejected EVERY in-flight request.
24
+ - **Fix**: `packages/apra-fleet-client/src/client/transport.mjs` -- the
25
+ persistent GET stream is now a self-reconnecting background loop. An
26
+ idle-death is treated as an expected, recoverable event (quiet reopen with
27
+ capped backoff); `close` only surfaces on deliberate `stop()` or 5
28
+ consecutive reconnect failures. Regression test:
29
+ `packages/apra-fleet-client/test/transport-reconnect.test.mjs` (real local
30
+ SSE server, kills the first stream, asserts a second GET arrives and no
31
+ `close`/`error` fires).
32
+
33
+ ### Issue 2: busy-lock race -- orphaned remote session holds the member lock for minutes
34
+
35
+ - **Symptom**: after any client-side abandonment of a dispatch (e.g. Issue
36
+ 1's transport close), every subsequent dispatch to that member failed with
37
+ `execute_prompt is already running for "fleet-rev"` until the sprint
38
+ aborted. A blind timed backoff (up to ~110s) lost the race every time.
39
+ - **Root cause**: the client-side failure does not cancel the REMOTE
40
+ session -- the member's CLI keeps running (fleet server log: the orphaned
41
+ plan-reviewer repair session ran 235s after the client gave up at 4.6s,
42
+ completing with a perfectly good 12,976-token response that was
43
+ discarded) and holds the server's one-dispatch-per-member lock the whole
44
+ time. Busy is transient-but-SLOW: minutes, not seconds.
45
+ - **Fix**: `packages/apra-fleet-workflow/src/workflow/index.mjs` -- agent()
46
+ now busy-waits by default: on a `busy` dispatch rejection it polls
47
+ (cheap, side-effect-free re-dispatch) every `busyPollMs` (default 15s) up
48
+ to `busyWaitMs` (default 10 min) before surfacing the busy
49
+ AgentDispatchError. Tests:
50
+ `packages/apra-fleet-workflow/test/apra-fleet-workflow-busy-and-empty.test.mjs`.
51
+ (The runner-level Planner timed-backoff loop from earlier the same day is
52
+ retained as an outer safety net but should rarely trigger now.)
53
+
54
+ ### Issue 3: empty execute_prompt response misreported as "LLM returned invalid JSON" (apra-fleet-eft.14)
55
+
56
+ - **Symptom**:
57
+ `[Agent API Error] Schema-invalid output ... Unexpected token '\ud83d', "[clipboard-emoji] Respons"... is not valid JSON`
58
+ -- looked like a Unicode/JSON bug. It is not: the emoji is just the first
59
+ char the JSON parser saw.
60
+ - **Root cause**: the fleet server returned success (exit 0, no isError)
61
+ whose text was EXACTLY the display wrapper `"[clipboard-emoji] Response from
62
+ fleet-rev:\n\n"` -- 29 chars, empty parsed result, no Tokens/session
63
+ footer (the server-side log line for that dispatch also lacks its usual
64
+ `in=`/`out=` token counts: `exit=0 elapsed=65241ms`). The member CLI
65
+ produced no parseable output; the wrapper-only text then went to schema
66
+ extraction, which correctly found no JSON and misclassified the failure.
67
+ This is bead apra-fleet-eft.14 (first seen on the Planner, now confirmed
68
+ on the plan-reviewer). The underlying server-side parse gap (provider CLI
69
+ exits 0 with nothing parsed) is still open -- tracked in eft.14.
70
+ - **Fix (client-side resilience)**:
71
+ `packages/apra-fleet-workflow/src/workflow/index.mjs` -- agent() now
72
+ detects a wrapper-only response (header + optional Tokens/session footer,
73
+ nothing else) and throws a typed
74
+ `AgentDispatchError` with `reason: 'empty_response'` instead of feeding
75
+ it to schema extraction (or returning it as a garbage success for
76
+ no-schema calls). Every runner dispatch site already catches
77
+ AgentDispatchError and degrades the round gracefully. Tests: same new
78
+ test file as Issue 2.
79
+
80
+ ### Issue 4: transport-closed rejections were untyped
81
+
82
+ - **Symptom**: downstream had to sniff the string 'Transport closed'.
83
+ - **Fix**: new `TransportClosedError` (`code: 'TRANSPORT_CLOSED'`) in
84
+ `packages/apra-fleet-client/src/client/errors.mjs`, used by McpClient's
85
+ close handler. Convention documented in that file: new
86
+ execute_prompt/execute_command failure kinds get a typed class there
87
+ (transport/request-level) or an AgentDispatchError `reason` code
88
+ (dispatch-level via structuredContent) -- never a bare Error message to
89
+ sniff.
90
+
91
+ ### Earlier same-day fixes (pre-loop, first crash analysis)
92
+
93
+ - **FleetTransportError uncaught at schema dispatch sites**: every
94
+ combined-catch site (Reviewer, Plan Reviewer, Streak Assignment,
95
+ Deployer, Integ Test Runner, Final Review x2, Harvester) only handled
96
+ AgentOutputError/AgentDispatchError; a raw transport failure propagated
97
+ and killed the sprint. All sites now also catch FleetTransportError and
98
+ degrade to the same failed-round handling. (runner.js, commit 3daa8fe)
99
+ - **finalizeAbort() rev-list against a nonexistent local base ref**: the
100
+ abort path ran `git rev-list --count <base>..<branch>` assuming the raw
101
+ `--base` value resolves locally on the member; exit 128 ("unknown
102
+ revision") made finalizeAbort itself throw and the [ABORTED] PR was never
103
+ raised. Now fetches the base branch and diffs against
104
+ `origin/<baseBranch>`. (runner.js, commit 3daa8fe)
105
+ - **Planner dispatch single blind retry**: replaced with a bounded
106
+ retry-with-backoff loop (commits 96eaf25, fbb7619); superseded in
107
+ practice by Issue 2's busy-wait but retained as an outer net.
108
+ - **Stale test assertions (4 failures)**: roleMap tests now exclude
109
+ per-member `bd dolt pull/push` sync brackets from the
110
+ orchestrator-routing assertion (verified correct via live dispatch-log
111
+ probe); R12 no-auto-merge check excludes the safe `git merge --ff-only`
112
+ self-sync; run1/run2/multidoer bd recordings re-recorded via
113
+ `npm run test:record`. (commit 827dabe)
114
+
115
+ ### Issue 5: G-pull fetch hard-fails on a brand-new (not-yet-pushed) sprint branch
116
+
117
+ - **Symptom**: `mock-sprint-ensure-branch-fetch-failure.test.mjs` failing
118
+ with `[Sync] G-pull fetch failed ... couldn't find remote ref
119
+ auto-sprint/mock-branchnotexist` (110s of transient retries first).
120
+ - **Root cause**: syncMemberBefore() treated EVERY fetch failure as an
121
+ error, but a sprint branch just created locally from base (first G-push
122
+ hasn't happened) legitimately does not exist on the remote yet -- there
123
+ is nothing to pull, which is a no-op, not a failure. Any real first-cycle
124
+ sprint on a fresh branch would have died on its first sync bracket.
125
+ - **Fix**: runner.js syncMemberBefore() -- the exact `couldn't find remote
126
+ ref` git message (and only that message, mirroring Ensure Sprint Branch's
127
+ own fetch-fallback rationale) now skips the pull half of the bracket with
128
+ a log line instead of throwing.
129
+
130
+ ### Issue 6: injected git-push failure now surfaces as GitSyncError, not CommandError
131
+
132
+ - **Symptom**: `mock-sprint-finalization-git-push-failure.test.mjs`
133
+ asserting `CommandError` failed with `GitSyncError`.
134
+ - **Root cause**: not a bug -- an architecture shift. Before the sync
135
+ brackets, the first `git push` a sprint issued was the finalization
136
+ publish (plain command() -> CommandError). The brackets now G-push after
137
+ every code-writing dispatch, so an injected `/^git push/` failure is hit
138
+ first by a bracket push, surfacing as its typed GitSyncError.
139
+ - **Fix**: test updated to accept either typed error (both are
140
+ never-swallowed surfaces of the same failure), with the
141
+ underlying-git-text assertion retained so a silent swallow still fails.
142
+
143
+ ### Issue 7: recording/snapshot drift from the sync-bracket work
144
+
145
+ - `apra-fleet-mock-sprint-abortprfail.jsonl` was a crashed mid-scenario
146
+ capture (exitCode null entry) -> re-recorded via
147
+ `node scripts/run-tests.mjs record test/mock-sprint-abort-pr.test.mjs`.
148
+ - Both golden transcripts regenerated (UPDATE_GOLDEN=1) after verifying
149
+ the diff is exactly the expected shape: sync-bracket commands (git
150
+ fetch / merge --ff-only / bd dolt pull before each dispatch, bd dolt
151
+ push after) interleaving an otherwise-identical dispatch sequence.
152
+
153
+ **Iteration 1 result**: full apra-fleet-se suite 500/500 green (was 10
154
+ failing). apra-fleet-client 21/21 + new reconnect test. apra-fleet-workflow
155
+ core suites green + 8 new busy/empty tests; 2 pre-existing eft-WIP
156
+ conditions confirmed NOT caused by this work (debounced-writer 3 failures,
157
+ sprint-state file-level exit hang -- both reproduce with all stabilization
158
+ changes stashed; they belong to the in-flight eft.2.1 feature work).
159
+
160
+ ## Loop iteration 2 (2026-07-19)
161
+
162
+ ### Issue 8: POST-stream idle timeout kills every >300s-silent dispatch ("terminated")
163
+
164
+ - **Symptom** (run 5, `sprint-logs/auto-sprint-relaunch5.log`): long
165
+ dispatches failed with `[Agent API Error] terminated`, then the retry hit
166
+ `busy`, busy-waited out the orphan, re-dispatched -- and the redo ALSO
167
+ died with `terminated`. The sprint survived (Issues 1-3 fixes all held)
168
+ but ground in a terminated -> retry -> busy-wait -> duplicate-dispatch
169
+ loop, doing each long planner run twice and discarding the results.
170
+ - **Root cause**: the Issue 1 fix covered the persistent GET stream, but
171
+ each POST's own SSE response stream has the same undici ~300s idle
172
+ bodyTimeout. `claude -p` prints nothing until the turn completes, so any
173
+ dispatch quieter than 300s+ loses its response stream mid-flight
174
+ ("terminated" is undici's body-timeout error message). Server log
175
+ evidence: planner R2 pid 15590 ran 675s (00:44:40 -> 00:55:55, exit=0
176
+ out=16285) -- client stream killed at ~00:49:40, full result discarded,
177
+ duplicate planner pid 18865 dispatched 00:55:55 by the busy-waiting
178
+ retry, which then also exceeded 300s and got terminated in turn.
179
+ - **Fix**: `packages/apra-fleet-client` now depends on `undici` explicitly
180
+ and `transport.mjs` routes ALL StreamableHttpTransport fetches (init
181
+ POST, persistent GET, send POST) through undici's fetch with a shared
182
+ `Agent({ headersTimeout: 0, bodyTimeout: 0 })` dispatcher. No unbounded
183
+ hangs result: McpClient's per-request timeout still bounds every
184
+ JSON-RPC call, and the GET stream keeps its reconnect loop. Guard test:
185
+ `packages/apra-fleet-client/test/transport-idle-timeout-guard.test.mjs`
186
+ (asserts the wiring at source level -- a behavioral test would need a
187
+ >300s silent stream; the existing reconnect test exercises the undici
188
+ fetch path against a real server).
189
+ - **Decision note**: server-side SSE keepalives on POST responses would fix
190
+ this for ALL clients and remain a good hardening follow-up, but need a
191
+ fleet-server rebuild+redeploy; the client-side dispatcher fix is
192
+ deterministic and deploy-free, so it ships first.
193
+
194
+ ### Server-side eft.14 classification (committed, deploy deferred)
195
+
196
+ - `src/tools/execute-prompt.ts` now classifies an exit-0-with-empty-result
197
+ dispatch as a typed failure (`structuredContent: { isError: true,
198
+ reason: 'empty_response' }` + stderr tail in the text) instead of
199
+ returning a bare display wrapper as success. Tests added in
200
+ `tests/execute-prompt.test.ts`; full root vitest suite green (2318
201
+ passed). Deployment needs a fleet-server rebuild+reinstall+restart, which
202
+ kills live member sessions -- deferred to a natural stop; the workflow
203
+ layer's Issue 3 detection handles it in the meantime.
204
+
205
+ ## Loop iteration 3 (2026-07-19)
206
+
207
+ Run 6 (the first on the Issue 8 transport fix) got dramatically further
208
+ than any prior run: Plan C1 approved in round 1 (the previously
209
+ empty-response-prone plan-reviewer completed normally), the full Develop
210
+ C1 R1 phase ran multi-minute doer streaks back-to-back with ZERO transport
211
+ failures (beads closed: eft.6.4, 9.1, 4.6, more; one streak correctly
212
+ degraded on a VERIFY/still-open mismatch), and the sprint reached Review
213
+ C1 R1 -- where it found the next two systemic issues:
214
+
215
+ ### Issue 9: reviewer budgets undersized for a full-cycle review + infra failures tripped the contract-violation guard
216
+
217
+ - **Symptom** (run 6): the reviewer ran out of turns (num_turns=51 after
218
+ ~12 min of legitimate review work, typed max_turns_exhausted); the retry
219
+ then hit the 930s client-side request timeout. BOTH synthesized
220
+ CHANGES_NEEDED fallback verdicts had empty reopenIds/newTasks, so
221
+ isReviewerContractViolation() -- designed to catch a GENUINE
222
+ self-contradictory LLM verdict -- counted two "contract violations" and
223
+ aborted the sprint with ReviewerContractViolationError.
224
+ - **Root cause**: two distinct gaps. (a) The reviewer dispatch had no
225
+ explicit max_turns and no resume path, so a big-cycle review
226
+ deterministically dies at the fleet default and a fresh retry re-dies
227
+ the same way. (b) dispatchReview() synthesized infrastructure-failure
228
+ verdicts in the same shape as LLM verdicts, so the contract-violation
229
+ guard could not tell them apart.
230
+ - **Fix** (runner.js dispatchReview): explicit
231
+ `max_turns: BASE_REVIEWER_MAX_TURNS (60)`; on max_turns_exhausted the
232
+ SAME session is resumed once with a doubled budget (mirrors
233
+ dispatchDoerResume -- the session already holds the review context).
234
+ Synthesized failure verdicts now carry `dispatchFailed: true` and are
235
+ returned as a DEGRADED round (counting toward the bounded stall budget
236
+ like every other role) after one infrastructure retry -- they can no
237
+ longer throw ReviewerContractViolationError, which is reserved for
238
+ genuine schema-valid self-contradicting LLM verdicts. Structural test
239
+ baselines bumped (11 agent sites / 10 withGitSync brackets), reviewer
240
+ scenario recordings re-recorded; se suite 602/602.
241
+
242
+ ### Issue 10: agent() silently dropped max_total_s from the dispatch payload
243
+
244
+ - **Symptom** (run 6): the reviewer retry timed out client-side at exactly
245
+ 930000ms despite the runner passing `max_total_s: 3600` (which
246
+ deriveTimeoutMs prefers -- it should have produced a 3630s request
247
+ timeout).
248
+ - **Root cause**: the payload object built inside
249
+ `packages/apra-fleet-workflow/src/workflow/index.mjs` agent() forwarded
250
+ timeout_s/max_turns/etc. but NOT max_total_s, so (a) the server never
251
+ received the hard wall-clock ceiling for ANY workflow dispatch, and (b)
252
+ the derived client timeout always fell back to timeout_s+30s = 930s,
253
+ killing any legitimately-slow dispatch at ~15.5 min while the remote
254
+ session kept running (orphan + busy lock).
255
+ - **Fix**: `max_total_s: opts.max_total_s` added to the payload, with
256
+ JSDoc documenting both server- and client-side effects.
257
+
258
+ ### Issue 11: dirty member working tree kills the next sprint at Setup
259
+
260
+ - **Symptom** (run 7): `Ensure Sprint Branch` died immediately with
261
+ `error: Your local changes to the following files would be overwritten
262
+ by checkout` -- fleet-rev had an uncommitted runner.js modification left
263
+ by an interrupted dispatch from run 5/6.
264
+ - **Root cause**: any infrastructure-killed dispatch (transport drop,
265
+ timeout, stop_prompt) predictably leaves the member's tree dirty with
266
+ whatever the agent had in flight; `git checkout -B` refuses to proceed.
267
+ A stabilized sprint loop guarantees such orphans will keep happening, so
268
+ Setup must expect them.
269
+ - **Fix** (runner.js Ensure Sprint Branch): the checkout is now failSoft;
270
+ on the specific "would be overwritten" failure the orphaned WIP is
271
+ preserved in a named stash (`git stash push -u -m "auto-sprint[branch]
272
+ auto-stash of orphaned WIP..."`) and the checkout retried once. Any
273
+ other checkout failure still aborts loudly. Happy path (clean tree)
274
+ issues no extra commands. The run-7 orphan itself (a one-line eft.8.x
275
+ error-shape WIP) was inspected and hand-stashed on fleet-rev with a
276
+ descriptive message; its bead is still open so a future streak redoes
277
+ it properly. Command-count baseline 26 -> 28.
278
+
279
+ ### Feature bug found by the loop, routed to the sprint backlog
280
+
281
+ - The run-6 doer's new supervisor-lifecycle test (eft.4.6, written and
282
+ verified on macOS fleet-rev) fails on Windows: live-child re-adoption
283
+ recovers the port from the process command line via a ps reader that
284
+ returns nothing usable on Windows. Filed as a P1 bug bead under
285
+ apra-fleet-eft.4 (2026-07-19) so the sprint's own doers fix it --
286
+ stabilization-loop scope stays on the sprint machinery, not the eft
287
+ feature. se suite otherwise green (667 pass / 2 fail, both this bug).
288
+
289
+ ## Loop iteration 4 (2026-07-19)
290
+
291
+ Run 8 was the best run yet: TWO full cycles of plan -> develop -> review,
292
+ with the plan approved first-round both times, every reviewer round up to
293
+ C2 returning a genuine actionable verdict (real catches: a red test suite
294
+ from a doer regression, uncommitted freshest work, a stale guard-test
295
+ baseline), the doer resume path recovering every turn-limit exhaustion,
296
+ and Cycle 1 evaluation rolling into Cycle 2 cleanly. It died in Review C2
297
+ R1 on two NEW issue types:
298
+
299
+ ### Issue 12: server inactivity timeout (900s) makes max_total_s unreachable for silent CLIs
300
+
301
+ - **Symptom** (run 8): the C2 reviewer was killed with "Command timed out
302
+ after 900000ms of inactivity" despite max_total_s: 3600.
303
+ - **Root cause**: `claude -p` prints nothing until the turn completes, so
304
+ server-side INACTIVITY == total runtime for every agent dispatch; the
305
+ 900s inactivity timer always fires before the 3600s wall-clock ceiling
306
+ can matter. Earlier reviews survived only by finishing under 15 min.
307
+ - **Fix**: every agent dispatch site in runner.js now sets
308
+ `timeout_s: 3600` equal to its `max_total_s: 3600` -- the hard ceiling
309
+ is the real limit; inactivity adds nothing for a silent-until-done CLI.
310
+ (Also: BASE_DOER_MAX_TURNS 50 -> 100, since in run 8 EVERY streak --
311
+ even single-bead ones -- exhausted 50 turns and paid a resume
312
+ round-trip; resumes now escalate 200 -> 400. Assertion ladder updated in
313
+ mock-sprint-doer-max-turns.test.mjs.)
314
+
315
+ ### Issue 13: sporadic client 'fetch failed' + sync-bracket failures are sprint-fatal at the review site
316
+
317
+ - **Symptom** (run 8): sporadic `[Command API Error] fetch failed`
318
+ throughout the run (dashboard badge computation, a doer bracket, and
319
+ finally the review-retry G-pull). The last one surfaced as GitSyncError
320
+ from dispatchReview's sync bracket -- which the reviewer catch did not
321
+ handle -- and killed the sprint. The fleet server was healthy the whole
322
+ time.
323
+ - **Root cause**: three stacked gaps. (a) The pooled undici dispatcher
324
+ (Issue 8 fix) can reuse a socket the server just decided to close
325
+ (Node http default keepAliveTimeout 5000ms) -- the request then fails at
326
+ the socket level as 'fetch failed'. (b) classifyGitFailure() rated
327
+ "Transport failure while executing command: fetch failed" as 'unknown'
328
+ (never retried) instead of transient. (c) dispatchReview degraded
329
+ dispatch/transport errors but not sync-bracket GitSyncError/
330
+ DoltSyncError.
331
+ - **Fix**: (a) transport.mjs -- dispatcher keepAliveTimeout: 4000 (below
332
+ the server's 5000ms) plus a bounded connection-level retry in send()
333
+ (2 retries, 500ms/2s; only for rejections where no response was
334
+ received, so a re-send cannot double-execute). (b) the transport-failure
335
+ strings added to GIT_TRANSIENT_PATTERNS so runGitStep retries them.
336
+ (c) dispatchReview's catch now also degrades GitSyncError/DoltSyncError
337
+ (dispatchFailed round); GitDivergedError/DoltDivergedError still
338
+ propagate -- real divergence is an integrity problem, not a blip.
339
+
340
+ Rebased over 10 doer commits from run 8 (including the doer's own
341
+ eft.9.7 claim-loop restructure of dispatchDoer -- conflict resolved
342
+ keeping the doer's structure with the new timeouts applied). se suite
343
+ 759 pass / 2 fail (both the beaded Windows lifecycle bug); client 22/22.
344
+
345
+ ## Loop iteration 5 (2026-07-19)
346
+
347
+ Run 9 aborted at planning (SprintPlanRejectedError, 3 rounds): R1-R2
348
+ flagged all-children-closed features as undecomposed (the planner resolved
349
+ this itself by R3 -- no runner change needed), and R3's sole blocker was
350
+ an operator-injected bug bead (eft.4.7) missing the `model` metadata the
351
+ plan contract requires. Operator lesson recorded (bead injections must
352
+ carry model metadata and be created member-side + dolt-pushed; the
353
+ orchestrator's local clone is stale/conflicted outside sprint brackets).
354
+ Run 10 relaunched after fixing the metadata; its plan R1 caught the run-9
355
+ planner's duplicate re-creations of closed eft.13 work and R2 approved a
356
+ deduplicated DAG -- the plan gate working as designed.
357
+
358
+ ### Final Review hardening (turn budget, resume, feedback-to-beads)
359
+
360
+ - **Gap 1**: dispatchFinalReview had no explicit max_turns and no resume
361
+ path -- an epic-wide review would deterministically die at the fleet
362
+ default (50 turns) twice (the retry restarts from scratch) and flip the
363
+ sprint to a FAIL whose notes carry only the error text.
364
+ - **Gap 2**: the finalVerdict schema was {verdict, notes} only; a FAIL's
365
+ actionable findings reached the PR body and analysis doc but NEVER
366
+ beads -- invisible to the next sprint's planner, which reads only
367
+ beads.
368
+ - **Fix** (runner.js + contracts.mjs): FINAL_REVIEW_MAX_TURNS = 60 with
369
+ one same-session resume at 120 turns (mirrors doer/reviewer);
370
+ finalVerdict gains optional newTasks (same item shape as
371
+ reviewerVerdict), the prompt instructs findings-as-newTasks on FAIL,
372
+ and the orchestrator applies them via the same validateNewTask
373
+ allowlist + child-id allocator + D-push path as per-round reviewer
374
+ newTasks. Structural baselines 12 agent sites / 11 brackets; goldens
375
+ regenerated (diff = the Final Review prompt/schema line only); se
376
+ suite 759 pass / 2 fail (the beaded Windows lifecycle bug).
377
+
378
+ ### Issue 15: streak-assignment candidates with shortened bead ids silently lose the whole grouping
379
+
380
+ - **Symptom** (run 8, Develop C2 R1; operator-reported): the streak
381
+ assignment LLM returned suffix-stripped ids
382
+ (`{"streaks":[["8.4","8.6"],["9.3","9.7"],...]}` for
383
+ apra-fleet-eft.8.4 etc.). selectStreaks() correctly rejected the
384
+ candidate (`unknown/non-ready bead id '8.4'`) and fell back to
385
+ one-bead-per-streak -- safe, but the model's sequencing intent
386
+ (8.4+8.6 same-doer, 9.3+9.7 same-doer) was silently discarded. On a
387
+ multi-doer fleet that fallback would PARALLELIZE beads the model said
388
+ must run sequentially.
389
+ - **Design stance (per operator)**: bead ids from different scopes need
390
+ not share any prefix, so suffix-matching/prefix-inference repair is
391
+ forbidden -- a shortened id is genuinely ambiguous and must stay
392
+ rejected. The fix is to stop the model shortening ids and to recover
393
+ via RE-ASK, never via guessing.
394
+ - **Fix** (runner.js): (a) buildStreakAssignmentPrompt now demands
395
+ verbatim ids (full prefix, character for character, explicit warning
396
+ that shortened ids are rejected); (b) one bounded semantic-repair
397
+ re-ask -- when a schema-VALID candidate fails selectStreaks(), the
398
+ agent is re-asked once with the exact rejection reason before the
399
+ one-bead-per-streak fallback engages. Structural baselines: 13 agent
400
+ sites; the repair re-ask is the second documented no-bracket exemption
401
+ (same pure-compute grouping task as the first).
402
+
403
+ ### Issue 14: pending-closure features misread as "undecomposed" burn entire plan phases
404
+
405
+ - **Symptom**: run 9 (cycle 1) and run 10 (cycle 2) each exhausted all 3
406
+ planning rounds -- SprintPlanRejectedError -- because plan-reviewer
407
+ dispatches flagged features whose children are ALL CLOSED (eft.1/3/4/5/
408
+ 7/8 by run 10) as "undecomposed, zero child tasks, no model metadata"
409
+ and demanded re-decomposition. The planner cannot sensibly satisfy that
410
+ without recreating closed work -- run 9's planner did exactly that, and
411
+ the NEXT review round correctly rejected the duplicates (thrash both
412
+ ways).
413
+ - **Root cause**: verdict inconsistency across reviewer dispatches on the
414
+ same DAG state. The reviewer's child queries default to OPEN issues, so
415
+ an all-children-closed feature looks childless; some dispatches
416
+ correctly read it as "eligible for closure, non-blocking" (run 8 C2),
417
+ others fail hard criteria on it. Feature closure belongs to the
418
+ integ-test phase, so mid-sprint this state is NORMAL and long-lived.
419
+ - **Fix** (runner.js): pin the interpretation in both prompts.
420
+ buildPlanReviewerPrompt now instructs: check closed children (bd list
421
+ --all) before flagging a feature undecomposed; all-children-closed =
422
+ pending feature-closure = non-blocking note only, never a criteria
423
+ failure, never a re-decomposition demand. buildPlannerPrompt's
424
+ re-planning preamble gets the symmetric guard: leave such features
425
+ alone even if review feedback appears to demand decomposition.
426
+
427
+ ### Issue 16: closed beads invisible in the viewer sprint tree
428
+
429
+ - **Symptom** (operator-reported): the sprint viewer showed only open
430
+ items under the sprint tree, making progress impossible to judge -- by
431
+ run 11 most eft work was CLOSED, so the tree looked nearly empty.
432
+ - **Root cause**: updateDashboard fetched beads via bdListScoped('--json').
433
+ Any non-empty argument string routes to a second plain `bd list`
434
+ invocation, which defaults to open/in_progress only. The no-args path
435
+ bdListScoped('') reuses the shared `bd list --all --limit 0 --json`
436
+ fetch, which includes closed beads.
437
+ - **Fix** (runner.js): updateDashboard now calls bdListScoped('') so the
438
+ dashboard payload carries the full DAG including closed items. Golden
439
+ transcripts regenerated (the dashboard section of every golden changed).
440
+
441
+ ### Issue 17: reviewer pins CHANGES_NEEDED by reopening deferred P3 features
442
+
443
+ - **Symptom**: run 11 cycles 2-3 -- reviews returned CHANGES_NEEDED with
444
+ reopenIds ['apra-fleet-eft.10','apra-fleet-eft.11' (,'.12')] round
445
+ after round. Those are P3 features, deferred by design under the sprint
446
+ goal constraint (P1/P2). The completion gate needs zero open
447
+ goal-priority beads AND a final APPROVED verdict, so a reviewer that
448
+ keeps reopening below-goal beads pins the verdict and starves the gate.
449
+ - **Root cause**: buildReviewerPrompt never told the reviewer what the
450
+ sprint goal was. The reviewer read the epic's full child list, found P3
451
+ features with no commits, and (correctly, from its blind viewpoint)
452
+ demanded the missing work.
453
+ - **Fix** (runner.js), two layers:
454
+ (a) buildReviewerPrompt now takes the goal and carries a SPRINT SCOPE
455
+ instruction: features/beads below the goal priority are deferred by
456
+ design, must not fail the verdict, must not appear in reopenIds.
457
+ (b) Deterministic guard at the reopen loop: when reopenIds is
458
+ non-empty, fetch the scoped DAG once (bdListScoped('')) and SKIP any
459
+ id whose bead priority is numerically below the goal (priority >
460
+ goalMax), logging the skip. The lookup is conditional on reopenIds
461
+ being non-empty so the common empty path issues no extra bd call.
462
+ - **Test fallout lesson**: the first (unconditional) lookup shape caused
463
+ 35 bd-replay drift failures; the conditional shape confined drift to
464
+ the 14 scenario files that genuinely exercise reopenIds. Those were
465
+ re-recorded (SUMMARY pass=37 fail=0) and the golden bd recordings +
466
+ transcripts re-recorded/regenerated; full suite green (789/789).
467
+
468
+ ### Issue 18: Deploy fails every cycle on a permission self-check; Integ Test never runs, so features can never close
469
+
470
+ - **Symptom**: run 11 C1-C3 -- "Deploy FAILED this cycle: Stopped at
471
+ Step 0 (permission check)... Skipping Integration Test phase." Every
472
+ cycle evaluation then reports the same ~11 open P2+ beads. Those 11
473
+ are the pending-closure FEATURE nodes themselves (all children
474
+ closed): the integ-test-runner is the only role that closes verified
475
+ features, so with Deploy failing its pre-flight, the completion gate
476
+ (zero open goal beads + APPROVED) is mathematically unreachable and
477
+ every run rides to maxCycles.
478
+ - **Root cause**: deploy.md's Permissions section requires Bash(gh run *),
479
+ Bash(gh release *), Bash(mkdir *), Bash(*apra-fleet-installer-*
480
+ install *), Bash(*apra-fleet-installer-* --version) in the member's
481
+ permissions.allow. fleet-rev's .claude/settings.json had no
482
+ permissions key at all, and settings.local.json (composed at
483
+ onboarding, BEFORE deploy.md existed -- the playbook is sprint-authored
484
+ content) covered only Bash(gh:*). Nothing re-composes member
485
+ permissions when the sprint's own doers author a playbook that carries
486
+ new permission requirements.
487
+ - **Fix** (member-side, live, no sprint restart): added the five
488
+ deploy.md prefixes (plus a colon-syntax mkdir variant) to BOTH
489
+ .claude/settings.json and .claude/settings.local.json in fleet-rev's
490
+ sprint workspace. Both files are gitignored, so the member's working
491
+ tree stays clean. Applied while run 11 was in Review C4 R1, before
492
+ Deploy C4 fired.
493
+ - **Durability caveat (watched)**: if fleet-rev's permissions are ever
494
+ re-composed (compose_permissions / re-onboarding), these entries are
495
+ lost. The structural fix belongs in the permission profile for the
496
+ deployer/integ-test roles, or a pre-Deploy permission-ensure step in
497
+ the runner; deferred until Integ Test is observed actually running.
498
+
499
+ ### Run 11 outcome: StalledSprintError, reopen-thrash on the deferred P3 trio
500
+
501
+ - Run 11 ended at Deploy C4 with StalledSprintError: closed-count history
502
+ [57, 62, 62, 62], reopen-thrash detected on apra-fleet-eft.10/.11/.12
503
+ (each reopened more than 3 times). This is exactly the Issue 17
504
+ oscillation -- the stall detector (correctly) refused to burn cycle 5
505
+ on it. It also means Deploy C4 never ran, so the Issue 18 permission
506
+ fix gets its first live test in run 12. finalizeAbort worked as
507
+ designed (idempotent [ABORTED] PR, terminal history record). Run 11's
508
+ content record: 4 cycles, zero infrastructure failures, closed beads
509
+ 57->62, every P1/P2 feature at all-children-closed pending closure.
510
+
511
+ ### Issue 19: deploy.md is non-idempotent and hardcodes the Windows artifact
512
+
513
+ - **Symptom**: run 12 Deploy C1 -- with Issue 18's permissions in place the
514
+ deployer executed deploy.md for the first time ever, and failed mid-run:
515
+ `gh run download ... error extracting "apra-fleet-installer-win-x64.exe":
516
+ file exists` (/tmp/fleet-deploy already held the artifact from the same
517
+ deploy session's earlier attempt).
518
+ - **Root cause**, two content defects in the sprint-authored playbook:
519
+ (a) NON-IDEMPOTENT: `mkdir -p /tmp/fleet-deploy` then download -- any
520
+ re-run (or step retry) collides with the previous download, and gh run
521
+ download has no overwrite flag. (b) WRONG PLATFORM: the Deploy and smoke
522
+ test sections hardcode apra-fleet-installer-win-x64.exe and
523
+ apra-fleet.exe -- authored from the orchestrator's Windows viewpoint,
524
+ but the runbook executes ON THE MEMBER (fleet-rev is macOS ARM). Even a
525
+ clean download would have died at the install step. The playbook's own
526
+ Platform binaries table already listed the right artifact names.
527
+ - **Fix** (deploy.md, committed to the sprint branch): Deploy section now
528
+ selects the artifact by `uname -s` (Darwin/Linux/fallback-Windows),
529
+ does `rm -rf /tmp/fleet-deploy` before mkdir, and `chmod +x` before
530
+ install; smoke test tries both binary names; manual/rollback sections
531
+ parameterized on the platform table. Permissions section gains
532
+ `Bash(rm -rf /tmp/fleet-deploy*)`, `Bash(chmod +x /tmp/fleet-deploy*)`,
533
+ and widens the version check to `Bash(*apra-fleet* --version)` (the old
534
+ prefix only covered the installer, not the installed binary the smoke
535
+ test runs). Same prefixes added live to fleet-rev's settings files, and
536
+ the stale /tmp/fleet-deploy was removed on the member.
537
+
538
+ ### Issue 20: no deployable artifact exists for darwin-x64 members at all
539
+
540
+ - **Symptom**: run 12 Deploy C2 -- the Issue 19 platform selection worked,
541
+ but install failed with exit 127 'bad CPU type in executable':
542
+ fleet-rev is an INTEL Mac (Darwin x86_64) and main's CI matrix builds
543
+ only win-x64, linux-x64, darwin-arm64. There is no working deploy path
544
+ for this member: the arm64 binary cannot execute, and the fallback
545
+ apra-fleet-tarball flow is broken on main (the tarball omits
546
+ install.cjs and scripts/ which install.sh requires, and the legacy
547
+ tarball installer never creates ~/.apra-fleet/bin/, so the smoke test
548
+ could never pass) -- a main-repo packaging defect worth its own bead
549
+ on that backlog.
550
+ - **Disposition**: this is eft CONTENT (the deploy/integ runbooks are the
551
+ epic's own deliverables), not sprint-process infrastructure, so it was
552
+ filed as a sprint-scoped P2 bug bead apra-fleet-eft.15 per the bead
553
+ injection contract (created member-side with model metadata, dolt
554
+ pushed). The bead's preferred option is a build-from-source fallback
555
+ in deploy.md (npm run build:binary when no artifact matches
556
+ uname -s/-m), which is self-contained on the branch. Being P2 it
557
+ correctly holds the completion gate open until Deploy actually works.
558
+
559
+ ### Issue 21: childless bug beads are planned as directly-dispatchable, but doers refuse non-task beads
560
+
561
+ - **Symptom**: run 12 C3 -- the planner assigned the injected bug bead
562
+ apra-fleet-eft.15 directly to a doer streak and the plan-reviewer
563
+ APPROVED that plan; the doer then skipped it per its contract ("doers
564
+ may only claim issue_type=task"), reporting BLOCKED, and the runner
565
+ marked the streak FAILED. Left alone this repeats every cycle the bug
566
+ stays open and the stall detector eventually kills the run -- the same
567
+ thrash shape as Issue 17, one layer down.
568
+ - **Root cause**: a planning-side blind spot symmetric to Issue 14.
569
+ Features get decomposed into task children, but an injected bug that
570
+ arrives mid-sprint as a childless leaf is treated as dispatchable
571
+ as-is by both planner and plan-reviewer; only the doer contract knows
572
+ it is not.
573
+ - **Fix** (runner.js, mirror-image prompt pins): buildPlannerPrompt now
574
+ states that doers can only claim task-type beads and any open childless
575
+ bug in scope must be decomposed into task-type children (with model
576
+ metadata and a [test] task where testable) during planning;
577
+ buildPlanReviewerPrompt gains the matching DISPATCHABILITY criterion --
578
+ a plan leaving an open childless bug-type leaf is CHANGES_NEEDED, with
579
+ an explicit carve-out for pending-closure features. Goldens
580
+ regenerated; full se suite green (863/0).
581
+ - **Rollout**: the pin reaches the sprint at the next relaunch. Run 12's
582
+ C4 planner may still self-correct from the doer's BLOCKED note, which
583
+ recommended exactly this decomposition.
584
+
585
+ ### Run 12 outcome: StalledSprintError (flat closed count), Issues 19-21 discovered
586
+
587
+ - Run 12 ended at the C3 evaluation with StalledSprintError: closed-count
588
+ history [62, 62, 62], no reopen-thrash. C1 was a clean sweep (plan +
589
+ 3 reviews APPROVED first try -- Issues 14 and 17 both holding), and
590
+ Deploy executed deploy.md for the first time in the campaign (Issue 18
591
+ fix working), which surfaced Issues 19 (non-idempotent, Windows-only
592
+ playbook) and 20 (no darwin-x64 artifact exists; filed as bead
593
+ apra-fleet-eft.15). C2/C3 then closed nothing: the only non-feature
594
+ open bead was eft.15, which doers refused every round as issue_type=
595
+ bug (Issue 21), and the stall detector correctly aborted before Plan
596
+ C4 could decompose it. Run 13 launches with the Issue 21 planner/
597
+ plan-reviewer pins, so its FIRST planning pass must decompose eft.15
598
+ into workable task children -- unblocking Deploy, then Integ Test,
599
+ then feature closure.
600
+
601
+ ### Issue 22: integ-test-playbook.md permissions never provisioned (Issue 18's class, second member)
602
+
603
+ - **Symptom**: run 13 Integ Test C1 -- the FIRST integ-test dispatch of
604
+ the campaign (Deploy C1 finally succeeded via eft.15's source-build
605
+ fallback) refused to run at Step 0a: five of the six permission
606
+ prefixes integ-test-playbook.md requires were missing from fleet-rev's
607
+ allowlist (only Bash(mkdir *) was present, from the Issue 18 fix).
608
+ featuresClosed: 0 -- the cycle's feature-closure opportunity was lost.
609
+ - **Root cause**: same class as Issue 18. Sprint-authored playbooks
610
+ (deploy.md, integ-test-playbook.md) declare their own Permissions
611
+ sections, but nothing in onboarding or the sprint provisions those
612
+ prefixes onto the member; each playbook's Step 0 self-check then
613
+ correctly refuses.
614
+ - **Fix** (member-side, live): added the five missing prefixes to both
615
+ settings files on fleet-rev before Integ Test C2.
616
+ - **Structural fix candidate (watched)**: this is now the third
617
+ member-side permission patch (deploy Step 0, deploy rm/chmod/version,
618
+ integ Step 0a). The runner should get a pre-phase permission-ensure
619
+ step: parse the playbook's Permissions section and merge any missing
620
+ prefixes into the member's settings before dispatching deployer /
621
+ integ-test-runner. Defer until the current permission set proves
622
+ sufficient end-to-end, then implement once.
623
+
624
+ ### Issue 23: member workspace untrusted -- ALL settings.json permissions silently ignored
625
+
626
+ - **Symptom**: run 13 Integ Test C2 -- the first real playbook dispatch
627
+ exhausted its turn budget, and the error carried the actual cause:
628
+ "Ignoring 18 permissions.allow entries from .claude/settings.json:
629
+ this workspace has not been trusted." Every playbook command was being
630
+ denied, so the agent burned its turns fighting refusals.
631
+ - **Root cause**: the Claude CLI only honors a workspace's
632
+ .claude/settings.json after the interactive trust dialog has been
633
+ accepted for that directory -- recorded in ~/.claude.json under
634
+ projects[<path>].hasTrustDialogAccepted. Headless members never see
635
+ the dialog, so all the Issue 18/19/22 permission provisioning into
636
+ settings.json was silently inert. (settings.local.json entries also
637
+ gate on the same trust flag.)
638
+ - **Fix** (member-side, live): set projects["/Users/akhil/git/
639
+ apra-fleet"].hasTrustDialogAccepted = true in ~/.claude.json on
640
+ fleet-rev. Onboarding lesson for the fleet: provisioning permissions
641
+ onto a member is only effective if the workspace is also trusted --
642
+ worth folding into compose_permissions / member onboarding.
643
+
644
+ ### Issue 24: integ-test-runner had no turn-exhaustion resume ladder
645
+
646
+ - **Symptom**: same dispatch as Issue 23 -- max_turns_exhausted was
647
+ caught and degraded to passed:false (correct), but the cycle's entire
648
+ feature-closure opportunity was lost with no recovery attempt.
649
+ - **Fix** (runner.js): INTEG_TEST_MAX_TURNS = 100 (doer-sized -- the
650
+ runner owns the sandbox lifecycle plus full functional suites) with
651
+ the same same-session resume-and-continue ladder the reviewer/final-
652
+ review dispatches use (resume at 200 turns, sandbox kept, then the
653
+ existing degrade path). Structural baselines updated: 14 agent sites,
654
+ 12 withGitSync brackets, 6 pushBeads brackets (integ once + resume).
655
+ Full se suite green (863/0). Applies from run 14 (run 13 already
656
+ loaded its runner; its C3+ integ attempts rely on the Issue 23 trust
657
+ fix removing the turn waste).
658
+
659
+ ### Issue 25: universal turn-exhaustion resume (operator directive)
660
+
661
+ - **Directive**: every max_turns-based dispatch failure, in ANY phase,
662
+ must be answered with a same-session resume at doubled turns and a
663
+ "continue where you left off" prompt -- never treated as a terminal
664
+ failure on the first exhaustion.
665
+ - **Coverage before**: doer (100->200->400), reviewer (60->120), final
666
+ review (60->120), integ-test-runner (100->200, Issue 24). Uncovered:
667
+ planner, plan-reviewer, deployer, harvester -- each would degrade or
668
+ fail its round on a single exhaustion.
669
+ - **Fix** (runner.js): all four remaining member-dispatch sites gain
670
+ explicit turn budgets and the same resume ladder -- planner 100->200
671
+ (doer-sized, builds the whole DAG), plan-reviewer 60->120, deployer
672
+ 60->120 (the source-build fallback deploy runs npm ci + two builds),
673
+ harvester 60->120. Each resume repeats the role's withGitSync/dolt
674
+ bracket semantics (planner and harvester resumes carry pushBeads;
675
+ harvester resume carries pushCode).
676
+ - **Deliberate exception**: the two streak-assignment agent() sites stay
677
+ ladder-free -- they are pure-compute schema asks (no member run) whose
678
+ failure degrades safely to one-bead-per-streak, and they already have
679
+ their own bounded semantic-repair re-ask (Issue 15).
680
+ - **Structural baselines**: 18 agent sites, 16 withGitSync brackets,
681
+ 8 pushBeads brackets, 4 pushCode brackets.
682
+ - **Rollout**: run 14 launched minutes before this change (it has the
683
+ Issue 24 integ ladder, which is the one that matters for its critical
684
+ path); full coverage from run 15.
685
+
686
+ ### Run 14 outcome: full 5-cycle lifecycle, Final Verdict FAIL on the Issue 26 harness gap
687
+
688
+ - Run 14 was the campaign's most productive run and the first to complete
689
+ the whole sprint lifecycle: 5 cycles + Final Review + Harvest +
690
+ Publish PR (idempotent -- updated the existing PR). The integ phase ran
691
+ for the first time end to end and CLOSED 8 features in cycle 1, then
692
+ drove a real find-fix loop through genuine PRODUCT bugs across cycles:
693
+ eft.16 (dolt no-remote), eft.18 (canary self-provision), eft.19 (P0:
694
+ dev-mode install missing undici), eft.20 (P1: state.json corruption --
695
+ doubled-quote breaking JSON.parse in the eft.2 persistence path,
696
+ stalling auto-sprint after Plan), eft.21 (teardown ~-reresolution).
697
+ Every one fixed with tests; unit suite ended green (2337 passing).
698
+ - Final Verdict: FAIL -- correctly. The headline deliverable (auto-sprint
699
+ running a sprint end-to-end via the integ smoke test's Part 2 Test
700
+ scenario) never completed in any cycle. Root cause = Issue 26 below.
701
+ Final Review filed a newTask gating epic-close on a green Part 2 run.
702
+ - Two run-14-only gaps (both fixed for run 15): the Harvester hit turn
703
+ exhaustion with NO resume (run 14 launched minutes before the Issue 25
704
+ universal ladder), so docs were not harvested; and the completion gate
705
+ was never reachable because of Issue 26.
706
+
707
+ ### Issue 26: integ-test-runner cannot complete its own playbook's Part 2 (no MCP tools)
708
+
709
+ - **Symptom**: integ Part 2 "Test scenario" step 1 registered a member
710
+ via the `register_member` MCP tool, but the integ-test-runner agent is
711
+ granted only [Read, Bash, Grep, Glob] -- no MCP. Cycles C2/C3 only got
712
+ past it by hand-rolling a Bash HTTP/JSON-RPC call to the MCP server (the
713
+ workaround CLAUDE.md forbids); C4/C5 correctly refused and reported the
714
+ gap, so Part 2 never completed and the sprint could not sign off.
715
+ - **Root cause**: the agent's tool grant contradicted the playbook it
716
+ owns end to end. `register_member` had no CLI equivalent, so Part 2
717
+ step 1 was not shell-drivable at all.
718
+ - **Fix** (chosen by operator: add the CLI, not grant MCP -- keeps the
719
+ fix in apra-fleet, no apra-pm submodule/upstream PR, and makes Part 2
720
+ fully shell-only per the playbook's own Setup/Reset/Teardown principle):
721
+ new `register-member` CLI subcommand (src/cli/register-member.ts, wired
722
+ into src/index.ts) wrapping the SAME shared registerMember() function
723
+ the MCP tool uses (src/tools/register-member.ts:110) through the same
724
+ Zod schema -- no logic fork. integ-test-playbook.md Part 2 step 1
725
+ reworded to `node dist/index.js register-member --type local ...` via
726
+ Bash; the shell-vs-MCP notes updated (every section is now
727
+ shell-drivable). 9 new CLI tests; full suite green. Commit 60c518a.
728
+ - **Note**: local+claude registration still bootstraps an interactive
729
+ session needing the running server (Setup starts it) and spawns a real
730
+ claude process -- identical to the MCP path, faithfully wrapped, not
731
+ diverged.
732
+
733
+ ### Observed while dispatching the 0ei hotfix (separate track): stale busy lock
734
+
735
+ - fleet-dev's execute_prompt lock returned {"isError":true,"reason":
736
+ "busy"} for ~20 minutes while the member session was idle with no live
737
+ process (token counts frozen); stop_prompt reported "no active session
738
+ was running" and cleared it. A dispatch-layer lock leak on the fleet
739
+ server (v0.3.5_8a1ef3) -- likely left by an earlier abandoned/killed
740
+ dispatch. Watch for recurrence; if it repeats, file a server bead (lock
741
+ release on child-process reap, or a TTL/liveness check on
742
+ inFlightAgents).
743
+
744
+ ### Still open / watched
745
+
746
+ - **apra-fleet-eft.14 (server)**: why does the provider CLI sometimes exit
747
+ 0 with no parseable result/usage/sessionId? Client-side typed handling
748
+ is in place (Issue 3); the server-side parse gap needs its own
749
+ investigation.
750
+ - **apra-fleet-eft.15 (perf)**: repeated near-identical project-wide
751
+ `bd list` dumps within a phase (clearly visible in the fleet server log,
752
+ ~1.5-2s each); P2, not sprint-fatal.
753
+ - **POST-stream idle timeout risk**: OBSERVED in run 5 and fixed as Issue
754
+ 8 (iteration 2). Server-side SSE keepalives remain an optional hardening
755
+ follow-up.
756
+ - **apra-fleet-qv1**: parallel doer streaks to a single member are unsafe
757
+ (pre-existing bead, visible in the server log's bead dumps); single-member
758
+ sprints serialize doers so not currently hit.
759
+
760
+ ### Process change (2026-07-20): launch via the delivered CLI surface
761
+
762
+ From run 16 onward the stabilization loop launches sprints through the
763
+ delivered product surface instead of the raw engine path:
764
+
765
+ npm run build
766
+ node dist/index.js install (refresh ~/.apra-fleet workflow runtime)
767
+ node dist/index.js workflow auto-sprint --issue apra-fleet-eft \
768
+ --members fleet-rev --branch auto-sprint/eft-service \
769
+ --base feat/fleet-reorg --viewer-port 18300
770
+
771
+ Rationale: every relaunch now also exercises the dev-mode install asset
772
+ pipeline, the workflow launcher (version-skew check, ADR server
773
+ resolution, verbatim arg passthrough), matching how end users run
774
+ sprints. An install/launcher regression now blocks the loop by design --
775
+ that is surfaced signal, not friction to route around. The integ-test
776
+ playbook's smoke test (Part 2 step 3) already launches via
777
+ 'apra-fleet workflow auto-sprint', so both lanes now run the same
778
+ delivered surface. Version bumped to 0.4.0 on this branch (the reorg/eft
779
+ line ships as 0.4.0; 0.3.5 was released from main).
780
+
781
+ ### Issue 27 (run 15 C1): bare "continue" resume prompts lose per-dispatch scope
782
+
783
+ Observed live twice in run 15 C1. (a) The integ runner exhausted 100 turns,
784
+ was resumed with a generic continue-prompt, and returned featuresClosed: 0
785
+ with "this dispatch's .fleet-task.md carried no explicit feature-id list"
786
+ -- correct behavior per its missing-scope contract, because a resumed
787
+ dispatch DELIVERS A NEW PROMPT ARTIFACT to the member, replacing the
788
+ original one that carried the feature-id scope. (b) The resumed doer for
789
+ one streak drifted onto a previously-finished bead ("no new work to
790
+ continue") for the same reason: its continue-prompt never restated the
791
+ assigned bead ids.
792
+
793
+ Fix: the three resume sites whose contracts depend on per-dispatch scope
794
+ (integ-test-runner feature ids; doer bead ids + branch; reviewer bead ids
795
+ + branch/base) now restate that scope verbatim inside the resume prompt.
796
+ The five other resume sites (planner, plan-reviewer, deployer, final
797
+ review, harvester) self-derive their scope or carry it in-session and are
798
+ left as-is. Engine suite: 887 pass / 0 fail.
799
+
800
+ ### Issue 28 (run 15 C2/C3): undispatchable beads wasted a full doer dispatch per round
801
+
802
+ Observed live: 4 of 6 streaks in one Develop round were bug-type beads a
803
+ doer is contract-bound to refuse -- each still cost a complete LLM dispatch
804
+ that returned "skip" deterministically. Three engine holes, three fixes:
805
+ (a) readyLeafBeads built its decomposed-parent exclusion set from OPEN
806
+ children only, so the moment a bug's task children all closed it re-entered
807
+ doer seeding as a fake leaf -- now built from the any-status dump
808
+ (bdListScoped('') -- no new bd command); (b) streak seeding now mirrors the
809
+ doer contract engine-side, dropping non-task beads before dispatch, with
810
+ target issues exempt (the eft.24 childless-leaf-target sprint case must
811
+ stay dispatchable); (c) pending-closure BUGS (all task children closed) had
812
+ no closure owner at all -- doers refuse, reviewers may not close, integ
813
+ prompts only named features -- so they lingered open at goal forever; the
814
+ integ dispatch prompt now names them for verify-and-close.
815
+
816
+ ### Issue 29 (run 15 C3 R3): '-tier'-suffixed model metadata 404-failed a whole streak
817
+
818
+ An out-of-band injected bead carried metadata {"model": "standard-tier"};
819
+ the engine passed it verbatim to execute_prompt, the server tier map missed
820
+ it, and it reached the provider CLI as a literal model name: claude --model
821
+ standard-tier -> api_error_status 404, streak lost. Fix: normalizeTierToken()
822
+ containment-normalizes any value holding exactly ONE tier word (any
823
+ case/shape) at the single engine read site; zero or multiple matches pass
824
+ through untouched so explicit model ids are never mangled. The planner
825
+ prompt's defensive '-tier' legalese was trimmed at the same time -- enforce
826
+ in code, not prompts. Data fixed member-side (eft.26/27 -> "standard").
827
+
828
+ ### Issue 30 (run 15 C4, preemptive): 60-min hard ceiling would false-fail a long integ pass
829
+
830
+ Found by inspection while Integ Test C4 was in flight -- the first integ
831
+ pass expected to run LONG (real suites + a full sandbox smoke sprint),
832
+ which is exactly when the ceiling matters. The integ dispatch set
833
+ timeout_s: 3600 AND max_total_s: 3600. The first is an inactivity timer
834
+ (resets on member stdout; the playbook's background-sprint poll loop keeps
835
+ it fed). The second is a HARD kill at elapsed time regardless of activity
836
+ or progress. A timer kill surfaces as a plain AgentDispatchError, which
837
+ the catch converts to passed:false -- a FALSE integ failure -- and the
838
+ resume ladder only matches reason max_turns_exhausted, so the killed run
839
+ gets no resume even if minutes from done. Compounding: two such cycles
840
+ with no other closes trip stall-abort and kill the whole run.
841
+
842
+ Note the sprint-level stall detector is NOT a risk here: it is cycle-
843
+ granular (closed-bead high-water mark at cycle evaluation), structurally
844
+ unable to fire mid-phase.
845
+
846
+ Fix: integ runner max_total_s raised to 7200 while keeping timeout_s at
847
+ 3600 -- a genuinely hung runner still dies after 60 min of silence; an
848
+ active long pass gets 2h of headroom. Other roles keep 3600/3600 (deploy,
849
+ plan, review are not plausibly hour-plus when healthy). Takes effect run
850
+ 16; run 15's in-flight C4 still carries the 60-min ceiling, so a C4 integ
851
+ result of passed:false with a dispatch-failed summary near the 60-min mark
852
+ should be read as THIS signature, not a real test failure.
853
+
854
+ ### Issue 31 (run 15 verdict FAIL, root cause of eft.30): D-push gate ran AFTER the push attempt
855
+
856
+ The single most serious finding of run 15: in doltPushAfter(), `bd dolt
857
+ push` was attempted FIRST and isMemberSyncRemoteConfigured() was consulted
858
+ only on the FAILURE path (eft.30.2), to downgrade an unclassifiable failure
859
+ to a benign skip. But bd auto-provisions a Dolt-level remote from git's own
860
+ origin on the push attempt itself, so on a clone with valid credentials the
861
+ push SUCCEEDS against the real shared remote -- neutralization verified
862
+ clean seconds earlier is simply re-armed. Observed live in integ C4 AND C5:
863
+ a sandbox reached the real fleet-e2e-toy remote and was stopped only by the
864
+ machine's missing GitHub credentials, not by design. The C5 R3 reviewer
865
+ reopened eft.30 with exactly this diagnosis; the final FAIL verdict cited
866
+ it as the run's core defect.
867
+
868
+ Fix: the push is now gated BEFORE being issued -- when the member's
869
+ bd-level sync.remote is positively confirmed absent/neutralized, no `bd
870
+ dolt push` command is issued at all (same benign no-remote skip result).
871
+ isMemberSyncRemoteConfigured fails CLOSED (any inconclusive read reports
872
+ configured), so a real, actively-synced clone always still pushes; the
873
+ eft.30.2 failure-path downgrade stays as defense-in-depth. New test pins
874
+ the load-bearing assertion: with sync.remote absent, ZERO push commands are
875
+ ISSUED (not merely "the failure was benign"); a stateful-stub test keeps
876
+ the failure-path branch covered. Cost: one `bd config get sync.remote`
877
+ read per D-push bracket. Goldens refreshed (8 pre-gate reads now appear in
878
+ the happy-path transcript); arg-contract member-routing tests exclude the
879
+ new read alongside `bd dolt *` (same per-member bracket class). Engine
880
+ suite: 960 pass / 0 fail; root vitest green minus the 2 known Windows-local
881
+ teardown flakes.
882
+
883
+ ### Issue 32 (run 15 integ C4/C5): a live-but-silent hung dispatch costs a full hour, and no watchdog CAN fire
884
+
885
+ The eft.28 recurrence signature: the sandbox planner dispatch hung with
886
+ its PID alive, dashboard state frozen 2m15s+, zero output. "Why did no
887
+ watchdog call it stalled?" -- because with `claude -p` there is no signal
888
+ to watch: the CLI prints nothing until the turn completes (Issue 12), so
889
+ server-side inactivity == total runtime and an output-based watchdog
890
+ cannot distinguish a hang from silent work. The engine DOES self-heal (the
891
+ dispatch dies at timeout_s and the retry/resume ladders take over) but at
892
+ the cost of the full dispatch budget: 60 minutes lost per hang, fatal
893
+ inside a 10-minute canary smoke test.
894
+
895
+ Engine fix: the budget is now an arg. `dispatch_timeout_s` (default 3600,
896
+ floor 60; CLI `--dispatch-timeout-s`) is applied as BOTH timeout_s and
897
+ max_total_s at every dispatch site (the Issue 12 equality is preserved at
898
+ any value), with the integ-test ceiling at 2x (preserving Issue 30). The
899
+ integ playbook's sandbox canary launch now passes 900 -- a hang there
900
+ costs 15 minutes and the sprint's own ladders recover. TRUE liveness
901
+ detection (is the member's claude process making progress?) requires a
902
+ member-side signal the orchestrator does not have; that remains the open
903
+ eft.28 product bead (execute-prompt.ts), now with two cycles of fresh
904
+ repro evidence.
905
+
906
+ Also found while editing: the playbook's smoke step named a
907
+ `skip_dolt_push: true` arg that has never existed in the engine
908
+ (validateArgs would reject it; the CLI's strict parser has no such flag)
909
+ -- removed, with sandbox isolation now genuinely enforced by the Issue 31
910
+ pre-gate instead. Tests: arg-contract suite pins default/validation and
911
+ end-to-end plumbing (every mock dispatch carries the overridden budget).
912
+ Engine suite: 963 pass / 0 fail.
913
+
914
+ ### Issue 33 (run 15 C5): a regressed bug with closed children is unreachable by every role
915
+
916
+ Observed end-to-end in run 15 C5: eft.28 and eft.30 carried fresh
917
+ "recurred despite the landed fixes" evidence from integ C4, but their fix
918
+ children were all closed -- so the plan reviewer classified them as
919
+ pending-closure ("do NOT re-decompose"), the planner left them alone,
920
+ doers refused them as non-task beads (three full develop rounds of nine
921
+ refusals each), and the integ runner may only verify-and-close. Nobody in
922
+ the role graph had authority to create NEW fix tasks for a regression;
923
+ the run ended FAIL on exactly those two beads.
924
+
925
+ Fix: a REGRESSION EXCEPTION added to both sides of the Issue 14/21 rule
926
+ pair. buildPlannerPrompt (delta cycles): an open bug whose children are
927
+ all closed but whose notes record the defect reproducing AFTER closure is
928
+ a regression -- read the latest evidence and create NEW fix + [test] task
929
+ children targeting the residual mechanism (never duplicating the closed
930
+ fix). buildPlanReviewerPrompt: such a bug with no new open task children
931
+ makes the plan NOT approvable (CHANGES_NEEDED); bugs without post-closure
932
+ recurrence stay under pending-closure as before. Goldens refreshed.
933
+ Engine suite: 963 pass / 0 fail.
934
+
935
+ ### Issue 34 (run 16 C1 R2): Issue 28's seeding filter missed the in-loop site
936
+
937
+ Observed live: bug bead eft.37 (filed mid-run, after the plan phase) was
938
+ seeded into its own doer streak in Develop C1 R2. Root cause: the Issue 28
939
+ dispatchability filter was applied only to the PRE-LOOP readyBeads list
940
+ (the round-zero check); the IN-LOOP currentReady list -- the one that
941
+ actually feeds the streak-assignment prompt each round -- had no filter,
942
+ so any non-task bead born after planning (reviewer newTasks are created
943
+ as tasks, but out-of-band bug filings are not) reaches a doer and burns a
944
+ dispatch on a contract-bound refusal. Fix: same filter (with the same
945
+ target-issue exemption) applied at the in-loop site. Honest note: no test
946
+ ever pinned the filter directly -- that is exactly why the second site
947
+ slipped; the run-16 live sprint is the current verification, and a
948
+ focused seeding-filter unit remains worth adding when the runner's
949
+ seeding is next factored testably. Engine suite: 963 pass; the 2
950
+ dolt-sync-discipline real-subprocess failures are the known Windows EBUSY
951
+ temp-dir-cleanup flake (same class PR #332 fixed elsewhere), aggravated
952
+ by the live sprint's dolt server -- unrelated to this change.
953
+
954
+ ## Issue 35: install boundary used a stale binary (9 commits behind tip)
955
+
956
+ Observed: run 17's installed runtime (built at 4286ef0) lacked eft.38's
957
+ viewer more-button plus engine fixes it was meant to validate (Issue 34
958
+ in-loop filter, eft.28.3 client dispatch watchdog, eft.34/35 D-pull
959
+ gates, eft.27.4 stdout cap). Root cause: the SEA binary was built hours
960
+ before the install boundary and never rebuilt from the branch tip; the
961
+ delivered-binary convention runs the INSTALLED runtime, so workspace
962
+ commits after the build silently do not participate.
963
+
964
+ Rule adopted: at every run boundary, git fetch + fast-forward the
965
+ workspace to origin tip, run the suites, `npm run build:binary`, THEN
966
+ `install --force` -- and verify `apra-fleet version` reports the tip
967
+ short-SHA before relaunching. Never install a binary whose embedded
968
+ version does not match the branch tip.
969
+
970
+ ## Issue 36: eft.41.1/41.2 fix pair killed every real sprint launch
971
+
972
+ Observed: run 18 died at t=0 with the new 41.2 backstop's own error
973
+ ("entry did not execute ... Nothing happened"). cli.mjs self-executes
974
+ via its isMainModule() guard but never declared the launcher contract
975
+ `export const selfExecuting = true`; its async main() starts, the import
976
+ resolves, the backstop sees no flag and no exported callable, errors,
977
+ and returns 1 -- killing the sprint it just started. All platforms, all
978
+ real launches. It escaped the doer's validation because `--help` calls
979
+ process.exit(0) during import, before the backstop runs -- the only path
980
+ CI smoke exercises (hello-world is safe the same way).
981
+
982
+ Fix: declare `export const selfExecuting = true` in cli.mjs (d0c000a).
983
+ Verified: run 19 launches and runs on the delivered binary. Lesson
984
+ recorded on eft.41: the [test] child must exercise a REAL-ARGS launch
985
+ through the launcher import path, not only --help; a backstop that fires
986
+ on "no observable execution" must account for guarded self-executing
987
+ modules that neither export nor exit.
988
+
989
+ ## Issue 37: sprint branches are a CI blind spot
990
+
991
+ Observed: ci.yml triggers only on PRs to main and pushes to main, so the
992
+ sprint branch accumulated ~20 commits with ZERO CI signal; the first-ever
993
+ run (manual workflow_dispatch, 29803574606) immediately caught a broken
994
+ intermediate state no member could see. Rule: at every install boundary,
995
+ manually dispatch CI on the sprint branch (gh workflow run --ref <branch>)
996
+ and treat its result as a gate input. Candidate engine fix: add a push
997
+ trigger for auto-sprint/** or have the runner dispatch CI after each
998
+ review-approved round.
999
+
1000
+ ## Issue 38: never descope one half of a sequenced migration
1001
+
1002
+ Observed: eft.37.1 (core rename) landed with an explicit note that the se
1003
+ package cannot import until eft.37.2 updates consumers; the orchestrator
1004
+ then descoped the whole eft.37 family to P3 -- stranding the branch in a
1005
+ knowingly-broken intermediate state that CI (Issue 37) exposed: all 10
1006
+ supervisor test files failed at import. Rule: before cutting scope, check
1007
+ each candidate for landed-but-incomplete sequenced work (a sibling commit
1008
+ already on the branch that depends on it); restore the minimal completing
1009
+ task (37.2) rather than reverting landed work.
1010
+
1011
+ ## Issue 39: stale in_progress beads are gate-blocking zombies
1012
+
1013
+ Observed: eft.13.4 sat in_progress for 2 days after its doer streak was
1014
+ interrupted -- its work had actually LANDED (salvage commit 8b6c987) but
1015
+ the bead was never closed, and in_progress beads do not re-enter the ready
1016
+ set. A full audit found 5 more stale claims (eft.19/7/15/12/17.1), several
1017
+ with all work complete. Rules: audit Started/Updated timestamps, not
1018
+ status glyphs; cross-reference claimed beads against landed commits before
1019
+ believing any status; engine candidate: a streak that ends abnormally must
1020
+ reset its claimed beads to open (or the runner sweeps claims older than a
1021
+ cycle at plan time).
1022
+
1023
+ ## Issue 40: closed-bead notes are a feedback black hole
1024
+
1025
+ Observed: recurring user feedback (viewer scroll, LLM-output more button)
1026
+ was appended as notes to CLOSED beads (eft.27 family, eft.38) where no
1027
+ planner or verifier ever looks; the defects survived multiple 'fixed'
1028
+ cycles. eft.38's closing unit test fabricated an activity shape (inline
1029
+ output + Truncated flag) the real pipeline never produces, so the feature
1030
+ shipped rendering zero buttons. Rules: post-closure regressions REOPEN the
1031
+ old bead with evidence (never file a duplicate -- lineage matters); search
1032
+ all statuses AND all prefixes before filing anything (two open scroll bugs
1033
+ sat outside the epic, invisible to every sprint); UX beads must carry
1034
+ machine-verifiable acceptance (DOM measurement or HTTP check) so integ can
1035
+ verify closures without a human eyeball.
1036
+
1037
+ ## Issue 41: the bead-injection contract applies to the orchestrator too
1038
+
1039
+ Observed: orchestrator-injected eft.18.5 was rejected by the plan reviewer
1040
+ for exactly the defects the injection contract predicts: no model metadata
1041
+ key, oversized scope (playbook rewrite + multi-file test retirement in one
1042
+ task), and an open task under a closed parent. The planner had to spend a
1043
+ round restructuring it (18.5/.6/.7 + 18.8). Rule: orchestrator-side beads
1044
+ follow the same contract as member-side ones -- model metadata set, single
1045
+ -concern task size, correct parentage -- or they cost a plan round.
1046
+
1047
+ ## Issue 42: structural isolation beats runtime neutralization
1048
+
1049
+ Observed: the smoke test's entire recurring bug family (eft.18/25/30/31/
1050
+ 39/47 -- neutralize dance, origin breakage, canary misses, Dolt remote
1051
+ re-adoption) stems from one design divergence: it hydrates beads from the
1052
+ live shared Dolt remote (bd bootstrap) and then tries to clean up, while
1053
+ the e2e suite prevents the class structurally (no-db JSONL seeding, remote
1054
+ never configured). Adopted design (eft.18.5-.8, user-amended): seed like
1055
+ e2e (bd init --from-jsonl, hardcoded canary gh-toy-4ef) but keep the
1056
+ workflow's D-push/D-pull under test against a sandbox-local file://
1057
+ THROWAWAY remote; git origin points at a local mirror so bd's
1058
+ push-time remote auto-provisioning can only ever derive sandbox paths; the
1059
+ four-check guard script is retargeted (all remotes must resolve inside the
1060
+ sandbox), never deleted. Safety invariant: the real remote URL must not
1061
+ appear anywhere in sandbox git or beads config at any point.
1062
+ ## Issue 43: Smoke-test rehearsal on a second platform finds holes the author platform cannot (2026-07-21)
1063
+
1064
+ **What happened:** Before run 19's Integ C3 executed the rewritten smoke-test
1065
+ playbook on fleet-rev (macOS), the orchestrator rehearsed the same playbook
1066
+ on the Windows host in an isolated sandbox (own HOME, port, throwaway
1067
+ remotes), with real model dispatches. The rehearsal surfaced six holes, four
1068
+ of which would have failed the real run:
1069
+
1070
+ 1. (doc) Playbook assumes a built repo: `dist/` present and `packages/apra-fleet-se/apra-pm`
1071
+ submodule initialized. Fresh checkout fails at `install` step 6/12.
1072
+ Fix: prerequisites block (recursive clone/`git submodule update --init
1073
+ --recursive`, `npm install && npm run build`).
1074
+ 2. (product, Windows) `start` trusts `schtasks /query` for "service
1075
+ installed" -- schtasks is per-user global, not HOME-scoped, so a
1076
+ sandboxed start finds the operator's REAL ApraFleet task and starts
1077
+ that; the sandbox server never spawns. The real server survived only
1078
+ via its own singleton guard. macOS is immune (plist existence check
1079
+ under the overridden HOME).
1080
+ 3. (playbook, all platforms) Fresh sandbox HOME has no git identity; bd's
1081
+ seed commit fails exit 128 and the toy doer's first commit would too.
1082
+ Fix: seed `git config --global user.name/email` in Setup.
1083
+ 4. (product, all platforms) `auth --oauth` wrote a credentials file with
1084
+ ONLY `claudeAiOauth.accessToken`; the Claude CLI requires at least
1085
+ `expiresAt` and treats the file as "Not logged in". Every dispatch
1086
+ failed auth. Fix (validated in rehearsal): `auth --oauth` accepts a
1087
+ full claudeAiOauth JSON object as the secret; the playbook seeds the
1088
+ whole object from REAL_HOME, preserving real expiry + refresh token.
1089
+ The eft.48.2 checker passed while dispatch failed -- it verifies the
1090
+ file lands, not that Claude accepts it; harden with expiresAt check.
1091
+ 5. (product+engine, all platforms) Auth failures are retried and can hang:
1092
+ the non-interactive dispatch path fails fast (8s, classified 'auth'),
1093
+ but (a) the interactive path waits the full --dispatch-timeout-s with
1094
+ no output classification; (b) register_member launches the member's
1095
+ live session BEFORE credentials are provisioned (playbook order:
1096
+ register step 1, provision step 3), creating a permanently
1097
+ unauthenticated zombie session that a later file fix cannot heal; and
1098
+ (c) the engine's dispatch retry wrapper retries an error that begins
1099
+ "Authentication failed" five times -- isRetryable() already says
1100
+ 'auth' is terminal, but the engine never consults it. A transport
1101
+ timeout string was also fed into the schema-repair loop as if it were
1102
+ agent output.
1103
+ 6. (doc) The "every step is shell-drivable" claim has no shell-drivable
1104
+ recovery: there is no remove-member/relaunch-session CLI path, so an
1105
+ unauthenticated member cannot be relaunched without restarting the
1106
+ sandbox server.
1107
+
1108
+ **Lesson:** A playbook exercised only on the platform and machine where it
1109
+ was written inherits that machine's ambient state (running server, service
1110
+ registrations, git identity, credential shape). One rehearsal on a second
1111
+ platform with a genuinely cold HOME is cheap relative to an integ cycle and
1112
+ converts "integ failed, cycle N+1" into "root-caused beads before integ
1113
+ completed". Retry policy must be category-driven: an auth failure can never
1114
+ be solved by retry.
1115
+
1116
+ **Outcome:** Holes 3/4 (playbook+product) fixed in 98ff2a1/ae8b870, hole
1117
+ 5's engine piece (category-driven retry: never retry auth/trust) in
1118
+ 5e5ab49, all pushed to the sprint branch before Cycle 4's develop rounds.
1119
+ Integ C3 on fleet-rev independently root-caused hole 4 with the identical
1120
+ diagnosis minutes later (its evidence lives on apra-fleet-eft.48; the
1121
+ silent retry hang is apra-fleet-eft.50), corroborating the rehearsal
1122
+ without either run seeing the other's analysis. Hole 5's remaining
1123
+ server-side pieces (interactive-path output classification,
1124
+ register-launch auth health check) and hole 2 (Windows schtasks leak)
1125
+ stay open as beads for the sprint.