@apralabs/apra-fleet 0.4.1 → 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 (276) hide show
  1. package/README.md +16 -8
  2. package/dist/agents/backlog-groomer.md +17 -21
  3. package/dist/agents/ci-watcher.md +3 -0
  4. package/dist/agents/deployer.md +22 -44
  5. package/dist/agents/doer.md +131 -132
  6. package/dist/agents/harvester.md +20 -32
  7. package/dist/agents/integ-test-runner.md +81 -113
  8. package/dist/agents/kb-reconciler.md +31 -42
  9. package/dist/agents/plan-reviewer.md +32 -44
  10. package/dist/agents/planner.md +51 -63
  11. package/dist/agents/regression-test-runner.md +65 -80
  12. package/dist/agents/reviewer.md +56 -83
  13. package/dist/agents/schemas/integ-test-runner-output.json +1 -1
  14. package/dist/agents/schemas/regression-test-runner-output.json +4 -17
  15. package/dist/cli/auth.d.ts.map +1 -1
  16. package/dist/cli/auth.js +1 -2
  17. package/dist/cli/auth.js.map +1 -1
  18. package/dist/cli/config.d.ts +3 -3
  19. package/dist/cli/config.d.ts.map +1 -1
  20. package/dist/cli/config.js +4 -13
  21. package/dist/cli/config.js.map +1 -1
  22. package/dist/cli/install.d.ts.map +1 -1
  23. package/dist/cli/install.js +5 -39
  24. package/dist/cli/install.js.map +1 -1
  25. package/dist/cli/register-member.js +1 -1
  26. package/dist/cli/start.d.ts.map +1 -1
  27. package/dist/cli/start.js +7 -0
  28. package/dist/cli/start.js.map +1 -1
  29. package/dist/cli/uninstall.d.ts.map +1 -1
  30. package/dist/cli/uninstall.js +5 -3
  31. package/dist/cli/uninstall.js.map +1 -1
  32. package/dist/cli/watch.d.ts +26 -3
  33. package/dist/cli/watch.d.ts.map +1 -1
  34. package/dist/cli/watch.js +41 -9
  35. package/dist/cli/watch.js.map +1 -1
  36. package/dist/os/git-bash-candidates.d.ts +35 -0
  37. package/dist/os/git-bash-candidates.d.ts.map +1 -0
  38. package/dist/os/git-bash-candidates.js +46 -0
  39. package/dist/os/git-bash-candidates.js.map +1 -0
  40. package/dist/os/index.d.ts +13 -4
  41. package/dist/os/index.d.ts.map +1 -1
  42. package/dist/os/index.js +17 -2
  43. package/dist/os/index.js.map +1 -1
  44. package/dist/os/linux.js +1 -1
  45. package/dist/os/linux.js.map +1 -1
  46. package/dist/os/os-commands.d.ts +7 -0
  47. package/dist/os/os-commands.d.ts.map +1 -1
  48. package/dist/os/os-commands.js.map +1 -1
  49. package/dist/os/windows-gitbash.d.ts +93 -0
  50. package/dist/os/windows-gitbash.d.ts.map +1 -0
  51. package/dist/os/windows-gitbash.js +244 -0
  52. package/dist/os/windows-gitbash.js.map +1 -0
  53. package/dist/os/windows.d.ts.map +1 -1
  54. package/dist/os/windows.js +27 -5
  55. package/dist/os/windows.js.map +1 -1
  56. package/dist/providers/agy.d.ts +3 -2
  57. package/dist/providers/agy.d.ts.map +1 -1
  58. package/dist/providers/agy.js +11 -2
  59. package/dist/providers/agy.js.map +1 -1
  60. package/dist/providers/claude.d.ts +3 -2
  61. package/dist/providers/claude.d.ts.map +1 -1
  62. package/dist/providers/claude.js +22 -3
  63. package/dist/providers/claude.js.map +1 -1
  64. package/dist/providers/codex.d.ts +3 -2
  65. package/dist/providers/codex.d.ts.map +1 -1
  66. package/dist/providers/codex.js +5 -2
  67. package/dist/providers/codex.js.map +1 -1
  68. package/dist/providers/copilot.d.ts +3 -2
  69. package/dist/providers/copilot.d.ts.map +1 -1
  70. package/dist/providers/copilot.js +7 -2
  71. package/dist/providers/copilot.js.map +1 -1
  72. package/dist/providers/index.d.ts +0 -1
  73. package/dist/providers/index.d.ts.map +1 -1
  74. package/dist/providers/index.js +0 -3
  75. package/dist/providers/index.js.map +1 -1
  76. package/dist/providers/none.d.ts +3 -2
  77. package/dist/providers/none.d.ts.map +1 -1
  78. package/dist/providers/none.js +5 -2
  79. package/dist/providers/none.js.map +1 -1
  80. package/dist/providers/opencode.d.ts +3 -2
  81. package/dist/providers/opencode.d.ts.map +1 -1
  82. package/dist/providers/opencode.js +5 -2
  83. package/dist/providers/opencode.js.map +1 -1
  84. package/dist/providers/provider.d.ts +16 -7
  85. package/dist/providers/provider.d.ts.map +1 -1
  86. package/dist/providers/provider.js +2 -2
  87. package/dist/providers/provider.js.map +1 -1
  88. package/dist/services/agent-provisioner.js +2 -2
  89. package/dist/services/agent-provisioner.js.map +1 -1
  90. package/dist/services/cloud/activity.js +2 -2
  91. package/dist/services/cloud/activity.js.map +1 -1
  92. package/dist/services/context-admission.d.ts.map +1 -1
  93. package/dist/services/context-admission.js +9 -7
  94. package/dist/services/context-admission.js.map +1 -1
  95. package/dist/services/credential-cleanup.d.ts.map +1 -1
  96. package/dist/services/credential-cleanup.js +22 -3
  97. package/dist/services/credential-cleanup.js.map +1 -1
  98. package/dist/services/member-home.d.ts +1 -1
  99. package/dist/services/member-home.d.ts.map +1 -1
  100. package/dist/services/member-home.js +15 -12
  101. package/dist/services/member-home.js.map +1 -1
  102. package/dist/services/model-pricing.d.ts.map +1 -1
  103. package/dist/services/model-pricing.js +0 -5
  104. package/dist/services/model-pricing.js.map +1 -1
  105. package/dist/services/orphan-recovery.d.ts +6 -3
  106. package/dist/services/orphan-recovery.d.ts.map +1 -1
  107. package/dist/services/orphan-recovery.js +17 -14
  108. package/dist/services/orphan-recovery.js.map +1 -1
  109. package/dist/services/preflight-check.js +2 -2
  110. package/dist/services/preflight-check.js.map +1 -1
  111. package/dist/services/shell-probe.d.ts +131 -0
  112. package/dist/services/shell-probe.d.ts.map +1 -0
  113. package/dist/services/shell-probe.js +210 -0
  114. package/dist/services/shell-probe.js.map +1 -0
  115. package/dist/services/singleton.d.ts +2 -0
  116. package/dist/services/singleton.d.ts.map +1 -1
  117. package/dist/services/singleton.js +1 -1
  118. package/dist/services/singleton.js.map +1 -1
  119. package/dist/services/ssh.js +2 -2
  120. package/dist/services/ssh.js.map +1 -1
  121. package/dist/services/stall/find-log-file.d.ts.map +1 -1
  122. package/dist/services/stall/find-log-file.js +22 -16
  123. package/dist/services/stall/find-log-file.js.map +1 -1
  124. package/dist/services/stall/read-log-tail.d.ts.map +1 -1
  125. package/dist/services/stall/read-log-tail.js +6 -5
  126. package/dist/services/stall/read-log-tail.js.map +1 -1
  127. package/dist/services/stall/stall-poller.d.ts.map +1 -1
  128. package/dist/services/stall/stall-poller.js +35 -42
  129. package/dist/services/stall/stall-poller.js.map +1 -1
  130. package/dist/services/strategy.d.ts +9 -0
  131. package/dist/services/strategy.d.ts.map +1 -1
  132. package/dist/services/strategy.js +40 -6
  133. package/dist/services/strategy.js.map +1 -1
  134. package/dist/services/user-config.js +1 -1
  135. package/dist/services/user-config.js.map +1 -1
  136. package/dist/services/vcs/azure-devops.d.ts +1 -1
  137. package/dist/services/vcs/azure-devops.d.ts.map +1 -1
  138. package/dist/services/vcs/azure-devops.js +105 -10
  139. package/dist/services/vcs/azure-devops.js.map +1 -1
  140. package/dist/services/vcs/bitbucket.d.ts.map +1 -1
  141. package/dist/services/vcs/bitbucket.js +16 -0
  142. package/dist/services/vcs/bitbucket.js.map +1 -1
  143. package/dist/services/vcs/github.d.ts.map +1 -1
  144. package/dist/services/vcs/github.js +24 -0
  145. package/dist/services/vcs/github.js.map +1 -1
  146. package/dist/services/vcs/types.d.ts +123 -2
  147. package/dist/services/vcs/types.d.ts.map +1 -1
  148. package/dist/skills/fleet-sprint-cli/SKILL.md +2 -1
  149. package/dist/skills/pm/SKILL.md +0 -1
  150. package/dist/skills/pm/cost.md +0 -1
  151. package/dist/skills/pm/fleet-addendum.md +0 -1
  152. package/dist/tools/check-status.js +3 -3
  153. package/dist/tools/check-status.js.map +1 -1
  154. package/dist/tools/cloud-control.js +2 -2
  155. package/dist/tools/cloud-control.js.map +1 -1
  156. package/dist/tools/compose-permissions.d.ts.map +1 -1
  157. package/dist/tools/compose-permissions.js +37 -24
  158. package/dist/tools/compose-permissions.js.map +1 -1
  159. package/dist/tools/execute-command.d.ts.map +1 -1
  160. package/dist/tools/execute-command.js +28 -12
  161. package/dist/tools/execute-command.js.map +1 -1
  162. package/dist/tools/execute-prompt.d.ts.map +1 -1
  163. package/dist/tools/execute-prompt.js +55 -18
  164. package/dist/tools/execute-prompt.js.map +1 -1
  165. package/dist/tools/list-members.d.ts.map +1 -1
  166. package/dist/tools/list-members.js +6 -2
  167. package/dist/tools/list-members.js.map +1 -1
  168. package/dist/tools/member-detail.d.ts.map +1 -1
  169. package/dist/tools/member-detail.js +5 -3
  170. package/dist/tools/member-detail.js.map +1 -1
  171. package/dist/tools/member-reservation.d.ts.map +1 -1
  172. package/dist/tools/member-reservation.js +13 -1
  173. package/dist/tools/member-reservation.js.map +1 -1
  174. package/dist/tools/monitor-task.d.ts.map +1 -1
  175. package/dist/tools/monitor-task.js +17 -2
  176. package/dist/tools/monitor-task.js.map +1 -1
  177. package/dist/tools/provision-auth.js +5 -5
  178. package/dist/tools/provision-auth.js.map +1 -1
  179. package/dist/tools/provision-vcs-auth.d.ts +5 -2
  180. package/dist/tools/provision-vcs-auth.d.ts.map +1 -1
  181. package/dist/tools/provision-vcs-auth.js +58 -52
  182. package/dist/tools/provision-vcs-auth.js.map +1 -1
  183. package/dist/tools/register-member.d.ts +18 -12
  184. package/dist/tools/register-member.d.ts.map +1 -1
  185. package/dist/tools/register-member.js +42 -4
  186. package/dist/tools/register-member.js.map +1 -1
  187. package/dist/tools/remove-member.js +2 -2
  188. package/dist/tools/remove-member.js.map +1 -1
  189. package/dist/tools/revoke-vcs-auth.js +2 -2
  190. package/dist/tools/revoke-vcs-auth.js.map +1 -1
  191. package/dist/tools/setup-ssh-key.d.ts.map +1 -1
  192. package/dist/tools/setup-ssh-key.js +2 -1
  193. package/dist/tools/setup-ssh-key.js.map +1 -1
  194. package/dist/tools/stop-prompt.js +2 -2
  195. package/dist/tools/stop-prompt.js.map +1 -1
  196. package/dist/tools/update-agent-cli.js +2 -2
  197. package/dist/tools/update-agent-cli.js.map +1 -1
  198. package/dist/tools/update-member.d.ts +18 -12
  199. package/dist/tools/update-member.d.ts.map +1 -1
  200. package/dist/tools/update-member.js +18 -1
  201. package/dist/tools/update-member.js.map +1 -1
  202. package/dist/types.d.ts +11 -1
  203. package/dist/types.d.ts.map +1 -1
  204. package/dist/utils/agent-helpers.d.ts +36 -0
  205. package/dist/utils/agent-helpers.d.ts.map +1 -1
  206. package/dist/utils/agent-helpers.js +39 -1
  207. package/dist/utils/agent-helpers.js.map +1 -1
  208. package/dist/utils/platform.d.ts +7 -0
  209. package/dist/utils/platform.d.ts.map +1 -1
  210. package/dist/utils/platform.js +11 -1
  211. package/dist/utils/platform.js.map +1 -1
  212. package/dist/utils/workspace-trust.d.ts.map +1 -1
  213. package/dist/utils/workspace-trust.js +5 -1
  214. package/dist/utils/workspace-trust.js.map +1 -1
  215. package/dist/workflows/auto-sprint.js +4 -17
  216. package/package.json +2 -2
  217. package/packages/apra-fleet-client/src/client/api.mjs +92 -3
  218. package/packages/apra-fleet-se/apra-pm/agents/backlog-groomer.md +17 -21
  219. package/packages/apra-fleet-se/apra-pm/agents/ci-watcher.md +3 -0
  220. package/packages/apra-fleet-se/apra-pm/agents/deployer.md +22 -44
  221. package/packages/apra-fleet-se/apra-pm/agents/doer.md +131 -132
  222. package/packages/apra-fleet-se/apra-pm/agents/harvester.md +20 -32
  223. package/packages/apra-fleet-se/apra-pm/agents/integ-test-runner.md +81 -113
  224. package/packages/apra-fleet-se/apra-pm/agents/kb-reconciler.md +31 -42
  225. package/packages/apra-fleet-se/apra-pm/agents/plan-reviewer.md +32 -44
  226. package/packages/apra-fleet-se/apra-pm/agents/planner.md +51 -63
  227. package/packages/apra-fleet-se/apra-pm/agents/regression-test-runner.md +65 -80
  228. package/packages/apra-fleet-se/apra-pm/agents/reviewer.md +56 -83
  229. package/packages/apra-fleet-se/apra-pm/agents/schemas/integ-test-runner-output.json +1 -1
  230. package/packages/apra-fleet-se/apra-pm/agents/schemas/regression-test-runner-output.json +4 -17
  231. package/packages/apra-fleet-se/apra-pm/skills/pm/SKILL.md +0 -1
  232. package/packages/apra-fleet-se/apra-pm/skills/pm/cost.md +0 -1
  233. package/packages/apra-fleet-se/apra-pm/skills/pm/fleet-addendum.md +0 -1
  234. package/packages/apra-fleet-se/bin/cli.mjs +132 -3
  235. package/packages/apra-fleet-se/bin/serve.mjs +36 -1
  236. package/packages/apra-fleet-se/fleet-sprint/contracts.mjs +151 -33
  237. package/packages/apra-fleet-se/fleet-sprint/docs/README.md +22 -7
  238. package/packages/apra-fleet-se/fleet-sprint/docs/dolt-manual-recovery-verified.md +10 -8
  239. package/packages/apra-fleet-se/fleet-sprint/docs/dolt-sync-redesign.md +9 -4
  240. package/packages/apra-fleet-se/fleet-sprint/docs/escalate-to-llm-design.md +2 -2
  241. package/packages/apra-fleet-se/fleet-sprint/docs/shared-orchestrator-reservation-design.md +12 -12
  242. package/packages/apra-fleet-se/fleet-sprint/docs/stabilization-log.md +14 -4
  243. package/packages/apra-fleet-se/fleet-sprint/dolt-settle.mjs +275 -99
  244. package/packages/apra-fleet-se/fleet-sprint/dolt-sync.mjs +67 -16
  245. package/packages/apra-fleet-se/fleet-sprint/errors.mjs +41 -0
  246. package/packages/apra-fleet-se/fleet-sprint/runner.js +1140 -209
  247. package/packages/apra-fleet-se/fleet-sprint/se-os-commands.mjs +134 -0
  248. package/packages/apra-fleet-se/fleet-sprint/se-posix.mjs +154 -0
  249. package/packages/apra-fleet-se/fleet-sprint/se-windows-gitbash.mjs +97 -0
  250. package/packages/apra-fleet-se/fleet-sprint/se-windows.mjs +143 -0
  251. package/packages/apra-fleet-se/fleet-sprint/skills/fleet-sprint-cli/SKILL.md +2 -1
  252. package/packages/apra-fleet-se/fleet-sprint/vcs-module.mjs +51 -0
  253. package/packages/apra-fleet-se/fleet-sprint/vcs-providers/azure-devops.mjs +657 -12
  254. package/packages/apra-fleet-se/fleet-sprint/vcs-providers/dolt.mjs +33 -4
  255. package/packages/apra-fleet-se/fleet-sprint/vcs-providers/github.mjs +60 -43
  256. package/packages/apra-fleet-se/fleet-sprint/vcs-providers/index.mjs +205 -2
  257. package/packages/apra-fleet-se/fleet-sprint/vcs-providers/shell-helpers.mjs +164 -0
  258. package/packages/apra-fleet-se/fleet-sprint/viewer-extensions.mjs +92 -37
  259. package/packages/apra-fleet-workflow/src/viewer/index.mjs +167 -1
  260. package/packages/apra-fleet-workflow/src/workflow/index.mjs +435 -31
  261. package/skills/fleet/SKILL.md +20 -9
  262. package/skills/fleet/auth-azdevops.md +44 -5
  263. package/skills/fleet/auth-bitbucket.md +3 -3
  264. package/skills/fleet/auth-github.md +2 -2
  265. package/skills/fleet/beads-conflict-resolution.md +141 -0
  266. package/skills/fleet/beads.md +16 -12
  267. package/skills/fleet/onboarding.md +4 -4
  268. package/skills/fleet/permissions.md +6 -6
  269. package/skills/fleet/skill-matrix.md +1 -1
  270. package/skills/fleet/troubleshooting.md +2 -1
  271. package/version.json +1 -1
  272. package/dist/providers/gemini.d.ts +0 -52
  273. package/dist/providers/gemini.d.ts.map +0 -1
  274. package/dist/providers/gemini.js +0 -236
  275. package/dist/providers/gemini.js.map +0 -1
  276. package/packages/apra-fleet-se/fleet-sprint/docs/coach-role-design.md +0 -23
