@bastani/atomic 0.10.9 → 0.10.10-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (406) hide show
  1. package/CHANGELOG.md +83 -0
  2. package/README.md +226 -163
  3. package/dist/_shared/dist-KOELCESV.js +2 -2
  4. package/dist/_shared/fork-row-index-UAUAQRD5.js +2 -2
  5. package/dist/_shared/lib-4PES5P4V.js +2 -2
  6. package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js +27 -12
  7. package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js.map +1 -1
  8. package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js +47 -7
  9. package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js.map +1 -1
  10. package/dist/_shared/mode-shared-2QJSCUM6.js +48 -19
  11. package/dist/_shared/mode-shared-2QJSCUM6.js.map +1 -1
  12. package/dist/_shared/{p1a-prewarm-UQY3X2UK.js → p1a-prewarm-XIU57JHF.js} +5 -5
  13. package/dist/_shared/{p1a-prewarm-UQY3X2UK.js.map → p1a-prewarm-XIU57JHF.js.map} +1 -1
  14. package/dist/_shared/p2-shell-main-B2WIALFD.js +30 -25
  15. package/dist/_shared/p2-shell-main-B2WIALFD.js.map +1 -1
  16. package/dist/_shared/runtime-O4KCSG4C.js +5 -5
  17. package/dist/_shared/{sdk-OSBEPR3Q.js → sdk-RRLVN7ER.js} +15 -9
  18. package/dist/_shared/sdk-RRLVN7ER.js.map +1 -0
  19. package/dist/_shared/session-data-AHTU7IS6.js +2 -2
  20. package/dist/_shared/session-manager-list-2BLEEZVG.js +1 -1
  21. package/dist/_shared/settings-startup-8-DNZ2RIHM.js +4 -1
  22. package/dist/_shared/settings-startup-8-DNZ2RIHM.js.map +1 -1
  23. package/dist/_shared/{startup-0-0-TYUFUOJZ.js → startup-0-0-4VG2G44V.js} +427 -33
  24. package/dist/_shared/startup-0-0-4VG2G44V.js.map +1 -0
  25. package/dist/_shared/{startup-0-1-W2G2UY7R.js → startup-0-1-XTIL65D4.js} +18 -11
  26. package/dist/_shared/startup-0-1-XTIL65D4.js.map +1 -0
  27. package/dist/_shared/{startup-0-2-UXBUEOXW.js → startup-0-2-27OWFHV6.js} +150 -62
  28. package/dist/_shared/startup-0-2-27OWFHV6.js.map +1 -0
  29. package/dist/_shared/startup-0-3-T4DVFYWX.js +15 -25
  30. package/dist/_shared/startup-0-3-T4DVFYWX.js.map +1 -1
  31. package/dist/_shared/{startup-0-4-HN5EB4K7.js → startup-0-4-ZMJV547D.js} +81 -12
  32. package/dist/_shared/startup-0-4-ZMJV547D.js.map +1 -0
  33. package/dist/_shared/startup-0-5-FD2P735I.js +90 -50
  34. package/dist/_shared/startup-0-5-FD2P735I.js.map +1 -1
  35. package/dist/_shared/startup-10-0-TDQNBDDL.js +5 -5
  36. package/dist/_shared/startup-12-0-55AAXBJZ.js +13 -7
  37. package/dist/_shared/startup-12-0-55AAXBJZ.js.map +1 -1
  38. package/dist/_shared/startup-14-0-MLX36RBG.js +4 -4
  39. package/dist/_shared/startup-15-0-YUKGAC63.js +4 -4
  40. package/dist/_shared/startup-15-1-4S7FLMNG.js +88 -28
  41. package/dist/_shared/startup-15-1-4S7FLMNG.js.map +1 -1
  42. package/dist/_shared/startup-8-0-34CBHPZH.js +5 -5
  43. package/dist/_shared/startup-8-1-4KANEHRA.js +61 -17
  44. package/dist/_shared/startup-8-1-4KANEHRA.js.map +1 -1
  45. package/dist/_shared/storage-command-7MGXLJGZ.js +4 -4
  46. package/dist/_shared/task-unsaved-answer-VJ2KTB4V.js +2 -2
  47. package/dist/_shared/tree-outline-MUEPK5B7.js +2 -2
  48. package/dist/builtin/intercom/CHANGELOG.md +6 -0
  49. package/dist/builtin/intercom/README.md +87 -116
  50. package/dist/builtin/intercom/broker/broker.bundle.mjs +3 -3
  51. package/dist/builtin/intercom/broker/presence-handler.ts +1 -1
  52. package/dist/builtin/intercom/group.ts +7 -3
  53. package/dist/builtin/intercom/index.bundle.mjs +1 -1
  54. package/dist/builtin/intercom/package.json +1 -1
  55. package/dist/builtin/mcp/README.md +61 -27
  56. package/dist/builtin/mcp/index.bundle.mjs +1 -1
  57. package/dist/builtin/mcp/package.json +1 -1
  58. package/dist/builtin/subagents/CHANGELOG.md +8 -0
  59. package/dist/builtin/subagents/README.md +74 -141
  60. package/dist/builtin/subagents/package.json +1 -1
  61. package/dist/builtin/subagents/src/extension/index.bundle.mjs +213 -74
  62. package/dist/builtin/web-access/CHANGELOG.md +9 -0
  63. package/dist/builtin/web-access/README.md +61 -88
  64. package/dist/builtin/web-access/index.bundle.mjs +387 -351
  65. package/dist/builtin/web-access/package.json +1 -1
  66. package/dist/cli/args.js +2 -2
  67. package/dist/cli/auth-cli.code.js +4 -4
  68. package/dist/cli/auth-cli.impl.js +3 -3
  69. package/dist/cli/auth-cli.js +3 -3
  70. package/dist/cli/blueprint-command.code.js +2 -2
  71. package/dist/cli/blueprint-command.impl.js +3 -3
  72. package/dist/cli/blueprint-command.js +3 -3
  73. package/dist/cli/intercom-command.code.js +3 -3
  74. package/dist/cli/intercom-command.impl.js +3 -3
  75. package/dist/cli/intercom-command.js +3 -3
  76. package/dist/cli/list-models.code.js +3 -3
  77. package/dist/cli/list-models.impl.js +3 -3
  78. package/dist/cli/list-models.js +3 -3
  79. package/dist/cli/session-picker.code.js +2 -2
  80. package/dist/cli/session-picker.impl.js +3 -3
  81. package/dist/cli/session-picker.js +3 -3
  82. package/dist/cli/startup-ui.code.js +2 -2
  83. package/dist/cli/startup-ui.impl.js +3 -3
  84. package/dist/cli/startup-ui.js +3 -3
  85. package/dist/cli/storage-command.impl.js +3 -3
  86. package/dist/cli/storage-command.js +3 -3
  87. package/dist/cli/storage-search-session.code.js +2 -2
  88. package/dist/cli/storage-search-session.impl.js +3 -3
  89. package/dist/cli/storage-search-session.js +3 -3
  90. package/dist/cli/team-command.code.js +2 -2
  91. package/dist/cli/team-command.impl.js +3 -3
  92. package/dist/cli/team-command.js +3 -3
  93. package/dist/cli.js +2 -2
  94. package/dist/core/agent-session-methods.d.ts +4 -1
  95. package/dist/core/agent-session-methods.js.map +1 -1
  96. package/dist/core/agent-session.d.ts +3 -0
  97. package/dist/core/compaction/compactor.d.ts +20 -14
  98. package/dist/core/compaction/errors.d.ts +120 -0
  99. package/dist/core/compaction/index.d.ts +1 -0
  100. package/dist/core/compaction/model-resolver.d.ts +2 -2
  101. package/dist/core/debug.impl.js +3 -3
  102. package/dist/core/debug.js +3 -3
  103. package/dist/core/export-html/card-projection.impl.js +3 -3
  104. package/dist/core/export-html/card-projection.js +3 -3
  105. package/dist/core/export-html/index.code.js +2 -2
  106. package/dist/core/export-html/index.impl.js +3 -3
  107. package/dist/core/export-html/index.js +3 -3
  108. package/dist/core/export-html/json-spans.impl.js +3 -3
  109. package/dist/core/export-html/json-spans.js +3 -3
  110. package/dist/core/export-html/oversized-render-inputs.impl.js +3 -3
  111. package/dist/core/export-html/oversized-render-inputs.js +3 -3
  112. package/dist/core/export-html/tool-renderer.code.js +1 -1
  113. package/dist/core/export-html/tool-renderer.impl.js +3 -3
  114. package/dist/core/export-html/tool-renderer.js +3 -3
  115. package/dist/core/extensions/api-types.d.ts +1 -1
  116. package/dist/core/extensions/api-types.js.map +1 -1
  117. package/dist/core/extensions/index.d.ts +1 -1
  118. package/dist/core/extensions/jiti-loader.impl.js +3 -3
  119. package/dist/core/extensions/jiti-loader.js +3 -3
  120. package/dist/core/extensions/jiti-static-loader.impl.js +3 -3
  121. package/dist/core/extensions/jiti-static-loader.js +3 -3
  122. package/dist/core/extensions/loader-host-modules.code.js +1 -1
  123. package/dist/core/extensions/loader-host-modules.impl.js +3 -3
  124. package/dist/core/extensions/loader-host-modules.js +3 -3
  125. package/dist/core/extensions/loader-virtual-modules.js +1 -1
  126. package/dist/core/extensions/provider-types.d.ts +18 -6
  127. package/dist/core/extensions/provider-types.js.map +1 -1
  128. package/dist/core/extensions/runner-context.js +1 -1
  129. package/dist/core/intercom-broker-control-host.code.js +1 -1
  130. package/dist/core/intercom-broker-control-host.impl.js +3 -3
  131. package/dist/core/intercom-broker-control-host.js +3 -3
  132. package/dist/core/intercom-broker-control.code.js +3 -3
  133. package/dist/core/intercom-broker-control.impl.js +3 -3
  134. package/dist/core/intercom-broker-control.js +3 -3
  135. package/dist/core/model-config.d.ts +40 -0
  136. package/dist/core/model-registry.js +1 -1
  137. package/dist/core/model-resolver-scope.d.ts +4 -4
  138. package/dist/core/model-runtime.d.ts +1 -1
  139. package/dist/core/package-manager-storage-adapters.impl.js +3 -3
  140. package/dist/core/package-manager-storage-adapters.js +3 -3
  141. package/dist/core/provider-composer-internal.d.ts +11 -2
  142. package/dist/core/sdk.code.js +3 -3
  143. package/dist/core/sdk.impl.js +3 -3
  144. package/dist/core/sdk.js +3 -3
  145. package/dist/core/session-manager-core.js +5 -5
  146. package/dist/core/session-manager-list.impl.js +3 -3
  147. package/dist/core/session-manager-list.js +3 -3
  148. package/dist/core/session-manager.code.js +1 -1
  149. package/dist/core/session-manager.impl.js +3 -3
  150. package/dist/core/session-manager.js +3 -3
  151. package/dist/core/session-storage.impl.js +3 -3
  152. package/dist/core/session-storage.js +3 -3
  153. package/dist/core/settings-manager-basic-accessors.d.ts +6 -2
  154. package/dist/core/storage/index.js +2 -2
  155. package/dist/core/storage/node-sqlite-thread.js +2 -2
  156. package/dist/core/storage/node-sqlite.js +2 -2
  157. package/dist/core/storage/offline-snapshot-file.impl.js +3 -3
  158. package/dist/core/storage/offline-snapshot-file.js +3 -3
  159. package/dist/core/storage/provider.js +2 -2
  160. package/dist/core/storage/selection.js +2 -2
  161. package/dist/core/storage/session/branch-fork-source.code.js +2 -2
  162. package/dist/core/storage/session/branch-fork-source.impl.js +3 -3
  163. package/dist/core/storage/session/branch-fork-source.js +3 -3
  164. package/dist/core/storage/session/card-view.impl.js +3 -3
  165. package/dist/core/storage/session/card-view.js +3 -3
  166. package/dist/core/storage/session/child-reader.code.js +3 -3
  167. package/dist/core/storage/session/child-reader.impl.js +3 -3
  168. package/dist/core/storage/session/child-reader.js +3 -3
  169. package/dist/core/storage/session/chunked-resume-projection.impl.js +3 -3
  170. package/dist/core/storage/session/chunked-resume-projection.js +3 -3
  171. package/dist/core/storage/session/expanded-child-details.code.js +2 -2
  172. package/dist/core/storage/session/expanded-child-details.impl.js +3 -3
  173. package/dist/core/storage/session/expanded-child-details.js +3 -3
  174. package/dist/core/storage/session/fork-row-bytes.impl.js +3 -3
  175. package/dist/core/storage/session/fork-row-bytes.js +3 -3
  176. package/dist/core/storage/session/fork-row-index.impl.js +3 -3
  177. package/dist/core/storage/session/fork-row-index.js +3 -3
  178. package/dist/core/storage/session/fork-staging.code.js +2 -2
  179. package/dist/core/storage/session/fork-staging.impl.js +3 -3
  180. package/dist/core/storage/session/fork-staging.js +3 -3
  181. package/dist/core/storage/session/fork-window.code.js +3 -3
  182. package/dist/core/storage/session/fork-window.impl.js +3 -3
  183. package/dist/core/storage/session/fork-window.js +3 -3
  184. package/dist/core/storage/session/history-pages.impl.js +3 -3
  185. package/dist/core/storage/session/history-pages.js +3 -3
  186. package/dist/core/storage/session/jsonl-entry-projection.impl.js +3 -3
  187. package/dist/core/storage/session/jsonl-entry-projection.js +3 -3
  188. package/dist/core/storage/session/jsonl-session-store.impl.js +3 -3
  189. package/dist/core/storage/session/jsonl-session-store.js +3 -3
  190. package/dist/core/storage/session/memory-session-store.impl.js +3 -3
  191. package/dist/core/storage/session/memory-session-store.js +3 -3
  192. package/dist/core/storage/session/pinned-branch-resume.code.js +3 -3
  193. package/dist/core/storage/session/pinned-branch-resume.impl.js +3 -3
  194. package/dist/core/storage/session/pinned-branch-resume.js +3 -3
  195. package/dist/core/storage/session/released-history-files.code.js +3 -3
  196. package/dist/core/storage/session/released-history-files.impl.js +3 -3
  197. package/dist/core/storage/session/released-history-files.js +3 -3
  198. package/dist/core/storage/session/resident-fork-rows.impl.js +3 -3
  199. package/dist/core/storage/session/resident-fork-rows.js +3 -3
  200. package/dist/core/storage/session/session-resume.impl.js +3 -3
  201. package/dist/core/storage/session/session-resume.js +3 -3
  202. package/dist/core/storage/session/snapshot-cut.impl.js +3 -3
  203. package/dist/core/storage/session/snapshot-cut.js +3 -3
  204. package/dist/core/storage/session/snapshot-history.code.js +3 -3
  205. package/dist/core/storage/session/snapshot-history.impl.js +3 -3
  206. package/dist/core/storage/session/snapshot-history.js +3 -3
  207. package/dist/core/storage/session/sql-session-store.code.js +1 -1
  208. package/dist/core/storage/session/sql-session-store.impl.js +3 -3
  209. package/dist/core/storage/session/sql-session-store.js +3 -3
  210. package/dist/core/storage/session/tree-outline.impl.js +3 -3
  211. package/dist/core/storage/session/tree-outline.js +3 -3
  212. package/dist/core/storage/session/tree-presentation.impl.js +3 -3
  213. package/dist/core/storage/session/tree-presentation.js +3 -3
  214. package/dist/core/storage/storage-status.impl.js +3 -3
  215. package/dist/core/storage/storage-status.js +3 -3
  216. package/dist/core/storage/team.impl.js +3 -3
  217. package/dist/core/storage/team.js +3 -3
  218. package/dist/core/structured-output/index.code.js +1 -1
  219. package/dist/core/structured-output/index.impl.js +3 -3
  220. package/dist/core/structured-output/index.js +3 -3
  221. package/dist/core/tasks/task-completion-entry.impl.js +3 -3
  222. package/dist/core/tasks/task-completion-entry.js +3 -3
  223. package/dist/core/tasks/task-file-history.code.js +3 -3
  224. package/dist/core/tasks/task-file-history.impl.js +3 -3
  225. package/dist/core/tasks/task-file-history.js +3 -3
  226. package/dist/core/tasks/task-reference-archive.code.js +4 -4
  227. package/dist/core/tasks/task-reference-archive.js +3 -3
  228. package/dist/core/tasks/task-reference-identity.code.js +1 -1
  229. package/dist/core/tasks/task-reference-identity.js +3 -3
  230. package/dist/core/tasks/task-reference-stream.impl.js +3 -3
  231. package/dist/core/tasks/task-reference-stream.js +3 -3
  232. package/dist/core/tasks/task-unsaved-answer.impl.js +3 -3
  233. package/dist/core/tasks/task-unsaved-answer.js +3 -3
  234. package/dist/core/tasks/task-view-source.impl.js +3 -3
  235. package/dist/core/tasks/task-view-source.js +3 -3
  236. package/dist/core/tools/read-url.code.js +2 -2
  237. package/dist/core/tools/read-url.impl.js +3 -3
  238. package/dist/core/tools/read-url.js +3 -3
  239. package/dist/core/worktree-snapshot/blob-store.js +2 -2
  240. package/dist/core/worktree-snapshot/errors.code.js +3 -3
  241. package/dist/core/worktree-snapshot/errors.impl.js +3 -3
  242. package/dist/core/worktree-snapshot/errors.js +3 -3
  243. package/dist/core/worktree-snapshot/session-index-reset.impl.js +3 -3
  244. package/dist/core/worktree-snapshot/session-index-reset.js +3 -3
  245. package/dist/extensions/codemode/execute.code.js +1 -1
  246. package/dist/extensions/codemode/execute.impl.js +3 -3
  247. package/dist/extensions/codemode/execute.js +3 -3
  248. package/dist/extensions/codemode/renderer.code.js +2 -2
  249. package/dist/extensions/codemode/renderer.impl.js +3 -3
  250. package/dist/extensions/codemode/renderer.js +3 -3
  251. package/dist/extensions/mcp/cli.code.js +2 -2
  252. package/dist/extensions/mcp/cli.impl.js +3 -3
  253. package/dist/extensions/mcp/cli.js +3 -3
  254. package/dist/extensions/mcp/cli.lazy.code.js +2 -2
  255. package/dist/extensions/mcp/cli.lazy.impl.js +3 -3
  256. package/dist/extensions/mcp/cli.lazy.js +3 -3
  257. package/dist/extensions/mcp/runtime.code.js +1 -1
  258. package/dist/extensions/mcp/runtime.impl.js +3 -3
  259. package/dist/extensions/mcp/runtime.js +3 -3
  260. package/dist/index-extensions.d.ts +1 -1
  261. package/dist/index.d.ts +8 -1
  262. package/dist/index.js +7 -7
  263. package/dist/main-first-time-setup.code.js +2 -2
  264. package/dist/main-first-time-setup.impl.js +3 -3
  265. package/dist/main-first-time-setup.js +3 -3
  266. package/dist/modes/interactive/components/settings-selector-types.d.ts +1 -0
  267. package/dist/modes/interactive/components/settings-selector-types.js.map +1 -1
  268. package/dist/modes/interactive/components/stored-tree-view.code.js +2 -2
  269. package/dist/modes/interactive/components/stored-tree-view.impl.js +3 -3
  270. package/dist/modes/interactive/components/stored-tree-view.js +3 -3
  271. package/dist/modes/interactive/components/user-message-selector-archive.impl.js +3 -3
  272. package/dist/modes/interactive/components/user-message-selector-archive.js +3 -3
  273. package/dist/modes/interactive/theme/color-utils.d.ts +5 -5
  274. package/dist/modes/interactive/theme/theme-loading.d.ts +1 -0
  275. package/dist/modes/interactive-engine/engine-prewarm.js +1 -1
  276. package/dist/modes/interactive-engine/remote-model-catalog.d.ts +1 -0
  277. package/dist/modes/print-mode.js +1 -1
  278. package/dist/modes/rpc/rpc-client-api.d.ts +6 -0
  279. package/dist/modes/rpc/rpc-types.d.ts +29 -2
  280. package/dist/package-manager-cli.code.js +5 -5
  281. package/dist/package-manager-cli.impl.js +3 -3
  282. package/dist/package-manager-cli.js +3 -3
  283. package/dist/rpc-entry.js +1 -1
  284. package/dist/startup-files.json +1 -1
  285. package/dist/startup-stages/5.js +1 -1
  286. package/dist/startup-stages/7.js +1 -1
  287. package/dist/startup-stages/8.js +1 -2
  288. package/dist/startup-stages/9.js +2 -1
  289. package/dist/utils/native-module.d.ts +44 -0
  290. package/dist/utils/startup-database-spare.code.js +3 -3
  291. package/dist/utils/startup-database-spare.impl.js +3 -3
  292. package/dist/utils/startup-database-spare.js +3 -3
  293. package/dist/utils/tools-manager.code.js +1 -1
  294. package/dist/utils/tools-manager.impl.js +3 -3
  295. package/dist/utils/tools-manager.js +3 -3
  296. package/docs/background-tasks.md +238 -243
  297. package/docs/build.md +21 -15
  298. package/docs/changelog.mdx +1 -1
  299. package/docs/codemode.md +68 -51
  300. package/docs/compaction/reference.md +65 -26
  301. package/docs/compaction.md +118 -66
  302. package/docs/computer-use.md +179 -146
  303. package/docs/containerization.md +87 -33
  304. package/docs/custom-provider/api-reference.md +152 -13
  305. package/docs/custom-provider/oauth.md +45 -28
  306. package/docs/custom-provider/override.md +14 -7
  307. package/docs/custom-provider/registration.md +77 -67
  308. package/docs/custom-provider/streaming.md +42 -19
  309. package/docs/custom-provider.md +26 -62
  310. package/docs/development.md +81 -42
  311. package/docs/docs.json +54 -38
  312. package/docs/environment-variables.md +92 -64
  313. package/docs/extensions/api-reference.md +326 -735
  314. package/docs/extensions/authoring.md +186 -269
  315. package/docs/extensions/events.md +308 -375
  316. package/docs/extensions/examples.md +122 -74
  317. package/docs/extensions/ui.md +217 -197
  318. package/docs/extensions.md +189 -259
  319. package/docs/getting-started/authentication.md +27 -14
  320. package/docs/getting-started/first-session.md +25 -26
  321. package/docs/getting-started/installation.md +62 -84
  322. package/docs/getting-started/project-instructions.md +39 -14
  323. package/docs/guides/configuration.md +62 -20
  324. package/docs/guides/intercom.md +20 -12
  325. package/docs/guides/non-interactive.md +31 -16
  326. package/docs/guides/orchestration.md +17 -9
  327. package/docs/guides/resume-on-any-machine.md +63 -52
  328. package/docs/guides/subagents.md +26 -14
  329. package/docs/guides/team-setup.md +49 -27
  330. package/docs/guides.md +30 -23
  331. package/docs/herdr.md +22 -17
  332. package/docs/index.md +24 -17
  333. package/docs/intercom/operations.md +90 -66
  334. package/docs/intercom/reference.md +219 -192
  335. package/docs/intercom.md +111 -92
  336. package/docs/json.md +73 -71
  337. package/docs/keybindings.md +74 -48
  338. package/docs/libraries/agent-core.md +52 -9
  339. package/docs/libraries/ai.md +90 -63
  340. package/docs/libraries/codemode.md +31 -8
  341. package/docs/libraries/schema.md +12 -9
  342. package/docs/libraries/storage-libsql.md +92 -0
  343. package/docs/libraries/storage-postgres.md +119 -0
  344. package/docs/libraries/telemetry.md +42 -9
  345. package/docs/libraries/tui.md +74 -94
  346. package/docs/libraries.md +25 -8
  347. package/docs/llama-cpp.md +38 -33
  348. package/docs/mcp-servers.md +140 -88
  349. package/docs/models/reference.md +53 -36
  350. package/docs/models-configuration.md +19 -13
  351. package/docs/models.md +102 -87
  352. package/docs/orchestration/migrating-workflows.md +22 -20
  353. package/docs/orchestration/patterns.md +36 -21
  354. package/docs/orchestration.md +24 -21
  355. package/docs/packages/authoring.md +29 -18
  356. package/docs/packages/reference.md +77 -16
  357. package/docs/packages.md +34 -34
  358. package/docs/programmatic.md +28 -21
  359. package/docs/prompt-templates.md +65 -41
  360. package/docs/providers/reference.md +36 -20
  361. package/docs/providers.md +78 -76
  362. package/docs/quickstart.md +42 -54
  363. package/docs/reference/cli.md +256 -254
  364. package/docs/reference.md +30 -23
  365. package/docs/rpc/examples.md +121 -17
  366. package/docs/rpc/extension-ui.md +86 -63
  367. package/docs/rpc/protocol.md +817 -358
  368. package/docs/rpc.md +78 -152
  369. package/docs/sdk/reference.md +309 -73
  370. package/docs/sdk/storage.md +614 -0
  371. package/docs/sdk/structured-decisions.md +168 -65
  372. package/docs/sdk/web-server.md +80 -46
  373. package/docs/sdk.md +168 -215
  374. package/docs/security.md +117 -44
  375. package/docs/session-format.md +127 -76
  376. package/docs/sessions.md +155 -113
  377. package/docs/settings.md +293 -205
  378. package/docs/shell-aliases.md +15 -6
  379. package/docs/skills/authoring.md +17 -9
  380. package/docs/skills/reference.md +23 -21
  381. package/docs/skills.md +148 -97
  382. package/docs/storage.md +172 -260
  383. package/docs/subagents/authoring.md +148 -15
  384. package/docs/subagents/reference.md +105 -29
  385. package/docs/subagents.md +247 -250
  386. package/docs/terminal-setup.md +97 -69
  387. package/docs/termux.md +51 -85
  388. package/docs/themes/reference.md +51 -37
  389. package/docs/themes.md +52 -55
  390. package/docs/tmux.md +38 -21
  391. package/docs/tools.md +209 -147
  392. package/docs/tui/reference.md +64 -32
  393. package/docs/tui.md +38 -66
  394. package/docs/usage.md +94 -86
  395. package/docs/verification.md +25 -25
  396. package/docs/web-access.md +106 -54
  397. package/docs/windows.md +55 -57
  398. package/docs/worktree-snapshots.md +82 -74
  399. package/examples/sdk/11-sessions.ts +4 -4
  400. package/package.json +8 -8
  401. package/schemas/models.schema.json +58 -7
  402. package/dist/_shared/sdk-OSBEPR3Q.js.map +0 -1
  403. package/dist/_shared/startup-0-0-TYUFUOJZ.js.map +0 -1
  404. package/dist/_shared/startup-0-1-W2G2UY7R.js.map +0 -1
  405. package/dist/_shared/startup-0-2-UXBUEOXW.js.map +0 -1
  406. package/dist/_shared/startup-0-4-HN5EB4K7.js.map +0 -1
