@bastani/atomic 0.9.20-alpha.10 → 0.9.20-alpha.12

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 (58) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/builtin/intercom/package.json +1 -1
  3. package/dist/builtin/mcp/package.json +1 -1
  4. package/dist/builtin/subagents/CHANGELOG.md +13 -0
  5. package/dist/builtin/subagents/package.json +1 -1
  6. package/dist/builtin/subagents/skills/tdd/SKILL.md +10 -2
  7. package/dist/builtin/subagents/skills/tdd/mocking.md +4 -0
  8. package/dist/builtin/subagents/skills/tdd/test-audit.md +105 -0
  9. package/dist/builtin/subagents/skills/tdd/tests.md +3 -1
  10. package/dist/builtin/subagents/src/extension/index.bundle.mjs +2 -1
  11. package/dist/builtin/web-access/package.json +1 -1
  12. package/dist/builtin/workflows/CHANGELOG.md +17 -0
  13. package/dist/builtin/workflows/README.md +1 -1
  14. package/dist/builtin/workflows/builtin/adversarial-verification.js +3 -3
  15. package/dist/builtin/workflows/builtin/{chunk-7ps7bnb4.js → chunk-0nrgfbag.js} +1 -1
  16. package/dist/builtin/workflows/builtin/{chunk-2npg6daz.js → chunk-2hak3b7g.js} +1 -1
  17. package/dist/builtin/workflows/builtin/{chunk-twefqrv0.js → chunk-73c5tayt.js} +36 -3
  18. package/dist/builtin/workflows/builtin/{chunk-18yz7r43.js → chunk-bzdvx2xr.js} +1 -1
  19. package/dist/builtin/workflows/builtin/{chunk-24c235x7.js → chunk-crw7q5g1.js} +1 -1
  20. package/dist/builtin/workflows/builtin/{chunk-f8jjd90r.js → chunk-cw86srkf.js} +1 -1
  21. package/dist/builtin/workflows/builtin/{chunk-z5xdqrs6.js → chunk-jaj27rqc.js} +1 -1
  22. package/dist/builtin/workflows/builtin/{chunk-gxrhbnaj.js → chunk-kspvwc24.js} +2 -2
  23. package/dist/builtin/workflows/builtin/{chunk-ynded223.js → chunk-maqv731g.js} +3 -3
  24. package/dist/builtin/workflows/builtin/{chunk-1pd5zcfa.js → chunk-vkmpdat4.js} +1 -1
  25. package/dist/builtin/workflows/builtin/{chunk-2jv44yz7.js → chunk-w18kbz63.js} +1 -1
  26. package/dist/builtin/workflows/builtin/{chunk-ad864596.js → chunk-wh19f5ee.js} +3 -3
  27. package/dist/builtin/workflows/builtin/classify-and-act.js +3 -3
  28. package/dist/builtin/workflows/builtin/fan-out-and-synthesize.js +3 -3
  29. package/dist/builtin/workflows/builtin/generate-and-filter.js +3 -3
  30. package/dist/builtin/workflows/builtin/goal.js +4 -4
  31. package/dist/builtin/workflows/builtin/index.js +12 -12
  32. package/dist/builtin/workflows/builtin/loop-until-done.js +3 -3
  33. package/dist/builtin/workflows/builtin/open-claude-design.js +3 -3
  34. package/dist/builtin/workflows/builtin/ralph.js +4 -4
  35. package/dist/builtin/workflows/builtin/steering-context.js +1 -1
  36. package/dist/builtin/workflows/builtin/tournament.js +3 -3
  37. package/dist/builtin/workflows/package.json +1 -1
  38. package/dist/builtin/workflows/src/extension/index.bundle.mjs +105 -33
  39. package/dist/builtin/workflows/src/index.js +93 -27
  40. package/dist/core/context-tool-pairing.d.ts +10 -14
  41. package/dist/core/context-tool-pairing.d.ts.map +1 -1
  42. package/dist/core/context-tool-pairing.js +99 -28
  43. package/dist/core/context-tool-pairing.js.map +1 -1
  44. package/dist/core/messages.d.ts.map +1 -1
  45. package/dist/core/messages.js +2 -1
  46. package/dist/core/messages.js.map +1 -1
  47. package/dist/core/system-prompt.js +2 -2
  48. package/dist/core/system-prompt.js.map +1 -1
  49. package/docs/computer-use.md +31 -7
  50. package/docs/getting-started/first-session.md +1 -1
  51. package/docs/skills.md +2 -2
  52. package/docs/usage.md +1 -1
  53. package/docs/workflows/operations.md +3 -1
  54. package/docs/workflows/reliable-design.md +1 -1
  55. package/docs/workflows/verification.md +25 -7
  56. package/docs/workflows.md +1 -1
  57. package/npm-shrinkwrap.json +32 -32
  58. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -2,6 +2,27 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.9.20-alpha.12] - 2026-09-24