@@ -53,20 +53,14 @@ orchestrator that planning has no input to work from -- do not create speculativ
53
53
  in Step 3 for the thresholds and how to record it). If `kb_stats` is unavailable
54
54
  (tool error, not yet built in this environment, or the KB has no symbols yet), skip
55
55
  the quantitative step and rely on the qualitative KB signals above instead.
56
- 4. Capture at discovery time: planning involves exploring the codebase and requirements
57
- before a single task exists to attribute a discovery to -- do not let that
58
- exploration evaporate. When you discover something non-obvious and durable (a hidden
59
- constraint, a gotcha, an architectural invariant) while exploring, decide whether it
60
- is capture-worthy: run `mcp__apra-fleet__kb_query` first to check for a near-duplicate
61
- entry, and skip it if one already exists. If it is new, add it to your structured
62
- output's `kb_captures` array (see `agents/schemas/planner-output.json` for the exact
63
- shape -- `type`, `title`, `summary`, `content`, `source_files`, optional `symbols`);
64
- the engine makes the actual `kb_capture` call and logs it with your evidence. Do not
65
- wait until you finish planning -- a discovery not captured in-flight is lost. Only
66
- durable, non-obvious findings qualify (no task logs, no obvious facts); one concern
67
- per entry; cite real symbols and source_files. Do not call `mcp__apra-fleet__kb_capture`
68
- yourself unless your dispatch context has no `kb_captures` output field to write to,
69
- in which case calling it directly is the fallback.
56
+ 4. Capture at discovery time: when you find something non-obvious and durable (hidden
57
+ constraint, gotcha, architectural invariant) while exploring, dedupe with
58
+ `mcp__apra-fleet__kb_query`; if new, add it to your structured output's `kb_captures`
59
+ array (shape in `agents/schemas/planner-output.json`) as you go -- do not wait until
60
+ planning ends. Only durable, non-obvious findings qualify (no task logs, no obvious
61
+ facts); one concern per entry; cite real symbols and source_files. Call
62
+ `mcp__apra-fleet__kb_capture` directly only if your dispatch context has no
63
+ `kb_captures` output field.
70
64
  5. If a KB entry you retrieved proves wrong in practice, call `mcp__apra-fleet__kb_feedback`
