@awebai/oats 0.27.2 → 0.29.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 (75) hide show
  1. package/bin/oats.mjs +445 -96
  2. package/capabilities/oats-okf/bin/oats-okf.mjs +55 -30
  3. package/capabilities/oats-okf/injects/okf.md +36 -28
  4. package/capabilities/oats-okf/lib/binding-wire.mjs +4 -1
  5. package/capabilities/oats-okf/lib/config.mjs +6 -1
  6. package/capabilities/oats-okf/lib/consult.mjs +496 -0
  7. package/capabilities/oats-okf/lib/harvest-status.mjs +88 -0
  8. package/capabilities/oats-okf/lib/harvest-switch.mjs +81 -0
  9. package/capabilities/oats-okf/lib/inspection.mjs +11 -3
  10. package/capabilities/oats-okf/lib/io.mjs +9 -2
  11. package/capabilities/oats-okf/lib/okf-validate.mjs +123 -0
  12. package/capabilities/oats-okf/lib/sources.mjs +42 -55
  13. package/capabilities/oats-okf/lib/stores.mjs +19 -11
  14. package/capabilities/oats-okf/lib/worker.mjs +90 -8
  15. package/capabilities/oats-okf/oats.json +24 -9
  16. package/capabilities/oats-okf/skills/okf-consultation/SKILL.md +144 -0
  17. package/capabilities/oats-okf/skills/okf-consultation/references/consult.md +86 -0
  18. package/capabilities/oats-okf/skills/okf-instance-knowledge/SKILL.md +104 -0
  19. package/capabilities/oats-okf-harvest/bin/okf-harvest.mjs +140 -0
  20. package/capabilities/oats-okf-harvest/injects/harvester.md +12 -0
  21. package/capabilities/oats-okf-harvest/oats.json +26 -0
  22. package/capabilities/oats-okf-harvest/skills/knowledge-harvest/SKILL.md +168 -0
  23. package/capabilities/oats-okf-harvest/skills/knowledge-theory/SKILL.md +192 -0
  24. package/capabilities/{oats-okf/skills/okf → oats-okf-harvest/skills/okf-authoring}/SKILL.md +15 -22
  25. package/capabilities/oats-okf-maintenance/bin/okf-maintenance.mjs +149 -0
  26. package/capabilities/oats-okf-maintenance/injects/maintainer.md +12 -0
  27. package/capabilities/oats-okf-maintenance/lib/provenance.mjs +45 -0
  28. package/capabilities/oats-okf-maintenance/oats.json +21 -0
  29. package/capabilities/oats-okf-maintenance/skills/knowledge-review/SKILL.md +144 -0
  30. package/capabilities/oats-okf-maintenance/skills/knowledge-theory/SKILL.md +192 -0
  31. package/capabilities/oats-okf-maintenance/skills/okf-authoring/SKILL.md +151 -0
  32. package/capabilities/oats-okf-maintenance/skills/okf-authoring/scripts/okf-validate.mjs +123 -0
  33. package/capabilities/oats-okf-maintenance/skills/okf-trigger-setup/SKILL.md +146 -0
  34. package/capabilities/oats-review/injects/review.md +3 -2
  35. package/capabilities/oats-review/oats.json +3 -4
  36. package/docs/capabilities.md +41 -9
  37. package/docs/capability-manifest.schema.json +0 -7
  38. package/docs/design/2026-09-24-phase-d-plan.md +11 -0
  39. package/docs/design/2026-09-26-desktop-design-brief-architecture.md +241 -0
  40. package/docs/design/2026-09-26-okf-knowledge-operations.md +389 -0
  41. package/docs/desktop-cli-api.md +342 -10
  42. package/docs/implementation.md +1 -1
  43. package/docs/knowledge-capability-authoring.md +8 -2
  44. package/docs/knowledge-reference/package-craft.md +8 -5
  45. package/docs/knowledge.md +101 -0
  46. package/docs/oats-local.schema.json +33 -2
  47. package/docs/oats-package.schema.json +39 -0
  48. package/docs/official-catalog.md +7 -4
  49. package/docs/packages.md +76 -6
  50. package/docs/release-lane.md +1 -1
  51. package/docs/release-notes/v0.28.0.md +144 -0
  52. package/docs/release-notes/v0.29.0.md +240 -0
  53. package/docs/schedules.md +230 -4
  54. package/docs/souls-and-instances.md +11 -9
  55. package/docs/workspaces.md +18 -3
  56. package/lib/automations.mjs +369 -0
  57. package/lib/core.mjs +87 -158
  58. package/lib/instance-inspect.mjs +16 -8
  59. package/lib/instance-resolution.mjs +90 -197
  60. package/lib/materialize.mjs +18 -7
  61. package/lib/operator-dispatch.mjs +1 -2
  62. package/lib/packages.mjs +107 -6
  63. package/lib/remote.mjs +21 -1
  64. package/lib/resolve.mjs +71 -9
  65. package/lib/schedule.mjs +228 -45
  66. package/lib/triggers.mjs +678 -0
  67. package/lib/workspace.mjs +81 -4
  68. package/package-catalog.json +6 -4
  69. package/package.json +1 -1
  70. package/capabilities/oats-okf/agents/memory-harvest/AGENTS.md +0 -21
  71. package/capabilities/oats-okf/agents/memory-harvest/soul.yaml +0 -5
  72. package/capabilities/oats-okf/skills/memory-harvest/SKILL.md +0 -285
  73. package/capabilities/oats-review/agents/reviewer/AGENTS.md +0 -53
  74. package/capabilities/oats-review/agents/reviewer/soul.yaml +0 -6
  75. /package/capabilities/{oats-okf/skills/okf → oats-okf-harvest/skills/okf-authoring}/scripts/okf-validate.mjs +0 -0
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://oats.dev/schemas/local-v2.json",
4
4
  "title": "Deployment-local overrides v2 (oats-local.yaml)",