6
+
7
+ ### Changed
8
+
9
+ - Agents and workflow stages now try agent-browser first wherever it can reach the target, because its text snapshots use far fewer tokens than screenshot-driven computer use. That now includes Mobile Safari in the iOS Simulator (`agent-browser -p ios`) and apps that expose a Chrome DevTools Protocol port. Cua Driver handles everything else: native desktop apps, native iOS apps in the Simulator, Android emulators, OS dialogs, and desktop Safari or other non-Chromium browsers. The [Computer use](docs/computer-use.md#what-agent-browser-covers) guide has a new table showing what agent-browser covers.
10
+
11
+ ### Fixed
12
+
13
+ - Sessions no longer break when a model reuses a tool call id in a later turn or returns an empty one, as Kimi models do through NVIDIA NIM and other providers that pass Kimi's per-response ids (`bash:0`) through unchanged. Every request after the repeated call used to fail with "tool call id bash:0 appears in more than one assistant message". Sessions already in that state continue on the next message ([#3243](https://github.com/bastani-inc/atomic/issues/3243))
14
+
15
+ ## [0.9.20-alpha.11] - 2026-09-24
16
+
17
+ ### Changed
18
+
19
+ - The agent no longer treats missing, sparse, or mostly inline workflow history as a reason to run every task inline. It judges from the task itself whether a workflow would help, then refines that choice with comparable execution history and your stated or recorded preferences.
20
+
21
+ ### Fixed
22
+
23
+ - The `curl | sh` and `irm | iex` installers can install older releases again. They no longer run `--internal-validate-postgres-runtime` or the bundled PostgreSQL `--version` checks before promotion. Installing a release built before that option existed, or one without a bundled PostgreSQL runtime, could fail before promotion. The installers still verify the SHA256 checksum and run the staged `atomic --version`.
24
+ - Durable workflows work again on Ubuntu and Debian with the default umask 002. Atomic had refused its own group-writable `~/.atomic` as an ancestor of the PostgreSQL runtime cache and ran workflows in memory, so runs couldn't be resumed after closing Atomic. A group-writable folder is now accepted when its group is your private group: no other account in `/etc/passwd` uses it as its primary group, and `/etc/group` lists no member other than you. World-writable folders and shared groups are still rejected.
25
+
5
26
  ## [0.9.20-alpha.10] - 2026-09-24
6
27
 
7
28
  ### Fixed
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bastani/intercom",
3
- "version": "0.9.20-alpha.10",
3
+ "version": "0.9.20-alpha.12",
4
4
  "private": true,
5
5
  "description": "Atomic extension providing a private coordination channel between parent and child agent sessions. Fork of: https://github.com/nicobailon/pi-intercom",
6
6
  "contributors": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bastani/mcp",
3
- "version": "0.9.20-alpha.10",
3
+ "version": "0.9.20-alpha.12",
4
4
  "private": true,
5
5
  "description": "Atomic extension that adapts MCP (Model Context Protocol) servers into the coding agent. Fork of: https://github.com/nicobailon/pi-mcp-adapter",
6
6
  "contributors": [
@@ -2,6 +2,19 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.9.20-alpha.12] - 2026-09-24
6
+
7
+ ### Changed
8
+
9
+ - Subagent orchestration guidance again makes workflows the default for non-trivial structured work with verifiable objectives, such as implementation, review, or retry pipelines, unless you ask for inline execution.
10
+ - The builtin `tdd` skill now checks every new test before it's written: it must name the behavior it protects, the regression that would break it, and why existing tests don't already catch that, and it can't need a production seam that exists only for the test. Bug regression tests must fail on the unfixed code first. The skill also covers reviewing and pruning existing tests: a list of low-value test patterns, a bar for which tests to keep, and a read-only, evidence-first audit workflow. It is adapted from OpenClaw's `test-audit` skill.
11
+
12
+ ## [0.9.20-alpha.11] - 2026-09-24
13
+
14
+ ### Changed
15
+
16
+ - Subagent orchestration guidance no longer lets an absence of workflow history, or history of only inline runs, push every task inline; the agent judges the task first and refines with execution history and your preferences.
17
+
5
18
  ## [0.9.20-alpha.9] - 2026-09-24
6
19
 
7
20
  ### Fixed
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bastani/subagents",
3
- "version": "0.9.20-alpha.10",
3
+ "version": "0.9.20-alpha.12",
4
4
  "private": true,
5
5
  "description": "Atomic extension for delegating tasks to subagents with parallel execution. Fork of: https://github.com/nicobailon/pi-subagents",
6
6
  "contributors": [
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: tdd
3
- description: Test-driven development with red-green-refactor loop. Use when user wants to build features or fix bugs using TDD, mentions "red-green-refactor", wants integration tests, or asks for test-first development.
3
+ description: Test-driven development with red-green-refactor loop, plus a value gate and audit workflow for tests. Use when user wants to build features or fix bugs using TDD, mentions "red-green-refactor", wants integration tests, asks for test-first development, or asks to review, audit, prune, or clean up low-value, duplicated, or implementation-coupled tests.
4
4
  ---
5
5
 
6
6
  # Test-Driven Development
@@ -13,7 +13,7 @@ description: Test-driven development with red-green-refactor loop. Use when user
13
13
 
14
14
  **Bad tests** are coupled to implementation. They mock internal collaborators, test private methods, or verify through external means (like querying a database directly instead of using the interface). The warning sign: your test breaks when you refactor, but behavior hasn't changed. If you rename an internal function and tests fail, those tests were testing implementation, not behavior.
15
15
 
16
- See [tests.md](tests.md) for examples and [mocking.md](mocking.md) for mocking guidelines.
16
+ See [tests.md](tests.md) for examples, [mocking.md](mocking.md) for mocking guidelines, and [test-audit.md](test-audit.md) for the value gate every new test must pass and the workflow for auditing existing tests.
17
17
 
18
18
  ## Anti-Pattern: Horizontal Slices
19
19
 
@@ -70,6 +70,8 @@ GREEN: Write minimal code to pass → test passes
70
70
 
71
71
  This is your tracer bullet - proves the path works end-to-end.
72
72
 
73
+ Before writing each test, pass it through the [authoring gate](test-audit.md#authoring-gate): name the behavior it protects, the regression that would break it, why existing coverage doesn't already catch that, and whether it needs a production seam nothing else uses. For a bug fix, the first RED test must fail on the unfixed code for the reason the bug describes.
74
+
73
75
  ### 3. Incremental Loop
74
76
 
75
77
  For each remaining behavior:
@@ -98,12 +100,18 @@ After all tests pass, look for [refactor candidates](refactoring.md):
98
100
 
99
101
  **Never refactor while RED.** Get to GREEN first.
100
102
 
103
+ ## Auditing Existing Tests
104
+
105
+ When asked to review or prune tests rather than write them, follow the [audit workflow](test-audit.md#audit-workflow): read the test, its production owner, and its history first; discover read-only and record evidence per candidate; edit one coherent batch; and keep any test that meets the [retention bar](test-audit.md#retention-bar).
106
+
101
107
  ## Checklist Per Cycle
102
108
 
103
109
  ```
110
+ [ ] Test passes the authoring gate (behavior, regression, not already covered, no test-only seam)
104
111
  [ ] Test describes behavior, not implementation
105
112
  [ ] Test uses public interface only
106
113
  [ ] Test would survive internal refactor
114
+ [ ] Bug fixes only: the regression test failed on the pre-fix code for the intended reason
107
115
  [ ] Code is minimal for this test
108
116
  [ ] No speculative features added
109
117
  ```
@@ -57,3 +57,7 @@ The SDK approach means:
57
57
  - No conditional logic in test setup
58
58
  - Easier to see which endpoints a test exercises
59
59
  - Type safety per endpoint
60
+
61
+ ## Mocks Must Not Prove Themselves
62
+
63
+ A mock stands in for a boundary; it must not implement the behavior the test asserts. If the mock decides the outcome, the test proves the mock. Likewise, do not reuse one identical mock for different APIs, and do not let a fixture supply the ordering, callback, or acknowledgement the code under test is supposed to produce. See the [junk patterns](test-audit.md#junk-patterns).
@@ -0,0 +1,105 @@
1
+ # Test Value and Audits
2
+
3
+ One value bar applies to every test: it must protect observable behavior, a credible regression, or an independently meaningful contract. Use this file in two modes:
4
+
5
+ - **Authoring gate**: before adding or changing a test in a RED step.
6
+ - **Audit**: when asked to review, clean up, or prune an existing test surface.
7
+
8
+ ## Authoring gate
9
+
10
+ Answer all four questions before adding a test. If one has no answer, do not add the test yet.
11
+
12
+ 1. **What does it protect?** Name the observable behavior, invariant, or independent contract.
13
+ 2. **What regression makes it fail?** Describe a credible code change that would break it.
14
+ 3. **Why doesn't existing coverage catch that?** Each contract should have one primary test at the strongest boundary. A second layer needs its own risk, such as a transport or lifecycle failure the primary test cannot reach. Prefer adding a row to a table-driven test or reusing a shared fixture over writing a near-duplicate.
15
+ 4. **Does it need a production seam nothing else uses?** An export, flag, wrapper, or injection hook that exists only for the test is a sign the test sits at the wrong boundary. Move the test to the real boundary instead.
16
+
17
+ Then check it against the [junk patterns](#junk-patterns). A match fails the gate unless the [retention bar](#retention-bar) names the contract the test independently guards.
18
+
19
+ A test that breaks under a behavior-preserving refactor asserts implementation, not behavior. Rewrite it at the owning boundary before landing it.
20
+
21
+ ### Regression tests
22
+
23
+ A bug regression test must fail on the pre-fix code for the intended reason, then pass after the fix. Run it against the unfixed code and read the failure message: a test that never failed proves the mock, not the fix. One regression test at the boundary that owns the bug covers it; do not replay the same scenario at every layer it passes through.
24
+
25
+ ## Junk patterns
26
+
27
+ The authoring gate rejects new tests that match these; audits hunt for existing ones.
28
+
29
+ - Assertion-free coverage probes (the code runs, nothing is checked).
30
+ - Self-comparisons and identity copies (`expect(x).toEqual(x)`, or a value compared with a copy of itself).
31
+ - Copied fixtures, inventories, manifests, or export lists that restate the source.
32
+ - Exact source, import, or string greps standing in for behavior.
33
+ - Private predicate or call-shape tests that duplicate what a real-boundary test already proves.
34
+ - Several invocations of the same contract that differ only in incidental input.
35
+ - Local replays of a shared helper's tests in each caller.
36
+ - Tests whose only job is keeping a test-only export, global, or wrapper alive.
37
+ - Dead production code whose only callers are tests.
38
+ - Expected values computed by the helper or renderer under test.
39
+ - Mocks that implement the behavior being asserted, or one identical mock standing in for different APIs.
40
+ - Fixtures that supply the ordering, callback, or acknowledgement the code under test should produce, or persistence asserted against a store the code never writes.
41
+ - Capability tests that restate a declared flag instead of exercising what the flag promises.
42
+ - Negative tests that pass for an unrelated reason, such as a rejection from a different guard or an error the production path never reaches.
43
+ - Names or fixtures that promise more than the input exercises.
44
+
45
+ ## Retention bar
46
+
47
+ Keep a test when it independently enforces a public API, protocol, config, migration, storage, security, platform, default-value, prompt text, package, release, or architecture contract. Also keep:
48
+
49
+ - Call-order assertions when order is observable behavior.
50
+ - Regressions with a credible failure mode.
51
+ - Source inspection when it is the cheapest independent guard: it fails when the contract changes (a user-facing key, byte, or path) and survives an identifier-only rename.
52
+ - A test that fails on the current baseline. Treat that as a possible product bug: reproduce it and fix the code rather than deleting the test.
53
+
54
+ Static or slow is not a reason to delete. A test that resembles implementation may still be the only guard on a contract; prove otherwise before removing it.
55
+
56
+ ## Audit workflow
57
+
58
+ ### 1. Read before judging
59
+
60
+ Read the root and nearest `AGENTS.md` (or equivalent) first. For each candidate, read the whole test and the production code it covers: its entry point, callers, callees, sibling implementations, overlapping tests, how CI runs it, and the history of why it exists (`git log -S`, `git blame`, linked issues). When a test claims dependency-backed behavior, check the dependency's source or types directly.
61
+
62
+ ### 2. Discover read-only
63
+
64
+ Keep discovery read-only and report evidence before editing anything. For a broad scope, split discovery into parallel lanes (for example core packages, extensions or plugins, apps and scripts, and one cross-cutting sweep for the junk patterns). Prefer a few high-confidence candidates over a large speculative list.
65
+
66
+ ### 3. Record evidence per candidate
67
+
68
+ A candidate is ready for removal only when every field is filled in:
69
+
70
+ - Exact test name and file.
71
+ - What failure it can actually detect.
72
+ - Non-test callers of the production code or seam it covers.
73
+ - The stronger test that still proves the contract, or why no proof is needed.
74
+ - Relevant history and why the test or seam exists.
75
+ - Production or test-support code the removal unlocks.
76
+ - Risk, and the focused command that validates the change.
77
+
78
+ ### 4. Edit one coherent batch
79
+
80
+ Choose one batch that belongs to a single owner. Delete obsolete test-only exports, globals, wrappers, and dead production paths rather than keeping aliases. Move retained regressions to the boundary that owns them. Merge repeated assertions into one table-driven contract.
81
+
82
+ Aim for less production code, not a higher deletion count. Do not write replacement tests that restate the same implementation, and do not turn uncertain candidates into cleanup to inflate the numbers.
83
+
84
+ ### 5. Validate
85
+
86
+ - Do not edit source or tests while the test runner is running in the same checkout.
87
+ - Run the smallest affected test files and their siblings first, then the project's required suites and checks.
88
+ - When a removed test was a source grep or plan assertion, run the script or dry-run that owns the real contract.
89
+ - Run the formatter on changed files and `git diff --check`.
90
+ - Inspect `git diff --numstat` and report production and tooling changes separately from test changes.
91
+
92
+ ### 6. Land and continue
93
+
94
+ Commit, push, or open a PR only when authorized. Land one coherent batch at a time. After it lands, refresh from the main branch and rerun read-only discovery for the next batch.
95
+
96
+ ## Audit handoff
97
+
98
+ Report:
99
+
100
+ - Removed low-value categories and why they were low value.
101
+ - Production code simplified or deleted.
102
+ - Tests that looked removable but were kept, and the contract each one guards.
103
+ - Focused and full checks actually run, with results.
104
+ - Production versus test line counts.
105
+ - PR state and named follow-ups.
@@ -39,10 +39,12 @@ Red flags:
39
39
 
40
40
  - Mocking internal collaborators
41
41
  - Testing private methods
42
- - Asserting on call counts/order
42
+ - Asserting on call counts/order when the order is not observable behavior
43
43
  - Test breaks when refactoring without behavior change
44
44
  - Test name describes HOW not WHAT
45
45
  - Verifying through external means instead of interface
46
+ - Expected values computed by the code under test
47
+ - Setup that hands the code the result it should produce
46
48
 
47
49
  ```typescript
48
50
  // BAD: Bypasses interface to verify
@@ -17345,7 +17345,8 @@ function parseSubagentNotifyContent(content) {
17345
17345
  // dist/builtin/subagents/src/extension/prompt-guidance.ts
17346
17346
  var DEFAULT_PROMPT_GUIDANCE = [
17347
17347
  `**Subagent orchestration**: Use subagents for focused specialist work inside workflows or as bounded delegation when a workflow would be unnecessary overhead.
17348
- - When the workflow tool is available, decide yourself whether a workflow fits. Prefer one for well-defined work that benefits from durable stages, review loops, recovery or approval gates, and let its stages delegate specialists; work inline for discussion, unclear goals, simple bounded work, or when the user asks to work inline or quickly. Launch with workflow run using the registered workflow name and inputs matching its contract.
17348
+ - Unless the user explicitly chooses inline execution for the specified task, workflows are the default for non-trivial structured work with verifiable objectives; use a workflow for implementation, review, or retry pipelines and let its stages delegate specialists.
17349
+ - When the workflow tool is available, decide yourself whether a workflow fits. Prefer one for well-defined work that benefits from durable stages, review loops, recovery or approval gates; work inline for discussion, unclear goals, tiny deterministic low-risk edits, or when the user asks to work inline or quickly. Judge the task's shape first and refine with execution history and user preferences; no workflow history, or history of only inline runs, does not mean every task should run inline. Launch with workflow run using the registered workflow name and inputs matching its contract.
17349
17350
  - Honor the user's task-scoped execution preferences without hidden/nested workflows or pressure to reapprove. Preserve appropriate testing, review and evidence inline, and unrelated safety and authorization constraints.
17350
17351
  - On a switch from an active workflow to inline, notify the controlling session to safely hold/stop the affected run, reconcile completed work and in-flight side effects, then continue inline without duplicate execution. Do not claim completed work was undone.
17351
17352
  - Use a single subagent for a focused specialty or parallel tasks for independent work. Keep substantial-overlap tasks together rather than duplicating investigation across agents.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bastani/web-access",
3
- "version": "0.9.20-alpha.10",
3
+ "version": "0.9.20-alpha.12",
4
4
  "private": true,
5
5
  "description": "Atomic extension for web search, URL fetching, GitHub repo cloning, PDF/video extraction. Fork of: https://github.com/nicobailon/pi-web-access",
6
6
  "contributors": [
@@ -6,6 +6,23 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.9.20-alpha.12] - 2026-09-24
10
+
11
+ ### Changed
12
+
13
+ - The agent again treats workflows as the default for non-trivial work with structure and a verifiable objective. Its guidance names the tasks that fit a workflow (implementation, bug fixes, debugging, migrations, multi-file changes with validation), treats "until" wording such as "fix until green" as a strong workflow signal, and maps task shapes to the pattern workflows. Only tiny, low-risk answers or edits, conversation, unclear goals, or an explicit request to work inline or quickly stay inline.
14
+
15
+ ## [0.9.20-alpha.11] - 2026-09-24
16
+
17
+ ### Changed
18
+
19
+ - Workflow selection guidance now tells the agent that missing, sparse, or mostly inline workflow history is not by itself a reason to work inline; it judges the task's shape first and refines with execution history and your preferences.
20
+
21
+ ### Fixed
22
+
23
+ - Durable workflows work again on Ubuntu and Debian with the default umask 002. Atomic had refused its own group-writable `~/.atomic` as an ancestor of the PostgreSQL runtime cache and ran workflows in memory, so runs couldn't be resumed after closing Atomic. A group-writable folder is now accepted when its group is your private group: no other account in `/etc/passwd` uses it as its primary group, and `/etc/group` lists no member other than you. World-writable folders and shared groups are still rejected.
24
+ - DBOS no longer launches without its migration lock. Previously, when another process held the lock for more than 60 seconds, or the lock connection or query failed, Atomic launched anyway. Two processes could then migrate the same fresh workflow database at once and fail with duplicate-key errors. Atomic now retries lock contention for up to 60 seconds and reopens a failed or dropped lock connection with increasing delays, as Flyway does. If it still has no lock, launch fails with a clear error instead of running unlocked.
25
+
9
26
  ## [0.9.20-alpha.9] - 2026-09-24
10
27
 
11
28
  ### Breaking Changes
@@ -5,7 +5,7 @@
5
5
  An open-source Atomic workflow extension: install it, author workflows in TypeScript, run them from chat.
6
6
  </p>
7
7
 
8
- The agent decides whether a workflow fits. Well-defined, authorized work that benefits from durable stages, checkpoints, dependencies, recovery, review loops or approval gates runs as a workflow; brainstorming, discussion, unclear goals, simple bounded work, or an explicit request to work inline, quickly or without a workflow stays inline. To launch, inspect the input contract with `workflow inputs`, then call `workflow run` with the registered workflow name and inputs. Ask only for genuinely missing information.
8
+ The agent decides whether a workflow fits. Non-trivial work with structure and a verifiable objective runs as a workflow unless you ask for inline execution: implementation, bug fixes, debugging, migrations, multi-file changes with validation, and requests phrased as "repeat until" or "fix until green". Brainstorming, discussion, unclear goals, tiny low-risk answers or edits, or an explicit request to work inline, quickly or without a workflow stays inline. To launch, inspect the input contract with `workflow inputs`, then call `workflow run` with the registered workflow name and inputs. Ask only for genuinely missing information.
9
9
 
10
10
  Atomic can author custom TypeScript `workflow({...})` definitions inline, import reusable project/package workflows or builtins from `@bastani/atomic/workflows/builtin`, and nest them with `ctx.workflow(...)`. Imported children may nest further workflows within `maxDepth`, so compose proven research, implementation, design, verification, and approval graphs rather than copying them. Custom parents can also use runtime classification, dynamic fan-out and synthesis, adversarial verification, candidate tournaments, HIL gates, and bounded convergence.
11
11
 
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  adversarial_verification_default
3
- } from "./chunk-z5xdqrs6.js";
3
+ } from "./chunk-jaj27rqc.js";
4
4
  import"./chunk-2377r57g.js";
5
5
  import"./chunk-n1910xc4.js";
6
- import"./chunk-24c235x7.js";
7
- import"./chunk-gxrhbnaj.js";
6
+ import"./chunk-crw7q5g1.js";
7
+ import"./chunk-kspvwc24.js";
8
8
  export {
9
9
  adversarial_verification_default as default
10
10
  };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  workflow,
3
3
  withBuiltinContext
4
- } from "./chunk-24c235x7.js";
4
+ } from "./chunk-crw7q5g1.js";
5
5
  import {
6
6
  scoring_prompt_reads,
7
7
  build_scoring_prompt
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  workflow,
3
3
  withBuiltinContext
4
- } from "./chunk-24c235x7.js";
4
+ } from "./chunk-crw7q5g1.js";
5
5
 
6
6
  // dist/builtin/workflows/builtin/open-claude-design.ts
7
7
  import { Type as Type2 } from "typebox";
@@ -5211,7 +5211,7 @@ import {
5211
5211
  rm,
5212
5212
  writeFile
5213
5213
  } from "node:fs/promises";
5214
- import { homedir } from "node:os";
5214
+ import { homedir, userInfo } from "node:os";
5215
5215
  import { basename, dirname, isAbsolute, join, normalize, relative, sep } from "node:path";
5216
5216
 
5217
5217
  // dist/builtin/workflows/src/durable/local-command.ts
@@ -5570,7 +5570,37 @@ async function findOrCreateRuntimeGeneration(binaries, sourceNativeDir, sourceSn
5570
5570
  await rm(stagedRoot, { recursive: true, force: true });
5571
5571
  }
5572
5572
  }
