@bastani/atomic 0.10.14 → 0.10.15-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.
- package/CHANGELOG.md +31 -0
- package/README.md +1 -1
- package/dist/_shared/dist-KOELCESV.js +2 -2
- package/dist/_shared/fork-row-index-UAUAQRD5.js +2 -2
- package/dist/_shared/lib-4PES5P4V.js +2 -2
- package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js +3 -3
- package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js +3 -3
- package/dist/_shared/mode-shared-2QJSCUM6.js +3 -3
- package/dist/_shared/p1a-prewarm-XIU57JHF.js +3 -3
- package/dist/_shared/runtime-O4KCSG4C.js +2 -2
- package/dist/_shared/{sdk-B5LEWGGI.js → sdk-OHKMDJ74.js} +27 -5
- package/dist/_shared/{sdk-B5LEWGGI.js.map → sdk-OHKMDJ74.js.map} +1 -1
- package/dist/_shared/session-data-AHTU7IS6.js +2 -2
- package/dist/_shared/startup-0-0-Q3MWKUK4.js +2 -2
- package/dist/_shared/startup-0-1-M6OWAYHH.js +2 -2
- package/dist/_shared/{startup-0-2-5QHPCEON.js → startup-0-2-2HUMCPKX.js} +14 -16
- package/dist/_shared/startup-0-2-2HUMCPKX.js.map +1 -0
- package/dist/_shared/startup-0-3-4ZYBYQNM.js +3 -3
- package/dist/_shared/startup-0-4-ZMJV547D.js +3 -3
- package/dist/_shared/startup-0-5-YDW47QX6.js +3 -3
- package/dist/_shared/startup-10-0-TDQNBDDL.js +3 -3
- package/dist/_shared/startup-14-0-MLX36RBG.js +1 -1
- package/dist/_shared/startup-15-0-YUKGAC63.js +1 -1
- package/dist/_shared/startup-15-1-4S7FLMNG.js +6 -30
- package/dist/_shared/startup-15-1-4S7FLMNG.js.map +1 -1
- package/dist/_shared/startup-8-0-34CBHPZH.js +3 -3
- package/dist/_shared/startup-8-1-LZFXSD3Z.js +3 -3
- package/dist/_shared/storage-command-7MGXLJGZ.js +2 -2
- package/dist/_shared/storage-status-K7PX2RXA.js +3 -3
- package/dist/_shared/task-unsaved-answer-VJ2KTB4V.js +2 -2
- package/dist/_shared/tree-outline-MUEPK5B7.js +2 -2
- package/dist/builtin/intercom/index.bundle.mjs +1 -1
- package/dist/builtin/intercom/package.json +1 -1
- package/dist/builtin/mcp/index.bundle.mjs +1 -1
- package/dist/builtin/mcp/package.json +1 -1
- package/dist/builtin/subagents/package.json +1 -1
- package/dist/builtin/subagents/src/extension/index.bundle.mjs +1 -1
- package/dist/builtin/web-access/index.bundle.mjs +1 -1
- package/dist/builtin/web-access/package.json +1 -1
- package/dist/cli/auth-cli.code.js +1 -1
- package/dist/cli/auth-cli.impl.js +3 -3
- package/dist/cli/auth-cli.js +3 -3
- package/dist/cli/blueprint-command.impl.js +3 -3
- package/dist/cli/blueprint-command.js +3 -3
- package/dist/cli/intercom-command.code.js +3 -3
- package/dist/cli/intercom-command.impl.js +3 -3
- package/dist/cli/intercom-command.js +3 -3
- package/dist/cli/list-models.impl.js +3 -3
- package/dist/cli/list-models.js +3 -3
- package/dist/cli/session-picker.code.js +1 -1
- package/dist/cli/session-picker.impl.js +3 -3
- package/dist/cli/session-picker.js +3 -3
- package/dist/cli/startup-ui.code.js +1 -1
- package/dist/cli/startup-ui.impl.js +3 -3
- package/dist/cli/startup-ui.js +3 -3
- package/dist/cli/storage-command.impl.js +3 -3
- package/dist/cli/storage-command.js +3 -3
- package/dist/cli/storage-search-session.code.js +1 -1
- package/dist/cli/storage-search-session.impl.js +3 -3
- package/dist/cli/storage-search-session.js +3 -3
- package/dist/cli/team-command.code.js +1 -1
- package/dist/cli/team-command.impl.js +3 -3
- package/dist/cli/team-command.js +3 -3
- package/dist/cli.js +2 -2
- package/dist/core/compaction/compactor.d.ts +0 -8
- package/dist/core/debug.impl.js +3 -3
- package/dist/core/debug.js +3 -3
- package/dist/core/export-html/card-projection.impl.js +3 -3
- package/dist/core/export-html/card-projection.js +3 -3
- package/dist/core/export-html/index.code.js +2 -2
- package/dist/core/export-html/index.impl.js +3 -3
- package/dist/core/export-html/index.js +3 -3
- package/dist/core/export-html/json-spans.impl.js +3 -3
- package/dist/core/export-html/json-spans.js +3 -3
- package/dist/core/export-html/oversized-render-inputs.impl.js +3 -3
- package/dist/core/export-html/oversized-render-inputs.js +3 -3
- package/dist/core/export-html/tool-renderer.impl.js +3 -3
- package/dist/core/export-html/tool-renderer.js +3 -3
- package/dist/core/extensions/jiti-loader.impl.js +3 -3
- package/dist/core/extensions/jiti-loader.js +3 -3
- package/dist/core/extensions/jiti-static-loader.impl.js +3 -3
- package/dist/core/extensions/jiti-static-loader.js +3 -3
- package/dist/core/extensions/loader-host-modules.impl.js +3 -3
- package/dist/core/extensions/loader-host-modules.js +3 -3
- package/dist/core/intercom-broker-control-host.code.js +1 -1
- package/dist/core/intercom-broker-control-host.impl.js +3 -3
- package/dist/core/intercom-broker-control-host.js +3 -3
- package/dist/core/intercom-broker-control.code.js +2 -2
- package/dist/core/intercom-broker-control.impl.js +3 -3
- package/dist/core/intercom-broker-control.js +3 -3
- package/dist/core/package-manager-storage-adapters.impl.js +3 -3
- package/dist/core/package-manager-storage-adapters.js +3 -3
- package/dist/core/sdk.code.js +1 -1
- package/dist/core/sdk.impl.js +3 -3
- package/dist/core/sdk.js +3 -3
- package/dist/core/session-manager-core.js +3 -3
- package/dist/core/session-manager-list.impl.js +3 -3
- package/dist/core/session-manager-list.js +3 -3
- package/dist/core/session-manager.impl.js +3 -3
- package/dist/core/session-manager.js +3 -3
- package/dist/core/session-storage.impl.js +3 -3
- package/dist/core/session-storage.js +3 -3
- package/dist/core/storage/index.js +2 -2
- package/dist/core/storage/node-sqlite-thread.js +2 -2
- package/dist/core/storage/node-sqlite.js +2 -2
- package/dist/core/storage/offline-snapshot-file.impl.js +3 -3
- package/dist/core/storage/offline-snapshot-file.js +3 -3
- package/dist/core/storage/provider.js +2 -2
- package/dist/core/storage/selection.js +2 -2
- package/dist/core/storage/session/branch-fork-source.code.js +2 -2
- package/dist/core/storage/session/branch-fork-source.impl.js +3 -3
- package/dist/core/storage/session/branch-fork-source.js +3 -3
- package/dist/core/storage/session/card-view.impl.js +3 -3
- package/dist/core/storage/session/card-view.js +3 -3
- package/dist/core/storage/session/child-reader.code.js +2 -2
- package/dist/core/storage/session/child-reader.impl.js +3 -3
- package/dist/core/storage/session/child-reader.js +3 -3
- package/dist/core/storage/session/chunked-resume-projection.impl.js +3 -3
- package/dist/core/storage/session/chunked-resume-projection.js +3 -3
- package/dist/core/storage/session/expanded-child-details.code.js +2 -2
- package/dist/core/storage/session/expanded-child-details.impl.js +3 -3
- package/dist/core/storage/session/expanded-child-details.js +3 -3
- package/dist/core/storage/session/fork-row-bytes.impl.js +3 -3
- package/dist/core/storage/session/fork-row-bytes.js +3 -3
- package/dist/core/storage/session/fork-row-index.impl.js +3 -3
- package/dist/core/storage/session/fork-row-index.js +3 -3
- package/dist/core/storage/session/fork-staging.code.js +1 -1
- package/dist/core/storage/session/fork-staging.impl.js +3 -3
- package/dist/core/storage/session/fork-staging.js +3 -3
- package/dist/core/storage/session/fork-window.code.js +2 -2
- package/dist/core/storage/session/fork-window.impl.js +3 -3
- package/dist/core/storage/session/fork-window.js +3 -3
- package/dist/core/storage/session/history-pages.impl.js +3 -3
- package/dist/core/storage/session/history-pages.js +3 -3
- package/dist/core/storage/session/jsonl-entry-projection.impl.js +3 -3
- package/dist/core/storage/session/jsonl-entry-projection.js +3 -3
- package/dist/core/storage/session/jsonl-session-store.impl.js +3 -3
- package/dist/core/storage/session/jsonl-session-store.js +3 -3
- package/dist/core/storage/session/memory-session-store.impl.js +3 -3
- package/dist/core/storage/session/memory-session-store.js +3 -3
- package/dist/core/storage/session/pinned-branch-resume.code.js +2 -2
- package/dist/core/storage/session/pinned-branch-resume.impl.js +3 -3
- package/dist/core/storage/session/pinned-branch-resume.js +3 -3
- package/dist/core/storage/session/released-history-files.code.js +1 -1
- package/dist/core/storage/session/released-history-files.impl.js +3 -3
- package/dist/core/storage/session/released-history-files.js +3 -3
- package/dist/core/storage/session/resident-fork-rows.impl.js +3 -3
- package/dist/core/storage/session/resident-fork-rows.js +3 -3
- package/dist/core/storage/session/session-resume.impl.js +3 -3
- package/dist/core/storage/session/session-resume.js +3 -3
- package/dist/core/storage/session/snapshot-cut.impl.js +3 -3
- package/dist/core/storage/session/snapshot-cut.js +3 -3
- package/dist/core/storage/session/snapshot-history.code.js +2 -2
- package/dist/core/storage/session/snapshot-history.impl.js +3 -3
- package/dist/core/storage/session/snapshot-history.js +3 -3
- package/dist/core/storage/session/sql-session-store.code.js +1 -1
- package/dist/core/storage/session/sql-session-store.impl.js +3 -3
- package/dist/core/storage/session/sql-session-store.js +3 -3
- package/dist/core/storage/session/tree-outline.impl.js +3 -3
- package/dist/core/storage/session/tree-outline.js +3 -3
- package/dist/core/storage/session/tree-presentation.impl.js +3 -3
- package/dist/core/storage/session/tree-presentation.js +3 -3
- package/dist/core/storage/storage-status.impl.js +3 -3
- package/dist/core/storage/storage-status.js +3 -3
- package/dist/core/storage/team.impl.js +3 -3
- package/dist/core/storage/team.js +3 -3
- package/dist/core/structured-output/index.code.js +1 -1
- package/dist/core/structured-output/index.impl.js +3 -3
- package/dist/core/structured-output/index.js +3 -3
- package/dist/core/tasks/task-completion-entry.impl.js +3 -3
- package/dist/core/tasks/task-completion-entry.js +3 -3
- package/dist/core/tasks/task-file-history.code.js +2 -2
- package/dist/core/tasks/task-file-history.impl.js +3 -3
- package/dist/core/tasks/task-file-history.js +3 -3
- package/dist/core/tasks/task-reference-archive.code.js +2 -2
- package/dist/core/tasks/task-reference-archive.js +3 -3
- package/dist/core/tasks/task-reference-identity.js +3 -3
- package/dist/core/tasks/task-reference-stream.impl.js +3 -3
- package/dist/core/tasks/task-reference-stream.js +3 -3
- package/dist/core/tasks/task-unsaved-answer.impl.js +3 -3
- package/dist/core/tasks/task-unsaved-answer.js +3 -3
- package/dist/core/tasks/task-view-source.impl.js +3 -3
- package/dist/core/tasks/task-view-source.js +3 -3
- package/dist/core/tools/read-url.impl.js +3 -3
- package/dist/core/tools/read-url.js +3 -3
- package/dist/core/worktree-snapshot/blob-store.js +2 -2
- package/dist/core/worktree-snapshot/errors.code.js +1 -1
- package/dist/core/worktree-snapshot/errors.impl.js +3 -3
- package/dist/core/worktree-snapshot/errors.js +3 -3
- package/dist/core/worktree-snapshot/session-index-reset.impl.js +3 -3
- package/dist/core/worktree-snapshot/session-index-reset.js +3 -3
- package/dist/extensions/codemode/execute.impl.js +3 -3
- package/dist/extensions/codemode/execute.js +3 -3
- package/dist/extensions/codemode/renderer.impl.js +3 -3
- package/dist/extensions/codemode/renderer.js +3 -3
- package/dist/extensions/mcp/cli.code.js +1 -1
- package/dist/extensions/mcp/cli.impl.js +3 -3
- package/dist/extensions/mcp/cli.js +3 -3
- package/dist/extensions/mcp/cli.lazy.code.js +2 -2
- package/dist/extensions/mcp/cli.lazy.impl.js +3 -3
- package/dist/extensions/mcp/cli.lazy.js +3 -3
- package/dist/extensions/mcp/runtime.code.js +1 -1
- package/dist/extensions/mcp/runtime.impl.js +3 -3
- package/dist/extensions/mcp/runtime.js +3 -3
- package/dist/index.d.ts +21 -1
- package/dist/index.js +2 -2
- package/dist/main-first-time-setup.code.js +1 -1
- package/dist/main-first-time-setup.impl.js +3 -3
- package/dist/main-first-time-setup.js +3 -3
- package/dist/modes/interactive/components/stored-tree-view.code.js +2 -2
- package/dist/modes/interactive/components/stored-tree-view.impl.js +3 -3
- package/dist/modes/interactive/components/stored-tree-view.js +3 -3
- package/dist/modes/interactive/components/user-message-selector-archive.impl.js +3 -3
- package/dist/modes/interactive/components/user-message-selector-archive.js +3 -3
- package/dist/modes/print-mode.js +1 -1
- package/dist/package-manager-cli.code.js +2 -2
- package/dist/package-manager-cli.impl.js +3 -3
- package/dist/package-manager-cli.js +3 -3
- package/dist/startup-files.json +1 -1
- package/dist/startup-stages/6.js +1 -1
- package/dist/utils/startup-database-spare.code.js +1 -1
- package/dist/utils/startup-database-spare.impl.js +3 -3
- package/dist/utils/startup-database-spare.js +3 -3
- package/dist/utils/tools-manager.impl.js +3 -3
- package/dist/utils/tools-manager.js +3 -3
- package/docs/background-tasks/reference.md +182 -0
- package/docs/background-tasks.md +98 -405
- package/docs/build.md +67 -27
- package/docs/changelog.mdx +11 -1
- package/docs/codemode.md +108 -39
- package/docs/compaction/branch-summaries.md +54 -0
- package/docs/compaction/custom-compactors.md +161 -0
- package/docs/compaction/memory-compaction.md +77 -0
- package/docs/compaction/reference.md +86 -38
- package/docs/compaction.md +51 -252
- package/docs/computer-use.md +169 -321
- package/docs/containerization.md +71 -57
- package/docs/custom-provider/api-reference.md +119 -25
- package/docs/custom-provider/oauth.md +114 -132
- package/docs/custom-provider/override.md +37 -27
- package/docs/custom-provider/registration.md +107 -83
- package/docs/custom-provider/streaming.md +85 -71
- package/docs/custom-provider.md +85 -52
- package/docs/development.md +39 -29
- package/docs/docs.json +80 -67
- package/docs/environment-variables.md +94 -44
- package/docs/extensions/api-reference.md +86 -43
- package/docs/extensions/authoring.md +162 -154
- package/docs/extensions/events.md +80 -25
- package/docs/extensions/examples.md +90 -85
- package/docs/extensions/ui.md +206 -82
- package/docs/extensions.md +79 -108
- package/docs/getting-started/authentication.md +67 -36
- package/docs/getting-started/first-session.md +53 -43
- package/docs/getting-started/installation.md +117 -90
- package/docs/getting-started/project-instructions.md +48 -34
- package/docs/guides/configuration.md +82 -20
- package/docs/guides/non-interactive.md +66 -24
- package/docs/guides/resume-on-any-machine.md +135 -82
- package/docs/guides/team-setup.md +114 -105
- package/docs/guides.md +76 -32
- package/docs/herdr.md +16 -17
- package/docs/how-atomic-works.md +140 -0
- package/docs/index.md +58 -44
- package/docs/intercom/operations.md +141 -151
- package/docs/intercom/reference.md +85 -108
- package/docs/intercom.md +84 -145
- package/docs/json.md +120 -67
- package/docs/keybindings.md +85 -49
- package/docs/libraries/agent-core.md +137 -275
- package/docs/libraries/ai.md +100 -84
- package/docs/libraries/codemode.md +210 -300
- package/docs/libraries/schema.md +59 -53
- package/docs/libraries/storage-postgres.md +49 -35
- package/docs/libraries/telemetry.md +153 -354
- package/docs/libraries/tui.md +265 -393
- package/docs/libraries.md +42 -26
- package/docs/llama-cpp.md +171 -161
- package/docs/mcp-servers.md +90 -51
- package/docs/models/choose-a-model.md +188 -0
- package/docs/models/reference.md +74 -30
- package/docs/models.md +153 -88
- package/docs/orchestration/migrating-workflows.md +23 -16
- package/docs/orchestration/patterns.md +39 -44
- package/docs/orchestration.md +65 -26
- package/docs/packages/authoring.md +51 -29
- package/docs/packages/reference.md +42 -21
- package/docs/packages.md +69 -58
- package/docs/programmatic.md +118 -24
- package/docs/prompt-templates.md +84 -83
- package/docs/providers/reference.md +43 -48
- package/docs/providers.md +219 -451
- package/docs/quickstart.md +140 -120
- package/docs/reference/cli.md +135 -97
- package/docs/reference.md +20 -19
- package/docs/rpc/examples.md +76 -20
- package/docs/rpc/extension-ui.md +64 -38
- package/docs/rpc/protocol.md +361 -110
- package/docs/rpc.md +57 -17
- package/docs/sdk/reference.md +409 -534
- package/docs/sdk/storage.md +53 -13
- package/docs/sdk/structured-decisions.md +82 -56
- package/docs/sdk/web-server.md +57 -43
- package/docs/sdk.md +106 -84
- package/docs/security.md +42 -64
- package/docs/session-format.md +62 -38
- package/docs/sessions.md +99 -214
- package/docs/settings.md +165 -195
- package/docs/shell-aliases.md +9 -6
- package/docs/skills/authoring.md +69 -48
- package/docs/skills/reference.md +51 -20
- package/docs/skills.md +99 -148
- package/docs/slash-commands.md +129 -0
- package/docs/storage/custom-adapters.md +160 -85
- package/docs/storage/jsonl.md +81 -66
- package/docs/storage/postgres/pgbouncer.md +120 -126
- package/docs/storage/postgres/tuning.md +120 -143
- package/docs/storage/postgres.md +314 -330
- package/docs/storage/sqlite.md +71 -42
- package/docs/storage.md +298 -302
- package/docs/subagents/authoring.md +55 -38
- package/docs/subagents/reference.md +73 -33
- package/docs/subagents.md +119 -187
- package/docs/terminal-setup.md +51 -39
- package/docs/themes/reference.md +23 -19
- package/docs/themes.md +142 -127
- package/docs/tmux.md +47 -55
- package/docs/tools.md +147 -109
- package/docs/tui/reference.md +166 -214
- package/docs/tui.md +196 -341
- package/docs/usage.md +118 -138
- package/docs/verification.md +79 -51
- package/docs/web-access.md +121 -101
- package/docs/windows.md +26 -27
- package/docs/worktree-snapshots/reference.md +245 -0
- package/docs/worktree-snapshots.md +71 -259
- package/package.json +8 -8
- package/dist/_shared/startup-0-2-5QHPCEON.js.map +0 -1
- package/docs/guides/intercom.md +0 -32
- package/docs/guides/orchestration.md +0 -28
- package/docs/guides/subagents.md +0 -37
- package/docs/termux.md +0 -118
|
@@ -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
|
-
|
|
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
|
-
|
|
10
|
-
|
|
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
|
-
|
|
15
|
-
```
|
|
13
|
+
```text
|
|
14
|
+
Convert .atomic/workflows/triage.ts into a skill
|
|
15
|
+
```
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
```text
|
|
18
|
+
/skill:workflow-files .atomic/workflows/triage.ts
|
|
19
|
+
```
|
|
18
20
|
|
|
19
|
-
|
|
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
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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
|
|
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: "
|
|
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
|
|
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
|
-
|
|
9
|
+
## Choose a pattern
|
|
10
10
|
|
|
11
|
-
|
|
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
|
-
|
|
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
|
|
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
|
|
78
|
+
tasks: ["year-boundary", "leap-day"].map((category) => ({
|
|
98
79
|
agent: "codebase-analyzer",
|
|
99
|
-
task: `Return three
|
|
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("
|
|
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
|
|
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
|
-
|
|
126
|
-
|
|
127
|
-
|
|
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
|
|
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
|
-
|
|
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"
|
|
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
|
+
```
|
package/docs/orchestration.md
CHANGED
|
@@ -1,18 +1,29 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "Orchestrate
|
|
3
|
-
sidebarTitle: "
|
|
4
|
-
description: "
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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
|
-
|
|
40
|
-
- **Cancellation and evidence.** Hitting `budgetMs`, returning early, or
|
|
41
|
-
- **One-level delegation.** Only the main session launches subagents. If a subagent
|
|
42
|
-
- **Peer messaging.** Pass `group: true` to create a unique shared [Intercom](/intercom) group for
|
|
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
|
|
49
|
-
-
|
|
50
|
-
- Save small handoff state
|
|
51
|
-
-
|
|
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
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
-
|
|
60
|
-
|
|
61
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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)
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
30
|
-
|
|
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/`
|
|
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
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
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
|
|
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
|
|
94
|
-
- Contributed servers follow the standard `mcp.json` schema (URL environment interpolation, `exposure`, `toolExposure`, positive `timeout` in seconds)
|
|
95
|
-
- Relative `cwd`
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
|
144
|
-
| `themes/` | `.json` files (scanned recursively
|
|
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
|
-
|
|
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
|
|
153
|
-
- **Host-provided packages (`peerDependencies: "*"` only).** Never list
|
|
154
|
-
-
|
|
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
|
{
|