@apralabs/apra-fleet 0.4.0 → 0.4.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 (548) hide show
  1. package/README.md +159 -13
  2. package/dist/agents/backlog-groomer.md +31 -19
  3. package/dist/agents/ci-watcher.md +16 -1
  4. package/dist/agents/deployer.md +37 -47
  5. package/dist/agents/doer.md +147 -114
  6. package/dist/agents/harvester.md +41 -34
  7. package/dist/agents/integ-test-runner.md +98 -114
  8. package/dist/agents/kb-reconciler.md +205 -0
  9. package/dist/agents/plan-reviewer.md +45 -44
  10. package/dist/agents/planner.md +121 -50
  11. package/dist/agents/regression-test-runner.md +84 -81
  12. package/dist/agents/reviewer.md +118 -44
  13. package/dist/agents/schemas/doer-output.json +63 -3
  14. package/dist/agents/schemas/harvester-output.json +59 -2
  15. package/dist/agents/schemas/integ-test-runner-output.json +3 -3
  16. package/dist/agents/schemas/kb-reconciler-output.json +87 -0
  17. package/dist/agents/schemas/planner-output.json +65 -0
  18. package/dist/agents/schemas/regression-test-runner-output.json +4 -17
  19. package/dist/agents/schemas/reviewer-output.json +105 -8
  20. package/dist/cli/auth.d.ts.map +1 -1
  21. package/dist/cli/auth.js +1 -2
  22. package/dist/cli/auth.js.map +1 -1
  23. package/dist/cli/config.d.ts +3 -3
  24. package/dist/cli/config.d.ts.map +1 -1
  25. package/dist/cli/config.js +4 -13
  26. package/dist/cli/config.js.map +1 -1
  27. package/dist/cli/install.d.ts +1 -0
  28. package/dist/cli/install.d.ts.map +1 -1
  29. package/dist/cli/install.js +141 -44
  30. package/dist/cli/install.js.map +1 -1
  31. package/dist/cli/join.js +1 -1
  32. package/dist/cli/join.js.map +1 -1
  33. package/dist/cli/kb-commit.d.ts +12 -0
  34. package/dist/cli/kb-commit.d.ts.map +1 -0
  35. package/dist/cli/kb-commit.js +53 -0
  36. package/dist/cli/kb-commit.js.map +1 -0
  37. package/dist/cli/kb-directives.d.ts +17 -0
  38. package/dist/cli/kb-directives.d.ts.map +1 -0
  39. package/dist/cli/kb-directives.js +146 -0
  40. package/dist/cli/kb-directives.js.map +1 -0
  41. package/dist/cli/kb-import.d.ts +13 -0
  42. package/dist/cli/kb-import.d.ts.map +1 -0
  43. package/dist/cli/kb-import.js +56 -0
  44. package/dist/cli/kb-import.js.map +1 -0
  45. package/dist/cli/register-member.js +1 -1
  46. package/dist/cli/start.d.ts.map +1 -1
  47. package/dist/cli/start.js +7 -0
  48. package/dist/cli/start.js.map +1 -1
  49. package/dist/cli/uninstall.d.ts.map +1 -1
  50. package/dist/cli/uninstall.js +16 -3
  51. package/dist/cli/uninstall.js.map +1 -1
  52. package/dist/cli/watch.d.ts +76 -4
  53. package/dist/cli/watch.d.ts.map +1 -1
  54. package/dist/cli/watch.js +150 -17
  55. package/dist/cli/watch.js.map +1 -1
  56. package/dist/commands/kb-server.d.ts +8 -0
  57. package/dist/commands/kb-server.d.ts.map +1 -0
  58. package/dist/commands/kb-server.js +221 -0
  59. package/dist/commands/kb-server.js.map +1 -0
  60. package/dist/index.js +77 -2
  61. package/dist/index.js.map +1 -1
  62. package/dist/os/git-bash-candidates.d.ts +35 -0
  63. package/dist/os/git-bash-candidates.d.ts.map +1 -0
  64. package/dist/os/git-bash-candidates.js +46 -0
  65. package/dist/os/git-bash-candidates.js.map +1 -0
  66. package/dist/os/index.d.ts +13 -4
  67. package/dist/os/index.d.ts.map +1 -1
  68. package/dist/os/index.js +17 -2
  69. package/dist/os/index.js.map +1 -1
  70. package/dist/os/linux.d.ts +1 -0
  71. package/dist/os/linux.d.ts.map +1 -1
  72. package/dist/os/linux.js +19 -2
  73. package/dist/os/linux.js.map +1 -1
  74. package/dist/os/os-commands.d.ts +12 -0
  75. package/dist/os/os-commands.d.ts.map +1 -1
  76. package/dist/os/os-commands.js.map +1 -1
  77. package/dist/os/windows-gitbash.d.ts +93 -0
  78. package/dist/os/windows-gitbash.d.ts.map +1 -0
  79. package/dist/os/windows-gitbash.js +244 -0
  80. package/dist/os/windows-gitbash.js.map +1 -0
  81. package/dist/os/windows.d.ts +35 -0
  82. package/dist/os/windows.d.ts.map +1 -1
  83. package/dist/os/windows.js +93 -35
  84. package/dist/os/windows.js.map +1 -1
  85. package/dist/providers/agy.d.ts +15 -3
  86. package/dist/providers/agy.d.ts.map +1 -1
  87. package/dist/providers/agy.js +145 -11
  88. package/dist/providers/agy.js.map +1 -1
  89. package/dist/providers/claude.d.ts +14 -3
  90. package/dist/providers/claude.d.ts.map +1 -1
  91. package/dist/providers/claude.js +69 -22
  92. package/dist/providers/claude.js.map +1 -1
  93. package/dist/providers/codex.d.ts +14 -3
  94. package/dist/providers/codex.d.ts.map +1 -1
  95. package/dist/providers/codex.js +34 -8
  96. package/dist/providers/codex.js.map +1 -1
  97. package/dist/providers/copilot.d.ts +14 -3
  98. package/dist/providers/copilot.d.ts.map +1 -1
  99. package/dist/providers/copilot.js +33 -8
  100. package/dist/providers/copilot.js.map +1 -1
  101. package/dist/providers/email/headers.d.ts +15 -0
  102. package/dist/providers/email/headers.d.ts.map +1 -0
  103. package/dist/providers/email/headers.js +42 -0
  104. package/dist/providers/email/headers.js.map +1 -0
  105. package/dist/providers/email/index.d.ts +18 -0
  106. package/dist/providers/email/index.d.ts.map +1 -0
  107. package/dist/providers/email/index.js +60 -0
  108. package/dist/providers/email/index.js.map +1 -0
  109. package/dist/providers/email/provider.d.ts +49 -0
  110. package/dist/providers/email/provider.d.ts.map +1 -0
  111. package/dist/providers/email/provider.js +2 -0
  112. package/dist/providers/email/provider.js.map +1 -0
  113. package/dist/providers/email/sendgrid.d.ts +12 -0
  114. package/dist/providers/email/sendgrid.d.ts.map +1 -0
  115. package/dist/providers/email/sendgrid.js +67 -0
  116. package/dist/providers/email/sendgrid.js.map +1 -0
  117. package/dist/providers/email/smtp.d.ts +65 -0
  118. package/dist/providers/email/smtp.d.ts.map +1 -0
  119. package/dist/providers/email/smtp.js +373 -0
  120. package/dist/providers/email/smtp.js.map +1 -0
  121. package/dist/providers/index.d.ts +0 -1
  122. package/dist/providers/index.d.ts.map +1 -1
  123. package/dist/providers/index.js +0 -3
  124. package/dist/providers/index.js.map +1 -1
  125. package/dist/providers/none.d.ts +14 -3
  126. package/dist/providers/none.d.ts.map +1 -1
  127. package/dist/providers/none.js +26 -2
  128. package/dist/providers/none.js.map +1 -1
  129. package/dist/providers/opencode.d.ts +14 -3
  130. package/dist/providers/opencode.d.ts.map +1 -1
  131. package/dist/providers/opencode.js +60 -6
  132. package/dist/providers/opencode.js.map +1 -1
  133. package/dist/providers/provider.d.ts +91 -5
  134. package/dist/providers/provider.d.ts.map +1 -1
  135. package/dist/providers/provider.js +45 -1
  136. package/dist/providers/provider.js.map +1 -1
  137. package/dist/services/agent-provisioner.d.ts.map +1 -1
  138. package/dist/services/agent-provisioner.js +5 -8
  139. package/dist/services/agent-provisioner.js.map +1 -1
  140. package/dist/services/cloud/activity.js +2 -2
  141. package/dist/services/cloud/activity.js.map +1 -1
  142. package/dist/services/cloud/lifecycle.d.ts.map +1 -1
  143. package/dist/services/cloud/lifecycle.js +3 -0
  144. package/dist/services/cloud/lifecycle.js.map +1 -1
  145. package/dist/services/cloud/task-wrapper.d.ts +18 -0
  146. package/dist/services/cloud/task-wrapper.d.ts.map +1 -1
  147. package/dist/services/cloud/task-wrapper.js +157 -0
  148. package/dist/services/cloud/task-wrapper.js.map +1 -1
  149. package/dist/services/context-admission.d.ts.map +1 -1
  150. package/dist/services/context-admission.js +9 -7
  151. package/dist/services/context-admission.js.map +1 -1
  152. package/dist/services/credential-cleanup.d.ts.map +1 -1
  153. package/dist/services/credential-cleanup.js +22 -3
  154. package/dist/services/credential-cleanup.js.map +1 -1
  155. package/dist/services/github-app.d.ts.map +1 -1
  156. package/dist/services/github-app.js +11 -2
  157. package/dist/services/github-app.js.map +1 -1
  158. package/dist/services/knowledge/audn.d.ts +37 -0
  159. package/dist/services/knowledge/audn.d.ts.map +1 -0
  160. package/dist/services/knowledge/audn.js +219 -0
  161. package/dist/services/knowledge/audn.js.map +1 -0
  162. package/dist/services/knowledge/file-hash.d.ts +11 -0
  163. package/dist/services/knowledge/file-hash.d.ts.map +1 -0
  164. package/dist/services/knowledge/file-hash.js +123 -0
  165. package/dist/services/knowledge/file-hash.js.map +1 -0
  166. package/dist/services/knowledge/http-provider.d.ts +46 -0
  167. package/dist/services/knowledge/http-provider.d.ts.map +1 -0
  168. package/dist/services/knowledge/http-provider.js +254 -0
  169. package/dist/services/knowledge/http-provider.js.map +1 -0
  170. package/dist/services/knowledge/kb-providers.d.ts +15 -0
  171. package/dist/services/knowledge/kb-providers.d.ts.map +1 -0
  172. package/dist/services/knowledge/kb-providers.js +92 -0
  173. package/dist/services/knowledge/kb-providers.js.map +1 -0
  174. package/dist/services/knowledge/kb-scope-input.d.ts +5 -0
  175. package/dist/services/knowledge/kb-scope-input.d.ts.map +1 -0
  176. package/dist/services/knowledge/kb-scope-input.js +11 -0
  177. package/dist/services/knowledge/kb-scope-input.js.map +1 -0
  178. package/dist/services/knowledge/kb-service.d.ts +3 -0
  179. package/dist/services/knowledge/kb-service.d.ts.map +1 -0
  180. package/dist/services/knowledge/kb-service.js +2 -0
  181. package/dist/services/knowledge/kb-service.js.map +1 -0
  182. package/dist/services/knowledge/path-validation.d.ts +2 -0
  183. package/dist/services/knowledge/path-validation.d.ts.map +1 -0
  184. package/dist/services/knowledge/path-validation.js +13 -0
  185. package/dist/services/knowledge/path-validation.js.map +1 -0
  186. package/dist/services/knowledge/pre-init.d.ts +14 -0
  187. package/dist/services/knowledge/pre-init.d.ts.map +1 -0
  188. package/dist/services/knowledge/pre-init.js +147 -0
  189. package/dist/services/knowledge/pre-init.js.map +1 -0
  190. package/dist/services/knowledge/project-slug.d.ts +2 -0
  191. package/dist/services/knowledge/project-slug.d.ts.map +1 -0
  192. package/dist/services/knowledge/project-slug.js +49 -0
  193. package/dist/services/knowledge/project-slug.js.map +1 -0
  194. package/dist/services/knowledge/sqlite-provider.d.ts +147 -0
  195. package/dist/services/knowledge/sqlite-provider.d.ts.map +1 -0
  196. package/dist/services/knowledge/sqlite-provider.js +1646 -0
  197. package/dist/services/knowledge/sqlite-provider.js.map +1 -0
  198. package/dist/services/knowledge/types.d.ts +163 -0
  199. package/dist/services/knowledge/types.d.ts.map +1 -0
  200. package/dist/services/knowledge/types.js +9 -0
  201. package/dist/services/knowledge/types.js.map +1 -0
  202. package/dist/services/member-home.d.ts +89 -0
  203. package/dist/services/member-home.d.ts.map +1 -0
  204. package/dist/services/member-home.js +259 -0
  205. package/dist/services/member-home.js.map +1 -0
  206. package/dist/services/member-remote-url.d.ts +34 -0
  207. package/dist/services/member-remote-url.d.ts.map +1 -0
  208. package/dist/services/member-remote-url.js +39 -0
  209. package/dist/services/member-remote-url.js.map +1 -0
  210. package/dist/services/model-pricing.d.ts.map +1 -1
  211. package/dist/services/model-pricing.js +0 -5
  212. package/dist/services/model-pricing.js.map +1 -1
  213. package/dist/services/orphan-recovery.d.ts +9 -3
  214. package/dist/services/orphan-recovery.d.ts.map +1 -1
  215. package/dist/services/orphan-recovery.js +22 -8
  216. package/dist/services/orphan-recovery.js.map +1 -1
  217. package/dist/services/preflight-check.d.ts +56 -0
  218. package/dist/services/preflight-check.d.ts.map +1 -0
  219. package/dist/services/preflight-check.js +277 -0
  220. package/dist/services/preflight-check.js.map +1 -0
  221. package/dist/services/shell-probe.d.ts +131 -0
  222. package/dist/services/shell-probe.d.ts.map +1 -0
  223. package/dist/services/shell-probe.js +210 -0
  224. package/dist/services/shell-probe.js.map +1 -0
  225. package/dist/services/singleton.d.ts +2 -0
  226. package/dist/services/singleton.d.ts.map +1 -1
  227. package/dist/services/singleton.js +1 -1
  228. package/dist/services/singleton.js.map +1 -1
  229. package/dist/services/ssh.js +2 -2
  230. package/dist/services/ssh.js.map +1 -1
  231. package/dist/services/stall/find-log-file.d.ts.map +1 -1
  232. package/dist/services/stall/find-log-file.js +22 -16
  233. package/dist/services/stall/find-log-file.js.map +1 -1
  234. package/dist/services/stall/log-path-resolver.d.ts +11 -8
  235. package/dist/services/stall/log-path-resolver.d.ts.map +1 -1
  236. package/dist/services/stall/log-path-resolver.js +17 -40
  237. package/dist/services/stall/log-path-resolver.js.map +1 -1
  238. package/dist/services/stall/read-log-tail.d.ts.map +1 -1
  239. package/dist/services/stall/read-log-tail.js +6 -5
  240. package/dist/services/stall/read-log-tail.js.map +1 -1
  241. package/dist/services/stall/stall-detector.d.ts +32 -0
  242. package/dist/services/stall/stall-detector.d.ts.map +1 -1
  243. package/dist/services/stall/stall-detector.js +149 -6
  244. package/dist/services/stall/stall-detector.js.map +1 -1
  245. package/dist/services/stall/stall-poller.d.ts +34 -0
  246. package/dist/services/stall/stall-poller.d.ts.map +1 -1
  247. package/dist/services/stall/stall-poller.js +160 -35
  248. package/dist/services/stall/stall-poller.js.map +1 -1
  249. package/dist/services/strategy.d.ts +9 -0
  250. package/dist/services/strategy.d.ts.map +1 -1
  251. package/dist/services/strategy.js +41 -7
  252. package/dist/services/strategy.js.map +1 -1
  253. package/dist/services/tool-registry.d.ts.map +1 -1
  254. package/dist/services/tool-registry.js +87 -1
  255. package/dist/services/tool-registry.js.map +1 -1
  256. package/dist/services/user-config.js +1 -1
  257. package/dist/services/user-config.js.map +1 -1
  258. package/dist/services/vcs/azure-devops.d.ts +1 -1
  259. package/dist/services/vcs/azure-devops.d.ts.map +1 -1
  260. package/dist/services/vcs/azure-devops.js +105 -10
  261. package/dist/services/vcs/azure-devops.js.map +1 -1
  262. package/dist/services/vcs/bitbucket.d.ts.map +1 -1
  263. package/dist/services/vcs/bitbucket.js +16 -0
  264. package/dist/services/vcs/bitbucket.js.map +1 -1
  265. package/dist/services/vcs/github.d.ts.map +1 -1
  266. package/dist/services/vcs/github.js +56 -1
  267. package/dist/services/vcs/github.js.map +1 -1
  268. package/dist/services/vcs/types.d.ts +123 -2
  269. package/dist/services/vcs/types.d.ts.map +1 -1
  270. package/dist/services/version-check.d.ts +22 -0
  271. package/dist/services/version-check.d.ts.map +1 -0
  272. package/dist/services/version-check.js +103 -0
  273. package/dist/services/version-check.js.map +1 -0
  274. package/dist/skills/fleet-sprint-cli/SKILL.md +15 -3
  275. package/dist/skills/pm/SKILL.md +0 -1
  276. package/dist/skills/pm/beads.md +6 -0
  277. package/dist/skills/pm/cost.md +0 -1
  278. package/dist/skills/pm/fleet-addendum.md +6 -1
  279. package/dist/skills/pm/index.md +56 -0
  280. package/dist/skills/pm/kb-reconcile.md +132 -0
  281. package/dist/skills/pm/kb-review.md +109 -0
  282. package/dist/tools/check-status.d.ts +47 -0
  283. package/dist/tools/check-status.d.ts.map +1 -1
  284. package/dist/tools/check-status.js +245 -3
  285. package/dist/tools/check-status.js.map +1 -1
  286. package/dist/tools/child-id-allocator.d.ts +2 -2
  287. package/dist/tools/cloud-control.js +2 -2
  288. package/dist/tools/cloud-control.js.map +1 -1
  289. package/dist/tools/code-intelligence-codebase-memory.d.ts +11 -0
  290. package/dist/tools/code-intelligence-codebase-memory.d.ts.map +1 -0
  291. package/dist/tools/code-intelligence-codebase-memory.js +270 -0
  292. package/dist/tools/code-intelligence-codebase-memory.js.map +1 -0
  293. package/dist/tools/code-intelligence-freshness.d.ts +2 -0
  294. package/dist/tools/code-intelligence-freshness.d.ts.map +1 -0
  295. package/dist/tools/code-intelligence-freshness.js +26 -0
  296. package/dist/tools/code-intelligence-freshness.js.map +1 -0
  297. package/dist/tools/code-intelligence-gitnexus.d.ts +14 -0
  298. package/dist/tools/code-intelligence-gitnexus.d.ts.map +1 -0
  299. package/dist/tools/code-intelligence-gitnexus.js +475 -0
  300. package/dist/tools/code-intelligence-gitnexus.js.map +1 -0
  301. package/dist/tools/code-intelligence-kb-enrich.d.ts +2 -0
  302. package/dist/tools/code-intelligence-kb-enrich.d.ts.map +1 -0
  303. package/dist/tools/code-intelligence-kb-enrich.js +65 -0
  304. package/dist/tools/code-intelligence-kb-enrich.js.map +1 -0
  305. package/dist/tools/code-intelligence-reindex.d.ts +7 -0
  306. package/dist/tools/code-intelligence-reindex.d.ts.map +1 -0
  307. package/dist/tools/code-intelligence-reindex.js +106 -0
  308. package/dist/tools/code-intelligence-reindex.js.map +1 -0
  309. package/dist/tools/code-intelligence-telemetry.d.ts +5 -0
  310. package/dist/tools/code-intelligence-telemetry.d.ts.map +1 -0
  311. package/dist/tools/code-intelligence-telemetry.js +52 -0
  312. package/dist/tools/code-intelligence-telemetry.js.map +1 -0
  313. package/dist/tools/code-intelligence-tests.d.ts +2 -0
  314. package/dist/tools/code-intelligence-tests.d.ts.map +1 -0
  315. package/dist/tools/code-intelligence-tests.js +24 -0
  316. package/dist/tools/code-intelligence-tests.js.map +1 -0
  317. package/dist/tools/code-intelligence.d.ts +114 -0
  318. package/dist/tools/code-intelligence.d.ts.map +1 -0
  319. package/dist/tools/code-intelligence.js +124 -0
  320. package/dist/tools/code-intelligence.js.map +1 -0
  321. package/dist/tools/compose-permissions.d.ts +26 -0
  322. package/dist/tools/compose-permissions.d.ts.map +1 -1
  323. package/dist/tools/compose-permissions.js +257 -33
  324. package/dist/tools/compose-permissions.js.map +1 -1
  325. package/dist/tools/execute-command.d.ts +2 -0
  326. package/dist/tools/execute-command.d.ts.map +1 -1
  327. package/dist/tools/execute-command.js +114 -28
  328. package/dist/tools/execute-command.js.map +1 -1
  329. package/dist/tools/execute-prompt.d.ts +13 -1
  330. package/dist/tools/execute-prompt.d.ts.map +1 -1
  331. package/dist/tools/execute-prompt.js +310 -61
  332. package/dist/tools/execute-prompt.js.map +1 -1
  333. package/dist/tools/kb-capture.d.ts +53 -0
  334. package/dist/tools/kb-capture.d.ts.map +1 -0
  335. package/dist/tools/kb-capture.js +130 -0
  336. package/dist/tools/kb-capture.js.map +1 -0
  337. package/dist/tools/kb-context.d.ts +17 -0
  338. package/dist/tools/kb-context.d.ts.map +1 -0
  339. package/dist/tools/kb-context.js +29 -0
  340. package/dist/tools/kb-context.js.map +1 -0
  341. package/dist/tools/kb-export.d.ts +19 -0
  342. package/dist/tools/kb-export.d.ts.map +1 -0
  343. package/dist/tools/kb-export.js +344 -0
  344. package/dist/tools/kb-export.js.map +1 -0
  345. package/dist/tools/kb-feedback.d.ts +23 -0
  346. package/dist/tools/kb-feedback.d.ts.map +1 -0
  347. package/dist/tools/kb-feedback.js +43 -0
  348. package/dist/tools/kb-feedback.js.map +1 -0
  349. package/dist/tools/kb-freshness-sweep.d.ts +14 -0
  350. package/dist/tools/kb-freshness-sweep.d.ts.map +1 -0
  351. package/dist/tools/kb-freshness-sweep.js +29 -0
  352. package/dist/tools/kb-freshness-sweep.js.map +1 -0
  353. package/dist/tools/kb-harvest.d.ts +20 -0
  354. package/dist/tools/kb-harvest.d.ts.map +1 -0
  355. package/dist/tools/kb-harvest.js +143 -0
  356. package/dist/tools/kb-harvest.js.map +1 -0
  357. package/dist/tools/kb-import.d.ts +44 -0
  358. package/dist/tools/kb-import.d.ts.map +1 -0
  359. package/dist/tools/kb-import.js +239 -0
  360. package/dist/tools/kb-import.js.map +1 -0
  361. package/dist/tools/kb-invalidate.d.ts +19 -0
  362. package/dist/tools/kb-invalidate.d.ts.map +1 -0
  363. package/dist/tools/kb-invalidate.js +34 -0
  364. package/dist/tools/kb-invalidate.js.map +1 -0
  365. package/dist/tools/kb-list.d.ts +32 -0
  366. package/dist/tools/kb-list.d.ts.map +1 -0
  367. package/dist/tools/kb-list.js +43 -0
  368. package/dist/tools/kb-list.js.map +1 -0
  369. package/dist/tools/kb-promote.d.ts +20 -0
  370. package/dist/tools/kb-promote.d.ts.map +1 -0
  371. package/dist/tools/kb-promote.js +20 -0
  372. package/dist/tools/kb-promote.js.map +1 -0
  373. package/dist/tools/kb-query.d.ts +35 -0
  374. package/dist/tools/kb-query.d.ts.map +1 -0
  375. package/dist/tools/kb-query.js +111 -0
  376. package/dist/tools/kb-query.js.map +1 -0
  377. package/dist/tools/kb-reconcile-prefilter.d.ts +14 -0
  378. package/dist/tools/kb-reconcile-prefilter.d.ts.map +1 -0
  379. package/dist/tools/kb-reconcile-prefilter.js +26 -0
  380. package/dist/tools/kb-reconcile-prefilter.js.map +1 -0
  381. package/dist/tools/kb-resolve-contradiction.d.ts +23 -0
  382. package/dist/tools/kb-resolve-contradiction.d.ts.map +1 -0
  383. package/dist/tools/kb-resolve-contradiction.js +37 -0
  384. package/dist/tools/kb-resolve-contradiction.js.map +1 -0
  385. package/dist/tools/kb-session-prime.d.ts +26 -0
  386. package/dist/tools/kb-session-prime.d.ts.map +1 -0
  387. package/dist/tools/kb-session-prime.js +392 -0
  388. package/dist/tools/kb-session-prime.js.map +1 -0
  389. package/dist/tools/kb-setup.d.ts +20 -0
  390. package/dist/tools/kb-setup.d.ts.map +1 -0
  391. package/dist/tools/kb-setup.js +49 -0
  392. package/dist/tools/kb-setup.js.map +1 -0
  393. package/dist/tools/kb-stats.d.ts +20 -0
  394. package/dist/tools/kb-stats.d.ts.map +1 -0
  395. package/dist/tools/kb-stats.js +115 -0
  396. package/dist/tools/kb-stats.js.map +1 -0
  397. package/dist/tools/list-members.d.ts.map +1 -1
  398. package/dist/tools/list-members.js +6 -2
  399. package/dist/tools/list-members.js.map +1 -1
  400. package/dist/tools/member-detail.d.ts.map +1 -1
  401. package/dist/tools/member-detail.js +13 -3
  402. package/dist/tools/member-detail.js.map +1 -1
  403. package/dist/tools/member-reservation.d.ts.map +1 -1
  404. package/dist/tools/member-reservation.js +13 -1
  405. package/dist/tools/member-reservation.js.map +1 -1
  406. package/dist/tools/monitor-task.d.ts.map +1 -1
  407. package/dist/tools/monitor-task.js +38 -5
  408. package/dist/tools/monitor-task.js.map +1 -1
  409. package/dist/tools/provision-auth.d.ts.map +1 -1
  410. package/dist/tools/provision-auth.js +15 -8
  411. package/dist/tools/provision-auth.js.map +1 -1
  412. package/dist/tools/provision-vcs-auth.d.ts +5 -2
  413. package/dist/tools/provision-vcs-auth.d.ts.map +1 -1
  414. package/dist/tools/provision-vcs-auth.js +58 -52
  415. package/dist/tools/provision-vcs-auth.js.map +1 -1
  416. package/dist/tools/register-member.d.ts +21 -12
  417. package/dist/tools/register-member.d.ts.map +1 -1
  418. package/dist/tools/register-member.js +70 -3
  419. package/dist/tools/register-member.js.map +1 -1
  420. package/dist/tools/remove-member.d.ts.map +1 -1
  421. package/dist/tools/remove-member.js +19 -5
  422. package/dist/tools/remove-member.js.map +1 -1
  423. package/dist/tools/report-status.d.ts.map +1 -1
  424. package/dist/tools/report-status.js +2 -1
  425. package/dist/tools/report-status.js.map +1 -1
  426. package/dist/tools/revoke-vcs-auth.js +2 -2
  427. package/dist/tools/revoke-vcs-auth.js.map +1 -1
  428. package/dist/tools/send-email.d.ts +69 -0
  429. package/dist/tools/send-email.d.ts.map +1 -0
  430. package/dist/tools/send-email.js +177 -0
  431. package/dist/tools/send-email.js.map +1 -0
  432. package/dist/tools/setup-ssh-key.d.ts.map +1 -1
  433. package/dist/tools/setup-ssh-key.js +4 -1
  434. package/dist/tools/setup-ssh-key.js.map +1 -1
  435. package/dist/tools/stop-prompt.js +2 -2
  436. package/dist/tools/stop-prompt.js.map +1 -1
  437. package/dist/tools/update-agent-cli.js +2 -2
  438. package/dist/tools/update-agent-cli.js.map +1 -1
  439. package/dist/tools/update-member.d.ts +21 -12
  440. package/dist/tools/update-member.d.ts.map +1 -1
  441. package/dist/tools/update-member.js +43 -2
  442. package/dist/tools/update-member.js.map +1 -1
  443. package/dist/types.d.ts +12 -1
  444. package/dist/types.d.ts.map +1 -1
  445. package/dist/utils/agent-helpers.d.ts +36 -0
  446. package/dist/utils/agent-helpers.d.ts.map +1 -1
  447. package/dist/utils/agent-helpers.js +39 -1
  448. package/dist/utils/agent-helpers.js.map +1 -1
  449. package/dist/utils/platform.d.ts +7 -0
  450. package/dist/utils/platform.d.ts.map +1 -1
  451. package/dist/utils/platform.js +11 -1
  452. package/dist/utils/platform.js.map +1 -1
  453. package/dist/utils/prompt-errors.js +1 -1
  454. package/dist/utils/prompt-errors.js.map +1 -1
  455. package/dist/utils/session-caller.d.ts +28 -0
  456. package/dist/utils/session-caller.d.ts.map +1 -0
  457. package/dist/utils/session-caller.js +24 -0
  458. package/dist/utils/session-caller.js.map +1 -0
  459. package/dist/utils/work-folder-validation.d.ts +39 -0
  460. package/dist/utils/work-folder-validation.d.ts.map +1 -0
  461. package/dist/utils/work-folder-validation.js +60 -0
  462. package/dist/utils/work-folder-validation.js.map +1 -0
  463. package/dist/utils/workspace-trust.d.ts.map +1 -1
  464. package/dist/utils/workspace-trust.js +5 -1
  465. package/dist/utils/workspace-trust.js.map +1 -1
  466. package/dist/workflows/auto-sprint.js +550 -23
  467. package/package.json +7 -4
  468. package/packages/apra-fleet-client/src/client/api.mjs +210 -7
  469. package/packages/apra-fleet-se/apra-pm/agents/backlog-groomer.md +31 -19
  470. package/packages/apra-fleet-se/apra-pm/agents/ci-watcher.md +16 -1
  471. package/packages/apra-fleet-se/apra-pm/agents/deployer.md +37 -47
  472. package/packages/apra-fleet-se/apra-pm/agents/doer.md +147 -114
  473. package/packages/apra-fleet-se/apra-pm/agents/harvester.md +41 -34
  474. package/packages/apra-fleet-se/apra-pm/agents/integ-test-runner.md +98 -114
  475. package/packages/apra-fleet-se/apra-pm/agents/kb-reconciler.md +205 -0
  476. package/packages/apra-fleet-se/apra-pm/agents/plan-reviewer.md +45 -44
  477. package/packages/apra-fleet-se/apra-pm/agents/planner.md +121 -50
  478. package/packages/apra-fleet-se/apra-pm/agents/regression-test-runner.md +84 -81
  479. package/packages/apra-fleet-se/apra-pm/agents/reviewer.md +118 -44
  480. package/packages/apra-fleet-se/apra-pm/agents/schemas/doer-output.json +63 -3
  481. package/packages/apra-fleet-se/apra-pm/agents/schemas/harvester-output.json +59 -2
  482. package/packages/apra-fleet-se/apra-pm/agents/schemas/integ-test-runner-output.json +3 -3
  483. package/packages/apra-fleet-se/apra-pm/agents/schemas/kb-reconciler-output.json +87 -0
  484. package/packages/apra-fleet-se/apra-pm/agents/schemas/planner-output.json +65 -0
  485. package/packages/apra-fleet-se/apra-pm/agents/schemas/regression-test-runner-output.json +4 -17
  486. package/packages/apra-fleet-se/apra-pm/agents/schemas/reviewer-output.json +105 -8
  487. package/packages/apra-fleet-se/apra-pm/skills/pm/SKILL.md +0 -1
  488. package/packages/apra-fleet-se/apra-pm/skills/pm/beads.md +6 -0
  489. package/packages/apra-fleet-se/apra-pm/skills/pm/cost.md +0 -1
  490. package/packages/apra-fleet-se/apra-pm/skills/pm/fleet-addendum.md +6 -1
  491. package/packages/apra-fleet-se/apra-pm/skills/pm/index.md +56 -0
  492. package/packages/apra-fleet-se/apra-pm/skills/pm/kb-reconcile.md +132 -0
  493. package/packages/apra-fleet-se/apra-pm/skills/pm/kb-review.md +109 -0
  494. package/packages/apra-fleet-se/bin/cli.mjs +139 -3
  495. package/packages/apra-fleet-se/bin/serve.mjs +49 -2
  496. package/packages/apra-fleet-se/fleet-sprint/contracts.mjs +182 -38
  497. package/packages/apra-fleet-se/fleet-sprint/docs/README.md +23 -8
  498. package/packages/apra-fleet-se/fleet-sprint/docs/dolt-manual-recovery-verified.md +258 -0
  499. package/packages/apra-fleet-se/fleet-sprint/docs/dolt-sync-redesign.md +1487 -0
  500. package/packages/apra-fleet-se/fleet-sprint/docs/escalate-to-llm-design.md +908 -0
  501. package/packages/apra-fleet-se/fleet-sprint/docs/shared-orchestrator-reservation-design.md +399 -0
  502. package/packages/apra-fleet-se/fleet-sprint/docs/stabilization-log.md +14 -4
  503. package/packages/apra-fleet-se/fleet-sprint/dolt-settle.mjs +1148 -0
  504. package/packages/apra-fleet-se/fleet-sprint/dolt-sync.mjs +229 -112
  505. package/packages/apra-fleet-se/fleet-sprint/errors.mjs +91 -6
  506. package/packages/apra-fleet-se/fleet-sprint/runner.js +2469 -238
  507. package/packages/apra-fleet-se/fleet-sprint/se-os-commands.mjs +134 -0
  508. package/packages/apra-fleet-se/fleet-sprint/se-posix.mjs +154 -0
  509. package/packages/apra-fleet-se/fleet-sprint/se-windows-gitbash.mjs +97 -0
  510. package/packages/apra-fleet-se/fleet-sprint/se-windows.mjs +143 -0
  511. package/packages/apra-fleet-se/fleet-sprint/skills/fleet-sprint-cli/SKILL.md +15 -3
  512. package/packages/apra-fleet-se/fleet-sprint/skills/fleet-supervisor/SKILL.md +350 -0
  513. package/packages/apra-fleet-se/fleet-sprint/sprint-progress.mjs +101 -0
  514. package/packages/apra-fleet-se/fleet-sprint/vcs-module.mjs +51 -0
  515. package/packages/apra-fleet-se/fleet-sprint/vcs-providers/azure-devops.mjs +657 -12
  516. package/packages/apra-fleet-se/fleet-sprint/vcs-providers/dolt.mjs +33 -4
  517. package/packages/apra-fleet-se/fleet-sprint/vcs-providers/github.mjs +60 -30
  518. package/packages/apra-fleet-se/fleet-sprint/vcs-providers/index.mjs +205 -2
  519. package/packages/apra-fleet-se/fleet-sprint/vcs-providers/shell-helpers.mjs +164 -0
  520. package/packages/apra-fleet-se/fleet-sprint/viewer-extensions.mjs +141 -26
  521. package/packages/apra-fleet-se/package.json +1 -0
  522. package/packages/apra-fleet-workflow/src/viewer/index.mjs +294 -14
  523. package/packages/apra-fleet-workflow/src/viewer/run-title.mjs +60 -0
  524. package/packages/apra-fleet-workflow/src/workflow/index.mjs +443 -35
  525. package/skills/fleet/SKILL.md +20 -9
  526. package/skills/fleet/auth-azdevops.md +44 -5
  527. package/skills/fleet/auth-bitbucket.md +3 -3
  528. package/skills/fleet/auth-github.md +2 -2
  529. package/skills/fleet/beads-conflict-resolution.md +141 -0
  530. package/skills/fleet/beads.md +16 -12
  531. package/skills/fleet/knowledge-agent.md +66 -0
  532. package/skills/fleet/onboarding.md +4 -4
  533. package/skills/fleet/permissions.md +32 -8
  534. package/skills/fleet/profiles/base-dev.json +10 -1
  535. package/skills/fleet/profiles/base-reviewer.json +8 -1
  536. package/skills/fleet/profiles/tag-kb-reconciler.json +20 -0
  537. package/skills/fleet/skill-matrix.md +1 -1
  538. package/skills/fleet/troubleshooting.md +2 -1
  539. package/version.json +1 -1
  540. package/dist/providers/gemini.d.ts +0 -42
  541. package/dist/providers/gemini.d.ts.map +0 -1
  542. package/dist/providers/gemini.js +0 -202
  543. package/dist/providers/gemini.js.map +0 -1
  544. package/packages/apra-fleet-se/fleet-sprint/docs/coach-role-design.md +0 -151
  545. package/packages/apra-fleet-se/fleet-sprint/docs/dolt-tier2-runbook.md +0 -127
  546. package/packages/apra-fleet-se/fleet-sprint/dolt-recovery-path-b.mjs +0 -339
  547. package/packages/apra-fleet-se/fleet-sprint/dolt-recovery-tier2.mjs +0 -360
  548. package/packages/apra-fleet-se/fleet-sprint/dolt-recovery.mjs +0 -363
