@bastani/atomic 0.9.20-alpha.8 → 0.9.20

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 (309) hide show
  1. package/CHANGELOG.md +288 -0
  2. package/dist/builtin/intercom/CHANGELOG.md +25 -0
  3. package/dist/builtin/intercom/package.json +3 -5
  4. package/dist/builtin/mcp/CHANGELOG.md +13 -0
  5. package/dist/builtin/mcp/package.json +3 -3
  6. package/dist/builtin/subagents/CHANGELOG.md +56 -0
  7. package/dist/builtin/subagents/package.json +3 -3
  8. package/dist/builtin/subagents/skills/tdd/SKILL.md +10 -2
  9. package/dist/builtin/subagents/skills/tdd/mocking.md +4 -0
  10. package/dist/builtin/subagents/skills/tdd/test-audit.md +105 -0
  11. package/dist/builtin/subagents/skills/tdd/tests.md +3 -1
  12. package/dist/builtin/subagents/src/extension/index.bundle.mjs +13 -3
  13. package/dist/builtin/web-access/CHANGELOG.md +13 -0
  14. package/dist/builtin/web-access/package.json +1 -1
  15. package/dist/builtin/workflows/CHANGELOG.md +169 -0
  16. package/dist/builtin/workflows/README.md +1 -1
  17. package/dist/builtin/workflows/builtin/adversarial-verification.js +3 -3
  18. package/dist/builtin/workflows/builtin/{chunk-njmf5ze7.js → chunk-0nrgfbag.js} +1 -1
  19. package/dist/builtin/workflows/builtin/{chunk-hmt5w62g.js → chunk-2hak3b7g.js} +1 -1
  20. package/dist/builtin/workflows/builtin/{chunk-2hzrv5y8.js → chunk-73c5tayt.js} +1020 -200
  21. package/dist/builtin/workflows/builtin/{chunk-ffdrv23t.js → chunk-bzdvx2xr.js} +1 -1
  22. package/dist/builtin/workflows/builtin/{chunk-5724b0cf.js → chunk-crw7q5g1.js} +1 -1
  23. package/dist/builtin/workflows/builtin/{chunk-7n51c5gh.js → chunk-cw86srkf.js} +1 -1
  24. package/dist/builtin/workflows/builtin/{chunk-dxjxtgmp.js → chunk-jaj27rqc.js} +1 -1
  25. package/dist/builtin/workflows/builtin/{chunk-3tx8ry44.js → chunk-kspvwc24.js} +3 -2
  26. package/dist/builtin/workflows/builtin/{chunk-7bzcersz.js → chunk-maqv731g.js} +3 -3
  27. package/dist/builtin/workflows/builtin/{chunk-9z3ztr2a.js → chunk-vkmpdat4.js} +1 -1
  28. package/dist/builtin/workflows/builtin/{chunk-vn0wb31x.js → chunk-w18kbz63.js} +1 -1
  29. package/dist/builtin/workflows/builtin/{chunk-jngsbbpm.js → chunk-wh19f5ee.js} +3 -3
  30. package/dist/builtin/workflows/builtin/classify-and-act.js +3 -3
  31. package/dist/builtin/workflows/builtin/fan-out-and-synthesize.js +3 -3
  32. package/dist/builtin/workflows/builtin/generate-and-filter.js +3 -3
  33. package/dist/builtin/workflows/builtin/goal.js +4 -4
  34. package/dist/builtin/workflows/builtin/index.js +12 -12
  35. package/dist/builtin/workflows/builtin/loop-until-done.js +3 -3
  36. package/dist/builtin/workflows/builtin/open-claude-design.js +3 -3
  37. package/dist/builtin/workflows/builtin/ralph.js +4 -4
  38. package/dist/builtin/workflows/builtin/steering-context.js +1 -1
  39. package/dist/builtin/workflows/builtin/tournament.js +3 -3
  40. package/dist/builtin/workflows/package.json +4 -4
  41. package/dist/builtin/workflows/src/authoring.d.ts +6 -3
  42. package/dist/builtin/workflows/src/extension/index.bundle.mjs +12164 -11365
  43. package/dist/builtin/workflows/src/index.js +41685 -12907
  44. package/dist/builtin/workflows/src/shared/authoring-contract-ui.d.ts +13 -0
  45. package/dist/core/agent-session-boundaries.d.ts.map +1 -1
  46. package/dist/core/agent-session-boundaries.js +9 -4
  47. package/dist/core/agent-session-boundaries.js.map +1 -1
  48. package/dist/core/agent-session-events.d.ts.map +1 -1
  49. package/dist/core/agent-session-events.js +4 -0
  50. package/dist/core/agent-session-events.js.map +1 -1
  51. package/dist/core/agent-session-methods.d.ts +3 -0
  52. package/dist/core/agent-session-methods.d.ts.map +1 -1
  53. package/dist/core/agent-session-methods.js.map +1 -1
  54. package/dist/core/agent-session-queue-pause.d.ts.map +1 -1
  55. package/dist/core/agent-session-queue-pause.js +2 -1
  56. package/dist/core/agent-session-queue-pause.js.map +1 -1
  57. package/dist/core/agent-session-tasks.js +4 -4
  58. package/dist/core/agent-session-tasks.js.map +1 -1
  59. package/dist/core/agent-session-tool-registry.d.ts.map +1 -1
  60. package/dist/core/agent-session-tool-registry.js +4 -3
  61. package/dist/core/agent-session-tool-registry.js.map +1 -1
  62. package/dist/core/agent-session.d.ts +3 -0
  63. package/dist/core/agent-session.d.ts.map +1 -1
  64. package/dist/core/agent-session.js +3 -0
  65. package/dist/core/agent-session.js.map +1 -1
  66. package/dist/core/cache-stats.d.ts +7 -1
  67. package/dist/core/cache-stats.d.ts.map +1 -1
  68. package/dist/core/cache-stats.js +24 -5
  69. package/dist/core/cache-stats.js.map +1 -1
  70. package/dist/core/context-tool-pairing.d.ts +10 -14
  71. package/dist/core/context-tool-pairing.d.ts.map +1 -1
  72. package/dist/core/context-tool-pairing.js +99 -28
  73. package/dist/core/context-tool-pairing.js.map +1 -1
  74. package/dist/core/execution-model-router.d.ts +1 -1
  75. package/dist/core/execution-model-router.d.ts.map +1 -1
  76. package/dist/core/execution-model-router.js +23 -14
  77. package/dist/core/execution-model-router.js.map +1 -1
  78. package/dist/core/extensions/agent-events.d.ts +9 -1
  79. package/dist/core/extensions/agent-events.d.ts.map +1 -1
  80. package/dist/core/extensions/agent-events.js.map +1 -1
  81. package/dist/core/extensions/api-types.d.ts +2 -1
  82. package/dist/core/extensions/api-types.d.ts.map +1 -1
  83. package/dist/core/extensions/api-types.js.map +1 -1
  84. package/dist/core/extensions/event-types.d.ts +2 -2
  85. package/dist/core/extensions/event-types.d.ts.map +1 -1
  86. package/dist/core/extensions/event-types.js.map +1 -1
  87. package/dist/core/extensions/index.d.ts +1 -1
  88. package/dist/core/extensions/index.d.ts.map +1 -1
  89. package/dist/core/extensions/index.js.map +1 -1
  90. package/dist/core/extensions/loader-core.d.ts.map +1 -1
  91. package/dist/core/extensions/loader-core.js +1 -0
  92. package/dist/core/extensions/loader-core.js.map +1 -1
  93. package/dist/core/extensions/provider-types.d.ts +34 -16
  94. package/dist/core/extensions/provider-types.d.ts.map +1 -1
  95. package/dist/core/extensions/provider-types.js.map +1 -1
  96. package/dist/core/extensions/runtime-types.d.ts +4 -0
  97. package/dist/core/extensions/runtime-types.d.ts.map +1 -1
  98. package/dist/core/extensions/runtime-types.js.map +1 -1
  99. package/dist/core/extensions/tool-types.d.ts +9 -0
  100. package/dist/core/extensions/tool-types.d.ts.map +1 -1
  101. package/dist/core/extensions/tool-types.js.map +1 -1
  102. package/dist/core/fast-model-routing.d.ts.map +1 -1
  103. package/dist/core/fast-model-routing.js +1 -0
  104. package/dist/core/fast-model-routing.js.map +1 -1
  105. package/dist/core/messages.d.ts.map +1 -1
  106. package/dist/core/messages.js +2 -1
  107. package/dist/core/messages.js.map +1 -1
  108. package/dist/core/model-registry.d.ts +3 -1
  109. package/dist/core/model-registry.d.ts.map +1 -1
  110. package/dist/core/model-registry.js +6 -0
  111. package/dist/core/model-registry.js.map +1 -1
  112. package/dist/core/model-runtime-auth.d.ts +2 -2
  113. package/dist/core/model-runtime-auth.d.ts.map +1 -1
  114. package/dist/core/model-runtime-auth.js.map +1 -1
  115. package/dist/core/model-runtime-streaming.d.ts.map +1 -1
  116. package/dist/core/model-runtime-streaming.js +2 -1
  117. package/dist/core/model-runtime-streaming.js.map +1 -1
  118. package/dist/core/model-runtime.d.ts +11 -3
  119. package/dist/core/model-runtime.d.ts.map +1 -1
  120. package/dist/core/model-runtime.js +41 -6
  121. package/dist/core/model-runtime.js.map +1 -1
  122. package/dist/core/package-manager-npm.d.ts.map +1 -1
  123. package/dist/core/package-manager-npm.js +32 -8
  124. package/dist/core/package-manager-npm.js.map +1 -1
  125. package/dist/core/package-manager-resolver.js +3 -1
  126. package/dist/core/package-manager-resolver.js.map +1 -1
  127. package/dist/core/package-manager-types.d.ts +1 -0
  128. package/dist/core/package-manager-types.d.ts.map +1 -1
  129. package/dist/core/package-manager-types.js.map +1 -1
  130. package/dist/core/provider-composer-internal.d.ts +40 -21
  131. package/dist/core/provider-composer-internal.d.ts.map +1 -1
  132. package/dist/core/provider-composer-internal.js +22 -20
  133. package/dist/core/provider-composer-internal.js.map +1 -1
  134. package/dist/core/provider-composer.d.ts +3 -3
  135. package/dist/core/provider-composer.d.ts.map +1 -1
  136. package/dist/core/provider-composer.js +54 -10
  137. package/dist/core/provider-composer.js.map +1 -1
  138. package/dist/core/remote-catalog-provider.d.ts +8 -1
  139. package/dist/core/remote-catalog-provider.d.ts.map +1 -1
  140. package/dist/core/remote-catalog-provider.js +46 -4
  141. package/dist/core/remote-catalog-provider.js.map +1 -1
  142. package/dist/core/resource-loader-core.d.ts.map +1 -1
  143. package/dist/core/resource-loader-core.js +7 -3
  144. package/dist/core/resource-loader-core.js.map +1 -1
  145. package/dist/core/resource-loader-extension-warnings.d.ts +9 -0
  146. package/dist/core/resource-loader-extension-warnings.d.ts.map +1 -0
  147. package/dist/core/resource-loader-extension-warnings.js +54 -0
  148. package/dist/core/resource-loader-extension-warnings.js.map +1 -0
  149. package/dist/core/resource-loader-extensions.d.ts.map +1 -1
  150. package/dist/core/resource-loader-extensions.js +1 -0
  151. package/dist/core/resource-loader-extensions.js.map +1 -1
  152. package/dist/core/resource-loader-reload.d.ts.map +1 -1
  153. package/dist/core/resource-loader-reload.js +6 -0
  154. package/dist/core/resource-loader-reload.js.map +1 -1
  155. package/dist/core/runtime-credentials.d.ts.map +1 -1
  156. package/dist/core/runtime-credentials.js +3 -1
  157. package/dist/core/runtime-credentials.js.map +1 -1
  158. package/dist/core/sdk.js +16 -6
  159. package/dist/core/sdk.js.map +1 -1
  160. package/dist/core/settings-manager-basic-accessors.js +4 -4
  161. package/dist/core/settings-manager-basic-accessors.js.map +1 -1
  162. package/dist/core/structured-output/choice-schema.d.ts +8 -0
  163. package/dist/core/structured-output/choice-schema.d.ts.map +1 -0
  164. package/dist/core/structured-output/choice-schema.js +79 -0
  165. package/dist/core/structured-output/choice-schema.js.map +1 -0
  166. package/dist/core/structured-output/index.d.ts +3 -5
  167. package/dist/core/structured-output/index.d.ts.map +1 -1
  168. package/dist/core/structured-output/index.js +218 -41
  169. package/dist/core/structured-output/index.js.map +1 -1
  170. package/dist/core/structured-output/resolver.d.ts +0 -46
  171. package/dist/core/structured-output/resolver.d.ts.map +1 -1
  172. package/dist/core/structured-output/resolver.js +15 -93
  173. package/dist/core/structured-output/resolver.js.map +1 -1
  174. package/dist/core/structured-output/types.d.ts +27 -21
  175. package/dist/core/structured-output/types.d.ts.map +1 -1
  176. package/dist/core/structured-output/types.js.map +1 -1
  177. package/dist/core/system-prompt.d.ts.map +1 -1
  178. package/dist/core/system-prompt.js +9 -1
  179. package/dist/core/system-prompt.js.map +1 -1
  180. package/dist/core/tasks/owner-store.d.ts +6 -0
  181. package/dist/core/tasks/owner-store.d.ts.map +1 -1
  182. package/dist/core/tasks/owner-store.js +16 -3
  183. package/dist/core/tasks/owner-store.js.map +1 -1
  184. package/dist/core/tasks/pause.js +1 -1
  185. package/dist/core/tasks/pause.js.map +1 -1
  186. package/dist/core/tasks/supervisor.d.ts +4 -2
  187. package/dist/core/tasks/supervisor.d.ts.map +1 -1
  188. package/dist/core/tasks/supervisor.js +9 -3
  189. package/dist/core/tasks/supervisor.js.map +1 -1
  190. package/dist/core/tools/ask-user-question/ask-user-question.d.ts.map +1 -1
  191. package/dist/core/tools/ask-user-question/ask-user-question.js +1 -0
  192. package/dist/core/tools/ask-user-question/ask-user-question.js.map +1 -1
  193. package/dist/core/tools/bash.d.ts.map +1 -1
  194. package/dist/core/tools/bash.js +1 -0
  195. package/dist/core/tools/bash.js.map +1 -1
  196. package/dist/core/tools/edit.d.ts.map +1 -1
  197. package/dist/core/tools/edit.js +1 -0
  198. package/dist/core/tools/edit.js.map +1 -1
  199. package/dist/core/tools/file-mutation-coordinator.d.ts +4 -3
  200. package/dist/core/tools/file-mutation-coordinator.d.ts.map +1 -1
  201. package/dist/core/tools/file-mutation-coordinator.js +45 -38
  202. package/dist/core/tools/file-mutation-coordinator.js.map +1 -1
  203. package/dist/core/tools/powershell.d.ts +16 -0
  204. package/dist/core/tools/powershell.d.ts.map +1 -1
  205. package/dist/core/tools/structured-output.d.ts +9 -6
  206. package/dist/core/tools/structured-output.d.ts.map +1 -1
  207. package/dist/core/tools/structured-output.js +36 -8
  208. package/dist/core/tools/structured-output.js.map +1 -1
  209. package/dist/core/tools/todos.d.ts.map +1 -1
  210. package/dist/core/tools/todos.js +1 -0
  211. package/dist/core/tools/todos.js.map +1 -1
  212. package/dist/core/tools/tool-concurrency.d.ts +23 -0
  213. package/dist/core/tools/tool-concurrency.d.ts.map +1 -0
  214. package/dist/core/tools/tool-concurrency.js +58 -0
  215. package/dist/core/tools/tool-concurrency.js.map +1 -0
  216. package/dist/core/tools/tool-definition-wrapper.d.ts +4 -1
  217. package/dist/core/tools/tool-definition-wrapper.d.ts.map +1 -1
  218. package/dist/core/tools/tool-definition-wrapper.js +2 -0
  219. package/dist/core/tools/tool-definition-wrapper.js.map +1 -1
  220. package/dist/core/tools/write.d.ts.map +1 -1
  221. package/dist/core/tools/write.js +1 -0
  222. package/dist/core/tools/write.js.map +1 -1
  223. package/dist/index-extensions.d.ts +1 -1
  224. package/dist/index-extensions.d.ts.map +1 -1
  225. package/dist/index-extensions.js.map +1 -1
  226. package/dist/index.d.ts +1 -1
  227. package/dist/index.d.ts.map +1 -1
  228. package/dist/index.js +1 -1
  229. package/dist/index.js.map +1 -1
  230. package/dist/main.d.ts.map +1 -1
  231. package/dist/main.js +4 -0
  232. package/dist/main.js.map +1 -1
  233. package/dist/modes/interactive/components/settings-selector-items.d.ts.map +1 -1
  234. package/dist/modes/interactive/components/settings-selector-items.js +11 -9
  235. package/dist/modes/interactive/components/settings-selector-items.js.map +1 -1
  236. package/dist/modes/interactive/components/settings-selector-types.d.ts +2 -1
  237. package/dist/modes/interactive/components/settings-selector-types.d.ts.map +1 -1
  238. package/dist/modes/interactive/components/settings-selector-types.js.map +1 -1
  239. package/dist/modes/interactive/components/task-inspector.d.ts +1 -0
  240. package/dist/modes/interactive/components/task-inspector.d.ts.map +1 -1
  241. package/dist/modes/interactive/components/task-inspector.js +11 -11
  242. package/dist/modes/interactive/components/task-inspector.js.map +1 -1
  243. package/dist/modes/interactive/components/task-list.d.ts +9 -3
  244. package/dist/modes/interactive/components/task-list.d.ts.map +1 -1
  245. package/dist/modes/interactive/components/task-list.js +26 -2
  246. package/dist/modes/interactive/components/task-list.js.map +1 -1
  247. package/dist/modes/interactive/interactive-agent-events.js +3 -9
  248. package/dist/modes/interactive/interactive-agent-events.js.map +1 -1
  249. package/dist/modes/interactive/interactive-auth-login.js +1 -1
  250. package/dist/modes/interactive/interactive-auth-login.js.map +1 -1
  251. package/dist/modes/interactive/interactive-render-chat.js +3 -9
  252. package/dist/modes/interactive/interactive-render-chat.js.map +1 -1
  253. package/dist/modes/interactive/interactive-resource-rendering.js +6 -9
  254. package/dist/modes/interactive/interactive-resource-rendering.js.map +1 -1
  255. package/dist/modes/interactive/interactive-selectors.js +1 -0
  256. package/dist/modes/interactive/interactive-selectors.js.map +1 -1
  257. package/dist/modes/interactive/interactive-slash-commands.js +2 -4
  258. package/dist/modes/interactive/interactive-slash-commands.js.map +1 -1
  259. package/dist/modes/interactive-engine/isolated-runtime.d.ts +1 -0
  260. package/dist/modes/interactive-engine/isolated-runtime.d.ts.map +1 -1
  261. package/dist/modes/interactive-engine/isolated-runtime.js +5 -0
  262. package/dist/modes/interactive-engine/isolated-runtime.js.map +1 -1
  263. package/dist/utils/clipboard-image.d.ts.map +1 -1
  264. package/dist/utils/clipboard-image.js +14 -17
  265. package/dist/utils/clipboard-image.js.map +1 -1
  266. package/docs/background-tasks.md +1 -0
  267. package/docs/computer-use.md +33 -9
  268. package/docs/custom-provider/registration.md +1 -1
  269. package/docs/custom-provider.md +43 -1
  270. package/docs/extensions/authoring.md +22 -3
  271. package/docs/extensions/events.md +18 -0
  272. package/docs/extensions/examples.md +1 -0
  273. package/docs/getting-started/first-session.md +1 -1
  274. package/docs/models/evals.md +31 -79
  275. package/docs/models/model-selection.md +5 -1
  276. package/docs/packages/authoring.md +3 -1
  277. package/docs/providers.md +7 -11
  278. package/docs/sdk/reference.md +18 -42
  279. package/docs/sdk/structured-decisions.md +44 -89
  280. package/docs/sdk.md +1 -1
  281. package/docs/settings.md +6 -6
  282. package/docs/skills.md +2 -2
  283. package/docs/subagents/reference.md +7 -8
  284. package/docs/usage.md +13 -0
  285. package/docs/workflows/api-reference.md +38 -35
  286. package/docs/workflows/authoring.md +113 -1
  287. package/docs/workflows/builtins.md +1 -1
  288. package/docs/workflows/operations.md +53 -29
  289. package/docs/workflows/reliable-design.md +1 -1
  290. package/docs/workflows/verification.md +38 -7
  291. package/docs/workflows.md +1 -1
  292. package/examples/extensions/README.md +1 -0
  293. package/examples/extensions/debug-provider.ts +90 -0
  294. package/examples/extensions/structured-output.ts +6 -0
  295. package/npm-shrinkwrap.json +32 -32
  296. package/package.json +3 -3
  297. package/dist/builtin/workflows/src/durable/dependency-doctor-types.d.ts +0 -42
  298. package/dist/core/decision-provider.d.ts +0 -4
  299. package/dist/core/decision-provider.d.ts.map +0 -1
  300. package/dist/core/decision-provider.js +0 -12
  301. package/dist/core/decision-provider.js.map +0 -1
  302. package/dist/core/structured-output/jev-client.d.ts +0 -25
  303. package/dist/core/structured-output/jev-client.d.ts.map +0 -1
  304. package/dist/core/structured-output/jev-client.js +0 -174
  305. package/dist/core/structured-output/jev-client.js.map +0 -1
  306. package/dist/core/structured-output/jev.d.ts +0 -5
  307. package/dist/core/structured-output/jev.d.ts.map +0 -1
  308. package/dist/core/structured-output/jev.js +0 -249
  309. package/dist/core/structured-output/jev.js.map +0 -1
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bastani/subagents",
3
- "version": "0.9.20-alpha.8",
3
+ "version": "0.9.20",
4
4
  "private": true,