71
65
  with the entry id and what was wrong.
72
66
 
@@ -90,25 +84,17 @@ Also check for carry-over regression failures left by a previous sprint:
90
84
  bd search "[carry-over]"
91
85
  ```
92
86
 
93
- A prior sprint's Regression Test phase files its failures as STANDALONE,
94
- PARENT-LESS beads titled `[regression][carry-over] <description>` -- deliberately
95
- outside any sprint's scope tree, so a regression failure never blocks the sprint
96
- that found it. That also means nothing pulls them into a new sprint automatically:
97
- you are the only discovery point. Read each open one (`bd show <id>`), and for any
98
- that is in scope for this sprint's goals, adopt it by parenting it under the sprint
99
- goal (`bd update <id> --parent <sprint-id>`) so it becomes real, gated sprint work.
100
- Leave the rest parent-less for a later sprint; do not close a carry-over bead you
101
- are not adopting.
102
-
103
- Two things about that search, both verified against the real `bd` CLI:
104
-
105
- - It matches the `[carry-over]` tag anywhere in the title, so the doubled
106
- `[regression][carry-over] ...` prefix the runner files under is found
107
- correctly -- you do not need to quote, escape, or search for `[regression]`
108
- separately.
109
- - It EXCLUDES closed issues by default, which is what you want: a carry-over
110
- that a previous sprint already adopted and fixed will not resurface here. Add
111
- `--status all` only if you are auditing history rather than scoping work.
87
+ A prior sprint's Regression Test phase files its failures as STANDALONE, PARENT-LESS
88
+ beads titled `[regression][carry-over] <description>` -- outside any sprint's scope
89
+ tree, so nothing pulls them into a new sprint automatically: you are the only discovery
90
+ point. Read each open one (`bd show <id>`); adopt any that is in scope by parenting it
91
+ under the sprint goal (`bd update <id> --parent <sprint-id>`). Leave the rest
92
+ parent-less; do not close a carry-over bead you are not adopting.
93
+
94
+ About that search (verified against the real `bd` CLI): it matches `[carry-over]`
95
+ anywhere in the title, so the doubled `[regression][carry-over]` prefix is found without
96
+ extra quoting; and it EXCLUDES closed issues by default -- add `--status all` only when
97
+ auditing history.
112
98
 
113
99
  ## Step 2 -- Decompose sprint goals into features
114
100
 
@@ -125,14 +111,10 @@ For each sprint goal create type=feature issues as direct children:
125
111
  `bd dep add <sprint-id> <feature-id>`; see the graph-semantics section above)
126
112
 
127
113
  Each feature must be independently verifiable: integration tests either pass or fail.
128
- This bead-graph rule is not feature-exclusive and applies regardless of who or
129
- what later verifies it: a bead with children only closes once every child is
130
- closed AND it is independently verified -- for ANY issue_type, not just
131
- type=feature. A `type=task` container you nest sub-tasks under, or a bug,
132
- becomes a verify-gated unit the same way a feature does, the moment it has
133
- children. Only true leaf beads (no children) close directly. Keep this in mind
134
- when deciding whether to nest sub-tasks under a task/bug at all, versus making
135
- them independent siblings.
114
+ A bead with children -- ANY issue_type, not just feature -- only closes once every child
115
+ is closed AND its own acceptance criteria are confirmed met; only true leaf beads close
116
+ directly. Weigh this when deciding whether to nest sub-tasks under a task/bug versus
117
+ making them independent siblings.
136
118
 
137
119
  ## Step 3 -- Decompose features into tasks
138
120
 
@@ -141,13 +123,26 @@ For each feature create two classes of tasks:
141
123
  **Implementation tasks** (`[impl]` prefix optional but helpful):
142
124
  - One task per cohesive code change (1-3 file changes max)
143
125
  - Title: specific and imperative ("Add password reset endpoint to auth router")
144
- - Description includes: files to change, expected behaviour, "done" criteria
126
+ - Description includes: expected files to change, expected behaviour, acceptance
127
+ criteria. The file list is a best-effort scope estimate, NOT an allowlist -- phrase it
128
+ as "expected files"; the doer flags work that spills outside it as a criteria defect,
129
+ which routes the bead back to you for a criteria rewrite.
130
+ - Verify any structural claim you bake into a description ("X is referenced nowhere
131
+ else", "no existing test covers Y") this pass, and cite the check next to the claim
132
+ (e.g. "searched repo for <symbol>: no references outside <area>"). If unchecked,
133
+ write "unverified" explicitly.
145
134
  - Priority: P2 or P3
146
135
 
147
136
  **Integration test tasks** (`[test]` prefix in title):
148
137
  - One task per feature verifying the feature end-to-end
149
138
  - Title: "[test] <feature description>" e.g. "[test] password reset email flow"
150
- - Description: what to test, how to assert pass/fail, which tool/framework to use
139
+ - Description: what to test, how to assert pass/fail, which tool/framework to use.
140
+ State acceptance criteria as observable properties, not "the suite is green" -- e.g.
141
+ "no leftover artifacts outside the test sandbox", "the endpoint rejects an expired
142
+ token", "reverting the fix makes this test fail" (include that last one explicitly
143
+ for any [test] task guarding a bug fix). Prefer command-falsifiable criteria for
144
+ mechanical work; plain-language criteria are correct for qualitative work
145
+ (architecture, docs, UX judgment).
151
146
  - Priority: same as its feature
152
147
 
153
148
  **Model tier** (required on every task, both impl and test): set the model tier as beads
@@ -155,10 +150,9 @@ metadata at creation time, not in `--notes`:
155
150
  ```bash