5573
- async function ensureRuntimeCacheDirectory(path, publisher = publisherIdentity(), needsPrivilegeDrop = false, owner, inspect = lstat) {
5573
+ var SYSTEM_ACCOUNT_FILES = { group: "/etc/group", passwd: "/etc/passwd" };
5574
+ async function readAccountRecords(path, gidField) {
5575
+ try {
5576
+ return (await readFile(path, "utf8")).split(/\r?\n/u).map((line) => line.split(":")).filter((fields) => fields.length > gidField && /^\d+$/u.test(fields[gidField]));
5577
+ } catch {
5578
+ return;
5579
+ }
5580
+ }
5581
+ async function isUserPrivateGroup(gid, account, files = SYSTEM_ACCOUNT_FILES) {
5582
+ const groups = await readAccountRecords(files.group, 2);
5583
+ const users = await readAccountRecords(files.passwd, 3);
5584
+ if (groups === undefined || users === undefined)
5585
+ return false;
5586
+ const entries = groups.filter((fields) => Number(fields[2]) === gid);
5587
+ if (entries.length === 0)
5588
+ return false;
5589
+ const primaryMembers = users.filter((fields) => Number(fields[3]) === gid);
5590
+ if (primaryMembers.some((fields) => !/^\d+$/u.test(fields[2]) || Number(fields[2]) !== account.uid))
5591
+ return false;
5592
+ const supplementaryMembers = entries.flatMap((fields) => (fields[3] ?? "").split(",").map((member) => member.trim()).filter((member) => member !== ""));
5593
+ if (supplementaryMembers.some((member) => member !== account.username))
5594
+ return false;
5595
+ return primaryMembers.length + supplementaryMembers.length > 0;
5596
+ }
5597
+ function publisherAccount(publisher) {
5598
+ return {
5599
+ uid: publisher.uid,
5600
+ username: process.getuid?.() === publisher.uid ? userInfo().username : undefined
5601
+ };
5602
+ }
5603
+ async function ensureRuntimeCacheDirectory(path, publisher = publisherIdentity(), needsPrivilegeDrop = false, owner, inspect = lstat, privateGroup = (gid) => isUserPrivateGroup(gid, publisherAccount(publisher))) {
5574
5604
  if (!isAbsolute(path))
5575
5605
  throw new Error(`Embedded Postgres runtime cache override must be absolute: ${path}`);
5576
5606
  await mkdir(path, { recursive: true, mode: 493 });
@@ -5580,7 +5610,10 @@ async function ensureRuntimeCacheDirectory(path, publisher = publisherIdentity()
5580
5610
  let ancestor = await realpath(path);
5581
5611
  while (true) {
5582
5612
  const info = await inspect(ancestor);
5583
- if (!info.isDirectory() || process.platform !== "win32" && (info.uid !== 0 && info.uid !== publisher.uid || (info.mode & 18) !== 0 && (info.mode & 512) === 0))
5613
+ const sticky = (info.mode & 512) !== 0;
5614
+ const writableByOthers = !sticky && (info.mode & 2) !== 0;
5615
+ const writableByGroup = !sticky && (info.mode & 16) !== 0;
5616
+ if (!info.isDirectory() || process.platform !== "win32" && (info.uid !== 0 && info.uid !== publisher.uid || writableByOthers || writableByGroup && (info.gid !== publisher.gid || !await privateGroup(info.gid))))
5584
5617
  throw new Error(`Untrusted embedded Postgres runtime cache directory ancestor: ${ancestor}`);
5585
5618
  if (needsPrivilegeDrop && owner && publisher.uid === 0 && process.platform !== "win32") {
5586
5619
  const execute = info.uid === owner.uid ? 64 : info.gid === owner.gid ? 8 : 1;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  workflow,
3
3
  withBuiltinContext
4
- } from "./chunk-24c235x7.js";
4
+ } from "./chunk-crw7q5g1.js";
5
5
  import {
6
6
  stableArtifactRoot
7
7
  } from "./chunk-rc5ec5xx.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  withSteeringPropagationContext2
3
- } from "./chunk-gxrhbnaj.js";
3
+ } from "./chunk-kspvwc24.js";
4
4
 
5
5
  // dist/builtin/workflows/src/authoring/workflow.ts
6
6
  import { basename } from "node:path";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  workflow,
3
3
  withBuiltinContext
4
- } from "./chunk-24c235x7.js";
4
+ } from "./chunk-crw7q5g1.js";
5
5
  import {
6
6
  stableArtifactRoot
7
7
  } from "./chunk-rc5ec5xx.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  workflow,