5
- "description": "The operator's side of a workspace: which workspace this machine realizes, where member clones live when not at the taught convention, host-owned capability settings (absolute paths belong HERE, never in the workspace file), souls disabled on this machine, and the named launch configurations this host offers. Never shared through Git.",
5
+ "description": "The operator's side of a workspace: which workspace this machine realizes, where member clones live when not at the taught convention, host-owned capability settings (absolute paths belong HERE, never in the workspace file), souls disabled on this machine, this host's name and the workspace triggers and schedules it does not run, and the named launch configurations this host offers. Never shared through Git.",
6
6
  "type": "object",
7
7
  "required": ["schemaVersion", "workspace"],
8
8
  "additionalProperties": false,
@@ -64,14 +64,45 @@
64
64
  }
65
65
  }
66
66
  },
67
+ "host": {
68
+ "type": "object",
69
+ "additionalProperties": false,
70
+ "required": ["name"],
71
+ "properties": {
72
+ "name": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "description": "This machine's name (0.29.0). A workspace trigger or schedule runs on the host whose name is its `runsOn` (and only when this host's gh account is its `owner`). A machine fact, never in Git." }
73
+ }
74
+ },
75
+ "triggers": {
76
+ "type": "object",
77
+ "additionalProperties": false,
78
+ "properties": {
79
+ "disabled": {
80
+ "description": "Workspace triggers this host does not run, by qualified id <member>/<id>, without a commit (`oats trigger disable <member>/<id>` writes it). Local triggers are enabled and disabled in oats-schedules.json.",
81
+ "type": "array", "uniqueItems": true,
82
+ "items": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*/[a-z0-9-]{1,40}$" }
83
+ }
84
+ }
85
+ },
86
+ "schedules": {
87
+ "type": "object",
88
+ "additionalProperties": false,
89
+ "properties": {
90
+ "disabled": {
91
+ "description": "Workspace schedules this host does not run, by qualified id <member>/<id>, without a commit (`oats schedule disable <member>/<id>` writes it). Local schedules are enabled and disabled in oats-schedules.json.",
92
+ "type": "array", "uniqueItems": true,
93
+ "items": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*/[a-z0-9-]{1,40}$" }
94
+ }
95
+ }
96
+ },
67
97
  "souls": {
68
98
  "type": "object",
69
99
  "additionalProperties": false,
70
100
  "properties": {
71
101
  "disabled": {
102
+ "description": "Souls not run on this machine (a spawn is E_SOUL_DISABLED): a bare soul name disables every soul of that name; a qualified name disables one — <package>/<soul> for a package soul, <member name>/<soul> for a member's.",
72
103
  "type": "array",
73
104
  "uniqueItems": true,
74
- "items": { "type": "string", "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$" }
105
+ "items": { "type": "string", "pattern": "^(?:[a-z0-9][a-z0-9._-]*/)?[a-z0-9]+(?:-[a-z0-9]+)*$" }
75
106
  }
76
107
  }
77
108
  }
@@ -53,6 +53,45 @@
53
53
  },
54
54
  "uniqueItems": true
55
55
  },
