@wrongstack/core 0.313.1 → 0.316.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (290) hide show
  1. package/dist/chronicle/index.js +31 -31
  2. package/dist/chronicle/legacy-journal-import.d.ts +0 -6
  3. package/dist/chronicle/metrics-ingest.d.ts +14 -0
  4. package/dist/chronicle/metrics-schema.d.ts +10 -1
  5. package/dist/chronicle/metrics-store.d.ts +20 -2
  6. package/dist/chronicle/project-server.js +39 -31
  7. package/dist/chronicle/sink.d.ts +13 -0
  8. package/dist/chronicle/sqlite-journal.d.ts +20 -2
  9. package/dist/{chunk-WOEZV3Q4.js → chunk-25LSLC3G.js} +2 -1
  10. package/dist/{chunk-AI4LLQ2U.js → chunk-27QIURLN.js} +229 -12
  11. package/dist/{chunk-I45KAW2N.js → chunk-3AGWVSS7.js} +38 -450
  12. package/dist/chunk-3BDV7RL3.js +211 -0
  13. package/dist/{chunk-NFAYHPRH.js → chunk-3ECENVHL.js} +10 -8
  14. package/dist/{chunk-FW5LDDMJ.js → chunk-45WI72ZB.js} +1576 -1156
  15. package/dist/{chunk-AT4V4XGI.js → chunk-4BMVPOHO.js} +539 -313
  16. package/dist/{chunk-YBUJCZ57.js → chunk-4I7HGVVA.js} +17 -5
  17. package/dist/{chunk-JVGPR3TS.js → chunk-4LCZVJVF.js} +7 -55
  18. package/dist/{chunk-4ZHTKJHM.js → chunk-4SJNS7OB.js} +36 -2
  19. package/dist/{chunk-AD7ZFZCS.js → chunk-5BMIE7QG.js} +3 -3
  20. package/dist/{chunk-IQ35HMQL.js → chunk-5YPSXQXM.js} +71 -24
  21. package/dist/chunk-6FHWXLPT.js +10 -0
  22. package/dist/{chunk-FIV4IJL7.js → chunk-6H5GEOET.js} +163 -20
  23. package/dist/{chunk-VB3H5WWB.js → chunk-6NWEVFEL.js} +2 -2
  24. package/dist/{chunk-E6I5RXVK.js → chunk-AYW5YINX.js} +2 -2
  25. package/dist/{chunk-DEIQMBD2.js → chunk-B7F4WVP4.js} +2 -2
  26. package/dist/{chunk-XQ2XGIBF.js → chunk-BPBKKBUK.js} +6 -7
  27. package/dist/{chunk-K4YUNKU7.js → chunk-BYD345OX.js} +2 -2
  28. package/dist/{chunk-LZDDLNCZ.js → chunk-C27KDLOX.js} +4 -4
  29. package/dist/{chunk-6AKOTGLM.js → chunk-CU546ESW.js} +7 -7
  30. package/dist/{chunk-ZZ4V3WIZ.js → chunk-DLHHXUAM.js} +10 -1
  31. package/dist/{chunk-BAKVJLEV.js → chunk-DOTHQSJ2.js} +28 -16
  32. package/dist/{chunk-KBZGE6LN.js → chunk-DYLPMV4Q.js} +4 -3
  33. package/dist/{chunk-52RTVH4M.js → chunk-F3JWNST7.js} +2 -2
  34. package/dist/{chunk-WEBMSQP2.js → chunk-FC2ZGRF3.js} +21 -4
  35. package/dist/{chunk-FHAMQS7Q.js → chunk-FCBTO76Z.js} +76 -146
  36. package/dist/{chunk-4LJJYBAU.js → chunk-FHZVFYSL.js} +9 -1
  37. package/dist/{chunk-W4A6QA3D.js → chunk-FWNLEZYG.js} +4 -3
  38. package/dist/{chunk-OJZEX73F.js → chunk-GDQ7CZRQ.js} +5 -1
  39. package/dist/{chunk-QVOVMXJR.js → chunk-GJJGJB2R.js} +32 -9
  40. package/dist/{chunk-4XV6IR37.js → chunk-HI3JGZR2.js} +7 -6
  41. package/dist/{chunk-FSWCWSTS.js → chunk-HMLIGAU7.js} +26 -26
  42. package/dist/{chunk-PFXFQQRT.js → chunk-HXKZ7OBQ.js} +7 -43
  43. package/dist/{chunk-2FQL4PDC.js → chunk-I7DALG7J.js} +5 -5
  44. package/dist/{chunk-GM54GJBU.js → chunk-IRUTEHCE.js} +3 -3
  45. package/dist/{chunk-TYW2GI5I.js → chunk-J2WRWR37.js} +40 -13
  46. package/dist/{chunk-ZEHUCJHY.js → chunk-JFPJ6LLQ.js} +2 -2
  47. package/dist/chunk-JMULFFLN.js +9 -0
  48. package/dist/{chunk-RD6DEE36.js → chunk-JO4MGB6Z.js} +94 -8
  49. package/dist/{chunk-5DSMEVA4.js → chunk-K6BXGITA.js} +7 -7
  50. package/dist/{chunk-O74MJHXU.js → chunk-KZMSZV32.js} +2 -2
  51. package/dist/{chunk-GFJOMSHG.js → chunk-LA7CLDRW.js} +6 -2
  52. package/dist/{chunk-M2WF6AXG.js → chunk-LSMMOS2Z.js} +7 -3
  53. package/dist/{chunk-ASX6AW36.js → chunk-LXWCMQNJ.js} +3 -3
  54. package/dist/{chunk-WZO23AWO.js → chunk-M27LIEKV.js} +72 -22
  55. package/dist/{chunk-JTHKOYWU.js → chunk-MJPHJRAL.js} +15 -15
  56. package/dist/{chunk-G5AAKEEZ.js → chunk-MTL4O5YR.js} +5 -5
  57. package/dist/chunk-NHJ75HXY.js +1 -0
  58. package/dist/{chunk-ZYU2YOJ6.js → chunk-NIOAGFPB.js} +29 -15
  59. package/dist/{chunk-Y2GE5TSI.js → chunk-NS52ISWS.js} +2 -2
  60. package/dist/{chunk-UIWONWVG.js → chunk-NSOFPKGT.js} +541 -148
  61. package/dist/{chunk-RCQYT2I4.js → chunk-NVIZG63R.js} +2 -2
  62. package/dist/{chunk-EPC3GZD4.js → chunk-OOYZPOXM.js} +2 -2
  63. package/dist/{chunk-7ZHZE5EO.js → chunk-OSGLYW5J.js} +2 -2
  64. package/dist/{chunk-CE4ZOCOI.js → chunk-PFCMSSUF.js} +9 -9
  65. package/dist/{chunk-GFXZTHNI.js → chunk-PGRVXIMY.js} +5 -5
  66. package/dist/{chunk-JJPMWPB6.js → chunk-PISBFBJN.js} +6 -6
  67. package/dist/chunk-POOOIWE5.js +9 -0
  68. package/dist/{chunk-5RP3QTRL.js → chunk-PQNS3U7Z.js} +20 -3
  69. package/dist/{chunk-3E244UDA.js → chunk-QSTSJOCK.js} +52 -6
  70. package/dist/{chunk-YUPMXOGP.js → chunk-RFQMOKWK.js} +3 -3
  71. package/dist/chunk-RTOTNK3P.js +484 -0
  72. package/dist/{chunk-SN2DQRL6.js → chunk-RXKSDUAU.js} +7 -7
  73. package/dist/{chunk-T3KGZBU5.js → chunk-S45JPKQN.js} +189 -43
  74. package/dist/{chunk-YNCVSFGF.js → chunk-SAFHACFA.js} +4 -1
  75. package/dist/{chunk-KI4L2DUL.js → chunk-TCCHINEF.js} +114 -19
  76. package/dist/{chunk-AWNQ6ED6.js → chunk-THEGTRAG.js} +7 -2
  77. package/dist/{chunk-2KKODIQU.js → chunk-TR4LQE7L.js} +15 -15
  78. package/dist/{chunk-GPQ3NJPR.js → chunk-TWJMGXCI.js} +3 -3
  79. package/dist/{chunk-H72H4XDU.js → chunk-U45AXT5D.js} +9 -9
  80. package/dist/{chunk-62V2AFVG.js → chunk-U4FWBSO3.js} +160 -73
  81. package/dist/{chunk-A455ATZB.js → chunk-UBGDX6FI.js} +8 -1
  82. package/dist/chunk-UJILKYES.js +75 -0
  83. package/dist/{chunk-KSJ5UTP7.js → chunk-ULMAQV3T.js} +84 -4
  84. package/dist/{chunk-CB2HFKTP.js → chunk-VVBP6KGT.js} +1 -1
  85. package/dist/{chunk-RPOA7IAE.js → chunk-W5VITDM2.js} +43 -25
  86. package/dist/{chunk-QRTG4XTI.js → chunk-WAHQVNWT.js} +7 -1
  87. package/dist/{chunk-SQP64RCS.js → chunk-WGGYRBXH.js} +3019 -2976
  88. package/dist/{chunk-K3G6JBUC.js → chunk-WLYKU45P.js} +679 -141
  89. package/dist/chunk-WP7BVANJ.js +53 -0
  90. package/dist/{chunk-GAZEWQEZ.js → chunk-XF4VUMKW.js} +2 -2
  91. package/dist/{chunk-PAAWLLZX.js → chunk-Y5YXDM7D.js} +2 -2
  92. package/dist/{chunk-65RDIOR2.js → chunk-YOPAUVU4.js} +162 -44
  93. package/dist/{chunk-FFSX2QDQ.js → chunk-YPT4A46F.js} +3 -3
  94. package/dist/chunk-YWXT3JNM.js +425 -0
  95. package/dist/{chunk-EFEHDQGY.js → chunk-ZHZ2Y2DH.js} +64 -10
  96. package/dist/{chunk-CQQL4ZOQ.js → chunk-ZT7JNIGX.js} +4 -3
  97. package/dist/coordination/agent-monitor.d.ts +9 -1
  98. package/dist/coordination/agent-subagent-runner.d.ts +1 -1
  99. package/dist/coordination/agents/agent-prompts.d.ts +8 -0
  100. package/dist/coordination/agents/index.d.ts +33 -1
  101. package/dist/coordination/agents/index.js +52 -22
  102. package/dist/coordination/agents/phase3-wave1-platform.d.ts +1 -3
  103. package/dist/coordination/agents/phase3-wave2-meta.d.ts +1 -3
  104. package/dist/coordination/agents/phase8-wave3-products.d.ts +1 -3
  105. package/dist/coordination/agents/phase9-wave4-platform-meta.d.ts +1 -3
  106. package/dist/coordination/agents/project-agent-identity.d.ts +11 -11
  107. package/dist/coordination/agents/types.d.ts +13 -2
  108. package/dist/coordination/brain-monitor.d.ts +30 -7
  109. package/dist/coordination/collab-debug.d.ts +1 -1
  110. package/dist/coordination/collab-pause.d.ts +1 -1
  111. package/dist/coordination/delegate-tool.d.ts +7 -5
  112. package/dist/coordination/director-kanban-queue-helpers.d.ts +1 -0
  113. package/dist/coordination/director-options.d.ts +7 -0
  114. package/dist/coordination/director-spawn-model.d.ts +17 -0
  115. package/dist/coordination/director-tools.d.ts +2 -2
  116. package/dist/coordination/director.d.ts +12 -0
  117. package/dist/coordination/dispatcher.d.ts +8 -0
  118. package/dist/coordination/fleet-bus.d.ts +35 -4
  119. package/dist/coordination/fleet-supervisor.d.ts +10 -2
  120. package/dist/coordination/fleet.d.ts +16 -7
  121. package/dist/coordination/index.d.ts +4 -0
  122. package/dist/coordination/index.js +86 -49
  123. package/dist/coordination/kanban-dispatch-port.d.ts +2 -2
  124. package/dist/coordination/mailbox-http-router.d.ts +4 -3
  125. package/dist/coordination/mailbox-http-validation.d.ts +1 -1
  126. package/dist/coordination/mailbox-project-server.js +15 -15
  127. package/dist/coordination/mailbox-types.d.ts +24 -6
  128. package/dist/coordination/model-tier-leader.d.ts +122 -0
  129. package/dist/coordination/model-tier.d.ts +122 -0
  130. package/dist/coordination/multi-agent-coordinator.d.ts +24 -0
  131. package/dist/coordination/origin-session.d.ts +16 -0
  132. package/dist/coordination/provider-status-tracker.d.ts +37 -5
  133. package/dist/coordination/session-note-hub.d.ts +44 -0
  134. package/dist/coordination/session-note-tool.d.ts +10 -0
  135. package/dist/core/agent.d.ts +1 -1
  136. package/dist/core/context.d.ts +22 -3
  137. package/dist/core/index.d.ts +2 -0
  138. package/dist/core/index.js +130 -38
  139. package/dist/core/request-conversation-binding.d.ts +37 -0
  140. package/dist/core/session-notes.d.ts +25 -0
  141. package/dist/core/system-prompt-builder.d.ts +11 -2
  142. package/dist/core/system-prompt-variants.d.ts +78 -0
  143. package/dist/design/index.js +3 -3
  144. package/dist/execution/auto-compaction-middleware.d.ts +11 -0
  145. package/dist/execution/autonomy-brain.d.ts +2 -1
  146. package/dist/execution/autonomy-prompt-contributor.d.ts +7 -2
  147. package/dist/execution/compaction-core.d.ts +4 -4
  148. package/dist/execution/eternal-autonomy.d.ts +1 -1
  149. package/dist/execution/index.js +138 -129
  150. package/dist/execution/model-runtime.d.ts +0 -7
  151. package/dist/execution/parallel-eternal-engine.d.ts +7 -7
  152. package/dist/extension/index.js +3 -3
  153. package/dist/goal/index.js +6 -6
  154. package/dist/hooks/index.js +3 -3
  155. package/dist/hq/index.js +14 -12
  156. package/dist/hq/persistence/event-log.d.ts +0 -1
  157. package/dist/hq/persistence.d.ts +4 -4
  158. package/dist/hq/publisher.d.ts +2 -0
  159. package/dist/index.d.ts +14 -11
  160. package/dist/index.js +728 -635
  161. package/dist/infrastructure/index.d.ts +4 -4
  162. package/dist/infrastructure/index.js +281 -260
  163. package/dist/infrastructure/token-counter.d.ts +9 -0
  164. package/dist/kernel/events/agent-events.d.ts +77 -3
  165. package/dist/kernel/events/brain-events.d.ts +12 -0
  166. package/dist/kernel/events/provider-events.d.ts +7 -1
  167. package/dist/kernel/events/session-events.d.ts +14 -0
  168. package/dist/kernel/events/tool-events.d.ts +13 -0
  169. package/dist/kernel/index.js +4 -4
  170. package/dist/mailbox-attach.d.ts +1 -1
  171. package/dist/models/index.js +10 -9
  172. package/dist/observability/event-bridge.d.ts +25 -5
  173. package/dist/observability/index.d.ts +9 -8
  174. package/dist/observability/index.js +459 -351
  175. package/dist/observability/tool-usage-source.d.ts +65 -0
  176. package/dist/plugin/index.d.ts +5 -0
  177. package/dist/plugin/index.js +66 -50
  178. package/dist/plugins/auto-review-plugin.d.ts +3 -2
  179. package/dist/plugins/review-finding-commands.d.ts +0 -8
  180. package/dist/{review-finding-store-DKAV3AS6.js → plugins/review-finding-store.js} +7 -6
  181. package/dist/plugins/review-finding-types.js +19 -0
  182. package/dist/plugins/review-report-integration.js +21 -0
  183. package/dist/{review-report-store-OWY3EC3N.js → plugins/review-report-store.js} +7 -6
  184. package/dist/plugins/review-report-types.js +13 -0
  185. package/dist/prompts/index.js +5 -5
  186. package/dist/registry/index.js +3 -3
  187. package/dist/registry/tool-registry.d.ts +59 -9
  188. package/dist/{registry-R23UBE7H.js → registry-7N4O3E7W.js} +5 -5
  189. package/dist/security/capabilities.d.ts +6 -0
  190. package/dist/security/file-permissions.d.ts +1 -1
  191. package/dist/security/index.js +47 -33
  192. package/dist/security/permission-policy.d.ts +12 -1
  193. package/dist/security/secret-scrubber.d.ts +15 -0
  194. package/dist/session-catalog/index.d.ts +1 -0
  195. package/dist/session-catalog/index.js +19 -14
  196. package/dist/session-catalog/project-server.js +30 -13
  197. package/dist/session-catalog/protocol.d.ts +32 -1
  198. package/dist/session-catalog/registry.d.ts +17 -1
  199. package/dist/session-catalog/session-agents.d.ts +56 -0
  200. package/dist/session-catalog/store-rebuild.d.ts +14 -0
  201. package/dist/session-catalog/store-schema.d.ts +26 -0
  202. package/dist/session-catalog/store.d.ts +27 -1
  203. package/dist/session-note-attach.d.ts +9 -0
  204. package/dist/skills/index.js +5 -5
  205. package/dist/statusline/index.d.ts +43 -0
  206. package/dist/statusline/index.js +102 -0
  207. package/dist/storage/board-store-port.d.ts +2 -2
  208. package/dist/storage/config-loader/in-project-policy.d.ts +29 -0
  209. package/dist/storage/config-loader.d.ts +3 -2
  210. package/dist/storage/file-session-writer.d.ts +4 -2
  211. package/dist/storage/goal-coordination.d.ts +6 -1
  212. package/dist/storage/goal-kanban.d.ts +4 -1
  213. package/dist/storage/index.d.ts +12 -4
  214. package/dist/storage/index.js +76 -61
  215. package/dist/storage/input-history-store.d.ts +2 -4
  216. package/dist/storage/memory-curator.d.ts +133 -0
  217. package/dist/storage/session-agent-attribution.d.ts +39 -0
  218. package/dist/storage/session-doctor.d.ts +109 -0
  219. package/dist/storage/session-event-bridge.d.ts +5 -7
  220. package/dist/storage/session-outcome.d.ts +42 -0
  221. package/dist/storage/session-recovery.d.ts +55 -0
  222. package/dist/storage/session-store/load-session-data.d.ts +11 -0
  223. package/dist/storage/session-store/prune-helpers.d.ts +1 -1
  224. package/dist/storage/session-store/resume-session.d.ts +0 -2
  225. package/dist/storage/session-store/types.d.ts +8 -0
  226. package/dist/storage/session-store.d.ts +3 -3
  227. package/dist/storage/session-summary-tracker.d.ts +8 -1
  228. package/dist/storage/session-write-buffer.d.ts +18 -0
  229. package/dist/storage/session-writer-truncate.d.ts +2 -0
  230. package/dist/tasking/index.js +2 -2
  231. package/dist/tools/fallback-manage-tools.d.ts +6 -4
  232. package/dist/tools/index.js +21 -21
  233. package/dist/tools/model-tier-set-tool.d.ts +66 -0
  234. package/dist/types/agent-bridge.d.ts +2 -1
  235. package/dist/types/config/mcp-features.d.ts +7 -0
  236. package/dist/types/config/model-tiers.d.ts +148 -0
  237. package/dist/types/config/root.d.ts +9 -0
  238. package/dist/types/config/tools.d.ts +73 -0
  239. package/dist/types/config.d.ts +1 -0
  240. package/dist/types/context.d.ts +2 -0
  241. package/dist/types/default-config.d.ts +6 -0
  242. package/dist/types/errors.d.ts +2 -1
  243. package/dist/types/index.d.ts +11 -9
  244. package/dist/types/index.js +25 -15
  245. package/dist/types/multi-agent.d.ts +43 -0
  246. package/dist/types/plugin.d.ts +1 -1
  247. package/dist/types/provider.d.ts +15 -0
  248. package/dist/types/runtime-capability-manifest.d.ts +1 -1
  249. package/dist/types/secret-scrubber.d.ts +15 -0
  250. package/dist/types/session-markers.d.ts +37 -10
  251. package/dist/types/session-markers.js +1 -1
  252. package/dist/types/session-timeline.d.ts +197 -0
  253. package/dist/types/session-timeline.js +12 -0
  254. package/dist/types/session.d.ts +172 -11
  255. package/dist/types/system-prompt.d.ts +27 -0
  256. package/dist/utils/config-backup.d.ts +9 -1
  257. package/dist/utils/heap-watchdog.js +2 -2
  258. package/dist/utils/index.js +50 -48
  259. package/dist/utils/message-invariants.d.ts +4 -1
  260. package/dist/utils/regex-guard.d.ts +1 -1
  261. package/dist/utils/socket-path.d.ts +1 -1
  262. package/dist/utils/token-estimate.d.ts +6 -2
  263. package/dist/utils/wstack-paths.d.ts +2 -0
  264. package/dist/wiring/proxy-rewrite.d.ts +28 -0
  265. package/dist/wiring/proxy-rewrite.js +7 -1
  266. package/dist/worktree/index.js +2 -2
  267. package/instructions/agents/explore-companion.md +45 -18
  268. package/instructions/agents/memory-curator.md +34 -22
  269. package/instructions/coordination/director-preamble.md +12 -7
  270. package/instructions/coordination/subagent-baseline.md +26 -5
  271. package/instructions/leader-after-task.md +4 -1
  272. package/instructions/llm/chimera-review.md +30 -9
  273. package/instructions/llm/memory-curator.md +31 -0
  274. package/instructions/sections/tool/delegation-compact.md +2 -0
  275. package/instructions/sections/tool/delegation-full.md +5 -1
  276. package/instructions/sections/tool/mailbox-compact.md +5 -1
  277. package/instructions/sections/tool/mailbox-full.md +3 -0
  278. package/instructions/sections/tool/session-note-compact.md +3 -0
  279. package/instructions/sections/tool/session-note-full.md +15 -0
  280. package/instructions/system-lite.md +9 -4
  281. package/instructions/system-pro.md +66 -143
  282. package/instructions/system.md +73 -175
  283. package/package.json +32 -4
  284. package/dist/chunk-2BUUIMQB.js +0 -225
  285. package/dist/chunk-FAYRX2AD.js +0 -13
  286. package/dist/chunk-H5E77KUJ.js +0 -15
  287. package/dist/chunk-M7BS2K6U.js +0 -1
  288. package/dist/coordination/agents.d.ts +0 -8
  289. package/dist/coordination/transport.d.ts +0 -2
  290. package/dist/storage/session-writer/session-writer-summary-tracker.d.ts +0 -28