@@ -25,12 +25,12 @@
25
25
  },
26
26
  "deployedSha": {
27
27
  "type": "string",
28
- "description": "The deploy-verified git commit part 2 (smoke test) actually ran against. Optional for backward compatibility, but an orchestrator that supplied a deployed SHA in the dispatch prompt treats a missing or mismatching value as INCONCLUSIVE evidence (never a pass). See integ-test-runner.md 'Part-2 evidence freshness'."
28
+ "description": "The git commit the verification actually ran against. Optional for backward compatibility, but an orchestrator that supplied a deployed SHA in the dispatch prompt treats a missing or mismatching value as INCONCLUSIVE evidence (never a pass). See integ-test-runner.md Step 4."
29
29
  },
30
30
  "verifySetClosed": {
31
31
  "type": "array",
32
32
  "items": { "type": "string" },
33
- "description": "apra-fleet-jfo: verify-set bead ids (any issue_type, Step 1b) closed this run. Optional for backward compatibility -- absent/omitted on a dispatch that named no verify-set ids."
33
+ "description": "Verify-set bead ids (any issue_type, Step 1b) closed this run. Optional for backward compatibility -- absent/omitted on a dispatch that named no verify-set ids."
34
34
  },
35
35
  "verifySetLeftOpen": {
36
36
  "type": "array",
@@ -42,7 +42,7 @@
42
42
  "reason": { "type": "string" }
43
43
  }
