@awebai/oats 0.24.13 → 0.25.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/bin/oats.mjs +994 -2837
  2. package/docs/capabilities.md +136 -323
  3. package/docs/configuration.md +68 -533
  4. package/docs/conventions.md +51 -24
  5. package/docs/design/2026-09-16-fresh-operator-walkthrough.md +19 -14
  6. package/docs/design/2026-09-16-portable-migration-evidence.md +2 -0
  7. package/docs/design/2026-09-16-portable-onboarding.md +4 -2
  8. package/docs/design/2026-09-20-redesign-program-board.md +1 -1
  9. package/docs/design/2026-09-20-workspace-and-portable-adoption-plan.md +2 -0
  10. package/docs/design/2026-09-23-simplified-workspace-model.md +711 -0
  11. package/docs/design/2026-09-23-workspace-module-contracts.md +460 -0
  12. package/docs/design/2026-09-23-workspace-v2-implementation-plan.md +65 -0
  13. package/docs/design/README.md +20 -8
  14. package/docs/design/operations-contract.md +1 -0
  15. package/docs/design/package-engine-contract.md +1 -1
  16. package/docs/design/package-runtime-api.md +1 -1
  17. package/docs/desktop-cli-api.md +356 -5
  18. package/docs/desktop-succession.md +12 -6
  19. package/docs/desktop.md +9 -4
  20. package/docs/execution-targets.md +16 -4
  21. package/docs/first-team.md +107 -224
  22. package/docs/implementation.md +41 -11
  23. package/docs/integrations.md +50 -47
  24. package/docs/knowledge-capability-authoring.md +10 -4
  25. package/docs/knowledge-migration.md +21 -12
  26. package/docs/knowledge-reference/package-craft.md +11 -3
  27. package/docs/knowledge.md +60 -18
  28. package/docs/layers.md +3 -3
  29. package/docs/migration-from-oas.md +20 -9
  30. package/docs/oats-local.schema.json +50 -0
  31. package/docs/oats-membership.schema.json +23 -0
  32. package/docs/oats-workspace.schema.json +133 -48
  33. package/docs/official-marketplace.md +9 -6
  34. package/docs/packages.md +229 -440
  35. package/docs/rebuild-to-v2.md +347 -0
  36. package/docs/release-notes/v0.25.0.md +99 -0
  37. package/docs/release-notes/v0.25.1.md +94 -0
  38. package/docs/schedules.md +12 -6
  39. package/docs/soul.schema.json +41 -68
  40. package/docs/souls-and-instances.md +175 -108
  41. package/docs/workspace-adoption.md +70 -345
  42. package/docs/workspaces.md +436 -119
  43. package/lib/core.mjs +462 -61
  44. package/lib/instance-resolution.mjs +387 -0
  45. package/lib/materialize.mjs +580 -0
  46. package/lib/operator-dispatch.mjs +117 -0
  47. package/lib/packages.mjs +558 -1269
  48. package/lib/remote.mjs +718 -0
  49. package/lib/resolve.mjs +638 -0
  50. package/lib/schedule.mjs +90 -16
  51. package/lib/workspace.mjs +654 -0
  52. package/package.json +1 -1
  53. package/lib/portable-migration-artifacts.mjs +0 -135
  54. package/lib/portable-migration-evidence.mjs +0 -305
  55. package/lib/portable-migration-store.mjs +0 -199
  56. package/lib/portable-migration.mjs +0 -104
  57. package/lib/portable-onboarding-acceptance.mjs +0 -66
  58. package/lib/setup-expert-source.mjs +0 -100
@@ -31,43 +31,70 @@ instance/.claude/skills -> ../.agents/skills
31
31
 
32
32
  Spawn copies kernel + soul-private + active capability skills into real
33
33
  instance-local directories there. Directory symlinks are not used because
34
- harness recursive discovery may not descend through them. Packages retain
35
- skills in their own artifact; activation selects them for materialization. Config-level `.agents/skills` is not an OATS capability source
34
+ harness recursive discovery may not descend through them. Under the workspace
35
+ model (0.25) every capability is copied whole into
36
+ `instance/.oats/modules/<capability>/` and its skills into
37
+ `instance/.agents/skills/<capability>/<skill>/`; nothing is installed at a
38
+ config level. Config-level `.agents/skills` is not an OATS capability source
36
39
  or an ambient runtime discovery root.
