@awebai/oats 0.25.8 → 0.26.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 (185) hide show
  1. package/README.md +8 -6
  2. package/bin/oats.mjs +576 -1714
  3. package/capabilities/oats-authoring/oats-package.json +2 -2
  4. package/capabilities/oats-authoring/oats.json +2 -2
  5. package/capabilities/oats-authoring/skills/integration-authoring/SKILL.md +46 -25
  6. package/capabilities/oats-authoring/skills/soul-craft/SKILL.md +13 -6
  7. package/capabilities/oats-aweb/bin/oats-aweb.mjs +334 -72
  8. package/capabilities/oats-aweb/injects/aweb.md +7 -2
  9. package/capabilities/oats-aweb/lib/binding-wire.mjs +107 -5
  10. package/capabilities/oats-aweb/lib/captured-native.mjs +1 -1
  11. package/capabilities/oats-aweb/lib/grant-custody.mjs +38 -0
  12. package/capabilities/oats-aweb/oats.json +14 -4
  13. package/capabilities/oats-jira/bin/oats-jira.mjs +4 -4
  14. package/capabilities/oats-jira/oats.json +2 -2
  15. package/capabilities/oats-jira/skills/jira-tasks/SKILL.md +6 -3
  16. package/capabilities/oats-linear/bin/oats-linear-hook.mjs +6 -4
  17. package/capabilities/oats-linear/oats.json +2 -2
  18. package/capabilities/oats-linear/skills/linear-tasks/SKILL.md +6 -0
  19. package/capabilities/oats-okf/bin/oats-okf.mjs +1 -1
  20. package/capabilities/oats-okf/lib/binding-wire.mjs +1 -1
  21. package/capabilities/oats-okf/lib/migration.mjs +2 -2
  22. package/capabilities/oats-okf/lib/sources.mjs +5 -4
  23. package/capabilities/oats-okf/lib/stores.mjs +40 -9
  24. package/capabilities/oats-okf/lib/worker.mjs +3 -3
  25. package/capabilities/oats-okf/oats.json +1 -1
  26. package/capabilities/oats-review/oats.json +3 -2
  27. package/docs/capabilities.md +218 -47
  28. package/docs/capability-manifest.schema.json +13 -4
  29. package/docs/configuration.md +17 -5
  30. package/docs/conventions.md +16 -26
  31. package/docs/design/2026-09-08-expert-assisted-deployment-proposal.md +1 -1
  32. package/docs/design/2026-09-13-knowledge-and-memory-direction.md +3 -3
  33. package/docs/design/2026-09-14-portable-souls-and-git-workspaces.md +2 -2
  34. package/docs/design/2026-09-15-portable-souls-handoff.md +2 -2
  35. package/docs/design/2026-09-15-portable-souls-implementation.md +1 -1
  36. package/docs/design/2026-09-20-redesign-program-board.md +2 -2
  37. package/docs/design/2026-09-23-workspace-module-contracts.md +1 -1
  38. package/docs/design/2026-09-23-workspace-v2-implementation-plan.md +1 -1
  39. package/docs/design/2026-09-24-desktop-phase-f-boundary.md +54 -10
  40. package/docs/design/2026-09-24-phase-d-plan.md +77 -0
  41. package/docs/design/2026-09-25-teams-contract.md +226 -0
  42. package/docs/design/README.md +3 -3
  43. package/docs/design/launch-configurations.md +20 -16
  44. package/docs/design/operations-contract.md +27 -10
  45. package/docs/desktop-cli-api.md +546 -264
  46. package/docs/desktop-instance-start.md +1 -1
  47. package/docs/desktop.md +7 -13
  48. package/docs/execution-targets.md +16 -18
  49. package/docs/first-team.md +14 -17
  50. package/docs/implementation.md +28 -59
  51. package/docs/integrations.md +88 -32
  52. package/docs/knowledge-capability-authoring.md +1 -1
  53. package/docs/knowledge-reference/package-craft.md +10 -8
  54. package/docs/knowledge-theory.md +1 -1
  55. package/docs/knowledge.md +10 -11
  56. package/docs/layers.md +16 -17
  57. package/docs/oats-local.schema.json +29 -1
  58. package/docs/oats-membership.schema.json +5 -3
  59. package/docs/oats-package.schema.json +2 -2
  60. package/docs/oats-workspace.schema.json +1 -1
  61. package/docs/{official-marketplace.md → official-catalog.md} +15 -16
  62. package/docs/packages.md +75 -52
  63. package/docs/release-notes/v0.22.0.md +1 -1
  64. package/docs/release-notes/v0.23.1.md +1 -1
  65. package/docs/release-notes/v0.25.9.md +23 -0
  66. package/docs/release-notes/v0.26.0.md +670 -0
  67. package/docs/schedules.md +48 -126
  68. package/docs/soul.schema.json +11 -4
  69. package/docs/souls-and-instances.md +56 -43
  70. package/docs/workspaces.md +80 -58
  71. package/injects/instance-boundary.md +1 -1
  72. package/injects/work-attached.md +1 -1
  73. package/injects/work-workspace.md +2 -2
  74. package/lib/{portable-files.mjs → bounded-read.mjs} +6 -6
  75. package/lib/{portable-values.mjs → canonical-json.mjs} +3 -12
  76. package/lib/capability-contract.mjs +110 -0
  77. package/lib/config-data.mjs +2 -2
  78. package/lib/core.mjs +700 -4824
  79. package/lib/digest.mjs +12 -0
  80. package/lib/instance-inspect.mjs +396 -0
  81. package/lib/instance-lifecycle.mjs +3 -4
  82. package/lib/instance-resolution.mjs +212 -26
  83. package/lib/instruction-composition.mjs +0 -20
  84. package/lib/materialize.mjs +6 -4
  85. package/lib/operator-dispatch.mjs +33 -13
  86. package/lib/packages.mjs +25 -190
  87. package/lib/provider-binding.mjs +4 -2
  88. package/lib/provider-reasons.mjs +3 -68
  89. package/lib/resolve.mjs +204 -68
  90. package/lib/schedule.mjs +97 -272
  91. package/lib/servers.mjs +13 -13
  92. package/lib/{portable-shape.mjs → shape.mjs} +4 -3
  93. package/lib/tree-copy.mjs +44 -0
  94. package/lib/workspace.mjs +125 -20
  95. package/package-catalog.json +7 -7
  96. package/package.json +1 -1
  97. package/skills/integration-authoring/SKILL.md +48 -40
  98. package/skills/oats-getting-started/SKILL.md +105 -110
  99. package/skills/oats-support/SKILL.md +2 -2
  100. package/skills/soul-craft/SKILL.md +13 -6
  101. package/bin/oats-pi-sdk-host.mjs +0 -17
  102. package/docs/2026-09-03-architecture-proposal.md +0 -642
  103. package/docs/artifact-approvals.schema.json +0 -7
  104. package/docs/captured-invocation-context.schema.json +0 -7
  105. package/docs/captured-resolution.schema.json +0 -7
  106. package/docs/design/package-engine-contract.md +0 -813
  107. package/docs/design/package-runtime-api.md +0 -588
  108. package/docs/desktop-succession.md +0 -57
  109. package/docs/execution-capsule.schema.json +0 -108
  110. package/docs/first-team-demo.md +0 -92
  111. package/docs/knowledge-migration.md +0 -147
  112. package/docs/migration-from-oas.md +0 -103
  113. package/docs/oats-config.schema.json +0 -172
  114. package/docs/oats-lock-v3.schema.json +0 -7
  115. package/docs/oats-lock.schema.json +0 -175
  116. package/docs/operating-team-migration.md +0 -470
  117. package/docs/portable.schema.json +0 -2512
  118. package/docs/provider-check-input.schema.json +0 -7
  119. package/docs/rebuild-to-v2.md +0 -511
  120. package/docs/workspace-adoption.md +0 -74
  121. package/injects/framework-workspace.md +0 -7
  122. package/injects/local-soul.md +0 -19
  123. package/injects/oats-portable.md +0 -20
  124. package/injects/oats.md +0 -11
  125. package/injects/portable-instance-boundary.md +0 -39
  126. package/injects/portable-work-directory.md +0 -29
  127. package/lib/artifact-approvals.mjs +0 -120
  128. package/lib/artifact-tree.mjs +0 -141
  129. package/lib/capability-artifacts.mjs +0 -179
  130. package/lib/capability-execution.mjs +0 -15
  131. package/lib/capability-inputs.mjs +0 -39
  132. package/lib/capability-provenance.mjs +0 -231
  133. package/lib/captured-action-shape.mjs +0 -21
  134. package/lib/captured-admission-shape.mjs +0 -20
  135. package/lib/captured-binding-file.mjs +0 -36
  136. package/lib/captured-dispatch.mjs +0 -66
  137. package/lib/captured-instance-index.mjs +0 -277
  138. package/lib/captured-invocation-context.mjs +0 -130
  139. package/lib/captured-launch-request.mjs +0 -66
  140. package/lib/captured-operation-process.mjs +0 -15
  141. package/lib/captured-pi-custody.mjs +0 -29
  142. package/lib/captured-pi-host.mjs +0 -167
  143. package/lib/captured-pi-outcome.mjs +0 -172
  144. package/lib/captured-resolutions.mjs +0 -275
  145. package/lib/captured-scaffold.mjs +0 -87
  146. package/lib/captured-selector.mjs +0 -28
  147. package/lib/captured-session-backend.mjs +0 -52
  148. package/lib/captured-source-receipt-file.mjs +0 -72
  149. package/lib/helper-injection-policy.mjs +0 -104
  150. package/lib/legacy-lock-codec.mjs +0 -106
  151. package/lib/manifest-settings.mjs +0 -84
  152. package/lib/package-closure.mjs +0 -48
  153. package/lib/package-materialization.mjs +0 -83
  154. package/lib/pi-sdk-host.mjs +0 -229
  155. package/lib/portable-artifacts.mjs +0 -115
  156. package/lib/portable-choices.mjs +0 -82
  157. package/lib/portable-composition.mjs +0 -136
  158. package/lib/portable-digest.mjs +0 -105
  159. package/lib/portable-identity.mjs +0 -40
  160. package/lib/portable-lock.mjs +0 -117
  161. package/lib/portable-onboarding-request.mjs +0 -49
  162. package/lib/portable-onboarding.mjs +0 -256
  163. package/lib/portable-package-preparation.mjs +0 -188
  164. package/lib/portable-policy.mjs +0 -44
  165. package/lib/portable-soul.mjs +0 -42
  166. package/lib/portable-state.mjs +0 -80
  167. package/lib/prepare-composition.mjs +0 -170
  168. package/lib/prepared-bindings.mjs +0 -92
  169. package/lib/prepared-resources.mjs +0 -127
  170. package/lib/provider-binding-broker.mjs +0 -65
  171. package/lib/provider-binding-wire.mjs +0 -116
  172. package/lib/readiness.mjs +0 -225
  173. package/lib/repository-observation.mjs +0 -226
  174. package/lib/resolution-shape.mjs +0 -393
  175. package/lib/schedule-capsule.mjs +0 -206
  176. package/lib/soul-constraints.mjs +0 -40
  177. package/lib/source-projection.mjs +0 -84
  178. package/lib/source-spec.mjs +0 -189
  179. package/lib/workspace-definition.mjs +0 -126
  180. package/lib/workspace-discovery.mjs +0 -146
  181. package/skills/oats/SKILL.md +0 -162
  182. package/skills/oats-config/SKILL.md +0 -164
  183. package/skills/oats-packages/SKILL.md +0 -184
  184. package/skills/oats-portable/SKILL.md +0 -115
  185. package/skills/oats-portable-artifacts/SKILL.md +0 -63