@@ -1,10 +1,9 @@
1
1
  ---
2
- title: "Convert an earlier workflow into a skill"
3
- description: "Keep the procedure in a reusable skill without running or changing the old workflow file."
2
+ title: "Migrate an earlier workflow to a skill"
3
+ sidebarTitle: "Migrate workflows"
4
+ description: "Convert legacy Atomic workflow files into reusable skills without executing or modifying the originals."
4
5
  ---
5
6
 
6
- # Convert an earlier workflow into a skill
7
-
8
7
  Ask Atomic in chat or invoke `/skill:workflow-files`:
9
8
 
10
9
  ```text
@@ -15,40 +14,40 @@ Convert .atomic/workflows/triage.ts into a skill
15
14
  /skill:workflow-files .atomic/workflows/triage.ts
16
15
  ```
17
16
 
18
- To convert and run immediately, include your inputs, for example: "Run the triage workflow on these reports." Startup notices may mention legacy workflow files, but Atomic writes nothing automatically.
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.
19
18
 
20
19
  How conversion works:
21
20
 
22
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/`.
23
22
  - The original workflow file is never imported, executed, edited, or deleted.
24
- - Existing skills are never overwritten. Pick a new name or reuse the existing skill.
25
- - Workflow files in untrusted projects are never offered for conversion. Global workflows still convert. For an explicitly trusted external source inside an untrusted project, Atomic asks before saving globally.
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.
26
25
 
27
26
  | Workflow source | Output skill location |
28
27
  | --- | --- |
29
28
  | Trusted project `.atomic/workflows/`, `.pi/workflows/`, project settings paths, project-installed packages | `.atomic/skills/<name>/` |
30
29
  | `~/.atomic/agent/workflows/`, global settings paths, globally installed packages | `~/.atomic/agent/skills/<name>/` (or `skills/` in your agent directory) |
31
- | Package via `-e`, or trusted borrowed project folder | Current trusted project's `.atomic/skills/<name>/` (never the external tree) |
30
+ | Package loaded via `-e`, or a trusted external project directory | Current trusted project's `.atomic/skills/<name>/` (never the external tree) |
32
31
 
33
- 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 [orchestration](/orchestration).
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).
34
33
 
35
34
  ## What conversion preserves
36
35
 
37
36
  | Earlier workflow API | Equivalent in the converted skill |
38
37
  | --- | --- |
39
- | `ctx.stage`, `ctx.task`, model and thinking | Codemode `tools.subagent()` launches in the parent chat that keep prompts, inputs, and model pins. |
38
+ | `ctx.stage`, `ctx.task`, model and thinking | Codemode `tools.subagent()` launches in the main chat that keep prompts, inputs, and model pins. |
40
39
  | Stage `fallbackModels`, `tools`, `mcp` | Named [custom subagent](/subagents/authoring) launched without per-call `model` ([Pinned stages](#pinned-stages)). |
41
- | `ctx.parallel`, loops, retries | `tasks` batches, explicit round caps, and checks between notices (plus Intercom `group` for peers). |
40
+ | `ctx.parallel`, loops, retries | `tasks` batches, explicit round caps, and checks between notices (plus [Intercom](/intercom) `group` for peers). |
42
41
  | `ctx.tool`, deterministic helpers | Reviewed scripts in `scripts/` with validated args, timeouts, and exit checks. |
43
42
  | Inputs, `ctx.ui`, approvals | Skill arguments and defaults plus `ask_user_question` steps (an unanswered approval is never a pass). |
44
- | Nested `ctx.workflow` | Separately converted skill called by name (the parent still owns all subagent launches). |
45
- | Structured outputs, `ctx.exit`, blocked states | Per-child output files validated by codemode, stopping on failure or missing prerequisites. |
43
+ | Nested `ctx.workflow` | Separately converted skill called by name (the main session still owns all subagent launches). |
44
+ | Structured outputs, `ctx.exit`, blocked states | Per-subagent output files validated by codemode, stopping on failure or missing prerequisites. |
46
45
 
47
- 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).
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).
48
47
 
49
48
  ### Pinned stages
50
49
 
51
- When a stage pinned `fallbackModels`, exact `tools`, or `mcp` servers, conversion writes a companion agent file in `.atomic/agents/` (project) or `~/.atomic/agent/agents/` (global) without overwriting existing agents, and asks before adding any MCP server to config:
50
+ When a stage pinned `fallbackModels`, exact `tools`, or `mcp` servers, conversion writes a companion agent file in `.atomic/agents/` (project) or `~/.atomic/agent/agents/` (global) without overwriting existing agents. Conversion never copies MCP secrets into agent definitions, and asks before adding any MCP server to config:
52
51
 
53
52
  ```markdown