44
44
  },
45
- "description": "apra-fleet-jfo: verify-set bead ids (Step 1b) left open this run, with why (gap bug filed, or inconclusive). Optional for backward compatibility."
45
+ "description": "Verify-set bead ids (Step 1b) left open this run, with why (gap bug filed, or inconclusive). Optional for backward compatibility."
46
46
  },
47
47
  "observedFailures": {
48
48
  "type": "array",
@@ -0,0 +1,87 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "apra-pm/kb-reconciler-output@1",
4
+ "version": 1,
5
+ "title": "kb-reconciler output",
6
+ "description": "Canonical machine-readable output contract for the kb-reconciler role. See agents/kb-reconciler.md for the prose contract this mirrors.",
7
+ "type": "object",
8
+ "required": [
9
+ "pairsReceived",
10
+ "codeDecided",
11
+ "tierDecided",
12
+ "deferred",
13
+ "resolutions",
14
+ "deferredPairs",
15
+ "bibleCommitted"
16
+ ],
17
+ "properties": {
18
+ "pairsReceived": {
19
+ "type": "number",
20
+ "description": "Count of contradiction pairs received in the dispatch prompt."
21
+ },
22
+ "codeDecided": {
23
+ "type": "number",
24
+ "description": "Count of pairs whose winner was determined by reading the merged code."
25
+ },
26
+ "tierDecided": {
27
+ "type": "number",
28
+ "description": "Count of pairs where the code was silent and the trust-tier tiebreak (CONFIRMED > INFERRED > UNVERIFIED) decided the winner."
29
+ },
30
+ "deferred": {
31
+ "type": "number",
32
+ "description": "Count of pairs left flagged: active user-directives, or genuinely undecidable (same tier, code silent)."
33
+ },
34
+ "resolutions": {
35
+ "type": "array",
36
+ "description": "Every pair actually resolved via kb_resolve_contradiction, code-decided or tier-decided alike.",
37
+ "items": {
38
+ "type": "object",
39
+ "required": [
40
+ "winnerId",
41
+ "loserId",
42
+ "evidence"
43
+ ],
44
+ "properties": {
45
+ "winnerId": {
46
+ "type": "string"
47
+ },
48
+ "loserId": {
49
+ "type": "string"
50
+ },
51
+ "evidence": {
52
+ "type": "string",
53
+ "description": "For code-decided wins: a real file path + symbol actually read. For tier-decided wins: the trust-tier tiebreak reasoning."
54
+ }
55
+ }
56
+ }
57
+ },
58
+ "deferredPairs": {
59
+ "type": "array",
60
+ "description": "Pairs left flagged, unresolved, with a reason.",
61
+ "items": {
62
+ "type": "object",
63
+ "required": [
64
+ "originalId",
65
+ "challengerId",
66
+ "reason"
67
+ ],
68
+ "properties": {
69
+ "originalId": {
70
+ "type": "string"
71
+ },
72
+ "challengerId": {
73
+ "type": "string"
74
+ },
75
+ "reason": {
76
+ "type": "string",
77
+ "description": "\"active-directive\" or an explanation of why the pair stayed undecided."
78
+ }
79
+ }
80
+ }
81
+ },
82
+ "bibleCommitted": {
83
+ "type": "boolean",
84
+ "description": "The committed value returned by kb_export's result after Step 8."
85
+ }
86
+ }
87
+ }
@@ -0,0 +1,65 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "apra-pm/planner-output@1",
4
+ "version": 1,
5
+ "title": "planner output",
6
+ "description": "Canonical machine-readable output contract for the planner role. See agents/planner.md Step 4 (Validate your own DAG) and Step 0 (Knowledge Bank) for the prose contract this mirrors. The planner previously had no schema at all -- its dispatch ended 'Confirm with any text when done' -- so this is the contract that makes its output routable rather than free prose.",
7
+ "type": "object",
8
+ "required": ["status", "notes"],
9
+ "properties": {
10
+ "status": {
11
+ "type": "string",
12
+ "enum": ["OK", "BLOCKED"]
13
+ },
14
+ "notes": {
15
+ "type": "string"
16
+ },
17
+ "featureIds": {
18
+ "type": "array",
19
+ "description": "Feature-level bead ids created or updated this round.",
20
+ "items": { "type": "string" }
21
+ },
22
+ "taskIds": {
23
+ "type": "array",
24
+ "description": "Task-level bead ids created or updated this round.",
25
+ "items": { "type": "string" }
26
+ },
27
+ "kb_captures": {
28
+ "type": "array",
29
+ "description": "Durable knowledge this role verified during its run. The engine makes the kb_capture calls; the role only decides. Optional -- omit or send [] to capture nothing.",
30
+ "items": {
31
+ "type": "object",
32
+ "required": ["type", "title", "summary", "content", "source_files"],
33
+ "properties": {
34
+ "type": {
35
+ "type": "string",
36
+ "enum": ["knowledge", "learning", "runbook"]
37
+ },
38
+ "title": {
39
+ "type": "string",
40
+ "minLength": 8
41
+ },
42
+ "summary": {
43
+ "type": "string",
44
+ "minLength": 20
45
+ },
46
+ "content": {
47
+ "type": "string",
48
+ "description": "Full detail of the entry. REQUIRED -- kbCaptureSchema declares content as z.string().min(1), so a capture without it is rejected at the MCP boundary and persists nothing (apra-fleet-23c).",
49
+ "minLength": 40
50
+ },
51
+ "source_files": {
52
+ "type": "array",
53
+ "description": "Files that make this claim checkable. At least one is REQUIRED -- SqliteProvider.capture() rejects an entry with no basis, because the freshness sweep can never stale it.",
54
+ "items": { "type": "string" },
55
+ "minItems": 1
56
+ },
57
+ "symbols": {
58
+ "type": "array",
59
+ "items": { "type": "string" }
60
+ }
61
+ }
62
+ }
63
+ }
64
+ }
65
+ }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
3
  "$id": "apra-pm/regression-test-runner-output@1",