37
40
 
38
- Pi starts spawned sessions with ambient skill and context discovery disabled
39
- and the one instance path explicit; its globally configured extensions remain
40
- enabled. Claude runs provider-native: it reads the instance's `.claude/skills`
41
- and `CLAUDE.md` symlinks, and the operator's own user and project
42
- configuration — skills, plugins, settings — stays in effect. Neither runtime
43
- gets a redirected config home. `composition.materialized.runtimePosture` in
44
- `instance.json` records what each instance actually exposes.
45
- `oats-getting-started` is the sole pre-workspace ambient bootstrap.
46
-
47
- Duplicate skill directory names are errors unless config's `skill-overrides`
48
- selects a source.
41
+ Harnesses start normally (workspace-model decision 13, and the behaviour of
42
+ every launch a 0.25 kernel performs, classic homes included): Pi starts with
43
+ cwd = the instance home, the composed `AGENTS.md` appended to its system
44
+ prompt, and its own skill, context and extension discovery intact — the
45
+ instance's copied skills are found because they sit under cwd; machine-level
46
+ and repo-level skills resolve exactly as without OATS. *(0.24 kernels started
47
+ Pi with ambient skill and context discovery disabled and the one instance path
48
+ explicit; that exclusion is gone.)* Claude runs provider-native: it reads the
49
+ instance's `.claude/skills` and `CLAUDE.md` symlinks, and the operator's own
50
+ user and project configuration — skills, plugins, settings — stays in effect.
51
+ Neither runtime gets a redirected config home.
52
+ `composition.materialized.runtimePosture` in `instance.json` records what each
53
+ instance actually exposes. `oats-getting-started` is the sole pre-workspace
54
+ ambient bootstrap.
55
+
56
+ Duplicate skill directory names within the OATS-composed set are errors
57
+ (`E_SKILL_DUPLICATE`, naming both capabilities) unless the classic config's
58
+ `skill-overrides` selects a source; between a composed skill and an ambient
59
+ repo/machine skill the harness's own precedence decides (decision 16).
49
60
 
50
61
  ## Package locations
51
62
 
63
+ **Workspace model (0.25, current):** nothing is installed. A capability lives
64
+ where its owner keeps it and is copied whole into each instance at spawn:
65
+
66
+ ```text
67
+ <member repo>/capabilities/<name>/oats.json # member-tier capability, latest state (membership is the trust)
68
+ <package repo>/oats-package/oats-package.json # package-tier: versioned via oats-workspace.yaml packages:
69
+ <deployment>/oats-lock.json # lockfileVersion 3: package commit, integrity, per-version approval
70
+ <instance>/.oats/modules/<capability>/ # the copy this instance runs
71
+ ```
72
+
73
+ **Classic 0.24 layout** (still launched by the 0.24 kernel; a 0.25 kernel
74
+ reads none of it as configuration — see [rebuild-to-v2.md](rebuild-to-v2.md)):
75
+
52
76
  ```text
53
77
  <package>/capabilities/<name>/oats.json # the official marketplace (install source, not ambient)
54
78
  <level>/.agents/capabilities/installed/<name>/oats.json # acquired (gitignored, restorable)
55
79
  <level>/.agents/capabilities/owned/<name>/oats.json # authored at this scope (source; committed where the scope is a repo)
56
- <level>/oats-lock.json # external source/integrity/trust
80
+ <level>/oats-lock.json # lockfileVersion 2: external source/integrity/trust
57
81
  ```
58
82
 
59
83
  ## Quick map
60
84
 