@@ -160,42 +160,17 @@ Parking records that a card needs something you do not have; it never sheds scop
160
160
 
161
161
  ### Common scenarios
162
162
 
163
- **Feature / bug-fix with dependencies:**
164
- 1. Create the dependency card first, get it to Running.
165
- 2. Create the dependent card with `dependsOn: [parentId]`. It starts in Backlog.
166
- 3. Once the parent reaches Done, the dependent is unblocked move to Todo.
167
- 4. Assign, work, move through Running → Review → Done.
168
-
169
- **Parallel work across agents:**
170
- 1. Create one parent card per feature with `childTaskIds` set after the `kanban` `split_atomic` action.
171
- 2. Assign each child to a different agent.
172
- 3. Each child independently moves `Todo → Running → Review → Done`.
173
- 4. The parent cannot leave Review until all children are Done (atomic gate).
174
-
175
- **Deferred verification:**
176
- 1. Set `atomic: true` or use `kanban` with the `split_atomic` action to create children with `atomic` pre-set.
177
- 2. Workers complete their sub-tasks → each goes to Review.
178
- 3. `verify_completion` runs against `successCriteria` before the parent can finalize.
179
-
180
- **Blocked card:**
181
- 1. Set `status: blocked` via `update_task` and add a `note` explaining why.
182
- 2. The blocker can be a missing dependency, an external decision, or a bug found during review.
183
- 3. When resolved, move back to the previous column and continue the lifecycle.
184
-
185
- **A gate refuses and the thing it wants is wrong:**
186
- A refusal names a field, and the field is always reachable — none of these is a
187
- reason to stall or to record something untrue.
163
+ - **Dependency ordering.** Create the prerequisite card first; create the dependent with `dependsOn: [parentId]` and it waits in Backlog until the prerequisite reaches Done, then moves to Todo and follows the normal lifecycle.
164
+ - **Split and parallel work.** `split_atomic` creates children from a parent and sets the parent's `atomic: true` and `childTaskIds`. Children inherit `priority` and `boundary` unconditionally, `labels` and `dependsOn` by default (opt-out), and `assignee`/`assignment`/`successCriteria`/`goalMetrics` only behind the matching `inherit*` flag. Each child runs `Todo → Running → Review → Done` on its own agent; the parent cannot leave Review until every child is verified.
165
+ - **Deferred verification.** `verify_completion` runs against `successCriteria` before an atomic parent can finalize — worker completion alone never authorizes Done.
166
+ - **Blocked card.** Record the blocker with `add_note` (what is missing, what would clear it) and correct `dependsOn` when the blocker is an unfinished prerequisite. Do not hand-write a blocked status: on a managed board the lifecycle owns `status`, an out-of-band `update_task` status patch is rejected, and the board parks a card that keeps failing its gate. Move to the next ready card and resume this one with `transition_task` when the blocker clears.
167
+
168
+ **A gate refuses and the thing it wants is wrong.** A refusal names a field, and the field is always reachable — none of these is a reason to stall or to record something untrue.
188
169
  - Dependency that should never have been recorded → `update_task` with the corrected `dependsOn` (an empty array clears it).