@@ -1,162 +0,0 @@
1
- ---
2
- name: oats
3
- description: >-
4
- Use only for operating a legacy uncaptured OATS deployment through its current
5
- config chain: legacy status, spawn, retire, doctor, capability commands, and
6
- instance layout. Triggers: "legacy OATS", "uncaptured instance", or an
7
- instance without executionBinding. For a captured portable composition, load
8
- oats-portable instead; never use this skill to fill missing captured inputs.
9
- ---
10
-
11
- # Operating legacy uncaptured OATS
12
-
13
- > **Legacy-only procedure.** This skill documents the current config-chain
14
- > engine for instances without a captured execution binding. A portable instance
15
- > must use **oats-portable** and explicit deployment/resolution authority. Never
16
- > apply the config cascade, agent types, or team-scoped lookup below to complete
17
- > or override a captured record.
18
-
19
- A **soul** is a durable specialized agent. An **instance** is one disposable,
20
- resumable incarnation. A **capability package** distributes reusable skills,
21
- instructions, commands, and approved lifecycle hooks. An **integration** is a
22
- capability selected for one exclusive knowledge, messaging, or tasks layer.
23
-
24
- ## Instance home
25
-
26
- | Path | Meaning |
27
- |---|---|
28
- | `TASK.md` | briefing and task |
29
- | `soul/` | linked canonical soul |
30
- | `AGENTS.md` | generated canonical soul + active capability instructions |
31
- | `CLAUDE.md -> AGENTS.md` | compatibility view |
32
- | `.agents/skills/` | exact runtime skill set |
33
- | `work/` | all repository work happens here |
34
- | `instance.json` | repo, branch, capabilities, skills, instruction sources, trust, hooks |
35
-
36
- Memory files exist only when the selected knowledge integration creates them.
37
- Follow their injected protocol.
38
-
39
- ## Lifecycle and roster
40
-
41
- ```bash
42
- oats status [--json]
43
- oats status --team [--json] # whole-team roster when config declares team: (all repos in the team scope)
44
- # with the aweb messaging integration active, `oats aweb roster` adds the
45
- # cross-machine view: aweb team members, where OATS aliases are instance names
46
- oats create <name> [--description ...] [--type <agent-type>] [--repo ...] [--work worktree|checkout|attached|workspace|directory]
47
- # directory mode = owned execution directory; repo is config context (no Git
48
- # required); --work-dir and --branch are rejected; retirement preserves work.
49
- # workspace mode = cross-repo coordinator: ./work is the whole team scope; read
50
- # all member repos, edit none; if a knowledge layer is active, IT defines how
51
- # soul updates are delivered (see that capability's own instructions)
52
- oats spawn <agent> [--task ...] [--purpose ...] [--relation child|sibling|parent|unrelated --relative-to <instance>] [--parent <instance>] [--no-launch] [--json]
53
- # lineage is explicit: agents spawning sub-agents declare their RELATION to the
54
- # new instance with --relation + --relative-to (--parent X is sugar for
55
- # --relative-to X --relation child). Without a relation the spawn is
56
- # operator-origin and appears top-level. Attached-mode spawns are ALWAYS
57
- # children of the work-tree owner (relation flags are rejected there).
58
- # when config declares team:, spawn/retire also resolve souls and instances
59
- # defined in sibling repos of the team scope (unique match wins; the instance
60
- # homes with its owning repo, works in that repo, resolves that repo's config)
61
- oats retire <instance> [--delete-branch]
62
- ```
63
-
64
- ### Spawn relations — choosing how the new instance relates to you
65
-
66
- When you spawn, declare what the new instance IS to you — the workspace is
67
- viewed as clusters of related agents, and the relation is how clusters form:
68
-
69
- - **child** (`--relation child --relative-to <you>`, or `--parent <you>`) —
70
- the new instance works FOR you and nests under you. Example: a coordinator
71
- spawning the developers of its feature.
72
- - **parent** (`--relation parent --relative-to <you>`) — the new instance
73
- oversees YOU: your recorded lineage is re-pointed so it becomes your parent.
74
- Example: spawning a maintainer of your own PR — the maintainer sits
75
- above you. When it later retires, lineage is spliced automatically: you
76
- return to your previous parent (or top-level).
77
- - **sibling** (`--relation sibling --relative-to <you>`) — a peer at your
78
- level, in your cluster. Example: enlisting a peer coordinator in another
79
- repo, or an architecture coordinator helping you.
80
- - **unrelated** (default, no flags) — no link. Example: work with no
81
- connection to yours.
82
-
83
- Exception: **attached** work mode implies child-of-owner — an attached agent
84
- shares its owner's work tree and is always that owner's child; relation flags
85
- are rejected there.
86
-
87
- This is judgment, not mandate: every workspace differs, and a soul's own
88
- explicit relation instructions (in its AGENTS.md or task briefing) take
89
- precedence over these defaults. When unsure which relation fits, check with
90
- the human.
91
-
92
- Do not spawn on your own judgment. Spawn when the human asks or a documented
93
- workflow requires it.
94
-
95
- ### Instance naming
96
-
97
- Name an instance for both **who it is** and **what this incarnation does** by
98
- spawning with `oats spawn <soul> --purpose <descriptive-role>`. OATS constructs
99
- `<full-soul-name>-<descriptive-role>`; use a short, lowercase kebab-case role
100
- suffix (for example, `desktop-ux` or `terminal-safety`), not an opaque number
101
- or generic word. The current spawn command always retains the full soul name,
102
- so shorten the purpose—not the soul prefix—when the result would be unwieldy.
103
- Do **not** use `oats create` to name an incarnation: it creates a new persistent
104
- soul. Never put secrets, user data, or volatile task details in an instance
105
- name.
106
-
107
- To self-retire, first finish memory/commit/reporting requirements, report final
108
- status, then run `oats retire <own-instance> --self`. That returns at once and
109
- a detached completion retires you a few seconds later exactly as an external
110
- `oats retire` would (quiesce, preserve work, hooks, remove the home). If the
111
- completion fails, your window stays, the failure shows in `oats status` with
112
- the retry command, and an operator retries. Never retire merely to clean up;
113
- retirement deletes the instance home.
114
-
115
- ## Canonical versus generated
116
-
117
- Edit `soul/AGENTS.md` for durable role instructions. Instance `AGENTS.md` is a
118
- generated view; marked blocks name their source. Config changes do not mutate
119
- the committed soul. Preview a fresh composition with:
120
-
121
- ```bash
122
- oats doctor /path/to/context --soul <name>
123
- ```
124
-
125
- The instance's `.agents/skills/` holds the exact OATS-composed set (kernel +
126
- soul + active capabilities); `.claude/skills` mirrors it. Harness-ambient
127
- skills (user-level, packages, work tree) coexist with this set. Duplicate
128
- names *within* the OATS set fail spawn unless `skill-overrides` explicitly
129
- chooses a source.
130
-
131
- ## Configuration
132
-
133
- Deployments are configured in scoped `oats-config.yaml` files (laptop /
134
- workspace / repository) declaring capability packages, exclusive
135
- knowledge/messaging/tasks layers, agent types, targeting, and injection
136
- overrides. The CLI is the config author (`oats init`, `oats use`, `oats type`,
137
- `oats inject eject`). **Load the `oats-config` skill for all configuration
138
- work** — this skill covers operating, not configuring.
139
-
140
- ## Commands and doctor
141
-
142
- Operational namespaces run only when their package is active in the current
143
- context/instance:
144
-
145
- ```bash
146
- oats okf harvest
147
- oats linear issue list ...
148
- ```
149
-
150
- Package-management commands remain global. Use doctor first when something is
151
- missing:
152
-
153
- ```bash
154
- oats doctor [context] [--soul <name>] [--json]
155
- ```
156
-
157
- It shows config chain, acquired/active packages, layer selection, target and
158
- settings provenance, requirements, trust, skill sources, instruction blocks,
159
- and—with `--soul`—final composed text.
160
-
161
- Infrastructure faults should be reported to the spawner/human, not repaired by
162
- an instance ad hoc.
@@ -1,164 +0,0 @@
1
- ---
2
- name: oats-config
3
- description: >-
4
- Use only for configuring a legacy uncaptured OATS deployment with the current
5
- oats-config.yaml cascade, including legacy activation, agent types, targeting,
6
- overrides, and templates. Triggers: "legacy oats-config", "uncaptured config",
7
- "oats use", or "agent type". This legacy policy is not a portable preparation
8
- authority and never fills a captured record.
9
- ---
10
-
11
- # Configuring legacy uncaptured OATS
12
-
13
- > **Legacy-only procedure.** The cascading scopes, agent-type targeting and
14
- > closest-team rules below are compatibility behavior for uncaptured instances.
15
- > They are not portable composition authorities. Never consult this cascade as
16
- > a fallback during captured preparation or dispatch.
17
-
18
- Config lives in `oats-config.yaml` at laptop (`~`), workspace, and repository
19
- levels; resolution walks from a soul's repository outward, closest scope wins.
20
- Prefer the CLI for config edits (`oats init`, `oats use`, `oats type`,
21
- `oats inject eject`, `oats create --type`); hand-editing is valid but the CLI
22
- writes the canonical shape.
23
-
24
- ## Shape
25
-
26
- ```yaml
27
- team: # deployment boundary (typically workspace scope)
28
- name: lfx-engineering
29
- # id: lfx-engineering:example.com # provider team id (aweb <name>:<namespace>)
30
- agent-types:
31
- developers:
32
- description: Agents that build the service
33
- capabilities:
34
- layers: # exclusive fundamental slots
35
- knowledge:
36
- capability: oats.okf
37
- from: installed # enforced provenance: installed|owned|path:<dir>
38
- # injection-override: .agents/injections/capabilities/oats.okf.md
39
- messaging: none # explicit none suppresses inherited integrations
40
- tasks: none
41
- additive: # non-exclusive packages
42
- vendor.review:
43
- from: installed
44
- agent-types:
45
- developers:
46
- enabled: true
47
- settings: {depth: normal}
48
- souls:
49
- api-expert:
50
- enabled: true
51
- settings: {depth: exhaustive}
52
- ```
53
-
54
- `global` means every soul governed by the declaring level. Bindings can also
55
- target **agent types** (families — declared in config via `oats type add`,
56
- joined via `type: <name>` in each soul.yaml) and individual souls. Matching
57
- global + agent-type + soul bindings compose. Settings precedence is
58
- soul > agent-type > global, then closer config. Equal-specificity conflicts
59
- error. `false`/`enabled: false` is an explicit exclusion and follows the same
60
- precedence. V1 does not target instances or use tags/selectors.
61
-
62
- The closest `team:` declaration marks the deployment boundary: all repos
63
- under it share one team (identity + `oats status --team` discovery + the
64
- messaging provider's team). Declare it once at the workspace scope. With
65
- aweb messaging active, `oats aweb setup` walks the onboarding (aw CLI →
66
- workspace init → team create/join) and `oats aweb roster` shows the
67
- cross-machine member directory.
68
-
69
- ```bash
70
- oats type add <name> [--description <d>] [--dir <level>]
71
- oats type list
72
- ```
73
-
74
- ## Injection overrides
75
-
76
- Capability entries and the `oats:` kernel block take an
77
- `injection-override: <path>|none|default`. Work-mode briefings are packaged
78
- and NOT overridable; the only work-mode key is `setup:` (env bootstrap run in
79
- each new worktree). The clean path is ejecting:
80
-
81
- ```bash
82
- oats inject eject <capability-id|oats> [--dir <level>]
83
- ```
84
-
85
- It copies the packaged default to the conventional
86
- `.agents/injections/{capabilities/<id>.md, oats-defaults/oats.md}` path and
87
- sets the override — the file then stops
88
- tracking package updates, deliberately. Overrides are **not allowed** on
89
- `from: owned`/`path:` capabilities: the scope owns the package source, so
90
- edit `.agents/capabilities/owned/<id>/injects/` directly.
91
-
92
- ## Activate
93
-
94
- Acquisition, trust, and package lifecycle → the **oats-packages** skill. The
95
- config side is activation and targeting of already-acquired capabilities
96
- (acquired or catalog availability never implies activation):
97
-
98
- ```bash
99
- oats use <capability> --global [--dir <level>]
100
- oats use <capability> --type <agent-type> [--disable]
101
- oats use <capability> --soul <name> [--settings k=v [k2=v2 ...]]
102
- ```
103
-
104
- `oats init` creates config and activates only explicit defaults.
105
-
106
- ## Package config templates
107
-
108
- A distribution package can ship reference **config templates**. Adopting one
109
- writes it as this scope's ordinary `oats-config.yaml` and records the exact
110
- template as a commit-safe **adopted base** — provenance, never live inheritance.
111
- Installing the package alone adopts no template.
112
-
113
- ```bash
114
- oats init --package <id|path|git-url> [--config <name>] # acquire + adopt one template
115
- oats config diff # report drift; never merges
116
- oats config sync [--accept <regionId>=local|package] # apply upstream; keep local edits
117
- oats config sync --reset --yes # discard local; take the template verbatim
118
- oats config adopt <package> [--config <name>] # switch to a different base
119
- ```
120
-
121
- The config is yours: retarget, disable, re-set, or replace anything the template
122
- enabled; nested repository configs override it per the normal cascade; package
123
- updates never rewrite it or the adopted base. `oats config sync` preserves your
124
- untouched bytes, comments, and formatting, and a region changed both locally and
125
- upstream is a conflict you must resolve explicitly. See docs/packages.md for the
126
- full adoption and sync UX.
127
-
128
- ## Fundamental layers
129
-
130
- Knowledge, messaging, and tasks are formal exclusive contracts. A package
131
- manifest declaring one `layer` is an integration. Two active integrations for
132
- the same layer error; a closer scope's entry (or `none`) overrides outer ones.
133
-
134
- | Layer | Bundled | Requirement |
135
- |---|---|---|
136
- | knowledge | `oats.okf` | none |
137
- | messaging | `oats.aweb` | `aw` CLI |
138
- | tasks | none by default; `oats.jira` or `oats.linear` available | provider-specific |
139
-
140
- Activation uses the manifest-declared layer — `oats use` writes the entry
141
- under `capabilities.layers.<layer>` automatically:
142
-
143
- ```bash
144
- oats use <capability> --global|--type <agent-type>|--soul <name>
145
- oats use none --layer <layer>
146
- ```
147
-
148
- `capabilities` is the only activation map: fundamental integrations under
149
- `capabilities.layers.<layer>` (entry or explicit `none`), everything else
150
- under `capabilities.additive`.
151
-
152
- Rare hand-edited keys: `skill-overrides:` (names the winning source on
153
- duplicate skill names), the top-level `agents-md-injection:` map (extra
154
- unconditional instruction blocks), `templates:` (named init seeds).
155
-
156
- ## Verify
157
-
158
- ```bash
159
- oats doctor [context] [--soul <name>] [--json]
160
- ```
161
-
162
- Doctor shows config chain, acquired/active packages, layer selection, target
163
- and settings provenance, requirements, trust, skill sources, instruction
164
- blocks, and — with `--soul` — the final composed AGENTS.md.
@@ -1,184 +0,0 @@
1
- ---
2
- name: oats-packages
3
- description: >-
4
- Use only for legacy uncaptured OATS package acquisition and mutable installed
5
- store operations: oats install/update/remove, lock v1/v2, restore, migration,
6
- and legacy trust. Triggers: "legacy package", "uncaptured oats install",
7
- "oats-lock v2", or "legacy migration". For retained artifact-set/resolution
8
- approval and diagnostics, load oats-portable-artifacts instead.
9
- ---
10
-
11
- # Legacy uncaptured OATS distribution packages
12
-
13
- > **Legacy-only procedure.** The mutable installed store and lock v1/v2 flows
14
- > below prepare uncaptured deployments. They are not authority for an existing
15
- > captured resolution. Use **oats-portable-artifacts** for exact retained
16
- > inspection/approval; never restore or advance captured code through today's
17
- > lock or installed capability directory.
18
-
19
- A **package** is the install/update/review unit: one git repo (or local dir)
20
- with an `oats-package.json` exporting one or more **capabilities** (the
21
- activation unit) and optional config templates. Acquiring a package activates
22
- NOTHING — activation stays in `oats-config.yaml` (see the oats-config skill).
23
- Never hand-edit `oats-lock.json` or the stores; every operation below is a CLI
24
- command, and all of them take `--json` (one stdout envelope, stable error
25
- codes) and `--dir <scope>`.
26
-
27
- ## Sources
28
-
29
- ```
30
- oats install git:github.com/org/repo@v1.0.0 # git shorthand (ref optional; resolved once, exact-locked)
31
- oats install https://host/org/repo.git@v1.0.0 # raw HTTPS/SSH git URL
32
- oats install ../my-package # local path (dev escape hatch)
33
- oats install <catalog-id> # official catalog short id (identity only — no auto-trust)
34
- ```
35
-
36
- ### Which directory in the repo is the package?
37
-
38
- A git repository CONTAINS a package; it is not one. The package root is the
39
- directory carrying `oats-package.json`, and a git source selects it with a
40
- `#<path>` fragment after any `@ref`:
41
-
42
- ```
43
- oats install git:github.com/org/repo@v1.0.0 # → repo's oats-package/ (the DEFAULT)
44
- oats install git:github.com/org/repo@v1.0.0#dist/oats # → repo's dist/oats/
45
- oats install git:github.com/org/repo@v1.0.0#. # → the repository ROOT
46
- ```
47
-
48
- - **Omit it and you get `oats-package/`.** Every official example, scaffold and
49
- convention uses `oats-package/` — never a generic `package/`. A repo whose
50
- manifest sits at the root needs `#.`; the error message says so.
51
- - **Only the selected subtree is installed and hashed.** Repository docs, CI
52
- config, owner souls and sibling packages never become installed bytes and
53
- never affect `integrity` — so editing them cannot invalidate approvals, and
54
- editing the payload (including a nested capability-agent soul) always does.
55
- - **One repo can ship several packages** at different paths; install each by
56
- its own source. Two contained roots claiming the SAME package identity still
57
- fail with `duplicate-package-identity`.
58
- - **Catalog ids take no fragment** — the catalog entry carries `path` itself.
59
- - **Local paths take no fragment either**: `oats install /repo/custom-root`
60
- treats that exact directory as the package root whatever it is named. There
61
- is no `oats-package` default for local sources.
62
-
63
- The lock records the selected root in its own `path` field, in canonical form
64
- (`.` for a root selection). A bare `oats install` restores the locked
65
- source + commit + **path** + integrity even if upstream moved the directory or
66
- the catalog repointed; only `oats update <package>` may adopt a new path, and it
67
- reports the move. Attempting to move it with a plain `oats install` is refused
68
- with `integrity-drift`.
69
-
70
- Local capability development is untouched by all of this:
71
- `.agents/capabilities/owned/<id>` (`from: owned`) and `from: path:<dir>` are
72
- not package sources and are never routed through package paths.
73
-
74
- Installing a package MATERIALIZES each capability it exports into
75
- `<scope>/.agents/capabilities/installed/<id>/` (gitignored). There is no
76
- persistent package store. Dependencies declared in `oats-package.json` must be
77
- pinnable (official selector, tag/commit, or path). The whole closure is
78
- exact-locked in the scope's `oats-lock.json` (`lockfileVersion: 2`), which
79
- records two maps: `packages` (source, exact commit, selected path, payload
80
- integrity, dependencies) and `capabilities` (each artifact's version, provider
81
- package, path, integrity, trust).
82
-
83
- ## Everyday operations
84
-
85
- ```
86
- oats install # bare: EXACT restore of this chain's locks (never advances refs)
87
- oats list [--json] # packages, exported capabilities, scopes, trust state
88
- oats update <package> # transactional: temp fetch, closure validation, diff,
89
- # artifact+lock replaced together; approvals of every
90
- # CHANGED-integrity package are invalidated (unchanged
91
- # packages in the closure keep theirs)
92
- oats remove <package> # refuses while config or dependent packages reference it
93
- ```
94
-
95
- ## Trust
96
-
97
- Executable surfaces (commands/hooks) are blocked until approved at each
98
- capability artifact's EXACT integrity:
99
-
100
- ```
101
- oats trust <capability> # approve only that capability
102
- oats trust <package> --all-capabilities # explicit bulk; prints the full executable surface first
103
- ```
104
-
105
- Any artifact integrity change (update, drift) resets that capability's trust —
106
- re-review, then re-trust. Skill/instruction/config-only capabilities need lock
107
- integrity but no approval. Official-catalog identity is NOT executable trust.
108
-
109
- ## Runtime dependencies
110
-
111
- A capability may check in `package.json` + `package-lock.json`; OATS materializes
112
- it with `npm ci --omit=dev --omit=peer --ignore-scripts` — production tree only,
113
- no lifecycle scripts. The package payload hash EXCLUDES `node_modules`. The
114
- materialized `node_modules` is instead part of that capability's own artifact
115
- integrity, so tampering with materialized deps resets the capability's trust
116
- just like source drift, and restore re-verifies it. Closures must be
117
- platform-invariant. Host peer APIs are reached only through the supported
118
- runtime boundary, never auto-installed.
119
-
120
- ## Migration from v1 locks
121
-
122
- ```
123
- oats migrate --dry-run # plan: which v1 capability locks map to packages
124
- oats migrate # convert this scope to revised v2 — all-or-nothing
125
- ```
126
-
127
- `oats migrate` is all-or-nothing per scope. It converts a scope to the revised v2
128
- lock only when EVERY entry maps to a package. If any entry cannot be mapped yet
129
- (a marketplace id the catalog does not resolve, an unknown source), the whole
130
- scope stays byte-identical v1 and keeps working — re-run when it can map. A
131
- successful run writes a fresh v2 lock for the scope. There is NO residue
132
- container: a converted lock never carries leftover v1 entries. Approvals never
133
- carry over — re-trust after migrating.
134
-
135
- ### Upgrading a 0.18 deployment (bundled official capabilities → packages)
136
-
137
- ```
138
- oats migrate --official --recursive --dry-run --dir <team-root> # plan every scope
139
- oats migrate --official --recursive --dir <team-root> # apply, scope by scope
140
- ```
141
-
142
- Guided mode for existing users. It plans every visible lock-owning scope first
143
- (ancestor chain incl. outer/laptop locks, team boundary, pruned descendants;
144
- path order, ancestors first), then applies each scope transactionally.
145
-
146
- - Which package supplies a legacy capability is CATALOG data: identity by
147
- default, plus aliases (`oats.review` → package `oats.dev`). Never a hardcoded
148
- URL or tag, and no ref is guessed from the v1 capability version.
149
- - Config files are never rewritten — exported ids are unchanged, so activation,
150
- layers, targets, settings and exclusions stay valid.
151
- - No mapping yet at a scope → that scope is HELD and left byte-identical v1
152
- (nonzero exit, `--dry-run` included); legacy capabilities keep working. A
153
- converting scope moves whole to revised v2 — there is no residue container, so
154
- a converted lock never carries leftover v1 entries.
155
- - `git:`/`path:`/unknown entries are never acquired by guided mode. A scope
156
- containing only those entries is skipped with their IDs under `retained`; a
157
- scope mixing them with official capabilities is blocked whole and stays v1.
158
- Plain `oats migrate` can convert custom sources only when every entry maps.
159
- - After it runs: `oats trust <capability> --dir <scope>` for each executable
160
- surface it names (approvals never transfer), then `oats install --dir <scope>`
161
- — already-installed host requirements verify, nothing is reinstalled.
162
- - `--json` emits one envelope; an aggregate failure is `ok:false` with
163
- `error.code = E_MIGRATE_FAILED` and the complete per-scope report (including
164
- the scopes that DID migrate) under `error.details`.
165
-
166
- `oats doctor` detects the upgradeable state and prints the exact command
167
- (`officialMigration` in `--json`), or says migration is not available yet while
168
- confirming the legacy capabilities remain supported.
169
-
170
- ## Troubleshooting
171
-
172
- `oats doctor [dir] [--json]` distinguishes: missing locked package (run
173
- `oats install`), integrity drift (reacquire/update explicitly — approvals are
174
- already invalid), a capability whose `.oats-installation.json` disagrees with
175
- the lock, untrusted executable surface (`oats trust <capability>`), and a legacy
176
- v1 lock pending migration (`legacyLockFiles[]` plus `officialMigration`
177
- readiness). A refused lock — including the superseded transitional v2 shape —
178
- is reported as the single `lockError` diagnosis and is never partially
179
- interpreted.
180
-
181
- Source of truth beyond this skill: `oats --help` output,
182
- `docs/oats-package.schema.json`, `docs/oats-lock.schema.json`, and
183
- `docs/design/package-engine-contract.md` (+ `package-runtime-api.md`) in the
184
- framework repo; `docs/capabilities.md` for the user-level walkthrough.
@@ -1,115 +0,0 @@
1
- ---
2
- name: oats-portable
3
- description: >-
4
- Use when operating a newly prepared captured OATS instance, invoking an exact
5
- retained command or provider operation, inspecting its immutable composition,
6
- creating an explicit fresh scaffold, or starting its captured native session.
7
- Triggers: "captured OATS",
8
- "portable soul", "resolution ID", "exact retained command", "fresh captured
9
- spawn". Do not use for legacy config-chain deployments.
10
- ---
11
-
12
- # Operating a captured OATS instance
13
-
14
- A captured instance executes one immutable managed composition identified by an
15
- explicit deployment and resolution. Its source soul, adopter alias, capability
16
- artifacts, settings, provider bindings, curriculum, helpers, and executable
17
- resources come from that record—not from the current checkout or config chain.
18
- Credentials, provider readiness, memberships, knowledge contents, the work target,
19
- and host tools remain separately checked mutable inputs.
20
-
21
- ## Authority checklist
22
-
23
- 1. Read `instance.json.executionBinding` for the exact deployment and resolution.
24
- 2. Pass both selectors together. Never infer either from cwd, a source path, a
25
- package lock, an OS user, or another instance.
26
- 3. If the record, retained resource, approval, binding, or host requirement is
27
- missing or invalid, stop. Do not retry through an unqualified legacy command.
28
- 4. Treat `responsibleHuman: null` only as explicit messaging-disabled state. It
29
- is not an anonymous human or a private-team identity.
30
-
31
- ## Implemented commands
32
-
33
- ```bash
34
- oats inspect --deployment <absolute-deployment> --resolution <sha256-id> --json
35
- oats inspect --deployment <absolute-deployment> --resolution <sha256-id> --composition --json
36
- oats <namespace> <command> --deployment <absolute-deployment> --resolution <sha256-id> -- [provider-args]
37
- oats operation run <knowledge|messaging|tasks>:<name> \
38
- --deployment <absolute-deployment> --resolution <sha256-id> \
39
- [--home <absolute-instance-home>] [--arg name=value ...] --json
40
- ```
41
-
42
- For capability helpers, inspect the source's captured helper map and resolve one
43
- exact key before selecting a helper record:
44
-
45
- ```bash
46
- oats inspect --deployment <source-deployment> --resolution <source-id> \
47
- --helper <exact-map-key> --composition --json
48
- ```
49
-
50
- Keep `sourceExecutionBinding` for provider completion commands and the returned
51
- `executionBinding` for the helper. Do not complete through a worker's inherited
52
- selector or use legacy helper-name discovery. Helper inspection is not worker
53
- launch; use the staged public start below and retain its actual dispatch result.
54
-
55
- A fresh captured directory scaffold is available only with explicit placement
56
- and no launch:
57
-
58
- ```bash
59
- oats spawn <captured-subject> \
60
- --deployment <absolute-deployment> --resolution <sha256-id> \
61
- --home <absolute-new-home> --no-launch --json
62
- ```
63
-
64
- The subject must match the retained soul alias or helper name. The home must be
65
- new and its parent physical. This command materializes retained instructions and
66
- skills, creates owned directory work, and runs captured spawn hooks. It does not
67
- select a work repository, launch a model, or infer a team.
68
-
69
- ## Start the owned captured home
70
-
71
- After the explicit scaffold/hooks stage, start using the same retained authority:
72
-
73
- ```bash
74
- oats session start --deployment <absolute-deployment> --resolution <sha256-id> \
75
- --home <owned-home> --request <absolute-native-request-json> --json
76
- ```
77
-
78
- The native request is a closed object, for example:
79
-
80
- ```json
81
- {"schemaVersion":1,"backend":{"backend":"tmux","binary":"/absolute/tmux","socket":"/absolute/socket","session":"captured"},"task":"Explicit task"}
82
- ```
83
-
84
- For Herdr, replace only `backend` with
85
- `{"backend":"herdr","binary":"/absolute/herdr","socket":"/absolute/herdr.sock","protocol":20}`.
86
- Use an explicit existing operator-managed socket; this route never starts a
87
- Herdr daemon or falls back to tmux. Actual workspace/pane/terminal IDs arrive in
88
- the receipt after allocation, never from caller naming. API discovery advertises
89
- `oats.captured-session@2` with both backends and `readiness:not-checked`.
90
-
91
- Runtime/model/yolo come from the capture, never this request. Optional
92
- `stopGraceMs` is bounded 1–300000. No env/io/credential/provider/config fields.
93
- For an already scaffolded helper, pass the SOURCE selectors and add
94
- `--helper <exact-map-key>`; the home must match the returned dedicated helper
95
- binding. This revalidates the edge, not just a helper name.
96
-
97
- Use `session restart` for a distinct restart request in the same incarnation.
98
- Once stored, task/backend can be omitted to use owned values. Use
99
- `--retry-intent <saved-executionId>` only for an explicit replay/retry of that
100
- same logical request. An unknown Herdr allocation must remain held under its
101
- saved intent; never repeat workspace creation or guess its IDs from a label.
102
- Preserve `error.details.nativeCustody` and the indexed
103
- pending identity on uncertainty; never allocate another home/ID to disguise it.
104
- `dispatchAccepted` means native dispatch, not task completion/model health or
105
- privacy. A completed receipt replay may return `replayed:true` instead.
106
-
107
- ## Current refusal boundary
108
-
109
- Captured wake/retire, unqualified managed runtime packages/contributions, extra
110
- native arguments, non-directory work targets and backends other than tmux/Herdr
111
- still refuse. Do not strip selectors or call legacy forms as a workaround. A scaffold marked `spawn-failed-cleanup-required`
112
- may contain external hook effects; preserve it and escalate rather than deleting
113
- it. A scaffold marked `spawned-launch-pending` is not a running instance.
114
-
115
- Use **oats-portable-artifacts** for exact approval and retained A/B diagnostics.