61
- | Thing | Canonical location |
62
- |---|---|
63
- | Config | `<level>/oats-config.yaml` |
64
- | Acquisition lock | `<level>/oats-lock.json` |
65
- | Soul operating doc | `soul/AGENTS.md` |
66
- | Soul Claude view | `soul/CLAUDE.md -> AGENTS.md` |
67
- | Soul-private skills | `soul/skills/` |
68
- | Instance operating doc | `instance/AGENTS.md` (generated) |
69
- | Instance skill set | `instance/.agents/skills/` |
70
- | Instance metadata | `instance/instance.json` |
85
+ | Thing | Canonical location (0.25 workspace model) | 0.24 classic |
86
+ |---|---|---|
87
+ | Shared declaration | `oats-workspace.yaml` in the host repo; `oats-membership.yaml` in every member | `oats-config.yaml` chain, `oats.yaml` |
88
+ | Per-machine config | `<deployment>/oats-local.yaml` (uncommitted) | `oats-config.yaml` `settings:` |
89
+ | Acquisition lock | `<deployment>/oats-lock.json` (v3) | `<level>/oats-lock.json` (v2) |
90
+ | Soul source | `<member repo>/souls/<name>/` | `agents/<name>/soul/` |
91
+ | Soul operating doc | `souls/<name>/AGENTS.md` | `soul/AGENTS.md` |
92
+ | Soul Claude view | `souls/<name>/CLAUDE.md -> AGENTS.md` | `soul/CLAUDE.md -> AGENTS.md` |
93
+ | Soul-private skills | `souls/<name>/skills/` | `soul/skills/` |
94
+ | Instance operating doc | `instance/AGENTS.md` (generated) | same |
95
+ | Instance skill set | `instance/.agents/skills/` | same |
96
+ | Instance modules | `instance/.oats/modules/<capability>/` | `.agents/capabilities/installed/` (shared) |
97
+ | Instance metadata | `instance/instance.json` (`modules{}`, `providers{}`, `workspace{}`) | `instance/instance.json` |
71
98
 
72
99
  Symlinks prevent compatibility paths from drifting. Generated regular files
73
100
  separate canonical portable identity from scope-dependent runtime policy.
@@ -1,5 +1,7 @@
1
1
  # Fresh operator walkthrough: working preparation versus pending launch
2
2
 
3
+ > **Superseded (2026-09-23).** The acceptance driver and helper this walkthrough runs (`test/portable-onboarding-public.acceptance.mjs`, `test/helpers/portable-onboarding-consumer.mjs`) were deleted with the workspace model v2; the 0.25 operator path is `oats onboard` → `oats sync` → `oats spawn` (`docs/first-team.md`). Read [2026-09-23-simplified-workspace-model.md](2026-09-23-simplified-workspace-model.md) (worked example) and [2026-09-23-workspace-module-contracts.md](2026-09-23-workspace-module-contracts.md) (normative) instead; kept as history.
4
+
3
5
  ## Scope of this evidence
4
6
 
5
7
  This is a **source-level integration walkthrough**, not a claim about an installed
@@ -20,24 +22,27 @@ backlink; inspection/preparation never adopts or contacts that workspace.
20
22
 
21
23
  ## Reproduce the pinned public consumer
22
24
 
23
- From the framework worktree, with the existing locked root dependencies installed
24
- and both exact core commits available in the local Git object database:
25
+ **No longer runnable.** The acceptance driver and its helper were deleted with
26
+ the workspace model v2; the command below fails with `Could not find
27
+ 'test/portable-onboarding-public.acceptance.mjs'`. The equivalent 0.25 evidence
28
+ is the CLI suite over the Northwind fixture (`test/onboard.test.mjs`,
29
+ `test/spawn-standalone.test.mjs`, `test/fixtures/northwind/build.mjs`).
25
30
 