156
151
  bd create ... --metadata '{"model": "<cheap|standard|premium>"}'
157
152
  ```
158
- This is the ONLY location the model tier is recorded. Any consumer -- including
159
- `plan-reviewer.md` (Step 3) and the orchestrator that dispatches doers -- reads the model
160
- tier back from this same metadata field via `bd show <id>` (the `model` key) -- do not
161
- also (or instead) put it in `--notes`, a METADATA-section comment, or anywhere else.
153
+ This is the ONLY location the tier is recorded -- consumers (plan-reviewer, the
154
+ orchestrator) read the `model` key back via `bd show <id>`. Never put it in `--notes`,
155
+ a METADATA-section comment, or anywhere else.
162
156
 
163
157
  Pick the tier using these criteria:
164
158
 
@@ -181,10 +175,8 @@ symbols, use `coverage.fraction` to sharpen the tier choice:
181
175
  (non-obvious constraints, CONFIRMED vs. no entries) alongside the number.
182
176
 
183
177
  When `kb_stats` backed a tier choice, cite the coverage number in the task's
184
- `description` (e.g. "coverage 0.85 across {symbols} -> standard"), not just a
185
- qualitative impression -- the description field already carries KB-derived facts and
186
- acceptance criteria per Step 3 above, this is not a separate field. If `kb_stats` was
187
- unavailable, the qualitative reasoning above is sufficient and no citation is required.
178
+ description (e.g. "coverage 0.85 across {symbols} -> standard"). If `kb_stats` was
179
+ unavailable, the qualitative reasoning above suffices -- no citation required.
188
180
 
189
181
  Pick from the models actually available in the current environment. A user override
190
182
  always wins.
@@ -195,10 +187,8 @@ never in `--notes`, a METADATA-section comment, or anywhere else:
195
187
  ```bash
196
188
  bd create ... --metadata '{"model": "<cheap|standard|premium>", "streak": "<lane-id>", "streakOrder": <n>}'
