@awebai/oats 0.29.3 → 0.30.0

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 (232) hide show
  1. package/README.md +12 -6
  2. package/bin/oats.mjs +203 -54
  3. package/capabilities/oats-aweb/bin/oats-aweb.mjs +538 -204
  4. package/capabilities/oats-aweb/injects/aweb.md +1 -1
  5. package/capabilities/oats-aweb/lib/binding-wire.mjs +31 -22
  6. package/capabilities/oats-aweb/oats.json +5 -12
  7. package/capabilities/oats-aweb/skills/VENDORED.md +4 -4
  8. package/capabilities/oats-aweb/skills/aweb-team-membership/SKILL.md +1 -1
  9. package/capabilities/oats-aweb/skills/oats-aweb/SKILL.md +83 -13
  10. package/capabilities/oats-code-review/injects/reviewer.md +26 -0
  11. package/capabilities/oats-code-review/oats.json +16 -0
  12. package/capabilities/oats-code-review/skills/adversarial-review/SKILL.md +66 -0
  13. package/capabilities/oats-code-review/skills/review-dev-docs/SKILL.md +30 -0
  14. package/capabilities/oats-code-review/skills/security-review/SKILL.md +56 -0
  15. package/capabilities/oats-code-review/skills/simplification-review/SKILL.md +34 -0
  16. package/capabilities/oats-developer/injects/developer.md +38 -0
  17. package/capabilities/oats-developer/oats.json +17 -0
  18. package/capabilities/oats-developer/skills/execution-strategy/SKILL.md +43 -0
  19. package/capabilities/oats-developer/skills/maintain-dev-docs/SKILL.md +47 -0
  20. package/capabilities/oats-developer/skills/run-the-review-loop/SKILL.md +65 -0
  21. package/capabilities/oats-developer/skills/understand-the-spec/SKILL.md +37 -0
  22. package/capabilities/oats-developer/skills/worktrees/SKILL.md +36 -0
  23. package/capabilities/oats-engineering-expert/injects/expert.md +37 -0
  24. package/capabilities/oats-engineering-expert/oats.json +17 -0
  25. package/capabilities/oats-engineering-expert/skills/coordinate-developers/SKILL.md +37 -0
  26. package/capabilities/oats-engineering-expert/skills/coordinate-experts/SKILL.md +52 -0
  27. package/capabilities/oats-engineering-expert/skills/land-your-prs/SKILL.md +50 -0
  28. package/capabilities/oats-engineering-expert/skills/plan-and-spec/SKILL.md +53 -0
  29. package/capabilities/oats-engineering-expert/skills/verify-developer-work/SKILL.md +49 -0
  30. package/capabilities/oats-okf/bin/oats-okf.mjs +16 -9
  31. package/capabilities/oats-okf/lib/binding-wire.mjs +47 -15
  32. package/capabilities/oats-okf/lib/config.mjs +2 -1
  33. package/capabilities/oats-okf/lib/consult.mjs +26 -4
  34. package/capabilities/oats-okf/lib/harvest-switch.mjs +16 -3
  35. package/capabilities/oats-okf/lib/inspection.mjs +26 -7
  36. package/capabilities/oats-okf/lib/io.mjs +9 -1
  37. package/capabilities/oats-okf/lib/sources.mjs +34 -3
  38. package/capabilities/oats-okf/lib/stores.mjs +8 -6
  39. package/capabilities/oats-okf/lib/worker.mjs +7 -17
  40. package/capabilities/oats-okf/oats.json +6 -3
  41. package/capabilities/oats-okf-harvest/bin/okf-harvest.mjs +2 -2
  42. package/capabilities/oats-okf-harvest/oats.json +3 -3
  43. package/capabilities/oats-okf-harvest/skills/knowledge-harvest/SKILL.md +6 -6
  44. package/capabilities/oats-okf-maintenance/bin/okf-maintenance.mjs +37 -16
  45. package/capabilities/oats-okf-maintenance/injects/maintainer.md +1 -1
  46. package/capabilities/oats-okf-maintenance/lib/provenance.mjs +6 -1
  47. package/capabilities/oats-okf-maintenance/oats.json +2 -2
  48. package/capabilities/oats-okf-maintenance/skills/knowledge-review/SKILL.md +17 -2
  49. package/capabilities/oats-okf-maintenance/skills/okf-trigger-setup/SKILL.md +11 -23
  50. package/capabilities/oats-workspace-experts/injects/oats-experts.md +26 -0
  51. package/capabilities/oats-workspace-experts/oats.json +9 -0
  52. package/docs/capabilities.md +160 -171
  53. package/docs/capability-manifest.schema.json +7 -10
  54. package/docs/configuration.md +213 -64
  55. package/docs/design/2026-09-16-knowledge-capability-contract.md +36 -50
  56. package/docs/design/2026-09-23-workspace-module-contracts.md +377 -544
  57. package/docs/design/2026-09-26-okf-knowledge-operations.md +132 -357
  58. package/docs/design/2026-09-27-team-model-v2.md +116 -0
  59. package/docs/design/2026-09-28-automations-trust.md +38 -0
  60. package/docs/design/2026-09-28-soul-launch-preference.md +63 -0
  61. package/docs/design/HISTORY.md +65 -0
  62. package/docs/design/README.md +23 -54
  63. package/docs/desktop-cli-api.md +1787 -1777
  64. package/docs/desktop.md +30 -91
  65. package/docs/execution-targets.md +146 -292
  66. package/docs/first-team.md +31 -17
  67. package/docs/implementation.md +76 -288
  68. package/docs/integrations.md +118 -320
  69. package/docs/knowledge-capability-authoring.md +25 -52
  70. package/docs/knowledge-reference/acceptance.md +3 -3
  71. package/docs/knowledge-reference/adoption.md +1 -1
  72. package/docs/knowledge-reference/harvester.md +2 -2
  73. package/docs/knowledge-reference/package-craft.md +3 -3
  74. package/docs/knowledge-reference/provider-mapping.md +3 -6
  75. package/docs/knowledge-reference/reader-capture.md +3 -3
  76. package/docs/knowledge-theory.md +62 -166
  77. package/docs/knowledge.md +225 -404
  78. package/docs/layers.md +42 -97
  79. package/docs/oats-local.schema.json +58 -5
  80. package/docs/oats-membership.schema.json +1 -8
  81. package/docs/oats-package.schema.json +5 -5
  82. package/docs/oats-workspace.schema.json +8 -22
  83. package/docs/official-catalog.md +25 -28
  84. package/docs/packages.md +45 -63
  85. package/docs/plans/0.30-close-out.md +61 -0
  86. package/docs/release-lane.md +77 -0
  87. package/docs/release-notes/oats-framework-v1.1.3.md +10 -8
  88. package/docs/release-notes/v0.19.0.md +48 -147
  89. package/docs/release-notes/v0.19.1.md +2 -3
  90. package/docs/release-notes/v0.19.3.md +2 -15
  91. package/docs/release-notes/v0.20.0.md +0 -15
  92. package/docs/release-notes/v0.22.0.md +71 -138
  93. package/docs/release-notes/v0.22.1.md +42 -90
  94. package/docs/release-notes/v0.22.10.md +1 -1
  95. package/docs/release-notes/v0.22.11.md +1 -47
  96. package/docs/release-notes/v0.22.12.md +4 -13
  97. package/docs/release-notes/v0.22.13.md +1 -42
  98. package/docs/release-notes/v0.22.14.md +3 -11
  99. package/docs/release-notes/v0.22.15.md +1 -46
  100. package/docs/release-notes/v0.22.16.md +6 -8
  101. package/docs/release-notes/v0.22.18.md +1 -99
  102. package/docs/release-notes/v0.22.19.md +3 -14
  103. package/docs/release-notes/v0.22.2.md +6 -15
  104. package/docs/release-notes/v0.22.3.md +0 -1
  105. package/docs/release-notes/v0.22.4.md +1 -14
  106. package/docs/release-notes/v0.22.5.md +2 -12
  107. package/docs/release-notes/v0.22.6.md +0 -3
  108. package/docs/release-notes/v0.23.0.md +9 -25
  109. package/docs/release-notes/v0.23.1.md +9 -25
  110. package/docs/release-notes/v0.23.2.md +2 -4
  111. package/docs/release-notes/v0.24.0.md +56 -97
  112. package/docs/release-notes/v0.24.1.md +7 -11
  113. package/docs/release-notes/v0.24.10.md +34 -45
  114. package/docs/release-notes/v0.24.11.md +12 -20
  115. package/docs/release-notes/v0.24.12.md +35 -48
  116. package/docs/release-notes/v0.24.13.md +34 -41
  117. package/docs/release-notes/v0.24.2.md +9 -13
  118. package/docs/release-notes/v0.24.3.md +7 -11
  119. package/docs/release-notes/v0.24.4.md +6 -6
  120. package/docs/release-notes/v0.24.5.md +6 -10
  121. package/docs/release-notes/v0.24.6.md +2 -5
  122. package/docs/release-notes/v0.24.7.md +46 -75
  123. package/docs/release-notes/v0.24.8.md +58 -96
  124. package/docs/release-notes/v0.24.9.md +38 -54
  125. package/docs/release-notes/v0.25.0.md +59 -76
  126. package/docs/release-notes/v0.25.1.md +57 -81
  127. package/docs/release-notes/v0.25.2.md +51 -70
  128. package/docs/release-notes/v0.25.3.md +11 -13
  129. package/docs/release-notes/v0.25.4.md +9 -13
  130. package/docs/release-notes/v0.25.5.md +3 -5
  131. package/docs/release-notes/v0.25.6.md +20 -29
  132. package/docs/release-notes/v0.25.7.md +5 -7
  133. package/docs/release-notes/v0.25.8.md +26 -39
  134. package/docs/release-notes/v0.26.0.md +175 -646
  135. package/docs/release-notes/v0.27.0.md +4 -5
  136. package/docs/release-notes/v0.27.1.md +4 -6
  137. package/docs/release-notes/v0.27.2.md +1 -1
  138. package/docs/release-notes/v0.28.0.md +57 -124
  139. package/docs/release-notes/v0.29.0.md +89 -208
  140. package/docs/release-notes/v0.29.1.md +1 -1
  141. package/docs/release-notes/v0.29.2.md +3 -4
  142. package/docs/release-notes/v0.29.4.md +90 -0
  143. package/docs/release-notes/v0.30.0.md +205 -0
  144. package/docs/schedules.md +280 -349
  145. package/docs/servers.md +99 -117
  146. package/docs/soul.schema.json +2 -9
  147. package/docs/souls-and-instances.md +145 -158
  148. package/docs/workspaces.md +132 -215
  149. package/lib/automations.mjs +28 -6
  150. package/lib/core.mjs +226 -74
  151. package/lib/instance-events.mjs +1 -1
  152. package/lib/instance-inspect.mjs +109 -34
  153. package/lib/instance-lifecycle.mjs +14 -1
  154. package/lib/instance-resolution.mjs +26 -27
  155. package/lib/launch-preference.mjs +87 -0
  156. package/lib/materialize.mjs +3 -3
  157. package/lib/packages.mjs +2 -5
  158. package/lib/resolve.mjs +29 -87
  159. package/lib/schedule.mjs +32 -18
  160. package/lib/teams-verbs.mjs +195 -0
  161. package/lib/teams.mjs +190 -0
  162. package/lib/triggers.mjs +53 -17
  163. package/lib/workspace.mjs +54 -147
  164. package/package-catalog.json +9 -15
  165. package/package.json +1 -1
  166. package/skills/oats-getting-started/SKILL.md +25 -13
  167. package/capabilities/oats-review/injects/review.md +0 -69
  168. package/capabilities/oats-review/oats.json +0 -10
  169. package/capabilities/oats-review/skills/code-review/SKILL.md +0 -44
  170. package/capabilities/oats-review/skills/security-review/SKILL.md +0 -59
  171. package/docs/conventions.md +0 -90
  172. package/docs/design/2026-09-07-architecture-reassessment.md +0 -131
  173. package/docs/design/2026-09-07-desktop-souls-capabilities.md +0 -50
  174. package/docs/design/2026-09-07-mobile-agent-management-proposal.md +0 -228
  175. package/docs/design/2026-09-08-expert-assisted-deployment-proposal.md +0 -558
  176. package/docs/design/2026-09-13-knowledge-and-memory-direction.md +0 -744
  177. package/docs/design/2026-09-13-knowledge-implementation.md +0 -127
  178. package/docs/design/2026-09-13-knowledge-location-contract.md +0 -340
  179. package/docs/design/2026-09-14-artifact-retention-contract.md +0 -190
  180. package/docs/design/2026-09-14-portable-souls-and-git-workspaces.md +0 -708
  181. package/docs/design/2026-09-14-portable-souls-contract-amendments.md +0 -85
  182. package/docs/design/2026-09-14-portable-souls-explainer.md +0 -750
  183. package/docs/design/2026-09-15-captured-dispatch.md +0 -127
  184. package/docs/design/2026-09-15-captured-resolution-records.md +0 -143
  185. package/docs/design/2026-09-15-package-preparation.md +0 -100
  186. package/docs/design/2026-09-15-portable-data-contract.md +0 -121
  187. package/docs/design/2026-09-15-portable-declarations.md +0 -189
  188. package/docs/design/2026-09-15-portable-souls-handoff.md +0 -150
  189. package/docs/design/2026-09-15-portable-souls-implementation.md +0 -417
  190. package/docs/design/2026-09-15-selection-lock-and-approval.md +0 -122
  191. package/docs/design/2026-09-15-source-observation.md +0 -119
  192. package/docs/design/2026-09-16-captured-admission.md +0 -77
  193. package/docs/design/2026-09-16-captured-helper-dispatch.md +0 -105
  194. package/docs/design/2026-09-16-captured-launch-inputs.md +0 -42
  195. package/docs/design/2026-09-16-command-profile-preparation.md +0 -86
  196. package/docs/design/2026-09-16-fresh-install-first-rollout.md +0 -47
  197. package/docs/design/2026-09-16-fresh-operator-walkthrough.md +0 -282
  198. package/docs/design/2026-09-16-messaging-capability-contract.md +0 -59
  199. package/docs/design/2026-09-16-portable-migration-evidence.md +0 -158
  200. package/docs/design/2026-09-16-portable-onboarding.md +0 -179
  201. package/docs/design/2026-09-16-prepare-request-transport.md +0 -26
  202. package/docs/design/2026-09-16-provider-binding-codecs.md +0 -98
  203. package/docs/design/2026-09-16-provider-binding-wire.md +0 -274
  204. package/docs/design/2026-09-17-capability-helper-input-contract.md +0 -95
  205. package/docs/design/2026-09-17-captured-backend-parity.md +0 -53
  206. package/docs/design/2026-09-17-captured-native-start.md +0 -58
  207. package/docs/design/2026-09-17-portable-boundary-hookup.md +0 -19
  208. package/docs/design/2026-09-17-portable-boundary-resources.md +0 -52
  209. package/docs/design/2026-09-17-public-captured-start.md +0 -108
  210. package/docs/design/2026-09-17-public-prepare-request.md +0 -90
  211. package/docs/design/2026-09-18-captured-pi-host.md +0 -205
  212. package/docs/design/2026-09-18-first-cut-release-checklist.md +0 -131
  213. package/docs/design/2026-09-18-herdr-protocol-compatibility.md +0 -60
  214. package/docs/design/2026-09-20-redesign-program-board.md +0 -142
  215. package/docs/design/2026-09-20-workspace-and-portable-adoption-plan.md +0 -289
  216. package/docs/design/2026-09-20-workspace-onboarding-public.md +0 -207
  217. package/docs/design/2026-09-22-desktop-parity-seams.md +0 -58
  218. package/docs/design/2026-09-23-simplified-workspace-model.md +0 -711
  219. package/docs/design/2026-09-23-workspace-v2-implementation-plan.md +0 -65
  220. package/docs/design/2026-09-24-desktop-phase-f-boundary.md +0 -242
  221. package/docs/design/2026-09-24-phase-d-plan.md +0 -305
  222. package/docs/design/2026-09-25-teams-contract.md +0 -258
  223. package/docs/design/2026-09-26-desktop-design-brief-architecture.md +0 -241
  224. package/docs/design/desktop-ux-plan.md +0 -362
  225. package/docs/design/launch-configurations.md +0 -168
  226. package/docs/design/okf-mirror-provenance.md +0 -105
  227. package/docs/design/operations-contract.md +0 -141
  228. package/docs/oats-member.schema.json +0 -38
  229. package/skills/integration-authoring/SKILL.md +0 -84
  230. package/skills/oats-support/SKILL.md +0 -79
  231. package/skills/skill-craft/SKILL.md +0 -109
  232. package/skills/soul-craft/SKILL.md +0 -116