26
- ```bash
27
- node --test --test-timeout=60000 test/portable-onboarding-public.acceptance.mjs
31
+ ```text
32
+ # historical (deleted): node --test --test-timeout=60000 test/portable-onboarding-public.acceptance.mjs
28
33
  ```
29
34
 
30
- This explicit acceptance driver is separate from the default `*.test.mjs` suite:
35
+ This explicit acceptance driver was separate from the default `*.test.mjs` suite:
31
36
  a shallow checkout or source tarball need not contain a historical cross-branch
32
- commit. An explicit run **fails** if the pin or matching dependency lock is absent;
33
- it never silently skips, fetches a moving branch, substitutes current core or
34
- strips unsupported request fields.
35
-
36
- `test/helpers/portable-onboarding-consumer.mjs` archives committed core objects
37
- into owned ignored `stage/onboarding-consumer-*` scratch and verifies the pin and
38
- held-patch exclusion. It links only this worktree's dependencies after comparing
39
- the complete npm lock. No working files from another agent are loaded and no Git
40
- worktree/branch is added, reset or merged. Only the fixture's scratch is removed
37
+ commit. An explicit run **failed** if the pin or matching dependency lock was absent;
38
+ it never silently skipped, fetched a moving branch, substituted current core or
39
+ stripped unsupported request fields.
40
+
41
+ `test/helpers/portable-onboarding-consumer.mjs` (deleted) archived committed core objects
42
+ into owned ignored `stage/onboarding-consumer-*` scratch and verified the pin and
43
+ held-patch exclusion. It linked only this worktree's dependencies after comparing
44
+ the complete npm lock. No working files from another agent were loaded and no Git
45
+ worktree/branch was added, reset or merged. Only the fixture's scratch was removed
41
46
  on completion.
42
47
 
43
48
  The test runs real native Git observations with isolated host configuration and
@@ -1,5 +1,7 @@
1
1
  # Portable migration evidence reader and planner
2
2
 
3
+ > **Superseded (2026-09-23).** The modules this note describes (`lib/portable-migration-evidence.mjs`, `lib/portable-migration.mjs`, `lib/portable-migration-store.mjs`, `lib/portable-migration-artifacts.mjs`, `lib/legacy-lock-codec.mjs`) were deleted with the workspace model v2 — there is no migration (decision 5/15: a 0.24 lock is `E_LOCK_SCHEMA`, not evidence). Read [2026-09-23-simplified-workspace-model.md](2026-09-23-simplified-workspace-model.md) (worked example) and [2026-09-23-workspace-module-contracts.md](2026-09-23-workspace-module-contracts.md) (normative) instead; kept as history.
4
+
3
5
  16 September 2026. This is the first read-only implementation slice of the
4
6
  Portable Souls consumer migration. The retention contract and the fifteen
5
7
  binding decisions in `2026-09-15-portable-souls-handoff.md` remain authoritative.
@@ -1,5 +1,7 @@
1
1
  # Portable fresh onboarding and source discovery
2
2
 
3
+ > **Superseded (2026-09-23).** The 0.24 onboarding facade this note describes (`lib/portable-onboarding-acceptance.mjs`, `test/portable-onboarding-public.acceptance.mjs`, source editions, exports) was deleted with the workspace model v2; the 0.25 bootstrap is `oats onboard [<dir>] --workspace <ref>` (contract §6, `docs/desktop-cli-api.md`). Read [2026-09-23-simplified-workspace-model.md](2026-09-23-simplified-workspace-model.md) (worked example) and [2026-09-23-workspace-module-contracts.md](2026-09-23-workspace-module-contracts.md) (normative) instead; kept as history.
4
+
3
5
  16 September 2026. This module supports a controlled fresh setup path while
4
6
  historical in-place migration is deferred. It does not alter the Portable Souls
5
7
  architecture or weaken the existing partial/unknown evidence safeguards.
@@ -109,7 +111,7 @@ onboarding CLI is still separate integration work.
109
111
 
110
112
  ## Fresh acceptance driver
111
113
 
112
- `lib/portable-onboarding-acceptance.mjs` keeps acceptance above the same facade:
114
+ `lib/portable-onboarding-acceptance.mjs` (deleted with v2) kept acceptance above the same facade:
113
115
 
114
116
  - `compareFreshSourceAcceptance({organization,standalone})` accepts only issued,
115
117
  ready inspections and proves qualified identity, exact commit, export and
@@ -147,7 +149,7 @@ the helper does not claim CLI router availability.
147
149
 
148
150
  ## Pinned real public consumer
149
151
 
150
- `test/portable-onboarding-public.acceptance.mjs` additionally executes the real
152
+ `test/portable-onboarding-public.acceptance.mjs` (deleted with v2) additionally executed the real
151
153
  public preparation/approval/retained-inspection APIs archived from exact core
152
154
  `c5c6a3c9171e424a36a1bdbf3932b9319a3c6c72`, without merging its branch. It uses
153
155
  isolated local Git transport, temporary deployments and a declared inert fixture
@@ -2,7 +2,7 @@
2
2
 
3
3
  **Purpose:** the one accurate view of every work stream in the redesign, what is on main, what is in flight, who owns it, and what blocks it. Lead: `oats-expert` (redesign lead). Updated whenever anything merges, is returned, or reality changes. Older per-lane boards are superseded by this file.
4
4
 
5
- **Last update:** 2026-09-22 23:45Z · v0.24.12 published · **slice 8 approved** (no polling; command-running GET `/api/schedules` to be REMOVED; remote history unsupported; captured edit = honest limitation; transcript = provenance only, read-only transcript verb = K12 Decision later) · **K8b PR95 → main `ee60d1e2`** (`schedule-read-2` / `scheduleHistoryApi 3`: runId by time, bounded fd state reads + 1 MiB budget, per-job isolation, scope/id echo, `session` provenance replaces `transcript`) · 12 receipts to engineer · engineer wiring 8 → then rest of frame 10 · open: K11, K12 transcript, attach-knowledge, auto-PR, branch enumeration
5
+ **Last update:** 2026-09-23 17:40Z · **Workspace model v2 phases A–C ON MAIN (`59ae22df`, PR99) → **`v0.25.0` PUBLISHED** (bump `dc333e4e`)** · Phase D next (framework repos as the first workspace; six expert souls; `oats.core`/`oats.setup` rewrite) · ⏸ parity pipeline still paused except 10B-0 (→ 0.24.14 when the engineer hands off; note: 0.24.14 must be cut from the 0.24 line, not main).
6
6
 
7
7
  Legend: ✅ on main/published · 🔄 in flight (PR/branch) · 🟡 preserved, not adopted · ⬜ not started · ⛔ blocked
8
8
 
@@ -4,6 +4,8 @@
4
4
 
5
5
  **Status:** Phase1 implementation authorised by the human, using the existing developers under lead supervision/review. The workspace home is confirmed as `oats`; `oats-dev` remains development capabilities. This does not claim completed conversion or authorise unspecified new contracts, credential operations or live deployment mutations.
6
6
 
7
+ > **2026-09-23 — direction change, read first.** Phases 1–3 delivered as written (workspace on Git, five souls + central knowledge, all contract-bearing Desktop parity slices, releases 0.24.7–0.24.13). Reviewing the result, the human judged the *declaration model* itself too heavy and, in one sitting, accepted a simplified **workspace model v2**: one workspace per org; reciprocal membership as the only gate and as the trust decision; a soul says `from:` (member repo | `here` | `package`) — a location, never a version; packages are the only versioned thing; **nothing is installed** — every capability is copied whole into the instance at spawn; discovery over Git remotes; teams as labels; harnesses start normally. Record: `agents/oats-expert/soul/knowledge/decisions/workspace-model-v2.md`; worked example: [2026-09-23-simplified-workspace-model.md](2026-09-23-simplified-workspace-model.md). **Consequences for this plan:** P1.3's `oats.yaml` export indexes and P1.4's `oats-config.yaml` activation are superseded (→ `oats-membership.yaml`, derived activation); D1/D4 stand (`oats.core` becomes `from: package` by default; the catalog stays as discovery); D2's "explicit `oats.core` on every soul" is met by the workspace default; D3 gains the `<name>-workspace/` convention and clone-then-spawn. **No migration** — clean v2, the framework's own repos are the first workspace. A Phase 4 implementation plan is proposed to the human before any `lib/`/`bin/` change; the Desktop parity pipeline is paused meanwhile except for the in-flight 10B-0 security fix.
8
+
7
9
  ## Goal and order
8
10
 
9
11
  1. Put OATS development onto the Git-workspace and Portable Souls architecture: a real shared workspace definition, qualified repository exports, by-reference sources and usable local deployments.