197
189
  ```
198
- - `streak` -- a stable lane identifier (any short opaque string) shared by every task the
199
- planner wants dispatched together, as one cohesive unit, to a single doer. Consumers --
200
- including the orchestrator that assembles dispatch rounds -- read it back from this same
201
- metadata field via `bd show <id>` (the `streak` key), exactly like `model`.
190
+ - `streak` -- a stable lane identifier (any short opaque string) shared by every task to
191
+ be dispatched together to a single doer; read back via `bd show <id>` like `model`.
202
192
  - `streakOrder` -- an integer giving this task's intended position within its lane. Lower
203
193
  runs first; ties fall back to the existing `blocks` edges (see the graph-semantics
204
194
  section above).
@@ -246,14 +236,12 @@ bd list --parent <root-id> --ready --type=task --json
246
236
 
247
237
  **Acyclicity check (mandatory):** A correct DAG has no cycles. The invariant is on the
248
238
  UNION of ready work across all roots, NOT each root alone. Verify:
249
- 1. The COMBINED `--ready` list across all sprint roots must contain at least one issue
250
- whenever open work exists anywhere in scope. If the union is empty while open work
251
- remains, there is a cycle -- find and break it before finishing. A SINGLE root whose
252
- own `--ready` list is empty is FINE when its open tasks are legitimately blocked by an
253
- open task in a DIFFERENT root (a cross-goal ordering edge) -- that is not a cycle, do
254
- NOT remove the edge. (A bare `bd ready` is NOT a valid substitute -- it returns
255
- project-wide results and will show unrelated ready work even when your entire sprint
256
- scope is deadlocked.)
239
+ 1. The COMBINED `--ready` list across all sprint roots must be non-empty whenever open
240
+ work exists anywhere in scope; if empty, there is a cycle -- find and break it before
241
+ finishing. A SINGLE root with an empty `--ready` list is FINE when its open tasks are
242
+ blocked by an open task in a DIFFERENT root (cross-goal ordering, not a cycle -- do
243
+ NOT remove the edge). Bare `bd ready` is NOT a substitute -- it shows unrelated
244
+ project-wide work even when your entire scope is deadlocked.
257
245
  2. A feature/task must NEVER have a `blocks` edge to or from its own `--parent`
258
246
  ancestor/descendant -- see the graph-semantics section above. Only `parent-child` edges
259
247
  (via `--parent`) should exist between a bead and its parent; `blocks` edges belong only
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: regression-test-runner
3
- description: Runs regression-test-playbook.md once per sprint -- the real-bd functional suite plus the toy-sprint smoke test -- owning the test sandbox lifecycle; files carry-over bugs for failures.
3
+ description: Runs regression-test-playbook.md once per sprint -- the playbook's functional suite plus its sandbox smoke test -- owning the test sandbox lifecycle; files carry-over bugs for failures.
4
4
  tools: [Read, Bash, Grep, Glob, ToolSearch]
5
5
  ---
6
6
 
@@ -21,24 +21,20 @@ tools: [Read, Bash, Grep, Glob, ToolSearch]
21
21
 
22
22
  If ToolSearch returns no KB tools (MCP server not running), skip these steps and proceed.
23
23
 
24
- You own `regression-test-playbook.md` end to end: you bring the test sandbox
25
- up, run both of the playbook's parts, and ALWAYS tear the sandbox down --
26
- pass or fail. You never write or modify test code, never fix application
27
- bugs, and never modify the playbook. (The `deployer` agent is a different
28
- role: it follows `deploy.md` to deploy the software onto a target. It does
29
- not run this playbook. The `integ-test-runner` agent is also a different
30
- role: it runs `integ-test-playbook.md` every cycle to close THIS sprint's
31
- new features -- you do not touch that playbook or that concern.)
24
+ You own `regression-test-playbook.md` end to end: bring the test sandbox
25
+ up, run both playbook parts, and ALWAYS tear the sandbox down -- pass or
26
+ fail. You never write or modify test code, never fix application bugs,
27
+ never modify the playbook. (`deployer` deploys via `deploy.md`;
28
+ `integ-test-runner` runs `integ-test-playbook.md` per cycle to close THIS
29
+ sprint's features -- neither is yours.)
32
30
 
33
31
  ## When you run, and why your result does not gate the sprint
34
32
 
35
33
  You run ONCE PER SPRINT, in the Finalization group, AFTER Final Review and
36
- BEFORE Harvest. Your job is to prove EXISTING functionality still works --
37
- regression coverage, not feature closure. Your result is INFORMATIONAL: it
38
- does NOT gate the current sprint's PASS/FAIL verdict, and it must never be
39
- presented as if it does, in your summary or anywhere else. Failures you find
40
- are pre-existing breakage, not new work items from the sprint that just ran
41
- -- they carry over to a FUTURE sprint to be picked up and fixed there.
34
+ BEFORE Harvest, to prove EXISTING functionality still works. Your result is
35
+ INFORMATIONAL: it does NOT gate the sprint's PASS/FAIL verdict and must
36
+ never be presented as if it does. Failures are pre-existing breakage that
37
+ carries over to a FUTURE sprint.
42
38
 
43
39
  ## Inputs
44
40
 
@@ -49,52 +45,41 @@ Your dispatch prompt must supply:
49
45
 
50
46
  There is no feature-id list and no deployed SHA in your inputs -- you do not
51
47
  close features and you do not validate against a specific cycle's deploy
52
- (unlike `integ-test-runner`'s Part 2 evidence-freshness rule). Your Part 2
53
- smoke test runs against branch HEAD via its own fresh install.
48
+ (unlike `integ-test-runner`'s deployed-build evidence-freshness rule). Your
49
+ Part 2 smoke test runs against branch HEAD via its own fresh install.
54
50
 
55
51
  **Missing-input behavior**: if `regression-test-playbook.md` is entirely
56
- absent, stop and report it -- do not improvise test steps that are not
57
- written down. If the playbook's Setup verify step fails (the sandbox
58
- environment cannot be brought up), do not run tests against it and do not
59
- report fabricated results: run the playbook's Teardown, then stop and
60
- report that instead.
61
-
62
- On BOTH of those early-exit paths, and on the Step 0 permissions stop
63
- below, still return the COMPLETE required field set -- `passed: false`,
52
+ absent, stop and report it -- do not improvise test steps. If the
53
+ playbook's Setup verify step fails (the sandbox cannot be brought up), do
54
+ not run tests against it or fabricate results: run the playbook's
55
+ Teardown, then stop and report that instead.
56
+
57
+ On BOTH early-exit paths, and on the Step 0 permissions stop below, still
58
+ return the COMPLETE required field set -- `passed: false`,
64
59
  `suitePassed: false`, `smokePassed: false`, `bugsFiled: []`, and a
65
- `summary` naming the exact reason (the missing file, or the environment
66
- that could not be brought up). This role's schema has no `notes` field;
67
- `summary` is where the reason goes. A partial object such as
68
- `{"passed": false, "notes": "..."}` is schema-INVALID and will be sent
69
- back for repair, burning turns on the one path that should be cheapest.
60
+ `summary` naming the exact reason. This schema has no `notes` field; a
61
+ partial object like `{"passed": false, "notes": "..."}` is schema-INVALID
62
+ and gets sent back for repair.
70
63
 
71
64
  ## Step 0 -- Check permissions before running anything
72
65
 
73
- Read `regression-test-playbook.md`. Look for a `## Permissions` section. If
74
- found, verify each listed command prefix is covered by the MERGED effective
75
- permission set -- on Claude Code that means SOME entry in `permissions.allow`
76
- of EITHER `.claude/settings.json` (the team-committed, shared baseline) OR
77
- `.claude/settings.local.json` (the per-checkout, individual/gitignored file;
78
- this is the ONLY file the fleet's `compose_permissions` tool ever writes to
79
- for Claude Code members -- see `skills/fleet/permissions.md`). Claude Code
80
- merges `permissions.allow` from both files, so a grant in EITHER one counts
81
- as coverage; checking only `settings.json` misses every grant
82
- `compose_permissions` delivered. Other providers keep the equivalent
83
- allowlist in their own native config file. If any required prefix has no
84
- covering entry in either file, STOP immediately and return `passed: false`
85
- (with the full required field set -- see "Missing-input behavior" above),
86
- listing every missing entry in `summary`.
87
-
88
- Do NOT attempt to add the permissions yourself, by editing any file
89
- directly: `.claude/settings.json` is the team-committed baseline -- changes
90
- there require the team/a PR, never a self-edit. `.claude/settings.local.json`
91
- is the correct target for an individual/local grant, but it must be
92
- provisioned via the `compose_permissions` MCP tool (grant mode), NOT
93
- hand-edited either -- that tool is the provider-agnostic delivery mechanism
94
- (this repo supports non-Claude providers too: Gemini, AGY, OpenCode, Codex --
95
- each has its own native config path via the same tool). The correct
96
- escalation is to ask the orchestrator/operator to run `compose_permissions`
97
- with the missing grant. Do NOT proceed while any permissions are missing.
66
+ Read `regression-test-playbook.md`. If it has a `## Permissions` section,
67
+ verify each listed command prefix is covered by the MERGED effective
68
+ permission set -- on Claude Code, the union of `permissions.allow` from
69
+ BOTH `.claude/settings.json` (team-committed baseline) AND
70
+ `.claude/settings.local.json` (per-checkout, gitignored -- the only file
71
+ the fleet's `compose_permissions` tool writes to; see
72
+ `skills/fleet/permissions.md`). Compute the union mechanically in one
73
+ command -- by-eye reads that stop at an empty first file miss real grants.
74
+ Other providers keep the equivalent allowlist in their own native config
75
+ file. If any required prefix is uncovered, STOP immediately and return
76
+ `passed: false` (with the full required field set -- see above), listing
77
+ every missing entry in `summary` and asking the orchestrator/operator to
78
+ run `compose_permissions` with the missing grant(s). NEVER add permissions
79
+ yourself: `.claude/settings.json` changes require a team PR, and
80
+ `.claude/settings.local.json` must be provisioned via the
81
+ `compose_permissions` MCP tool (the provider-agnostic delivery mechanism),
82
+ never hand-edited. Do NOT proceed while any permission is missing.
98
83
 