5
5
  "description": "Atomic extension for delegating tasks to subagents with parallel execution. Fork of: https://github.com/nicobailon/pi-subagents",
6
6
  "contributors": [
@@ -36,7 +36,8 @@
36
36
  "@bastani/atomic": "*",
37
37
  "@bastani/pi-ai": "*",
38
38
  "@earendil-works/pi-agent-core": "^0.87.1",
39
- "@earendil-works/pi-tui": "^0.87.1"
39
+ "@earendil-works/pi-tui": "^0.87.1",
40
+ "typebox": "*"
40
41
  },
41
42
  "peerDependenciesMeta": {
42
43
  "@bastani/atomic": {
@@ -54,7 +55,6 @@
54
55
  },
55
56
  "dependencies": {
56
57
  "jiti": "^2.7.0",
57
- "typebox": "^1.3.27",
58
58
  "yaml": "2.9.0"
59
59
  }
60
60
  }
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: tdd
3
- description: Test-driven development with red-green-refactor loop. Use when user wants to build features or fix bugs using TDD, mentions "red-green-refactor", wants integration tests, or asks for test-first development.
3
+ description: Test-driven development with red-green-refactor loop, plus a value gate and audit workflow for tests. Use when user wants to build features or fix bugs using TDD, mentions "red-green-refactor", wants integration tests, asks for test-first development, or asks to review, audit, prune, or clean up low-value, duplicated, or implementation-coupled tests.
4
4
  ---