@@ -2,7 +2,7 @@
2
2
 
3
3
  Souls and instances are the two layers the OATS kernel owns. A soul defines a
4
4
  reusable specialisation. An instance is a named working incarnation, with its own
5
- ID, home, work view and lifecycle—not necessarily one task or chat session.
5
+ ID, home, work view and lifecycle; not necessarily one task or chat session.
6
6
 
7
7
  An instance may be ephemeral, such as a developer or reviewer doing bounded work,
8
8
  or long-running, carrying planning, investigation and domain understanding across
@@ -15,17 +15,33 @@ discovered over Git; their capabilities are resolved by `from:` and copied whole
15
15
  into each instance. This page is the soul's and the instance's anatomy under
16
16
  that model.
17
17
 
18
+ ## Quick map
19
+
20
+ | Thing | Location |
21
+ |---|---|
22
+ | Shared declaration | `oats-workspace.yaml` in the host repo; `oats-membership.yaml` in every member |
23
+ | Per-machine config | `<deployment>/oats-local.yaml` (uncommitted; [configuration.md](configuration.md)) |
24
+ | Package lock | `<deployment>/oats-lock.json` ([packages.md](packages.md#lock-v3)) |
25
+ | Soul | `<member repo>/souls/<name>/`: `soul.yaml`, `AGENTS.md`, `CLAUDE.md → AGENTS.md`, `skills/` |
26
+ | Member capability | `<member repo>/capabilities/<name>/oats.json` (latest state) |
27
+ | Package capability | `<package repo>/oats-package/capabilities/<name>/` (versioned) |
28
+ | Instance home | `<deployment>/agents/<soul>/instances/<instance>/` |
29
+ | Instance operating doc | `<home>/AGENTS.md` (generated) |
30
+ | Instance skills | `<home>/.agents/skills/` |
31
+ | Instance modules | `<home>/.oats/modules/<capability>/` (the copies this instance runs) |
32
+ | Instance record | `<home>/instance.json` (`modules`, `providers`, `workspace`, `teams`) |
33
+
18
34
  ## Soul anatomy
19
35
 
20
36
  A soul is durable and committed. It is the part you review, improve, and keep.
21
37
 
22
38
  ```text
23
39
  <member-repo>/souls/<name>/ # discoverable in the workspace by convention
24
- soul.yaml # schemaVersion 2: name, description, work, team, capabilities, provider payloads
40
+ soul.yaml # schemaVersion 2: name, description, work, capabilities, provider payloads
25
41
  AGENTS.md # canonical operating doc
26
42
  CLAUDE.md → AGENTS.md
27
43
  skills/ # skills specific to this expert
28
- okf.json # if the soul uses oats.okf: { version: 1, owner, owns: ["<base>/<node>"], reads: […] } — the provider's, not the kernel's
44
+ okf.json # if the soul uses oats.okf: { version: 1, owner, owns: ["<base>/<node>"], reads: […] } (the provider's, not the kernel's)
29
45
  ```
30
46
 
31
47
  (A deployment's `agents/<name>/souls/<commit12>/` has the same shape; a member
@@ -39,40 +55,40 @@ schemaVersion: 2
39
55
  name: release-manager # must equal the directory name
40
56
  description: Cuts, verifies and announces releases.
41
57
  work: worktree # worktree | checkout | directory | workspace
42
- team: engineering # optional label; else the repo's default (oats-membership.yaml); else unassigned
43
58
 
44
- capabilities: # WHERE each capability comes from — a location, never a version
59
+ capabilities: # WHERE each capability comes from: a location, never a version
45
60
  acme-release-tooling: { from: here } # here = this soul's own repo
46
61
  acme-warehouse-access: { from: github.com/acme/data } # a canonical repo key of a confirmed member
47
62
  acme-deploy: { from: package } # provided by a package pinned in the workspace's packages:
48
- acme-house-style: off # removes a workspace/team default
63
+ acme-house-style: off # removes a workspace default
49
64
 
50
- knowledge: # provider payloads — opaque to the kernel, consumed by the slot's capability
51
- harvest-runtime: claude # (oats.okf 2.1.3 reads only its binding's settings keys here; what the soul
52
- # owns/reads is in this directory's okf.json — see "Soul anatomy")
65
+ knowledge: # provider payloads: opaque to the kernel, consumed by the slot's capability
66
+ harvest: off # (what the soul owns and reads is in this directory's okf.json)
53
67
  messaging:
54
68
  channels: [acme-eng]
55
69
  tasks: none # `none` empties the slot (drops the workspace default)
56
70
 
57
- compatibility: # optional floors on PACKAGE versions — constraints, not sources
58
- oats.okf: ">=2.1"
71
+ compatibility: # optional floors on PACKAGE versions: constraints, not sources
72
+ oats.okf: ">=4.0"
73
+
74
+ launch: { harness: claude, model: claude-opus-5-5 } # optional (0.30): what the role should run on
59
75
  ```
60
76
 
61
77
  | Key | Meaning |
62
78
  |---|---|
63
79
  | `name`, `description`, `work` | Required. `work` is the work mode below. |
64
- | `team` | A label, or a list of labels (the first the primary), declared in the workspace's `teams:`; each may add `defaults.byTeam` capabilities and is an eligible messaging team. Never gates or restricts. |
65
- | `private` | **Ignored since 0.26.0:** souls have no private mode. Every soul of a confirmed member is listed and spawnable; a soul that still carries the field gets a `soul-private-ignored` warning. Remove it. |
66
- | `capabilities` | `<cap>: { from: here \| <repo key> \| package }` or `<cap>: off`. Composed over `defaults.<slot>` ⊕ `defaults.capabilities` ⊕ `defaults.byTeam[team]`; the soul wins. |
67
- | `knowledge` / `messaging` / `tasks` | The slot's provider payload (true of every instance of the soul), or `none`. Merged with `oats-local.yaml` `settings.<cap>` and `spawn --provider <cap>`; the provider's `binding` contract validates the result — and refuses keys it does not declare. For `oats.okf` 2.1.3 the admitted keys are its settings (`bindings-file`, `state-dir`, `harvest-runtime`, `harvest-model`); the soul's `owns`/`reads` live in `souls/<name>/okf.json`, which OKF reads from the soul directory. |
80
+ | `capabilities` | `<cap>: { from: here \| <repo key> \| package }` or `<cap>: off`. Composed over `defaults.<slot>` ⊕ `defaults.capabilities`; the soul wins. |
81
+ | `knowledge` / `messaging` / `tasks` | The slot's provider payload (true of every instance of the soul), or `none`. Merged with `oats-local.yaml` `settings.<cap>` and `spawn --provider <cap>`; the provider refuses keys its manifest does not declare. For `oats.okf`, what the soul owns and reads lives in `souls/<name>/okf.json`. |
68
82
  | `compatibility` | `<cap>: <semver range>` checked against the locked package version (`E_COMPATIBILITY`). |
69
-
70
- Schema: [`soul.schema.json`](soul.schema.json). Not in v2: `kind`, `type`,
71
- `repo`, `harness`, `model`, `backend`, `yolo`, `launch-config`, `children`,
72
- `requires`, `source:`, `stores.inherit`. Runtime, model, backend, yolo and the
73
- launch configuration are spawn-time host choices (`--harness`, `--model`,
74
- `--backend`, `--yolo`, `--launch-config`, or a launch configuration in
75
- `oats-local.yaml`), not soul identity: a soul is model-agnostic as an artifact.
83
+ | `launch` | Optional (0.30): `{ harness: pi \| claude \| codex, model? }`, the role's launch preference. Only a harness and a model: args, env, yolo and the executable stay host facts. Each machine may override it (`oats-local.yaml` `souls.launch`), and spawn flags win over both ([launch preferences](configuration.md#launch-preferences)). Add it to a committed soul only once every deployment runs 0.30. |
84
+
85
+ Schema: [`soul.schema.json`](soul.schema.json). Which teams a soul joins is the
86
+ deployment's choice (`oats-local.yaml`, [workspaces.md](workspaces.md#teams)),
87
+ and the backend, yolo and launch configuration are spawn-time host choices
88
+ (`--backend`, `--yolo`, `--launch-config`, or a launch configuration in
89
+ `oats-local.yaml`), not soul identity. The harness and model are a soul's
90
+ *preference* at most (`launch:`), which each machine overrides and spawn flags
91
+ (`--harness`, `--model`) win over.
76
92
  A child-spawn policy is a spawn flag too (`--no-child-spawns`).
77
93
 
78
94
  A soul never runs by itself. It is incarnated as an instance. Editing a soul
@@ -80,16 +96,15 @@ is a code change, reviewed in its repo.
80
96
 
81
97
  ### OATS operational knowledge is a capability
82
98
 
83
- An agent's knowledge of OATS itself — status, spawn, retire, finding other
84
- souls — is ordinary capability content: **`oats.core`** (package
99
+ An agent's knowledge of OATS itself (status, spawn, retire, finding other
100
+ souls) is ordinary capability content: **`oats.core`** (package
85
101
  `oats.framework`). Workspaces give it to every soul through
86
102
  `defaults.capabilities: { oats.core: { from: package } }`; a soul may say
87
103
  `oats.core: off`. **`oats.setup`** (same package) carries the whole-architecture
88
104
  knowledge an onboarding expert needs. Neither is kernel magic; the kernel still
89
105
  composes its own instance-boundary and work-mode briefings, and the "You run
90
- on OATS" briefing is `oats.core`'s inject (the kernel ships no copy since 0.26:
91
- a soul without `oats.core` gets no OATS operating instructions, and
92
- `oats doctor --soul` says so).
106
+ on OATS" briefing is `oats.core`'s inject: a soul without `oats.core` gets no
107
+ OATS operating instructions, and `oats doctor --soul` says so.
93
108
 
94
109
  ## Instance anatomy
95
110
 
@@ -117,15 +132,15 @@ full copy** of every capability the soul resolved to:
117
132
  STATE.md, log.md, notes/ # optional, from the knowledge capability
118
133
  ```
119
134
 
120
- Instances are transient and normally gitignored (`agents/*/instances/`). Expert
121
- souls travel with the repo; different teams instantiate them into their own
122
- local agent teams without collisions, because instance homes, logs, notes,
123
- branches and messaging identities are local runtime state.
135
+ Instances are local runtime state and normally gitignored
136
+ (`agents/*/instances/`). Souls travel with their repository; several
137
+ deployments can incarnate the same soul without collisions, because instance
138
+ homes, logs, notes, branches and messaging identities are local.
124
139
 
125
- ### `instance.json` — provenance is recorded, not declared
140
+ ### `instance.json`: provenance is recorded, not declared
126
141
 
127
- Besides the classic fields (repo, branch, lineage, launch recipe, composed
128
- skills and instructions), a workspace spawn records:
142
+ Besides the instance's identity, repository, branch, lineage, launch recipe and
143
+ composed skills and instructions, a spawn records:
129
144
 
130
145
  ```json
131
146
  {
@@ -135,8 +150,8 @@ skills and instructions), a workspace spawn records:
135
150
  "commit": "3f2a9c1e…", "digest": "sha256-…", "materializedAt": "2026-09-24T10:12:44.118Z"
136
151
  },
137
152
  "oats.okf": {
138
- "from": { "kind": "package", "package": "oats.okf", "version": "2.1.3", "commit": "b2e16f2e…", "integrity": "sha256-…", "repoKey": "github.com/awebai/oats-okf" },
139
- "commit": "b2e16f2e…", "digest": "sha256-…", "materializedAt": "2026-09-24T10:12:44.201Z"
153
+ "from": { "kind": "package", "package": "oats.okf", "version": "4.0.4", "commit": "a4ccca02…", "integrity": "sha256-…", "repoKey": "github.com/awebai/oats-okf" },
154
+ "commit": "a4ccca02…", "digest": "sha256-…", "materializedAt": "2026-09-24T10:12:44.201Z"
140
155
  }
141
156
  },
142
157
  "providers": {
@@ -145,23 +160,30 @@ skills and instructions), a workspace spawn records:
145
160
  },
146
161
  "workspace": {
147
162
  "key": "github.com/acme/agents", "commit": "3f2a9c1e…", "resolution": "20ec8ec527311d71d0973086",
148
- "soul": { "repoKey": "github.com/acme/agents", "commit": "3f2a9c1e…", "team": "engineering" }
149
- }
163
+ "soul": { "repoKey": "github.com/acme/agents", "commit": "3f2a9c1e…" }
164
+ },
165
+ "teams": [{ "label": "ana-acme", "team": "ana-acme:ana.aweb.ai", "default": true, "from": "local" },
166
+ { "label": "engineering", "team": "engineering:acme.aweb.ai", "default": false, "from": "shared" }],
167
+ "defaultTeam": { "label": "ana-acme", "team": "ana-acme:ana.aweb.ai", "from": "deployment" }
150
168
  }
151
169
  ```
152
170
 
153
- - `modules.<cap>` — where the copy came from, at which commit, and its content
171
+ - `modules.<cap>`: where the copy came from, at which commit, and its content
154
172
  digest. `oats status` compares these with the workspace's current state and
155
173
  shows `moved` / `missing` per module (drift is shown, not prevented).
156
- - `providers.<cap>` — the merged provider payload the capability was bound with
174
+ - `providers.<cap>`: the merged provider payload the capability was bound with
157
175
  (soul ⊕ machine settings ⊕ `--provider`), so a later inspection can tell
158
176
  which instance holds a retained seat or a one-off state root. `spawn
159
177
  --preview` shows the same map before anything exists, as `settings.<cap>`,
160
178
  beside `providers` (the `--provider` flags as given).
161
- - `workspace` — the workspace commit observed at spawn, the soul's repo/commit/
162
- team, and the **resolution revision** the spawn decision bound. `oats status`
179
+ - `workspace`: the workspace commit observed at spawn, the soul's repo/commit,
180
+ and the **resolution revision** the spawn decision bound. `oats status`
163
181
  compares `workspace.soul` with the member's current commit too: `soul: <name>
164
182
  from <member> @ <c7> [member moved since …]` (`--json`: `instances[].soul`).
183
+ - `teams` / `defaultTeam`: the soul's teams at spawn, exactly as the providers
184
+ received them (mapped teams only) and its default: evidence, never rewritten.
185
+ A running home's hooks and messaging commands read the teams live
186
+ ([capabilities.md](capabilities.md#teams-in-the-provider-environment)).
165
187
 
166
188
  A running instance never changes under itself: a member moving or a package
167
189
  bump affects only new spawns.
@@ -215,7 +237,7 @@ unchanged. This is a normal agent process with its own home and tools, not a
215
237
  subagent call.
216
238
 
217
239
  `--preview` reports `modules[]` (`from`, `layer`, `changedSince` the newest
218
- previous instance of the soul), `team`, the `resolution` revision, the decision
240
+ previous instance of the soul), `teams` and `defaultTeam` (the soul's teams here), the `resolution` revision, the decision
219
241
  it would bind, `providers` (the `--provider` map exactly as given) and
220
242
  `settings.<cap>` (the merged payload each provider's binding will receive);
221
243
  the apply refuses with `E_DECISION_STALE` if a member
@@ -226,11 +248,12 @@ needs a workspace deployment. The full DTOs are in
226
248
 
227
249
  Examples of spawn hooks:
228
250
 
229
- - `oats.okf` v2 requires explicit bindings and owner declarations, validates
230
- accepted bases, creates episodic files and an immutable reader view, and
231
- registers a durable source plus its per-source schedule definition. Missing
232
- knowledge is an error, not permission to bootstrap an empty substitute.
233
- - `oats.aweb` mints a messaging identity — or, with
251
+ - `oats.okf` validates the soul's declaration and the bindings, and creates the
252
+ instance knowledge files. With harvest on, it also registers a durable source
253
+ and its harvest schedule; with harvest off (the default) it registers nothing.
254
+ Missing knowledge configuration is an error, never permission to bootstrap an
255
+ empty substitute.
256
+ - `oats.aweb` mints a messaging identity or, with
234
257
  `--provider oats.aweb identity.source=/abs/path/of/the/.aw/to/retain`, re-takes a retained
235
258
  one for exactly this instance.
236
259
 
@@ -240,21 +263,11 @@ The instance works in `./work`. With `oats.okf` it also keeps `STATE.md`
240
263
  current, appends milestones to `log.md`, and captures non-obvious insights in
241
264
  `notes/`.
242
265
 
243
- It reads accepted external knowledge through `./knowledge/view.json` and
244
- `./knowledge/bases/<alias>/`, index-first. It never writes accepted knowledge;
245
- this is instruction, not an OS sandbox. `oats okf read`/`refresh` obtains a new
246
- accepted view while old snapshots remain stable. Git PRs are unread as accepted
247
- knowledge until their merge is visible; pending directory publication blocks
248
- fresh reads rather than exposing partial bytes.
249
-
250
- An independent worker judges durable **notes and full record windows**, not only
251
- notes or a watermark left in the live home. Each source has a command job rooted
252
- in durable deployment context; the operator may also request `oats okf harvest`.
253
- Workers use their own `work: directory`, never the source branch or an attached
254
- worktree. Validated Git output goes through real PR delivery; non-Git output
255
- uses recoverable directory publication. Captured, processed, delivered and
256
- accepted are distinct receipts; spawning a worker is not successful learning.
257
- See [knowledge](knowledge.md).
266
+ It consults accepted knowledge remotely, at its accepted state, with
267
+ `oats okf index`, `cat` and `search` (the `okf-consultation` skill), and never
268
+ writes accepted knowledge; this is instruction, not an OS sandbox. With harvest
269
+ on, an independent harvester judges the instance's notes and session record and
270
+ proposes promotions by pull request. See [knowledge](knowledge.md).
258
271
 
259
272
  ### Spawning and coordinating with other agents
260
273
 
@@ -267,29 +280,29 @@ Spawn lineage is **explicit** and relation-based:
267
280
  declares what the new instance IS to an existing one (`--parent <instance>` is
268
281
  sugar for `--relative-to <instance> --relation child`):
269
282
 
270
- - **child** — nests under the anchor: `parentInstance` = anchor,
283
+ - **child**: nests under the anchor: `parentInstance` = anchor,
271
284
  `spawnOrigin: instance`.
272
- - **parent** — the NEW instance becomes the anchor's parent: it inherits the
285
+ - **parent**: the NEW instance becomes the anchor's parent: it inherits the
273
286
  anchor's old lineage slot, and the anchor's `instance.json` is re-pointed so
274
287
  its `parentInstance` is the new instance (a reviewer/maintainer of your work
275
288
  sits above you). Retirement splices lineage: when any instance retires,
276
289
  instances pointing at it (parent or sibling links) inherit its COMPLETE
277
- surviving lineage — both its parent and sibling links, whichever edge type
278
- pointed at it — so a retired parent-relation maintainer hands its children
290
+ surviving lineage (both its parent and sibling links, whichever edge type
291
+ pointed at it), so a retired parent-relation maintainer hands its children
279
292
  back to the parent it displaced (restoring absorbed sibling links too), and
280
- no instance is left pointing at a missing one. The splice scans every agents
281
- root in the team scope, since relations can cross member repos.
282
- - **sibling** — a peer in the anchor's cluster: it shares the anchor's parent
293
+ no instance is left pointing at a missing one. The splice scans the
294
+ deployment's agents root.
295
+ - **sibling**: a peer in the anchor's cluster: it shares the anchor's parent
283
296
  when one exists; when the anchor is a root, the new instance records an
284
297
  explicit `siblingInstance` link so the cluster is still derivable from
285
298
  `oats status --json` (`parentInstance` + `siblingInstance` edges).
286
- - **unrelated** (default) — no link, operator-origin, top-level.
299
+ - **unrelated** (default): no link, operator-origin, top-level.
287
300
 
288
- Attached-mode spawns are ALWAYS children of the owner of the shared work tree
289
- (design decision: an attached agent serves that owner); relation flags other
290
- than a redundant child-of-owner are rejected. Any other spawn — including one
291
- from a shell that inherited
292
- an agent's environment variables — is operator-origin and appears top-level.
301
+ Attached-mode spawns are ALWAYS children of the owner of the shared work tree,
302
+ because an attached agent serves that owner; relation flags other than a
303
+ redundant child-of-owner are rejected. Any other spawn, including one from a
304
+ shell that inherited an agent's environment variables, is operator-origin and
305
+ appears top-level.
293
306
  Agents spawning sub-agents should pass `--parent "$OATS_INSTANCE"` (or the
294
307
  relation that fits).
295
308
 
@@ -300,11 +313,10 @@ tasks capability can provide shared work state while messaging provides conversa
300
313
  ### Retire
301
314
 
302
315
  Retirement runs active capability retire hooks in reverse spawn order before the home disappears. The aweb
303
- integration self-deletes the instance identity here. OKF v2 performs final
304
- notes-and-record capture into durable external custody. An incomplete or
305
- uncertified capture retains the home for retry. Successful retirement enqueues
306
- evidence but never waits for a model or GitHub: independent processing and
307
- source-targeted inspection continue after the home disappears.
316
+ integration deletes the instance identity here. With harvest on, `oats.okf`
317
+ takes a final capture of notes and the session record into durable custody; an
318
+ incomplete capture keeps the home for a retry. Retirement never waits for a
319
+ model or GitHub: processing continues after the home is gone.
308
320
 
309
321
  Before any retire hook runs, retire preserves the instance's uncommitted and
310
322
  unmerged work: a verified recovery under `.oats-retirement/recovery/`, named in
@@ -318,6 +330,18 @@ home. **`--force` does not skip work preservation.** It forces only past a
318
330
  missing or unusable cleanup marker and past incomplete hook cleanup
319
331
  ([capabilities.md](capabilities.md)).
320
332
 
333
+ Retire stops the harness through the home's session receipt. A home spawned
334
+ before 0.25.9 has none. It retires only when its session is observably gone:
335
+ instance.json records no launch, or the recorded tmux server is not running,
336
+ or the recorded window is gone and no pane on that server works in the home;
337
+ and, always, no live process on this host works in the home (a harness
338
+ started by hand elsewhere counts). Retire then runs its hooks and preserves
339
+ its work as usual. If the recorded window is still there, a pane or a process
340
+ works in the home (the refusal names its pid), or the process scan (`lsof`)
341
+ cannot run, retire refuses with
342
+ `E_RUNTIME_ENDPOINT_UNKNOWN`, even with `--force`: stop that session yourself,
343
+ then retire again. `oats retire <instance> --plan` says which case applies.
344
+
321
345
  `oats retire <instance> --self` lets an instance retire itself when the human
322
346
  or briefing says it is done. A live harness cannot give a stable final
323
347
  inspection of its own work, so the calling process inspects, runs, and removes
@@ -352,8 +376,8 @@ instructions state first (`injects/instance-boundary.md`):
352
376
  soul's instructions, and `instance.json` `soulDir` records the (read-only,
353
377
  per-commit) soul directory every hook and dispatched command receives as
354
378
  `OATS_SOUL`. Durable soul edits go through tracked paths under `work/` under
355
- the applicable review rules. OKF v2 harvest edits external
356
- owned knowledge, not canonical soul files or skills.
379
+ the applicable review rules. The knowledge harvester proposes changes to the
380
+ external knowledge base, never to soul files or skills.
357
381
 
358
382
  Agents move between the two as the task needs; the boundary is what each
359
383
  directory is for, not a place to settle in.
@@ -376,9 +400,6 @@ Rules:
376
400
  - Do not create extra worktrees. Ask for another instance if parallel work is
377
401
  needed.
378
402
 
379
- A config may define `work-modes.worktree.setup`. The kernel runs that command
380
- inside each fresh worktree. Failures warn but do not block spawn.
381
-
382
403
  ### `checkout` — shared current branch
383
404
 
384
405
  `work/` is a symlink to the repo checkout itself (the member clone, found as for
@@ -397,9 +418,8 @@ Rules:
397
418
 
398
419
  `work/` points at **another instance's work tree** — same branch, same
399
420
  uncommitted state. Spawning attached requires `workDir` (the owning
400
- instance's `<home>/work`); it is usually a spawn-time choice for service
401
- agents such as reviewers, but a soul whose role is always-attached
402
- service work may declare it as identity too.
421
+ instance's `<home>/work`); it is a spawn-time choice (`--work attached`) for
422
+ service agents such as reviewers.
403
423
 
404
424
  Attached agents are guests: never switch branches or rewrite history, touch
405
425
  only what the briefing names, keep commits small and attributable. Retiring
@@ -415,66 +435,57 @@ directory; without it, the deployment directory (where `oats-local.yaml` is) is
415
435
  used. No implicit fallback changes the other modes.
416
436
 
417
437
  `--work-dir` and `--branch` are rejected. Canonical instructions, skill
418
- composition, provider trust and harness preflight still apply. No worktree setup
419
- runs. Retirement preserves nonempty work in verified recovery storage beside the
438
+ composition, provider trust and harness preflight still apply. Retirement preserves nonempty work in verified recovery storage beside the
420
439
  home (`workRecovery.path/work`) before deleting it, including files created by
421
440
  hooks; directory work has no disposable-root exemptions. The work-root cannot be
422
441
  exchanged for a symlink. Recovery does not replace the worker's delivery protocol.
423
442
 
424
443
  ### `workspace` — cross-repo coordinator
425
444
 
426
- `work/` is a symlink to the **whole deployment** — the directory holding
427
- `oats-local.yaml`, with `agents/` and the member clones that sit beside it —
428
- not a repo (0.25.1; a member cloned elsewhere is reached through
429
- `oats-local.yaml` `clones:`). Every
445
+ `work/` is a symlink to the **whole deployment**: the directory holding
446
+ `oats-local.yaml`, with `agents/` and the member clones that sit beside it, not
447
+ a repo (a member cloned elsewhere is reached through `oats-local.yaml`
448
+ `clones:`). Every
430
449
  member repo is read-context; the instance's product is coordination:
431
450
  routing, analysis, task-writing, messaging, spawning specialists.
432
451
 
433
452
  Use this for free agents that support cross-repo work but are not tied to
434
- any one repo — coordinators, dispatchers, architects. The soul itself still
435
- lives in (and is committed to) its home repo (e.g. a workspace's
436
- `lfx-agents/` repo); where the soul lives and where it works are decoupled.
453
+ any one repo: coordinators, dispatchers, architects. The soul itself still
454
+ lives in (and is committed to) its member repository; where the soul lives and
455
+ where it works are decoupled.
437
456
 
438
457
  Rules:
439
458
 
440
459
  - Read freely across member repos; **never edit or commit inside them** —
441
460
  route changes to the owning repo's agents or the human.
442
461
  - No git state operations in any member repo.
443
- - Knowledge promotion follows the selected capability's custody protocol,
444
- never direct edits through the workspace view. In OKF v2 an independent
445
- worker publishes external knowledge through PRs for every Git base,
446
- irrespective of the source's work mode or the soul's repository.
462
+ - Knowledge promotion follows the knowledge capability's own protocol, never
463
+ direct edits through the workspace view.
447
464
 
448
- Spawning workspace mode requires a deployment boundary for `./work`; the
449
- instance records no branch — the workspace is not a git tree. *(Open thread:
450
- the kernel still derives this boundary from the classic `team:` scope; binding
451
- it to the `oats-local.yaml` directory is tracked in
452
- [design/README.md](design/README.md).)*
465
+ The instance records no branch: the workspace is not a Git tree.
453
466
 
454
467
  ## Agents root
455
468
 
456
- The agents root is the nearest `agents/` directory walking upward from the
457
- current directory. `PI_AGENTS_ROOT` overrides the search.
458
-
459
- **Where instances are stored is a separate question from where you invoked
460
- OATS.** Discovery finds the root from your current directory, but instance homes
461
- always live in the **soul-owning repo's primary checkout**: when the root you
462
- discovered is inside a *linked git worktree*, storage maps to the equivalent
463
- path in that repository's primary checkout, so homes survive the worktree, stay
464
- visible to the whole deployment, and never depend on where a command happened to
465
- run. An agent that spawns after `cd work/` reaches the same home as one spawning
466
- from the deployment root.
469
+ Instance homes live under the deployment's agents root,
470
+ `<deployment>/agents/<soul>/instances/<instance>/`. Commands find the
471
+ deployment by walking up to `oats-local.yaml`, so an agent that spawns after
472
+ `cd work/` reaches the same agents root as one spawning from the deployment
473
+ directory. `PI_AGENTS_ROOT` overrides the root.
467
474
 
468
475
  Three things stay independent, and are meant to:
469
476
 
470
- - **Invocation** — where you ran the command;
471
- - **Config/package scope** — resolved from the context directory, and steerable
472
- with an explicit `--dir <path>`;
473
- - **`work/`** — the instance's repository view, which may well be a linked
474
- worktree; only *storage* is redirected, never your work tree.
477
+ - **Invocation**: where you ran the command;
478
+ - **Scope**: the deployment, resolved from the context directory, and
479
+ steerable with an explicit `--dir <path>`;
480
+ - **`work/`**: the instance's repository view, which may well be a linked
481
+ worktree.
475
482
 
476
- Roots that Git does not own are unaffected: a non-Git agents root stores
477
- instances exactly where it sits.
483
+ If an agents root sits inside a linked Git worktree, homes land in the
484
+ soul-owning repo's primary checkout instead: storage maps to the equivalent
485
+ path there, so homes never depend on a disposable worktree. When placement cannot be established (Git owns the
486
+ location but the repository cannot be read, the primary checkout is missing,
487
+ or the destination falls outside the agent's own directory), the spawn fails
488
+ closed with **`E_NO_CANONICAL_ROOT`** and creates nothing.
478
489
 
479
490
  Every instance is told its own home as **`OATS_INSTANCE_HOME`** (absolute), and
480
491
  instructions refer to it as `<instance-home>`. The two environments differ, so
@@ -487,14 +498,6 @@ they are stated separately:
487
498
  the hook contract. `OATS_HOME` predates `OATS_INSTANCE_HOME` and is kept because
488
499
  shipped capability hooks read it; it is **not** exported to harness sessions.
489
500
 
490
- Neither is `OATS_HOME_DIR`, which is the package store root — do not conflate
491
- them.
492
-
493
- When placement cannot be established — Git owns the location but the repository
494
- cannot be read, a linked worktree whose primary checkout is missing, or a
495
- resolved destination outside the agent's own directory — the spawn fails closed
496
- with **`E_NO_CANONICAL_ROOT`** and creates nothing.
497
-
498
501
  ### Deployment prerequisite: the agents directory must be operator-owned
499
502
 
500
503
  The canonical deployment (the agents root and the instance homes under it) **must be owned by the operator and not writable by untrusted
@@ -518,28 +521,12 @@ Default layout:
518
521
  instances/
519
522
  ```
520
523
 
521
- Every agent is a soul — a member soul, or a package soul homed under
522
- `agents/<package>--<soul>/`. A capability-defined agent (a manifest's
523
- `agents:`) was removed in 0.29.0; a home an earlier kernel left for one (its
524
- directory holds only `instances/`) is still listed and retirable.
525
-
526
- There are no local souls. A soul is a member repository's `souls/<name>`
527
- (`soul.yaml` + `AGENTS.md`); author it there and run `oats sync`. OATS 0.25
528
- and earlier kept local souls and capability-agent homes under
529
- `<scope>/local-agents/`: this kernel never reads, spawns into or retires from
530
- that directory; it only detects it. Onboarding refuses into a directory that
531
- holds one, and `oats status` and `oats doctor` report it once, as the
532
- `legacy-local-agents` problem naming the instances found there; retire them
533
- with the 0.25 kernel, or delete the directory once they are stopped.
534
-
535
- A *captured home* (spawned through 0.24–0.25's captured path, removed in 0.26:
536
- its `instance.json` records `executionBinding`, `incarnationId` or `captured`) is
537
- reported by `oats status` and `oats doctor` as the `legacy-captured-home`
538
- problem. It has no 0.26 runtime: start, restart, inspect/readiness/operation
539
- `--home` and its in-home commands refuse it (`E_UNSUPPORTED_MODE`). `oats retire`
540
- still works; it warns once per capability whose retire hook did NOT run, since
541
- identities and memberships those capabilities created are not revoked — remove
542
- them with the provider's own tooling. Re-spawn the soul from the deployment.
543
-
544
- Alternative agents-root layouts are planned but not built. Today the default
545
- layout is the only implemented layout.
524
+ Every agent is a soul: a member soul, or a package soul homed under
525
+ `agents/<package>--<soul>/`. There are no local souls: author a soul in a
526
+ member repository's `souls/<name>` (`soul.yaml` + `AGENTS.md`) and run
527
+ `oats sync`.
528
+
529
+ Homes left by mechanisms earlier releases removed are reported once by
530
+ `oats status` and `oats doctor`: `legacy-local-agents` (a `local-agents/`
531
+ directory) and `legacy-captured-home`. Retire such instances and re-spawn the
532
+ soul from the deployment.