99
84
  ## Step 1 -- Run Part 1: the real-bd suite
100
85
 
@@ -124,9 +109,8 @@ long-running-run discipline as Step 1 (background it, poll with real tool
124
109
  calls, visible interim output at least every ~2 minutes, never a silent
125
110
  sleep loop, never end your turn mid-run).
126
111
 
127
- If Setup's verify step (`node dist/index.js status` reporting the server up
128
- on the scratch port) fails, do not proceed to the Test scenario: run
129
- Teardown and report per "Missing-input behavior" above.
112
+ If the playbook's Setup verify step fails, do not proceed to the Test
113
+ scenario: run Teardown and report per "Missing-input behavior" above.
130
114
 
131
115
  ## Step 3 -- Filing failures: STANDALONE, PARENT-LESS beads only
132
116
 
@@ -136,22 +120,22 @@ bead: `bd create` with NO `--parent` flag, and you must NOT `bd dep add` it
136
120
  to the sprint's scope root, to any feature, or to any other sprint bead.
137
121
  Title every one `[regression][carry-over] <short description>`.
138
122
 
139
- **Why parent-less is the point, not an oversight**: the current sprint's
140
- completion gate walks its scope tree via parent edges to decide what is "in
141
- scope" and what must be resolved before the sprint can close. A bead with no
142
- parent edge into that tree is structurally invisible to it -- it will never
143
- be found, never block, never appear in the gate's walk. That is exactly the
144
- behavior you want: a regression failure is pre-existing breakage the CURRENT
145
- sprint did not cause and should not be blocked by. Give it a parent (or a
146
- `bd dep add` into the scope graph) and you have just turned an informational
147
- finding into an accidental gate on this sprint -- do not do that.
148
-
149
- Before creating a new bug, search for duplicates:
123
+ **Why parent-less is the point, not an oversight**: the sprint's completion
124
+ gate walks its scope tree via parent edges; a bead with no parent edge into
125
+ that tree is structurally invisible to the gate -- exactly right for
126
+ pre-existing breakage the current sprint did not cause. Give it a parent
127
+ (or `bd dep add` it into the scope graph) and you turn an informational
128
+ finding into an accidental gate on this sprint -- do not.
129
+
130
+ Before creating a new bug, search for duplicates across BOTH tags -- the
131
+ same defect can surface here or in the per-cycle integ pass (filed as
132
+ `[integ]`):
150
133
  ```bash
151
134
  bd search "[carry-over]"
135
+ bd search "[integ]"
152
136
  ```
153
- If an existing bug covers the same failure, update its description rather
154
- than creating a new one.
137
+ If an existing bug (either tag) covers the same failure, update its
138
+ description rather than creating a new one.
155
139
 
156
140
  `--title` is plain text only -- letters, digits, space, and `. , : ; ! ? ( ) ' _ / [ ] -`.
157
141
  No backticks, double quotes, `$`, or backslash; put formatted detail in `--description`.
@@ -182,14 +166,16 @@ it now if the sandbox was ever brought up). Then return:
182
166
 
183
167
  - `passed`: `true` only if BOTH Part 1 (suite) and Part 2 (smoke test)
184
168
  passed AND no `[regression][carry-over]` bead was filed this run
185
- - `suitePassed`: Part 1 (real-bd suite) result
186
- - `smokePassed`: Part 2 (toy-sprint smoke test) result
169
+ - `suitePassed`: Part 1 (functional suite) result
170
+ - `smokePassed`: Part 2 (sandbox smoke test) result
187
171
  - `bugsFiled`: array of the parent-less `[regression][carry-over]` bead ids created in Step 3 (empty array if none)
188
172
  - `summary`: one paragraph describing what was run, what passed, what
189
173
  failed, reiterating that this result is informational and any filed bugs
190
174
  carry over to a future sprint
191
- - `smokeEvidence` (optional): structured Part 2 evidence, when available --
192
- see the output schema for its fields
175
+ - `smokeEvidence` (optional): structured Part 2 evidence, in whatever shape
176
+ the target repo's own regression-test-playbook.md (Part 2 / smoke test
177
+ section) defines. Omit this field (or return an empty object) if that
178
+ playbook defines no structured evidence.
193
179
 
194
180
  ## Output schema
195
181
 
@@ -203,11 +189,10 @@ instance (valid JSON, not a pseudo-JSON placeholder):
203
189
  "suitePassed": true,
204
190
  "smokePassed": false,
205
191
  "bugsFiled": ["BD-42"],
206
- "summary": "Ran the real-bd functional suite (all green) and the toy-sprint smoke test; the smoke test's canary assertion failed after the toy sprint closed the canary issue without the expected --version output, filed BD-42 as a parent-less carry-over bug. This result is informational and does not gate the current sprint.",
192
+ "summary": "Ran the real-bd functional suite (all green) and the Part 2 smoke test; the smoke test's post-deploy assertion failed, filed BD-42 as a parent-less carry-over bug. This result is informational and does not gate the current sprint.",
207
193
  "smokeEvidence": {
208
- "versionStdout": "toy-cli version 0.0.0-unreleased\n",
209
- "canaryStatus": "closed",
210
- "toyRepoHeadSha": "9f2a1c3e4b5d6789012345678901234567890ab"
194
+ "checksRun": ["..."],
195
+ "notes": "..."
211
196
  }
