@bastani/atomic 0.9.19-alpha.6 → 0.9.19-alpha.8

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 (119) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +2 -2
  3. package/dist/builtin/intercom/package.json +1 -1
  4. package/dist/builtin/mcp/package.json +1 -1
  5. package/dist/builtin/subagents/package.json +1 -1
  6. package/dist/builtin/web-access/CHANGELOG.md +6 -0
  7. package/dist/builtin/web-access/index.bundle.mjs +22 -3
  8. package/dist/builtin/web-access/package.json +1 -1
  9. package/dist/builtin/workflows/CHANGELOG.md +19 -0
  10. package/dist/builtin/workflows/README.md +1 -1
  11. package/dist/builtin/workflows/builtin/adversarial-verification.js +2 -2
  12. package/dist/builtin/workflows/builtin/{chunk-vhmnzdj9.js → chunk-1jth021m.js} +1 -1
  13. package/dist/builtin/workflows/builtin/{chunk-p8jjwfg6.js → chunk-2377r57g.js} +4 -2
  14. package/dist/builtin/workflows/builtin/{chunk-hbnwv56f.js → chunk-31j2gs7h.js} +2 -2
  15. package/dist/builtin/workflows/builtin/{chunk-n8zysf1t.js → chunk-ngkqkzej.js} +1 -1
  16. package/dist/builtin/workflows/builtin/{chunk-1nbq96fh.js → chunk-nkrafh9s.js} +1 -1
  17. package/dist/builtin/workflows/builtin/{chunk-1kx4aggw.js → chunk-wf741bv3.js} +2 -2
  18. package/dist/builtin/workflows/builtin/{chunk-t6x2d78s.js → chunk-z29qbehr.js} +1 -1
  19. package/dist/builtin/workflows/builtin/generate-and-filter.js +2 -2
  20. package/dist/builtin/workflows/builtin/goal.js +3 -3
  21. package/dist/builtin/workflows/builtin/index.js +7 -7
  22. package/dist/builtin/workflows/builtin/ralph.js +3 -3
  23. package/dist/builtin/workflows/builtin/tournament.js +2 -2
  24. package/dist/builtin/workflows/package.json +1 -1
  25. package/dist/builtin/workflows/src/extension/index.bundle.mjs +590 -256
  26. package/dist/builtin/workflows/src/index.js +67 -19
  27. package/dist/builtin/workflows/src/shared/authoring-contract-stage.d.ts +2 -0
  28. package/dist/modes/interactive/components/task-live-transcript.d.ts +1 -1
  29. package/dist/modes/interactive/components/task-live-transcript.d.ts.map +1 -1
  30. package/dist/modes/interactive/components/task-live-transcript.js +19 -11
  31. package/dist/modes/interactive/components/task-live-transcript.js.map +1 -1
  32. package/docs/background-tasks.md +1 -1
  33. package/docs/build.md +51 -0
  34. package/docs/changelog.mdx +8 -8
  35. package/docs/compaction/reference.md +267 -0
  36. package/docs/compaction.md +36 -219
  37. package/docs/computer-use.md +35 -0
  38. package/docs/containerization.md +2 -0
  39. package/docs/custom-provider/api-reference.md +145 -0
  40. package/docs/custom-provider/oauth.md +131 -0
  41. package/docs/custom-provider/override.md +34 -0
  42. package/docs/custom-provider/registration.md +163 -0
  43. package/docs/custom-provider/streaming.md +214 -0
  44. package/docs/custom-provider.md +43 -607
  45. package/docs/development.md +76 -0
  46. package/docs/docs.json +199 -77
  47. package/docs/environment-variables.md +1 -1
  48. package/docs/extensions/api-reference.md +1001 -0
  49. package/docs/extensions/authoring.md +676 -0
  50. package/docs/extensions/events.md +793 -0
  51. package/docs/extensions/examples.md +94 -0
  52. package/docs/extensions/ui.md +470 -0
  53. package/docs/extensions.md +270 -2768
  54. package/docs/getting-started/authentication.md +55 -0
  55. package/docs/getting-started/first-session.md +172 -0
  56. package/docs/getting-started/installation.md +154 -0
  57. package/docs/getting-started/project-instructions.md +43 -0
  58. package/docs/guides/configuration.md +65 -0
  59. package/docs/guides/intercom.md +24 -0
  60. package/docs/guides/non-interactive.md +33 -0
  61. package/docs/guides/subagents.md +24 -0
  62. package/docs/guides/workflows.md +27 -0
  63. package/docs/guides.md +41 -0
  64. package/docs/index.md +13 -45
  65. package/docs/intercom/operations.md +178 -0
  66. package/docs/intercom/reference.md +146 -0
  67. package/docs/intercom.md +54 -259
  68. package/docs/json.md +17 -0
  69. package/docs/llama-cpp.md +5 -0
  70. package/docs/models/artificial-analysis-index.md +89 -0
  71. package/docs/models/evals.md +2 -2
  72. package/docs/models/model-selection.md +3 -3
  73. package/docs/models/pareto-efficiency.md +2 -2
  74. package/docs/models/reference.md +601 -0
  75. package/docs/models.md +45 -550
  76. package/docs/packages/authoring.md +88 -0
  77. package/docs/packages/reference.md +43 -0
  78. package/docs/packages.md +28 -107
  79. package/docs/programmatic.md +29 -0
  80. package/docs/prompt-templates.md +11 -0
  81. package/docs/providers/reference.md +23 -0
  82. package/docs/providers.md +10 -15
  83. package/docs/quickstart.md +44 -238
  84. package/docs/reference/cli.md +252 -0
  85. package/docs/reference.md +52 -0
  86. package/docs/rpc/examples.md +64 -0
  87. package/docs/rpc/extension-ui.md +198 -0
  88. package/docs/rpc/protocol.md +1341 -0
  89. package/docs/rpc.md +109 -1346
  90. package/docs/sdk/reference.md +1090 -0
  91. package/docs/sdk.md +56 -1002
  92. package/docs/session-format.md +2 -0
  93. package/docs/sessions.md +6 -10
  94. package/docs/settings.md +6 -45
  95. package/docs/skills/authoring.md +95 -0
  96. package/docs/skills/reference.md +60 -0
  97. package/docs/skills.md +20 -122
  98. package/docs/subagents/authoring.md +37 -0
  99. package/docs/subagents/reference.md +60 -0
  100. package/docs/subagents.md +39 -95
  101. package/docs/terminal-setup.md +1 -1
  102. package/docs/themes/reference.md +176 -0
  103. package/docs/themes.md +21 -135
  104. package/docs/tmux.md +5 -0
  105. package/docs/tools/edit.md +5 -0
  106. package/docs/tools.md +5 -0
  107. package/docs/tui/reference.md +343 -0
  108. package/docs/tui.md +23 -286
  109. package/docs/usage.md +26 -209
  110. package/docs/web-access.md +2 -0
  111. package/docs/windows.md +2 -1
  112. package/docs/workflows/api-reference.md +11 -4
  113. package/docs/workflows/authoring.md +4 -2
  114. package/docs/workflows/builtins.md +2 -2
  115. package/docs/workflows/operations.md +15 -10
  116. package/docs/workflows/reliable-design.md +21 -3
  117. package/docs/workflows/verification.md +8 -0
  118. package/npm-shrinkwrap.json +32 -32
  119. package/package.json +3 -3