54
53
  ---
@@ -62,18 +61,18 @@ tools: read, search, mcp:issue-tracker
62
61
  Classify the report you are given as bug, feature, or question, with file:line evidence.
63
62
  ```
64
63
 
65
- The skill launches it without a `model` override so the agent's pins apply:
64
+ Both comma-separated strings and YAML lists work for `fallbackModels` and `tools` in agent frontmatter. The skill launches the agent without a `model` override so the agent's pins apply:
66
65
 
67
66
  ```js
68
67
  const launch = await tools.subagent({ agent: "triage-reviewer", task: report });
69
68
  ```
70
69
 
71
- Package maintainers can ask Atomic to place the skill and agents directly in the package's [`agents` manifest field](/packages/authoring#subagents), where they run as `<namespace>.<name>` (for example `acme.triage.triage-reviewer`).
70
+ Package maintainers can ask Atomic to place the skill and agents directly in the package's [`agents` manifest field](/packages/authoring#subagents), where they run as `<namespace>.<name>` (derived from `package.json` `name`, so `@acme/triage` becomes `acme.triage.triage-reviewer`).
72
71
 
73
- ## If you used a builtin name
72
+ ## Replacing removed built-in workflows
74
73
 
75
74
  - `classify-and-act`, `fan-out-and-synthesize`, `adversarial-verification`, `generate-and-filter`, `tournament`, and `loop-until-done` map to the matching [orchestration patterns](/orchestration/patterns).
76
- - `ralph` maps to a research, implementation, and review loop in the parent chat with an explicit round limit.
75
+ - `ralph` maps to a research, implementation, and review loop in the main chat with an explicit round limit.
77
76
  - `goal` maps to combining [loop-until-done](/orchestration/patterns#loop-until-done) with [adversarial verification](/orchestration/patterns#adversarial-verification).
78
77
  - `open-claude-design` maps to `/skill:impeccable` with your design brief and target artifact.
79
78
 
@@ -82,4 +81,7 @@ Package maintainers can ask Atomic to place the skill and agents directly in the
82
81
  Old workflow data is safe to leave alone. To reclaim space, back it up and stop any older Atomic binaries first, then remove only workflow-only directories under `~/.atomic/workflows/`:
83
82
 
84
83
  - Safe to delete if unused: `runs/`, `pool/`, and `journal/`.
85
- - **Do not delete:** `~/.atomic/workflows/journal.sqlite` and its sidecar files (they store sessions), the entire `~/.atomic/workflows/` directory, shared databases, or your workflow source files. Custom storage paths may differ.
84
+
85
+ <Warning>
86
+ Do not delete `~/.atomic/workflows/journal.sqlite` or its sidecar files (they store your Atomic sessions), the entire `~/.atomic/workflows/` directory, shared databases, or your workflow source files. Custom storage paths may differ. See [Workflow data from earlier releases](/storage#workflow-data-from-earlier-releases) for details on what Atomic keeps and ignores.
87
+ </Warning>
@@ -1,17 +1,16 @@
1
1
  ---
2
2
  title: "Orchestration patterns"
3
- description: "Seven ways to split work, keep track of the children, and verify what they produced."
3
+ sidebarTitle: "Patterns"
4
+ description: "Seven reusable patterns for splitting work across subagents, isolating edits, and verifying results."
4
5
  ---
5
6
 
6
- # Orchestration patterns
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
8
 
8
- 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 the parent. A child claiming "done" is not proof.
9
-
10
- Each snippet below is a short codemode call from the parent chat, not a long-lived script. After any restart, reconcile `status` with [saved receipts](/orchestration#what-survives-interruption) before launching more children.
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).
11
10
 
12
11
  ## Prompt anatomy
13
12
 
14
- Make every child assignment self-contained so it does not rely on the parent's full history:
13
+ Make every subagent assignment self-contained so it does not rely on the main chat's full history:
15
14
 
16
15
  - **Objective and why it matters.** Name the decision or change that depends on the output.
17
16
  - **Inputs and permissions.** List the exact files or paths to read, what may be edited, and what is out of scope.
@@ -26,7 +25,7 @@ Example prompt:
26
25
  Specify observable outcomes rather than effort:
27
26
 
28
27
  - For fixes, name the changed behavior, adjacent behavior that must remain unchanged, and checks proving both.
29
- - For reviews, distinguish "checked and found nothing" from "could not verify." Re-run key checks in the parent before acting on results. See [Verification and evidence](/verification).
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).
30
29
 
31
30
  ### Stop conditions
32
31
 
@@ -37,12 +36,12 @@ Define upfront when to halt, such as an attempt cap, a missing prerequisite, con
37
36
  - **Fit.** Check whether one direct command answers the question faster than delegation.
38
37
  - **Isolation.** Give each writer a distinct worktree or disjoint files, and launch dependent tasks only after prerequisites pass.
39
38
  - **Handoffs.** Pass file paths and output schemas rather than raw transcripts.
40
- - **Recovery.** Store child IDs, target commits, and next checks so restarts reconcile before re-running side effects.
39
+ - **Recovery.** Store subagent IDs, target commits, and next checks so restarts reconcile before re-running side effects.
41
40
  - **Approval.** Keep permission to publish or merge separate from permission to implement.
42
41
 
43
42
  ## Classify-and-act
44
43
 
45
- Triage input with a read-only child, validate the returned label in the parent, then dispatch the right specialist:
44
+ Triage input with a read-only subagent, validate the returned label in the main session, then dispatch the right specialist:
46
45
 
47
46
  ```js