3
3
  withBuiltinContext
4
- } from "./chunk-24c235x7.js";
4
+ } from "./chunk-crw7q5g1.js";
5
5
  import {
6
6
  parse_rubric,
7
7
  normalize_criteria,
@@ -63,9 +63,9 @@ var WORKER_PREFLIGHT_CONTRACT = [
63
63
  `);
64
64
  var E2E_VERIFICATION_GUIDANCE = [
65
65
  "Verify correctness end-to-end whenever practical for user-visible behavior; an executable scenario is stronger proof than code inspection, unit tests, or stage summaries alone.",
66
- 'For web or frontend flows, including frontend changes whose correctness depends on backend/API behavior, use the agent-browser skill or delegate with `skill: "agent-browser"`; capture snapshot, screenshot, DOM, or network evidence suited to the objective. Prefer agent-browser for what its skill covers (websites and web apps in Chrome/Chromium, Electron desktop apps, Slack, cloud browsers); use Cua Driver for anything else, including iOS simulators, Android emulators, OS dialogs, and non-Chromium browsers, and whenever agent-browser hits a limitation.',
66
+ 'For web or frontend flows, including frontend changes whose correctness depends on backend/API behavior, use the agent-browser skill or delegate with `skill: "agent-browser"`; capture snapshot, screenshot, DOM, or network evidence suited to the objective. Prefer agent-browser for what its skill covers, because its text snapshots cost far fewer tokens than screenshot-driven CUA (websites and web apps in Chrome/Chromium, Mobile Safari in the iOS Simulator via `agent-browser -p ios`, Electron desktop apps and other CDP-exposing apps, Slack, cloud browsers); use Cua Driver for anything else, including native iOS apps in the iOS Simulator, Android emulators, OS dialogs, desktop Safari and other non-Chromium browsers, and whenever agent-browser hits a limitation.',
67
67
  "For TUI/terminal automation/testing, prefer the herdr skill on macOS, Linux and Windows. Install Herdr if missing when network access and permissions permit; fall back to the tmux skill or native Windows psmux if installation or use is not possible. Preserve the pinned herdr skill's explicit-request and HERDR_ENV=1 requirements; never control a focused session from outside Herdr. Check installed help: psmux uses tmux-style commands, while herdr has its own CLI, not interchangeable flags. Exercise the actual interactive flow and retain pane/text or terminal recording evidence.",
68
- "For desktop and accessible simulator/emulator windows, use Cua Driver: when a model chooses the next action, as in this stage, use the `cua-driver` CLI; when workflow TypeScript code owns the sequence and the postcondition, the @trycua/cua-driver TypeScript SDK inside `ctx.tool` is the face instead. Here, load Atomic's bundled cua-driver skill and drive the exact window with one-shot `cua-driver call <tool>` commands, following the skill's snapshot -> act -> fresh snapshot -> verify loop. Before the first action, ensure the executable (`cua-driver --version`; if missing, one bounded attempt with upstream's one-line executable installer, reporting its side effects; that installer does not install an agent skill). Ignore upstream README's optional skill-install steps: never `cua-driver skills install` or `clawhub install @cua/driver`, and do not link or copy a skill into `~/.agents/skills/cua-driver`; leave any existing user-level skill alone. Ensure telemetry off (run every command with CUA_DRIVER_RS_TELEMETRY_ENABLED=false, and `cua-driver telemetry disable` once after an executable install) and readiness (`cua-driver status`, `cua-driver doctor`, `cua-driver call list_apps`; on macOS also `cua-driver permissions status`, starting a stopped daemon with `open -n -g -a CuaDriver --args serve`) with bounded attempts per docs/computer-use.md. Save each `get_window_state` JSON result and `screenshot_out_file` image to the artifacts directory as evidence. Report a missing macOS Accessibility or Screen Recording grant, a non-interactive Windows session, no graphical Linux session, or a refused/failed install as the stage's blocked/needs_human finding with the exact fix (for macOS: `cua-driver permissions grant`, then toggle CuaDriver on under System Settings -> Privacy & Security -> Accessibility and Screen & System Audio Recording, then relaunch the daemon; for an install: the exact installer command), and re-run the readiness check on resume. Use a dedicated desktop/session and controlled fixtures, inspect snapshots for other windows, and stop before destructive actions. Do not automate an arbitrary physical iPhone without an accessible simulator/emulator/mirroring or native automation setup, or label browser recordings as terminal/iOS proof.",
68
+ "For desktop and accessible simulator/emulator windows, use Cua Driver: when a model chooses the next action, as in this stage, use the `cua-driver` CLI; when workflow TypeScript code owns the sequence and the postcondition, the @trycua/cua-driver TypeScript SDK inside `ctx.tool` is the face instead. Here, load Atomic's bundled cua-driver skill and drive the exact window with one-shot `cua-driver call <tool>` commands, following the skill's snapshot -> act -> fresh snapshot -> verify loop. Before the first action, ensure the executable (`cua-driver --version`; if missing, one bounded attempt with upstream's one-line executable installer, reporting its side effects; that installer does not install an agent skill). Ignore upstream README's optional skill-install steps: never `cua-driver skills install` or `clawhub install @cua/driver`, and do not link or copy a skill into `~/.agents/skills/cua-driver`; leave any existing user-level skill alone. Ensure telemetry off (run every command with CUA_DRIVER_RS_TELEMETRY_ENABLED=false, and `cua-driver telemetry disable` once after an executable install) and readiness (`cua-driver status`, `cua-driver doctor`, `cua-driver call list_apps`; on macOS also `cua-driver permissions status`, starting a stopped daemon with `open -n -g -a CuaDriver --args serve`) with bounded attempts per docs/computer-use.md. Save each `get_window_state` JSON result and `screenshot_out_file` image to the artifacts directory as evidence. Report a missing macOS Accessibility or Screen Recording grant, a non-interactive Windows session, no graphical Linux session, or a refused/failed install as the stage's blocked/needs_human finding with the exact fix (for macOS: `cua-driver permissions grant`, then toggle CuaDriver on under System Settings -> Privacy & Security -> Accessibility and Screen & System Audio Recording, then relaunch the daemon; for an install: the exact installer command), and re-run the readiness check on resume. Use a dedicated desktop/session and controlled fixtures, inspect snapshots for other windows, and stop before destructive actions. Do not automate an arbitrary physical iPhone without an accessible simulator/emulator/mirroring or native automation setup, or label a Chrome recording as terminal or native iOS proof; an agent-browser `-p ios` session proves Mobile Safari behavior, not a native iOS app.",
69
69
  "Also skip `cua-driver skills update` and any skill installation into other agent directories such as `~/.claude/skills`; updating the executable is separate from installing or updating a skill.",
70
70
  "Choose tools from observed environment capabilities. Prefer installed/cached tools; install missing tools, runtimes or plugins when online access and permissions permit. Known offline/restricted installation is sufficient evidence not to attempt prohibited downloads; otherwise check capabilities or make one bounded setup attempt. Do not loop on blocked downloads, require production credentials, or take unsafe actions.",
71
71
  "When execution or installation is unavailable, continue available authoritative repository checks and retain useful local evidence. Report the constraint or attempted command with observed output, what could not run, and the narrower validation performed. For non-UI tasks, use relevant executable checks rather than manufacturing a UI scenario. An unavailable optional mechanism is not itself failed implementation or permission to relax required project checks."
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  workflow,
3
3
  withBuiltinContext
4
- } from "./chunk-24c235x7.js";
4
+ } from "./chunk-crw7q5g1.js";
5
5
  import {
6
6
  keepContext,
7
7
  REVIEWER_CALIBRATION_RULES,
@@ -24,7 +24,7 @@ import {
24
24
  EVIDENCE_CLOSURE_POLICY,
25
25
  WORKTREE_DISCIPLINE_CONTRACT,
26
26
  REVIEW_CODE_DELTA_CONTRACT
27
- } from "./chunk-gxrhbnaj.js";
27
+ } from "./chunk-kspvwc24.js";
28
28
  import {
29
29
  workflowArtifactDirectoryPath,
30
30
  ensureWorkflowArtifactDirectory,
@@ -36,7 +36,7 @@ import {
36
36
  reviewerFailureText,
37
37
  summarizeReviewConvergence,
38
38
  reverify_consolidated_batch
39
- } from "./chunk-twefqrv0.js";
39
+ } from "./chunk-73c5tayt.js";
40
40
  import {
41
41
  VERIFICATION_SCALE
42
42
  } from "./chunk-n1910xc4.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  workflow,
3
3
  withBuiltinContext
4
- } from "./chunk-24c235x7.js";
4
+ } from "./chunk-crw7q5g1.js";
5
5
  import {
6
6
  parse_rubric,
7
7
  normalize_criteria,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  workflow,
3
3
  withBuiltinContext
4
- } from "./chunk-24c235x7.js";
4
+ } from "./chunk-crw7q5g1.js";
5
5
  import {
6
6
  score_progress,
7
7
  classify_trend
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  workflow,
3
3
  withBuiltinContext
4
- } from "./chunk-24c235x7.js";
4
+ } from "./chunk-crw7q5g1.js";
5
5
  import {
6
6
  keepContext,
7
7
  REVIEWER_CALIBRATION_RULES,
@@ -24,7 +24,7 @@ import {
24
24
  EVIDENCE_CLOSURE_POLICY,
25
25
  WORKTREE_DISCIPLINE_CONTRACT,
26
26
  REVIEW_CODE_DELTA_CONTRACT
27
- } from "./chunk-gxrhbnaj.js";
27
+ } from "./chunk-kspvwc24.js";
28
28
  import {
29
29
  VERIFICATION_SCALE
30
30
  } from "./chunk-n1910xc4.js";
@@ -38,7 +38,7 @@ import {
38
38
  reviewerFailureText,
39
39
  summarizeReviewConvergence,
40
40
  reverify_consolidated_batch
41
- } from "./chunk-twefqrv0.js";
41
+ } from "./chunk-73c5tayt.js";
42
42
  import {
43
43
  fold_usage
44
44
  } from "./chunk-tgt0s5e5.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  DEFAULT_ACTION_CATEGORIES2,
3
3
  classify_and_act_default
4
- } from "./chunk-18yz7r43.js";
5
- import"./chunk-24c235x7.js";
6
- import"./chunk-gxrhbnaj.js";
4
+ } from "./chunk-bzdvx2xr.js";
5
+ import"./chunk-crw7q5g1.js";
6
+ import"./chunk-kspvwc24.js";
7
7
  export {
8
8
  DEFAULT_ACTION_CATEGORIES2 as DEFAULT_ACTION_CATEGORIES,
9
9
  classify_and_act_default as default
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  fan_out_and_synthesize_default
3
- } from "./chunk-f8jjd90r.js";
4
- import"./chunk-24c235x7.js";
5
- import"./chunk-gxrhbnaj.js";
3
+ } from "./chunk-cw86srkf.js";
4
+ import"./chunk-crw7q5g1.js";
5
+ import"./chunk-kspvwc24.js";
6
6
  export {
7
7
  fan_out_and_synthesize_default as default
8
8
  };
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  generate_and_filter_default
3
- } from "./chunk-7ps7bnb4.js";
3
+ } from "./chunk-0nrgfbag.js";
4
4
  import"./chunk-2377r57g.js";
5
5
  import"./chunk-n1910xc4.js";
6
- import"./chunk-24c235x7.js";
7
- import"./chunk-gxrhbnaj.js";
6
+ import"./chunk-crw7q5g1.js";
7
+ import"./chunk-kspvwc24.js";
8
8
  export {
9
9
  generate_and_filter_default as default
10
10
  };
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  goal_default
3
- } from "./chunk-ynded223.js";
4
- import"./chunk-twefqrv0.js";
3
+ } from "./chunk-maqv731g.js";
4
+ import"./chunk-73c5tayt.js";
5
5
  import"./chunk-2377r57g.js";
6
6
  import"./chunk-z0d03ktm.js";
7
7
  import"./chunk-n1910xc4.js";
8
- import"./chunk-24c235x7.js";
9
- import"./chunk-gxrhbnaj.js";
8
+ import"./chunk-crw7q5g1.js";
9
+ import"./chunk-kspvwc24.js";
10
10
  export {
11
11
  goal_default as default
12
12
  };