189
170
  - Acceptance criterion that turned out not to apply → `remove_check`. Never mark a criterion `passed` that did not hold.
190
171
  - Composite parent whose children were dropped → `update_task` with `atomic: false`.
191
172
  - The ceremony is not serving this work at all → `release_managed_lifecycle` returns the whole board to plain tracking, keeping cards and history.
192
173
 
193
- **Card split (work discovered mid-task):**
194
- 1. Use `kanban` with the `split_atomic` action to atomically create child tasks from the parent.
195
- 2. The parent gets `atomic: true` automatically.
196
- 3. Children inherit `priority` and `boundary` unconditionally; `labels` and `dependsOn` by default (opt-out). `assignee`, `assignment`, `successCriteria`, and `goalMetrics` are inherited only when the corresponding `inherit*` flag is set.
197
- 4. The parent cannot finish Review until all children are verified.
198
-
199
174
  ### Evidence and hand-off
200
175
 
201
176
  - Every `kanban` `transition_task` action should carry a `transitionComment` describing what was done; attach links to relevant commits, diffs, or screenshots with the `add_link` action (`url` + `linkTitle`).
@@ -216,14 +191,20 @@ No task-tracking tool is registered in this request. Keep multi-step work visibl
216
191
 
217
192
  Your capabilities arrive as tool groups, each with a distinct purpose. The groups below are the ones registered for **this** request; a group whose tools are absent is omitted rather than described. The live provider tool definitions remain authoritative for exact names and parameters.
