@apralabs/apra-fleet 0.2.2

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 (482) hide show
  1. package/LICENSE +182 -0
  2. package/README.md +324 -0
  3. package/dist/cli/auth.d.ts +2 -0
  4. package/dist/cli/auth.d.ts.map +1 -0
  5. package/dist/cli/auth.js +210 -0
  6. package/dist/cli/auth.js.map +1 -0
  7. package/dist/cli/config.d.ts +30 -0
  8. package/dist/cli/config.d.ts.map +1 -0
  9. package/dist/cli/config.js +157 -0
  10. package/dist/cli/config.js.map +1 -0
  11. package/dist/cli/install.d.ts +37 -0
  12. package/dist/cli/install.d.ts.map +1 -0
  13. package/dist/cli/install.js +630 -0
  14. package/dist/cli/install.js.map +1 -0
  15. package/dist/cli/secret.d.ts +2 -0
  16. package/dist/cli/secret.d.ts.map +1 -0
  17. package/dist/cli/secret.js +366 -0
  18. package/dist/cli/secret.js.map +1 -0
  19. package/dist/cli/uninstall.d.ts +2 -0
  20. package/dist/cli/uninstall.d.ts.map +1 -0
  21. package/dist/cli/uninstall.js +312 -0
  22. package/dist/cli/uninstall.js.map +1 -0
  23. package/dist/cli/update.d.ts +2 -0
  24. package/dist/cli/update.d.ts.map +1 -0
  25. package/dist/cli/update.js +105 -0
  26. package/dist/cli/update.js.map +1 -0
  27. package/dist/delivery-mode.d.ts +19 -0
  28. package/dist/delivery-mode.d.ts.map +1 -0
  29. package/dist/delivery-mode.js +26 -0
  30. package/dist/delivery-mode.js.map +1 -0
  31. package/dist/index.d.ts +3 -0
  32. package/dist/index.d.ts.map +1 -0
  33. package/dist/index.js +272 -0
  34. package/dist/index.js.map +1 -0
  35. package/dist/onboarding/text.d.ts +83 -0
  36. package/dist/onboarding/text.d.ts.map +1 -0
  37. package/dist/onboarding/text.js +126 -0
  38. package/dist/onboarding/text.js.map +1 -0
  39. package/dist/os/index.d.ts +9 -0
  40. package/dist/os/index.d.ts.map +1 -0
  41. package/dist/os/index.js +16 -0
  42. package/dist/os/index.js.map +1 -0
  43. package/dist/os/linux.d.ts +50 -0
  44. package/dist/os/linux.d.ts.map +1 -0
  45. package/dist/os/linux.js +244 -0
  46. package/dist/os/linux.js.map +1 -0
  47. package/dist/os/macos.d.ts +12 -0
  48. package/dist/os/macos.d.ts.map +1 -0
  49. package/dist/os/macos.js +41 -0
  50. package/dist/os/macos.js.map +1 -0
  51. package/dist/os/os-commands.d.ts +47 -0
  52. package/dist/os/os-commands.d.ts.map +1 -0
  53. package/dist/os/os-commands.js +3 -0
  54. package/dist/os/os-commands.js.map +1 -0
  55. package/dist/os/windows-wrapper.d.ts +6 -0
  56. package/dist/os/windows-wrapper.d.ts.map +1 -0
  57. package/dist/os/windows-wrapper.js +9 -0
  58. package/dist/os/windows-wrapper.js.map +1 -0
  59. package/dist/os/windows.d.ts +44 -0
  60. package/dist/os/windows.d.ts.map +1 -0
  61. package/dist/os/windows.js +269 -0
  62. package/dist/os/windows.js.map +1 -0
  63. package/dist/paths.d.ts +2 -0
  64. package/dist/paths.d.ts.map +1 -0
  65. package/dist/paths.js +4 -0
  66. package/dist/paths.js.map +1 -0
  67. package/dist/providers/agy.d.ts +41 -0
  68. package/dist/providers/agy.d.ts.map +1 -0
  69. package/dist/providers/agy.js +208 -0
  70. package/dist/providers/agy.js.map +1 -0
  71. package/dist/providers/claude.d.ts +40 -0
  72. package/dist/providers/claude.d.ts.map +1 -0
  73. package/dist/providers/claude.js +178 -0
  74. package/dist/providers/claude.js.map +1 -0
  75. package/dist/providers/codex.d.ts +44 -0
  76. package/dist/providers/codex.d.ts.map +1 -0
  77. package/dist/providers/codex.js +173 -0
  78. package/dist/providers/codex.js.map +1 -0
  79. package/dist/providers/copilot.d.ts +40 -0
  80. package/dist/providers/copilot.d.ts.map +1 -0
  81. package/dist/providers/copilot.js +172 -0
  82. package/dist/providers/copilot.js.map +1 -0
  83. package/dist/providers/gemini.d.ts +41 -0
  84. package/dist/providers/gemini.d.ts.map +1 -0
  85. package/dist/providers/gemini.js +192 -0
  86. package/dist/providers/gemini.js.map +1 -0
  87. package/dist/providers/index.d.ts +10 -0
  88. package/dist/providers/index.d.ts.map +1 -0
  89. package/dist/providers/index.js +27 -0
  90. package/dist/providers/index.js.map +1 -0
  91. package/dist/providers/provider.d.ts +85 -0
  92. package/dist/providers/provider.d.ts.map +1 -0
  93. package/dist/providers/provider.js +21 -0
  94. package/dist/providers/provider.js.map +1 -0
  95. package/dist/services/auth-socket.d.ts +87 -0
  96. package/dist/services/auth-socket.d.ts.map +1 -0
  97. package/dist/services/auth-socket.js +684 -0
  98. package/dist/services/auth-socket.js.map +1 -0
  99. package/dist/services/auth-web.d.ts +31 -0
  100. package/dist/services/auth-web.d.ts.map +1 -0
  101. package/dist/services/auth-web.js +202 -0
  102. package/dist/services/auth-web.js.map +1 -0
  103. package/dist/services/cloud/activity.d.ts +16 -0
  104. package/dist/services/cloud/activity.d.ts.map +1 -0
  105. package/dist/services/cloud/activity.js +61 -0
  106. package/dist/services/cloud/activity.js.map +1 -0
  107. package/dist/services/cloud/aws.d.ts +24 -0
  108. package/dist/services/cloud/aws.d.ts.map +1 -0
  109. package/dist/services/cloud/aws.js +114 -0
  110. package/dist/services/cloud/aws.js.map +1 -0
  111. package/dist/services/cloud/cost.d.ts +46 -0
  112. package/dist/services/cloud/cost.d.ts.map +1 -0
  113. package/dist/services/cloud/cost.js +161 -0
  114. package/dist/services/cloud/cost.js.map +1 -0
  115. package/dist/services/cloud/idle-manager.d.ts +20 -0
  116. package/dist/services/cloud/idle-manager.d.ts.map +1 -0
  117. package/dist/services/cloud/idle-manager.js +103 -0
  118. package/dist/services/cloud/idle-manager.js.map +1 -0
  119. package/dist/services/cloud/lifecycle.d.ts +14 -0
  120. package/dist/services/cloud/lifecycle.d.ts.map +1 -0
  121. package/dist/services/cloud/lifecycle.js +128 -0
  122. package/dist/services/cloud/lifecycle.js.map +1 -0
  123. package/dist/services/cloud/task-wrapper.d.ts +30 -0
  124. package/dist/services/cloud/task-wrapper.d.ts.map +1 -0
  125. package/dist/services/cloud/task-wrapper.js +116 -0
  126. package/dist/services/cloud/task-wrapper.js.map +1 -0
  127. package/dist/services/cloud/types.d.ts +26 -0
  128. package/dist/services/cloud/types.d.ts.map +1 -0
  129. package/dist/services/cloud/types.js +2 -0
  130. package/dist/services/cloud/types.js.map +1 -0
  131. package/dist/services/credential-cleanup.d.ts +4 -0
  132. package/dist/services/credential-cleanup.d.ts.map +1 -0
  133. package/dist/services/credential-cleanup.js +61 -0
  134. package/dist/services/credential-cleanup.js.map +1 -0
  135. package/dist/services/credential-store.d.ts +56 -0
  136. package/dist/services/credential-store.d.ts.map +1 -0
  137. package/dist/services/credential-store.js +280 -0
  138. package/dist/services/credential-store.js.map +1 -0
  139. package/dist/services/file-transfer.d.ts +22 -0
  140. package/dist/services/file-transfer.d.ts.map +1 -0
  141. package/dist/services/file-transfer.js +14 -0
  142. package/dist/services/file-transfer.js.map +1 -0
  143. package/dist/services/git-config.d.ts +6 -0
  144. package/dist/services/git-config.d.ts.map +1 -0
  145. package/dist/services/git-config.js +31 -0
  146. package/dist/services/git-config.js.map +1 -0
  147. package/dist/services/github-app.d.ts +30 -0
  148. package/dist/services/github-app.d.ts.map +1 -0
  149. package/dist/services/github-app.js +96 -0
  150. package/dist/services/github-app.js.map +1 -0
  151. package/dist/services/icons.d.ts +16 -0
  152. package/dist/services/icons.d.ts.map +1 -0
  153. package/dist/services/icons.js +67 -0
  154. package/dist/services/icons.js.map +1 -0
  155. package/dist/services/known-hosts.d.ts +23 -0
  156. package/dist/services/known-hosts.d.ts.map +1 -0
  157. package/dist/services/known-hosts.js +86 -0
  158. package/dist/services/known-hosts.js.map +1 -0
  159. package/dist/services/onboarding.d.ts +68 -0
  160. package/dist/services/onboarding.d.ts.map +1 -0
  161. package/dist/services/onboarding.js +205 -0
  162. package/dist/services/onboarding.js.map +1 -0
  163. package/dist/services/registry.d.ts +16 -0
  164. package/dist/services/registry.d.ts.map +1 -0
  165. package/dist/services/registry.js +156 -0
  166. package/dist/services/registry.js.map +1 -0
  167. package/dist/services/sftp.d.ts +16 -0
  168. package/dist/services/sftp.d.ts.map +1 -0
  169. package/dist/services/sftp.js +104 -0
  170. package/dist/services/sftp.js.map +1 -0
  171. package/dist/services/ssh.d.ts +29 -0
  172. package/dist/services/ssh.d.ts.map +1 -0
  173. package/dist/services/ssh.js +297 -0
  174. package/dist/services/ssh.js.map +1 -0
  175. package/dist/services/stall/find-log-file.d.ts +2 -0
  176. package/dist/services/stall/find-log-file.d.ts.map +1 -0
  177. package/dist/services/stall/find-log-file.js +153 -0
  178. package/dist/services/stall/find-log-file.js.map +1 -0
  179. package/dist/services/stall/index.d.ts +4 -0
  180. package/dist/services/stall/index.d.ts.map +1 -0
  181. package/dist/services/stall/index.js +4 -0
  182. package/dist/services/stall/index.js.map +1 -0
  183. package/dist/services/stall/log-path-resolver.d.ts +4 -0
  184. package/dist/services/stall/log-path-resolver.d.ts.map +1 -0
  185. package/dist/services/stall/log-path-resolver.js +32 -0
  186. package/dist/services/stall/log-path-resolver.js.map +1 -0
  187. package/dist/services/stall/log-path-resolver.test.d.ts +2 -0
  188. package/dist/services/stall/log-path-resolver.test.d.ts.map +1 -0
  189. package/dist/services/stall/log-path-resolver.test.js +76 -0
  190. package/dist/services/stall/log-path-resolver.test.js.map +1 -0
  191. package/dist/services/stall/read-log-tail.d.ts +6 -0
  192. package/dist/services/stall/read-log-tail.d.ts.map +1 -0
  193. package/dist/services/stall/read-log-tail.js +44 -0
  194. package/dist/services/stall/read-log-tail.js.map +1 -0
  195. package/dist/services/stall/stall-detector.d.ts +25 -0
  196. package/dist/services/stall/stall-detector.d.ts.map +1 -0
  197. package/dist/services/stall/stall-detector.js +153 -0
  198. package/dist/services/stall/stall-detector.js.map +1 -0
  199. package/dist/services/stall/stall-poller.d.ts +6 -0
  200. package/dist/services/stall/stall-poller.d.ts.map +1 -0
  201. package/dist/services/stall/stall-poller.js +75 -0
  202. package/dist/services/stall/stall-poller.js.map +1 -0
  203. package/dist/services/stall/time-utils.d.ts +4 -0
  204. package/dist/services/stall/time-utils.d.ts.map +1 -0
  205. package/dist/services/stall/time-utils.js +22 -0
  206. package/dist/services/stall/time-utils.js.map +1 -0
  207. package/dist/services/statusline.d.ts +10 -0
  208. package/dist/services/statusline.d.ts.map +1 -0
  209. package/dist/services/statusline.js +84 -0
  210. package/dist/services/statusline.js.map +1 -0
  211. package/dist/services/strategy.d.ts +16 -0
  212. package/dist/services/strategy.d.ts.map +1 -0
  213. package/dist/services/strategy.js +241 -0
  214. package/dist/services/strategy.js.map +1 -0
  215. package/dist/services/task-cleanup.d.ts +3 -0
  216. package/dist/services/task-cleanup.d.ts.map +1 -0
  217. package/dist/services/task-cleanup.js +81 -0
  218. package/dist/services/task-cleanup.js.map +1 -0
  219. package/dist/services/update-check.d.ts +15 -0
  220. package/dist/services/update-check.d.ts.map +1 -0
  221. package/dist/services/update-check.js +67 -0
  222. package/dist/services/update-check.js.map +1 -0
  223. package/dist/services/user-config.d.ts +12 -0
  224. package/dist/services/user-config.d.ts.map +1 -0
  225. package/dist/services/user-config.js +73 -0
  226. package/dist/services/user-config.js.map +1 -0
  227. package/dist/services/vcs/azure-devops.d.ts +7 -0
  228. package/dist/services/vcs/azure-devops.d.ts.map +1 -0
  229. package/dist/services/vcs/azure-devops.js +38 -0
  230. package/dist/services/vcs/azure-devops.js.map +1 -0
  231. package/dist/services/vcs/bitbucket.d.ts +6 -0
  232. package/dist/services/vcs/bitbucket.d.ts.map +1 -0
  233. package/dist/services/vcs/bitbucket.js +31 -0
  234. package/dist/services/vcs/bitbucket.js.map +1 -0
  235. package/dist/services/vcs/constants.d.ts +2 -0
  236. package/dist/services/vcs/constants.d.ts.map +1 -0
  237. package/dist/services/vcs/constants.js +6 -0
  238. package/dist/services/vcs/constants.js.map +1 -0
  239. package/dist/services/vcs/github.d.ts +6 -0
  240. package/dist/services/vcs/github.d.ts.map +1 -0
  241. package/dist/services/vcs/github.js +81 -0
  242. package/dist/services/vcs/github.js.map +1 -0
  243. package/dist/services/vcs/types.d.ts +52 -0
  244. package/dist/services/vcs/types.d.ts.map +1 -0
  245. package/dist/services/vcs/types.js +8 -0
  246. package/dist/services/vcs/types.js.map +1 -0
  247. package/dist/smoke-test.d.ts +10 -0
  248. package/dist/smoke-test.d.ts.map +1 -0
  249. package/dist/smoke-test.js +102 -0
  250. package/dist/smoke-test.js.map +1 -0
  251. package/dist/tools/check-status.d.ts +11 -0
  252. package/dist/tools/check-status.d.ts.map +1 -0
  253. package/dist/tools/check-status.js +247 -0
  254. package/dist/tools/check-status.js.map +1 -0
  255. package/dist/tools/cloud-control.d.ts +17 -0
  256. package/dist/tools/cloud-control.d.ts.map +1 -0
  257. package/dist/tools/cloud-control.js +102 -0
  258. package/dist/tools/cloud-control.js.map +1 -0
  259. package/dist/tools/compose-permissions.d.ts +26 -0
  260. package/dist/tools/compose-permissions.d.ts.map +1 -0
  261. package/dist/tools/compose-permissions.js +217 -0
  262. package/dist/tools/compose-permissions.js.map +1 -0
  263. package/dist/tools/credential-store-delete.d.ts +11 -0
  264. package/dist/tools/credential-store-delete.d.ts.map +1 -0
  265. package/dist/tools/credential-store-delete.js +15 -0
  266. package/dist/tools/credential-store-delete.js.map +1 -0
  267. package/dist/tools/credential-store-list.d.ts +4 -0
  268. package/dist/tools/credential-store-list.d.ts.map +1 -0
  269. package/dist/tools/credential-store-list.js +30 -0
  270. package/dist/tools/credential-store-list.js.map +1 -0
  271. package/dist/tools/credential-store-set.d.ts +26 -0
  272. package/dist/tools/credential-store-set.d.ts.map +1 -0
  273. package/dist/tools/credential-store-set.js +28 -0
  274. package/dist/tools/credential-store-set.js.map +1 -0
  275. package/dist/tools/credential-store-update.d.ts +20 -0
  276. package/dist/tools/credential-store-update.d.ts.map +1 -0
  277. package/dist/tools/credential-store-update.js +38 -0
  278. package/dist/tools/credential-store-update.js.map +1 -0
  279. package/dist/tools/execute-command.d.ts +33 -0
  280. package/dist/tools/execute-command.d.ts.map +1 -0
  281. package/dist/tools/execute-command.js +231 -0
  282. package/dist/tools/execute-command.js.map +1 -0
  283. package/dist/tools/execute-prompt.d.ts +36 -0
  284. package/dist/tools/execute-prompt.d.ts.map +1 -0
  285. package/dist/tools/execute-prompt.js +310 -0
  286. package/dist/tools/execute-prompt.js.map +1 -0
  287. package/dist/tools/list-members.d.ts +11 -0
  288. package/dist/tools/list-members.d.ts.map +1 -0
  289. package/dist/tools/list-members.js +108 -0
  290. package/dist/tools/list-members.js.map +1 -0
  291. package/dist/tools/member-detail.d.ts +17 -0
  292. package/dist/tools/member-detail.d.ts.map +1 -0
  293. package/dist/tools/member-detail.js +263 -0
  294. package/dist/tools/member-detail.js.map +1 -0
  295. package/dist/tools/monitor-task.d.ts +20 -0
  296. package/dist/tools/monitor-task.d.ts.map +1 -0
  297. package/dist/tools/monitor-task.js +89 -0
  298. package/dist/tools/monitor-task.js.map +1 -0
  299. package/dist/tools/provision-auth.d.ts +17 -0
  300. package/dist/tools/provision-auth.d.ts.map +1 -0
  301. package/dist/tools/provision-auth.js +256 -0
  302. package/dist/tools/provision-auth.js.map +1 -0
  303. package/dist/tools/provision-vcs-auth.d.ts +50 -0
  304. package/dist/tools/provision-vcs-auth.d.ts.map +1 -0
  305. package/dist/tools/provision-vcs-auth.js +187 -0
  306. package/dist/tools/provision-vcs-auth.js.map +1 -0
  307. package/dist/tools/receive-files.d.ts +20 -0
  308. package/dist/tools/receive-files.d.ts.map +1 -0
  309. package/dist/tools/receive-files.js +82 -0
  310. package/dist/tools/receive-files.js.map +1 -0
  311. package/dist/tools/register-member.d.ts +74 -0
  312. package/dist/tools/register-member.d.ts.map +1 -0
  313. package/dist/tools/register-member.js +310 -0
  314. package/dist/tools/register-member.js.map +1 -0
  315. package/dist/tools/remove-member.d.ts +17 -0
  316. package/dist/tools/remove-member.d.ts.map +1 -0
  317. package/dist/tools/remove-member.js +126 -0
  318. package/dist/tools/remove-member.js.map +1 -0
  319. package/dist/tools/revoke-vcs-auth.d.ts +23 -0
  320. package/dist/tools/revoke-vcs-auth.d.ts.map +1 -0
  321. package/dist/tools/revoke-vcs-auth.js +55 -0
  322. package/dist/tools/revoke-vcs-auth.js.map +1 -0
  323. package/dist/tools/send-files.d.ts +20 -0
  324. package/dist/tools/send-files.d.ts.map +1 -0
  325. package/dist/tools/send-files.js +103 -0
  326. package/dist/tools/send-files.js.map +1 -0
  327. package/dist/tools/setup-git-app.d.ts +17 -0
  328. package/dist/tools/setup-git-app.d.ts.map +1 -0
  329. package/dist/tools/setup-git-app.js +89 -0
  330. package/dist/tools/setup-git-app.js.map +1 -0
  331. package/dist/tools/setup-ssh-key.d.ts +14 -0
  332. package/dist/tools/setup-ssh-key.d.ts.map +1 -0
  333. package/dist/tools/setup-ssh-key.js +119 -0
  334. package/dist/tools/setup-ssh-key.js.map +1 -0
  335. package/dist/tools/shutdown-server.d.ts +4 -0
  336. package/dist/tools/shutdown-server.d.ts.map +1 -0
  337. package/dist/tools/shutdown-server.js +9 -0
  338. package/dist/tools/shutdown-server.js.map +1 -0
  339. package/dist/tools/stop-prompt.d.ts +14 -0
  340. package/dist/tools/stop-prompt.d.ts.map +1 -0
  341. package/dist/tools/stop-prompt.js +44 -0
  342. package/dist/tools/stop-prompt.js.map +1 -0
  343. package/dist/tools/update-agent-cli.d.ts +17 -0
  344. package/dist/tools/update-agent-cli.d.ts.map +1 -0
  345. package/dist/tools/update-agent-cli.js +110 -0
  346. package/dist/tools/update-agent-cli.js.map +1 -0
  347. package/dist/tools/update-member.d.ts +77 -0
  348. package/dist/tools/update-member.d.ts.map +1 -0
  349. package/dist/tools/update-member.js +202 -0
  350. package/dist/tools/update-member.js.map +1 -0
  351. package/dist/tools/version.d.ts +4 -0
  352. package/dist/tools/version.d.ts.map +1 -0
  353. package/dist/tools/version.js +7 -0
  354. package/dist/tools/version.js.map +1 -0
  355. package/dist/types.d.ts +70 -0
  356. package/dist/types.d.ts.map +1 -0
  357. package/dist/types.js +2 -0
  358. package/dist/types.js.map +1 -0
  359. package/dist/utils/agent-helpers.d.ts +41 -0
  360. package/dist/utils/agent-helpers.d.ts.map +1 -0
  361. package/dist/utils/agent-helpers.js +84 -0
  362. package/dist/utils/agent-helpers.js.map +1 -0
  363. package/dist/utils/ansi.d.ts +6 -0
  364. package/dist/utils/ansi.d.ts.map +1 -0
  365. package/dist/utils/ansi.js +20 -0
  366. package/dist/utils/ansi.js.map +1 -0
  367. package/dist/utils/auth-env.d.ts +8 -0
  368. package/dist/utils/auth-env.d.ts.map +1 -0
  369. package/dist/utils/auth-env.js +30 -0
  370. package/dist/utils/auth-env.js.map +1 -0
  371. package/dist/utils/collect-secret.d.ts +2 -0
  372. package/dist/utils/collect-secret.d.ts.map +1 -0
  373. package/dist/utils/collect-secret.js +80 -0
  374. package/dist/utils/collect-secret.js.map +1 -0
  375. package/dist/utils/credential-validation.d.ts +13 -0
  376. package/dist/utils/credential-validation.d.ts.map +1 -0
  377. package/dist/utils/credential-validation.js +35 -0
  378. package/dist/utils/credential-validation.js.map +1 -0
  379. package/dist/utils/crypto.d.ts +3 -0
  380. package/dist/utils/crypto.d.ts.map +1 -0
  381. package/dist/utils/crypto.js +61 -0
  382. package/dist/utils/crypto.js.map +1 -0
  383. package/dist/utils/deep-merge.d.ts +3 -0
  384. package/dist/utils/deep-merge.d.ts.map +1 -0
  385. package/dist/utils/deep-merge.js +23 -0
  386. package/dist/utils/deep-merge.js.map +1 -0
  387. package/dist/utils/file-permissions.d.ts +8 -0
  388. package/dist/utils/file-permissions.d.ts.map +1 -0
  389. package/dist/utils/file-permissions.js +13 -0
  390. package/dist/utils/file-permissions.js.map +1 -0
  391. package/dist/utils/gpu-parser.d.ts +6 -0
  392. package/dist/utils/gpu-parser.d.ts.map +1 -0
  393. package/dist/utils/gpu-parser.js +15 -0
  394. package/dist/utils/gpu-parser.js.map +1 -0
  395. package/dist/utils/log-helpers.d.ts +29 -0
  396. package/dist/utils/log-helpers.d.ts.map +1 -0
  397. package/dist/utils/log-helpers.js +128 -0
  398. package/dist/utils/log-helpers.js.map +1 -0
  399. package/dist/utils/oob-timeout.d.ts +2 -0
  400. package/dist/utils/oob-timeout.d.ts.map +1 -0
  401. package/dist/utils/oob-timeout.js +2 -0
  402. package/dist/utils/oob-timeout.js.map +1 -0
  403. package/dist/utils/pid-helpers.d.ts +11 -0
  404. package/dist/utils/pid-helpers.d.ts.map +1 -0
  405. package/dist/utils/pid-helpers.js +21 -0
  406. package/dist/utils/pid-helpers.js.map +1 -0
  407. package/dist/utils/platform.d.ts +13 -0
  408. package/dist/utils/platform.d.ts.map +1 -0
  409. package/dist/utils/platform.js +60 -0
  410. package/dist/utils/platform.js.map +1 -0
  411. package/dist/utils/prompt-errors.d.ts +5 -0
  412. package/dist/utils/prompt-errors.d.ts.map +1 -0
  413. package/dist/utils/prompt-errors.js +15 -0
  414. package/dist/utils/prompt-errors.js.map +1 -0
  415. package/dist/utils/resolve-member.d.ts +18 -0
  416. package/dist/utils/resolve-member.d.ts.map +1 -0
  417. package/dist/utils/resolve-member.js +23 -0
  418. package/dist/utils/resolve-member.js.map +1 -0
  419. package/dist/utils/secure-input.d.ts +6 -0
  420. package/dist/utils/secure-input.d.ts.map +1 -0
  421. package/dist/utils/secure-input.js +60 -0
  422. package/dist/utils/secure-input.js.map +1 -0
  423. package/dist/utils/shell-escape.d.ts +43 -0
  424. package/dist/utils/shell-escape.d.ts.map +1 -0
  425. package/dist/utils/shell-escape.js +67 -0
  426. package/dist/utils/shell-escape.js.map +1 -0
  427. package/dist/utils/ssh-error-messages.d.ts +5 -0
  428. package/dist/utils/ssh-error-messages.d.ts.map +1 -0
  429. package/dist/utils/ssh-error-messages.js +20 -0
  430. package/dist/utils/ssh-error-messages.js.map +1 -0
  431. package/dist/version.d.ts +18 -0
  432. package/dist/version.d.ts.map +1 -0
  433. package/dist/version.js +101 -0
  434. package/dist/version.js.map +1 -0
  435. package/hooks/hooks-config.json +15 -0
  436. package/hooks/post-register-member.sh +10 -0
  437. package/package.json +82 -0
  438. package/scripts/agy-settings-merge.js +27 -0
  439. package/scripts/agy-transcript-reader.js +62 -0
  440. package/scripts/fleet-statusline.sh +43 -0
  441. package/skills/fleet/SKILL.md +262 -0
  442. package/skills/fleet/auth-azdevops.md +72 -0
  443. package/skills/fleet/auth-bitbucket.md +65 -0
  444. package/skills/fleet/auth-github.md +86 -0
  445. package/skills/fleet/beads.md +90 -0
  446. package/skills/fleet/onboarding.md +92 -0
  447. package/skills/fleet/permissions.md +23 -0
  448. package/skills/fleet/profiles/base-dev.json +18 -0
  449. package/skills/fleet/profiles/base-reviewer.json +14 -0
  450. package/skills/fleet/profiles/cpp.json +4 -0
  451. package/skills/fleet/profiles/dotnet.json +4 -0
  452. package/skills/fleet/profiles/go.json +4 -0
  453. package/skills/fleet/profiles/jvm.json +4 -0
  454. package/skills/fleet/profiles/node.json +4 -0
  455. package/skills/fleet/profiles/python.json +4 -0
  456. package/skills/fleet/profiles/rust.json +4 -0
  457. package/skills/fleet/profiles/tpl-permissions.json +5 -0
  458. package/skills/fleet/skill-matrix.md +34 -0
  459. package/skills/fleet/troubleshooting.md +13 -0
  460. package/skills/pm/SKILL.md +110 -0
  461. package/skills/pm/backlog-item.md +65 -0
  462. package/skills/pm/beads.md +192 -0
  463. package/skills/pm/cleanup.md +15 -0
  464. package/skills/pm/context-file.md +40 -0
  465. package/skills/pm/doer-reviewer.md +123 -0
  466. package/skills/pm/init.md +25 -0
  467. package/skills/pm/multi-pair-sprint.md +64 -0
  468. package/skills/pm/plan-prompt.md +94 -0
  469. package/skills/pm/simple-sprint.md +42 -0
  470. package/skills/pm/single-pair-sprint.md +178 -0
  471. package/skills/pm/tpl-deploy.md +24 -0
  472. package/skills/pm/tpl-design.md +29 -0
  473. package/skills/pm/tpl-doer.md +43 -0
  474. package/skills/pm/tpl-plan.md +72 -0
  475. package/skills/pm/tpl-pm.md +2 -0
  476. package/skills/pm/tpl-progress.json +28 -0
  477. package/skills/pm/tpl-projects.md +4 -0
  478. package/skills/pm/tpl-requirements.md +21 -0
  479. package/skills/pm/tpl-reviewer-plan.md +53 -0
  480. package/skills/pm/tpl-reviewer.md +72 -0
  481. package/skills/pm/tpl-status.md +29 -0
  482. package/version.json +3 -0