56
+ "souls": {
57
+ "description": "Package souls (OATS 0.28.0): package-relative soul directories, each an ordinary soul (soul.yaml + AGENTS.md, optional skills/). A soul's name is its directory's. They are versioned and locked with the package (oats-lock.json records each soul's name, path and digest), listed with their package origin, and spawned by the qualified name <package>/<soul> (or the bare name when unique). `from: here` in a package soul is its own package at the locked commit.",
58
+ "type": "array",
59
+ "items": {
60
+ "type": "string",
61
+ "minLength": 1,
62
+ "pattern": "^[^/].*$",
63
+ "not": {
64
+ "pattern": "(^|/)\\.\\.(/|$)"
65
+ }
66
+ },
67
+ "uniqueItems": true
68
+ },
69
+ "triggers": {
70
+ "description": "Trigger templates (OATS 0.28.0): `oats trigger add --from <package>:<id> [--set <name>=<value>]…` instantiates one from the locked package. Each file is { parameters: { <name>: { path, required?, default?, description? } }, definition: { …a trigger definition… } }; see docs/schedules.md#triggers.",
71
+ "type": "array",
72
+ "items": {
73
+ "type": "object",
74
+ "required": [
75
+ "id",
76
+ "file"
77
+ ],
78
+ "additionalProperties": false,
79
+ "properties": {
80
+ "id": {
81
+ "type": "string",
82
+ "pattern": "^[a-z0-9][a-z0-9._-]*$"
83
+ },
84
+ "file": {
85
+ "type": "string",
86
+ "minLength": 1,
87
+ "pattern": "^[^/].*$",
88
+ "not": {
89
+ "pattern": "(^|/)\\.\\.(/|$)"
90
+ }
91
+ }
92
+ }
93
+ }
94
+ },
56
95
  "configTemplates": {
57
96
  "description": "Named config TEMPLATES: complete reference oats-config.yaml files of the classic line, whose adoption verb is removed under the workspace model. A template is a recommended starting point that becomes ordinary local policy on adoption — adopters may change every copied setting, and package updates never rewrite an adopted config. Templates must stay portable: no secret, credential, account, machine path or provider-local ID. Installation applies none of them. This is the canonical spelling; a manifest may not carry both this and the legacy `configs`.",
58
97
  "type": "object",
@@ -65,13 +65,16 @@ this policy does not invent new catalog or manifest fields.
65
65
 
66
66
  ## Listed first set
67
67
 
68
- - Listed capabilities: `oats.okf`, `oats.aweb`, `oats.authoring`, `oats.jira`,
69
- `oats.linear`, `oats.dev`, `oats.knowledge-theory`, `oats.core` and `oats.setup`.
70
- - **`oats.framework` 1.1.3** is listed at tag `oats-framework/v1.1.3` in
68
+ - Listed capabilities: `oats.okf`, `oats.okf-harvest`, `oats.okf-maintenance`,
69
+ `oats.aweb`, `oats.authoring`, `oats.jira`, `oats.linear`, `oats.dev`,
70
+ `oats.knowledge-theory`, `oats.core` and `oats.setup`. `oats.okf-harvest` and
71
+ `oats.okf-maintenance` select the `oats.okf` package (4.0.0).
72
+ - **`oats.framework` 1.3.0** is listed at tag `oats-framework/v1.3.0` in
71
73
  `awebai/oats`, payload root `oats-package`. The `oats.core`, `oats.setup` and
72
74
  `oats.knowledge-theory` aliases select that distribution; package identity is
73
75
  distinct from capability identity. Core supplies operation/soul guidance;
74
- setup supplies OATS Soul Setup, configuration and package guidance.
76
+ setup supplies OATS Soul Setup, configuration and package guidance. The
77
+ package also ships the `knowledge-theory-expert` package soul.
75
78
 
76
79
  These entries are in the current repository catalog. An older installed CLI keeps
77
80
  its bundled catalog; publication here does not update that installation or rewrite
package/docs/packages.md CHANGED
@@ -27,7 +27,9 @@ A Git repository **contains** a package at `oats-package/`:
27
27
  ```
28
28
 
29
29
  `oats-package.json` must declare `package` and `capabilities` (a list of
30
- directories relative to the package root, each holding an `oats.json`). A
30
+ directories relative to the package root, each holding an `oats.json`). It may
31
+ also declare `souls` (0.28.0): soul directories the package ships, see
32
+ [Package souls](#package-souls). A
31
33
  directory entry need not equal the capability's name
32
34
  (`capabilities/oats-okf` → capability `oats.okf`). A package declaring one
33
35
  capability name twice, a listed directory without a manifest, or a manifest
@@ -72,8 +74,8 @@ members:
72
74
  - git:github.com/acme/agents
73
75
  - git:github.com/acme/platform
74
76
  packages:
75
- oats.framework: v1.1.3
76
- oats.okf: v2.1.5
77
+ oats.framework: v1.3.0
78
+ oats.okf: v4.0.0
77
79
  oats.aweb: v1.14.2
78
80
  teams:
79
81
  global: { description: Org-wide }
@@ -172,7 +174,8 @@ same workspace commit hold identical locks.
172
174
  "version": "0.4.0",
173
175
  "commit": "47f4b81660e4cc9701d373088de52462762585a3",
174
176
  "integrity": "sha256-4cd126a7…",
175
- "capabilities": ["acme-deploy", "acme-lint"]
177
+ "capabilities": ["acme-deploy", "acme-lint"],
178
+ "souls": [{ "name": "release-reviewer", "path": "souls/release-reviewer", "digest": "sha256-9a0f…" }]
176
179
  }
177
180
  }
178
181
  }
@@ -187,6 +190,7 @@ same workspace commit hold identical locks.
187
190
  | `commit` | full 40-hex OID the version resolved to |
188
191
  | `integrity` | `sha256-<hex>` content digest of the package tree at `path` |
189
192
  | `capabilities` | the capability names the package provides (sorted) — what `from: package` looks up |
193
+ | `souls` | the package souls (0.28.0), sorted by name: `name`, `path` (inside the package) and `digest` (`sha256-<hex>` of the soul directory); absent when the package ships none |
190
194
 
191
195
  A capability provided by **two** locked packages is ambiguous and fails
192
196
  closed (`E_PACKAGE_MISSING { ambiguous: [ids] }`): keep one of them in
@@ -220,6 +224,72 @@ against what the fetch reported; skills are copied to
220
224
  `packages:` and syncing affects **only new spawns**; `oats status` shows a
221
225
  running instance's package module as `moved` once the lock points elsewhere.
222
226
 
227
+ ## Package souls
228
+
229
+ A package may ship **souls** as well as capabilities (0.28.0). One pin in
230
+ `packages:` then versions both: nothing drifts, unlike an `external:` soul's
231
+ commit pin.
232
+
233
+ ```
234
+ oats-package/
235
+ ├── oats-package.json # { …, "capabilities": ["capabilities/acme-review"], "souls": ["souls/release-reviewer"] }
236
+ ├── capabilities/acme-review/oats.json
237
+ └── souls/release-reviewer/
238
+ ├── soul.yaml # an ordinary soul: name = the directory's name
239
+ ├── AGENTS.md
240
+ └── skills/…
241
+ ```
242
+
243
+ - **Locked.** `oats sync` records each soul's `name`, `path` and `digest` in
244
+ the lock entry. A soul without `soul.yaml` or `AGENTS.md`, or whose
245
+ directory is not a soul name, is `E_PACKAGE_MANIFEST`. On a later sync at
246
+ the same version the souls must still match (`E_PACKAGE_INTEGRITY { why:
247
+ "souls" }`); a lock written before 0.28.0 has its `souls` filled in.
248
+ - **Listed.** `oats souls` lists a package soul with `kind: "package"`,
249
+ `package`, `version`, `qualifiedName` and `origin: "package <id>
250
+ v<version>"`; `oats sync` / `oats workspace status` list each package's
251
+ `souls`. Only packages the workspace still declares are listed.
252
+ - **Named.** The qualified name is `<package>/<soul>` (`oats.okf/knowledge-maintainer`).
253
+ A bare name works when it is unique across member, external and package
254
+ souls; otherwise `E_SOUL_AMBIGUOUS` names each qualified form
255
+ (`details.qualified`). A member soul's qualified form is `<member name>/<soul>`.
256
+ - **Resolved** like any soul: the workspace and team defaults apply, `off` and
257
+ `<slot>: none` work, every `team:` label must be declared (`E_TEAM_UNKNOWN`
258
+ in discovery), and `from: here` means **this package** at the locked commit
259
+ (a capability it does not provide is `E_CAPABILITY_MISSING`).
260
+ - **Spawned** at the locked commit: the soul is fetched into the per-commit
261
+ soul cache and its digest must equal the lock's (`E_PACKAGE_INTEGRITY
262
+ { why: "soul-digest" }`). A package soul homes in its own agent directory,
263
+ `agents/<package>--<soul>/` (the package id with `.` as `-`:
264
+ `agents/oats-okf--knowledge-maintainer/`), which is also its agent name
265
+ (`OATS_AGENT`, the `oats status` row); its instances are named from it
266
+ (`oats-okf-knowledge-maintainer-<purpose>`). That prefix counts toward the
267
+ 64-character instance-name limit, so a package soul's purposes are short:
268
+ `oats-okf-knowledge-maintainer-` is 30 characters, which leaves 34 for the
269
+ purpose (fewer when a `-2` suffix de-duplicates it). A longer one is
270
+ `E_INSTANCE_NAME_INVALID { prefix, purpose, maxPurpose }`, naming the budget;
271
+ a trigger's or schedule's purpose template obeys the same limit when it
272
+ renders. A soul name never holds `--`,
273
+ so a member soul of the same bare name keeps its own `agents/<soul>/`.
274
+ Two packages whose ids sanitise alike (`a.b`, `a-b`) and that ship a
275
+ same-named soul would share a directory: both are listed with an
276
+ `E_SOUL_AMBIGUOUS` problem, and spawning either is `E_SOUL_AMBIGUOUS
277
+ { agentDir, qualified }` — keep one of the packages.
278
+ `instance.json.workspace.soul` records `name`, `qualifiedName`, `package:
279
+ { id, version, commit, digest, path }` and the soul id `package:<id>#<soul>`;
280
+ in `oats status` the soul is `moved` once the package pin moves.
281
+ - **Disabled** by `oats-local.yaml` `souls.disabled` by its qualified or bare
282
+ name (`E_SOUL_DISABLED` at spawn).
283
+ - **Trusted** as the package's capabilities are: declaring the package is the
284
+ trust decision.
285
+
286
+ ## Trigger templates
287
+
288
+ A package may also ship **trigger templates** (0.28.0): `triggers: [{ id,
289
+ file }]` in `oats-package.json`, each file `{ parameters, definition }`.
290
+ `oats trigger add --from <package>:<id> --set <name>=<value>` instantiates one
291
+ at the locked commit; see [schedules.md#triggers](schedules.md#triggers).
292
+
223
293
  ## Compatibility floors
224
294
 
225
295
  A soul may state floors on package versions — constraints, not sources:
@@ -274,8 +344,8 @@ A soul that names one of the package's capabilities with
274
344
  }
275
345
  ```
276
346
 
277
- `ref` carries the tag convention: a workspace's `oats.framework: v1.2.0`
278
- resolves to tag `oats-framework/v1.2.0`. Resolving through the catalog never
347
+ `ref` carries the tag convention: a workspace's `oats.framework: v1.3.0`
348
+ resolves to tag `oats-framework/v1.3.0`. Resolving through the catalog never
279
349
  advances a lock by itself — `oats sync` does, and
280
350
  says so.
281
351
 
@@ -30,7 +30,7 @@ under `stage/<tag>/logs/`; a failing step exits non-zero with the log path.
30
30
 
31
31
  | Phase | Mirrors in `release.yml` | Writes |
32
32
  | --- | --- | --- |
33
- | `build --tag vX.Y.Z [--sha <commit>]` | job `build-and-test`: notes gate, three-manifest bump, `node --check`, `npm ci`, `npm run check`, Desktop test deps, `npm test`, `pack:check` and the tarball greps, `smoke:tarball`, the `version --json` probe | `npm/*.tgz`, `MANIFEST.json` |
33
+ | `build --tag vX.Y.Z [--sha <commit>]` | jobs `build-and-test` and `tests` (the lane runs the suite unsharded): notes gate, three-manifest bump, `node --check`, `npm ci`, `npm run check`, Desktop test deps, `npm test`, `pack:check` and the tarball greps, `smoke:tarball`, the `version --json` probe | `npm/*.tgz`, `MANIFEST.json` |
34
34
  | `desktop --tag vX.Y.Z --arch arm64\|x64` | one `desktop-build` matrix leg: desktop `npm ci`, `npm test`, `npm run dist -- --<arch>`, strict deep `codesign --verify` (macOS), `dist:smoke` in build-verify mode | `assets/oats-desktop-*` |
35
35
  | `stage --tag vX.Y.Z` | publish job, "Checksums" (`shasum -a 256`) | `assets/SHA256SUMS.txt` |
36
36
  | `publish-npm --tag vX.Y.Z [--dry-run] --yes` | publish job, the two guarded `npm publish --access public` steps, kernel then adapter | — |
@@ -0,0 +1,144 @@
1
+ # OATS 0.28.0
2
+
3
+ Package souls, triggers, okf 3.0.0 remote knowledge consult, and the Workspace v4 Desktop.
4
+
5
+ ## Added
6
+
7
+ - **Package souls** (feature `package-souls`). A package may ship souls as
8
+ well as capabilities: `souls: ["souls/<name>", …]` in
9
+ `oats-package/oats-package.json`, each an ordinary soul directory
10
+ (`soul.yaml`, `AGENTS.md`, `skills/`). One pin in the workspace's
11
+ `packages:` versions both, so a package soul never drifts the way an
12
+ `external:` commit pin can. See [packages.md](../packages.md#package-souls).
13
+ - `oats sync` locks each soul's `name`, `path` and `digest` in the package's
14
+ lock entry and checks them again on the next sync
15
+ (`E_PACKAGE_INTEGRITY { why: "souls" }`). A soul without `soul.yaml` or
16
+ `AGENTS.md` is `E_PACKAGE_MANIFEST`. A lock written by an earlier kernel
17
+ has its `souls` filled in on the next sync.
18
+ - `oats souls` lists them with `kind: "package"`, `package`, `version` and
19
+ `qualifiedName`; `oats sync` and `oats workspace status` list each
20
+ package's `souls`.
21
+ - Spawn one by its qualified name `<package>/<soul>`
22
+ (`oats spawn oats.okf/knowledge-maintainer`), or by its bare name when that
23
+ is unique. A bare name shared by several souls is `E_SOUL_AMBIGUOUS`, which
24
+ now names each qualified form (`details.qualified`); a member soul's is
25
+ `<member name>/<soul>`.
26
+ - A package soul resolves like any soul: workspace and team defaults apply,
27
+ `off` and `<slot>: none` work, its `team:` labels must be declared, and
28
+ `from: here` means its own package at the locked commit.
29
+ - The spawn fetches the soul at the locked commit and verifies it against the
30
+ lock's digest (`E_PACKAGE_INTEGRITY { why: "soul-digest" }`). It homes in
31
+ its own agent directory `agents/<package>--<soul>/`
32
+ (`agents/oats-okf--knowledge-maintainer/`), its agent name in `oats status`
33
+ and `OATS_AGENT`, so a member soul of the same bare name never shares its
34
+ directory or roster row. `instance.json.workspace.soul` records `name`,
35
+ `qualifiedName` and `package: { id, version, commit, digest, path }`, and
36
+ the soul id is `package:<id>#<soul>`. `oats status` shows the soul as
37
+ `moved` once the package pin moves. Two packages whose ids differ only by
38
+ `.` and `-` (`a.b`, `a-b`) and that ship a same-named soul would share an
39
+ agent directory: that is an `E_SOUL_AMBIGUOUS` problem in `oats sync` and
40
+ `oats souls`, and neither spawns.
41
+
42
+ - **Triggers** (feature `triggers`): event-driven spawns. A trigger says
43
+ "when a GitHub pull request event matches, spawn a new instance of this soul
44
+ with this task, in these teams". It is stored beside the schedules
45
+ (`kind: "trigger"` in `oats-schedules.json`) and evaluated by the same host
46
+ tick; there is no daemon or webhook. See
47
+ [schedules.md#triggers](../schedules.md#triggers).
48
+ - The source `github.pull_request` is polled with the host's `gh` at the
49
+ trigger's `poll` interval (at least 1m). Events: `opened`, `reopened`,
50
+ `ready_for_review`, `labeled`, `synchronize`, filtered by `labels` and
51
+ `base`.
52
+ - Each event fires once: its key is recorded only after a successful spawn,
53
+ so a failed spawn is retried on the next poll. Delivery is at least once: a
54
+ tick that dies between the spawn and recording its key spawns the event
55
+ again (held while the first instance is live, under the default `perKey: 1`). `concurrency.max` and
56
+ `perKey` bound the live instances of the trigger and of one PR.
57
+ - The purpose and task are templated from `{repo} {number} {url} {event}
58
+ {headSha} {trigger}` only; a PR's title and body never reach the task.
59
+ `spawn.teams` becomes the messaging capability's `join=`. The instance gets
60
+ the event as `OATS_TRIGGER_EVENT_FILE` (`<home>/.oats/trigger-event.json`)
61
+ and records `instance.json.trigger`.
62
+ - `oats trigger add (--file | --from <package>:<template> --set …) | list |
63
+ show | enable | disable | remove | test | status`, all with `--json`.
64
+ `oats trigger test` checks gh auth and where its credential comes from
65
+ (warning when the host timer cannot reach it, such as a shell-only
66
+ `GH_TOKEN`), the repository and your push/maintain/admin permissions on it,
67
+ the soul, the teams, and what would fire now, and spawns nothing.
68
+ `oats schedule list` counts the triggers it does not list.
69
+ - A package may ship trigger templates (`triggers: [{ id, file }]` in
70
+ `oats-package.json`).
71
+ - `oats spawn --trigger-event <file>` is how a trigger hands the event to the
72
+ spawn.
73
+
74
+ ## Fixed
75
+
76
+ - **`--flag=value` is read.** Every kernel command ignored the inline form
77
+ silently: `oats spawn dev --harness=claude` spawned the default harness,
78
+ and `--name=x`, `--runtime=x`, `--dir=x` and `--server=x` were dropped the
79
+ same way. A kernel command now reads `--flag=value` exactly as
80
+ `--flag value`, with the same validation. The value is everything after the
81
+ first `=`. Two inline forms are refused with `E_BAD_ARGS`: an empty
82
+ `--flag=`, and a value on a switch. `--yolo=false` is refused and never
83
+ turns yolo on. A capability command's own flags are its provider's: they
84
+ are forwarded exactly as typed, and the kernel reads only its dispatch flag
85
+ (`--soul`) in either form. `oats capture`, `recall` and `setup` parse their
86
+ own arguments, as before. See
87
+ [desktop-cli-api.md § Flags](../desktop-cli-api.md#flags).
88
+ **On an older kernel:** use the spaced form.
89
+
90
+ - **`oats-local.yaml` `souls.disabled` is enforced at spawn.** It was documented
91
+ as "not run on this machine", but only counted souls in the `oats sync`
92
+ report. A listed soul is now refused with `E_SOUL_DISABLED { name,
93
+ qualifiedName, entry }`. An entry is a bare name (every soul of that name) or
94
+ a qualified name (`oats.okf/knowledge-harvester`, `<member>/<soul>`).
95
+
96
+ ## oats.okf 3.0.0 (catalog pin and bundled mirror)
97
+
98
+ The official catalog now pins `oats.okf` to `v3.0.0` (tag object `ad2349c7`,
99
+ commit `76f7ccdb`). The copy bundled in this package is its byte mirror. The
100
+ package declares `oats >=0.26.0`.
101
+
102
+ - **Knowledge is consulted remotely.** An instance reads its soul's knowledge
103
+ at the accepted state through new commands: `oats okf bases`, `index`,
104
+ `cat --base <alias> <path>`, `ls`, `links` and `search`. A Git base is served
105
+ from one host-wide partial clone per base, and a read refetches the accepted
106
+ branch once the cached commit is older than the `consult-max-age` setting
107
+ (seconds; default 300; `0` refetches on every read). `--fresh` always
108
+ refetches. If the fetch fails, the read is served from the cache, with
109
+ `stale: true` and the reason in its receipt.
110
+ A directory base is read in place. The new `okf-consultation` skill and the
111
+ okf injection teach instances to run `oats okf index` at the start of every
112
+ task.
113
+ - **BREAKING: no `./knowledge/` in homes.** A spawn records the accepted
114
+ resolution and materializes no `./knowledge/` directory or view. Anything
115
+ that read `<home>/knowledge/bases/<alias>/…` reads
116
+ `oats okf cat --base <alias> <path>` instead.
117
+ - **BREAKING: `oats okf refresh` is `E_REMOVED`.** There are no per-instance
118
+ views to refresh.
119
+ - **`oats okf read --path` still works** in 3.0.0, as an alias of `cat`.
120
+ - **Older homes:** a `./knowledge/` a 2.x spawn left in a home is not touched.
121
+ 3.0.0 ignores it, and `oats okf inspect` reports it as
122
+ `legacy-local-view`.
123
+ - The memory-harvest worker soul no longer ships a `CLAUDE.md -> AGENTS.md`
124
+ symlink (npm drops symlinks, and the kernel composes each home's
125
+ `CLAUDE.md`). The mirror check (`scripts/check-okf-mirror.mjs`) no longer
126
+ requires one; any symlink a future release ships is mirrored and verified
127
+ as before.
128
+
129
+ ## Desktop
130
+
131
+ - **Workspace v4 redesign** (#206): the Workspace area (Setup, Souls, Capabilities, the soul and capability pages) is rebuilt to the Workspace v4 design. Facts the kernel does not report yet are left out rather than guessed; the Setup screen no longer names kernel files.
132
+ - **Soul team labels** reach the Souls grid (#208).
133
+
134
+ ## Tests and CI
135
+
136
+ - A home's resolved view (`resolvedFromHome`) carrying the slot rows its
137
+ spawn recorded (`layers`, since 0.26.0 layers-from) is now pinned. Before,
138
+ no test caught reverting it to `{}`.
139
+ - CI runs the suite in six parallel shards (`node --test --test-shard`), plus a gate job with the old check name. Main runs no longer cancel each other.
140
+
141
+ ## Upgrading
142
+
143
+ - **okf 3.0.0 is breaking for anything that read `<home>/knowledge/`.** Use `oats okf cat`. Existing homes keep their old view, unused.
144
+ - **Package souls and triggers are additive.** Nothing changes until a package declares `souls:`/`triggers:`, or you add a trigger.
@@ -0,0 +1,240 @@
1
+ # OATS 0.29.0
2
+
3
+ ## Added
4
+
5
+ - **Workspace triggers and schedules** (feature `automations`). A trigger or a
6
+ schedule can now be declared in Git, in any confirmed member, and shared with the
7
+ team. It is named `<member>/<id>`, and a machine's own ones are named
8
+ `local/<id>`. See
9
+ [schedules.md#workspace-triggers-and-schedules](../schedules.md#workspace-triggers-and-schedules).
10
+ - Triggers and schedules stay separate:
11
+
12
+ | | triggers | schedules |
13
+ | --- | --- | --- |
14
+ | folder | `oats-triggers/` | `oats-schedules/` |
15
+ | file name anywhere in the member | `*.oats-trigger.yaml` | `*.oats-schedule.yaml` |
16
+ | `kind:` | `oats-trigger` | `oats-schedule` |
17
+ | commands and list | `oats trigger …` | `oats schedule …` |
18
+ | opt-out | `triggers.disabled` | `schedules.disabled` |
19
+
20
+ `oats-package/`, `.git/` and `node_modules/` are never scanned.
21
+ - Every file carries `kind`, `schemaVersion: 1`, `runsOn` (the host that runs it)
22
+ and `owner` (the GitHub account it acts as). The wrong kind is
23
+ `E_AUTOMATION_SCHEMA`, and a duplicate id is `E_AUTOMATION_DUPLICATE`.
24
+ - A host runs one only when `runsOn` is its new `oats-local.yaml` `host.name`
25
+ **and** its `gh` is logged in as `owner`. Otherwise the item is listed as
26
+ `assigned-elsewhere`, `owner-mismatch` or `host-unnamed`.
27
+ - `oats trigger disable <member>/<id>` and `oats schedule disable <member>/<id>`
28
+ stop it on this host without a commit, by writing `triggers.disabled` or
29
+ `schedules.disabled` in `oats-local.yaml`.
30
+ - `oats sync` takes a snapshot of them. The host tick reads the snapshot and
31
+ refreshes it every ten minutes (`oats automations refresh`).
32
+ - `oats trigger add … --workspace <member> --runs-on <host> --owner <host>/<login>`
33
+ writes the file in a checkout of the member, or prints it. `oats schedule add`
34
+ takes the same options.
35
+ - `oats trigger list --json` and `oats schedule list --json` answer the Desktop's
36
+ rows for both levels: the owner, where it runs and why (not), the soul and
37
+ where it comes from, the task verbatim, the event or cron, and the last and
38
+ next run. Local schedule rows keep their bare `id` and add `qualifiedId`. See
39
+ [desktop-cli-api.md](../desktop-cli-api.md).
40
+ - Each row's `origin` carries `url` (the file on GitHub at its commit) and
41
+ `localPath` (the file in this machine's clone of the member), each `null` when
42
+ there is none. Both lists carry `host.ghUser` (who `gh` is logged in as, per
43
+ GitHub host) and the host `scheduler`. "When it next runs" is `nextDue`
44
+ everywhere.
45
+ - **Desktop facts** (feature `desktop-facts`): kernel facts the Desktop's Workspace
46
+ view shows, so it never derives them. Every field is an addition. See
47
+ [desktop-cli-api.md](../desktop-cli-api.md#desktop-facts-feature-desktop-facts-oats-0290).
48
+ - `oats inspect --soul --json`: each capability's `composedFrom` (`workspace`,
49
+ `team:<label>` or `soul`), and `capabilitiesOff[]`, the defaults the soul
50
+ turned off (`<id>: off` or `<slot>: none`).
51
+ - `oats souls --json` rows: the default `harness`/`model` a spawn starts with,
52
+ and `spawnable` and `problem`, the refusal a spawn would meet (it spawns
53
+ nothing). Also `file`.
54
+ - `oats capabilities --json` rows: `layer` on package rows too, `description`,
55
+ `skills`/`commands`/`hooks` by name, `file`, and a member capability's `tree`
56
+ (its Git tree id).
57
+ - `oats workspace status --json`:
58
+ - the workspace and team `defaults` as rows;
59
+ - this computer's member `clones` and the rule that found each;
60
+ - `disabledSouls`;
61
+ - `lock` (`path`, `lockfileVersion`);
62
+ - `packages[].latest` when the shipped catalog has a newer version;
63
+ - file locations (`workspace.file`, `members[].url`,
64
+ `members[].membershipFile`).
65
+ - `oats status --json` instance rows: `startedAt` (the last start or restart),
66
+ `modelFrom` (also recorded in `instance.json`) and `identityAddress`. A member
67
+ module's drift `current` gains `version`.
68
+ - URLs are GitHub pages at the row's commit, `null` for any other host.
69
+ - `oats help` lists `spawn --provider`.
70
+ - **`oats schedule test <id>`**: where a schedule runs, whether its soul resolves
71
+ (a spawn preview) and when it is next due. It spawns nothing, like
72
+ `oats trigger test`.
73
+ - **`launchConfig`** on a trigger's `spawn` and on a spawn schedule: the soul starts
74
+ on that launch configuration of the running host (`oats-local.yaml`
75
+ `launch-configs`). A package trigger template can expose it as a parameter.
76
+ - `oats trigger status --json` rows add `nextDue`, `concurrency` and `liveCount`;
77
+ `oats trigger test --json` `wouldFire` items add `repo`.
78
+ - **`OATS_SETTINGS_ORIGINS`** beside `OATS_SETTINGS`, for every hook and
79
+ capability command (and readiness probes): where each leaf of the payload came
80
+ from, a JSON pointer → `{ kind, at }` (`manifest-default`, `workspace`, `soul`,
81
+ `host`, `spawn`). A provider can tell a soul-set value from a host-set one
82
+ without reading `soul.yaml`. `instance.json` records it with the settings
83
+ (`capabilities[].settingsOrigins`, `capabilityRuntime[].settingsOrigins`).
84
+
85
+ ## Changed
86
+
87
+ - **oats.framework 1.3.0 pinned.** The official catalog pins `oats.framework` to
88
+ `oats-framework/v1.3.0` (this repository's workspace pins it too). 0.28.1 was never
89
+ released, so this pin covers three framework releases:
90
+ - **1.2.0:** the setup-admin skills. oats.setup 2.1.0 adds `oats-setup-model`,
91
+ `oats-workspace-config`, `oats-teams`, `oats-automations` and a setup inject,
92
+ and oats.core 2.1.0 is current for an instance's view. The `oats-setup-admin`
93
+ soul uses them.
94
+ - **1.2.1:** OKF knowledge operations in onboarding (oats.setup 2.1.1,
95
+ `oats-onboarding`).
96
+ - **1.3.0:** `knowledge-theory-expert` is a package soul
97
+ (`oats spawn oats.framework/knowledge-theory-expert`), with
98
+ oats.knowledge-theory 1.1.0.
99
+
100
+ A workspace picks it up by pinning `oats.framework: v1.3.0` and running
101
+ `oats sync`.
102
+ - **A local trigger's id is `local/<id>`** in `oats trigger` rows, in its dedup keys
103
+ and state, and in a triggered instance's `instance.json.trigger.id` and event
104
+ file. It was the bare id in 0.28.0. Every `oats trigger` verb still accepts the
105
+ bare id.
106
+
107
+ ## Removed
108
+
109
+ - **BREAKING: capability-defined agents.** A capability manifest's `agents:` is
110
+ refused at resolution, with
111
+ `E_CAPABILITY_AGENTS_REMOVED { capability, agents, from }`. The remedy names the
112
+ replacement: a **package soul** (`souls/<name>/` in the package, spawned as
113
+ `oats spawn <package>/<name>`) or a **member soul**. `oats spawn <name>` no
114
+ longer falls back to an agent declared by a materialized or locked module; an
115
+ unknown name is `E_SOUL_UNKNOWN`. The manifest schema drops `agents`.
116
+ - A home an earlier kernel spawned for one (its agent directory holds only
117
+ `instances/`) is still listed by `oats status`, may be a `--parent`, and
118
+ retires. Nothing creates one any more.
119
+ - This repository's users moved:
120
+ - oats.okf 4.0.0's harvester is a package soul;
121
+ - the post-commit **`reviewer`** is an oats.dev **1.1.0** package soul
122
+ (`oats.dev/reviewer`, beside oats.review 1.3.0; the pin moves to
123
+ `v1.1.0`), and oats.review's inject spawns it unchanged, now named
124
+ `oats-dev-reviewer-<short-sha>`;
125
+ - **`knowledge-theory-expert`** is an oats.framework **1.3.0** package soul
126
+ (`oats spawn oats.framework/knowledge-theory-expert`), with
127
+ oats.knowledge-theory 1.1.0.
128
+ - A v2 soul.yaml declares no harness or model, so the reviewer's harness and
129
+ model now come from the **spawner's launch configuration** (its former pin was
130
+ pi, gpt-5.6-sol).
131
+
132
+ ## Fixed
133
+
134
+ - A package soul's derived instance name is checked and de-duplicated as the name
135
+ the home gets (`acme-pkg-keeper-<purpose>`, not `acme-pkg--keeper-…`). A
136
+ purpose inside the limit is no longer refused, and a second spawn with the same
137
+ purpose is `…-2` instead of a collision. An over-long purpose is
138
+ `E_INSTANCE_NAME_INVALID` naming how many characters the purpose may have
139
+ (`details.maxPurpose`).
140
+
141
+ - Concurrent spawns of the same instance: a spawn that loses the race now refuses
142
+ with `E_PLACEMENT_TAKEN` (it created nothing). It used to fail with an uncoded
143
+ "instance already exists" error, surfaced as `E_SPAWN_FAILED`.
144
+ - Disabled-here messages name the per-kind key (`triggers.disabled`,
145
+ `schedules.disabled`).
146
+
147
+ ## Desktop
148
+
149
+ - **Schedules and Triggers tabs** on the automations contract. Rows are grouped by
150
+ where they run: on this computer, needing attention here, or elsewhere. Workspace
151
+ and local items are listed together, with an origin chip, a filter and a search.
152
+ - Each row has an on-here switch, the soul and where it comes from, the cron in
153
+ words or the trigger's event, and where it runs and as whom. It also shows the
154
+ last and next run, and a menu (Open, Test, Run now, on/off here, Open file).
155
+ - A row opens a detail page: the prompt verbatim, the schedule or event, recent
156
+ runs, the kernel's placement verdict, where it comes from, and the test result.
157
+ - The old Schedules read path is gone.
158
+ - **Why each capability is there.** The soul page and an instance's soul tab tag
159
+ each capability `workspace`, `team · <label>` or `soul`, and list the defaults the
160
+ soul turned off (including a slot it emptied), from the kernel's Desktop facts.
161
+ - **A moved module names its versions**: "moved 2.1.5 → 2.2.0" in the instance
162
+ panel's module drift.
163
+ - The Desktop accepts OATS CLIs `>=0.25.8 <0.30.0`.
164
+
165
+ ## Internal
166
+
167
+ - The release workflow runs the test suite in six parallel shards, like PR CI, and
168
+ publication waits for every shard.
169
+
170
+ ## Upgrading from 0.28
171
+
172
+ > **0.29.0 and oats.okf 4.0.0 move in lockstep.** On kernel 0.29.0, oats.okf ≤3.x
173
+ > is refused because it declares a capability agent, and oats.okf 4.0.0 requires
174
+ > kernel 0.29.0. A deployment on okf 3.x therefore **stays on kernel 0.28 until it
175
+ > moves its pins**. It then upgrades in one sitting, in this order:
176
+
177
+ 1. **Upgrade the kernel**: the npm package, the pi adapter and the Desktop, all
178
+ 0.29.0.
179
+ 2. **Move the pins** to the official catalog's: `oats.okf: v4.0.0`,
180
+ `oats.dev: v1.1.0`, `oats.framework: v1.3.0`.
181
+ 3. **Run `oats sync`.**
182
+
183
+ Between step 1 and step 3, a package pinned below its 0.29 release still declares
184
+ `agents:`. A spawn, preview or `inspect --soul` of any soul that composes it
185
+ refuses with `E_CAPABILITY_AGENTS_REMOVED`:
186
+ - **oats.okf ≤3.x** (`memory-harvest`): this is **every soul with oats.okf in its
187
+ knowledge slot**;
188
+ - **oats.dev 1.0.x** (`reviewer`);
189
+ - **oats.framework ≤1.2.x** (`knowledge-theory-expert`).
190
+
191
+ Harvest is off by default in okf 4.0.0. Switch it on
192
+ (`oats okf setup --harvest on`) where you want it.
193
+
194
+ Homes spawned earlier keep loading their recorded modules. Homes spawned for a
195
+ capability agent stay listed and retirable.
196
+
197
+ ## oats.okf 4.0.0 (catalog pin and bundled mirror)
198
+
199
+ The official catalog now pins `oats.okf` to `v4.0.0` (tag object `239f2885`,
200
+ commit `1f0ba12f`). The copy bundled in this package is its byte mirror.
201
+
202
+ **BREAKING:**
203
+ - The package requires `oats >=0.29.0`; an older kernel refuses it
204
+ (`E_CAPABILITY_INCOMPATIBLE`).
205
+ - The `okf` and `memory-harvest` skills are gone from `oats.okf`.
206
+
207
+ - **Three capabilities.** The package now exports:
208
+ - `oats.okf`: the knowledge slot;
209
+ - `oats.okf-harvest`: the harvester's completion and status commands;
210
+ - `oats.okf-maintenance`: the maintainer's review context.
211
+
212
+ The catalog maps `oats.okf-harvest` and `oats.okf-maintenance` to the
213
+ `oats.okf` package.
214
+ - **Working souls get two skills and the inject.** A soul with `oats.okf` in
215
+ its knowledge slot gets `okf-consultation` and `okf-instance-knowledge`, and
216
+ the okf inject.
217
+ - **The harvester is a package soul.** `oats okf run-source` (and `oats okf
218
+ harvest`) spawns `oats.okf/knowledge-harvester`. It is named
219
+ `okf-harvester-<run>` and homes under
220
+ `agents/oats-okf--knowledge-harvester/`. It is no longer the `memory-harvest`
221
+ capability agent. After a successful completion it stays alive in the `okf`
222
+ team until its PR is merged or closed. `oats.okf/knowledge-maintainer` is the
223
+ package's second soul.
224
+ - **The harvest-review trigger.** The package ships the trigger template
225
+ `harvest-review` (`triggers/harvest-review.json`). It watches the labelled
226
+ harvest PRs.
227
+ - **`harvest: on|off`** (default **off**). Harvest is a host switch in
228
+ `oats-local.yaml` `settings.oats.okf.harvest` (`oats okf setup --harvest
229
+ on|off`). Off means no source registration, capture or custody. A soul can
230
+ only opt out (`knowledge: { harvest: off }`).
231
+ - **`oats okf read` is removed** (`E_REMOVED`). Use `oats okf cat --base
232
+ <alias> <path>`, which takes the same path and gives the same text and
233
+ receipt.
234
+
235
+ The bundled mirror now covers the three capability directories
236
+ (`capabilities/oats-okf`, `capabilities/oats-okf-harvest`,
237
+ `capabilities/oats-okf-maintenance`). The package's souls and trigger are
238
+ checked byte for byte in `scripts/okf-source-inventory.json` (schemaVersion 2).
239
+ The npm package does not ship them, because the kernel reads a package's souls
240
+ and triggers from Git at its locked commit.