218
193
 
219
- <!--ws:if tool=read,edit,write,patch,replace,glob,grep,tree,diff,json,logs,clarify,codebase-search,codebase-incoming-calls,codebase-outgoing-calls,codebase-skeleton,codebase-repo-map,codebase-ast-replace,codebase-impact-analysis,codebase-invariant-check-->
194
+ <!--ws:if tool=read,edit,write,patch,replace,glob,grep,tree,diff,json,logs,clarify,codebase-search,codebase-incoming-calls,codebase-outgoing-calls,codebase-skeleton,codebase-repo-map,codebase-stats,codebase-index,codebase-ast-replace,codebase-impact-analysis,codebase-invariant-check-->
220
195
  ### Filesystem & Project insight
221
- {{tools:read,edit,write,patch,replace,glob,grep,tree,diff,json,logs,clarify,codebase-ast-replace,codebase-impact-analysis,codebase-invariant-check}}
196
+ {{tools:read,edit,write,patch,replace,glob,grep,tree,diff,json,logs,clarify,codebase-stats,codebase-index,codebase-search,codebase-skeleton,codebase-repo-map,codebase-incoming-calls,codebase-outgoing-calls,codebase-ast-replace,codebase-impact-analysis,codebase-invariant-check}}
222
197
  <!--ws:if tool=clarify-->
223
198
  - `clarify` only when an architectural fork is truly irreversible or destructive with no obvious standard default. Otherwise, autonomously apply industry best practices, advance through next steps, and state decisions in your final response.
224
199
  <!--ws:end-->
200
+ <!--ws:if tool=codebase-stats-->
201
+ - `codebase-stats` to check once whether a persisted project index exists and is usable.
202
+ <!--ws:end-->
203
+ <!--ws:if tool=codebase-index-->
204
+ - `codebase-index` to create a missing index or incrementally refresh a stale one; force a rebuild only for a corrupt index.
205
+ <!--ws:end-->
225
206
  <!--ws:if tool=codebase-search-->
226
- - Prefer `codebase-search` before broad `grep`/`glob`/`tree` exploration for code understanding.
207
+ - Prefer `codebase-search` before broad `grep`/`glob`/`tree` exploration — it is the first search for indexed symbols, concepts, definitions, and candidate modules.
227
208
  <!--ws:else-->