@@ -0,0 +1,110 @@
1
+ ---
2
+ name: pm
3
+ description: Project Manager — plans, executes, monitors, and resumes multi-step work across fleet members. Delegates to members, tracks progress, drives reviews and deploys. Never writes code directly.
4
+ note: This skill requires the 'fleet' skill to function.
5
+ ---
6
+
7
+ # PM — Project Manager Skill
8
+
9
+ You are a Project Manager (PM) that orchestrates work across fleet members.
10
+
11
+ ## Dependency Bootstrap
12
+
13
+ **IMPORTANT — Before proceeding with any PM task:**
14
+
15
+ This skill depends on the `fleet` skill. If it is not already active, activate it now using your provider's skill activation mechanism before continuing.
16
+
17
+ ---
18
+
19
+
20
+ ## Sprint Selection
21
+
22
+ Before starting any sprint, choose the appropriate variant:
23
+
24
+ | Condition | Sprint type |
25
+ |-----------|-------------|
26
+ | 1–3 tasks, completable in one session | `simple-sprint.md` |
27
+ | Work splits into parallel tracks (e.g. UI/backend, service A/service B) with high cohesion within each track, loose coupling between tracks, and minimal upfront dependency | `multi-pair-sprint.md` |
28
+ | Default | `single-pair-sprint.md` |
29
+
30
+ If tracks are tightly coupled or share significant upfront dependencies, use single-pair — splitting tightly coupled work across pairs creates more coordination overhead than it saves.
31
+
32
+ ---
33
+
34
+ ## Available Commands
35
+
36
+ - `/pm init <project>` — Initialize project folder and templates. See init.md.
37
+ - `/pm pair <member> <member>` — Pair doer↔reviewer. Update icons (doer=circle, reviewer=square, same color) via `update_member`. See doer-reviewer.md.
38
+ - `/pm plan <requirement>` — Triggers Phase 2 (Plan Generation). See single-pair-sprint.md. User provides requirements.md.
39
+ - `/pm start <member>` — Begin Phase 3 execution. Before dispatch: complete doer-reviewer.md setup checklist and pre-flight checks. Plan must be APPROVED (planned.json exists in `<project>/`). Sends task harness (agent context file, PLAN.md, progress.json) to doer and kicks off execution.
40
+ - `/pm status <member>` — Check in-flight tasks (via Beads), progress.json, and git log.
41
+ - `/pm resume <member>` — Resume after a verification checkpoint
42
+ - `/pm deploy <member>` — Execute the project's deployment runbook. First, `receive_files` to pull `deploy.md` from the repo root or `docs/` folder via any available member. If it doesn't exist in the repo, create a copy locally from `tpl-deploy.md`, fill in the project's deploy and verify steps, then `send_files` to the doer's repo root and have them commit it before proceeding. Once deploy.md is in place, execute each step via `execute_command` on the target member, then run the Verify section to confirm the deploy succeeded.
43
+ - `/pm recover <project>` — After PM restart: check in-flight tasks via Beads for instant orientation, then inspect member state. See single-pair-sprint.md, simple-sprint.md, or multi-pair-sprint.md.
44
+ - `/pm cleanup <project>` — At sprint completion: run cleanup on doer and reviewer, close Beads epic, then raise the PR. See cleanup.md.
45
+ - `/pm backlog` — Query and manage deferred items via Beads. See beads.md.
46
+ - `/pm tasks` — Show current sprint's Beads task tree (`bd show <epic-id> --tree`). See beads.md.
47
+
48
+ ## Beads — Persistent Task DB
49
+
50
+ PM uses Beads (`bd` CLI, installed by `apra-fleet install`) as the persistent task database across all sprints. See `beads.md` for the full reference.
51
+
52
+ **Session start rule:** Always run `bd ready` (from PM's own directory — the central Beads DB) before opening any `status.md`. This gives an instant cross-sprint view of what's in-flight across all projects and members — no file reading required for orientation.
53
+
54
+ **Central DB rule:** PM runs `bd init` once in PM's own working directory — NOT inside each project repo. One Beads DB tracks all projects, all members, all sprints. `bd list --all --pretty` gives a global view without switching directories.
55
+
56
+ **Lifecycle hooks (enforced — not optional):**
57
+ - `/pm init` → `bd init` (PM root, idempotent) + `bd create` sprint epic + record epic-id in `status.md`
58
+ - `/pm plan` (after approval) → `bd create` one task per PLAN.md item + `bd dep add` for dependencies
59
+ - `/pm start` / task dispatch → `bd update <id> --assignee <member> --status in_progress`
60
+ - VERIFY checkpoint done → `bd close <id>`
61
+ - Reviewer CHANGES NEEDED → `bd create` a task per HIGH finding
62
+ - `/pm cleanup` → `bd close <epic-id>` before raising PR
63
+
64
+ ## Core Rules
65
+
66
+ 1. NEVER read code, diagnose bugs, or suggest fixes — assign a member.
67
+ 2. **Project sandboxing** — The PM root contains one subfolder per project. Every artifact (`status.md`, `requirements.md`, `design.md`, `deploy.md`, `planned.json`, `permissions.json`, PLAN.md, progress.json, feedback.md) lives inside `<project>/` and nowhere else. Never write project files in the PM root, a sibling folder, or the skill folder. If you're about to write outside `<project>/`, stop and relocate first.
68
+ 3. On session start: Read each active project's `status.md` to recover context and surface members that are blocked, at verify, or idle.
69
+ - Update `status.md` whenever a dispatch completes or a member reports back — not just at phase boundaries
70
+ - Local files are the source of truth — never rely on memory across sessions
71
+ 4. Before dispatch: Verify member has required tools: `execute_command → which <tool>` or `<tool> --version`.
72
+ 5. If a member can finish in one session (1-3 steps), use ad-hoc `execute_prompt`. Otherwise use the task harness.
73
+ 6. NEVER let members sit idle — after planning, immediately start execution. At verify checkpoints, immediately dispatch reviews.
74
+ 7. During execution: keep going until stuck or done — don't wait for the user. At checkpoints, filter the member's questions: resolve what you can, only escalate genuine ambiguities. During planning: escalate tough calls (ambiguous requirements, risky trade-offs, architectural decisions).
75
+ 8. When executing a sequence of fleet calls — any combination of `send_files`, `execute_command`, `execute_prompt`, `receive_files` — club them into a single background Agent rather than issuing individual calls or multiple background agents.
76
+ 9. For unattended execution, use `update_member(unattended='auto')` for safer auto-approval or `update_member(unattended='dangerous')` for full permission bypass. Always compose and deliver permissions via `compose_permissions` before dispatch (see fleet skill `permissions.md`). Do NOT pass `dangerously_skip_permissions` to `execute_prompt` — it is deprecated and ignored.
77
+ 10. During a sprint, PLAN.md, progress.json, and feedback.md must be committed and pushed by the member at every turn — these are the living state of the sprint. Only the agent context file stays uncommitted. See context-file.md and doer-reviewer.md for details.
78
+ 11. Definition of done includes security audit and docs — ensure both are covered when adding tools/features.
79
+ 12. At sprint completion: raise a PR, verify CI is green — do NOT merge. Merge is the user's decision.
80
+ 13. PM runs `gh` CLI commands directly via Bash — never delegate to fleet members. PM owns PR lifecycle and CI file commits: `gh pr create`, `gh pr checks`, pushing workflow files, etc.
81
+ 14. Always read referenced sub-documents (doer-reviewer.md, fleet skill sub-docs, etc.) before executing PM commands.
82
+
83
+ ## Secrets & Credentials
84
+
85
+ See fleet skill `Secure Credentials` section for the full reference.
86
+
87
+ PM-specific rule: never pass raw secrets in `execute_prompt` prompts — reference the credential by name only (e.g. `"authenticate using credential github_pat"`). The member then uses `{{secure.github_pat}}` in its own `execute_command` calls.
88
+
89
+ ## Sub-documents
90
+
91
+ - `single-pair-sprint.md` — full sprint lifecycle: requirements, planning, execution loop, monitoring, completion, recovery
92
+ - `simple-sprint.md` — lightweight flow for small, single-session tasks
93
+ - `multi-pair-sprint.md` — running parallel pairs on separate git branches
94
+ - `doer-reviewer.md` — doer/reviewer pairing, flow, pre-flight checks, safeguards
95
+ - `context-file.md` — agent context file: provider filename lookup, role templates, delivery rules
96
+ - `cleanup.md` — sprint cleanup command and PR raise procedure
97
+ - `init.md` — project folder initialization
98
+ - `beads.md` — Beads persistent task DB: commands, lifecycle hooks, backlog ops, cross-sprint patterns
99
+ - `tpl-*.md` — various templates sent to members via `send_files`, never loaded into PM context — PM substitutes `{{token}}` placeholders before sending
100
+
101
+ ## Model Selection
102
+
103
+ See fleet skill `Model Tiers` section.
104
+
105
+
106
+ ## Provider Awareness
107
+
108
+ See fleet skill `Provider Awareness` section for general provider differences.
109
+
110
+ PM-specific: agent context file filename is provider-dependent — see `context-file.md`.
@@ -0,0 +1,65 @@
1
+ # Backlog Item — Content Template and Maintenance
2
+
3
+ ## Creating a Backlog Item
4
+
5
+ When deferring an item, provide enough detail to act on it in a future sprint without re-investigation.
6
+
7
+ ```bash
8
+ bd create "<headline>" -p 3 --parent <epic-id> --description "$(cat <<'EOF'
9
+ Impact: High | Medium | Low
10
+ Source: <GitHub issue URL | review finding ID | sprint name>
11
+
12
+ Detail:
13
+ <Full description — code locations, root causes, reproduction steps. Do not summarize.>
14
+
15
+ Impact of not addressing:
16
+ <What breaks, degrades, or accumulates if left unresolved.>
17
+ EOF
18
+ )"
19
+ ```
20
+
21
+ ## When to Create
22
+
23
+ - Unaddressed MEDIUM/LOW review findings after a reviewer verdict
24
+ - Scope items deferred mid-sprint to keep the sprint on track
25
+ - User says "add to backlog" or "defer this"
26
+ - Post-sprint items that did not make the cut
27
+
28
+ ## Backlog Maintenance
29
+
30
+ ### Review
31
+
32
+ ```bash
33
+ bd list --all --pretty # full tree including all low-priority items
34
+ bd list --status open --pretty # open items only
35
+ ```
36
+
37
+ ### Re-prioritize
38
+
39
+ When a future sprint is ready to pick up a backlog item:
40
+
41
+ ```bash
42
+ bd update <id> -p <new-priority> # e.g. -p 1 to promote to high
43
+ ```
44
+
45
+ ### Close stale items
46
+
47
+ ```bash
48
+ bd close <id> --reason "<reason>" # no longer relevant, superseded, fixed elsewhere
49
+ ```
50
+
51
+ ### Promote to active work
52
+
53
+ ```bash
54
+ bd update <id> --assignee <member> --status in_progress
55
+ ```
56
+
57
+ ### Cross-sprint dependency
58
+
59
+ When a backlog item cannot start until another sprint or task completes:
60
+
61
+ ```bash
62
+ bd dep add <backlog-item-id> <blocker-id>
63
+ ```
64
+
65
+ `bd ready` will not surface the item until the blocker closes.
@@ -0,0 +1,192 @@
1
+ # Beads — Persistent Task DB for PM
2
+
3
+ Beads (`bd`) is PM's persistent task database across all sprints. See fleet skill `beads.md` for the command reference, execution constraints, and task priorities.
4
+
5
+ ---
6
+
7
+ ## Rules
8
+
9
+ **Terse, enforced. No exceptions.**
10
+
11
+ | Rule | Command |
12
+ |------|---------|
13
+ | **Check before create epic** — never duplicate | `bd search "sprint: <project>" --status all --json` → use existing ID if found |
14
+ | **Check before create task** — never duplicate | `bd search "<task title>" --status all --json` → skip if found under epic |
15
+ | **Check before dispatch** — never steal a claimed task | `bd show <task-id> --json \| jq -r .status` → dispatch only if `"open"` |
16
+ | **`bd init`** — idempotent, always safe to re-run | — |
17
+ | **`bd close`** — idempotent, safe to repeat | — |
18
+ | **`bd update --status in_progress`** — NOT protected; last write wins | Always check status first |
19
+ | **Premature close** — reopen with | `bd reopen <id>` |
20
+ | **Lost epic-id** | `bd search "sprint: <project>" --status all --json \| jq -r '.[0].id'` |
21
+ | **Lost task-id** | `bd search "<task title>" --status all --json \| jq -r '.[0].id'` |
22
+ | **`blocked` status** | Explicitly set only — dep-blocked issues remain `open` in `bd list --status blocked` |
23
+
24
+ ---
25
+
26
+ ---
27
+
28
+ ## Lifecycle Hooks
29
+
30
+ PM calls `bd` at these points in every sprint:
31
+
32
+ ### `/pm init`
33
+ ```bash
34
+ cd <pm_root> # PM's own working directory — one central DB for ALL projects and members
35
+ bd init # idempotent; run once, not per project
36
+
37
+ # Check before create — avoid duplicate epics
38
+ EXISTING=$(bd search "sprint: <project>" --status all --json | jq -r '.[0].id // empty')
39
+ if [ -n "$EXISTING" ]; then
40
+ EPIC_ID=$EXISTING # reuse existing epic
41
+ else
42
+ EPIC_ID=$(bd create "sprint: <project>" -p 1 --json | jq -r .id)
43
+ fi
44
+ # Record EPIC_ID in <project>/status.md
45
+ ```
46
+
47
+ ### `/pm plan` — after PLAN.md is approved
48
+ For each task in PLAN.md, assign to the member who will do it:
49
+ ```bash
50
+ bd create "T1.1: <title>" -p 1 --parent <epic-id> --assignee <member> # → task-id
51
+ bd create "T1.2: <title>" -p 2 --parent <epic-id> --assignee <member> # → task-id
52
+ bd dep add <T1.2-id> <T1.1-id> # T1.2 blocked until T1.1 done
53
+ ```
54
+ Record all task IDs in `<project>/status.md` under a `## Beads` section.
55
+
56
+ ### `/pm start` — dispatching a member to a task
57
+ ```bash
58
+ # Check before dispatch — never steal a claimed task
59
+ STATUS=$(bd show <task-id> --json | jq -r .status)
60
+ if [ "$STATUS" = "open" ]; then
61
+ bd update <task-id> --status in_progress --assignee <member>
62
+ else
63
+ echo "Task already $STATUS — skip or escalate"
64
+ fi
65
+ ```
66
+
67
+ ### VERIFY checkpoint reached (member stops)
68
+ ```bash
69
+ bd close <task-id> # mark complete
70
+ bd ready # confirm what's next
71
+ ```
72
+
73
+ ### Reviewer returns CHANGES NEEDED — each HIGH finding
74
+ ```bash
75
+ bd create "fix: <finding title>" -p 0 --parent <epic-id> --assignee <doer> # → finding-id
76
+ ```
77
+ When doer fixes it and reviewer approves: `bd close <finding-id>`
78
+
79
+ ### `/pm cleanup` — sprint complete
80
+ ```bash
81
+ bd close <epic-id>
82
+ bd note <epic-id> "PR: <url>" # link PR to epic
83
+ # If CI fails post-cleanup and another fix cycle is needed:
84
+ # bd reopen <epic-id>
85
+ ```
86
+
87
+ ---
88
+
89
+ ## `/pm backlog` — deferred items
90
+
91
+ When user says "add to backlog" or "defer this":
92
+ ```bash
93
+ bd create "<description>" -p 3 --parent <epic-id> # low priority
94
+ ```
95
+ See `backlog-item.md` for required description fields and maintenance operations.
96
+
97
+ When user says "show backlog" or "what's deferred":
98
+ ```bash
99
+ bd list --all --pretty # full tree view including deferred items
100
+ ```
101
+
102
+ ---
103
+
104
+ ## `/pm tasks` — sprint task view
105
+
106
+ Show current sprint's Beads state at any time:
107
+ ```bash
108
+ bd list --all --pretty # full tree: all members, all tasks, status at a glance
109
+ bd ready # what's claimable right now (no blockers)
110
+ ```
111
+
112
+ ---
113
+
114
+ ## `/pm status` — session-start orientation
115
+
116
+ At the start of every PM session, before reading any file:
117
+ ```bash
118
+ bd ready
119
+ ```
120
+ This shows all unblocked tasks across ALL sprints. PM uses this to know what's in flight before opening any `status.md`.
121
+
122
+ ---
123
+
124
+ ## Innovative Use Patterns
125
+
126
+ ### Multi-member tracking (10+ members)
127
+
128
+ Each task is assigned to a member at creation time. PM gets a per-member view or a global view instantly:
129
+
130
+ ```bash
131
+ # Global view — all members, all tasks, tree format
132
+ bd list --all --pretty
133
+
134
+ # Per-member view — what is alice working on?
135
+ bd list --assignee alice --status open,in_progress
136
+
137
+ # What's blocked across all members?
138
+ bd list --status blocked
139
+
140
+ # What's ready to pick up (no blockers, any member)?
141
+ bd ready
142
+
143
+ # What's in-progress right now (who is busy)?
144
+ bd list --status in_progress
145
+ ```
146
+
147
+ PM dispatches: `bd update <task-id> --status in_progress --assignee <member>`
148
+ Member completes: `bd close <task-id>`
149
+ `bd ready` immediately shows what that member can pick up next.
150
+
151
+ This replaces the need to read `progress.json` on each member — one `bd list --all --pretty` gives the full picture across every member in the fleet.
152
+
153
+ ### Cross-sprint dependency
154
+ When sprint B can't start until sprint A's PR merges:
155
+ ```bash
156
+ bd dep add <sprint-B-epic-id> <sprint-A-epic-id>
157
+ ```
158
+ `bd ready` won't surface sprint B tasks until sprint A closes.
159
+
160
+ ### Reviewer findings as tasks
161
+ Every HIGH finding from code review becomes a tracked task assigned back to the doer. PM never loses a finding — it either gets fixed (`bd close`) or deferred (low-priority backlog task). Full audit trail in `bd show`.
162
+
163
+ ### Backlog grooming
164
+ ```bash
165
+ bd list --all --pretty # PM presents full tree to user for re-prioritization or close
166
+ ```
167
+
168
+ ### Recovery without `/pm recover`
169
+ Session crash? Just run `bd list --all --pretty`. PM sees every member's state across every active project without reading a single file. Then `bd show <task-id>` for full context on any item.
170
+
171
+ ### PR linking
172
+ At cleanup, PM adds the PR URL to the epic:
173
+ ```bash
174
+ bd note <epic-id> "PR: https://github.com/Apra-Labs/apra-fleet/pull/N"
175
+ ```
176
+
177
+ ---
178
+
179
+ ## Status.md Beads Section
180
+
181
+ Add this block to `<project>/status.md` after init:
182
+
183
+ ```markdown
184
+ ## Beads
185
+ - **Epic:** `<epic-id>` — sprint: <project>
186
+ - Tasks:
187
+ - `<task-id>` T1.1: <title>
188
+ - `<task-id>` T1.2: <title>
189
+ - ...
190
+ ```
191
+
192
+ Update task status inline as tasks move through the lifecycle.
@@ -0,0 +1,15 @@
1
+ # Sprint Cleanup
2
+
3
+ Run at sprint completion, before raising the PR. Execute on both doer and reviewer via `execute_command`:
4
+
5
+ ```
6
+ git rm --cached .fleet-task*.md 2>/dev/null || true; rm -f .fleet-task*.md; git rm PLAN.md progress.json feedback.md requirements.md design.md 2>/dev/null; for file in CLAUDE.md GEMINI.md AGENTS.md COPILOT.md AGY.md; do if git show origin/main:"$file" > /dev/null 2>&1; then git checkout origin/main -- "$file"; else git rm -f "$file" 2>/dev/null || rm -f "$file"; fi; done; git commit -m "cleanup: remove fleet control files" && git push
7
+ ```
8
+
9
+ **Why:** If a file like `CLAUDE.md` or `AGENTS.md` exists in `main`, it is a project deliverable - the sprint replaced it with a context file of the same name. Restoring from `origin/main` ensures the deliverable is preserved. Only files absent from `main` (pure sprint context) are deleted.
10
+
11
+ After cleanup on both members:
12
+ 1. **Close Beads epic:** `bd close <epic-id>`
13
+ 2. **Raise PR:** `gh pr create`
14
+ 3. **Link PR to epic:** `bd note <epic-id> "PR: <url>"`
15
+ 4. **Verify CI:** `gh pr checks` — do not merge, merge is the user's decision.
@@ -0,0 +1,40 @@
1
+ # Agent Context File
2
+
3
+ Each fleet member needs a provider-specific agent context file in their `work_folder` root. It is the member's persistent execution model and survives across session resumes.
4
+
5
+ ## Provider Filename
6
+
7
+ Use `member_detail` -> `llmProvider` to determine the correct target filename:
8
+
9
+ | Provider | Filename |
10
+ |----------|----------|
11
+ | Claude | CLAUDE.md |
12
+ | Antigravity (agy) | AGY.md |
13
+ | Gemini | GEMINI.md |
14
+ | Codex | AGENTS.md |
15
+ | Copilot | COPILOT.md |
16
+
17
+ ## Role Templates
18
+
19
+ | Role | Template |
20
+ |------|----------|
21
+ | Doer | `tpl-doer.md` |
22
+ | Reviewer | `tpl-reviewer.md` |
23
+
24
+ ## Rules
25
+
26
+ - Pick the correct template based on role and correct target filename based on provider
27
+ - Make a copy of the template to the local project folder, update it with project details — fill in `{{branch}}` and `{{base_branch}}` with the sprint branch and base branch before delivering
28
+ - Send to member via `send_files` to the member's `work_folder` root before dispatch
29
+ - Never commit to git — on first send, add the Agent Context File filename to the member's `.gitignore` via `execute_command → echo '<filename>' >> .gitignore` (`.fleet-task.md` is covered by onboarding Step 7)
30
+ - On role switch (doer ↔ reviewer): send the new context file before dispatch
31
+ - Remove before merge: use the cleanup command in `cleanup.md` — it restores the file from `origin/<base_branch>` if it existed there before the sprint (project deliverable), and only deletes it if it was a pure sprint artifact. **Never use plain `rm -f` or `git rm -f`** on these files — you will silently wipe a tracked project file.
32
+
33
+ **If the agent context file was accidentally committed mid-sprint**, recover with:
34
+ ```bash
35
+ git rm --cached CLAUDE.md # un-track without deleting from disk
36
+ git checkout origin/<base_branch> -- CLAUDE.md # restore the project original
37
+ git add CLAUDE.md
38
+ git commit -m "fix: restore project CLAUDE.md, un-track agent context file"
39
+ git push
40
+ ```
@@ -0,0 +1,123 @@
1
+ # Doer-Reviewer Loop
2
+
3
+ ## Setup Checklist
4
+
5
+ 1. Record pair in `<project>/status.md`. Multiple pairs per project is normal.
6
+ 2. Override icons via `update_member` — doer gets circle, reviewer gets square, same color.
7
+ 3. Compose and deliver permissions per `permissions.md` (fleet skill) for each member's role.
8
+ 4. Send the role-specific agent context file via `send_files` before dispatch.
9
+ - Call `compose_permissions` before every dispatch regardless of unattended mode.
10
+ - For provider-specific unattended flag behaviour, see the fleet SKILL.md unattended modes section.
11
+ - Prefer `unattended='auto'` over `'dangerous'` — `auto` scopes bypass to explicitly listed operations; `dangerous` skips all checks globally.
12
+ - See `context-file.md` for provider filename lookup and role templates. Planning and plan review are dispatched as inline prompts — no agent context file needed for those phases.
13
+
14
+ **Model tier check:** Dispatch reviews at `model=premium`. For doers, PM reads `tasks[i].tier` from `planned.json` and passes `model: <tier>` to `execute_prompt` — no hardcoded default. User override always wins.
15
+
16
+ ## Pre-flight Checks
17
+
18
+ ### Before any dispatch
19
+ Verify member is on the correct branch with a clean working tree:
20
+ 1. `fleet_status` — confirm member is idle
21
+ 2. `execute_command → git status && git branch --show-current` — confirm clean tree and correct branch
22
+
23
+ Do not dispatch to a member on the wrong branch or with uncommitted source code changes.
24
+
25
+ ### Before review dispatch
26
+ Verify reviewer is at the correct commit before starting review:
27
+ 1. `execute_command → git rev-parse HEAD` on reviewer — must match doer's pushed HEAD SHA
28
+ 2. If SHA doesn't match: run `git fetch origin && git reset --hard origin/<branch>` on reviewer, then re-verify
29
+
30
+ ## Flow
31
+
32
+ 1. Doer works, commits and pushes deliverables at every turn → STOPS at every VERIFY checkpoint
33
+
34
+ **Doer session rules:**
35
+ - **New phase (`nextTask.phase !== lastDispatchedPhase`):** use `resume=false`
36
+ - **Same phase (`nextTask.phase === lastDispatchedPhase`):** use `resume=true`
37
+
38
+ 2. **PM handles git transport via `execute_command`** — never delegate to prompts:
39
+ - Dev side: `git push origin <branch>` — verify push succeeded
40
+ - Rev side: `git fetch origin && git checkout <branch> && git reset --hard origin/<branch>`
41
+
42
+ 3. **PM dispatches REVIEWER at every VERIFY checkpoint** — PM never self-reviews. Most context docs are committed in repository. PM sends any other required background information to reviewer via `send_files`. Then dispatches reviewer with `resume=false` (fresh session).
43
+
44
+ **Reviewer workflow rules:**
45
+ - **During planning stage prep reviewer in parallel while doer works** — send requirements, set up branch, start a context-reading session on reviewer. Use session resume to send updated docs at handoff when doer is ready.
46
+ - **During execution phase**: for each new phase's review use `resume=false` for the reviewer.
47
+ - **Verify SHA before dispatching review** — `execute_command → git rev-parse HEAD` on reviewer must match doer's pushed HEAD (see Pre-flight Checks above).
48
+
49
+ 4. Reviewer reads deliverables + diff, conducts cumulative review (all phases up to current, not just the latest) per its agent context file. Commits findings to feedback.md, pushes, and outputs verdict: APPROVED or CHANGES NEEDED
50
+ 5. PM reads verdict:
51
+ - **APPROVED** → proceed to next phase (or sprint completion if all phases done)
52
+ - **CHANGES NEEDED** → PM sends feedback to doer → doer fixes → back to step 1 → PM re-dispatches REVIEWER
53
+ 6. Loop until all phases APPROVED
54
+ 7. **Sprint completion** — See cleanup.md.
55
+
56
+ ## Resume Rule
57
+
58
+ **Doer dispatches** — resume is derived from `planned.json` phase numbers via `lastDispatchedPhase` in `status.md`, not manually reasoned:
59
+
60
+ | Condition | resume |
61
+ |-----------|--------|
62
+ | `nextTask.phase === lastDispatchedPhase` | `true` |
63
+ | `nextTask.phase !== lastDispatchedPhase` (new phase) | `false` |
64
+ | After reviewer CHANGES NEEDED → doer fix | `true` |
65
+ | Role switch (doer ↔ reviewer) | `false` |
66
+
67
+ **All dispatches:**
68
+
69
+ | Dispatch | resume |
70
+ |----------|--------|
71
+ | Initial plan generation | `false` |
72
+ | Plan revision (any feedback iteration) | `true` |
73
+ | Initial review dispatch | `false` |
74
+ | Re-review after CHANGES NEEDED + doer fixes | `true` |
75
+ | Role switch (doer → reviewer, or reviewer → doer) | `false` |
76
+ | After `stop_prompt` cancellation | `false` | Session state unreliable after kill; start fresh |
77
+ | After session timed out mid-grant | `true` | Fleet auto-recovers (stale-session retry), but member restarts without prior context |
78
+
79
+ **Note:** A role switch always requires sending the new agent context file before dispatch. Never resume across a role switch.
80
+
81
+ ## Safeguards
82
+
83
+ | Safeguard | Trigger | PM Action | Limit |
84
+ |-----------|---------|-----------|-------|
85
+ | max_turns budget | Every `execute_prompt` dispatch | Session ends naturally at turn limit | Set per dispatch in `execute_prompt` |
86
+ | PM retry limit | Same dispatch fails (error, no output) | Retry up to 3×, then pause sprint + flag user | 3 retries per dispatch |
87
+ | Doer-reviewer cycle limit | Reviewer returns CHANGES NEEDED | Re-dispatch doer with feedback; if 3 cycles don't resolve all HIGH items, pause sprint + flag user | 3 cycles per phase |
88
+ | Model escalation | Zero progress after session resets | Reset session and resume; after 2 resets with zero progress: escalate model (cheap→standard→premium). Still zero after premium? Flag user | 2 resets per model tier |
89
+
90
+ **When to escalate to user:**
91
+ - After 3 retries on the same dispatch with no progress
92
+ - After 3 doer-reviewer cycles with unresolved HIGH items
93
+ - After premium model still shows zero progress after 2 resets
94
+
95
+ ## Git as transport
96
+
97
+ - Doers commit: deliverables, PLAN.md, progress.json, project docs. When fixing review findings, doer also annotates feedback.md — adding `**Doer:** fixed in commit <sha> — <what changed>` under each addressed finding — then commits feedback.md. Doer never rewrites feedback.md content.
98
+ - Reviewers commit: feedback.md (full content — see tpl-reviewer.md for format)
99
+ - The member agent context file is NEVER committed — see `context-file.md`
100
+
101
+ ## Permissions
102
+
103
+ Compose and deliver permissions per `permissions.md` (fleet skill). Recompose when switching roles (e.g. doer↔reviewer). Each provider gets its native permission config — `compose_permissions` handles the format automatically.
104
+
105
+ **Mid-sprint denial:** If a member is blocked by a permission denial, call `compose_permissions` with `grant: [<denied permission>]` and `project_folder` — this grants the missing permission, delivers the updated config, and appends to the ledger so future phases and sprints start with it already included. Then resume the member with `resume=true`. Never bypass by running the denied
106
+ command yourself via `execute_command`. Act on the grant promptly — the inactivity
107
+ timer (transport-level, applies to all providers) fires on stdout silence. If it fires
108
+ while you are composing permissions, `resume=true` still succeeds via stale-session
109
+ auto-recovery, but the member restarts without its in-progress context.
110
+
111
+ **Cancelling a running session:** Use `stop_prompt` when a member is working on the wrong
112
+ thing, stuck in a loop, or dispatched with incorrect instructions. Always follow immediately
113
+ with `resume=false` to start a clean session.
114
+
115
+ Note: `stop_prompt` (a fleet MCP tool) kills the member's LLM process. This is distinct from
116
+ stopping a background orchestration sub-task within the PM's own session — the latter mechanism
117
+ is harness-dependent and not a fleet concept.
118
+
119
+ ## PM responsibilities
120
+
121
+ - Distribute work across pairs based on cohesion (high cohesion within a pair, loose coupling between pairs)
122
+ - Don't wait for user between doer and reviewer handoffs, autonomously keep progressing the project unless blockers are observed
123
+
@@ -0,0 +1,25 @@
1
+ # Project Init
2
+
3
+ ## Flow
4
+
5
+ 1. Determine the PM's agent context filename from `llmProvider` (see `context-file.md`). If that file doesn't exist in PM's working directory → create from `tpl-pm.md`
6
+ 2. If projects.md doesn't exist → create from tpl-projects.md
7
+ 3. Create `<project>/` subfolder, populate from templates:
8
+ - `status.md` — members, phases, sessions, blockers (tpl-status.md)
9
+ - `requirements.md` — user intent and constraints (tpl-requirements.md)
10
+ - `design.md` — architecture and design decisions (tpl-design.md)
11
+ - `deploy.md` — local copy of the project's deployment runbook; authoritative copy lives in the git repo root (or `docs/`). See `/pm deploy` for the lookup-or-create flow. Scaffold from `tpl-deploy.md` if neither exists.
12
+ - `permissions.json` — learned permission grants, populated by `compose_permissions` as grants are approved during the sprint (created empty at init)
13
+ - `planned.json` — immutable plan copy (saved after plan is APPROVED in Phase 2 — not at init time)
14
+ 4. Add project row to projects.md
15
+
16
+ 5. **Beads init** — run once in **PM's own working directory** (not each project repo). PM owns one central Beads DB that tracks all projects and members:
17
+ ```bash
18
+ cd <pm_root> # PM's own directory — one DB for all projects
19
+ bd init # idempotent; run once, not per project
20
+ bd create "sprint: <project>" -p 1 # → <epic-id>
21
+ ```
22
+ PM's central DB gives a global view across all sprints: `bd list --all --pretty` shows every project, every member, every task at once. Tasks reference which project/member they belong to — they don't need to live inside each project repo.
23
+ Record `<epic-id>` in `<project>/status.md` under a `## Beads` section. Task IDs are added here after `/pm plan` completes. See `beads.md` for the full pattern.
24
+
25
+ All project artifacts live in `<project>/` — see Core Rule 2 in SKILL.md for the full sandboxing requirement.
@@ -0,0 +1,64 @@
1
+ # Multi-Pair Sprint
2
+
3
+ A multi-pair sprint assigns multiple doer/reviewer pairs to the same sprint, each working on a separate git branch (worktree). Use this when the work can be cleanly partitioned into independent tracks.
4
+
5
+ ## When to use
6
+
7
+ - Large sprint where tasks can be split into independent, low-coupling tracks
8
+ - Two or more pairs can work in parallel without blocking each other
9
+ - Each track has a clear boundary (e.g. frontend / backend, service A / service B)
10
+
11
+ Use a single-pair sprint (single-pair-sprint.md) if the work is sequential or tightly coupled.
12
+
13
+ ## Branching Strategy
14
+
15
+ Each pair works on its own feature branch off the sprint base branch:
16
+
17
+ ```
18
+ main
19
+ └── sprint/<name> ← sprint base branch (integration branch)
20
+ ├── sprint/<name>/pair-1 ← pair 1's working branch
21
+ └── sprint/<name>/pair-2 ← pair 2's working branch
22
+ ```
23
+
24
+ - PM creates the sprint base branch before dispatching any pair
25
+ - Each pair's doer works only on their own branch — never the base or another pair's branch
26
+ - Pairs do not merge into the base branch themselves — PM handles integration
27
+
28
+ ## Contracts
29
+
30
+ Before dispatching either pair, PM identifies shared interfaces — APIs, data models, file formats, event schemas — that both tracks will depend on. These are documented in `<project>/contracts.md` and sent to both doers via `send_files`.
31
+
32
+ Both pairs treat contracts as immutable during the sprint. If a pair discovers a contract must change, they stop and notify PM. PM assigns the contract revision to one pair; the other waits until it is APPROVED and merged before continuing.
33
+
34
+ ## Coordination Rules
35
+
36
+ - Assign tracks at sprint start — document in `<project>/status.md` which pair owns which tasks
37
+ - Pairs work independently; PM monitors all pairs in parallel
38
+ - If pair 2 depends on output from pair 1: pair 2 does not start until pair 1's track is reviewed and merged into the sprint base branch
39
+ - PM handles cross-pair git sync: `git merge sprint/<name>/pair-1 into sprint/<name>/pair-2` when needed
40
+
41
+ ## Integration Flow
42
+
43
+ 1. Each pair follows the standard doer-reviewer loop (see doer-reviewer.md) on their own branch
44
+ 2. When a pair's track is APPROVED: PM merges that pair's branch **into the sprint base branch** (never into main) via `execute_command`
45
+ 3. PM notifies dependent pairs to rebase: `git fetch origin && git rebase origin/sprint/<name>`
46
+ 4. Once all pairs are APPROVED and merged into the sprint base branch: create low-priority Beads tasks for any unresolved findings or deferred items from all pairs (see `backlog-item.md`), then run cleanup on all members and raise a single PR from the sprint base branch to main (see cleanup.md)
47
+
48
+ STOP: Sprint is complete when CI is green and the PR is raised. Do not merge the PR into main. Merge is the user's decision — await explicit instruction.
49
+
50
+ ## Reviewer Scope
51
+
52
+ - Each reviewer reviews their own pair's deliverables only
53
+ - A cross-pair integration review is optional but recommended before raising the final PR — assign one reviewer to review the merged sprint base branch diff against main
54
+
55
+ ## Status Tracking
56
+
57
+ Record all pairs in `<project>/status.md`:
58
+
59
+ ```
60
+ | Pair | Doer | Reviewer | Track | Branch | Status |
61
+ |------|------|----------|-------|--------|--------|
62
+ | 1 | dev1 | rev1 | API | sprint/x/pair-1 | in-progress |
63
+ | 2 | dev2 | rev2 | UI | sprint/x/pair-2 | waiting-pair-1 |
64
+ ```