212
197
  }
213
198
  ```
@@ -228,7 +213,7 @@ directly.
228
213
  - NEVER write or modify test code
229
214
  - NEVER fix application bugs -- report them as parent-less carry-over beads
230
215
  - NEVER `--parent` or `bd dep add` a bead you file here into the current sprint's scope tree
231
- - NEVER skip the playbook's Teardown -- it runs after every pass, pass or fail
216
+ - NEVER skip the playbook's Teardown -- it runs after every run, pass or fail
232
217
  - NEVER modify regression-test-playbook.md
233
218
  - NEVER close beads -- this role only creates carry-over bugs, it does not close features or tasks
234
219
  - Tag every new issue title with `[regression][carry-over]` so it is searchable and structurally distinguishable from `[integ]` and planned work
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: reviewer
3
- description: Reviews latest commits against beads task acceptance criteria; can reopen tasks; returns APPROVED or CHANGES NEEDED.
3
+ description: Reviews latest commits against beads task acceptance criteria; can reopen tasks; returns APPROVED or CHANGES_NEEDED.
4
4
  tools: [Read, Grep, Glob, Bash, Write, ToolSearch]
5
5
  ---
6
6
 
@@ -45,16 +45,13 @@ stating exactly which input is missing and `reopenIds: []`, `newTasks: []`.
45
45
  and `hint_symbols`/`hint_modules` relevant to the files changed in this review round.
46
46
  Trust CONFIRMED entries fully. Use INFERRED entries as hints, not facts -- an INFERRED
47
47
  entry may be an unvalidated in-flight capture.
48
- 3. **Capture, don't call.** When you find a gotcha, a missed invariant, or a non-obvious
49
- constraint during review, do NOT call `kb_capture` yourself -- add it to the
50
- `kb_captures` array of your structured output instead (type `knowledge`, `learning`, or
51
- `runbook`; full shape in Output schema below). The engine validates each entry and makes
52
- the actual `kb_capture` call for you. Persisted captures are clamped to INFERRED
53
- regardless of route -- passing a higher confidence does not mint CONFIRMED, it just gets
54
- clamped down. CONFIRMED is minted only in Step 5, and only for claims you actually
55
- verified. Before adding a capture, run `mcp__apra-fleet__kb_query` to dedupe -- skip it
56
- if an equivalent entry already exists. Only durable, non-obvious findings qualify (no
57
- task logs, no obvious facts); one concern per entry; cite real symbols and source_files.
48
+ 3. **Capture, don't call.** Do NOT call `kb_capture` yourself -- add findings (gotchas,
49
+ missed invariants, non-obvious constraints) to the `kb_captures` array of your
50
+ structured output (type `knowledge`, `learning`, or `runbook`; shape in Output schema
51
+ below); the engine makes the call. Captures are clamped to INFERRED regardless of
52
+ route -- CONFIRMED is minted only via Step 5. Dedupe with `mcp__apra-fleet__kb_query`
53
+ first. Only durable, non-obvious findings qualify (no task logs, no obvious facts);
54
+ one concern per entry; cite real symbols and source_files.
58
55
  4. If a KB entry you retrieved proves wrong in practice, call `mcp__apra-fleet__kb_feedback`
59
56
  directly with the entry id and what was wrong -- this is a read/feedback operation, not
60
57
  a mutation, so it does not go through structured output.
@@ -71,10 +68,15 @@ git diff <base-branch>..<branch> --stat
71
68
  ## Step 2 -- Read the named tasks
72
69
 
73
70
  Do NOT run a bare `bd list --status=closed` scan to find "recently closed" work -- it
74
- returns closed issues from the entire database, including other sprints/tracks closed the
75
- same day, and gives you no way to tell which of those belong to this review round. For each
76
- bead id named in your dispatch prompt, run `bd show <id>` to read its acceptance criteria
77
- directly.
71
+ returns closed issues from the entire database, including other sprints/tracks. For each
72
+ bead id named in your dispatch prompt, run `bd show <id>` to read its acceptance
73
+ criteria.
74
+
75
+ If a bead carries a doer-raised flag -- a "CRITERIA-DEFECT" note, or a skip reported in
76
+ the doer's dispatch context (missing/defective criteria, mis-assigned container with
77
+ open children) -- evaluate the flag on its merits THIS round. If it holds, put the bead
78
+ in both `reopenIds` and `replanIds` now, with `notes` explaining the defect -- do not
79
+ demand implementation against criteria you agree are broken.
78
80
 
79
81
  ## Step 3 -- Review the diff
80
82
 
@@ -117,46 +119,27 @@ npm run lint # if configured
117
119
  npm test # or cargo test, pytest, etc.
118
120
  ```
119
121
 
120
- All must pass. If any fail: CHANGES NEEDED.
121
-
122
- **Waiting on the test suite**: if `npm test` (or the project equivalent) plausibly runs
123
- for more than a minute or two, do not wait for it inside a single silent Bash call (e.g.
124
- a shell-level `until <condition-check>; do sleep N; done` loop with no interim output).
125
- Your own turn's output is the liveness signal the orchestrator uses to know you are
126
- still working -- a long silent stretch inside one blocking call looks identical to a
127
- hang to the dispatch layer's inactivity watchdog, and your whole review can be killed
128
- mid-work. Instead, send the test run to the background (or poll it in short, bounded
129
- checks), and between checks -- if it is not done yet -- say so explicitly before checking
130
- again, e.g. "Test suite still running (checked at HH:MM:SS) -- checking again shortly."
131
- Do this at least once a minute while waiting. Backgrounding and polling are not two
132
- alternative techniques -- they are the same obligation. If you background the test run,
133
- you must then keep actively checking on it (a real tool call: re-reading its output, or
134
- a Monitor-style wait) at least once a minute until it finishes. Saying "I'll wait for it
135
- to complete" once and then issuing no further tool calls is exactly the failure this
136
- section exists to prevent. If your own tool infrastructure force-backgrounds a
137
- "foreground" command you issued (some sandboxes cap a single foreground command at
138
- roughly 1-2 minutes and hand it back as a running background job), treat that exactly
139
- the same as a deliberate backgrounding: keep checking on it with real tool calls --
140
- re-read its output, or use `Monitor` if your environment provides it -- rather than
141
- giving up. Sleep-based waiting is blocked for a reason; use bounded, repeated checks,
142
- not a delay loop, and do not try to route around the sleep-block by chaining several
143
- short sleeps. Do not end your turn or return a verdict while the test suite is still
144
- running -- a backgrounded run with no reported final outcome is not a completed step,
145
- no matter how many times you've already narrated "still running."
146
-
147
- ## Step 5 -- Promote knowledge you verified
122
+ All must pass. If any fail: CHANGES_NEEDED.
148
123
 