48
47
  const { label, report } = load("triage");
@@ -52,7 +51,7 @@ store("triage:action", r.tasks);
52
51
  return r.tasks;
53
52
  ```
54
53
 
55
- On recovery, check `status` for an existing action child before launching another, and verify the fix against the original report.
54
+ On recovery, check `status` for an existing action subagent before launching another, and verify the fix against the original report.
56
55
 
57
56
  ## Fan-out-and-synthesize
58
57
 
@@ -70,11 +69,11 @@ store("platforms", r.tasks);
70
69
  return r.tasks;
71
70
  ```
72
71
 
73
- Synthesize only after every required child settles, and reconcile contradictions against source code. On restart, recover results by task ID instead of repeating the whole batch.
72
+ Synthesize only after every required subagent settles, and reconcile contradictions against source code. On restart, recover results by task ID instead of repeating the whole batch.
74
73
 
75
74
  ## Adversarial verification
76
75
 
77
- Give a fresh read-only child the acceptance criteria and candidate, without the author's conclusion, and ask for a failing input:
76
+ Give a [fresh](/subagents#fresh-vs-forked-context) read-only subagent the acceptance criteria and candidate, without the author's conclusion, and ask for a failing input:
78
77
 
79
78
  ```js
80
79
  const r = await tools.subagent({
@@ -86,16 +85,17 @@ store("date:review", r.tasks);
86
85
  return r.tasks;
87
86
  ```
88
87
 
89
- Verify reported failures in the parent by checking real exit codes before requesting repairs. With multiple reviewers, collect independent verdicts first, then allow one bounded Intercom debate. A reproducible failing case beats a majority vote. For user interfaces, [exercise the real interface](/computer-use).
88
+ Verify reported failures in the main session by checking real exit codes before requesting repairs. With multiple reviewers, collect independent verdicts first, then allow one bounded [Intercom](/intercom) debate. A reproducible failing case beats a majority vote. For user interfaces, [exercise the real interface](/computer-use).
90
89
 
91
90
  ## Generate-and-filter
92
91
 
93
- Ask children for concrete candidates, then filter all of them with one deterministic check in codemode:
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):
94
93
 
