@bastani/atomic 0.10.14-alpha.1 → 0.10.15-alpha.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 (341) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/dist/_shared/dist-KOELCESV.js +2 -2
  3. package/dist/_shared/fork-row-index-UAUAQRD5.js +2 -2
  4. package/dist/_shared/lib-4PES5P4V.js +2 -2
  5. package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js +3 -3
  6. package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js +3 -3
  7. package/dist/_shared/mode-shared-2QJSCUM6.js +3 -3
  8. package/dist/_shared/p1a-prewarm-XIU57JHF.js +3 -3
  9. package/dist/_shared/runtime-O4KCSG4C.js +2 -2
  10. package/dist/_shared/{sdk-B5LEWGGI.js → sdk-OHKMDJ74.js} +27 -5
  11. package/dist/_shared/{sdk-B5LEWGGI.js.map → sdk-OHKMDJ74.js.map} +1 -1
  12. package/dist/_shared/session-data-AHTU7IS6.js +2 -2
  13. package/dist/_shared/startup-0-0-Q3MWKUK4.js +2 -2
  14. package/dist/_shared/startup-0-1-M6OWAYHH.js +2 -2
  15. package/dist/_shared/{startup-0-2-5QHPCEON.js → startup-0-2-2HUMCPKX.js} +14 -16
  16. package/dist/_shared/startup-0-2-2HUMCPKX.js.map +1 -0
  17. package/dist/_shared/startup-0-3-4ZYBYQNM.js +3 -3
  18. package/dist/_shared/startup-0-4-ZMJV547D.js +3 -3
  19. package/dist/_shared/startup-0-5-YDW47QX6.js +3 -3
  20. package/dist/_shared/startup-10-0-TDQNBDDL.js +3 -3
  21. package/dist/_shared/startup-14-0-MLX36RBG.js +1 -1
  22. package/dist/_shared/startup-15-0-YUKGAC63.js +1 -1
  23. package/dist/_shared/startup-15-1-4S7FLMNG.js +6 -30
  24. package/dist/_shared/startup-15-1-4S7FLMNG.js.map +1 -1
  25. package/dist/_shared/startup-8-0-34CBHPZH.js +3 -3
  26. package/dist/_shared/startup-8-1-LZFXSD3Z.js +3 -3
  27. package/dist/_shared/storage-command-7MGXLJGZ.js +2 -2
  28. package/dist/_shared/storage-status-K7PX2RXA.js +3 -3
  29. package/dist/_shared/task-unsaved-answer-VJ2KTB4V.js +2 -2
  30. package/dist/_shared/tree-outline-MUEPK5B7.js +2 -2
  31. package/dist/builtin/intercom/index.bundle.mjs +1 -1
  32. package/dist/builtin/intercom/package.json +1 -1
  33. package/dist/builtin/mcp/index.bundle.mjs +1 -1
  34. package/dist/builtin/mcp/package.json +1 -1
  35. package/dist/builtin/subagents/package.json +1 -1
  36. package/dist/builtin/subagents/src/extension/index.bundle.mjs +1 -1
  37. package/dist/builtin/web-access/index.bundle.mjs +1 -1
  38. package/dist/builtin/web-access/package.json +1 -1
  39. package/dist/cli/auth-cli.code.js +1 -1
  40. package/dist/cli/auth-cli.impl.js +3 -3
  41. package/dist/cli/auth-cli.js +3 -3
  42. package/dist/cli/blueprint-command.impl.js +3 -3
  43. package/dist/cli/blueprint-command.js +3 -3
  44. package/dist/cli/intercom-command.code.js +3 -3
  45. package/dist/cli/intercom-command.impl.js +3 -3
  46. package/dist/cli/intercom-command.js +3 -3
  47. package/dist/cli/list-models.impl.js +3 -3
  48. package/dist/cli/list-models.js +3 -3
  49. package/dist/cli/session-picker.code.js +1 -1
  50. package/dist/cli/session-picker.impl.js +3 -3
  51. package/dist/cli/session-picker.js +3 -3
  52. package/dist/cli/startup-ui.code.js +1 -1
  53. package/dist/cli/startup-ui.impl.js +3 -3
  54. package/dist/cli/startup-ui.js +3 -3
  55. package/dist/cli/storage-command.impl.js +3 -3
  56. package/dist/cli/storage-command.js +3 -3
  57. package/dist/cli/storage-search-session.code.js +1 -1
  58. package/dist/cli/storage-search-session.impl.js +3 -3
  59. package/dist/cli/storage-search-session.js +3 -3
  60. package/dist/cli/team-command.code.js +1 -1
  61. package/dist/cli/team-command.impl.js +3 -3
  62. package/dist/cli/team-command.js +3 -3
  63. package/dist/cli.js +2 -2
  64. package/dist/core/compaction/compactor.d.ts +0 -8
  65. package/dist/core/debug.impl.js +3 -3
  66. package/dist/core/debug.js +3 -3
  67. package/dist/core/export-html/card-projection.impl.js +3 -3
  68. package/dist/core/export-html/card-projection.js +3 -3
  69. package/dist/core/export-html/index.code.js +2 -2
  70. package/dist/core/export-html/index.impl.js +3 -3
  71. package/dist/core/export-html/index.js +3 -3
  72. package/dist/core/export-html/json-spans.impl.js +3 -3
  73. package/dist/core/export-html/json-spans.js +3 -3
  74. package/dist/core/export-html/oversized-render-inputs.impl.js +3 -3
  75. package/dist/core/export-html/oversized-render-inputs.js +3 -3
  76. package/dist/core/export-html/tool-renderer.impl.js +3 -3
  77. package/dist/core/export-html/tool-renderer.js +3 -3
  78. package/dist/core/extensions/jiti-loader.impl.js +3 -3
  79. package/dist/core/extensions/jiti-loader.js +3 -3
  80. package/dist/core/extensions/jiti-static-loader.impl.js +3 -3
  81. package/dist/core/extensions/jiti-static-loader.js +3 -3
  82. package/dist/core/extensions/loader-host-modules.impl.js +3 -3
  83. package/dist/core/extensions/loader-host-modules.js +3 -3
  84. package/dist/core/intercom-broker-control-host.code.js +1 -1
  85. package/dist/core/intercom-broker-control-host.impl.js +3 -3
  86. package/dist/core/intercom-broker-control-host.js +3 -3
  87. package/dist/core/intercom-broker-control.code.js +2 -2
  88. package/dist/core/intercom-broker-control.impl.js +3 -3
  89. package/dist/core/intercom-broker-control.js +3 -3
  90. package/dist/core/package-manager-storage-adapters.impl.js +3 -3
  91. package/dist/core/package-manager-storage-adapters.js +3 -3
  92. package/dist/core/sdk.code.js +1 -1
  93. package/dist/core/sdk.impl.js +3 -3
  94. package/dist/core/sdk.js +3 -3
  95. package/dist/core/session-manager-core.js +3 -3
  96. package/dist/core/session-manager-list.impl.js +3 -3
  97. package/dist/core/session-manager-list.js +3 -3
  98. package/dist/core/session-manager.impl.js +3 -3
  99. package/dist/core/session-manager.js +3 -3
  100. package/dist/core/session-storage.impl.js +3 -3
  101. package/dist/core/session-storage.js +3 -3
  102. package/dist/core/storage/index.js +2 -2
  103. package/dist/core/storage/node-sqlite-thread.js +2 -2
  104. package/dist/core/storage/node-sqlite.js +2 -2
  105. package/dist/core/storage/offline-snapshot-file.impl.js +3 -3
  106. package/dist/core/storage/offline-snapshot-file.js +3 -3
  107. package/dist/core/storage/provider.js +2 -2
  108. package/dist/core/storage/selection.js +2 -2
  109. package/dist/core/storage/session/branch-fork-source.code.js +2 -2
  110. package/dist/core/storage/session/branch-fork-source.impl.js +3 -3
  111. package/dist/core/storage/session/branch-fork-source.js +3 -3
  112. package/dist/core/storage/session/card-view.impl.js +3 -3
  113. package/dist/core/storage/session/card-view.js +3 -3
  114. package/dist/core/storage/session/child-reader.code.js +2 -2
  115. package/dist/core/storage/session/child-reader.impl.js +3 -3
  116. package/dist/core/storage/session/child-reader.js +3 -3
  117. package/dist/core/storage/session/chunked-resume-projection.impl.js +3 -3
  118. package/dist/core/storage/session/chunked-resume-projection.js +3 -3
  119. package/dist/core/storage/session/expanded-child-details.code.js +2 -2
  120. package/dist/core/storage/session/expanded-child-details.impl.js +3 -3
  121. package/dist/core/storage/session/expanded-child-details.js +3 -3
  122. package/dist/core/storage/session/fork-row-bytes.impl.js +3 -3
  123. package/dist/core/storage/session/fork-row-bytes.js +3 -3
  124. package/dist/core/storage/session/fork-row-index.impl.js +3 -3
  125. package/dist/core/storage/session/fork-row-index.js +3 -3
  126. package/dist/core/storage/session/fork-staging.code.js +1 -1
  127. package/dist/core/storage/session/fork-staging.impl.js +3 -3
  128. package/dist/core/storage/session/fork-staging.js +3 -3
  129. package/dist/core/storage/session/fork-window.code.js +2 -2
  130. package/dist/core/storage/session/fork-window.impl.js +3 -3
  131. package/dist/core/storage/session/fork-window.js +3 -3
  132. package/dist/core/storage/session/history-pages.impl.js +3 -3
  133. package/dist/core/storage/session/history-pages.js +3 -3
  134. package/dist/core/storage/session/jsonl-entry-projection.impl.js +3 -3
  135. package/dist/core/storage/session/jsonl-entry-projection.js +3 -3
  136. package/dist/core/storage/session/jsonl-session-store.impl.js +3 -3
  137. package/dist/core/storage/session/jsonl-session-store.js +3 -3
  138. package/dist/core/storage/session/memory-session-store.impl.js +3 -3
  139. package/dist/core/storage/session/memory-session-store.js +3 -3
  140. package/dist/core/storage/session/pinned-branch-resume.code.js +2 -2
  141. package/dist/core/storage/session/pinned-branch-resume.impl.js +3 -3
  142. package/dist/core/storage/session/pinned-branch-resume.js +3 -3
  143. package/dist/core/storage/session/released-history-files.code.js +1 -1
  144. package/dist/core/storage/session/released-history-files.impl.js +3 -3
  145. package/dist/core/storage/session/released-history-files.js +3 -3
  146. package/dist/core/storage/session/resident-fork-rows.impl.js +3 -3
  147. package/dist/core/storage/session/resident-fork-rows.js +3 -3
  148. package/dist/core/storage/session/session-resume.impl.js +3 -3
  149. package/dist/core/storage/session/session-resume.js +3 -3
  150. package/dist/core/storage/session/snapshot-cut.impl.js +3 -3
  151. package/dist/core/storage/session/snapshot-cut.js +3 -3
  152. package/dist/core/storage/session/snapshot-history.code.js +2 -2
  153. package/dist/core/storage/session/snapshot-history.impl.js +3 -3
  154. package/dist/core/storage/session/snapshot-history.js +3 -3
  155. package/dist/core/storage/session/sql-session-store.code.js +1 -1
  156. package/dist/core/storage/session/sql-session-store.impl.js +3 -3
  157. package/dist/core/storage/session/sql-session-store.js +3 -3
  158. package/dist/core/storage/session/tree-outline.impl.js +3 -3
  159. package/dist/core/storage/session/tree-outline.js +3 -3
  160. package/dist/core/storage/session/tree-presentation.impl.js +3 -3
  161. package/dist/core/storage/session/tree-presentation.js +3 -3
  162. package/dist/core/storage/storage-status.impl.js +3 -3
  163. package/dist/core/storage/storage-status.js +3 -3
  164. package/dist/core/storage/team.impl.js +3 -3
  165. package/dist/core/storage/team.js +3 -3
  166. package/dist/core/structured-output/index.code.js +1 -1
  167. package/dist/core/structured-output/index.impl.js +3 -3
  168. package/dist/core/structured-output/index.js +3 -3
  169. package/dist/core/tasks/task-completion-entry.impl.js +3 -3
  170. package/dist/core/tasks/task-completion-entry.js +3 -3
  171. package/dist/core/tasks/task-file-history.code.js +2 -2
  172. package/dist/core/tasks/task-file-history.impl.js +3 -3
  173. package/dist/core/tasks/task-file-history.js +3 -3
  174. package/dist/core/tasks/task-reference-archive.code.js +2 -2
  175. package/dist/core/tasks/task-reference-archive.js +3 -3
  176. package/dist/core/tasks/task-reference-identity.js +3 -3
  177. package/dist/core/tasks/task-reference-stream.impl.js +3 -3
  178. package/dist/core/tasks/task-reference-stream.js +3 -3
  179. package/dist/core/tasks/task-unsaved-answer.impl.js +3 -3
  180. package/dist/core/tasks/task-unsaved-answer.js +3 -3
  181. package/dist/core/tasks/task-view-source.impl.js +3 -3
  182. package/dist/core/tasks/task-view-source.js +3 -3
  183. package/dist/core/tools/read-url.impl.js +3 -3
  184. package/dist/core/tools/read-url.js +3 -3
  185. package/dist/core/worktree-snapshot/blob-store.js +2 -2
  186. package/dist/core/worktree-snapshot/errors.code.js +1 -1
  187. package/dist/core/worktree-snapshot/errors.impl.js +3 -3
  188. package/dist/core/worktree-snapshot/errors.js +3 -3
  189. package/dist/core/worktree-snapshot/session-index-reset.impl.js +3 -3
  190. package/dist/core/worktree-snapshot/session-index-reset.js +3 -3
  191. package/dist/extensions/codemode/execute.impl.js +3 -3
  192. package/dist/extensions/codemode/execute.js +3 -3
  193. package/dist/extensions/codemode/renderer.impl.js +3 -3
  194. package/dist/extensions/codemode/renderer.js +3 -3
  195. package/dist/extensions/mcp/cli.code.js +1 -1
  196. package/dist/extensions/mcp/cli.impl.js +3 -3
  197. package/dist/extensions/mcp/cli.js +3 -3
  198. package/dist/extensions/mcp/cli.lazy.code.js +2 -2
  199. package/dist/extensions/mcp/cli.lazy.impl.js +3 -3
  200. package/dist/extensions/mcp/cli.lazy.js +3 -3
  201. package/dist/extensions/mcp/runtime.code.js +1 -1
  202. package/dist/extensions/mcp/runtime.impl.js +3 -3
  203. package/dist/extensions/mcp/runtime.js +3 -3
  204. package/dist/index.d.ts +21 -1
  205. package/dist/index.js +2 -2
  206. package/dist/main-first-time-setup.code.js +1 -1
  207. package/dist/main-first-time-setup.impl.js +3 -3
  208. package/dist/main-first-time-setup.js +3 -3
  209. package/dist/modes/interactive/components/stored-tree-view.code.js +2 -2
  210. package/dist/modes/interactive/components/stored-tree-view.impl.js +3 -3
  211. package/dist/modes/interactive/components/stored-tree-view.js +3 -3
  212. package/dist/modes/interactive/components/user-message-selector-archive.impl.js +3 -3
  213. package/dist/modes/interactive/components/user-message-selector-archive.js +3 -3
  214. package/dist/modes/print-mode.js +1 -1
  215. package/dist/package-manager-cli.code.js +2 -2
  216. package/dist/package-manager-cli.impl.js +3 -3
  217. package/dist/package-manager-cli.js +3 -3
  218. package/dist/startup-files.json +1 -1
  219. package/dist/startup-stages/6.js +1 -1
  220. package/dist/utils/startup-database-spare.code.js +1 -1
  221. package/dist/utils/startup-database-spare.impl.js +3 -3
  222. package/dist/utils/startup-database-spare.js +3 -3
  223. package/dist/utils/tools-manager.impl.js +3 -3
  224. package/dist/utils/tools-manager.js +3 -3
  225. package/docs/background-tasks/reference.md +182 -0
  226. package/docs/background-tasks.md +98 -405
  227. package/docs/build.md +67 -27
  228. package/docs/changelog.mdx +9 -0
  229. package/docs/codemode.md +108 -39
  230. package/docs/compaction/branch-summaries.md +54 -0
  231. package/docs/compaction/custom-compactors.md +161 -0
  232. package/docs/compaction/memory-compaction.md +77 -0
  233. package/docs/compaction/reference.md +86 -38
  234. package/docs/compaction.md +51 -252
  235. package/docs/computer-use.md +169 -321
  236. package/docs/containerization.md +71 -57
  237. package/docs/custom-provider/api-reference.md +119 -25
  238. package/docs/custom-provider/oauth.md +114 -132
  239. package/docs/custom-provider/override.md +37 -27
  240. package/docs/custom-provider/registration.md +107 -83
  241. package/docs/custom-provider/streaming.md +85 -71
  242. package/docs/custom-provider.md +85 -52
  243. package/docs/development.md +39 -29
  244. package/docs/docs.json +76 -63
  245. package/docs/environment-variables.md +94 -44
  246. package/docs/extensions/api-reference.md +86 -43
  247. package/docs/extensions/authoring.md +162 -154
  248. package/docs/extensions/events.md +80 -25
  249. package/docs/extensions/examples.md +90 -85
  250. package/docs/extensions/ui.md +206 -82
  251. package/docs/extensions.md +79 -108
  252. package/docs/getting-started/authentication.md +67 -36
  253. package/docs/getting-started/first-session.md +53 -43
  254. package/docs/getting-started/installation.md +116 -89
  255. package/docs/getting-started/project-instructions.md +48 -34
  256. package/docs/guides/configuration.md +82 -20
  257. package/docs/guides/non-interactive.md +66 -24
  258. package/docs/guides/resume-on-any-machine.md +135 -82
  259. package/docs/guides/team-setup.md +114 -105
  260. package/docs/guides.md +76 -32
  261. package/docs/herdr.md +15 -16
  262. package/docs/how-atomic-works.md +140 -0
  263. package/docs/index.md +58 -44
  264. package/docs/intercom/operations.md +141 -151
  265. package/docs/intercom/reference.md +85 -108
  266. package/docs/intercom.md +84 -145
  267. package/docs/json.md +120 -67
  268. package/docs/keybindings.md +85 -49
  269. package/docs/libraries/agent-core.md +137 -275
  270. package/docs/libraries/ai.md +100 -84
  271. package/docs/libraries/codemode.md +210 -300
  272. package/docs/libraries/schema.md +59 -53
  273. package/docs/libraries/storage-postgres.md +49 -35
  274. package/docs/libraries/telemetry.md +153 -354
  275. package/docs/libraries/tui.md +265 -393
  276. package/docs/libraries.md +42 -26
  277. package/docs/llama-cpp.md +171 -161
  278. package/docs/mcp-servers.md +90 -51
  279. package/docs/models/choose-a-model.md +188 -0
  280. package/docs/models/reference.md +74 -30
  281. package/docs/models.md +153 -88
  282. package/docs/orchestration/migrating-workflows.md +23 -16
  283. package/docs/orchestration/patterns.md +39 -44
  284. package/docs/orchestration.md +65 -26
  285. package/docs/packages/authoring.md +51 -29
  286. package/docs/packages/reference.md +42 -21
  287. package/docs/packages.md +69 -58
  288. package/docs/programmatic.md +118 -24
  289. package/docs/prompt-templates.md +84 -83
  290. package/docs/providers/reference.md +43 -48
  291. package/docs/providers.md +219 -451
  292. package/docs/quickstart.md +140 -120
  293. package/docs/reference/cli.md +135 -97
  294. package/docs/reference.md +20 -18
  295. package/docs/rpc/examples.md +76 -20
  296. package/docs/rpc/extension-ui.md +64 -38
  297. package/docs/rpc/protocol.md +361 -110
  298. package/docs/rpc.md +57 -17
  299. package/docs/sdk/reference.md +409 -534
  300. package/docs/sdk/storage.md +53 -13
  301. package/docs/sdk/structured-decisions.md +82 -56
  302. package/docs/sdk/web-server.md +57 -43
  303. package/docs/sdk.md +106 -84
  304. package/docs/security.md +42 -64
  305. package/docs/session-format.md +62 -38
  306. package/docs/sessions.md +99 -214
  307. package/docs/settings.md +165 -195
  308. package/docs/shell-aliases.md +9 -6
  309. package/docs/skills/authoring.md +69 -48
  310. package/docs/skills/reference.md +51 -20
  311. package/docs/skills.md +99 -148
  312. package/docs/slash-commands.md +129 -0
  313. package/docs/storage/custom-adapters.md +160 -85
  314. package/docs/storage/jsonl.md +81 -66
  315. package/docs/storage/postgres/pgbouncer.md +120 -126
  316. package/docs/storage/postgres/tuning.md +120 -143
  317. package/docs/storage/postgres.md +314 -330
  318. package/docs/storage/sqlite.md +71 -42
  319. package/docs/storage.md +298 -302
  320. package/docs/subagents/authoring.md +55 -38
  321. package/docs/subagents/reference.md +73 -33
  322. package/docs/subagents.md +119 -187
  323. package/docs/terminal-setup.md +50 -38
  324. package/docs/termux.md +67 -41
  325. package/docs/themes/reference.md +23 -19
  326. package/docs/themes.md +142 -127
  327. package/docs/tmux.md +47 -55
  328. package/docs/tools.md +147 -109
  329. package/docs/tui/reference.md +166 -214
  330. package/docs/tui.md +196 -341
  331. package/docs/usage.md +118 -138
  332. package/docs/verification.md +79 -51
  333. package/docs/web-access.md +121 -101
  334. package/docs/windows.md +26 -27
  335. package/docs/worktree-snapshots/reference.md +245 -0
  336. package/docs/worktree-snapshots.md +71 -259
  337. package/package.json +8 -8
  338. package/dist/_shared/startup-0-2-5QHPCEON.js.map +0 -1
  339. package/docs/guides/intercom.md +0 -32
  340. package/docs/guides/orchestration.md +0 -28
  341. package/docs/guides/subagents.md +0 -37