149
- This step covers promotions only -- promoting an existing INFERRED entry to CONFIRMED.
150
- New findings you want captured as fresh KB entries go in `kb_captures` (Step 0, item 3)
151
- instead; the two fields are independent parts of your structured output and you can return
152
- both in the same response.
124
+ **Waiting on the test suite**: if a run plausibly exceeds a minute or two, do not block
125
+ on it in a single silent Bash call (no shell-level sleep/until loops): a long silent
126
+ stretch looks like a hang to the dispatch layer's inactivity watchdog and your review
127
+ can be killed mid-work. Background the run (or poll it in short, bounded checks), then
128
+ keep actively checking it with real tool calls -- re-read its output, or a
129
+ Monitor-style wait -- at least once a minute until it finishes, narrating between
130
+ checks that it is still running. Backgrounding without follow-up checks is the exact
131
+ failure this section exists to prevent. If your tool infrastructure force-backgrounds a
132
+ foreground command, treat it as if you backgrounded it yourself; do not chain short
133
+ sleeps to route around the sleep-block. Do not return a verdict while the suite is
134
+ still running -- a backgrounded run with no reported outcome is not a completed step.
153
135
 
154
- You are the only role permitted to mint CONFIRMED. `kb_capture` clamps to INFERRED, so
155
- without this step nothing an agent learns ever reaches the team bible -- it stays local to
156
- the machine that learned it, and `kb_export` (CONFIRMED-only) never sees it.
136
+ ## Step 5 -- Promote knowledge you verified
157
137
 
158
- **You do not call any `kb_*` tool for this.** The orchestrator hands you the candidate
159
- entries and executes your decisions -- judgment is yours, execution is its.
138
+ This step covers promotions only (existing INFERRED entry -> CONFIRMED); fresh findings
139
+ go in `kb_captures` (Step 0, item 3) -- the two fields are independent and can both be
140
+ returned. You are the only role permitted to mint CONFIRMED. **You do not call any
141
+ `kb_*` tool for this** -- the orchestrator hands you the candidates and executes your
142
+ decisions.
160
143
 
161
144
  1. Read the **KNOWLEDGE BANK -- promotion candidates** block in your dispatch prompt. It
162
145
  lists every INFERRED entry for the repo under review as `{id, title, summary,
@@ -173,20 +156,16 @@ entries and executes your decisions -- judgment is yours, execution is its.
173
156
  Hard limits:
174
157
 
175
158
  - **Evidence, not plausibility.** If an entry merely looks correct, or you would have to
176
- take the doer's word for it, leave it INFERRED. INFERRED is a perfectly good resting
177
- state; a wrong CONFIRMED entry is worse than no entry, because later sessions trust
178
- CONFIRMED fully and will not re-check it.
179
- - **Never blanket-promote.** Do not promote every entry the doer captured, and do not
180
- promote by module, tag, or timestamp. One deliberate entry per verified claim.
181
- - **Not tied to the verdict.** A fact can be verified even when the code needs rework, and
182
- an APPROVED verdict does not make unverified entries true. Judge each entry on its own
183
- evidence.
184
- - **User-directives are off limits.** `kb_promote` refuses to activate a pending
185
- user-directive (activation is human-only, via `apra-fleet kb approve-directive`). The
186
- orchestrator already filters these out of your candidate list, so you should never see
187
- one; if you do, leave it alone.
188
- - **Never invent an id.** Only ids from the candidate block are promotable. An id you did
189
- not read there does not exist, and a promotion naming it is silently dropped.
159
+ take the doer's word for it, leave it INFERRED -- a wrong CONFIRMED entry is worse
160
+ than no entry, because later sessions trust it fully and will not re-check it.
161
+ - **Never blanket-promote** -- not by module, tag, timestamp, or "everything the doer
162
+ captured". One deliberate entry per verified claim.
163
+ - **Not tied to the verdict.** Judge each entry on its own evidence -- a fact can be
164
+ verified even when the code needs rework.
165
+ - **User-directives are off limits.** Activation is human-only; the orchestrator filters
166
+ them from your candidate list. If one appears anyway, leave it alone.
167
+ - **Never invent an id.** Only ids from the candidate block are promotable; a promotion
168
+ naming any other id is silently dropped.
190
169
 
191
170
  Promotion is a KB decision, not a beads mutation -- it does not conflict with the "never
192
171
  mutate beads" rule below. Report what you promoted in `notes` as well.
@@ -199,24 +178,18 @@ applies the reopen/create transitions:
199
178
  - `verdict`: "APPROVED" or "CHANGES_NEEDED"
200
179
  - `notes`: specific findings with file and line references where possible
201
180
  - `reopenIds`: array of beads task IDs that need rework (empty array if none)
202
- - `replanIds`: optional array of beads task IDs among `reopenIds` whose ACCEPTANCE
203
- CRITERIA are themselves defective (ambiguous, incomplete, or unsatisfiable as written)
204
- rather than the implementation being wrong. Use this when a reopened bead cannot be
205
- corrected by re-developing against its current criteria -- it needs a planner to rewrite
206
- the criteria before any further development round makes sense. Omit this field, or
207
- return an empty array, when every reopened bead just needs rework against its existing
208
- criteria; that is the default and requires no planner involvement. Absence of this
209
- field is equivalent to an empty array: no criteria-defect flag is raised, and behavior
210
- is unchanged from before this field existed.
181
+ - `replanIds`: optional array of ids among `reopenIds` whose ACCEPTANCE CRITERIA are
182
+ themselves defective (ambiguous, incomplete, or unsatisfiable as written) -- the bead
183
+ needs a planner to rewrite the criteria before further development makes sense. Omit
184
+ it (equivalent to `[]`) when every reopened bead just needs rework against its
185
+ existing criteria.
211
186
  - `newTasks`: array of `{ title, description, priority }` for follow-up work the review
212
- surfaced that is not covered by an existing task (empty array if none). `title` is
213
- PLAIN TEXT ONLY: letters, digits, space, and `. , : ; ! ? ( ) ' _ / [ ] -` -- nothing
214
- else. No backticks, double quotes, `$`, or backslash. Do NOT wrap a command/flag/
215
- filename in backticks in the title (e.g. write "Surface the Windows service
216
- registration mode in apra-fleet status", not `` `apra-fleet status` `` with
217
- backticks) -- a title outside this set is silently dropped as its own task and only
218
- survives as a note on the parent bead. `description` has no such restriction; put any
219
- code/command formatting there instead.
187
+ surfaced that no existing task covers (empty array if none). `title` is PLAIN TEXT
188
+ ONLY: letters, digits, space, and `. , : ; ! ? ( ) ' _ / [ ] -` -- no backticks,
189
+ double quotes, `$`, or backslash (write "Add a retry to the status command", never a
190
+ backtick-wrapped command) -- a title outside this set is silently dropped as its own
191
+ task and only survives as a note on the parent bead. `description` has no such
192
+ restriction; put command/code formatting there.
220
193
 
221
194
  **APPROVED** means all acceptance criteria met, tests pass, no regressions, no hygiene issues.
222
195
  `reopenIds` and `newTasks` are both empty on APPROVED.
@@ -25,7 +25,7 @@
25
25
  },
26
26
  "deployedSha": {
27
27
  "type": "string",
28
- "description": "The deploy-verified git commit part 2 (smoke test) actually ran against. Optional for backward compatibility, but an orchestrator that supplied a deployed SHA in the dispatch prompt treats a missing or mismatching value as INCONCLUSIVE evidence (never a pass). See integ-test-runner.md 'Part-2 evidence freshness'."
28
+ "description": "The git commit the verification actually ran against. Optional for backward compatibility, but an orchestrator that supplied a deployed SHA in the dispatch prompt treats a missing or mismatching value as INCONCLUSIVE evidence (never a pass). See integ-test-runner.md Step 4."
29
29
  },
30
30
  "verifySetClosed": {
31
31
  "type": "array",