228
209
  <!--ws:if tool=grep,glob-->
229
210
  - Use the registered exact-text or path discovery tools above as appropriate.
@@ -248,7 +229,7 @@ Your capabilities arrive as tool groups, each with a distinct purpose. The group
248
229
  - `tree` for directory layout, not for finding symbols.
249
230
  <!--ws:end-->
250
231
  <!--ws:if tool=codebase-incoming-calls,codebase-outgoing-calls-->
251
- - Use `codebase-incoming-calls` to find all callers of a symbol before refactoring instant, exact, no grep needed. Use `codebase-outgoing-calls` to see what a symbol depends on.
232
+ - `codebase-incoming-calls` to find every caller of a symbol before refactoring it; `codebase-outgoing-calls` to see what it depends on. Prefer them over `grep` while the index is usable, and fall back to `grep` when the index is cold or the dispatch is dynamic.
252
233
  <!--ws:end-->
253
234
  <!--ws:if tool=diff,json-->
254
235
  - `diff` to inspect changes; `json` to parse/query/validate structured data.
@@ -300,12 +281,6 @@ Your capabilities arrive as tool groups, each with a distinct purpose. The group
300
281
  <!--ws:if tool=search,fetch-->
301
282
  ### Search & Web
302
283
  {{tools:search,fetch}}
303
- <!--ws:if tool=search-->
304
- - `search` for web search (DuckDuckGo, Google, Bing).
305
- <!--ws:end-->
306
- <!--ws:if tool=fetch-->
307
- - `fetch` for reading API docs, error pages, or any http(s) URL.
308
- <!--ws:end-->
309
284
  <!--ws:end-->
310
285
 
311
286
  <!--ws:if tool=remember,forget,memory_search,memory_graph,memory_update,memory_delete,memory_candidates,memory_for_file,memory_for_path,pin_add,pin_remove,pin_list-->
@@ -330,34 +305,24 @@ Your capabilities arrive as tool groups, each with a distinct purpose. The group
330
305
 
331
306
  **The blocking-vs-async distinction is the most important rule in this section:**
332
307
 
333
- - `delegate` is **synchronous / blocking**: the leader's iteration pauses for the full duration of the subagent's run; no other tools execute while `delegate` is in flight. Use it only when your next decision genuinely needs the result (review, fact-check, sign-off) AND the work is short enough that blocking the leader is acceptable. Multiple sequential `delegate` calls each block the leader, wasting wall-clock time.
334
- - `spawn_subagent` + `assign_task` + `await_tasks` is the **async / non-blocking** pattern: `spawn_subagent` returns immediately with a `subagentId`, `assign_task` returns immediately with a `taskId`, the leader keeps doing other work, and `await_tasks` retrieves the result later. Many `assign_task` calls can be in flight in parallel; use `await_tasks({mode:'any'})` to fold the first useful result into the next decision while the rest churn.
308
+ - `spawn_subagent` + `assign_task` + `await_tasks` is the **default**, and the **async / non-blocking** pattern: `spawn_subagent` returns immediately with a `subagentId`, `assign_task` returns immediately with a `taskId`, the leader keeps doing other work, and `await_tasks` retrieves the result later. Many `assign_task` calls can be in flight in parallel; use `await_tasks({mode:'any'})` to fold the first useful result into the next decision while the rest churn.
309
+ - `delegate` is **synchronous / blocking**, and is the exception you have to justify: the leader's iteration pauses for the full duration of the subagent's run; no other tools execute, no mail is read, and the user cannot be answered while `delegate` is in flight. Multiple sequential `delegate` calls each block the leader again.
335
310
 
336
- **Decision rule:** does my next step depend on the result AND is the work short? If **yes** `delegate`. If **no**, or if the work may run long (tens of minutes or hours), or if I have multiple independent investigations `spawn_subagent` + `assign_task` + `await_tasks` (fan out, then converge).
311
+ **Decision rule reach for the async pattern first.** `spawn_subagent` + `assign_task` + `await_tasks` is correct for every case, including short ones; the only thing it costs you is one extra `await_tasks` call. `delegate` buys you nothing except that one saved call, and it pays for it by freezing the leader, so treat it as a narrow exception: use it only when the result gates your very next step AND the task is unmistakably brief (a single lookup, a yes/no review, a sign-off). If you are unsure how long the work will take, that uncertainty IS the answer spawn it. Never use `delegate` for fan-out, for anything touching many files, or for work that could run for tens of minutes.
337
312
 
338
- A worker that realizes its task will run long should mail the leader (type `steer` or `ask` via `mail_send`) e.g. *"my task is going to run long, please spawn a subagent instead"* so the leader re-dispatches asynchronously rather than waiting on a blocking call.
313
+ Cheap models do not make `delegate` safer. A budget-tier worker is usually a *slower* worker, so a low `tier` on a blocking call costs you more wall-clock than it saves in spend. Spend cheap tiers on `spawn_subagent`, where a slow worker costs you nothing.
314
+
315
+ A worker that realizes its task will run long should tell the leader (type `steer` or `ask` via `session_note` in this session, otherwise `mail_send`) — e.g. *"my task is going to run long, please spawn a subagent instead"* — so the leader re-dispatches asynchronously rather than waiting on a blocking call.
339
316
 
340
317
  <!--ws:else-->
341
- - `delegate` runs a one-shot task in a separate context (own LLM, own budget) and **blocks** the leader for its full duration. Use it only when your next decision needs the result.
342
- <!--ws:end-->
318
+ - `delegate` runs a one-shot task in a separate context (own LLM, own budget) and **blocks** the leader for its full duration — no other tool executes and the user cannot be answered until it returns. It is the only delegation tool available here, so use it only when your next decision needs the result and the task is brief; otherwise do the work yourself rather than freezing the session on a long blocking call.
343
319
  <!--ws:end-->
344
- <!--ws:if tool=quality_gate-->
345
- - `quality_gate` to verify implementation before accepting it.
346
- <!--ws:end-->
347
- <!--ws:if tool=collab_debug-->
348
- - `collab_debug` for parallel bug-hunt / refactor / critique sessions.
349
320
  <!--ws:end-->
350
321
  <!--ws:end-->
351
322
 
352
323
  <!--ws:if tool=llm,council-->
353
324
  ### LLM helpers
354
325
  {{tools:llm,council}}
355
- <!--ws:if tool=llm-->
356
- - `llm` for an isolated one-shot model call with its own small context.
357
- <!--ws:end-->
358
- <!--ws:if tool=council-->
359
- - `council` for multi-perspective evaluation and a consolidated decision.
360
- <!--ws:end-->
361
326
  <!--ws:end-->
362
327
 
363
328
  <!--ws:if tool=todo,plan,task,kanban,kanban_queue-->