4
- "version": 1,
4
+ "version": 2,
5
5
  "title": "regression-test-runner output",
6
6
  "description": "Canonical machine-readable output contract for the regression-test-runner role. See agents/regression-test-runner.md Step 4 for the prose contract this mirrors. This result is informational: it never gates the current sprint's PASS/FAIL verdict -- failures carry over to a future sprint as parent-less [regression][carry-over] beads.",
7
7
  "type": "object",
@@ -17,7 +17,7 @@
17
17
  },
18
18
  "smokePassed": {
19
19
  "type": "boolean",
20
- "description": "Result of playbook Part 2 -- the toy-sprint smoke test."
20
+ "description": "Result of playbook Part 2 -- the sandbox smoke test."
21
21
  },
22
22
  "bugsFiled": {
23
23
  "type": "array",
@@ -30,21 +30,8 @@
30
30
  },
31
31
  "smokeEvidence": {
32
32
  "type": "object",
33
- "description": "Optional structured evidence from Part 2 (the toy-sprint smoke test), so the result is machine-checkable instead of self-reported prose.",
34
- "properties": {
35
- "versionStdout": {
36
- "type": "string",
37
- "description": "Verbatim stdout of running the toy CLI's --version on the sprint branch."
38
- },
39
- "canaryStatus": {
40
- "type": "string",
41
- "description": "The status field from `bd show gh-toy-4ef` (e.g. \"closed\")."
42
- },
43
- "toyRepoHeadSha": {
44
- "type": "string",
45
- "description": "The toy repo's head commit SHA after the toy sprint."
46
- }
47
- }
33
+ "additionalProperties": true,
34
+ "description": "Optional structured evidence from Part 2 (the target repo's own smoke test), so the result is machine-checkable instead of self-reported prose. This schema does not define its shape -- the target repo's regression-test-playbook.md (Part 2 / smoke test section) does. Omit if that playbook defines no structured evidence."
48
35
  }