@@ -4,24 +4,33 @@ sidebarTitle: "Migrate workflows"
4
4
  description: "Convert legacy Atomic workflow files into reusable skills without executing or modifying the originals."
5
5
  ---
6
6
 
7
- Ask Atomic in chat or invoke `/skill:workflow-files`:
7
+ Convert legacy `.ts`, `.js`, `.mjs`, or `.cjs` workflow files into reusable [skills](/skills#skills-as-workflows) without importing, running, or modifying the original files.
8
8
 
9
- ```text
10
- Convert .atomic/workflows/triage.ts into a skill
11
- ```
9
+ <Steps>
10
+ <Step title="Start the conversion">
11
+ Ask Atomic in chat or invoke `/skill:workflow-files` with the workflow path:
12
12
 
13
- ```text
14
- /skill:workflow-files .atomic/workflows/triage.ts
15
- ```
13
+ ```text
14
+ Convert .atomic/workflows/triage.ts into a skill
15
+ ```
16
16
 
17
- To convert and run immediately, include your inputs, for example: "Run the triage workflow on these reports." At startup, Atomic scans directly inside `workflows/` directories for legacy `.ts`, `.js`, `.mjs`, and `.cjs` files (excluding `.d.ts` files and subdirectories) and notes up to 20 discovered files (with `+N more` if additional files exist). Atomic never writes or converts anything automatically.
17
+ ```text
18
+ /skill:workflow-files .atomic/workflows/triage.ts
19
+ ```
18
20
 
19
- How conversion works:
21
+ To convert and run immediately, include your inputs (for example, "Run the triage workflow on these reports").
22
+ </Step>
23
+ <Step title="Review the generated skill and scripts">
24
+ Atomic reads the workflow file and any local helpers as plain text and generates a new `SKILL.md` plus deterministic helper scripts under `scripts/`. It never imports, executes, edits, or deletes the original workflow file, and never overwrites an existing skill directory or follows symlinks into an occupied target path.
25
+ </Step>
26
+ <Step title="Reload and invoke">
27
+ Run `/reload`, then invoke `/skill:<name>` with your inputs.
28
+ </Step>
29
+ </Steps>
20
30
 
21
- - Atomic reads the workflow file and local helpers as plain text and uses `skill-creator` to write `SKILL.md` plus deterministic scripts under `scripts/`.
22
- - The original workflow file is never imported, executed, edited, or deleted.
23
- - Existing skills are never overwritten. Atomic checks symlinks at the target skill path before writing and never writes into an occupied directory. Pick a new name or reuse the existing skill.
24
- - Workflow files in untrusted projects are never offered for conversion, and Atomic never writes into an untrusted project directory. Global workflows still convert. For an explicitly supplied, trusted external source inside an untrusted project, Atomic asks before saving globally.
31
+ At startup, Atomic scans directly inside `workflows/` directories for legacy `.ts`, `.js`, `.mjs`, and `.cjs` files (excluding `.d.ts` files and subdirectories) and notes up to 20 discovered files (`+N more` if additional files exist). Nothing is converted or written automatically.
32
+
33
+ Workflow files in untrusted projects are never offered for conversion, and Atomic never writes into an untrusted project directory. Global workflows still convert; for an explicitly supplied trusted external source inside an untrusted project, Atomic asks before saving globally.
25
34
 
26
35
  | Workflow source | Output skill location |
27
36
  | --- | --- |
@@ -29,8 +38,6 @@ How conversion works:
29
38
  | `~/.atomic/agent/workflows/`, global settings paths, globally installed packages | `~/.atomic/agent/skills/<name>/` (or `skills/` in your agent directory) |
30
39
  | Package loaded via `-e`, or a trusted external project directory | Current trusted project's `.atomic/skills/<name>/` (never the external tree) |
31
40
 
32
- After reviewing the generated skill and scripts, run `/reload`, then invoke `/skill:<name>` with your inputs. See [skills as workflows](/skills#skills-as-workflows) and [Orchestrate with codemode and subagents](/orchestration).
33
-
34
41
  ## What conversion preserves
35
42
 
36
43
  | Earlier workflow API | Equivalent in the converted skill |
@@ -43,7 +50,7 @@ After reviewing the generated skill and scripts, run `/reload`, then invoke `/sk
43
50
  | Nested `ctx.workflow` | Separately converted skill called by name (the main session still owns all subagent launches). |
44
51
  | Structured outputs, `ctx.exit`, blocked states | Per-subagent output files validated by codemode, stopping on failure or missing prerequisites. |
45
52
 
46
- Running the new skill starts fresh work. Earlier workflow run IDs cannot resume old checkpoints. Verify which external side effects already ran before repeating them. See [What survives interruption](/orchestration#what-survives-interruption).
53
+ Running the new skill starts fresh work; earlier workflow run IDs cannot resume old checkpoints. Verify which external side effects already ran before repeating them ([What survives interruption](/orchestration#what-survives-interruption)).
47
54
 
48
55
  ### Pinned stages
49
56
 
@@ -1,43 +1,24 @@
1
1
  ---
2
2
  title: "Orchestration patterns"
3
- sidebarTitle: "Patterns"
3
+ sidebarTitle: "Orchestration patterns"
4
4
  description: "Seven reusable patterns for splitting work across subagents, isolating edits, and verifying results."
5
5
  ---
6
6
 
7
- Give each subagent one concrete deliverable, explicit inputs, clear edit rules, and a verification check. Put conflicting edits in separate worktrees, and run final verification in your main session. A subagent claiming "done" is not proof.
7
+ Give each subagent one concrete deliverable, explicit inputs, clear edit rules, and a verification check. Put conflicting edits in separate worktrees, and run final verification in your main session — a subagent claiming "done" is not proof.
8
8
 
9
- Each snippet below is a short [codemode](/codemode) call from the main chat, not a long-lived script. After any restart, reconcile `status` with [saved task IDs](/orchestration#what-survives-interruption) persisted via [the codemode store](/codemode#store-values) before launching more subagents. For background and mechanics behind these patterns, see [Orchestrate with codemode and subagents](/orchestration), [Run subagents](/subagents), and [Manage background tasks](/background-tasks).
9
+ ## Choose a pattern
10
10
 
11
- ## Prompt anatomy
11
+ | Pattern | Use when | Isolation | Key check |
12
+ | --- | --- | --- | --- |
13
+ | [Classify-and-act](#classify-and-act) | Incoming work needs triage before choosing a specialist | Fresh read-only triage, then specialist | Validate the returned label in the main session before dispatch |
14
+ | [Fan-out-and-synthesize](#fan-out-and-synthesize) | Independent angles or platforms can be investigated in parallel | Parallel batch (`group: true` for peers) | Wait for every required subagent and reconcile contradictions against code |
15
+ | [Adversarial verification](#adversarial-verification) | You want an unbiased attempt to break a candidate fix | `context: "fresh"`, read-only | Reproduce reported failing inputs in the main session with real exit codes |
16
+ | [Generate-and-filter](#generate-and-filter) | Multiple candidate edge cases or options need objective filtering | `context: "fresh"`, read-only | Run every parsed candidate through one deterministic check in codemode |
17
+ | [Tournament](#tournament) | Two or more implementation strategies compete on shared fixtures | `context: "fresh"` + separate named worktrees | Compare scores on identical fixtures; never pick a candidate failing checks |
18
+ | [Loop-until-done](#loop-until-done) | A failing test suite needs bounded diagnose-and-repair rounds | Main-session test runs + `debugger` rounds | Cap rounds explicitly and re-run the real suite after each fix |
19
+ | [Stacked slices](#stacked-slices) | Dependent implementation stages build strictly on prior commits | Named worktree branching from prior commit SHA | Verify each slice against its base and run integration checks at the tip |
12
20
 
13
- Make every subagent assignment self-contained so it does not rely on the main chat's full history:
14
-
15
- - **Objective and why it matters.** Name the decision or change that depends on the output.
16
- - **Inputs and permissions.** List the exact files or paths to read, what may be edited, and what is out of scope.
17
- - **Deliverable.** Specify the expected verdict with `file:line` citations, output file path, or tested commit.
18
-
19
- Example prompt:
20
-
21
- > Check the Windows install instructions in `docs/install.md` against the CLI flags in this checkout. Report each discrepancy as a command, its documented behavior, and the behavior you observed. Return "no discrepancies" if all commands agree. Do not edit files or install software.
22
-
23
- ### Done criteria
24
-
25
- Specify observable outcomes rather than effort:
26
-
27
- - For fixes, name the changed behavior, adjacent behavior that must remain unchanged, and checks proving both.
28
- - For reviews, distinguish "checked and found nothing" from "could not verify." Re-run key checks in your main session before acting on results. See [Verification and evidence](/verification).
29
-
30
- ### Stop conditions
31
-
32
- Define upfront when to halt, such as an attempt cap, a missing prerequisite, contradictory inputs, or actions that need user approval like API breaks, data migrations, or publishing. On a failed check within scope, pass the exact observed failure to the next attempt rather than broadening the prompt.
33
-
34
- ## Design checklist
35
-
36
- - **Fit.** Check whether one direct command answers the question faster than delegation.
37
- - **Isolation.** Give each writer a distinct worktree or disjoint files, and launch dependent tasks only after prerequisites pass.
38
- - **Handoffs.** Pass file paths and output schemas rather than raw transcripts.
39
- - **Recovery.** Store subagent IDs, target commits, and next checks so restarts reconcile before re-running side effects.
40
- - **Approval.** Keep permission to publish or merge separate from permission to implement.
21
+ Each snippet below is a short [codemode](/codemode) call from the main chat, not a long-lived script. After any restart, reconcile `status` with [saved task IDs](/orchestration#what-survives-interruption) persisted via [the codemode store](/codemode#store-values) before launching more subagents.
41
22
 
42
23
  ## Classify-and-act
43
24
 
@@ -89,21 +70,21 @@ Verify reported failures in the main session by checking real exit codes before
89
70
 
90
71
  ## Generate-and-filter
91
72
 
92
- Ask subagents for concrete candidates, then filter all of them with one deterministic check in codemode. Pass `context: "fresh"` (or use a read-only agent) so generators do not inherit the main chat's history (`worker` defaults to [forked context](/subagents#fresh-vs-forked-context) and edit tools):
73
+ Ask fresh read-only subagents to inspect the implementation and propose concrete candidate cases, then filter every candidate with one deterministic check in codemode:
93
74
 
94
75
  ```js
95
76
  const r = await tools.subagent({
96
77
  context: "fresh",
97
- tasks: ["year boundary", "leap day"].map((topic) => ({
78
+ tasks: ["year-boundary", "leap-day"].map((category) => ({
98
79
  agent: "codebase-analyzer",
99
- task: `Return three distinct dates around a ${topic} as a JSON string array. Don't edit files.`,
80
+ task: `Inspect src/date.ts for ${category} edge cases. Return a JSON array of up to three { input, expected, line } test cases targeting risky branches. Don't edit files.`,
100
81
  })),
101
82
  });
102
- store("dates:generators", r.tasks);
83
+ store("date:candidates", r.tasks);
103
84
  return r.tasks;
104
85
  ```
105
86
 
106
- Parse each result as data, drop malformed or duplicate entries, and keep only values passing the real check. Returning "none passed" is valid.
87
+ Parse each returned result as data, drop malformed or duplicate entries, and run the real formatter or test harness in your main session to keep only candidates that reproduce a real discrepancy or gap. Returning "none passed" is valid.
107
88
 
108
89
  ## Tournament
109
90
 
@@ -122,10 +103,9 @@ store("candidates:round1", r.tasks);
122
103
  return r.tasks;
123
104
  ```
124
105
 
125
- Note two details when running `worker` in named worktrees:
126
-
127
- - `worker` defaults to `context: "fork"`, so pass `context: "fresh"` when you want independent attempts without the main chat's prior reasoning ([Fresh vs. forked context](/subagents#fresh-vs-forked-context)).
128
- - Named worktrees (`worktree: { branch }`) are never deleted automatically and do not symlink `node_modules`. Have each competitor install dependencies if its test command needs them, or remove finished branches and worktrees manually when the tournament ends.
106
+ <Tip>
107
+ `worker` defaults to `context: "fork"`, so pass `context: "fresh"` when you want independent attempts without the main chat's prior reasoning ([Fresh vs. forked context](/subagents#fresh-vs-forked-context)). Named worktrees (`worktree: { branch }`) are permanent and do not symlink `node_modules` — have competitors install dependencies if needed and remove unused branches/worktrees when the tournament ends.
108
+ </Tip>
129
109
 
130
110
  Record scores, commit SHAs, and round numbers so restarts never double-advance a candidate. Never pick a winner that fails a required check.
131
111
 
@@ -154,9 +134,9 @@ store("repair:last", r.tasks);
154
134
  return r.tasks;
155
135
  ```
156
136
 
157
- When `bash` exceeds its foreground observation budget (10 seconds by default), it yields to the background and returns a plain status string instead of structured output. Passing a larger `budgetMs` and checking `typeof check === "string"` avoids crashing on slower test suites.
137
+ When `bash` exceeds its foreground observation budget (10 seconds by default), it yields to the background and returns a plain status string instead of structured output. Passing a larger `budgetMs` and checking `typeof check === "string"` avoids crashing on slower suites.
158
138
 
159
- Run a new repair round only after the previous subagent settles, and stop on refusal, missing prerequisites, or approval gates. On restart, inspect the checkout and rerun the check before spending another round.
139
+ Start a new repair round only after the previous subagent settles, and stop on refusal, missing prerequisites, or approval gates. On restart, inspect the checkout and re-run the check before spending another round.
160
140
 
161
141
  ## Stacked slices
162
142
 
@@ -174,4 +154,19 @@ store("cli-slice", r.tasks);
174
154
  return r.tasks;
175
155
  ```
176
156
 
177
- Because `worker` defaults to `context: "fork"`, each slice sees the main chat's verified decisions unless you pass `context: "fresh"` ([Fresh vs. forked context](/subagents#fresh-vs-forked-context)). [Named worktrees](/subagents#named-worktrees) keep their branches and do not symlink `node_modules`. Verify each slice against its base and run full integration checks at the tip. Run independent slices in parallel instead.
157
+ Because `worker` defaults to `context: "fork"`, each slice sees the main chat's verified decisions unless you pass `context: "fresh"`. Verify each slice against its base and run full integration checks at the tip; run independent slices in parallel instead.
158
+
159
+ ## Before you delegate
160
+
161
+ Keep every subagent prompt self-contained so it does not rely on unspoken context:
162
+
163
+ - **Objective and deliverable.** Name the decision or change that depends on the output, exact files to inspect, edit boundaries, and expected output shape (`file:line` citations, output file, or verified commit).
164
+ - **Done criteria.** Name observable outcomes and proof checks rather than effort. Distinguish "checked and found nothing" from "could not verify," and re-run key checks in your main session ([Verification and evidence](/verification)).
165
+ - **Stop conditions.** Set attempt caps, missing-prerequisite halts, and user-approval gates (API breaks, migrations, publishing) upfront. On a failed check, pass the exact observed failure to the next attempt rather than broadening scope.
166
+ - **Fit and isolation.** Confirm a single direct command wouldn't be faster; give writers distinct worktrees or disjoint files; pass file paths rather than raw transcripts; store task IDs and commit SHAs so restarts reconcile before repeating side effects.
167
+
168
+ Example self-contained prompt:
169
+
170
+ ```text
171
+ Check the Windows install instructions in docs/install.md against the CLI flags in this checkout. Report each discrepancy as a command, its documented behavior, and the behavior you observed. Return "no discrepancies" if all commands agree. Do not edit files or install software.
172
+ ```
@@ -1,18 +1,29 @@
1
1
  ---
2
- title: "Orchestrate with codemode and subagents"
3
- sidebarTitle: "Orchestration"
4
- description: "Coordinate parallel subagents from codemode, handle results as they finish, and recover after interruptions."
2
+ title: "Orchestrate multi-step work"
3
+ sidebarTitle: "Orchestrate multi-step work"
4
+ description: "Delegate multi-step work in plain language or codemode scripts, handle background results as they settle, and recover cleanly after interruptions."
5
5
  ---
6
6
 
7
- Describe the outcome you want and how to verify it. For example: "Review the installation guide for Linux and Windows in parallel. Report any commands that do not match the CLI. Do not edit files."
7
+ Give Atomic a goal, how to verify completion, and any limits on edits, cost, or time. You do not need to write JavaScript to split work across agents — describe the work in plain language and your main session decides whether to answer directly, run checks in [codemode](/codemode), or split work across [subagents](/subagents):
8
8
 
9
- Your main session decides whether to answer directly, run checks in [codemode](/codemode), or split work across [subagents](/subagents).
9
+ ```text
10
+ Review the installation guide for Linux and Windows. Give each platform to a separate read-only subagent. Check disputed commands against the CLI, then report discrepancies by platform. Do not edit files.
11
+ ```
12
+
13
+ | What you want | Use this |
14
+ | --- | --- |
15
+ | One-off multi-step task or parallel review | Ask in plain language; Atomic coordinates the subagents for you |
16
+ | Monitor, steer, or answer running subagents | Open `/tasks` or focus the [agent panel](/background-tasks#the-agent-panel) (`↓` on an empty prompt) |
17
+ | Save a repeatable multi-step procedure | Write a [skill](/skills#skills-as-workflows) describing the steps (optionally with codemode snippets) |
18
+ | Pick a proven coordination structure | Start from the seven [orchestration patterns](/orchestration/patterns) |
10
19
 
11
- Delegating in plain language without codemode scripts? See [Plan multi-step work](/guides/orchestration). For seven concrete recipes, see [Orchestration patterns](/orchestration/patterns). For exact subagent parameters and `config.json`, see [Subagent reference](/subagents/reference).
20
+ <Note>
21
+ **Who writes codemode JavaScript?** During ordinary chat, Atomic writes and runs the [codemode](/codemode) JavaScript below automatically when coordinating parallel subagents. You only write `tools.subagent(...)` snippets yourself when authoring a custom [skill](/skills#skills-as-workflows) or prompt template that encodes a repeatable workflow.
22
+ </Note>
12
23
 
13
24
  ## Launch now, use the result later
14
25
 
15
- The snippet below is JavaScript that your main session runs inside `codemode`, not a file you install. Run `/tools` if your session uses a custom tool list to confirm `codemode` and `subagent` are active.
26
+ When your main session coordinates subagents through [codemode](/codemode) (confirm both `codemode` and `subagent` are enabled with `/tools`), `tools.subagent()` launches background subagents and returns immediately:
16
27
 
17
28
  ```js
18
29
  const launch = await tools.subagent({
@@ -25,9 +36,18 @@ store("guide-review", launch.tasks);
25
36
  return launch.tasks;
26
37
  ```
27
38
 
28
- - **Launch, not completion.** `await` resolves as soon as subagents start or enter the queue. Started or queued slots return `{ taskId, childId, agent, state: "admitted" | "queued", intercomTarget? }` (`intercomTarget` is included when Intercom is enabled for the subagent). Refused slots return `{ agent, state: "refused", reason }` with no running subagent. Your main session can continue working or end its turn while completion notices return results automatically, and `/tasks` lets you inspect subagents directly ([Manage background tasks](/background-tasks)).
29
- - **Explicit parallel batches.** Separate `tools.subagent()` calls inside codemode are not merged into one burst. Pass `tasks: [...]` when you want a parallel batch.
30
- - **Explicit wait.** When a later step needs a result immediately, wait briefly without launching a second subagent. The `// @options` comment sets per-script [codemode options](/codemode) such as `timeout_ms` (codemode scripts have a 256 MiB memory limit and no default timeout):
39
+ Example `launch.tasks` output:
40
+
41
+ ```json
42
+ [
43
+ { "taskId": "task-1-0-2", "childId": "a1b2c3d4:0", "agent": "codebase-analyzer", "state": "admitted", "intercomTarget": "subagent-codebase-analyzer-a1b2c3d4-0" },
44
+ { "taskId": "task-1-0-3", "childId": "a1b2c3d4:1", "agent": "codebase-analyzer", "state": "admitted", "intercomTarget": "subagent-codebase-analyzer-a1b2c3d4-1" }
45
+ ]
46
+ ```
47
+
48
+ - **Launch, not completion.** `await` resolves as soon as subagents start (`"admitted"`), queue (`"queued"`), or fail validation (`"refused"` with `reason`). Your main session can keep working or end its turn while completion notices deliver results automatically. Inspect live progress anytime in `/tasks` or the agent panel ([Manage background tasks](/background-tasks)).
49
+ - **Explicit parallel batches.** Separate `tools.subagent()` calls inside one script are not merged automatically; pass `tasks: [...]` to launch a parallel batch.
50
+ - **Explicit wait.** When a later step depends on a result immediately, wait on the existing task ID instead of launching a duplicate. The `// @options` comment sets per-script [codemode options](/codemode) such as `timeout_ms`:
31
51
 
32
52
  ```js
33
53
  // @options: {"timeout_ms": 10000}
@@ -36,28 +56,47 @@ if (!task) return "No review was started.";
36
56
  return await tools.subagent({ action: "wait", id: task.taskId, budgetMs: 2000 });
37
57
  ```
38
58
 
39
- Inside codemode, `tools.subagent({ action: "wait" })` defaults to a 30-second budget even when a host configures unlimited foreground waits.
40
- - **Cancellation and evidence.** Hitting `budgetMs`, returning early, or interrupting the script never stops an already-launched subagent (unawaited tool calls are cancelled when the script returns, while already-launched background subagents keep running). Use `tools.subagent({ action: "quit", id: childId })` to stop one. Treat actual subagent results and status, not launch receipts, as evidence, and account for every required subagent in joint reviews.
41
- - **One-level delegation.** Only the main session launches subagents. If a subagent uncovers follow-up work, it reports back so the main session can launch the next batch.
42
- - **Peer messaging.** Pass `group: true` to create a unique shared [Intercom](/intercom) group for that batch, or pass a shared named `group`. Peer isolation keeps unrelated sessions out while `contact_supervisor` still reaches the main session across groups. Address subagents with the exact `intercomTarget` from the launch result ([Intercom from codemode](/intercom/reference#from-codemode-scripts)). A delivery acknowledgement is not a task result.
59
+ In codemode, always pass `id` (passing `runId` is rejected), pass a non-negative integer for `budgetMs` (defaults to `30000` ms even when a host configures unlimited foreground waits), and note that `pause` and `quit` stops both report `result.status: "paused"`.
60
+ - **Cancellation and evidence.** Hitting `budgetMs`, returning early, or timing out the script never stops already-launched subagents; call `tools.subagent({ action: "quit", id: childId })` to stop one. Treat settled results and real verification output — never launch receipts — as evidence.
61
+ - **One-level delegation.** Only the main session launches subagents. If a subagent discovers follow-up work, it reports back so the main session can launch the next batch.
62
+ - **Peer messaging.** Pass `group: true` to create a unique shared [Intercom](/intercom) group for a batch, or pass a shared named `group`. Address subagents using their exact `intercomTarget` ([Intercom from codemode](/intercom/reference#from-codemode-scripts)); `contact_supervisor` still reaches the main session across groups.
43
63
 
44
64
  ## What survives interruption
45
65
 
46
66
  Subagents are persisted sessions; codemode scripts are not checkpointed programs.
47
67
 
48
- - Reopening the original main session automatically restores running subagents. Paused or quit subagents resume from [`/tasks`](/background-tasks) or `tools.subagent({ action: "resume", id: childId })`.
49
- - Your main session resumes in chat from completion notices, saved results, and decisions instead of re-entering an old JavaScript loop.
50
- - Save small handoff state, such as task IDs, round count, and next checks, with [the codemode store](/codemode#store-values), which persists per branch only when a script succeeds. If a script throws or times out, all `store()` writes from that script are discarded, even though any `tools.subagent()` launches already started. Inspect `/tasks`, chat, and changed files before retrying.
51
- - On recovery, call `await tools.subagent({ action: "status" })` and reconcile `children` against stored `childId` values. Collect finished results, resume paused work that is still needed, and relaunch missing subagents only after checking what they left behind.
68
+ - **Reopening a session.** Running subagents relaunch automatically when you reopen the original main session. Paused and quit subagents stay awaiting manual resume in `/tasks` or via `tools.subagent({ action: "resume", id: childId })` (unless configured otherwise via [run control settings](/subagents/reference#subagent-config-json-reference)).
69
+ - **Forks and unsaved sessions.** Forking a session (`/fork` or `--fork`) never restores the original session's subagents, and sessions started with `--no-session` are not saved so their subagents cannot be restored after Atomic closes.
70
+ - **Branch-scoped handoff state.** Save small handoff state — task IDs, round counts, and next checks — with [the codemode store](/codemode#store-values). `store()` writes persist per branch only when the script succeeds; if a script throws or times out, its `store()` writes are discarded even though launched subagents keep running.
71
+ - **Reconciling after a restart.** Call `await tools.subagent({ action: "status" })` and reconcile `children` against stored `childId` values before launching new subagents. Collect finished results, resume paused work that is still needed, and inspect `/tasks`, chat, and modified files before retrying.
52
72
 
53
73
  ## Choose a pattern
54
74
 
55
- - [Classify-and-act](/orchestration/patterns#classify-and-act) triages input first, then dispatches the matching specialist.
56
- - [Fan-out-and-synthesize](/orchestration/patterns#fan-out-and-synthesize) splits an analysis across parallel subagents and reconciles their findings.
57
- - [Adversarial verification](/orchestration/patterns#adversarial-verification) asks an independent subagent to break a candidate.
58
- - [Generate-and-filter](/orchestration/patterns#generate-and-filter) collects candidates and keeps only those passing a deterministic check.
59
- - [Tournament](/orchestration/patterns#tournament) compares competing implementations on shared fixtures.
60
- - [Loop-until-done](/orchestration/patterns#loop-until-done) runs verification checks between bounded repair rounds.
61
- - [Stacked slices](/orchestration/patterns#stacked-slices) branches each dependent slice from the verified prior commit.
75
+ <Columns cols={2}>
76
+ <Card title="Classify-and-act" href="/orchestration/patterns#classify-and-act">
77
+ Triage input with a read-only subagent, validate the label, then dispatch the matching specialist.
78
+ </Card>
79
+ <Card title="Fan-out-and-synthesize" href="/orchestration/patterns#fan-out-and-synthesize">
80
+ Split a broad review or investigation across parallel subagents and reconcile their evidence.
81
+ </Card>
82
+ <Card title="Adversarial verification" href="/orchestration/patterns#adversarial-verification">
83
+ Ask a fresh read-only subagent to find a concrete failing input against a candidate fix.
84
+ </Card>
85
+ <Card title="Generate-and-filter" href="/orchestration/patterns#generate-and-filter">
86
+ Gather candidate inputs or cases from fresh subagents and filter them with a deterministic check.
87
+ </Card>
88
+ <Card title="Tournament" href="/orchestration/patterns#tournament">
89
+ Compare competing implementations in isolated named worktrees against shared fixtures.
90
+ </Card>
91
+ <Card title="Loop-until-done" href="/orchestration/patterns#loop-until-done">
92
+ Run verification checks in the main session between bounded repair rounds.
93
+ </Card>
94
+ <Card title="Stacked slices" href="/orchestration/patterns#stacked-slices">
95
+ Branch each dependent slice from the verified commit of the previous slice.
96
+ </Card>
97
+ <Card title="Skills as workflows" href="/skills#skills-as-workflows">
98
+ Save repeatable multi-step instructions as a skill, or migrate legacy workflow files.
99
+ </Card>
100
+ </Columns>
62
101
 
63
- To migrate an earlier workflow file or built-in name, see [Migrate an earlier workflow to a skill](/orchestration/migrating-workflows). To save new repeatable procedures, use a [skill](/skills#skills-as-workflows).
102
+ Have an earlier `.atomic/workflows/*.ts` file or removed built-in workflow name? Follow [Migrate an earlier workflow to a skill](/orchestration/migrating-workflows).
@@ -4,11 +4,13 @@ sidebarTitle: "Create packages"
4
4
  description: "Declare Atomic package manifests for extensions, skills, subagents, prompts, themes, MCP servers, and storage adapters."
5
5
  ---
6
6
 
7
- <div id="creating-an-atomic-package" />
7
+ Bundle extensions, skills, prompt templates, themes, subagents, MCP servers, or storage adapters into an npm, git, or local Atomic package.
8
8
 
9
- To install and update packages, see [Install and manage packages](/packages) and [Package CLI commands](/reference/cli#package-commands). For filtering and precedence rules, see [Package reference](/packages/reference) and [Settings](/settings). For project trust requirements, see [Security](/security).
9
+ To install and update packages, see [Install and manage packages](/packages) and [Package CLI commands](/reference/cli#package-commands). For filtering and precedence rules, see [Package reference](/packages/reference).
10
10
 
11
- Declare package resources under the `atomic` key in `package.json` (legacy `pi` is also supported), and include `"atomic-package"` in `keywords`:
11
+ ## Package manifest
12
+
13
+ Declare resources under the `atomic` key in `package.json` (legacy `pi` is also supported) and add `"atomic-package"` to `keywords`:
12
14
 
13
15
  ```json
14
16
  {
@@ -24,14 +26,21 @@ Declare package resources under the `atomic` key in `package.json` (legacy `pi`
24
26
  }
25
27
  ```
26
28
 
27
- Manifest rules to know before adding an `atomic` key:
29
+ <Warning>
30
+ **Manifest vs. convention discovery.** For an unfiltered string package entry (`"npm:my-package"`), adding an `"atomic"` (or legacy `"pi"`) key stops auto-discovery of omitted convention directories—for example, declaring only `"mcpServers"` prevents `extensions/` from loading automatically. List every resource directory your package exposes.
31
+
32
+ Note that if a user configures a **package filter object** in `settings.json` (`{ "source": "...", ... }`), omitted manifest keys—and omitted or empty (`[]`) manifest arrays under a configured filter or `autoload: false`—fall back to scanning the package's convention directories (`extensions/`, `skills/`, `prompts/`, `themes/`).
33
+ </Warning>
28
34
 
29
- - **Manifest overrides convention discovery.** Once `package.json` contains an `"atomic"` (or legacy `"pi"`) key, Atomic stops auto-discovering omitted convention directories. For example, if you add `"atomic": { "mcpServers": "./mcp.json" }` without listing `"extensions": ["./extensions"]`, your `extensions/` directory is no longer loaded automatically. List every resource directory you want to expose.
30
- - **Paths and filters.** Every array entry in `extensions`, `skills`, `prompts`, `themes`, `storageAdapters`, and `agents` must be a string (non-string arrays are ignored). Paths resolve relative to the package root, glob expansion skips dotfiles and dot-directories, and `!`, `+`, and `-` entries filter the files matched by plain entries in the same array.
35
+ Manifest array rules:
36
+
37
+ - Every entry in `extensions`, `skills`, `prompts`, `themes`, `agents`, and `storageAdapters` must be a string (non-string arrays are ignored).
38
+ - In `extensions`, `skills`, `prompts`, `themes`, and `agents`, paths resolve relative to the package root, glob patterns skip dotfiles and dot-directories, and `!`, `+`, and `-` entries filter the files matched by plain entries in the same array. Plain globs do **not** honor `.gitignore`, `.ignore`, or `.fdignore`, whereas plain directory entries do.
39
+ - In `storageAdapters`, every entry is treated as a **literal relative path only**—globs and `!`, `+`, `-` filters are not supported.
31
40
 
32
41
  ## Subagents
33
42
 
34
- Ship [custom subagents](/subagents/authoring) via the `agents` array (relative `.md` files or directories searched recursively). Package subagents are manifest-only and are never auto-discovered from an `agents/` convention directory.
43
+ Ship [custom subagents](/subagents/authoring) via the `agents` array (relative `.md` files or directories searched recursively). Package subagents are manifest-only and are never auto-discovered from an `agents/` directory.
35
44
 
36
45
  ```json
37
46
  {
@@ -61,15 +70,17 @@ tools: read, search, bash, mcp:acme-search
61
70
  Review the change you are given without editing files. Cite each issue with file:line evidence and stop once the diff and its call paths are covered.
62
71
  ```
63
72
 
64
- - **Qualified name.** Package subagents run as `<namespace>.<name>`, where `<namespace>` is the lowercased package `name` with any `@scope/` converted to `<scope>.` (so `@acme/review-kit` with `reviewer` becomes `acme.review-kit.reviewer`; unnamed packages use their directory name). Frontmatter `package:` is ignored. Subagent names containing dots are skipped with a diagnostic, and if neither `package.json` `name` nor the directory name forms a valid namespace identifier, all agents in that package are skipped with a diagnostic.
65
- - **Pins and tools.** Attach [reasoning levels](/subagents/reference#reasoning-levels) directly to `model` and `fallbackModels`. `tools` is an exact allowlist: `mcp:<server>` adds all tools from that server, and `mcp:<server>/<tool>` adds one. Ship the server itself with [`mcpServers`](#mcp-servers).
66
- - **Launching.** From codemode, call `await tools.subagent({ agent: "acme.review-kit.reviewer", task })` without a per-call `model` so the agent's pins apply.
67
- - **Overrides and trust.** User or project agents with a matching full name (`name: reviewer` with `package: acme.review-kit`) override the package agent. Builtins have no dots and cannot be replaced by packages. Project-installed package agents require project trust; `-e` package agents load for that run.
68
- - **Lifecycle and filtering.** Run `/reload` after install, update, or remove (running subagents keep their launch definition). Filter per package with `agents` in [settings](/packages/reference#package-filtering) (`atomic config` does not list agents). `subagent` `update` and `delete` refuse package agents. Edit the package or add an override instead.
73
+ | Aspect | Behavior |
74
+ | --- | --- |
75
+ | **Qualified name** | Runs as `<namespace>.<name>`, where `<namespace>` is the lowercased `package.json` `name` with `@scope/` converted to `scope.` (`@acme/review-kit` + `reviewer` → `acme.review-kit.reviewer`; unnamed packages use their directory name). Frontmatter `package:` is ignored. Subagent names with dots, or packages without a valid namespace identifier, are skipped with a diagnostic. |
76
+ | **Models and tools** | Attach [reasoning levels](/subagents/reference#reasoning-levels) directly to `model` and `fallbackModels`. `tools` is an exact allowlist: `mcp:<server>` adds every tool on that server and `mcp:<server>/<tool>` adds one. Ship the server via [`mcpServers`](#mcp-servers). |
77
+ | **Launching** | From codemode, call `await tools.subagent({ agent: "acme.review-kit.reviewer", task })` without a per-call `model` so the agent's model pins apply. |
78
+ | **Overrides and trust** | User or project agents with matching `name:` and `package:` override the package agent. Builtins have no dots and cannot be replaced by packages. Project-installed package agents require [project trust](/security); `-e` package agents load for that run. |
79
+ | **Lifecycle and filtering** | Run `/reload` after install, update, or remove (running children keep their launch definition). Filter per package with `agents` in [`settings.json`](/packages/reference#package-filtering) (`atomic config` omits agents). `subagent` `update` and `delete` refuse package agents—edit the package or add an override instead. |
69
80
 
70
81
  ## MCP servers
71
82
 
72
- Contribute [MCP servers](/mcp-servers) via `mcpServers` in the manifest (manifest-only, never convention-discovered), either pointing to a JSON file or inline:
83
+ Contribute [MCP servers](/mcp-servers) via `mcpServers` in the manifest (manifest-only, never convention-discovered), pointing either to a JSON file or an inline object:
73
84
 
74
85
  ```json
75
86
  {
@@ -90,16 +101,16 @@ Contribute [MCP servers](/mcp-servers) via `mcpServers` in the manifest (manifes
90
101
  }
91
102
  ```
92
103
 
93
- - A referenced JSON file accepts either a top-level `"mcpServers"` or `"mcp-servers"` key.
94
- - Contributed servers follow the standard `mcp.json` schema (URL environment interpolation, `exposure`, `toolExposure`, positive `timeout` in seconds). Server names must match `^[A-Za-z0-9_-]+$`.
95
- - Relative `cwd` resolves against the package root when it does not start with `/`, `~`, or `$` (`"cwd": "."` targets files shipped in the package; absolute, home-relative, and `$VAR` paths stay as written).
104
+ - A referenced JSON file accepts a top-level `"mcpServers"` or `"mcp-servers"` key.
105
+ - Contributed servers follow the standard `mcp.json` schema (URL environment interpolation, `exposure`, `toolExposure`, positive `timeout` in seconds), and server names must match `^[A-Za-z0-9_-]+$`.
106
+ - Relative `cwd` values resolve against the package root when they do not start with `/`, `~`, or `$` (`"cwd": "."` points at the package root; absolute, home-relative, and `$VAR` paths stay as written).
96
107
  - `type: "sse"` is rejected (use streamable HTTP), and `auth.provider` is not allowed in package manifests.
97
- - Contributed servers have lowest precedence. User and project configurations can override or disable them by name, and settings can filter them via `mcpServers` patterns. Project packages contribute servers only in trusted projects.
108
+ - Contributed servers have lowest precedence so user and project configs can override or disable them by name, and settings can filter them with `mcpServers` patterns. Project packages contribute servers only in trusted projects.
98
109
  - For dynamically computed server configs, call [`atomic.registerMcpServer()`](/extensions/api-reference#atomic-registermcpserver-name-config) from an extension.
99
110
 
100
111
  ## Storage adapters
101
112
 
102
- Expose [storage adapters](/storage/custom-adapters#selecting-an-adapter) via `storageAdapters` (manifest-only, paths relative to the package root). Put database drivers in `dependencies` and `@bastani/atomic` in `peerDependencies`:
113
+ Expose [storage adapters](/storage/custom-adapters#selecting-an-adapter) via `storageAdapters` (manifest-only; literal relative file paths without globs or filter prefixes). Declare database drivers in `dependencies` and `@bastani/atomic` in `peerDependencies`:
103
114
 
104
115
  ```json
105
116
  {
@@ -110,13 +121,13 @@ Expose [storage adapters](/storage/custom-adapters#selecting-an-adapter) via `st
110
121
  }
111
122
  ```
112
123
 
113
- - Select an adapter by package name (`"storage": { "adapter": "@example/atomic-mydb" }`), which selects the first entry in `storageAdapters` when a package lists multiple adapters.
124
+ - Select a package's default adapter by package name (`"storage": { "adapter": "@example/atomic-mydb" }`), which picks the first entry in `storageAdapters`.
114
125
  - Select a specific adapter from a multi-adapter package with `<package>/<file-stem>`, where `<file-stem>` is the filename without its extension (for example `"@example/atomic-mydb/mydb-adapter"`).
115
- - Storage adapters load only from user-settings packages or explicit extension paths (`--extension <dir>` in [CLI resource options](/reference/cli#resource-options) or [`DefaultResourceLoader({ additionalExtensionPaths })`](/sdk/reference#extensions), which take precedence over settings). Project-installed packages cannot supply storage adapters, and global npm adapter lookup checks `~/.atomic/agent/npm/` only (not the system global npm root). See [Adapters from Atomic packages](/storage/custom-adapters#adapters-from-atomic-packages).
126
+ - Storage adapters load only from user-settings packages or **local** `--extension <dir>` / [`DefaultResourceLoader({ additionalExtensionPaths })`](/sdk/reference#extensions) directories (which take precedence over settings). Non-local `npm:` and `git:` `--extension` sources never register storage adapters, project-installed packages cannot supply them, and global npm lookup checks `~/.atomic/agent/npm/` only. See [Adapters from Atomic packages](/storage/custom-adapters#adapters-from-atomic-packages).
116
127
 
117
128
  ## Gallery metadata
118
129
 
119
- Include both `"atomic-package"` and legacy `"pi-package"` in `keywords` for gallery visibility, plus optional `video` (MP4; autoplays on hover and takes precedence over `image`) or `image` (PNG, JPEG, GIF, WebP):
130
+ When publishing a package for Atomic package gallery listings and previews, include `"atomic-package"` (and optionally legacy `"pi-package"`) in `keywords`, plus optional `video` (MP4; autoplays on hover in gallery cards and takes precedence over `image`) or `image` (PNG, JPEG, GIF, WebP):
120
131
 
121
132
  ```json
122
133
  {
@@ -138,20 +149,31 @@ When `package.json` has no `atomic` (or legacy `pi`) key, Atomic auto-discovers
138
149
 
139
150
  | Directory | Loaded files |
140
151
  | --- | --- |
141
- | `extensions/` | Top-level `.ts` and `.js` files, plus subdirectories containing `index.ts`, `index.js`, or a `package.json` with `atomic.extensions` (or legacy `pi.extensions`) |
152
+ | `extensions/` | Top-level `.ts` and `.js` files, plus subdirectories containing `index.ts`, `index.js`, or a `package.json` with `atomic.extensions` (or legacy `pi.extensions`, whose entries resolve as literal relative paths without globs or filters) |
142
153
  | `skills/` | Recursive `SKILL.md` folders and top-level `.md` files |
143
- | `prompts/` | `.md` files (scanned recursively inside package convention directories, unlike `.atomic/prompts/` which is non-recursive) |
144
- | `themes/` | `.json` files (scanned recursively inside package convention directories, unlike `.atomic/themes/` which is non-recursive) |
154
+ | `prompts/` | `.md` files (scanned recursively in package convention directories, unlike `.atomic/prompts/` which is non-recursive) |
155
+ | `themes/` | `.json` files (scanned recursively in package convention directories, unlike `.atomic/themes/` which is non-recursive) |
145
156
 
146
- Subagents, MCP servers, and storage adapters require an explicit manifest entry.
157
+ Subagents, MCP servers, and storage adapters always require an explicit manifest entry.
147
158
 
148
- **Legacy package workflows.** Ship repeatable procedures as [skills](/skills). Legacy workflow files in packages are never executed. Ask Atomic to [convert them into skills](/orchestration/migrating-workflows), which leaves the package untouched (project-installed packages produce project skills in trusted projects; global packages produce global skills).
159
+ <Note>
160
+ **Legacy package workflows.** Ship repeatable procedures as [skills](/skills). Legacy workflow files in packages are never executed. Ask Atomic to [convert them into skills](/orchestration/migrating-workflows), which leaves the package untouched.
161
+ </Note>
149
162
 
150
163
  ## Dependencies
151
164
 
152
- - **Third-party runtime dependencies.** Declare them in `dependencies`. Atomic runs your npm-compatible installer for npm and git packages automatically. Local path packages manage their own `node_modules`.
153
- - **Host-provided packages (`peerDependencies: "*"` only).** Never list `@bastani/atomic`, `@bastani/atomic-ai`, `@bastani/atomic-agent-core`, `@bastani/atomic-tui`, `@bastani/atomic-codemode`, `@bastani/atomic-schema`, `@bastani/atomic-telemetry`, `typebox`, `@sinclair/typebox`, or their legacy `@earendil-works/pi-*`, `@mariozechner/pi-*`, or `@bastani/pi-ai` names in `dependencies` (doing so duplicates host registries and triggers a startup warning). Declare them in `peerDependencies` with `"*"` and do not bundle them.
154
- - **Depending on other Atomic packages.** Add them to both `dependencies` and `bundledDependencies`, then reference their resources via `node_modules/...` paths (each package resolves dependencies from its own directory):
165
+ - **Third-party runtime dependencies.** Declare them in `dependencies`. Atomic installs them automatically for npm and git packages; local path packages manage their own `node_modules`.
166
+ - **Host-provided packages (`peerDependencies: "*"` only).** Never list Atomic host packages or TypeBox in `dependencies` (doing so duplicates host registries and triggers a startup warning). Declare them in `peerDependencies` with `"*"` and do not bundle them:
167
+ - `@bastani/atomic`
168
+ - `@bastani/atomic-ai`
169
+ - `@bastani/atomic-agent-core`
170
+ - `@bastani/atomic-tui`
171
+ - `@bastani/atomic-codemode`
172
+ - `@bastani/atomic-schema`
173
+ - `@bastani/atomic-telemetry`
174
+ - `typebox` and `@sinclair/typebox`
175
+ - *(Legacy aliases `@earendil-works/pi-*`, `@mariozechner/pi-*`, and `@bastani/pi-ai` are also host-provided.)*
176
+ - **Depending on other Atomic packages.** Add them to both `dependencies` and `bundledDependencies`, then point at their resources under `node_modules/...` (each package resolves dependencies from its own directory):
155
177
 
156
178
  ```json
157
179
  {