5
5
 
6
6
  # Test-Driven Development
@@ -13,7 +13,7 @@ description: Test-driven development with red-green-refactor loop. Use when user
13
13
 
14
14
  **Bad tests** are coupled to implementation. They mock internal collaborators, test private methods, or verify through external means (like querying a database directly instead of using the interface). The warning sign: your test breaks when you refactor, but behavior hasn't changed. If you rename an internal function and tests fail, those tests were testing implementation, not behavior.
15
15
 
16
- See [tests.md](tests.md) for examples and [mocking.md](mocking.md) for mocking guidelines.
16
+ See [tests.md](tests.md) for examples, [mocking.md](mocking.md) for mocking guidelines, and [test-audit.md](test-audit.md) for the value gate every new test must pass and the workflow for auditing existing tests.
17
17
 
18
18
  ## Anti-Pattern: Horizontal Slices
19
19
 
@@ -70,6 +70,8 @@ GREEN: Write minimal code to pass → test passes
70
70
 
71
71
  This is your tracer bullet - proves the path works end-to-end.
72
72
 
73
+ Before writing each test, pass it through the [authoring gate](test-audit.md#authoring-gate): name the behavior it protects, the regression that would break it, why existing coverage doesn't already catch that, and whether it needs a production seam nothing else uses. For a bug fix, the first RED test must fail on the unfixed code for the reason the bug describes.
74
+
73
75
  ### 3. Incremental Loop
74
76
 
75
77
  For each remaining behavior:
@@ -98,12 +100,18 @@ After all tests pass, look for [refactor candidates](refactoring.md):
98
100
 
99
101
  **Never refactor while RED.** Get to GREEN first.
100
102
 
103
+ ## Auditing Existing Tests
104
+
105
+ When asked to review or prune tests rather than write them, follow the [audit workflow](test-audit.md#audit-workflow): read the test, its production owner, and its history first; discover read-only and record evidence per candidate; edit one coherent batch; and keep any test that meets the [retention bar](test-audit.md#retention-bar).
106
+
101
107
  ## Checklist Per Cycle
102
108
 
103
109
  ```
110
+ [ ] Test passes the authoring gate (behavior, regression, not already covered, no test-only seam)
104
111
  [ ] Test describes behavior, not implementation
105
112
  [ ] Test uses public interface only
106
113
  [ ] Test would survive internal refactor
114
+ [ ] Bug fixes only: the regression test failed on the pre-fix code for the intended reason
107
115
  [ ] Code is minimal for this test
108
116
  [ ] No speculative features added
109
117
  ```
@@ -57,3 +57,7 @@ The SDK approach means:
57
57
  - No conditional logic in test setup
58
58
  - Easier to see which endpoints a test exercises
59
59
  - Type safety per endpoint
60
+
61
+ ## Mocks Must Not Prove Themselves
62
+
63
+ A mock stands in for a boundary; it must not implement the behavior the test asserts. If the mock decides the outcome, the test proves the mock. Likewise, do not reuse one identical mock for different APIs, and do not let a fixture supply the ordering, callback, or acknowledgement the code under test is supposed to produce. See the [junk patterns](test-audit.md#junk-patterns).
@@ -0,0 +1,105 @@
1
+ # Test Value and Audits
2
+
3
+ One value bar applies to every test: it must protect observable behavior, a credible regression, or an independently meaningful contract. Use this file in two modes:
4
+
5
+ - **Authoring gate**: before adding or changing a test in a RED step.
6
+ - **Audit**: when asked to review, clean up, or prune an existing test surface.
7
+
8
+ ## Authoring gate
9
+
10
+ Answer all four questions before adding a test. If one has no answer, do not add the test yet.
11
+
12
+ 1. **What does it protect?** Name the observable behavior, invariant, or independent contract.
13
+ 2. **What regression makes it fail?** Describe a credible code change that would break it.
14
+ 3. **Why doesn't existing coverage catch that?** Each contract should have one primary test at the strongest boundary. A second layer needs its own risk, such as a transport or lifecycle failure the primary test cannot reach. Prefer adding a row to a table-driven test or reusing a shared fixture over writing a near-duplicate.
15
+ 4. **Does it need a production seam nothing else uses?** An export, flag, wrapper, or injection hook that exists only for the test is a sign the test sits at the wrong boundary. Move the test to the real boundary instead.
16
+
17
+ Then check it against the [junk patterns](#junk-patterns). A match fails the gate unless the [retention bar](#retention-bar) names the contract the test independently guards.
18
+
19
+ A test that breaks under a behavior-preserving refactor asserts implementation, not behavior. Rewrite it at the owning boundary before landing it.
20
+
21
+ ### Regression tests
22
+
23
+ A bug regression test must fail on the pre-fix code for the intended reason, then pass after the fix. Run it against the unfixed code and read the failure message: a test that never failed proves the mock, not the fix. One regression test at the boundary that owns the bug covers it; do not replay the same scenario at every layer it passes through.
24
+
25
+ ## Junk patterns
26
+
27
+ The authoring gate rejects new tests that match these; audits hunt for existing ones.
28
+
29
+ - Assertion-free coverage probes (the code runs, nothing is checked).
30
+ - Self-comparisons and identity copies (`expect(x).toEqual(x)`, or a value compared with a copy of itself).
31
+ - Copied fixtures, inventories, manifests, or export lists that restate the source.
32
+ - Exact source, import, or string greps standing in for behavior.
33
+ - Private predicate or call-shape tests that duplicate what a real-boundary test already proves.
34
+ - Several invocations of the same contract that differ only in incidental input.
35
+ - Local replays of a shared helper's tests in each caller.
36
+ - Tests whose only job is keeping a test-only export, global, or wrapper alive.
37
+ - Dead production code whose only callers are tests.
38
+ - Expected values computed by the helper or renderer under test.
39
+ - Mocks that implement the behavior being asserted, or one identical mock standing in for different APIs.
40
+ - Fixtures that supply the ordering, callback, or acknowledgement the code under test should produce, or persistence asserted against a store the code never writes.
41
+ - Capability tests that restate a declared flag instead of exercising what the flag promises.
42
+ - Negative tests that pass for an unrelated reason, such as a rejection from a different guard or an error the production path never reaches.
43
+ - Names or fixtures that promise more than the input exercises.
44
+
45
+ ## Retention bar
46
+
47
+ Keep a test when it independently enforces a public API, protocol, config, migration, storage, security, platform, default-value, prompt text, package, release, or architecture contract. Also keep:
48
+
49
+ - Call-order assertions when order is observable behavior.
50
+ - Regressions with a credible failure mode.
51
+ - Source inspection when it is the cheapest independent guard: it fails when the contract changes (a user-facing key, byte, or path) and survives an identifier-only rename.
52
+ - A test that fails on the current baseline. Treat that as a possible product bug: reproduce it and fix the code rather than deleting the test.
53
+
54
+ Static or slow is not a reason to delete. A test that resembles implementation may still be the only guard on a contract; prove otherwise before removing it.
55
+
56
+ ## Audit workflow
57
+
58
+ ### 1. Read before judging
59
+
60
+ Read the root and nearest `AGENTS.md` (or equivalent) first. For each candidate, read the whole test and the production code it covers: its entry point, callers, callees, sibling implementations, overlapping tests, how CI runs it, and the history of why it exists (`git log -S`, `git blame`, linked issues). When a test claims dependency-backed behavior, check the dependency's source or types directly.
61
+
62
+ ### 2. Discover read-only
63
+
64
+ Keep discovery read-only and report evidence before editing anything. For a broad scope, split discovery into parallel lanes (for example core packages, extensions or plugins, apps and scripts, and one cross-cutting sweep for the junk patterns). Prefer a few high-confidence candidates over a large speculative list.
65
+
66
+ ### 3. Record evidence per candidate
67
+
68
+ A candidate is ready for removal only when every field is filled in:
69
+
70
+ - Exact test name and file.
71
+ - What failure it can actually detect.
72
+ - Non-test callers of the production code or seam it covers.
73
+ - The stronger test that still proves the contract, or why no proof is needed.
74
+ - Relevant history and why the test or seam exists.
75
+ - Production or test-support code the removal unlocks.
76
+ - Risk, and the focused command that validates the change.
77
+
78
+ ### 4. Edit one coherent batch
79
+
80
+ Choose one batch that belongs to a single owner. Delete obsolete test-only exports, globals, wrappers, and dead production paths rather than keeping aliases. Move retained regressions to the boundary that owns them. Merge repeated assertions into one table-driven contract.
81
+
82
+ Aim for less production code, not a higher deletion count. Do not write replacement tests that restate the same implementation, and do not turn uncertain candidates into cleanup to inflate the numbers.
83
+
84
+ ### 5. Validate
85
+
86
+ - Do not edit source or tests while the test runner is running in the same checkout.
87
+ - Run the smallest affected test files and their siblings first, then the project's required suites and checks.
88
+ - When a removed test was a source grep or plan assertion, run the script or dry-run that owns the real contract.
89
+ - Run the formatter on changed files and `git diff --check`.
90
+ - Inspect `git diff --numstat` and report production and tooling changes separately from test changes.
91
+
92
+ ### 6. Land and continue
93
+
94
+ Commit, push, or open a PR only when authorized. Land one coherent batch at a time. After it lands, refresh from the main branch and rerun read-only discovery for the next batch.
95
+
96
+ ## Audit handoff
97
+
98
+ Report:
99
+
100
+ - Removed low-value categories and why they were low value.
101
+ - Production code simplified or deleted.
102
+ - Tests that looked removable but were kept, and the contract each one guards.
103
+ - Focused and full checks actually run, with results.
104
+ - Production versus test line counts.
105
+ - PR state and named follow-ups.
@@ -39,10 +39,12 @@ Red flags:
39
39
 
40
40
  - Mocking internal collaborators
41
41
  - Testing private methods
42
- - Asserting on call counts/order
42
+ - Asserting on call counts/order when the order is not observable behavior
43
43
  - Test breaks when refactoring without behavior change
44
44
  - Test name describes HOW not WHAT
45
45
  - Verifying through external means instead of interface
46
+ - Expected values computed by the code under test
47
+ - Setup that hands the code the result it should produce
46
48
 
47
49
  ```typescript
48
50
  // BAD: Bypasses interface to verify
@@ -13448,6 +13448,7 @@ function taskResponseRecords(response, host) {
13448
13448
  async function runAgentTask(input) {
13449
13449
  let yieldWait;
13450
13450
  let pendingYield = false;
13451
+ let parentObserving = input.wait?.kind === "foreground";
13451
13452
  const registered = Promise.withResolvers();
13452
13453
  input.options.modelRoute?.assertCurrent();
13453
13454
  const started = await input.host.startAgentTask({
@@ -13488,11 +13489,13 @@ async function runAgentTask(input) {
13488
13489
  }));
13489
13490
  },
13490
13491
  yieldTaskWait: () => {
13492
+ parentObserving = false;
13491
13493
  if (yieldWait)
13492
13494
  yieldWait("intercom-coordination");
13493
13495
  else
13494
13496
  pendingYield = true;
13495
- }
13497
+ },
13498
+ isParentObserving: () => parentObserving
13496
13499
  }
13497
13500
  });
13498
13501
  if (child.model !== undefined || child.thinking !== undefined)
@@ -13538,6 +13541,7 @@ async function runAgentTask(input) {
13538
13541
  if (!started.ok)
13539
13542
  return { kind: "unstarted", reason: { kind: "rejected", error: started.error } };
13540
13543
  const yieldForIntercom = () => {
13544
+ parentObserving = false;
13541
13545
  if (yieldWait)
13542
13546
  yieldWait("intercom-coordination");
13543
13547
  else
@@ -13553,7 +13557,10 @@ async function runAgentTask(input) {
13553
13557
  registered.resolve();
13554
13558
  });
13555
13559
  registered.resolve();
13556
- const observed = await observation.finally(() => input.options.intercomDetachSignal?.removeEventListener("abort", yieldForIntercom));
13560
+ const observed = await observation.finally(() => {
13561
+ parentObserving = false;
13562
+ input.options.intercomDetachSignal?.removeEventListener("abort", yieldForIntercom);
13563
+ });
13557
13564
  if (!observed.ok)
13558
13565
  throw new Error(`${observed.error.code}: ${observed.error.message}`);
13559
13566
  return { kind: "admitted", observation: observed.value };
@@ -14688,6 +14695,8 @@ function registerExecutionParentAskHandoff(options, state) {
14688
14695
  const handleRequest = (payload) => {
14689
14696
  if (state.isUnavailable() || !isParentAskHandoffRequest(payload))
14690
14697
  return;
14698
+ if (options.taskExecution && !options.taskExecution.isParentObserving())
14699
+ return;
14691
14700
  if (payload.claimed || payload.runId !== options.runId || payload.index !== (options.index ?? 0) || payload.agent !== state.agent || payload.childIntercomTarget !== options.intercomSessionName || payload.orchestratorTarget !== options.orchestratorIntercomTarget)
14692
14701
  return;
14693
14702
  payload.claimed = true;
@@ -17336,7 +17345,8 @@ function parseSubagentNotifyContent(content) {
17336
17345
  // dist/builtin/subagents/src/extension/prompt-guidance.ts
17337
17346
  var DEFAULT_PROMPT_GUIDANCE = [
17338
17347
  `**Subagent orchestration**: Use subagents for focused specialist work inside workflows or as bounded delegation when a workflow would be unnecessary overhead.
17339
- - When the workflow tool is available, decide yourself whether a workflow fits. Prefer one for well-defined work that benefits from durable stages, review loops, recovery or approval gates, and let its stages delegate specialists; work inline for discussion, unclear goals, simple bounded work, or when the user asks to work inline or quickly. Launch with workflow run using the registered workflow name and inputs matching its contract.
17348
+ - Unless the user explicitly chooses inline execution for the specified task, workflows are the default for non-trivial structured work with verifiable objectives; use a workflow for implementation, review, or retry pipelines and let its stages delegate specialists.
17349
+ - When the workflow tool is available, decide yourself whether a workflow fits. Prefer one for well-defined work that benefits from durable stages, review loops, recovery or approval gates; work inline for discussion, unclear goals, tiny deterministic low-risk edits, or when the user asks to work inline or quickly. Judge the task's shape first and refine with execution history and user preferences; no workflow history, or history of only inline runs, does not mean every task should run inline. Launch with workflow run using the registered workflow name and inputs matching its contract.
17340
17350
  - Honor the user's task-scoped execution preferences without hidden/nested workflows or pressure to reapprove. Preserve appropriate testing, review and evidence inline, and unrelated safety and authorization constraints.
17341
17351
  - On a switch from an active workflow to inline, notify the controlling session to safely hold/stop the affected run, reconcile completed work and in-flight side effects, then continue inline without duplicate execution. Do not claim completed work was undone.
17342
17352
  - Use a single subagent for a focused specialty or parallel tasks for independent work. Keep substantial-overlap tasks together rather than duplicating investigation across agents.
@@ -4,6 +4,19 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.9.20] - 2026-09-24
8
+
9
+ ### Fixed
10
+
11
+ - Video and YouTube subprocess extraction now runs in Node-hosted SDK sessions as well as the compiled binary, with bounded output, cancellation and awaited child cleanup ([#3105](https://github.com/bastani-inc/atomic/issues/3105)).
12
+ - SDK sessions sharing a resource loader now retain separate web result stores and pending-fetch/curator state, so closing or restoring one session does not erase another's results or cancel its pending content notification ([#3105](https://github.com/bastani-inc/atomic/issues/3105)).
13
+ - SDK sessions now keep separate provider configuration caches and GitHub clones, so one session's cache cleanup does not delete another session's cloned files ([#3105](https://github.com/bastani-inc/atomic/issues/3105)).
14
+ - Operational web diagnostics within SDK-owned work now use the session's diagnostic sink with redacted messages instead of printing credentials, paths or remote errors to console ([#3105](https://github.com/bastani-inc/atomic/issues/3105)).
15
+ - Timeout, cancellation and output-limit failures no longer hang when subprocess descendants keep output pipes open; cleanup preserves the original error.
16
+ - Local video extraction recognizes Windows drive and UNC paths and converts file URLs using the host's native path rules.
17
+ - `code_search` now shows the repository name and query while the call is pending, before an answer arrives.
18
+ - `loadConfig` now resolves the readable web-search config path on every call instead of once at module load, so `/curator on` and other `saveConfig` writes to `~/.atomic/web-search.json` take effect immediately when Atomic started with only the legacy `~/.pi/web-search.json` ([#3058](https://github.com/bastani-inc/atomic/issues/3058)).
19
+
7
20
  ## [0.9.20-alpha.4] - 2026-09-20
8
21
 
9
22
  ### Fixed
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bastani/web-access",
3
- "version": "0.9.20-alpha.8",
3
+ "version": "0.9.20",
4
4
  "private": true,
5
5
  "description": "Atomic extension for web search, URL fetching, GitHub repo cloning, PDF/video extraction. Fork of: https://github.com/nicobailon/pi-web-access",
6
6
  "contributors": [
@@ -6,6 +6,175 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.9.20] - 2026-09-24
10
+
11
+ ### Breaking Changes
12
+
13
+ - Removed the public `workflowDependency()` SDK function and its report/operation types, `/workflow dependency`, and the workflow tool's `dependency` action. Inspect affected runs with workflow status; managed PostgreSQL recovery is automatic.
14
+ - Removed the `workflow` tool's `route` action and its router classifier. The agent now decides itself whether a workflow fits and launches with `workflow({ action: "run", workflow: "<name>", inputs, budget? })`. The `workflowId` reservation, `state` parameter, `routerDecision`, `estimatedDuration` labels, and `needs_input`/`not_launched`/`reserved` statuses are gone; `run` validates inputs and fails without launching when they are invalid. Runs launched through the model tool still belong to the launching session.
15
+ - Workflow route `state` no longer accepts `executionPreference`, and unknown state fields are rejected before inference. The router now asks an independent question about the user's stated execution preference, judged from the user's own words in `state.task`, `state.conversation` and `state.constraints`: an explicit inline request yields `none` even when a workflow matches, and an explicit workflow request bypasses the lifecycle-benefit gate without inventing an unregistered workflow. The calling assistant passes evidence only, so it can no longer pre-decide the route.
16
+ - The `open-claude-design` workflow output `playwright_cli_status` is now `agent_browser_status`: the initial deterministic setup step probes for and installs the `agent-browser` CLI (`npm install -g agent-browser` + `agent-browser install`) instead of `playwright-cli`. Consumers reading `playwright_cli_status` must switch to the new field name.
17
+ - Headless launches return an accepted run identity for status inspection, without input pickers. Required durable gates remain pending until an authorized host or answer arrives, including when no host was initially bound. Explicit runtime execution policies remain enforced ([#3105](https://github.com/bastani-inc/atomic/issues/3105)).
18
+ - Model-tool execution now requires `route` with content-bearing `state.task`, then `run` with the returned registered `workflowId` and validated inputs. Route returns the input schema without launching; input correction reuses the ID without rerouting. Old run-as-router calls and duration values are rejected. Estimates use 97 canonical labels: quarter-hour increments through `1d`, plus `>1d`, without changing budgets ([#3106](https://github.com/bastani-inc/atomic/issues/3106)).
19
+ - Workflow route and registered run results no longer repeat `estimatedDuration` at the top level. Route results also no longer repeat `workflowType`, including `none`. Read the canonical estimate and selection from `routerDecision.estimatedDuration` and `routerDecision.workflowType`.
20
+ - Workflow duration estimates no longer accept `unknown`. Routers must give their best estimate using a quarter-hour bucket or `>1d`; estimates remain nonbinding.
21
+
22
+ ### Added
23
+
24
+ - SDK `run()` accepts a `durability` option: `{ mode: "memory" }` for a throwaway in-memory run, or `{ mode: "durable", systemDatabaseUrl? }` to require durable state and optionally choose the Postgres database, such as a hosted one. Explicit `durable` mode fails fast with the new `WorkflowDurabilityRequiredError` instead of falling back to memory ([#3239](https://github.com/bastani-inc/atomic/issues/3239)). `DBOS_SYSTEM_DATABASE_URL` still overrides `systemDatabaseUrl` when set. Omitting the option keeps today's behavior.
25
+ - Added `workflowDependency()`, `/workflow dependency` and the workflow tool's `dependency` action for bounded database inspection and registered managed-cluster recovery, with actual port, verified identity, runtime versions, consumers, retained latest failure and safe guidance. External database endpoints receive query-only checks ([#3074](https://github.com/bastani-inc/atomic/issues/3074)).
26
+ - Workflow UUID selectors accept unique 8-character hexadecimal prefixes across live and durable runs, with explicit collision errors ([#2603](https://github.com/bastani-inc/atomic/issues/2603)).
27
+ - Attached stage chats show `[stage: name]` on the composer top rule, a mounted question's top rule, and awaiting-input prompt borders ([#2886](https://github.com/bastani-inc/atomic/issues/2886), [#3013](https://github.com/bastani-inc/atomic/pull/3013) by [@sumitvairagar](https://github.com/sumitvairagar)).
28
+ - Added live, bounded pending-input previews to the BACKGROUND widget, with per-workflow navigation and automatic clearing ([#2700](https://github.com/bastani-inc/atomic/pull/2700) by [@Shreyasd10](https://github.com/Shreyasd10)).
29
+ - Added mandatory bounded routing before model-tool workflow launches, using explicit task state and the full current workflow catalog. Results show validated workflow/budget decisions as formatted JSON; `none` directs the caller to continue inline without launching, and changed registry approvals fail before admission. Routing context containing known configured credentials is rejected before either provider receives it. User `/workflow` commands and authored composition bypass the gate ([#3089](https://github.com/bastani-inc/atomic/issues/3089)).
30
+ - Added prompt-based workflow-stage `model: "auto"` selection for stages, chains, and parallel tasks, with hard model constraints, shared router settings, and retained selection metadata across fallback and resume.
31
+ - Workflow input and durable approvals can use SDK human-input callbacks without terminal rendering, including nested stage questionnaires with original previews, selections and notes. Pending approvals survive host withdrawal and can be re-presented or resumed under another host without accepting stale answers ([#3105](https://github.com/bastani-inc/atomic/issues/3105)).
32
+
33
+ ### Changed
34
+
35
+ - The agent again treats workflows as the default for non-trivial work with structure and a verifiable objective. Its guidance names the tasks that fit a workflow (implementation, bug fixes, debugging, migrations, multi-file changes with validation), treats "until" wording such as "fix until green" as a strong workflow signal, and maps task shapes to the pattern workflows. Only tiny, low-risk answers or edits, conversation, unclear goals, or an explicit request to work inline or quickly stay inline.
36
+ - Workflow selection guidance now tells the agent that missing, sparse, or mostly inline workflow history is not by itself a reason to work inline; it judges the task's shape first and refines with execution history and your preferences.
37
+ - Managed PostgreSQL startup now verifies retained runtime files from a sealed completion manifest instead of re-reading every binary on each attach. Existing marker-less generations remain usable after one verification.
38
+ - Managed PostgreSQL can reuse one retained runtime across cluster homes with `ATOMIC_POSTGRES_RUNTIME_CACHE_DIR`; a persisted source stat index avoids repeated full-package hashing on unchanged installations.
39
+ - Managed PostgreSQL now avoids repeated runtime-tree scans for npm-installed binaries and running-server attaches; starting or repairing a server still checks the complete retained runtime.
40
+ - Managed PostgreSQL runtime repair now rejects incomplete retained generations without scanning their full file trees, and avoids rescanning unchanged damaged generations during the same process.
41
+ - Managed PostgreSQL cold runtime staging now avoids repeated setup-lock disk operations during copying and hashing, reducing startup time while preserving publication fencing.
42
+ - Managed PostgreSQL now rotates server logs daily through seven weekday files under the cluster's `log` directory, retaining startup diagnostics in `v18.log`. Startup failures include recent output from both logs.
43
+ - Durable workflow status changes now verify their transition claim without loading unrelated checkpoint outputs; pause and quit still retain the same ownership and prompt-state checks.
44
+ - `/workflow resume` picker rows now use the full workflow ID as their searchable primary label, with status, progress and workflow name beside it so status and progress remain visible at typical terminal widths.
45
+ - Generalized the prompt-engineering GPT-6 guide (`references/gpt_6.md`, formerly `gpt_6_astra.md`) to cover GPT-6 Sol and Luna, and replaced its paraphrased snippets with OpenAI's official GPT-6 prompt templates for follow-through, approval timing, skill-instruction priority, writing style, delegation, and verification.
46
+ - Focused every prompt-engineering model guide on prompts: removed API request settings such as beta headers, output-token limits, sampling parameters, tool-choice values, API paths, and pricing, while keeping prompt-ordering and caching guidance.
47
+ - Added source-attributed Claude Opus 5.5 guidance to the prompt-engineering skill, covering effort calibration, always-on thinking, progress visibility, bounded unattended completion, and API migration checks.
48
+ - Reworked all nine prompt-engineering model guides around observed behaviors, practical prompt adjustments, adaptable examples, and caveats, with API details kept secondary.
49
+ - `/new`, `/fork`, and `/resume` now quit running workflows instead of leaving them detached from the session that launched them, where their next stage would later fail. When workflows are running, Atomic first asks "Quit N running workflows and …?" and explains that each stops at its last checkpoint and can be resumed with `/workflow resume`; declining cancels the command and the runs keep going. Without an interactive UI the switch proceeds and the runs are quit the same way. `/reload` still keeps runs executing ([#3203](https://github.com/bastani-inc/atomic/issues/3203)).
50
+ - Goal and Ralph end-to-end verification guidance and the workflow-authoring guidance now direct desktop, simulator, and emulator verification to Cua Driver: builtin stages load the bundled `cua-driver` skill and drive the exact window with `cua-driver call <tool>` under `CUA_DRIVER_RS_TELEMETRY_ENABLED=false`, save `get_window_state` JSON and `screenshot_out_file` images as evidence, and report a missing permission, session, or refused install as `blocked`/`needs_human` with exact remediation; custom workflows run code-owned scenarios with the `@trycua/cua-driver` SDK inside `ctx.tool` with `timeoutMs` and `signal`, after a preflight `ctx.tool` that exits `blocked` on missing permissions. The OpenAI CUA sample-app reference was removed ([#3181](https://github.com/bastani-inc/atomic/issues/3181)).
51
+ - `/workflow connect <run>` no longer prints a `Connected to <run-id>. h hide · ctrl+x leave graph …` notice into the chat; the graph overlay already shows its own key hints, and the picker path never printed one.
52
+ - Builtin workflow prompts (`open-claude-design`, `ralph`, goal orchestration, verification guidance, and workflow authoring guidance) now direct browser verification and evidence capture to the `agent-browser` skill and CLI instead of `playwright-cli`, including `agent-browser record start`/`record stop` for QA proof videos.
53
+ - Synchronized the bundled `impeccable` skill from upstream `skill-v4.1.1` (`5a149f3fdb1b5793f10567233b1dcab98fc305fd`, `.agents` distribution) to `skill-v4.3.1` (`cd12f8660e2dde57b9615c8a6b8ea674101f9cfc`, `.pi` distribution, engine 0.1.5). Every command now runs through the launcher at `scripts/impeccable` (`impeccable.cmd` on Windows), which executes a self-contained engine binary beside it or downloads the pinned release for the current platform into `~/.impeccable/bin/<version>/` and verifies it against the published SHA-256 before the first run; Node is no longer required, and `IMPECCABLE_BIN` selects a preinstalled engine where network access is unavailable. The launchers default `IMPECCABLE_NO_TELEMETRY` and `IMPECCABLE_NO_UPDATE_CHECK` on, keeping the concept-roll ping and the `npx impeccable update` prompt off for a skill that ships with each Atomic release, and the retained live-browser helpers keep their CSPRNG session-id hardening and removed-editor stripping.
54
+ - The `open-claude-design` live review loop drives the bundled Impeccable launcher's `live-poll` verb instead of the removed `live-poll.mjs` script, running `impeccable.cmd` through the platform shell on Windows.
55
+ - Workflow authoring guidance now describes stages in one invocation as peers: a live stage can `intercom list` its siblings and `send`/`ask` them directly, queue `send` to a known pending sibling, and `ask` a completed sibling that retains a valid conversation, with prompts expected to name the peers, bound the exchange, and keep each stage's structured result its own.
56
+ - All builtin workflow model stages now default to `model: "auto"`, including composed child runs, scoring, reviews and final handoffs. Removed pinned fallback chains while preserving explicit tournament model assignments and custom-workflow defaults.
57
+ - Automatic stage model selection ranks up to three distinct eligible models, trying them before remaining configured fallbacks. Durable checkpoints retain the ordered candidates and their efforts without rerouting on resume.
58
+ - Workflow model-pinning guidance now treats `evals.md` as factual per-evaluation records and leaves unmatching catalogs unpinned instead of describing benchmark rows as recommendations.
59
+ - Automatic stage model selection now receives `evals.md` as markdown tables of dated benchmark records.
60
+ - Workflow run displays show only stage execution duration, without redundant startup timing rows. Startup diagnostics remain available through the workflow tool's `stage` and `stages` actions.
61
+
62
+ ### Fixed
63
+
64
+ - Durable workflows work again on Ubuntu and Debian with the default umask 002. Atomic had refused its own group-writable `~/.atomic` as an ancestor of the PostgreSQL runtime cache and ran workflows in memory, so runs couldn't be resumed after closing Atomic. A group-writable folder is now accepted when its group is your private group: no other account in `/etc/passwd` uses it as its primary group, and `/etc/group` lists no member other than you. World-writable folders and shared groups are still rejected.
65
+ - DBOS no longer launches without its migration lock. Previously, when another process held the lock for more than 60 seconds, or the lock connection or query failed, Atomic launched anyway. Two processes could then migrate the same fresh workflow database at once and fail with duplicate-key errors. Atomic now retries lock contention for up to 60 seconds and reopens a failed or dropped lock connection with increasing delays, as Flyway does. If it still has no lock, launch fails with a clear error instead of running unlocked.
66
+ - Fixed workflow durability being disabled after upgrading from 0.9.10–0.9.19: Atomic now registers the embedded Postgres cluster that older Atomic provisioned instead of refusing it. If that first start fails, the cluster is left unregistered and checked again on the next startup ([#3235](https://github.com/bastani-inc/atomic/issues/3235)).
67
+ - Managed PostgreSQL now runs from a retained runtime outside development worktrees. If that runtime is damaged, reinstalling a complete healthy package lets automatic recovery select a verified replacement, including the same version, even when new database connections are impossible or the server has already exited. Replacement selection now recognizes an in-place repair of a previously incomplete package without requiring a version or path change. A running server's process identity must verify before shutdown; identity mismatches or corruption still require investigation, and Atomic preserves the database.
68
+ - Transient PostgreSQL monitoring connection failures no longer interrupt workflow shutdown when a fresh health probe confirms the same server is healthy.
69
+ - Fixed managed PostgreSQL recovery refusing to stop its own verified server when PostgreSQL takes more than three seconds after process creation to write its pidfile. A process created after the recorded PostgreSQL start remains ineligible for shutdown.
70
+ - Windows managed PostgreSQL recovery now holds a verified process handle through shutdown, preventing PID reuse from directing a signal to an unrelated process.
71
+ - Fixed `run()` from `@bastani/atomic/workflows` throwing `DbosNotReadyError` when called from a standalone SDK application. It now starts workflow durability itself and shuts it down after the run, unless another Atomic session in the same process is still using it.
72
+ - Fixed workflow durability failing to start when several Atomic sessions or SDK applications first used the same new database at once. The losing processes failed with a duplicate-key or deadlock error during database setup and fell back to memory, or with explicit `durable` mode, failed. Processes now take turns setting up the database.
73
+ - Reduced CPU use of the workflow graph view while stages are running: rows that did not change between animation frames are no longer re-measured, truncated, or re-padded on every frame.
74
+ - A workflow run that stays in flight across a preserving host `/reload` can now create stages after the reload. Stage session creation and the stage model catalog resolve the newest live extension generation instead of the retired launch `pi` and command ctx, so the next stage no longer fails with `This extension ctx is stale after session replacement or reload` and no longer falls back to `workflows: model catalog unavailable` ([#3201](https://github.com/bastani-inc/atomic/issues/3201)).
75
+ - A Goal run with `create_pr=true` could never be resumed after its `pull-request` stage failed with a recoverable error. Every resume failed with `insufficient_state: replay topology mismatch for stage "pull-request"` yet still reported `resumable: true`. On resume, Goal reloads its persisted ledger, which already recorded the approving review round as `complete`, so the turn loop was skipped and `pull-request` ran without its reviewer parents. Goal now replays the turns recorded in a reloaded ledger from their durable checkpoints, so the resume re-executes only the failed stage ([#3207](https://github.com/bastani-inc/atomic/issues/3207)).
76
+ - Resuming a Goal run no longer duplicates its ledger history. A replayed turn (one the reloaded ledger already recorded) appended another reducer decision, lifecycle events, a convergence record and reverification entries for the same turn, so the ledger and the final PR report showed repeated history after a resume. Replayed turns are now read-only for the ledger; only live turns append and persist new outcomes ([#3207](https://github.com/bastani-inc/atomic/issues/3207)).
77
+ - A workflow stage with `model: "auto"` no longer fails when routing inference fails completely (Jev and the chat structured-output fallback both). The stage now runs on the current chat model with a recorded warning, on fresh runs and resumes alike, when that model is available and satisfies every routing constraint; validation, eligibility, credential-screening failures and cancellation still fail the stage ([#3206](https://github.com/bastani-inc/atomic/issues/3206)).
78
+ - Docker fallback Postgres is no longer treated as ready when the published port accepts TCP during `initdb`. Atomic waits for a PostgreSQL query using the endpoint, credentials and TLS settings DBOS will use, retries transient startup resets and refusals (including a connection that terminates while the container is still starting), and shuts down a failed DBOS executor before continuing with the in-memory backend. Invalid readiness ports now fail before connecting rather than leaving a delayed process-crashing error.
79
+ - Failed DBOS executor cleanup no longer permits a second launch or an in-memory fallback with unconfirmed executor ownership; startup reports the initialization and cleanup errors instead.
80
+ - New Docker fallback containers now publish on the configured `PGPORT`, matching the readiness probe and DBOS connection instead of always binding host port 5432.
81
+ - A schema-backed workflow stage whose prompt resolves without any assistant message is no longer recorded as a successful model attempt and pushed into `structured_output` correction prompts. The empty completion is now classified as a transient provider failure at the execution layer: it is retried on the same model using the configured `settings.retry` budget, then advances to the next configured fallback, and its attempt record carries `Model turn ended without an assistant message after the prompt (empty completion)` instead of the structured-output contract error. Genuine cancellation during such a turn stops both the retries and the fallback chain, and corrective prompts remain reserved for turns that actually answered without calling the tool ([#3164](https://github.com/bastani-inc/atomic/issues/3164)).
82
+ - An abandoned, owner-less embedded Postgres setup-lock directory (`~/.atomic/postgres/v<major>.setup-lock`, for example a legacy empty-directory lock or a crash remnant) now expires once it is older than the stale threshold, so Atomic recovers embedded provisioning instead of waiting ~30 s for a nonexistent owner and falling back to the non-durable in-memory backend. A freshly created empty directory, a future-dated one, and a live heartbeat owner remain protected ([#3135](https://github.com/bastani-inc/atomic/issues/3135)).
83
+ - An embedded Postgres setup-lock creator that is suspended between creating the lock directory and writing its owner marker can no longer end up holding a lease alongside a contender that expired and replaced the empty directory in the meantime. The creator now confirms its marker is the directory's only entry after writing it, and backs off as a lost race otherwise, so two Atomic processes cannot initialize or start the same data directory concurrently.
84
+ - After DBOS initialization, bound database-dependent root admission to 10 seconds and stop cancelled admission writes from retrying or starting workflow code later. Unavailable admission skips database cleanup, preserving the failure diagnostic and run identity even when PostgreSQL stops answering. Database readiness lost during admission is rechecked before the next admission without switching existing durable runs to memory. First-time provisioning and initialization are outside this bound ([#3072](https://github.com/bastani-inc/atomic/issues/3072)).
85
+ - Malformed saved workflow topology is non-resumable. Rejection during root admission returns a failed run result without executing workflow code or hiding database write failures ([#3072](https://github.com/bastani-inc/atomic/issues/3072)).
86
+ - Timed-out or cancelled workflow resume admission no longer publishes stale ownership metadata when its database operation finishes late ([#3072](https://github.com/bastani-inc/atomic/issues/3072)).
87
+ - Database-rejected workflow admission preserves PostgreSQL authentication and permission diagnostics and removes a never-persisted local run without reporting it as still running ([#3072](https://github.com/bastani-inc/atomic/issues/3072)).
88
+ - Resume continuations skip cleanup when database admission is unavailable, leaving the source resumable instead of waiting on the failed database ([#3072](https://github.com/bastani-inc/atomic/issues/3072)).
89
+ - Cancellation during admission now retires a possibly committed database record without waiting on the abandoned admission write, including a checkpointed continuation whose resume has not finished. Failed cancellation persistence retains the local cancelled outcome and warns that database state is unknown ([#3072](https://github.com/bastani-inc/atomic/issues/3072)).
90
+ - Graceful quit during startup admission acknowledges the local stop immediately without waiting for registration. Registration settlement retains its admission deadline, including when a local kill arrives while registration finishes. Settlement failures appear in run status while preserving the local pause and resumability for continuations with saved durable progress. Runs without usable durable progress remain nonresumable ([#3072](https://github.com/bastani-inc/atomic/issues/3072)).
91
+ - Pausing during startup acknowledges immediately and retains the live executor without waiting for database admission. Later admission failures retain their original diagnostic in run status, and resume releases the failed attempt instead of leaving it stuck behind a rejected pause ([#3072](https://github.com/bastani-inc/atomic/issues/3072)).
92
+ - Report root admission phases, dependency errors, phase age, and last progress without healthy-running heartbeats during blocked admission. Bound live executor control persistence, distinguish observed from durable acknowledgements, and retain paused admission for explicit same-owner recovery ([#3072](https://github.com/bastani-inc/atomic/issues/3072)).
93
+ - Live executor resume allows up to 10 seconds for database confirmation instead of using the 500ms pause acknowledgement budget, avoiding false timeouts on healthy remote PostgreSQL connections ([#3072](https://github.com/bastani-inc/atomic/issues/3072)).
94
+ - Live executor pause acknowledges within 500ms while database confirmation continues for up to 10 seconds. Healthy slower connections no longer leave a false dependency failure; status updates to durable when confirmation succeeds ([#3072](https://github.com/bastani-inc/atomic/issues/3072)).
95
+ - Keep ready embedded PostgreSQL running when its starter exits or reloads, retain shared cluster identity and consumer leases outside installation directories, and preserve the original provider's cleanup across bundle reloads ([#3074](https://github.com/bastani-inc/atomic/issues/3074)).
96
+ - Verify managed PostgreSQL SQL/data/process identity before attachment, support `ATOMIC_POSTGRES_PORT`, and atomically share the actual port after bounded start/bind retries without adopting foreign listeners or unregistered data ([#3074](https://github.com/bastani-inc/atomic/issues/3074)).
97
+ - Monitor managed PostgreSQL SQL/process identity after attachment, invalidate lost connections, elect a shared recovery starter with bounded retries, and reconnect existing database consumers without relaunching workflow execution or changing external database endpoints ([#3074](https://github.com/bastani-inc/atomic/issues/3074)).
98
+ - Pool acquisition timeouts and PostgreSQL connection-capacity refusals, including refused managed health checks, no longer disconnect unrelated healthy database consumers or trigger managed PostgreSQL recovery ([#3074](https://github.com/bastani-inc/atomic/issues/3074)).
99
+ - Explicit resume reconciles retained database-failed admission under the original run ID, refuses conflicting incomplete records, and prevents stale concurrent resume from claiming a newer running generation. Awaited checkpoint writes now have a 10-second deadline; recovery rereads committed receipts rather than repeating checkpointed effects. External effects without a saved checkpoint remain uncertain and may repeat ([#3072](https://github.com/bastani-inc/atomic/issues/3072), [#3074](https://github.com/bastani-inc/atomic/issues/3074)).
100
+ - Same-ID database recovery remains retryable when resume preparation fails after reconciliation, including a temporarily missing workflow definition. Retried resume preserves saved tool receipts instead of switching to a new continuation ([#3072](https://github.com/bastani-inc/atomic/issues/3072)).
101
+ - Managed PostgreSQL recovery no longer waits on a vanished server when shutdown overlaps a health check. Recovery retains the existing cluster and checkpoints instead of exhausting readiness polling against the old process ([#3074](https://github.com/bastani-inc/atomic/issues/3074)).
102
+ - Managed PostgreSQL startup no longer rejects an owned server when initialization crosses a second boundary. Identity failures now identify the mismatched fields while preserving the cluster and ownership records ([#3074](https://github.com/bastani-inc/atomic/issues/3074)).
103
+ - Stage-scoped durable resume now refuses before dispatch instead of resuming the whole root, including restored local shadows of paused durable runs, and prefix resume no longer treats nested children as root candidates ([#2603](https://github.com/bastani-inc/atomic/issues/2603)).
104
+ - Request-auth preparation timeouts now block as recoverable `auth_timeout` with source-neutral guidance, instead of asking for `/login`. Established login failures still use `login_required` ([#3087](https://github.com/bastani-inc/atomic/pull/3087)).
105
+ - The BACKGROUND panel stays mounted across top-level `/reload` while a run is still awaiting input; status and connect keep targeting the same pending prompt ([#2529](https://github.com/bastani-inc/atomic/issues/2529)).
106
+ - Combining-only pending prompts no longer receive a quoted BACKGROUND preview; they keep general needs-attention guidance ([#2529](https://github.com/bastani-inc/atomic/issues/2529)).
107
+ - Jev launch routing now supports catalogs above 255 choices through bounded tournaments, retaining `none` in the final comparison and preserving exact user budgets. Partial batch results never authorize a launch ([#3089](https://github.com/bastani-inc/atomic/issues/3089)).
108
+ - Fixed workflow routing with strict-schema providers such as Codex when budget limits are omitted or partially supplied, preserving exact limits and zero values without introducing null fields.
109
+ - Workflow selection and automatic stage-model selection allow an initial attempt plus up to three repairs for malformed or schema-invalid answers, within the original decision deadline. Authentication/provider errors, cancellation and stale catalogs remain terminal; repairs never duplicate admission.
110
+ - Workflow startup no longer removes the default `ask_user_question` tool in headless sessions. Without a UI, execution still returns the existing `no_ui` refusal ([#3105](https://github.com/bastani-inc/atomic/issues/3105)).
111
+ - SDK workflow discovery and project configuration now follow the session's working directory rather than the process working directory ([#3105](https://github.com/bastani-inc/atomic/issues/3105)).
112
+ - Stage sessions inherit SDK configuration, callbacks and capability restrictions before startup. Questionnaires retain the originating child identity and stay pending through host withdrawal; tool suppression also removes Intercom group access without restoring recursive workflow tooling ([#3105](https://github.com/bastani-inc/atomic/issues/3105)).
113
+ - Awaited SDK disposal now drains the owning host's workflow stages and persistence before releasing its runtime resources. Closing or reloading one host no longer clears a sibling host's runs, including separate loaders sharing a caller-supplied event bus; bus sharing does not transfer lifecycle ownership. Borrowed durability backends remain caller-owned ([#3105](https://github.com/bastani-inc/atomic/issues/3105)).
114
+ - Borrowed resource discovery no longer acquires a durability lease before session startup. Final cleanup releases the last started owner's lease even when outgoing session retirement fails ([#3105](https://github.com/bastani-inc/atomic/issues/3105)).
115
+ - Builtin classifier and category-action stages now retain Intercom coordination without overriding caller-disabled tools or packages.
116
+ - Overlapping SDK workflow owners now answer and withdraw questionnaires through their own session's broker rather than a sibling's.
117
+ - Retain registered model-tool instance ownership across reload and durable recovery, authorize normalized/default/bulk lifecycle targets before inspection or mutation, and enforce explicit inline preferences even against contrary routing judgments ([#3106](https://github.com/bastani-inc/atomic/issues/3106)).
118
+ - Workflow `route` results now display their structured output in a rounded `WORKFLOW ROUTE` box, including inline decisions and routing failures.
119
+ - Removed the redundant `ROUTER DECISION` box from workflow `run` output while preserving run status and identity.
120
+ - Workflow node model labels now update immediately when a session applies a fallback, including successive fallbacks, without refreshing the graph ([#3110](https://github.com/bastani-inc/atomic/issues/3110)).
121
+ - Reduced workflow routing context by sending each workflow contract only with its candidate and preserving exact budgets in code. Verbose catalogs now split into bounded comparisons; oversized task context uses automatic chat fallback or fails when Jev is explicitly pinned, without changing route/run reservations.
122
+ - Cold-start workflow stages wait for acknowledged Intercom route authority before connecting, preventing spurious ownership and heavy-initialization failures without weakening route ownership checks.
123
+ - Completed stages retain their original start, end, and duration through workflow resume and repeated replay, without rerunning completed work or displaying missing legacy timing as a new zero-duration execution ([#3038](https://github.com/bastani-inc/atomic/issues/3038)).
124
+ - Explicit workflow resume now initializes durability in a fresh CLI session instead of silently failing before dispatch, and reports initialization failures ([#3038](https://github.com/bastani-inc/atomic/issues/3038)).
125
+
126
+ ### Removed
127
+
128
+ - The bundled Impeccable skill no longer ships its Node `scripts/*.mjs` helpers, `scripts/detector/`, `scripts/live/`, `scripts/lib/`, or the Codex-only `agents/` definitions; upstream 4.3.1 moved that logic into the engine binary and the `.pi` distribution carries no Codex agent files.
129
+
130
+ ## [0.9.20-alpha.12] - 2026-09-24
131
+
132
+ ### Changed
133
+
134
+ - The agent again treats workflows as the default for non-trivial work with structure and a verifiable objective. Its guidance names the tasks that fit a workflow (implementation, bug fixes, debugging, migrations, multi-file changes with validation), treats "until" wording such as "fix until green" as a strong workflow signal, and maps task shapes to the pattern workflows. Only tiny, low-risk answers or edits, conversation, unclear goals, or an explicit request to work inline or quickly stay inline.
135
+
136
+ ## [0.9.20-alpha.11] - 2026-09-24
137
+
138
+ ### Changed
139
+
140
+ - Workflow selection guidance now tells the agent that missing, sparse, or mostly inline workflow history is not by itself a reason to work inline; it judges the task's shape first and refines with execution history and your preferences.
141
+
142
+ ### Fixed
143
+
144
+ - Durable workflows work again on Ubuntu and Debian with the default umask 002. Atomic had refused its own group-writable `~/.atomic` as an ancestor of the PostgreSQL runtime cache and ran workflows in memory, so runs couldn't be resumed after closing Atomic. A group-writable folder is now accepted when its group is your private group: no other account in `/etc/passwd` uses it as its primary group, and `/etc/group` lists no member other than you. World-writable folders and shared groups are still rejected.
145
+ - DBOS no longer launches without its migration lock. Previously, when another process held the lock for more than 60 seconds, or the lock connection or query failed, Atomic launched anyway. Two processes could then migrate the same fresh workflow database at once and fail with duplicate-key errors. Atomic now retries lock contention for up to 60 seconds and reopens a failed or dropped lock connection with increasing delays, as Flyway does. If it still has no lock, launch fails with a clear error instead of running unlocked.
146
+
147
+ ## [0.9.20-alpha.9] - 2026-09-24
148
+
149
+ ### Breaking Changes
150
+
151
+ - Removed the public `workflowDependency()` SDK function and its report/operation types, `/workflow dependency`, and the workflow tool's `dependency` action. Inspect affected runs with workflow status; managed PostgreSQL recovery is automatic.
152
+
153
+ ### Added
154
+
155
+ - SDK `run()` accepts a `durability` option: `{ mode: "memory" }` for a throwaway in-memory run, or `{ mode: "durable", systemDatabaseUrl? }` to require durable state and optionally choose the Postgres database, such as a hosted one. Explicit `durable` mode fails fast with the new `WorkflowDurabilityRequiredError` instead of falling back to memory ([#3239](https://github.com/bastani-inc/atomic/issues/3239)). `DBOS_SYSTEM_DATABASE_URL` still overrides `systemDatabaseUrl` when set. Omitting the option keeps today's behavior.
156
+
157
+ ### Changed
158
+
159
+ - Managed PostgreSQL startup now verifies retained runtime files from a sealed completion manifest instead of re-reading every binary on each attach. Existing marker-less generations remain usable after one verification.
160
+ - Managed PostgreSQL can reuse one retained runtime across cluster homes with `ATOMIC_POSTGRES_RUNTIME_CACHE_DIR`; a persisted source stat index avoids repeated full-package hashing on unchanged installations.
161
+ - Managed PostgreSQL now avoids repeated runtime-tree scans for npm-installed binaries and running-server attaches; starting or repairing a server still checks the complete retained runtime.
162
+ - Managed PostgreSQL runtime repair now rejects incomplete retained generations without scanning their full file trees, and avoids rescanning unchanged damaged generations during the same process.
163
+ - Managed PostgreSQL cold runtime staging now avoids repeated setup-lock disk operations during copying and hashing, reducing startup time while preserving publication fencing.
164
+ - Managed PostgreSQL now rotates server logs daily through seven weekday files under the cluster's `log` directory, retaining startup diagnostics in `v18.log`. Startup failures include recent output from both logs.
165
+ - Durable workflow status changes now verify their transition claim without loading unrelated checkpoint outputs; pause and quit still retain the same ownership and prompt-state checks.
166
+ - `/workflow resume` picker rows now use the full workflow ID as their searchable primary label, with status, progress and workflow name beside it so status and progress remain visible at typical terminal widths.
167
+
168
+ ### Fixed
169
+
170
+ - Fixed workflow durability being disabled after upgrading from 0.9.10–0.9.19: Atomic now registers the embedded Postgres cluster that older Atomic provisioned instead of refusing it. If that first start fails, the cluster is left unregistered and checked again on the next startup ([#3235](https://github.com/bastani-inc/atomic/issues/3235)).
171
+ - Managed PostgreSQL now runs from a retained runtime outside development worktrees. If that runtime is damaged, reinstalling a complete healthy package lets automatic recovery select a verified replacement, including the same version, even when new database connections are impossible or the server has already exited. Replacement selection now recognizes an in-place repair of a previously incomplete package without requiring a version or path change. A running server's process identity must verify before shutdown; identity mismatches or corruption still require investigation, and Atomic preserves the database.
172
+ - Transient PostgreSQL monitoring connection failures no longer interrupt workflow shutdown when a fresh health probe confirms the same server is healthy.
173
+ - Fixed managed PostgreSQL recovery refusing to stop its own verified server when PostgreSQL takes more than three seconds after process creation to write its pidfile. A process created after the recorded PostgreSQL start remains ineligible for shutdown.
174
+ - Windows managed PostgreSQL recovery now holds a verified process handle through shutdown, preventing PID reuse from directing a signal to an unrelated process.
175
+ - Fixed `run()` from `@bastani/atomic/workflows` throwing `DbosNotReadyError` when called from a standalone SDK application. It now starts workflow durability itself and shuts it down after the run, unless another Atomic session in the same process is still using it.
176
+ - Fixed workflow durability failing to start when several Atomic sessions or SDK applications first used the same new database at once. The losing processes failed with a duplicate-key or deadlock error during database setup and fell back to memory, or with explicit `durable` mode, failed. Processes now take turns setting up the database.
177
+
9
178
  ## [0.9.20-alpha.8] - 2026-09-22
10
179
 
11
180
  ### Fixed
@@ -5,7 +5,7 @@
5
5
  An open-source Atomic workflow extension: install it, author workflows in TypeScript, run them from chat.
6
6
  </p>
7
7
 
8
- The agent decides whether a workflow fits. Well-defined, authorized work that benefits from durable stages, checkpoints, dependencies, recovery, review loops or approval gates runs as a workflow; brainstorming, discussion, unclear goals, simple bounded work, or an explicit request to work inline, quickly or without a workflow stays inline. To launch, inspect the input contract with `workflow inputs`, then call `workflow run` with the registered workflow name and inputs. Ask only for genuinely missing information.
8
+ The agent decides whether a workflow fits. Non-trivial work with structure and a verifiable objective runs as a workflow unless you ask for inline execution: implementation, bug fixes, debugging, migrations, multi-file changes with validation, and requests phrased as "repeat until" or "fix until green". Brainstorming, discussion, unclear goals, tiny low-risk answers or edits, or an explicit request to work inline, quickly or without a workflow stays inline. To launch, inspect the input contract with `workflow inputs`, then call `workflow run` with the registered workflow name and inputs. Ask only for genuinely missing information.
9
9
 
10
10
  Atomic can author custom TypeScript `workflow({...})` definitions inline, import reusable project/package workflows or builtins from `@bastani/atomic/workflows/builtin`, and nest them with `ctx.workflow(...)`. Imported children may nest further workflows within `maxDepth`, so compose proven research, implementation, design, verification, and approval graphs rather than copying them. Custom parents can also use runtime classification, dynamic fan-out and synthesis, adversarial verification, candidate tournaments, HIL gates, and bounded convergence.
11
11
 
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  adversarial_verification_default
3
- } from "./chunk-dxjxtgmp.js";
3
+ } from "./chunk-jaj27rqc.js";
4
4
  import"./chunk-2377r57g.js";
5
5
  import"./chunk-n1910xc4.js";
6
- import"./chunk-5724b0cf.js";
7
- import"./chunk-3tx8ry44.js";
6
+ import"./chunk-crw7q5g1.js";
7
+ import"./chunk-kspvwc24.js";
8
8
  export {
9
9
  adversarial_verification_default as default
10
10
  };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  workflow,
3
3
  withBuiltinContext
4
- } from "./chunk-5724b0cf.js";
4
+ } from "./chunk-crw7q5g1.js";
5
5
  import {
6
6
  scoring_prompt_reads,
7
7
  build_scoring_prompt
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  workflow,
3
3
  withBuiltinContext
4
- } from "./chunk-5724b0cf.js";
4
+ } from "./chunk-crw7q5g1.js";
5
5
 
6
6
  // dist/builtin/workflows/builtin/open-claude-design.ts
7
7
  import { Type as Type2 } from "typebox";