95
94
  ```js
96
95
  const r = await tools.subagent({
96
+ context: "fresh",
97
97
  tasks: ["year boundary", "leap day"].map((topic) => ({
98
- agent: "worker",
98
+ agent: "codebase-analyzer",
99
99
  task: `Return three distinct dates around a ${topic} as a JSON string array. Don't edit files.`,
100
100
  })),
101
101
  });
@@ -107,10 +107,11 @@ Parse each result as data, drop malformed or duplicate entries, and keep only va
107
107
 
108
108
  ## Tournament
109
109
 
110
- Compare competing approaches on identical fixtures with pre-agreed scoring and tie-breaking rules, and isolate edits in named worktrees:
110
+ Compare competing approaches on identical fixtures with pre-agreed scoring and tie-breaking rules, and isolate edits in [named worktrees](/subagents#named-worktrees):
111
111
 
112
112
  ```js
113
113
  const r = await tools.subagent({
114
+ context: "fresh",
114
115
  tasks: ["lookup-table", "parser"].map((strategy) => ({
115
116
  agent: "worker",
116
117
  task: `Implement the ${strategy} approach on your own branch; return the commit and test command.`,
@@ -121,27 +122,41 @@ store("candidates:round1", r.tasks);
121
122
  return r.tasks;
122
123
  ```
123
124
 
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.
129
+
124
130
  Record scores, commit SHAs, and round numbers so restarts never double-advance a candidate. Never pick a winner that fails a required check.
125
131
 
126
132
  ## Loop-until-done
127
133
 
128
- Run the project's verification command in the parent between bounded repair rounds:
134
+ Run the project's verification command in the main session between bounded repair rounds. Pass a foreground `wait` budget suited to your test suite, and handle the string return value in case the command yields to a [background shell](/background-tasks#background-shells):
129
135
 
130
136
  ```js
131
- const check = await tools.bash({ command: "npm test" });
137
+ const check = await tools.bash({
138
+ command: "npm test",
139
+ wait: { kind: "foreground", budgetMs: 60000 },
140
+ });
141
+ if (typeof check === "string") {
142
+ return `Test suite is still running in the background. Wait for completion before repairing.\n${check}`;
143
+ }
132
144
  if (check.exit_code === 0) return "Passed";
133
145
  const round = load("repair:round") ?? 0;
134
146
  if (round >= 3) return "Still failing after three repair attempts.";
147
+ const output = typeof check.output === "string" ? check.output.slice(-2000) : "";
135
148
  const r = await tools.subagent({
136
149
  agent: "debugger",
137
- task: `Repair the test failure; don't suppress the test.\n${check.output.slice(-2000)}`,
150
+ task: `Repair the test failure; don't suppress the test.\n${output}`,
138
151
  });