49
36
  }
50
37
  }
@@ -5,32 +5,129 @@
5
5
  "title": "reviewer output",
6
6
  "description": "Canonical machine-readable output contract for the reviewer role. See agents/reviewer.md Step 5 for the prose contract this mirrors.",
7
7
  "type": "object",
8
- "required": ["verdict", "notes", "reopenIds", "newTasks"],
8
+ "required": [
9
+ "verdict",
10
+ "notes",
11
+ "reopenIds",
12
+ "newTasks"
13
+ ],
9
14
  "properties": {
10
15
  "verdict": {
11
16
  "type": "string",
12
- "enum": ["APPROVED", "CHANGES_NEEDED"]
17
+ "enum": [
18
+ "APPROVED",
19
+ "CHANGES_NEEDED"
20
+ ]
13
21
  },
14
22
  "notes": {
15
23
  "type": "string"
16
24
  },
17
25
  "reopenIds": {
18
26
  "type": "array",
19
- "items": { "type": "string" }
27
+ "items": {
28
+ "type": "string"
29
+ }
20
30
  },
21
31
  "replanIds": {
22
32
  "type": "array",
23
- "items": { "type": "string" }
33
+ "items": {
34
+ "type": "string"
35
+ }
24
36
  },
25
37
  "newTasks": {
26
38
  "type": "array",
27
39
  "items": {
28
40
  "type": "object",
29
- "required": ["title", "description", "priority"],
41
+ "required": [
42
+ "title",
43
+ "description",
44
+ "priority"
45
+ ],
46
+ "properties": {
47
+ "title": {
48
+ "type": "string",
49
+ "description": "Plain text only: letters, digits, space, and . , : ; ! ? ( ) ' _ / [ ] - -- nothing else. No backticks, double quotes, $, or backslash (the title is interpolated into a shell command downstream). Do NOT wrap a command/flag/filename in backticks here -- write it plain (e.g. \"Surface the Windows service registration mode in apra-fleet status\") or move the formatted detail into description instead, which has no such restriction. NOT enforced as a hard schema constraint here (deliberately no \"pattern\"): a single out-of-allowlist newTask title must never make ajv reject/retry the WHOLE structured verdict (verdict, notes, reopenIds, and the other newTasks) -- see validateNewTask() in fleet-sprint/runner.js, the actual (per-item, non-fatal) enforcement point, applied after parsing."
50
+ },
51
+ "description": {
52
+ "type": "string"
53
+ },
54
+ "priority": {
55
+ "type": "string"
56
+ }
57
+ }
58
+ }
59
+ },
60
+ "kb_promotions": {
61
+ "type": "array",
62
+ "description": "Entries this reviewer VERIFIED against the tree and is promoting to CONFIRMED. Reviewer-only: promotion is the sole path that mints CONFIRMED, and widening capture does not widen promotion. The engine makes the kb_promote calls.",
63
+ "items": {
64
+ "type": "object",
65
+ "required": [
66
+ "id",
67
+ "reason"
68
+ ],
69
+ "properties": {
70
+ "id": {
71
+ "type": "string",
72
+ "description": "The entry id, copied verbatim from the 'KNOWLEDGE BANK -- promotion candidates' block in your dispatch prompt. That block is the ONLY source of promotable ids -- do not call a kb_* tool to find one, and never invent one.",
73
+ "minLength": 1
74
+ },
75
+ "reason": {
76
+ "type": "string",
77
+ "description": "The evidence for this promotion -- what you actually checked. kb_promote refuses a trivial reason.",
78
+ "minLength": 20
79
+ }
80
+ }
81
+ }
82
+ },
83
+ "kb_captures": {
84
+ "type": "array",
85
+ "description": "Durable knowledge this role verified during its run. The engine makes the kb_capture calls; the role only decides. Optional -- omit or send [] to capture nothing.",
86
+ "items": {
87
+ "type": "object",
88
+ "required": [
89
+ "type",
90
+ "title",
91
+ "summary",
92
+ "content",
93
+ "source_files"
94
+ ],
30
95
  "properties": {
31
- "title": { "type": "string" },
32
- "description": { "type": "string" },
33
- "priority": { "type": "string" }
96
+ "type": {
97
+ "type": "string",
98
+ "enum": [
99
+ "knowledge",
100
+ "learning",
101
+ "runbook"
102
+ ]
103
+ },
104
+ "title": {
105
+ "type": "string",
106
+ "minLength": 8
107
+ },
108
+ "summary": {
109
+ "type": "string",
110
+ "minLength": 20
111
+ },
112
+ "content": {
113
+ "type": "string",
114
+ "description": "Full detail of the entry. REQUIRED -- kbCaptureSchema declares content as z.string().min(1), so a capture without it is rejected at the MCP boundary and persists nothing (apra-fleet-23c).",
115
+ "minLength": 40
116
+ },
117
+ "source_files": {
118
+ "type": "array",
119
+ "description": "Files that make this claim checkable. At least one is REQUIRED -- SqliteProvider.capture() rejects an entry with no basis, because the freshness sweep can never stale it.",
120
+ "items": {
121
+ "type": "string"
122
+ },
123
+ "minItems": 1
124
+ },
125
+ "symbols": {
126
+ "type": "array",
127
+ "items": {
128
+ "type": "string"
129
+ }
130
+ }
34
131
  }
35
132
  }
36
133
  }
@@ -335,7 +335,6 @@ filename -- each provider expects a different name:
335
335
  |----------|-------------|
336
336
  | Claude | CLAUDE.md |
337
337
  | Antigravity (agy) | AGY.md |
338
- | Gemini | GEMINI.md |
339
338
  | Codex | AGENTS.md |
340
339
  | Copilot | COPILOT.md |
341
340
  | OpenCode | OPENCODE.md |
@@ -132,6 +132,12 @@ reset it with `bd update <id> --status=open`. See `sprint.md` Recovery.
132
132
 
133
133
  ## Rules
134
134
 
135
+ - **Title is plain text only** -- letters, digits, space, and `. , : ; ! ? ( ) ' _ / [ ] -`.
136
+ No backticks, double quotes, `$`, or backslash: every `bd create ... "<title>"` /
137
+ `--title="..."` is shell-interpolated verbatim. Put any command/flag/filename or other
138
+ formatted detail in `--description` instead, which has no such restriction. Applies to
139
+ every role that creates beads directly (planner, integ-test-runner,
140
+ regression-test-runner, backlog-groomer), not just reviewer's `newTasks`.
135
141
  - **Check before create** (sprint root and task) -- `bd search ... --status all`; reuse if
136
142
  found, never duplicate.
137
143
  - **Check before claim** -- dispatch only if the task is `open`.
@@ -33,7 +33,6 @@ Replace `__SKILL_DIR__` with the absolute path for your provider:
33
33
  | Provider | `__SKILL_DIR__` |
34
34
  |----------|----------------|
35
35
  | Claude | `~/.claude/skills/pm` |
36
- | Gemini | `~/.gemini/skills/pm` |
37
36
  | AGY | `~/.gemini/antigravity-cli/skills/pm` |
38
37
  | OpenCode | `~/.config/opencode/skills/pm` |
39
38
 
@@ -89,7 +89,6 @@ Use member_detail -> llmProvider to determine the target filename:
89
89
  |----------|----------|
90
90
  | Claude | CLAUDE.md |
91
91
  | Antigravity (agy) | AGY.md |
92
- | Gemini | GEMINI.md |
93
92
  | Codex | AGENTS.md |
94
93
  | Copilot | COPILOT.md |
95
94
  | OpenCode | OPENCODE.md |
@@ -113,6 +112,12 @@ uses {{secure.github_pat}} in its own execute_command calls. The
113
112
  execute_command, not inside your own quotes (it is already single-quote-escaped
114
113
  by the fleet).
115
114
 
115
+ Email provider secrets follow the same credential-store pattern: store with
116
+ credential_store_set (names: "sendgrid_api_key" or "smtp_password"). The
117
+ send_email tool takes non-secret config inline (provider, host, port, user,
118
+ from) -- the workflow owns that config, not the server environment. Never pass
119
+ email secrets in workflow prompts, config files, or environment variables.
120
+
116
121
  ## Fleet call batching (R8)
117
122
 
118
123
  When executing a sequence of fleet calls -- any combination of send_files,
@@ -0,0 +1,56 @@
1
+ # Project Index
2
+
3
+ Index the project repo for code intelligence so fleet members can use
4
+ code_graph, code_impact, code_query, and code_context tools.
5
+
6
+ ## Flow
7
+
8
+ 1. Read `<project>/status.md` to find the repo path and an available member.
9
+ 2. Pick any online member whose work_folder is the project repo. If no member
10
+ is pointed at the repo, use any local online member and set `run_from` to
11
+ the repo path.
12
+ 3. Run via `execute_command` (wrap in background Agent per fleet rules):
13
+ ```
14
+ npx gitnexus analyze --embeddings
15
+ ```
16
+ - `run_from`: project repo root
17
+ - `timeout_s`: 300 (indexing large repos can take a minute)
18
+ 4. Report the result: nodes indexed, edges, flows (gitnexus prints this on
19
+ completion). If gitnexus is not installed, it will be fetched automatically
20
+ via npx.
21
+ 5. Non-fatal: if the command fails (e.g. no package.json, unsupported language),
22
+ log the error and tell the user -- do not block the sprint.
23
+
24
+ ## The `--embeddings` flag
25
+
26
+ - Enables semantic embedding generation using a LOCAL ONNX CPU model
27
+ (`Snowflake/snowflake-arctic-embed-xs`, 384-dim) bundled with gitnexus --
28
+ no API key, no external service, no config needed.
29
+ - One-time cost: the first `--embeddings` run on a machine downloads the
30
+ model (~87 MB) from HuggingFace and caches it at `~/.cache/huggingface`;
31
+ every run after that is offline.
32
+ - Embeddings are OFF by default and PRESERVED across a plain `analyze`
33
+ (only `--drop-embeddings` removes them), so passing `--embeddings` here is
34
+ additive and safe to run repeatedly.
35
+ - win32 caveat: on Windows, LadybugDB's VECTOR index is unavailable, so
36
+ semantic search falls back to an exact scan (capped at 10000 chunks) --
37
+ this still works, it is just brute-force rather than an ANN index. Not a
38
+ blocker; see `docs/code-intelligence-embeddings.md` for the full
39
+ investigation.
40
+
41
+ ## When to run
42
+
43
+ - **Automatically inside `/pm init`** -- runs as the final step of project initialization.
44
+ The worktree must exist before indexing (gitnexus needs files on disk to analyze).
45
+ - **Automatically at VERIFY checkpoints** -- checkpoints re-run npx gitnexus analyze to keep
46
+ mid-sprint symbols visible to later phases (incremental via fileHashes in .gitnexus/meta.json,
47
+ takes seconds).
48
+ - After a large merge or rebase that changes many files
49
+ - When `kb_session_prime` returns many stale entries
50
+ - Any time the user asks to re-index (run `/pm index` explicitly)
51
+
52
+ ## Notes
53
+
54
+ - Indexing is per-repo and persists on disk -- subsequent runs are incremental.
55
+ - The index is used by the gitnexus provider behind code_graph/impact/query/context.
56
+ - Fleet members never call gitnexus directly -- they use the fleet tools.
@@ -0,0 +1,132 @@
1
+ # /pm kb-reconcile
2
+
3
+ Reconcile a warm local KB against a merged bible after two or more branches
4
+ land -- absorb the incoming knowledge, revive entries whose basis matches
5
+ the merged worktree again, mechanically settle contradictions a file hash
6
+ can decide, and dispatch a reconciler agent for the rest. Ends with the
7
+ canonical bible re-exported so the merged branch's KB reflects merged truth.
8
+
9
+ ## When to run
10
+
11
+ - After merging branches (including this sprint's own PR merging into its
12
+ base) -- as a standalone command, or as the post-merge hook inside
13
+ `/pm cleanup` (see SKILL.md's completion flow).
14
+ - Any time a local KB needs to catch up with a `.fleet/kb-canonical.json`
15
+ bible produced elsewhere (a teammate's branch, a different worktree) --
16
+ whether or not a formal merge just happened.
17
+ - Periodically, alongside `/pm kb-review`, as KB hygiene.
18
+
19
+ ## Trust boundary (state honestly, do not skip)
20
+
21
+ Step 1 (`kb_import`) reads a bible file. Importing the repo-resolved
22
+ `.fleet/kb-canonical.json` is the git-reviewed, human-merged trusted channel
23
+ -- non-directive entries there keep their bible confidence. An explicit
24
+ `--path` bible is CALLER-ASSERTED trust: equivalent in power to the
25
+ already-exposed `kb_promote` surface (which can walk any entry
26
+ `INFERRED -> CONFIRMED` one call at a time), not a new privilege class.
27
+ `type: 'user-directive'` entries are quarantined to pending proposals either
28
+ way -- a bible can never smuggle an active directive; activation stays
29
+ CLI-only (`apra-fleet kb approve-directive`).
30
+
31
+ ## Steps
32
+
33
+ ### Step 1: Import the merged bible
34
+
35
+ ```
36
+ kb_import({ repo: "<merged worktree path>" })
37
+ ```
38
+
39
+ or the CLI equivalent, `apra-fleet kb import --repo <path>`, for a human
40
+ running this post-merge by hand. Omit `path` to resolve
41
+ `<repo>/.fleet/kb-canonical.json` (the trusted channel); pass an explicit
42
+ `path` only when importing a bible from somewhere else (caller-asserted
43
+ trust, see above).
44
+
45
+ Report: `{ imported, skipped, linked, flagged, sweep }`. `kb_import`
46
+ already runs a freshness sweep internally at the end of its own run, scoped
47
+ to the imported entries' impact -- Step 2 below is still worth running
48
+ explicitly (see its note).
49
+
50
+ ### Step 2: Freshness sweep
51
+
52
+ ```
53
+ kb_freshness_sweep()
54
+ ```
55
+
56
+ Re-hashes EVERY entry in the KB that carries a stored basis against the
57
+ CURRENT (merged) worktree -- not just the entries `kb_import` just touched.
58
+ Un-stales matches (the D2 predicate still excludes superseded, downvoted, and
59
+ invalidated entries from revival), stales mismatches. This is what actually
60
+ performs branch-switch revival: `kb_session_prime`'s candidate set excludes
61
+ stale entries by definition, so priming alone can never revive anything.
62
+
63
+ Idempotent, and worth running explicitly even right after `kb_import` (whose
64
+ internal sweep covers the same ground) because it also covers the
65
+ reconcile-WITHOUT-import path -- e.g. re-running `/pm kb-reconcile` after
66
+ just switching worktree state with no new bible to import.
67
+
68
+ No sweep is needed AFTER Step 3 or Step 4 below: `kb_resolve_contradiction`
69
+ sets each winner's final stale state itself, including the predicate-guarded
70
+ un-stale check, as part of resolving the pair (hardened D4) -- a
71
+ post-resolution sweep would be redundant.
72
+
73
+ ### Step 3: Hash prefilter
74
+
75
+ ```
76
+ kb_reconcile_prefilter()
77
+ ```
78
+
79
+ For every remaining flagged contradiction pair (`flaggedPairs()` -- this
80
+ INCLUDES stale members; the imported side of a pair is typically stale
81
+ right after Step 1/2, and that is exactly the case this step exists to
82
+ resolve), re-hashes both sides' full source-file bases against the CURRENT
83
+ worktree. Exactly one side fully matching wins mechanically, via the same
84
+ `kb_resolve_contradiction` write path the reconciler agent uses (evidence:
85
+ `"hash-basis match on merged worktree"`). Pairs where both sides match, both
86
+ mismatch, either has an empty/missing basis, or either side is an ACTIVE
87
+ user-directive are left untouched for Step 4.
88
+
89
+ Report: `{ pairs, resolved, left_for_agent, skipped_directive }`.
90
+
91
+ ### Step 4: Reconciler agent
92
+
93
+ If `left_for_agent` is non-empty, dispatch the `kb-reconciler` agent
94
+ (`agents/kb-reconciler.md`, model tier cheap/standard)
95
+ with that array. It reads the MERGED code via `code_context`/`code_impact`/
96
+ `code_query` (never Glob/Grep) for each remaining pair, resolves what the
97
+ code decides via `kb_resolve_contradiction`, falls back to a trust-tier
98
+ tiebreak (`CONFIRMED > INFERRED > UNVERIFIED`) when the code is silent, and
99
+ leaves genuinely undecidable pairs flagged for `/pm kb-review`. Active
100
+ user-directives are NEVER auto-retired. See `agents/kb-reconciler.md` for the
101
+ full process and the single-write-path rule.
102
+
103
+ If `left_for_agent` is empty, skip straight to Step 5.
104
+
105
+ ### Step 5: Export
106
+
107
+ ```
108
+ kb_export()
109
+ ```
110
+
111
+ Writes every live `CONFIRMED` project entry -- which now includes every
112
+ mechanical and agent-resolved winner -- to `.fleet/kb-canonical.json` and
113
+ auto-commits it (pathspec-only, identity `pm-kb`, non-fatal on any git
114
+ failure). This is existing `kb_export` machinery; no new commit step is
115
+ needed here. Push is not automatic; it rides the normal sprint push cadence.
116
+
117
+ ## Report
118
+
119
+ After all steps:
120
+
121
+ ```
122
+ /pm kb-reconcile complete.
123
+ Import: imported=<n> skipped=<n> linked=<n> flagged=<n>
124
+ Sweep: checked=<n> staled=<n> unstaled=<n>
125
+ Prefilter: pairs=<n> resolved=<n> left_for_agent=<n> skipped_directive=<n>
126
+ Reconciler: codeDecided=<n> tierDecided=<n> deferred=<n> (omitted if Step 4 was skipped)
127
+ Export: exported=<n> committed=<true|false>
128
+ ```
129
+
130
+ Any `deferred` pairs from the reconciler, and any pair `kb_reconcile_prefilter`
131
+ skipped for an active directive, are handled the same way as any other
132
+ flagged entry going forward: surface them next time `/pm kb-review` runs.