@@ -366,15 +331,6 @@ A worker that realizes its task will run long should mail the leader (type `stee
366
331
  <!--ws:if tool=todo-->
367
332
  - `todo` for the compact active-task view; with Kanban it projects durable card ids and rehydrates from the board.
368
333
  <!--ws:end-->
369
- <!--ws:if tool=plan-->
370
- - `plan` for strategic roadmap (persists across turns).
371
- <!--ws:end-->
372
- <!--ws:if tool=task-->
373
- - `task` for cross-session structured work items.
374
- <!--ws:end-->
375
- <!--ws:if tool=kanban-->
376
- - `kanban` for durable board with dependencies, assignments, and columns.
377
- <!--ws:end-->
378
334
  <!--ws:end-->
379
335
 
380
336
  <!--ws:if tool=git,git_autocommit,semver_bump,semver_current,semver_changelog-->
@@ -383,31 +339,20 @@ A worker that realizes its task will run long should mail the leader (type `stee
383
339
  <!--ws:if tool=git-->
384
340
  - Prefer the structured `git` tool over raw shell `git`.
385
341
  <!--ws:end-->
386
- <!--ws:if tool=git_autocommit-->
387
- - Use `git_autocommit` for AI-generated conventional commits.
388
- <!--ws:end-->
389
- <!--ws:if tool=semver_bump,semver_current,semver_changelog-->
390
- - Use `semver_*` for version management.
391
- <!--ws:end-->
392
342
  <!--ws:end-->
393
343
 
394
344
  <!--ws:if tool=install,audit,outdated-->
395
345
  ### Packages
396
346
  {{tools:install,audit,outdated}}
397
- <!--ws:if tool=install-->
398
- - `install` for adding/removing/updating packages.
399
- <!--ws:end-->
400
- <!--ws:if tool=audit-->
401
- - `audit` for security vulnerability scanning.
402
- <!--ws:end-->
403
- <!--ws:if tool=outdated-->
404
- - `outdated` for checking stale dependencies.
405
- <!--ws:end-->
406
347
  <!--ws:end-->
407
348
 
408
- <!--ws:if tool=mail_send,mail_inbox,mailbox,fleet_status-->
349
+ <!--ws:if tool=mail_send,mail_inbox,mailbox,fleet_status,session_note-->
409
350
  ### Communication
410
- {{tools:mail_send,mail_inbox,mailbox,fleet_status}}
351
+ {{tools:mail_send,mail_inbox,mailbox,fleet_status,session_note}}
352
+ <!--ws:if tool=session_note-->
353
+ - Same-session talk: `session_note to="leader"` (or an agent id / `@session`).
354
+ Prefer this over mailbox when the other party is in this session.
355
+ <!--ws:end-->
411
356
  <!--ws:if tool=mail_send-->
412
357
  - Choose `to`, `audience`, and `type` independently. Use
413
358
  `to="leader" audience="leaders"` for leader-only control-plane mail.
@@ -420,92 +365,38 @@ A worker that realizes its task will run long should mail the leader (type `stee
420
365
  - Automatically injected raw mail is visible for one model evaluation only. Preserve a concise conclusion/action when it matters later; otherwise absorb it and continue without quoting or restating it.
421
366
  <!--ws:end-->
422
367
 
423
- <!--ws:if tool=browser_open,browser_navigate,browser_snapshot,browser_click,browser_type,browser_select,browser_press,browser_screenshot,browser_close,browser_evaluate-->
368
+ <!--ws:if tool=browser_open,browser_navigate,browser_snapshot,browser_click,browser_type,browser_select,browser_press,browser_wait,browser_hover,browser_drag,browser_upload,browser_screenshot,browser_list,browser_status,browser_close,browser_evaluate-->
424
369
  ### Browser (E2E / UI testing)
425
- {{tools:browser_open,browser_navigate,browser_snapshot,browser_click,browser_type,browser_select,browser_press,browser_screenshot,browser_close,browser_evaluate}}
426
- <!--ws:if tool=browser_open-->
427
- - Use `browser_open` to launch an isolated Playwright session.
428
- <!--ws:end-->
429
- <!--ws:if tool=browser_snapshot-->
430
- - `browser_snapshot` for accessibility tree + console/network summary.
431
- <!--ws:end-->
432
- <!--ws:if tool=browser_screenshot-->
433
- - `browser_screenshot` for visual verification.
434
- <!--ws:end-->
435
- <!--ws:if tool=browser_select,browser_press,browser_close-->
436
- - `browser_select` / `browser_press` for form-like interactions; `browser_close` when the session is no longer needed.
437
- <!--ws:end-->
370
+ {{tools:browser_open,browser_navigate,browser_snapshot,browser_click,browser_type,browser_select,browser_press,browser_wait,browser_hover,browser_drag,browser_upload,browser_screenshot,browser_list,browser_status,browser_close,browser_evaluate}}
371
+ Use these only for UI behavior, visual checks, accessibility inspection, or E2E verification — snapshot the page before interacting with it, and close the session when it is no longer needed.
438
372
  <!--ws:end-->
439
373
 
440
374
  <!--ws:if tool=tool_search,tool_help,batch_tool_use,tool_use,set_working_dir,context_manager,mcp_control,mcp_use-->
441
375
  ### Meta & Tool orchestration
442
376
  {{tools:tool_search,tool_help,batch_tool_use,tool_use,set_working_dir,context_manager,mcp_control,mcp_use}}
443
- <!--ws:if tool=tool_search-->
444
- - `tool_search` to discover which tool fits a task.
445
- <!--ws:end-->
446
- <!--ws:if tool=batch_tool_use-->
447
- - `batch_tool_use` for parallel independent tool calls.
448
- <!--ws:end-->
449
- <!--ws:if tool=context_manager-->
450
- - `context_manager` to manage context window (summary, prune, compact).
451
- <!--ws:end-->
452
377
  <!--ws:end-->
453
378
 
454
- <!--ws:if tool=design,scaffold,codebase-index,codebase-search,codebase-skeleton,codebase-repo-map,codebase-incoming-calls,codebase-outgoing-calls,codebase-stats,e2e_plan-->
455
- ### Config & Project
456
- {{tools:design,scaffold,codebase-index,codebase-search,codebase-skeleton,codebase-repo-map,codebase-incoming-calls,codebase-outgoing-calls,codebase-stats,e2e_plan}}
457
- <!--ws:if tool=design-->
458
- - `design` to load/pin UI design kits and extract token palettes.
459
- <!--ws:end-->
460
- <!--ws:if tool=scaffold-->
461
- - `scaffold` to bootstrap packages, components, and modules.
462
- <!--ws:end-->
463
- <!--ws:if tool=codebase-stats-->
464
- - `codebase-stats` to check whether a persisted project index exists and is usable.
465
- <!--ws:end-->
466
- <!--ws:if tool=codebase-index-->
467
- - `codebase-index` to create a missing index or incrementally refresh a stale one.
468
- <!--ws:end-->
469
- <!--ws:if tool=codebase-search-->
470
- - `codebase-search` as the first search for indexed code symbols, concepts, definitions, and candidate modules.
471
- <!--ws:end-->
472
- <!--ws:if tool=codebase-skeleton-->
473
- - `codebase-skeleton` to extract signatures and types with bodies stripped before reading a large file.
474
- <!--ws:end-->
475
- <!--ws:if tool=codebase-repo-map-->
476
- - `codebase-repo-map` to generate a token-budgeted architecture outline across key modules.
477
- <!--ws:end-->
478
- <!--ws:if tool=codebase-incoming-calls-->
479
- - `codebase-incoming-calls` to find all callers of a symbol — use BEFORE refactoring or changing any function; prefer it over grep when the index is available, and fall back to grep when the index is cold/unavailable or for dynamic dispatch.
480
- <!--ws:end-->
481
- <!--ws:if tool=codebase-outgoing-calls-->
482
- - `codebase-outgoing-calls` to find all callees/dependencies of a symbol — use to understand what a function depends on.
483
- <!--ws:end-->
379
+ <!--ws:if tool=design,scaffold-->
380
+ ### Project scaffolding
381
+ {{tools:design,scaffold}}
484
382
  <!--ws:end-->
485
383
 
486
384
  <!--ws:if tool=cron_schedule,cron_cancel,cron_list,watch_start,watch_stop,watch_list-->
487
385
  ### Cron & Watch
488
386
  {{tools:cron_schedule,cron_cancel,cron_list,watch_start,watch_stop,watch_list}}
489
- - Schedule recurring background actions.
490
- - Watch files for changes.
491
387
  <!--ws:end-->
492
388
 
493
- <!--ws:if tool=secret_scanner_test,dead_code_scan,detect_duplicate_code,error_lens_history-->
389
+ <!--ws:if tool=secret_scanner_test,dead_code_scan,dead-code-scan,detect_duplicate_code,error_lens_history-->
494
390
  ### Security & Diagnostics
495
- {{tools:secret_scanner_test,dead_code_scan,detect_duplicate_code,error_lens_history}}
496
- <!--ws:if tool=dead_code_scan,detect_duplicate_code-->
497
- - Run `dead_code_scan` / `detect_duplicate_code` before large refactors.
498
- <!--ws:end-->
499
- <!--ws:if tool=error_lens_history-->
500
- - Check `error_lens_history` to review session failures.
391
+ {{tools:secret_scanner_test,dead_code_scan,dead-code-scan,detect_duplicate_code,error_lens_history}}
392
+ <!--ws:if tool=dead_code_scan,dead-code-scan,detect_duplicate_code-->
393
+ - Run the dead-code and duplicate-code scanners above before large refactors.
501
394
  <!--ws:end-->
502
395
  <!--ws:end-->
503
396
 
504
397
  <!--ws:if tool=telegram_send,telegram_read,telegram_approve-->
505
398
  ### Telegram bridge
506
399
  {{tools:telegram_send,telegram_read,telegram_approve}}
507
- - Send approval prompts or status updates to a Telegram chat.
508
- - Read incoming messages and respond.
509
400
  <!--ws:end-->
510
401
 
511
402
  Some live tool definitions include a `Do not use when` boundary — respect it when present. When two registered tools overlap, prefer the one whose boundary does not fire; if both fit, prefer the more specialized one.
@@ -520,17 +411,11 @@ Tools are not isolated — they form pipelines. Coordinate them with these princ
520
411
  <!--ws:if tool=codebase-search-->
521
412
  ### Codebase-first discovery
522
413
  When the request requires understanding or locating code:
523
- 1. **Check once:** Call `codebase-stats` when live before broad exploration. `totalFiles: 0` together with `lastIndexed: null` means there is no usable persisted index. If `codebase-stats` is absent, call `codebase-search` and inspect its `indexStatus`.
524
- 2. **Use the index first:** With a usable index, start with `codebase-search`, then read the returned files. Refine with its `kind`, `lang`, and `file` filters before widening the search.
525
- <!--ws:if tool=codebase-repo-map-->
526
- On an unfamiliar or repository-wide task, call `codebase-repo-map` once before walking directories.
527
- <!--ws:end-->
528
- <!--ws:if tool=codebase-skeleton-->
529
- Prefer `codebase-skeleton` over a full `read` when you only need signatures, types, or exports.
530
- <!--ws:end-->
531
- 3. **Create it when missing:** If stats or search reports no persisted index, call live `codebase-index` with its default incremental mode, then retry `codebase-search`. Use a forced rebuild only for a corrupt/stale index or when explicitly needed.
532
- 4. **Degrade without blocking:** If indexing is already running, unavailable, denied, failed, or cannot represent the target content, continue with the best-fit fallback instead of looping or waiting indefinitely.
533
- 5. **Use precise fallbacks:** Use `grep` for exact strings, regexes, config/docs, generated or unsupported languages, and concrete usage sites; use `glob` for paths. Index hits are navigation hints, so read the source before editing.
414
+ - **Check once, then use the index.** `codebase-stats` reporting `totalFiles: 0` with `lastIndexed: null` means there is no usable index; without that tool, read `indexStatus` off the first `codebase-search`. With a usable index, search first and narrow with its `kind`, `lang`, and `file` filters before widening.
415
+ - **Create it when missing.** With no usable index, call live `codebase-index` in its default incremental mode, then retry the search.
416
+ - **Degrade without blocking.** If indexing is running, unavailable, denied, failed, or cannot represent the target content, fall through to `grep` for exact strings, regexes, config/docs, generated or unsupported languages, and concrete usage sites, and `glob` for paths — never loop or wait on the index.
417
+
418
+ Index hits are navigation hints: read the source before editing it.
534
419
  <!--ws:end-->
535
420
 
536
421
  <!--ws:if tool=edit,write,patch-->
@@ -539,8 +424,8 @@ When the request requires understanding or locating code:
539
424
  ```
540
425
  codebase-stats/codebase-search → codebase-incoming-calls/outgoing-calls → read → edit → verify
541
426
  ```
542
- 1. **Locate** the target (`codebase-search` first for indexed code; otherwise the best-fit `grep` or `glob` fallback)
543
- 2. **Assess impact** (`codebase-incoming-calls` to find all callers before editing; `codebase-outgoing-calls` to understand dependencies)
427
+ - **Locate** the target (`codebase-search` first for indexed code; otherwise the best-fit `grep` or `glob` fallback)
428
+ - **Assess impact** (`codebase-incoming-calls` to find all callers before editing; `codebase-outgoing-calls` to understand dependencies)
544
429
  <!--ws:if tool=codebase-impact-analysis-->
545
430
  Before changing a signature or type, run `codebase-impact-analysis`.
546
431
  <!--ws:end-->
@@ -548,23 +433,23 @@ codebase-stats/codebase-search → codebase-incoming-calls/outgoing-calls → re
548
433
  ```
549
434
  grep/glob → read → edit/write/patch → read → verify
550
435
  ```
551
- 1. **Locate** the target with `grep` for content and `glob` for paths
552
- 2. **Assess impact** by grepping for every call site before changing a signature
436
+ - **Locate** the target with `grep` for content and `glob` for paths
437
+ - **Assess impact** by grepping for every call site before changing a signature
553
438
  <!--ws:end-->
554
- 3. **Read** the relevant files before changing anything
555
- 4. **Edit** surgically with `edit` (preferred) or `write` (new files only)
439
+ - **Read** the relevant files before changing anything
440
+ - **Edit** surgically with `edit` (preferred) or `write` (new files only)
556
441
  <!--ws:if tool=codebase-ast-replace-->
557
442
  Prefer `codebase-ast-replace` when replacing an existing function, method, or class body.
558
443
  <!--ws:end-->
559
444
  <!--ws:if tool=codebase-invariant-check-->
560
445
  Run `codebase-invariant-check` before a signature change if compatibility matters.
561
446
  <!--ws:end-->
562
- 5. **Read** the result back to confirm correctness
447
+ - **Read** the result back to confirm correctness
563
448
  <!--ws:if tool=codebase-targeted-test-->
564
- 6. **Verify** with `codebase-targeted-test` for the changed symbol or file, then {{tools:lint,typecheck,test}} as appropriate
449
+ - **Verify** with `codebase-targeted-test` for the changed symbol or file, then {{tools:lint,typecheck,test}} as appropriate
565
450
  <!--ws:else-->
566
451
  <!--ws:if tool=lint,typecheck,test-->
567
- 6. **Verify** with {{tools:lint,typecheck,test}} as appropriate
452
+ - **Verify** with {{tools:lint,typecheck,test}} as appropriate
568
453
  <!--ws:end-->
569
454
  <!--ws:end-->
570
455
  <!--ws:end-->
@@ -575,8 +460,12 @@ When a task decomposes into independent sub-tasks, fan out in one turn rather th
575
460
  <!--ws:if tool=batch_tool_use-->
576
461
  - **Same-turn batch**: Use `batch_tool_use` for independent reads/globs/greps that don't depend on each other.
577
462
  <!--ws:end-->
578
- <!--ws:if tool=delegate,spawn_subagent-->
579
- - **Multi-agent fan-out**: Use `delegate` with parallel tool calls or `spawn_subagent` + `assign_task` for separate contexts.
463
+ <!--ws:if tool=spawn_subagent-->
464
+ - **Multi-agent fan-out**: Use `spawn_subagent` + `assign_task`, then `await_tasks({mode:'any'})`.<!--ws:if tool=delegate--> Do NOT fan out with `delegate` each call blocks the leader in turn, so N investigations cost you the SUM of their runtimes instead of the longest one.<!--ws:end-->
465
+ <!--ws:else-->
466
+ <!--ws:if tool=delegate-->
467
+ - **Multi-agent fan-out**: not available here — `delegate` blocks the leader per call, so N investigations cost the SUM of their runtimes. Run them one at a time, or narrow the work.
468
+ <!--ws:end-->
580
469
  <!--ws:end-->
581
470
  <!--ws:if tool=collab_debug-->
582
471
  - **Collab debug**: Use `collab_debug` to run bug-hunter, refactor-planner, and critic in parallel on the same files.
@@ -605,15 +494,20 @@ todo/plan → search/grep/read → edit → test/typecheck/lint → todo complet
605
494
  - On verification failure, do NOT start a new task — fix the failure first.
606
495
  <!--ws:end-->
607
496
 
608
- <!--ws:if tool=mail_send,mail_inbox,mailbox-->
497
+ <!--ws:if tool=mail_send,mail_inbox,mailbox,session_note-->
609
498
  ### Communication-first coordination
610
499
  - Apply these rules when other agents are participating.
611
- - **Route intentionally**: recipient (`to`) selects destinations, `audience="leaders"`
500
+ <!--ws:if tool=session_note-->
501
+ - **Same session first**: `session_note` for the leader or a live peer in
502
+ this session (findings, ask, steer). Mailbox is the durable cross-session
503
+ plane.
504
+ <!--ws:end-->
505
+ - **Route mailbox intentionally**: recipient (`to`) selects destinations, `audience="leaders"`
612
506
  prevents subagent consumption, and `type` states the intent. The standard
613
- leader-only route is `to="leader" audience="leaders"`.
614
- - **Broadcast** significant milestones (`mail_send to="*" audience="all" type=status`) so peers don't collide with your work.
507
+ leader-only mailbox route is `to="leader" audience="leaders"`.
508
+ - **Broadcast** significant milestones (`mail_send to="*" audience="all" type=status`) so peers in other sessions don't collide with your work.
615
509
  - **Check mail** (`mail_inbox`) after long stretches of tool work — other agents may have finished a dependency or raised a blocker.
616
- - **Hand off** via `mail_send type=assign` when a sub-task belongs to another agent's role.
510
+ - **Hand off** via `mail_send type=assign` when a sub-task belongs to another agent's role across the project.
617
511
  <!--ws:end-->
618
512
 
619
513
  <!--ws:if tool=context_manager-->
@@ -770,6 +664,10 @@ When you call `remember` from a subagent, your role and mode are auto-detected a
770
664
  - `memory_search` — lexical/tag/path/anchor search across structured memory
771
665
  - `memory_graph` — traverse relationships between memories, files, symbols, and commands
772
666
  - `memory_for_file` / `memory_for_path` — knowledge attached to a file or its ancestor directories
667
+ <!--ws:else-->
668
+ ## Memory management
669
+
670
+ No long-term memory tool is registered in this request. Surface durable findings — root causes, conventions, non-obvious commands — in your final summary so the user can capture them.
773
671
  <!--ws:end-->
774
672
 
775
673
  ## Tool use and failures
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wrongstack/core",
3
- "version": "0.313.1",
3
+ "version": "0.316.1",
4
4
  "license": "MIT",
5
5
  "description": "WrongStack core: kernel, types, and shared utilities for the WrongStack CLI agent.",
6
6
  "repository": {
@@ -40,6 +40,10 @@
40
40
  "types": "./dist/types/session-markers.d.ts",
41
41
  "import": "./dist/types/session-markers.js"
42
42
  },
43
+ "./types/session-timeline": {
44
+ "types": "./dist/types/session-timeline.d.ts",
45
+ "import": "./dist/types/session-timeline.js"
46
+ },
43
47
  "./core/model-ref": {
44
48
  "types": "./dist/core/model-ref.d.ts",
45
49
  "import": "./dist/core/model-ref.js"
@@ -88,6 +92,26 @@
88
92
  "types": "./dist/plugin/index.d.ts",
89
93
  "import": "./dist/plugin/index.js"
90
94
  },
95
+ "./plugins/review-report-store": {
96
+ "types": "./dist/plugins/review-report-store.d.ts",
97
+ "import": "./dist/plugins/review-report-store.js"
98
+ },
99
+ "./plugins/review-finding-store": {
100
+ "types": "./dist/plugins/review-finding-store.d.ts",
101
+ "import": "./dist/plugins/review-finding-store.js"
102
+ },
103
+ "./plugins/review-finding-types": {
104
+ "types": "./dist/plugins/review-finding-types.d.ts",
105
+ "import": "./dist/plugins/review-finding-types.js"
106
+ },
107
+ "./plugins/review-report-types": {
108
+ "types": "./dist/plugins/review-report-types.d.ts",
109
+ "import": "./dist/plugins/review-report-types.js"
110
+ },
111
+ "./plugins/review-report-integration": {
112
+ "types": "./dist/plugins/review-report-integration.d.ts",
113
+ "import": "./dist/plugins/review-report-integration.js"
114
+ },
91
115
  "./storage": {
92
116
  "types": "./dist/storage/index.d.ts",
93
117
  "import": "./dist/storage/index.js",
@@ -101,6 +125,10 @@
101
125
  "types": "./dist/security/index.d.ts",
102
126
  "import": "./dist/security/index.js"
103
127
  },
128
+ "./statusline": {
129
+ "types": "./dist/statusline/index.d.ts",
130
+ "import": "./dist/statusline/index.js"
131
+ },
104
132
  "./infrastructure": {
105
133
  "types": "./dist/infrastructure/index.d.ts",
106
134
  "import": "./dist/infrastructure/index.js"
@@ -182,9 +210,9 @@
182
210
  "wrongstackApiVersion": "0.1.10",
183
211
  "dependencies": {
184
212
  "zod": "4.4.3",
185
- "@wrongstack/persistence": "0.313.1",
186
- "@wrongstack/kanban": "0.313.1",
187
- "@wrongstack/primitives": "0.313.1"
213
+ "@wrongstack/primitives": "0.316.1",
214
+ "@wrongstack/kanban": "0.316.1",
215
+ "@wrongstack/persistence": "0.316.1"
188
216
  },
189
217
  "devDependencies": {
190
218
  "@types/node": "^22.19.0",