139
152
  store("repair:round", round + 1);
140
153
  store("repair:last", r.tasks);
141
154
  return r.tasks;
142
155
  ```
143
156
 
144
- Run only after the previous child settles, and stop on refusal, missing prerequisites, or approval gates. On restart, inspect the checkout and rerun the check before spending another round.
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.
158
+
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.
145
160
 
146
161
  ## Stacked slices
147
162
 
@@ -159,4 +174,4 @@ store("cli-slice", r.tasks);
159
174
  return r.tasks;
160
175
  ```
161
176
 
162
- Verify each slice against its base and run full integration checks at the tip. Run independent slices in parallel instead.
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.
@@ -1,17 +1,18 @@
1
1
  ---
2
- title: "Orchestration with codemode and subagents"
3
- description: "Run multi-step work in chat, keep track of background children, and convert an earlier workflow file into a reusable skill."
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."
4
5
  ---
5
6
 
6
- # Orchestration with codemode and subagents
7
-
8
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."
9
8
 
10
- The parent chat decides whether to answer directly, run checks in [codemode](/codemode), or split work across [subagents](/subagents).
9
+ Your main session decides whether to answer directly, run checks in [codemode](/codemode), or split work across [subagents](/subagents).
10
+
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).
11
12
 
12
13
  ## Launch now, use the result later
13
14
 
14
- The snippet below is JavaScript that the parent model 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.
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.
15
16
 
16
17
  ```js
17
18
  const launch = await tools.subagent({
@@ -24,37 +25,39 @@ store("guide-review", launch.tasks);
24
25
  return launch.tasks;
25
26
  ```
26
27
 
27
- - **Admission, not completion.** `await` resolves once children are admitted. Admitted or queued slots return `{ taskId, childId }`; refused slots return `{ reason }` with no running child. The parent can continue working or end its turn. Completion notices return results automatically, and `/tasks` lets you inspect children directly.
28
- - **Explicit wait.** When a later step needs a result immediately, wait briefly without launching a second child:
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):
29
31
 
30
32
  ```js
31
33
  // @options: {"timeout_ms": 10000}
32
34
  const task = load("guide-review").find((t) => t.taskId);
33
- if (!task) return "No review was admitted.";
35
+ if (!task) return "No review was started.";
34
36
  return await tools.subagent({ action: "wait", id: task.taskId, budgetMs: 2000 });
35
37
  ```
36
38
 