@@ -0,0 +1,55 @@
1
+ ---
2
+ title: Authentication
3
+ description: Connect Atomic to a provider with a subscription login or an API key.
4
+ ---
5
+
6
+ # Authentication
7
+
8
+ **Outcome:** Atomic can reach a model provider and `/model` lists models you can select.
9
+
10
+ **Prerequisites:** [Installation](/getting-started/installation) is complete.
11
+
12
+ ## Authenticate
13
+
14
+ Atomic can use subscription providers through `/login`, or API-key providers through environment variables or the auth file.
15
+
16
+ ### Option 1: subscription login
17
+
18
+ Start Atomic and run:
19
+
20
+ ```text
21
+ /login
22
+ ```
23
+
24
+ Choose **Use a subscription**, then select a provider. Built-in subscription logins include Claude Pro/Max, ChatGPT Plus/Pro (Codex), and GitHub Copilot.
25
+
26
+ ### Option 2: API key
27
+
28
+ Set an API key before launching Atomic:
29
+
30
+ ```bash
31
+ export ANTHROPIC_API_KEY=sk-ant-...
32
+ atomic
33
+ ```
34
+
35
+ You can also run `/login`, choose **Use an API key**, then select a provider to store the key in `~/.atomic/agent/auth.json`.
36
+
37
+ See [Providers](/providers) for all supported providers, environment variables, and cloud-provider setup.
38
+
39
+ ## Verify authentication
40
+
41
+ Start Atomic in any directory and run:
42
+
43
+ ```text
44
+ /model
45
+ ```
46
+
47
+ Expected result: the model picker opens and lists selectable models for the provider you just configured, with the active one marked. If it opens empty, or Atomic reports that no provider is configured, re-run `/login`, or confirm the API-key environment variable is exported in the same shell you launched Atomic from.
48
+
49
+ `/login` opens **Select authentication method:**. Choose **Use a subscription** or **Use an API key** to see the corresponding provider picker and credential-configuration status. That status can reflect stored, environment, runtime, or configuration credentials; it does not test connectivity or prove that a provider will accept a request.
50
+
51
+ Select a model with `/model`, then send a short prompt such as `Reply with hello.` A successful response confirms access for that request. If it fails, check the reported authentication, quota, model-access, or network error before retrying. A configured credential or a listed model alone does not prove access.
52
+
53
+ ## Next step
54
+
55
+ Continue to [First session](/getting-started/first-session).
@@ -0,0 +1,172 @@
1
+ ---
2
+ title: First session
3
+ description: Start Atomic, run a first task, invoke a built-in workflow, and steer a run.
4
+ ---
5
+
6
+ # First session
7
+
8
+ **Outcome:** You complete one interactive task and know how to monitor and steer it.
9
+
10
+ **Prerequisites:** [Authentication](/getting-started/authentication) is complete.
11
+
12
+ ## First session
13
+
14
+ On a fresh install with no prior Atomic startup state, Atomic shows a one-time first-run explanation after any What's New notes and directly above the input box describing Atomic as a verifiable coding agent runtime for building and running agent workflows you can feel confident in. Returning users with prior startup state are marked onboarded automatically and continue directly into the normal chat UI; stored credentials by themselves do not skip the first-run explanation. The composer is the normal Atomic input from the start: type a message, run `/login` first if no provider is connected, or launch a workflow command without a special onboarding transition.
15
+
16
+ Once Atomic starts, default to a workflow for non-trivial work and for requests with inherent structure plus a verifiable objective. Implementation, build, debugging, bug fixes, migrations, features, scoped multi-file edits, validation/review work, and loop-shaped requests are workflow candidates; reserve direct chat for tiny deterministic low-risk answers or edits where tracking clearly adds more overhead than value.
17
+
18
+ Workflow-first is not builtin-only or monolithic. Atomic can discover and run named builtin, project, user, and package workflows; author a rich custom TypeScript `workflow({...})` inline; and compositionally import reusable workflow definitions—including builtins from `@bastani/atomic/workflows/builtin`—into parent workflows with `ctx.workflow(...)`. Nested children can nest again within `maxDepth`, so custom graphs can combine proven research, implementation, design, verification, and approval workflows instead of copying them. They can also classify and branch, dynamically fan out and synthesize artifacts, run adversarial repair cycles, tournament-rank candidates, and loop until checks pass with explicit bounds.
19
+
20
+ Atomic turns repeatable engineering loops into executable stages with inspectable evidence instead of relying on a markdown checklist the model may or may not follow.
21
+
22
+ ## Verify the session
23
+
24
+ Run one bounded task and watch it complete. In a repository you know, type:
25
+
26
+ ```text
27
+ List the top-level directories in this repository and say what each one holds.
28
+ ```
29
+
30
+ Expected result: Atomic streams a response, calls `read` on a directory, `find`, or `bash` at least once — each tool call is shown inline as it runs — and finishes with a summary naming directories that actually exist in your checkout. A response that names nothing from your repository means the session started outside the directory you meant; quit, `cd` to the right place, and start Atomic again.
31
+
32
+ Then confirm the session was recorded:
33
+
34
+ ```bash
35
+ atomic -r
36
+ ```
37
+
38
+ Expected result: the session picker lists the run you just finished. That session is what `atomic -c` resumes.
39
+
40
+ ## Go further
41
+
42
+ With a session working, these are the fuller capabilities to reach for next. None of them is required for a first successful session.
43
+
44
+ ### Try the built-in workflows
45
+
46
+ Atomic ships with nine workflows you can run immediately. Use `/workflow list` to see them and `/workflow inputs <name>` to inspect their inputs in your environment.
47
+
48
+ | Workflow | When to use | Example |
49
+ |---|---|---|
50
+ | `classify-and-act` | Route requests through structured classification and low-confidence human fallback. | `/workflow classify-and-act prompt="Triage and handle this request"` |
51
+ | `fan-out-and-synthesize` | Partition independent slices, including repository-focused research, and synthesize their artifact evidence. | `/workflow fan-out-and-synthesize prompt="Map payment retries by subsystem and synthesize cited findings"` |
52
+ | `adversarial-verification` | Challenge a candidate with fresh verifiers and bounded repair. | `/workflow adversarial-verification task="Verify the migration patch"` |
53
+ | `generate-and-filter` | Generate, dedupe, filter, optionally judge, and shortlist candidates. | `/workflow generate-and-filter prompt="Propose names for the new command"` |
54
+ | `tournament` | Compare whole solutions through balanced pairwise judging. | `/workflow tournament prompt="Design the retry strategy"` |
55
+ | `loop-until-done` | Iterate with a durable ledger until completion or bound exhaustion. | `/workflow loop-until-done prompt="Repair failures until the test suite passes"` |
56
+ | `goal` | Autonomous work that needs a durable ledger, bounded sub-agent orchestration, receipts, and reviewer-gated completion. | `/workflow goal objective="Update the CLI docs, add one example, and validate the docs build"` |
57
+ | `ralph` | Research-first autonomous work with prompt refinement, delegated implementation, and iterative multi-model review. | `/workflow ralph prompt="Implement specs/rate-limit.md and validate burst traffic"` |
58
+ | `open-claude-design` | UI and design-system work with one generated preview, one live review session, and export. | `/workflow open-claude-design prompt="Refresh the settings page hierarchy as a page"` |
59
+
60
+ <p align="center"><img src="../images/workflow-list.png" alt="Workflow List" width="600" /></p>
61
+
62
+ Inputs are bare `key=value` tokens. Values are JSON-parsed when possible, so `count=5`, `flag=true`, and `prompt="multi word value"` preserve useful types. If you call `/workflow <name>` without required inputs, the TUI opens an inline picker; pass `--no-picker` to skip it. Goal and Ralph support `git_worktree_dir` only when you explicitly want a reusable worktree, and skip PR creation unless you set `create_pr=true` for the post-approval final stage.
63
+
64
+ You can also launch workflows with **natural language** — describe the task in chat and ask Atomic to run a matching installed workflow or author a task-specific one:
65
+
66
+ ```text
67
+ Fan out repository research by subsystem, save cited findings as artifacts, and synthesize the evidence.
68
+ ```
69
+
70
+ ```text
71
+ Create a worker → fresh verifier → reducer workflow that updates the CLI docs, runs the docs build, and repairs evidence-backed findings until it passes or reaches a bounded stop.
72
+ ```
73
+
74
+ ```text
75
+ Use goal to update the CLI docs, include one example, run the docs build, and finish only when reviewers approve the evidence.
76
+ ```
77
+
78
+ ```text
79
+ Use ralph to research and implement specs/rate-limit.md, then review and repair it within three loops.
80
+ ```
81
+
82
+ Atomic chooses a complete execution shape, fills inputs from the request, and confirms before launch. Use Goal when a durable ledger and receipt-backed reviewer gate fit the task. Use Ralph when the job benefits from a research-first implementation/review loop. For exact domain contracts that either builtin does not cover, author a custom graph with deterministic checks and bounded repairs.
83
+
84
+ ### Monitor and steer a run
85
+
86
+ Named workflow runs execute in the background. After launch you get the full run id; user-facing workflow surfaces show that complete UUID. You can still type the full id or a unique short prefix to inspect, connect, pause, quit, or resume a run. Ambiguous prefixes are reported rather than selecting a run arbitrarily.
87
+
88
+ ```text
89
+ /workflow status <run-id> # inspect one run's progress
90
+ /workflow status # list this session's active and terminal runs
91
+ /workflow connect <run-id> # see agents working; chat with or steer each stage (F2 also opens latest)
92
+ /workflow attach <run-id> <stage> # chat with one stage
93
+ /workflow pause <run-id> # pause resumably
94
+ /workflow resume <run-id> "go" # send a steer message and resume
95
+ /workflow quit <run-id> # pause gracefully and keep the run resumable
96
+ ```
97
+
98
+ The below-editor `BACKGROUND` panel uses two lines per card at 80 columns and wider: the status glyph and full id are on the first line, and the workflow name plus mode/progress/elapsed metadata are on the second. Below 80 columns it collapses to a count-only line. In chat surfaces, a full id wraps onto continuation lines at narrow widths instead of being cut, and the surrounding border remains intact.
99
+
100
+ Human-in-the-loop prompts (`ctx.ui.input`, `confirm`, `select`, `editor`) surface in the graph viewer, not as chat modals — connect to the run to answer them.
101
+
102
+ Atomic also posts main-chat lifecycle notices when a run completes, fails, or awaits input. If you answer a workflow prompt in the graph or attached stage chat, the main chat receives a display-only answer summary for audit; it does not wake the model, enter LLM context, or answer later prompts. See [Workflow Operations](/workflows/operations) for the full run-control reference.
103
+
104
+ ### Top skills to invoke directly
105
+
106
+ Skills are reusable expert instructions. Trigger one with `/skill:<name>` followed by a request:
107
+
108
+ | Skill | When to use | Example |
109
+ |---|---|---|
110
+ | `research-codebase` | Scoped research that writes a grounded artifact for one subsystem or question. | `/skill:research-codebase how the rate limiter works in src/middleware/` |
111
+ | `create-spec` | Turn research into an implementation-ready plan. | `/skill:create-spec from research/docs/2026-03-rate-limit.md` |
112
+ | `prompt-engineer` | Write, evaluate, migrate, or troubleshoot GPT and Claude prompts using separate model guides. | `/skill:prompt-engineer Draft a sharper repo-research prompt for payment retries end to end.` |
113
+ | `tdd` | Test-first feature or bug work. | `/skill:tdd` |
114
+ | `impeccable` | Critique or refine web/native frontend and product UI; includes detector hooks, framework-aware live review, and mount-failure recovery. | `/skill:impeccable` |
115
+ | `playwright-cli` | Drive a real browser for end-to-end UI checks, screenshots, and reviewable proof videos. | `/skill:playwright-cli` |
116
+ | `qlty` | Lint, auto-format, and measure code quality — complexity, duplication, and code smells — through one CLI across the repository's languages. | `/skill:qlty check this branch before I hand it off` |
117
+ | `liteparse` | Pull text, tables, or values out of PDF, DOCX, PPTX, XLSX, and image files locally. | `/skill:liteparse` |
118
+ | `show-me` | Explain a topic visually with concise diagrams, code-shape sketches, or focused HTML artifacts. HumanLayer, MIT licensed. | `/skill:show-me` |
119
+
120
+ Impeccable 4.1.1 resolves Live sessions to the selected app root, supports SvelteKit, Nuxt, TanStack Start, Astro, Next.js, Vite, and static HTML injection, and rejects absolute, traversing, or symlinked configured write targets. Its concept roll may contact `impeccable.style`; set `IMPECCABLE_NO_TELEMETRY=1` or `DO_NOT_TRACK=1` to disable the anonymous choice ping. The image fallback runs only with `OPENAI_API_KEY`, sends prompts and optional reference images to OpenAI, and spends that account's API credit. Generated image prompts are embedded in the image or a sidecar, so do not include secrets.
121
+
122
+ Use `/skill:research-codebase` for a focused subsystem or question. For repository-wide research, use `fan-out-and-synthesize` with distinct repository partitions and an artifact synthesis barrier. Use Goal for ledger-backed bounded orchestration and Ralph for research-first delegated implementation with iterative review; task size alone does not select either workflow.
123
+
124
+ ### Create your own workflow in natural language
125
+
126
+ Named workflows may be builtin, project, user, or package supplied. You do not have to hand-write TypeScript to add a new workflow. Describe what you want in plain chat and Atomic will design and write it for you using [Builtins and Dynamic Workflows](/workflows/builtins) and the [Custom Workflow Authoring](/workflows/authoring) reference as its source of truth:
127
+
128
+ ```text
129
+ Create a reusable Atomic workflow called review-changes. It takes one
130
+ required text input `target` (a diff, PR, or review focus). Run two reviewers
131
+ in parallel with fresh context — one for correctness and missing tests, one
132
+ for edge cases and maintainability — then a synthesis stage that
133
+ consolidates findings into blockers vs. suggestions and returns
134
+ { consolidated_review, decision }.
135
+ ```
136
+
137
+ Atomic will:
138
+
139
+ - ask clarifying questions if stage purpose, inputs, models, or handoffs are ambiguous,
140
+ - write a `.atomic/workflows/<name>.ts` definition that uses `workflow({ ... })` and imports `Type` from `typebox`,
141
+ - run `/workflow reload` so the generated workflow is rediscovered and can be launched with `/workflow <name>`,
142
+ - then report the generated workflow folder so you can inspect the code it wrote, using `Custom workflow created. You can inspect its code at: <workflow-folder-path>` (for example, `.atomic/workflows/`); Atomic does this only for newly created custom workflows, never builtin or pre-existing workflows.
143
+
144
+ The same plain-chat approach works for editing or hardening an existing workflow. For the full authoring reference, see [Custom Workflow Authoring](/workflows/authoring), including composition with user-defined workflows and all nine builtins from `@bastani/atomic/workflows/builtin`.
145
+
146
+ ### Default tools and prompts
147
+
148
+ If you'd rather start with a plain prompt, just type a request and press Enter:
149
+
150
+ ```text
151
+ Summarize this repository and tell me how to run its checks.
152
+ ```
153
+
154
+ By default, Atomic gives the model these tools:
155
+
156
+ - `read` - read files
157
+ - `bash` - run shell commands
158
+ - `kill` - cancel owned background shell tasks by task ID
159
+ - `edit` - patch files
160
+ - `write` - create or overwrite files
161
+ - `find` - discover files by glob pattern
162
+ - `search` - search file contents
163
+ - `ask_user_question` - ask structured questions in the TUI
164
+ - `todo` - manage file-based todos
165
+
166
+ On native Windows, `powershell` is also enabled when a PowerShell executable is available.
167
+
168
+ Normal coding sessions include file discovery and content search through `find` and `search` in addition to `read`, `bash`, `edit`, and `write`. Atomic runs in your current working directory and can modify files there. Use git or another checkpointing workflow if you want easy rollback.
169
+
170
+ ## Next step
171
+
172
+ Continue to [Project instructions](/getting-started/project-instructions).
@@ -0,0 +1,154 @@
1
+ ---
2
+ title: Installation
3
+ description: Install Atomic with a package manager or a release archive, and uninstall it cleanly.
4
+ ---
5
+
6
+ # Installation
7
+
8
+ **Outcome:** Atomic is on your `PATH` and `atomic --version` prints a version.
9
+
10
+ **Prerequisites:** A supported shell. See [Prerequisites](/quickstart#prerequisites).
11
+
12
+ ## Install
13
+
14
+ ### Package managers
15
+
16
+ Install with npm:
17
+
18
+ ```bash
19
+ npm install -g @bastani/atomic
20
+ ```
21
+
22
+ With pnpm:
23
+
24
+ ```bash
25
+ pnpm add -g @bastani/atomic
26
+ ```
27
+
28
+ With Bun:
29
+
30
+ ```bash
31
+ bun add -g @bastani/atomic
32
+ ```
33
+
34
+ Atomic does not require package install scripts. Add `--ignore-scripts` if you want to disable dependency lifecycle scripts during a package install.
35
+
36
+ Embedded PostgreSQL is available without install scripts or a first-run download on Linux x64/ARM64 (glibc and musl), macOS x64/ARM64, and Windows x64/ARM64. npm-compatible package managers select the matching `@bastani/atomic-natives` leaf containing the runtime; standalone archives carry a target-selected runtime and resolve its binaries directly from the extracted installation. Keep the complete archive directory, including `node_modules`, libraries and licenses. Older upstream optional packages may also remain in npm installations for compatibility, but the native leaf takes precedence. Windows ARM64 uses Windows x64 PostgreSQL under Windows 11's x64 emulation, not native PostgreSQL ARM64, and requires the Microsoft Visual C++ x64 v14 Redistributable. Windows 10 on ARM cannot run this x64 runtime; Windows ARM64 execution still needs hardware validation.
37
+
38
+ ### Release archive
39
+
40
+ Alternatively, install the self-contained release archive, which needs no Node.js or package manager.
41
+
42
+ On macOS or Linux:
43
+
44
+ ```bash
45
+ curl -fsSL https://raw.githubusercontent.com/bastani-inc/atomic/main/install.sh | sh
46
+ ```
47
+
48
+ On Windows PowerShell:
49
+
50
+ ```powershell
51
+ irm https://raw.githubusercontent.com/bastani-inc/atomic/main/install.ps1 | iex
52
+ ```
53
+
54
+ The installer downloads only the matching GitHub Release archive and `SHA256SUMS`, verifies the checksum, and keeps the complete payload in a versioned directory.
55
+
56
+ On macOS or Linux, the default paths are `~/.local/share/atomic` for versioned payloads and `~/.local/bin/atomic` for the launcher. The installer prints a paste-safe `export PATH=...` command if needed.
57
+
58
+ On Windows, the defaults are `%LOCALAPPDATA%\atomic` for payloads and `%LOCALAPPDATA%\atomic\bin\atomic.cmd` for the launcher. The installer updates the User PATH and current process, then asks you to restart the terminal.
59
+
60
+ The installer accepts these environment variables:
61
+
62
+ #### ATOMIC_VERSION
63
+
64
+ Pin an exact release tag instead of the latest release, or pass a flag that overrides it. On macOS or Linux:
65
+
66
+ ```bash
67
+ curl -fsSL https://raw.githubusercontent.com/bastani-inc/atomic/main/install.sh | sh -s -- --ref 0.9.11
68
+ ```
69
+
70
+ On Windows PowerShell:
71
+
72
+ ```powershell
73
+ & ([scriptblock]::Create((irm https://raw.githubusercontent.com/bastani-inc/atomic/main/install.ps1))) -Ref 0.9.11
74
+ ```
75
+
76
+ Pins use Atomic's `MAJOR.MINOR.PATCH` or `MAJOR.MINOR.PATCH-alpha.REVISION` release tag form and are honored literally: if GitHub answers with a different release tag, the installer stops before downloading anything rather than installing a version you did not ask for.
77
+
78
+ #### ATOMIC_INSTALL_DIR
79
+
80
+ Override the install root that holds the versioned payloads (default `~/.local/share/atomic` on macOS/Linux, `%LOCALAPPDATA%\atomic` on Windows). On macOS/Linux, a relative value resolves against the physical directory where the installer starts and is used exactly as given, including any trailing whitespace or newline. The install root cannot equal or sit inside the launcher path (`ATOMIC_BIN_DIR/atomic`); impossible layouts fail before any download or filesystem change.
81
+
82
+ #### ATOMIC_BIN_DIR
83
+
84
+ Override the launcher directory (default `~/.local/bin` on macOS/Linux, `%LOCALAPPDATA%\atomic\bin` on Windows). Relative values resolve the same way as `ATOMIC_INSTALL_DIR`. It cannot sit inside the install root's `current` or `versions` directories, which the installer replaces on every install. A Unix value containing `:` cannot be one PATH entry, so the installer prints direct-run guidance instead of editing PATH.
85
+
86
+ #### GITHUB_TOKEN / GH_TOKEN
87
+
88
+ Optional; raises GitHub API limits on shared networks. Curl and GNU Wget keep the token in a protected temporary file instead of process arguments. BusyBox Wget remains supported without a token, and with a token when the latest-release redirect avoids the API; if an authenticated API fallback is needed, install curl or GNU Wget rather than exposing the token.
89
+
90
+ ### Which runtime runs your workflows
91
+
92
+ How you install Atomic decides which runtime hosts it: a package-manager install runs under Node, while the standalone binaries are Bun-compiled and run under Bun. Authored workflows execute inside whichever host is active, so a workflow that reaches for a `Bun.*` global runs only under the standalone binary and fails with `Bun is not defined` under an npm install. Installing Bun separately does not change that — the npm install still runs on Node. Write workflow code against APIs both hosts provide, such as `node:child_process` and `node:fs`; see [Custom Workflow Authoring](/workflows/authoring) for the rule and worked examples.
93
+
94
+ ### Alpine and musl Linux archives
95
+
96
+ The shell installer detects Alpine and selects `atomic-linux-x64-musl.tar.gz` or `atomic-linux-arm64-musl.tar.gz`. Each archive includes its matching native search and PTY bindings plus payload-local `libgcc` and `libstdc++` runtimes, so stock Alpine needs no runtime package install.
97
+
98
+ Two features work differently on musl:
99
+
100
+ - **Clipboard:** the musl archives omit a clipboard native binding because `@mariozechner/clipboard` 0.3.9 publishes metadata-only musl stubs without a `.node` payload; Atomic uses Linux clipboard commands and OSC52 fallback instead.
101
+ - **Durable workflows:** the archives omit the glibc-linked `@embedded-postgres/*` binary packages and instead carry a checksum-pinned Alpine/musl PostgreSQL 18.6 runtime, so durable workflows provision offline without external Postgres or Docker. If no durable backend can be provisioned at all, Atomic still uses a loud non-durable in-memory fallback.
102
+
103
+ Then start Atomic in the project directory you want it to work on:
104
+
105
+ ```bash
106
+ cd /path/to/project
107
+ atomic
108
+ ```
109
+
110
+ ## Uninstall
111
+
112
+ On macOS or Linux, for a default archive install, remove `~/.local/share/atomic` and the `~/.local/bin/atomic` link.
113
+
114
+ On Windows, remove `%LOCALAPPDATA%\atomic`. If you set `ATOMIC_BIN_DIR`, also remove `atomic.cmd` and the `atomic-current` junction from that directory, then remove the directory from your User PATH.
115
+
116
+ For a package install, remove the global package with the same package manager. With npm:
117
+
118
+ ```bash
119
+ npm uninstall -g @bastani/atomic
120
+ ```
121
+
122
+ With pnpm:
123
+
124
+ ```bash
125
+ pnpm remove -g @bastani/atomic
126
+ ```
127
+
128
+ With Bun:
129
+
130
+ ```bash
131
+ bun remove -g @bastani/atomic
132
+ ```
133
+
134
+ These commands remove the CLI only. User configuration, auth, sessions, and packages remain under `~/.atomic/agent/` unless you delete that directory yourself.
135
+
136
+ ## Verify the install
137
+
138
+ Run:
139
+
140
+ ```bash
141
+ atomic --version
142
+ ```
143
+
144
+ Expected output is a single version line, for example:
145
+
146
+ ```text
147
+ 0.9.14-alpha.2
148
+ ```
149
+
150
+ If the shell reports `command not found`, the launcher directory is not on your `PATH` yet. Open a new shell, or add the bin directory the installer printed to your `PATH` and try again.
151
+
152
+ ## Next step
153
+
154
+ Continue to [Authentication](/getting-started/authentication).
@@ -0,0 +1,43 @@
1
+ ---
2
+ title: Project instructions
3
+ description: Give Atomic durable, repository-specific instructions with AGENTS.md.
4
+ ---
5
+
6
+ # Project instructions
7
+
8
+ **Outcome:** Atomic loads your repository's conventions automatically in every session.
9
+
10
+ **Prerequisites:** [First session](/getting-started/first-session) is complete.
11
+
12
+ ## Give Atomic project instructions
13
+
14
+ Atomic loads context files at startup. Add an `AGENTS.md` file to tell it how to work in a project:
15
+
16
+ ```markdown
17
+ # Project Instructions
18
+
19
+ - Run `bun run typecheck` after code changes.
20
+ - Do not run production migrations locally.
21
+ - Keep responses concise.
22
+ ```
23
+
24
+ Atomic loads:
25
+
26
+ - `~/.atomic/agent/AGENTS.override.md`, `AGENTS.md`, or `CLAUDE.md` for global instructions (legacy `~/.pi/agent/` also works)
27
+ - `AGENTS.override.md`, `AGENTS.md`, or `CLAUDE.md` from parent directories and the current directory
28
+
29
+ An `AGENTS.override.md` file replaces the other context files in its directory. Restart Atomic, or run `/reload`, after changing context files.
30
+
31
+ ## Verify Atomic loaded them
32
+
33
+ With `AGENTS.md` saved, run `/reload` (or restart Atomic), then ask:
34
+
35
+ ```text
36
+ What project instructions are you following in this repository?
37
+ ```
38
+
39
+ Expected result: the answer restates your own rules — the `bun run typecheck` line above, or whatever you wrote — rather than generic advice. A generic answer means the file was not picked up: confirm it is named `AGENTS.md`, that it sits in the directory you started Atomic from or one of its parents, and that no `AGENTS.override.md` in the same directory is replacing it.
40
+
41
+ ## Next step
42
+
43
+ Continue to [Interactive use](/usage), then [Configuration](/guides/configuration).
@@ -0,0 +1,65 @@
1
+ ---
2
+ title: Configure Atomic
3
+ description: Write your first settings file and override settings per project.
4
+ ---
5
+
6
+ # Configure Atomic
7
+
8
+ **Outcome:** A working `settings.json` and, where you need one, a project-scoped override.
9
+
10
+ **Prerequisites:** [First session](/getting-started/first-session) is complete.
11
+
12
+ ## Example
13
+
14
+ ```json
15
+ {
16
+ "defaultProvider": "anthropic",
17
+ "defaultModel": "claude-sonnet-4-20250514",
18
+ "defaultThinkingLevel": "medium",
19
+ "theme": "dark",
20
+ "compaction": {
21
+ "enabled": true,
22
+ "reserveTokens": 16384,
23
+ "compression_ratio": 0.5,
24
+ "preserve_recent": 2
25
+ },
26
+ "retry": {
27
+ "enabled": true,
28
+ "maxRetries": 3
29
+ },
30
+ "httpIdleTimeoutMs": 300000,
31
+ "enabledModels": ["claude-*", "gpt-4o"],
32
+ "warnings": {
33
+ "anthropicExtraUsage": true
34
+ },
35
+ "packages": ["pi-skills"],
36
+ "workflows": ["./workflows/*.ts"]
37
+ }
38
+ ```
39
+
40
+ ## Project Overrides
41
+
42
+ Project settings (`.atomic/settings.json`) override global settings. Nested objects merge recursively; arrays and scalar values replace global values:
43
+
44
+ ```json
45
+ // ~/.atomic/agent/settings.json (global)
46
+ {
47
+ "theme": "dark",
48
+ "compaction": { "enabled": true, "reserveTokens": 16384 }
49
+ }
50
+
51
+ // .atomic/settings.json (project)
52
+ {
53
+ "compaction": { "reserveTokens": 8192 }
54
+ }
55
+
56
+ // Result
57
+ {
58
+ "theme": "dark",
59
+ "compaction": { "enabled": true, "reserveTokens": 8192 }
60
+ }
61
+ ```
62
+
63
+ ## Next step
64
+
65
+ Every field is listed in the [Settings reference](/settings).
@@ -0,0 +1,24 @@
1
+ ---
2
+ title: "Intercom"
3
+ description: "What Intercom is, when sessions should talk to each other, and where the full Intercom guide lives."
4
+ ---
5
+
6
+ # Intercom
7
+
8
+ Intercom is a message channel between agent sessions running on the same machine. Sessions in the same group can send each other messages, ask questions and wait for an answer, and coordinate without going through you.
9
+
10
+ ## When to use one
11
+
12
+ Use it when two sessions are working on related things and one knows something the other needs: a planner handing work to a worker, a long-running session reporting a finding, or steering a workflow stage while it runs. You do not need it for a single session working alone.
13
+
14
+ ## What you get
15
+
16
+ - Send, ask-and-wait, and reply between live sessions in your group.
17
+ - Groups that keep unrelated sessions isolated from each other.
18
+ - Delivery to workflow stages, including stages that have not started yet.
19
+
20
+ ## Next steps
21
+
22
+ - [Intercom](/intercom) — the full guide, including groups and addressing.
23
+ - [Operations](/intercom/operations) — observable states and recovery actions.
24
+ - [Subagents](/guides/subagents) — when delegation is a better fit than coordination.
@@ -0,0 +1,33 @@
1
+ ---
2
+ title: "Non-interactive use"
3
+ description: "Orientation for running Atomic without the interactive TUI: print mode, the JSON event stream, and RPC."
4
+ ---
5
+
6
+ # Non-interactive use
7
+
8
+ Atomic does not need a terminal UI. The same session engine backs three non-interactive entry points, and each one is documented in full elsewhere — this page only helps you pick.
9
+
10
+ | You want | Use | Read |
11
+ | --- | --- | --- |
12
+ | One prompt, one answer, then exit | Print mode (`-p`, `--print`) | [CLI reference](/reference/cli#modes) |
13
+ | A machine-readable stream of everything the session does | JSON event stream | [JSON event stream](/json) |
14
+ | A long-lived session another program drives | RPC | [RPC](/rpc) |
15
+ | To embed Atomic in your own TypeScript program | SDK | [SDK](/sdk) |
16
+
17
+ ## Print mode
18
+
19
+ `atomic --print "..."` runs a single turn and exits. It also reads piped stdin and merges it into the prompt, so it composes with ordinary shell pipelines. Flags, exit codes, and the stdin merge rules are in the [CLI reference](/reference/cli).
20
+
21
+ ## JSON events
22
+
23
+ When you need to observe a run rather than read it, the JSON event stream emits one structured record per message, tool call, and result. Use it for logging, CI annotations, or piping into another tool. The event shapes are in [JSON event stream](/json).
24
+
25
+ ## RPC
26
+
27
+ RPC keeps a session alive and lets another process send prompts, answer prompts, and receive events over a protocol. Use it when a single request/response is not enough — editors, bots, and long-running services. Start at [RPC](/rpc) and the [RPC protocol](/rpc/protocol).
28
+
29
+ ## Next steps
30
+
31
+ - [CLI reference](/reference/cli) for every flag and exit code.
32
+ - [Programmatic use](/programmatic) for choosing between the SDK, RPC, and the event stream.
33
+ - [Background and parallel work](/background-tasks) if the work should continue while you keep chatting interactively.
@@ -0,0 +1,24 @@
1
+ ---
2
+ title: "Subagents"
3
+ description: "What subagents are, when delegation helps, and where the full subagent guide lives."
4
+ ---
5
+
6
+ # Subagents
7
+
8
+ A subagent is a second agent session your main session launches for a focused piece of work. It has its own context window, so a noisy investigation does not crowd out your conversation.
9
+
10
+ ## When to use one
11
+
12
+ Delegate when the work is bounded and separable: searching an unfamiliar area of the codebase, reproducing a failure, reviewing a change with fresh eyes, or several independent tasks that can run at once. Keep work in your own session when it is small, or when it depends on context the subagent would have to rediscover.
13
+
14
+ ## What you get
15
+
16
+ - Single or parallel runs, with results returned to your session.
17
+ - Fresh or forked context, so a delegate can start clean or inherit what you know.
18
+ - Background execution — launch, keep chatting, and collect results later.
19
+
20
+ ## Next steps
21
+
22
+ - [Subagents](/subagents) — the full guide, including builtin agents and execution modes.
23
+ - [Authoring](/subagents/authoring) — define your own agents.
24
+ - [Background and parallel work](/background-tasks) — inspect, wait on, and stop delegated work.
@@ -0,0 +1,27 @@
1
+ ---
2
+ title: "Workflows"
3
+ description: "What workflows are, when to reach for one, and where the full authoring and operations guides live."
4
+ ---
5
+
6
+ # Workflows
7
+
8
+ A workflow runs a multi-stage job for you: each stage is a tracked unit of work with its own prompt, tools, and outputs, and the stages form a graph rather than one long chat.
9
+
10
+ ## When to use one
11
+
12
+ Reach for a workflow when the task has structure and a finish line you can check — an implementation with review, a migration with verification, a "keep fixing until the checks pass" loop. Stay in normal chat for a single edit or a quick question, where the tracking costs more than it gives you.
13
+
14
+ ## What you get
15
+
16
+ - Stages that run in order or in parallel, with their own models and tool access.
17
+ - Durable runs you can pause, resume, inspect, and steer while they work.
18
+ - Explicit stop conditions and evidence, instead of a transcript you have to re-read.
19
+
20
+ Run one with the `workflow` tool, or from chat with `/workflow`. Connect to a live run with `/workflow connect <run>` to watch stages and talk to them.
21
+
22
+ ## Next steps
23
+
24
+ - [Workflows](/workflows) — the full guide, including builtins and the run lifecycle.
25
+ - [Builtins](/workflows/builtins) — the workflows that ship with Atomic.
26
+ - [Authoring](/workflows/authoring) — write your own workflow in TypeScript.
27
+ - [Operations](/workflows/operations) — run control, prompts, and troubleshooting.
package/docs/guides.md ADDED
@@ -0,0 +1,41 @@
1
+ ---
2
+ title: Guides
3
+ description: "Task guides for everyday work with Atomic: interactive use, sessions, context, providers, local models, security, and containers."
4
+ ---
5
+
6
+ # Guides
7
+
8
+ Guides answer "how do I do this task with Atomic" once Atomic is installed and authenticated.
9
+
10
+ New to Atomic? Start with the ordered onboarding path in the [Quickstart](/quickstart) instead — it installs Atomic, authenticates a provider, runs a first session, and adds project instructions. Come back here when you want to go deeper on one task.
11
+
12
+ Looking to extend or embed Atomic? Go to [Build with Atomic](/build). Looking up an exact flag, setting, event, or type? Go to the [Reference index](/reference).
13
+
14
+ ## Recommended order
15
+
16
+ 1. [Interactive use](/usage) — the interactive loop, slash commands, and context files.
17
+ 2. [Configure Atomic](/guides/configuration) — write a settings file and override it per project.
18
+ 3. [Sessions](/sessions) — save, resume, name, and branch sessions.
19
+ 4. [Context and compaction](/compaction) — keep long sessions inside the context window.
20
+ 5. [Providers](/providers) — subscription logins, API keys, and cloud providers.
21
+ 6. [Local models](/llama-cpp) — run models locally with llama.cpp.
22
+ 7. [Security](/security) — project trust and sandbox boundaries.
23
+ 8. [Containerization](/containerization) — run Atomic inside a container.
24
+
25
+ For work that continues while you chat, follow [Background tasks](/background-tasks) to launch, inspect, and stop agents or shells. If you use Herdr panes, [Herdr](/herdr) explains Atomic's status indicators and troubleshooting.
26
+
27
+ ## Start here
28
+
29
+ - [Quickstart](/quickstart) - install, authenticate, and run a first session.
30
+ - [Using Atomic](/usage) - interactive mode, slash commands, context files, and CLI reference.
31
+ - [Computer use](/computer-use) - work in desktop apps, browsers, and terminals across macOS, Linux, and Windows.
32
+ - [Providers](/providers) - subscription and API-key setup for built-in providers.
33
+ - [Environment variables](/environment-variables) - Atomic/Pi aliases, provider credentials, and bash session metadata.
34
+ - [Security](/security) - project trust, sandbox boundaries, and vulnerability reporting.
35
+ - [Containerization](/containerization) - sandbox Atomic with OpenShell, Gondolin, or Docker.
36
+ - [Settings](/settings) - global and project settings.
37
+ - [Keybindings](/keybindings) - default shortcuts and custom keybindings.
38
+ - [Sessions](/sessions) - session management, branching, and tree navigation.
39
+ - [Compaction](/compaction) - Verbatim Compaction, context management, and branch summarization.
40
+ - [Background tasks](/background-tasks) - run work in the background, inspect results, and stop owned tasks.
41
+ - [Herdr](/herdr) - report Atomic's working, blocked, and idle states in Herdr panes.