37
- - **Cancellation and evidence.** Hitting `budgetMs` or interrupting the script never stops an admitted child. Use `tools.subagent({ action: "quit", id: childId })` to stop it. Treat actual child results and status, not launch receipts, as evidence, and account for every required child in joint reviews.
38
- - **Flat delegation.** Only the parent launches subagents. If a child uncovers follow-up work, it reports back so the parent can launch the next batch.
39
- - **Peer messaging.** Pass `group: true` or a shared named `group` so children can coordinate over Intercom. Address them with the exact `intercomTarget` from the launch receipt ([Intercom from codemode](/intercom/reference#from-codemode-scripts)). A delivery acknowledgement is not a task result.
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.
40
43
 
41
- ## What survives interruption?
44
+ ## What survives interruption
42
45
 
43
- Children are persisted sessions; codemode scripts are not checkpointed programs.
46
+ Subagents are persisted sessions; codemode scripts are not checkpointed programs.
44
47
 
45
- - Reopening the original parent session automatically restores unfinished children. Paused or quit children resume from `/tasks` or `tools.subagent({ action: "resume", id: childId })`.
46
- - The parent resumes in chat from notices, saved results, and decisions instead of re-entering an old JavaScript loop.
47
- - Save small handoff state, such as task IDs, round count, and next checks, with [the codemode store](/codemode#store-values), which persists per branch when a script succeeds. Tool side effects happen even if a script later fails, so inspect `/tasks`, chat, and changed files before retrying.
48
- - 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 children only after checking what they left behind.
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.
49
52
 
50
53
  ## Choose a pattern
51
54
 
52
55
  - [Classify-and-act](/orchestration/patterns#classify-and-act) triages input first, then dispatches the matching specialist.
53
- - [Fan-out-and-synthesize](/orchestration/patterns#fan-out-and-synthesize) splits an analysis across parallel children and reconciles their findings.
54
- - [Adversarial verification](/orchestration/patterns#adversarial-verification) asks an independent child to break a candidate.
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.
55
58
  - [Generate-and-filter](/orchestration/patterns#generate-and-filter) collects candidates and keeps only those passing a deterministic check.
56
59
  - [Tournament](/orchestration/patterns#tournament) compares competing implementations on shared fixtures.
57
60
  - [Loop-until-done](/orchestration/patterns#loop-until-done) runs verification checks between bounded repair rounds.
58
61
  - [Stacked slices](/orchestration/patterns#stacked-slices) branches each dependent slice from the verified prior commit.
59
62
 
60
- To migrate an earlier workflow file or built-in name, see [Convert an earlier workflow into a skill](/orchestration/migrating-workflows). To save new repeatable procedures, use a [skill](/skills#skills-as-workflows).
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).
@@ -1,13 +1,14 @@
1
1
  ---
2
- title: Creating packages
3
- description: Create an Atomic package, lay out its structure, and declare dependencies.
2
+ title: "Create and publish packages"
3
+ sidebarTitle: "Create packages"
4
+ description: "Declare Atomic package manifests for extensions, skills, subagents, prompts, themes, MCP servers, and storage adapters."
4
5
  ---
5
6
 
6
- # Creating packages
7
+ <div id="creating-an-atomic-package" />
7
8
 
8
- ## Creating an Atomic package
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
10
 
10
- Declare resources under the `atomic` key in `package.json` (legacy `pi` is still supported as a shim; paths are relative to the package root and support globs and `!exclusions`), and include `"atomic-package"` in `keywords`:
11
+ Declare package resources under the `atomic` key in `package.json` (legacy `pi` is also supported), and include `"atomic-package"` in `keywords`:
11
12
 
12
13
  ```json
13
14
  {
@@ -23,7 +24,12 @@ Declare resources under the `atomic` key in `package.json` (legacy `pi` is still
23
24
  }
24
25
  ```
25
26
 
26
- ### Subagents
27
+ Manifest rules to know before adding an `atomic` key:
28
+
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.
31
+
32
+ ## Subagents
27
33
 
28
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.
29
35
 
@@ -55,13 +61,13 @@ tools: read, search, bash, mcp:acme-search
55
61
  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.
56
62
  ```
57
63
 
58
- - **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, and names containing dots are skipped.
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.
59
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).
60
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.
61
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.
62
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.
63
69
 
64
- ### MCP servers
70
+ ## MCP servers
65
71
 
66
72
  Contribute [MCP servers](/mcp-servers) via `mcpServers` in the manifest (manifest-only, never convention-discovered), either pointing to a JSON file or inline:
67
73
 
@@ -84,11 +90,14 @@ Contribute [MCP servers](/mcp-servers) via `mcpServers` in the manifest (manifes
84
90
  }
85
91
  ```
86
92
 
87
- - Contributed servers use the standard `mcp.json` schema (URL environment interpolation, `exposure`, `toolExposure`, `timeout` in seconds). Relative `cwd` resolves against the package root (`"cwd": "."` targets files shipped in the package). `auth.provider` is not allowed in package manifests.
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).
96
+ - `type: "sse"` is rejected (use streamable HTTP), and `auth.provider` is not allowed in package manifests.
88
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.
89
98
  - For dynamically computed server configs, call [`atomic.registerMcpServer()`](/extensions/api-reference#atomic-registermcpserver-name-config) from an extension.
90
99
 
91
- ### Storage adapters
100
+ ## Storage adapters
92
101
 
93
102
  Expose [storage adapters](/storage#selecting-an-adapter) via `storageAdapters` (manifest-only, paths relative to the package root). Put database drivers in `dependencies` and `@bastani/atomic` in `peerDependencies`:
94
103
 
@@ -101,9 +110,11 @@ Expose [storage adapters](/storage#selecting-an-adapter) via `storageAdapters` (
101
110
  }
102
111
  ```
103
112
 
104
- Select an adapter by package name (`"storage": { "adapter": "@example/atomic-libsql" }`) or `<package>/<file-stem>` when a package exports multiple adapters. Adapters load only from user-settings packages or explicit extension paths (`--extension <dir>` or `additionalExtensionPaths`, which take precedence over settings). See [Adapters from Atomic packages](/storage#adapters-from-atomic-packages).
113
+ - Select an adapter by package name (`"storage": { "adapter": "@example/atomic-libsql" }`), which selects the first entry in `storageAdapters` when a package lists multiple adapters.
114
+ - 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-libsql/libsql-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#adapters-from-atomic-packages).
105
116
 
106
- ### Gallery metadata
117
+ ## Gallery metadata
107
118
 
108
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):
109
120
 
@@ -123,14 +134,14 @@ Include both `"atomic-package"` and legacy `"pi-package"` in `keywords` for gall
123
134
 
124
135
  ### Convention directories
125
136
 
126
- Without an `atomic` (or legacy `pi`) manifest key, Atomic auto-discovers:
137
+ When `package.json` has no `atomic` (or legacy `pi`) key, Atomic auto-discovers these directories:
127
138
 
128
139
  | Directory | Loaded files |
129
140
  | --- | --- |
130
- | `extensions/` | `.ts` and `.js` files |
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`) |
131
142
  | `skills/` | Recursive `SKILL.md` folders and top-level `.md` files |
132
- | `prompts/` | `.md` files |
133
- | `themes/` | `.json` 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) |
134
145
 
135
146
  Subagents, MCP servers, and storage adapters require an explicit manifest entry.
136
147
 
@@ -139,8 +150,8 @@ Subagents, MCP servers, and storage adapters require an explicit manifest entry.
139
150
  ## Dependencies
140
151
 
141
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`.
142
- - **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`, 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.
143
- - **Depending on other Atomic packages.** Add them to both `dependencies` and `bundledDependencies`, then reference their resources via `node_modules/...` paths (each package loads with its own isolated module root):
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):
144
155
 
145
156
  ```json
146
157
  {
@@ -1,13 +1,14 @@
1
1
  ---
2
- title: Package reference
3
- description: Package filtering, scope, and deduplication contracts.
2
+ title: "Package reference"
3
+ sidebarTitle: "Packages"
4
+ description: "Reference for package resource filtering patterns, glob vs exact matching, autoload overrides, precedence, and deduplication."
4
5
  ---
5
6
 
6
- # Package reference
7
+ This page is the reference for package filtering, `autoload: false`, precedence, and deduplication. To install and manage packages, see [Install and manage packages](/packages) and [Package CLI commands](/reference/cli#package-commands). To publish a package, see [Create and publish packages](/packages/authoring). For project trust rules, see [Security](/security). To load local packages programmatically in the SDK, use [`DefaultResourceLoader({ additionalExtensionPaths })`](/sdk/reference#extensions).
7
8
 
8
9
  ## Package filtering
9
10
 
10
- Use the object form in `settings.json` to filter which resources load from a package:
11
+ Use the object form in [`settings.json`](/settings) to filter which resources load from a package:
11
12
 
12
13
  ```json
13
14
  {
@@ -26,23 +27,83 @@ Use the object form in `settings.json` to filter which resources load from a pac
26
27
  }
27
28
  ```
28
29
 
29
- Pattern rules (applied on top of the package manifest):
30
+ Package filters run on top of the files collected from the package manifest (or convention directories when the package has no `atomic` manifest key). A filter cannot force-include files that the package manifest omitted or excluded.
30
31
 
31
- | Pattern | Meaning |
32
- | --- | --- |
33
- | *(key omitted)* | Load all resources of this type |
34
- | `[]` | Load none of this type |
35
- | `!pattern` | Exclude matching entries |
36
- | `+path` / `+name` | Force-include an exact relative path (or server name for `mcpServers`) |
37
- | `-path` / `-name` | Force-exclude an exact relative path (or server name for `mcpServers`) |
32
+ ### Pattern syntax
38
33
 
39
- - In top-level `extensions`, `skills`, `prompts`, and `themes` arrays, patterns expand `~` to your home directory (for example `!~/skills/legacy-*` or `-~/skills/legacy`).
34
+ | Entry | Mode | Meaning |
35
+ | --- | --- | --- |
36
+ | *(key omitted)* | Default | Load all resources of this type exposed by the package |
37
+ | `[]` | Empty | Load no resources of this type |
38
+ | `pattern` (plain) | Glob (`minimatch`) | Restrict to entries matching at least one plain pattern |
39
+ | `!pattern` | Glob (`minimatch`) | Exclude matching entries |
40
+ | `+path` / `+name` | Exact match | Force-include an exact relative path, full path, or MCP server name |
41
+ | `-path` / `-name` | Exact match | Force-exclude an exact relative path, full path, or MCP server name |
42
+
43
+ ### Glob vs exact matching rules
44
+
45
+ - **Glob patterns (plain and `!pattern`)** use `minimatch` (case-sensitive, POSIX `/` separators on all platforms; `*` matches within one path segment, `**` crosses segments, `?` matches one character):
46
+ - For file resources (`extensions`, `skills`, `prompts`, `themes`, `agents`), globs test the relative path from the package root (or settings directory), the bare filename (`basename`), and the full path.
47
+ - For `SKILL.md` files, globs also test the skill's parent directory (relative path, directory basename, and full path). Writing `"!my-skill"` excludes `skills/my-skill/SKILL.md`.
48
+ - For `mcpServers`, globs test the server name from the manifest.
49
+ - **Exact patterns (`+path` and `-path`)** strip leading `./` or `.\`, expand `~` in top-level settings arrays, and normalize slashes to `/`:
50
+ - For file resources, exact patterns match **only** the exact relative path or exact full path, plus the exact parent directory path for `SKILL.md` files (for example `"-skills/my-skill"` excludes `skills/my-skill/SKILL.md`).
51
+ - Exact patterns do **not** match bare filenames. Writing `"-legacy.json"` will not exclude `themes/legacy.json`; use `"-themes/legacy.json"` or `"!legacy.json"` instead.
52
+ - For `mcpServers`, `+name` and `-name` match exact server names.
53
+
54
+ ### Evaluation order
55
+
56
+ In **normal mode** (`autoload` omitted or `true`), operator type decides precedence regardless of array order:
57
+
58
+ 1. **Plain include globs:** if any plain patterns exist, narrow the set to files matching at least one of them; if none exist, start with every manifest resource.
59
+ 2. **`!pattern` glob excludes:** remove matching entries.
60
+ 3. **`+path` / `+name` exact force-includes:** re-add matching manifest entries (overrides plain filters and `!pattern`).
61
+ 4. **`-path` / `-name` exact force-excludes:** remove matching entries last (`-` always beats `+`).
62
+
63
+ With **`"autoload": false`**, evaluation switches to **array order (last match wins)**:
64
+
65
+ - On a **project** entry matching a **global** package, `"autoload": false` starts from the inherited global selection and applies each entry in array order as a delta override without discovering new resources from the package.
66
+ - On a **standalone** package (not present in global settings), `"autoload": false` starts empty and loads only resources explicitly enabled by matching entries in array order.
67
+
68
+ ```json
69
+ {
70
+ "packages": [
71
+ {
72
+ "source": "npm:my-package",
73
+ "autoload": false,
74
+ "extensions": ["-extensions/heavy.ts", "+extensions/project-helper.ts"]
75
+ }
76
+ ]
77
+ }
78
+ ```
79
+
80
+ ### Top-level settings arrays
81
+
82
+ Top-level `extensions`, `skills`, `prompts`, and `themes` arrays in `settings.json` mix additive file or directory paths with `!`, `+`, and `-` filter patterns applied to both those paths and auto-discovered resources in the same scope:
83
+
84
+ - Patterns expand `~` to your home directory (for example `"!~/skills/legacy-*"` or `"-~/skills/legacy"`).
85
+ - Toggle built-in extensions (`builtin:codemode`, `builtin:tool-search`, `builtin:llama.cpp`) in the top-level `extensions` array with `"-builtin:<name>"` or `"+builtin:<name>"`.
40
86
  - Package [subagents](/packages/authoring#subagents) have no top-level settings array. Filter them per package with `agents` (matching paths relative to the package root).
41
87
  - `mcpServers` matches server names from the manifest rather than file paths.
42
88
 
43
89
  ## Scope and deduplication
44
90
 
45
- - **Project overrides global.** When the same package appears in both global and project settings, the project entry wins.
46
- - **Adjusting without autoloading.** Set `"autoload": false` on a project entry to filter inherited global resources without discovering new ones.
91
+ - **Project overrides global.** When the same package appears in both global and project settings, the project entry wins (unless `"autoload": false` is set on the project entry to adjust the inherited global selection).
92
+ - **Listing packages.** `atomic list` displays `User packages` and `Project packages` separately and marks object-form entries with `(filtered)`.
93
+ - **Package identity.** Atomic deduplicates packages by npm package name (`npm`), normalized repository URL without `@ref` (`git`), or resolved canonical path (`local`, so `./pkg` and `/abs/path/to/pkg` match as the same package).
47
94
  - **Subagent collisions.** When multiple packages define the same full subagent name, `-e` packages take precedence over project-installed packages, which take precedence over globally installed packages.
48
- - **Package identity.** Atomic matches packages by npm package name (`npm`), repository URL without `@ref` (`git`), or resolved absolute path (`local`).
95
+
96
+ ### Resource precedence order
97
+
98
+ When multiple sources declare a skill, prompt template, or theme with the same name, Atomic keeps the first match in this order:
99
+
100
+ 1. Packages passed with `-e` / `--extension`
101
+ 2. Project `settings.json` top-level resource arrays (`skills`, `prompts`, `themes`)
102
+ 3. Project auto-discovered directories (`.atomic/`, then legacy `.pi/`, plus `.agents/skills/` for skills)
103
+ 4. Global `settings.json` top-level resource arrays
104
+ 5. Global auto-discovered directories (`~/.atomic/agent/`, then legacy `~/.pi/agent/`, plus `~/.agents/skills/` for skills)
105
+ 6. Configured packages (project packages, then global packages)
106
+ 7. Bundled packages (`@bastani/subagents`, `@bastani/intercom`)
107
+ 8. Explicit CLI flags (`--skill`, `--prompt-template`, `--theme`)
108
+
109
+ For prompt templates, an inherited legacy `.pi` template yields to a bundled template with the same name. For extensions, `-e` flags load before configured and auto-discovered extensions.