@awebai/oats 0.29.4 → 0.30.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (263) hide show
  1. package/README.md +12 -6
  2. package/bin/oats.mjs +194 -50
  3. package/docs/capabilities.md +160 -171
  4. package/docs/capability-manifest.schema.json +6 -11
  5. package/docs/configuration.md +213 -64
  6. package/docs/design/2026-09-16-knowledge-capability-contract.md +36 -50
  7. package/docs/design/2026-09-23-workspace-module-contracts.md +377 -544
  8. package/docs/design/2026-09-26-okf-knowledge-operations.md +132 -357
  9. package/docs/design/2026-09-27-team-model-v2.md +97 -117
  10. package/docs/design/2026-09-28-automations-trust.md +38 -0
  11. package/docs/design/2026-09-28-soul-launch-preference.md +63 -0
  12. package/docs/design/HISTORY.md +65 -0
  13. package/docs/design/README.md +23 -54
  14. package/docs/desktop-cli-api.md +1787 -1777
  15. package/docs/desktop.md +30 -91
  16. package/docs/execution-targets.md +146 -292
  17. package/docs/first-team.md +31 -17
  18. package/docs/implementation.md +77 -288
  19. package/docs/integrations.md +118 -320
  20. package/docs/knowledge-capability-authoring.md +25 -52
  21. package/docs/knowledge-reference/acceptance.md +3 -3
  22. package/docs/knowledge-reference/adoption.md +1 -1
  23. package/docs/knowledge-reference/harvester.md +2 -2
  24. package/docs/knowledge-reference/package-craft.md +3 -3
  25. package/docs/knowledge-reference/provider-mapping.md +3 -6
  26. package/docs/knowledge-reference/reader-capture.md +3 -3
  27. package/docs/knowledge-theory.md +62 -166
  28. package/docs/knowledge.md +225 -404
  29. package/docs/layers.md +42 -97
  30. package/docs/oats-local.schema.json +58 -5
  31. package/docs/oats-membership.schema.json +1 -8
  32. package/docs/oats-package.schema.json +5 -5
  33. package/docs/oats-workspace.schema.json +8 -22
  34. package/docs/official-catalog.md +25 -28
  35. package/docs/packages.md +45 -63
  36. package/docs/plans/0.30-close-out.md +83 -0
  37. package/docs/release-lane.md +82 -0
  38. package/docs/release-notes/oats-framework-v1.1.3.md +10 -8
  39. package/docs/release-notes/v0.19.0.md +48 -147
  40. package/docs/release-notes/v0.19.1.md +2 -3
  41. package/docs/release-notes/v0.19.3.md +2 -15
  42. package/docs/release-notes/v0.20.0.md +0 -15
  43. package/docs/release-notes/v0.22.0.md +71 -138
  44. package/docs/release-notes/v0.22.1.md +42 -90
  45. package/docs/release-notes/v0.22.10.md +1 -1
  46. package/docs/release-notes/v0.22.11.md +1 -47
  47. package/docs/release-notes/v0.22.12.md +4 -13
  48. package/docs/release-notes/v0.22.13.md +1 -42
  49. package/docs/release-notes/v0.22.14.md +3 -11
  50. package/docs/release-notes/v0.22.15.md +1 -46
  51. package/docs/release-notes/v0.22.16.md +6 -8
  52. package/docs/release-notes/v0.22.18.md +1 -99
  53. package/docs/release-notes/v0.22.19.md +3 -14
  54. package/docs/release-notes/v0.22.2.md +6 -15
  55. package/docs/release-notes/v0.22.3.md +0 -1
  56. package/docs/release-notes/v0.22.4.md +1 -14
  57. package/docs/release-notes/v0.22.5.md +2 -12
  58. package/docs/release-notes/v0.22.6.md +0 -3
  59. package/docs/release-notes/v0.23.0.md +9 -25
  60. package/docs/release-notes/v0.23.1.md +9 -25
  61. package/docs/release-notes/v0.23.2.md +2 -4
  62. package/docs/release-notes/v0.24.0.md +56 -97
  63. package/docs/release-notes/v0.24.1.md +7 -11
  64. package/docs/release-notes/v0.24.10.md +34 -45
  65. package/docs/release-notes/v0.24.11.md +12 -20
  66. package/docs/release-notes/v0.24.12.md +35 -48
  67. package/docs/release-notes/v0.24.13.md +34 -41
  68. package/docs/release-notes/v0.24.2.md +9 -13
  69. package/docs/release-notes/v0.24.3.md +7 -11
  70. package/docs/release-notes/v0.24.4.md +6 -6
  71. package/docs/release-notes/v0.24.5.md +6 -10
  72. package/docs/release-notes/v0.24.6.md +2 -5
  73. package/docs/release-notes/v0.24.7.md +46 -75
  74. package/docs/release-notes/v0.24.8.md +58 -96
  75. package/docs/release-notes/v0.24.9.md +38 -54
  76. package/docs/release-notes/v0.25.0.md +59 -76
  77. package/docs/release-notes/v0.25.1.md +57 -81
  78. package/docs/release-notes/v0.25.2.md +51 -70
  79. package/docs/release-notes/v0.25.3.md +11 -13
  80. package/docs/release-notes/v0.25.4.md +9 -13
  81. package/docs/release-notes/v0.25.5.md +3 -5
  82. package/docs/release-notes/v0.25.6.md +20 -29
  83. package/docs/release-notes/v0.25.7.md +5 -7
  84. package/docs/release-notes/v0.25.8.md +26 -39
  85. package/docs/release-notes/v0.26.0.md +175 -646
  86. package/docs/release-notes/v0.27.0.md +4 -5
  87. package/docs/release-notes/v0.27.1.md +4 -6
  88. package/docs/release-notes/v0.27.2.md +1 -1
  89. package/docs/release-notes/v0.28.0.md +57 -124
  90. package/docs/release-notes/v0.29.0.md +89 -208
  91. package/docs/release-notes/v0.29.1.md +1 -1
  92. package/docs/release-notes/v0.29.2.md +3 -4
  93. package/docs/release-notes/v0.30.0.md +205 -0
  94. package/docs/release-notes/v0.30.1.md +123 -0
  95. package/docs/schedules.md +280 -363
  96. package/docs/servers.md +99 -117
  97. package/docs/soul.schema.json +2 -9
  98. package/docs/souls-and-instances.md +145 -158
  99. package/docs/workspaces.md +137 -215
  100. package/lib/automations.mjs +21 -6
  101. package/lib/core.mjs +226 -74
  102. package/lib/instance-events.mjs +1 -1
  103. package/lib/instance-inspect.mjs +109 -34
  104. package/lib/instance-lifecycle.mjs +14 -1
  105. package/lib/instance-resolution.mjs +26 -27
  106. package/lib/launch-preference.mjs +87 -0
  107. package/lib/materialize.mjs +3 -3
  108. package/lib/packages.mjs +1 -1
  109. package/lib/resolve.mjs +30 -88
  110. package/lib/schedule.mjs +1 -1
  111. package/lib/teams-verbs.mjs +195 -0
  112. package/lib/teams.mjs +190 -0
  113. package/lib/triggers.mjs +2 -2
  114. package/lib/workspace.mjs +54 -147
  115. package/package-catalog.json +10 -16
  116. package/package.json +1 -3
  117. package/skills/oats-getting-started/SKILL.md +25 -13
  118. package/capabilities/oats-authoring/LICENSE +0 -21
  119. package/capabilities/oats-authoring/oats-package.json +0 -11
  120. package/capabilities/oats-authoring/oats.json +0 -12
  121. package/capabilities/oats-authoring/skills/integration-authoring/SKILL.md +0 -84
  122. package/capabilities/oats-authoring/skills/skill-craft/SKILL.md +0 -109
  123. package/capabilities/oats-authoring/skills/soul-craft/SKILL.md +0 -116
  124. package/capabilities/oats-aweb/bin/oats-aweb-binding.mjs +0 -11
  125. package/capabilities/oats-aweb/bin/oats-aweb.mjs +0 -1338
  126. package/capabilities/oats-aweb/injects/aweb.md +0 -47
  127. package/capabilities/oats-aweb/lib/binding-wire.mjs +0 -356
  128. package/capabilities/oats-aweb/lib/captured-execution.mjs +0 -91
  129. package/capabilities/oats-aweb/lib/captured-native.mjs +0 -91
  130. package/capabilities/oats-aweb/lib/grant-custody.mjs +0 -38
  131. package/capabilities/oats-aweb/lib/invocation-shape.mjs +0 -135
  132. package/capabilities/oats-aweb/lib/portable-binding.mjs +0 -146
  133. package/capabilities/oats-aweb/lib/session-readiness.mjs +0 -56
  134. package/capabilities/oats-aweb/lib/wake-receive.mjs +0 -56
  135. package/capabilities/oats-aweb/oats.json +0 -208
  136. package/capabilities/oats-aweb/skills/LICENSE +0 -21
  137. package/capabilities/oats-aweb/skills/VENDORED.md +0 -31
  138. package/capabilities/oats-aweb/skills/aweb-identity/SKILL.md +0 -201
  139. package/capabilities/oats-aweb/skills/aweb-messaging/SKILL.md +0 -161
  140. package/capabilities/oats-aweb/skills/aweb-messaging/references/messaging-scenarios.md +0 -61
  141. package/capabilities/oats-aweb/skills/aweb-team-membership/SKILL.md +0 -116
  142. package/capabilities/oats-aweb/skills/aweb-team-membership/references/team-membership-reference.md +0 -74
  143. package/capabilities/oats-aweb/skills/oats-aweb/SKILL.md +0 -216
  144. package/capabilities/oats-jira/bin/oats-jira.mjs +0 -40
  145. package/capabilities/oats-jira/injects/jira.md +0 -10
  146. package/capabilities/oats-jira/oats.json +0 -22
  147. package/capabilities/oats-jira/skills/jira-tasks/SKILL.md +0 -179
  148. package/capabilities/oats-linear/bin/oats-linear-hook.mjs +0 -34
  149. package/capabilities/oats-linear/bin/oats-linear.mjs +0 -344
  150. package/capabilities/oats-linear/injects/linear.md +0 -8
  151. package/capabilities/oats-linear/oats.json +0 -24
  152. package/capabilities/oats-linear/skills/linear-tasks/SKILL.md +0 -223
  153. package/capabilities/oats-okf/bin/oats-okf-binding.mjs +0 -14
  154. package/capabilities/oats-okf/bin/oats-okf.mjs +0 -209
  155. package/capabilities/oats-okf/injects/okf.md +0 -42
  156. package/capabilities/oats-okf/lib/binding-wire.mjs +0 -348
  157. package/capabilities/oats-okf/lib/captured-worker.mjs +0 -109
  158. package/capabilities/oats-okf/lib/config.mjs +0 -124
  159. package/capabilities/oats-okf/lib/consult.mjs +0 -518
  160. package/capabilities/oats-okf/lib/harvest-status.mjs +0 -88
  161. package/capabilities/oats-okf/lib/harvest-switch.mjs +0 -94
  162. package/capabilities/oats-okf/lib/inspection.mjs +0 -119
  163. package/capabilities/oats-okf/lib/invocation-context.mjs +0 -111
  164. package/capabilities/oats-okf/lib/invocation-shape.mjs +0 -135
  165. package/capabilities/oats-okf/lib/io.mjs +0 -118
  166. package/capabilities/oats-okf/lib/migration.mjs +0 -137
  167. package/capabilities/oats-okf/lib/okf-validate.mjs +0 -123
  168. package/capabilities/oats-okf/lib/portable-binding.mjs +0 -199
  169. package/capabilities/oats-okf/lib/source-contract.mjs +0 -46
  170. package/capabilities/oats-okf/lib/sources.mjs +0 -424
  171. package/capabilities/oats-okf/lib/stores.mjs +0 -473
  172. package/capabilities/oats-okf/lib/worker.mjs +0 -497
  173. package/capabilities/oats-okf/oats.json +0 -148
  174. package/capabilities/oats-okf/schemas/okf-base.schema.json +0 -46
  175. package/capabilities/oats-okf/schemas/okf-bindings.schema.json +0 -112
  176. package/capabilities/oats-okf/schemas/okf-portable-declaration.schema.json +0 -87
  177. package/capabilities/oats-okf/schemas/okf-portable-payload.schema.json +0 -113
  178. package/capabilities/oats-okf/schemas/okf-soul.schema.json +0 -37
  179. package/capabilities/oats-okf/skills/okf-consultation/SKILL.md +0 -144
  180. package/capabilities/oats-okf/skills/okf-consultation/references/consult.md +0 -86
  181. package/capabilities/oats-okf/skills/okf-instance-knowledge/SKILL.md +0 -104
  182. package/capabilities/oats-okf-harvest/bin/okf-harvest.mjs +0 -140
  183. package/capabilities/oats-okf-harvest/injects/harvester.md +0 -12
  184. package/capabilities/oats-okf-harvest/oats.json +0 -26
  185. package/capabilities/oats-okf-harvest/skills/knowledge-harvest/SKILL.md +0 -168
  186. package/capabilities/oats-okf-harvest/skills/knowledge-theory/SKILL.md +0 -192
  187. package/capabilities/oats-okf-harvest/skills/okf-authoring/SKILL.md +0 -151
  188. package/capabilities/oats-okf-harvest/skills/okf-authoring/scripts/okf-validate.mjs +0 -123
  189. package/capabilities/oats-okf-maintenance/bin/okf-maintenance.mjs +0 -170
  190. package/capabilities/oats-okf-maintenance/injects/maintainer.md +0 -12
  191. package/capabilities/oats-okf-maintenance/lib/provenance.mjs +0 -50
  192. package/capabilities/oats-okf-maintenance/oats.json +0 -21
  193. package/capabilities/oats-okf-maintenance/skills/knowledge-review/SKILL.md +0 -159
  194. package/capabilities/oats-okf-maintenance/skills/knowledge-theory/SKILL.md +0 -192
  195. package/capabilities/oats-okf-maintenance/skills/okf-authoring/SKILL.md +0 -151
  196. package/capabilities/oats-okf-maintenance/skills/okf-authoring/scripts/okf-validate.mjs +0 -123
  197. package/capabilities/oats-okf-maintenance/skills/okf-trigger-setup/SKILL.md +0 -146
  198. package/capabilities/oats-review/injects/review.md +0 -69
  199. package/capabilities/oats-review/oats.json +0 -10
  200. package/capabilities/oats-review/skills/code-review/SKILL.md +0 -44
  201. package/capabilities/oats-review/skills/security-review/SKILL.md +0 -59
  202. package/docs/conventions.md +0 -90
  203. package/docs/design/2026-09-07-architecture-reassessment.md +0 -131
  204. package/docs/design/2026-09-07-desktop-souls-capabilities.md +0 -50
  205. package/docs/design/2026-09-07-mobile-agent-management-proposal.md +0 -228
  206. package/docs/design/2026-09-08-expert-assisted-deployment-proposal.md +0 -558
  207. package/docs/design/2026-09-13-knowledge-and-memory-direction.md +0 -744
  208. package/docs/design/2026-09-13-knowledge-implementation.md +0 -127
  209. package/docs/design/2026-09-13-knowledge-location-contract.md +0 -340
  210. package/docs/design/2026-09-14-artifact-retention-contract.md +0 -190
  211. package/docs/design/2026-09-14-portable-souls-and-git-workspaces.md +0 -708
  212. package/docs/design/2026-09-14-portable-souls-contract-amendments.md +0 -85
  213. package/docs/design/2026-09-14-portable-souls-explainer.md +0 -750
  214. package/docs/design/2026-09-15-captured-dispatch.md +0 -127
  215. package/docs/design/2026-09-15-captured-resolution-records.md +0 -143
  216. package/docs/design/2026-09-15-package-preparation.md +0 -100
  217. package/docs/design/2026-09-15-portable-data-contract.md +0 -121
  218. package/docs/design/2026-09-15-portable-declarations.md +0 -189
  219. package/docs/design/2026-09-15-portable-souls-handoff.md +0 -150
  220. package/docs/design/2026-09-15-portable-souls-implementation.md +0 -417
  221. package/docs/design/2026-09-15-selection-lock-and-approval.md +0 -122
  222. package/docs/design/2026-09-15-source-observation.md +0 -119
  223. package/docs/design/2026-09-16-captured-admission.md +0 -77
  224. package/docs/design/2026-09-16-captured-helper-dispatch.md +0 -105
  225. package/docs/design/2026-09-16-captured-launch-inputs.md +0 -42
  226. package/docs/design/2026-09-16-command-profile-preparation.md +0 -86
  227. package/docs/design/2026-09-16-fresh-install-first-rollout.md +0 -47
  228. package/docs/design/2026-09-16-fresh-operator-walkthrough.md +0 -282
  229. package/docs/design/2026-09-16-messaging-capability-contract.md +0 -59
  230. package/docs/design/2026-09-16-portable-migration-evidence.md +0 -158
  231. package/docs/design/2026-09-16-portable-onboarding.md +0 -179
  232. package/docs/design/2026-09-16-prepare-request-transport.md +0 -26
  233. package/docs/design/2026-09-16-provider-binding-codecs.md +0 -98
  234. package/docs/design/2026-09-16-provider-binding-wire.md +0 -274
  235. package/docs/design/2026-09-17-capability-helper-input-contract.md +0 -95
  236. package/docs/design/2026-09-17-captured-backend-parity.md +0 -53
  237. package/docs/design/2026-09-17-captured-native-start.md +0 -58
  238. package/docs/design/2026-09-17-portable-boundary-hookup.md +0 -19
  239. package/docs/design/2026-09-17-portable-boundary-resources.md +0 -52
  240. package/docs/design/2026-09-17-public-captured-start.md +0 -108
  241. package/docs/design/2026-09-17-public-prepare-request.md +0 -90
  242. package/docs/design/2026-09-18-captured-pi-host.md +0 -205
  243. package/docs/design/2026-09-18-first-cut-release-checklist.md +0 -131
  244. package/docs/design/2026-09-18-herdr-protocol-compatibility.md +0 -60
  245. package/docs/design/2026-09-20-redesign-program-board.md +0 -142
  246. package/docs/design/2026-09-20-workspace-and-portable-adoption-plan.md +0 -289
  247. package/docs/design/2026-09-20-workspace-onboarding-public.md +0 -207
  248. package/docs/design/2026-09-22-desktop-parity-seams.md +0 -58
  249. package/docs/design/2026-09-23-simplified-workspace-model.md +0 -711
  250. package/docs/design/2026-09-23-workspace-v2-implementation-plan.md +0 -65
  251. package/docs/design/2026-09-24-desktop-phase-f-boundary.md +0 -242
  252. package/docs/design/2026-09-24-phase-d-plan.md +0 -305
  253. package/docs/design/2026-09-25-teams-contract.md +0 -258
  254. package/docs/design/2026-09-26-desktop-design-brief-architecture.md +0 -241
  255. package/docs/design/desktop-ux-plan.md +0 -362
  256. package/docs/design/launch-configurations.md +0 -168
  257. package/docs/design/okf-mirror-provenance.md +0 -105
  258. package/docs/design/operations-contract.md +0 -141
  259. package/docs/oats-member.schema.json +0 -38
  260. package/skills/integration-authoring/SKILL.md +0 -84
  261. package/skills/oats-support/SKILL.md +0 -79
  262. package/skills/skill-craft/SKILL.md +0 -109
  263. package/skills/soul-craft/SKILL.md +0 -116
package/docs/knowledge.md CHANGED
@@ -1,101 +1,59 @@
1
- # Knowledge — layer 2
1
+ # Knowledge
2
2
 
3
- For the canonical design, defaults and alternatives, start with
4
- [Knowledge, instances and evolving expertise](knowledge-theory.md). This page is
5
- an operational guide to the version-scoped OKF implementation below, not a universal
6
- knowledge layout or learning policy. The default direction is centralised per-soul
7
- knowledge; other capabilities may provide different procedures and placements,
8
- including co-location, without writing into a home's read-only module copies.
3
+ The **knowledge slot** gives a working soul durable, reviewed expertise:
4
+ decisions and their rationale, rejected alternatives, discovered limits. The
5
+ kernel owns the slot, its configuration and command dispatch; the capability
6
+ that fills it owns the format, the instructions and how knowledge is promoted.
7
+ The model is in [Knowledge, instances and evolving expertise](knowledge-theory.md).
9
8
 
10
- Specialization is accumulated judgment: decisions and rationale, rejected
11
- alternatives, discovered limits, and maintained context that changes what a
12
- future instance does. It is not a second description of the code.
9
+ This page is the operator guide for the default filler, the `oats.okf` package.
10
+ Its runtime internals (custody, publication, locks) are in the
11
+ [oats-okf README](https://github.com/awebai/oats-okf).
13
12
 
14
- OATS keeps knowledge pluggable. The kernel supplies lifecycle, configuration,
15
- trusted command dispatch and independent execution; each knowledge capability
16
- owns its format, reader/capture instructions, judgment and delivery. The
17
- [reference theory](knowledge-theory.md) and [authoring guide](knowledge-capability-authoring.md)
18
- are optional author resources, not mandatory runtime policy.
13
+ | Surface | What it holds |
14
+ |---|---|
15
+ | Accepted bases (Git or directory) | Soul knowledge: OKF concepts in nodes, each node owned by one soul. |
16
+ | `souls/<name>/okf.json` | The nodes the soul owns and reads. |
17
+ | Instance home: `STATE.md`, `log.md`, `notes/` | Instance knowledge. |
18
+ | The bindings file and its `stateDir` | Where each base lives on this machine; durable harvest evidence. |
19
19
 
20
- > **Version scope:** this guide describes published **oats.okf 2.0.0**, requiring
21
- > the published OATS >=0.23.0 kernel. Framework v0.23.1 integrates its catalog
22
- > and mirror; publishing packages does not activate or deploy them automatically.
23
- > See [release notes](release-notes/v0.23.1.md).
20
+ ## Setup
24
21
 
25
- ## What lives where
22
+ ### Pin and select the package
26
23
 
27
- | Surface | Purpose |
28
- |---|---|
29
- | `soul/AGENTS.md`, `soul/skills/` | Curated specialist identity and procedures, reviewed as soul artifacts. |
30
- | `soul/okf.json` | Stable owner ID and external `owns`/`reads` node references; no knowledge bytes. |
31
- | External accepted bases | Durable OKF knowledge, either Git PR-only or a recoverable plain directory. |
32
- | Instance `knowledge/` | Immutable accepted reader snapshot with `view.json` and `bases/<alias>/`. |
33
- | Instance `STATE.md`, `log.md`, `notes/` | Rewritable task state, append-only milestones and captured insights. |
34
- | External `stateDir` | Durable per-source evidence, frozen descriptors, runs, proposals and receipts. |
35
- | Worker `work/` | Independent directory execution with staged bases and explicit judgment. |
36
-
37
- The turn record is episodic evidence, not accepted expertise. OKF captures both
38
- notes **and** attributed record content, then judges them separately from capture.
39
- V2 never automatically edits soul skills; a procedure candidate may become an
40
- external Playbook for separate human review.
41
-
42
- ## Acquire, bind and provision explicitly
43
-
44
- The authoritative distribution is [awebai/oats-okf](https://github.com/awebai/oats-okf),
45
- whose `oats-package/oats-package.json` exports exactly
46
- `oats-package/capabilities/oats-okf/`. The framework's `capabilities/oats-okf/`
47
- is a bundled mirror, **not a self-contained Git distribution in the npm
48
- artifact**: npm drops the source worker's `CLAUDE.md -> AGENTS.md` symlink.
49
- Acquire the catalog Git payload; do not install a copied npm mirror as a local
50
- package or repair missing aliases in installed artifacts.
51
-
52
- Under the 0.25 workspace model OKF is a **package**: pin it once in the
53
- workspace file, let `oats sync` resolve, verify and lock it, and let every soul that
54
- fills the knowledge slot say (or inherit) `oats.okf: { from: package }`.
55
- Operator-level `oats okf` commands run from the deployment directory with
56
- `--soul <name>` (an explicit `--soul` does not override an invoking instance's
57
- saved settings — use a clean shell). The pinned version resolves through the
58
- official catalog:
24
+ The workspace pins the package and fills the slot for every soul by default:
59
25
 
60
26
  ```yaml
61
- # oats-workspace.yaml
27
+ # oats-workspace.yaml (excerpt)
62
28
  packages:
63
- oats.okf: v2.1.3
29
+ oats.okf: v4.0.5
64
30
  defaults:
65
31
  knowledge: { oats.okf: { from: package } }
32
+ stores:
33
+ org: git:github.com/acme/knowledge
34
+ ```
66
35
 
67
- # souls/domain-expert/soul.yaml — nothing under knowledge: for oats.okf; the default fills the slot.
68
- # What the soul owns/reads is souls/domain-expert/okf.json (below), not a soul.yaml payload.
69
- # A soul-true binding setting is the one thing the payload may carry, e.g.:
70
- knowledge:
71
- harvest-runtime: claude
36
+ - `oats sync` locks the pin. `oats spawn <soul> --preview --json` shows the
37
+ module a soul resolves and its merged `settings.oats.okf`.
38
+ - A soul without knowledge says `knowledge: none`.
39
+ - `stores:` names the workspace's knowledge repositories; the kernel validates
40
+ them as repo refs. oats.okf does not read `stores:`: the bindings file says
41
+ where each base lives.
72
42
 
73
- # oats-local.yaml (this machine)
43
+ Each machine points the package at its bindings file in `oats-local.yaml`:
44
+
45
+ ```yaml
46
+ # oats-local.yaml (excerpt)
74
47
  settings:
75
48
  oats.okf:
76
- bindings-file: /absolute/config/okf-bindings.json
77
- state-dir: /absolute/state/okf
49
+ bindings-file: /Users/ana/.oats/okf-bindings.json
50
+ state-dir: /Users/ana/.oats/okf
78
51
  ```
79
52
 
80
- ```bash
81
- oats sync # resolves v2.1.3 to a commit, verifies its integrity, writes the lock
82
- oats spawn domain-expert --preview --json # the exact oats.okf module (package, version, commit) + settings.oats.okf (the merged payload)
83
- ```
84
-
85
- Pinning activates nothing by itself: the soul's `okf.json` must exist and the
86
- merged payload (soul `knowledge:` ⊕ `settings.oats.okf` ⊕ `--provider`) must be
87
- bindable — it may carry **only** the four settings below (`bindings-file`,
88
- `state-dir`, `harvest-runtime`, `harvest-model`); `owns`/`reads`/`root` on the
89
- soul payload are refused by 2.1.3, not read. The lock stays exact until the
90
- workspace bumps `packages.oats.okf`; v1 operators must plan migration before
91
- that bump. Executable changes come with a new version, reviewed as a new pin. A
92
- service worker need not itself fill the knowledge slot (`knowledge: none`).
93
-
94
53
  ### Bindings document
95
54
 
96
- `bindings-file` must be an **absolute path**. Its capability-owned JSON is not a
97
- new kernel configuration schema. Paths inside it resolve relative to the file's
98
- directory, not the current working directory:
55
+ Capability-owned JSON at an absolute path; relative paths inside it resolve
56
+ from its own directory:
99
57
 
100
58
  ```json
101
59
  {
@@ -110,375 +68,238 @@ directory, not the current working directory:
110
68
  "repository": "https://github.com/example/project.git",
111
69
  "root": "knowledge",
112
70
  "acceptedBranch": "main",
113
- "pr": {"repository": "example/project"}
71
+ "pr": { "repository": "example/project" }
114
72
  },
115
- "team": {
116
- "id": "team-knowledge",
117
- "kind": "directory",
118
- "path": "../team-knowledge"
119
- }
73
+ "team": { "id": "team-knowledge", "kind": "directory", "path": "../team-knowledge" }
120
74
  }
121
75
  }
122
76
  ```
123
77
 
124
- - Git supports HTTPS, SSH and durable local repositories. `root: "."` selects
125
- a dedicated knowledge repository. Initial PR delivery uses same-repository
126
- branches with native `git`, `gh` and ordinary operator credentials. There is
127
- no fork-routing or direct-write fallback.
128
- - Directory custody needs no Git, `gh`, `.git` or fabricated repository.
129
- A directory inside **any Git working tree**, even ignored, is rejected:
130
- relabeling Git custody cannot bypass review.
131
- - Use physical, non-symlinked, nonoverlapping paths. Keep state outside bases and
132
- source homes/worktrees; keep the bindings file outside state and bases. Local
133
- Git locators must not be disposable linked worktrees. Directory lock/journal
134
- artifacts also must not overlap state, sources or another base.
135
- - Settings are `bindings-file`, `state-dir` (both required, absolute host
136
- paths), `harvest-runtime` (`pi`, `claude`, `codex`, default `pi`), and
137
- optional `harvest-model` — the complete list a 2.1.3 payload may carry.
138
- Choose an installed, authenticated
139
- worker runtime independently of the source; omitted models use that runtime's
140
- configured default. V1 record-window settings are not v2 settings.
141
-
142
- ### Owner and base descriptors
143
-
144
- Each persistent soul declares `soul/okf.json`:
145
-
146
- ```json
147
- {"version":1,"owner":"domain-expert-stable-id","owns":["project/expert"],"reads":["project/steward","team/operations"]}
148
- ```
149
-
150
- The accepted project base declares `okf-base.json`:
151
-
152
- ```json
153
- {"version":1,"id":"project-knowledge","nodes":{"expert":{"path":"expert","owner":"domain-expert-stable-id"},"steward":{"path":"steward","owner":"steward-stable-id"}}}
154
- ```
78
+ - **The `id` must match the base.** The alias (`project`) is yours, and souls'
79
+ `okf.json` names it. The `id` must equal the `id` in the base's
80
+ `okf-base.json` at its root (here `knowledge/okf-base.json`), or every read
81
+ of that base fails with `E_BASE` ("base identity/nodes mismatch").
82
+ - **Git bases** (HTTPS, SSH or a durable local repository; `root: "."` for a
83
+ dedicated repository) are delivered to only by same-repository PR, through
84
+ `git` and `gh`. A URL with embedded credentials is refused.
85
+ - **Directory bases** need no Git and must not sit inside a Git working tree.
86
+ - **Paths** are physical and nonoverlapping: state outside every base and
87
+ instance home, the bindings file outside state and bases.
88
+ - `stateDir` holds per-source evidence and the consult cache; `cron` and `tz`
89
+ schedule each source's harvest job (defaults shown).
90
+ - Every base must be usable at spawn: one bad base blocks every knowledge-slot
91
+ spawn on the machine, and the error names its alias.
92
+
93
+ ### Settings
94
+
95
+ `oats.okf` declares seven settings; the harvester capability declares one.
96
+
97
+ | Setting | Default | Meaning |
98
+ |---|---|---|
99
+ | `bindings-file` | none (required) | Absolute path of the bindings document. |
100
+ | `state-dir` | none | Absolute path; required by the package's readiness check. Evidence lives at the bindings `stateDir`. |
101
+ | `harvest` | `off` | The harvest switch, a host setting ([below](#the-harvest-switch)). |
102
+ | `harvest-runtime` | `pi` | The harvester's harness: `pi`, `claude` or `codex`. |
103
+ | `harvest-model` | the harness default | A model pin for the harvester. |
104
+ | `git-timeout` | `600` | Seconds for each remote Git operation. |
105
+ | `consult-max-age` | `300` | Seconds a cached accepted commit may age before a consult refetches; `0` always refetches. |
106
+ | `harvester-max-age` (`oats.okf-harvest`) | `7d` | How long a harvester waits for its PR before it retires. |
155
107
 
156
- The team base similarly declares its ID and `operations` node. Nodes are
157
- nonoverlapping subdirectories with an `index.md` and `log.md`; each has one stable
158
- owner. Base roots have their own index and append-only log. Stable owner IDs must
159
- not ambiguously identify different souls within one state namespace.
108
+ Host facts go in `oats-local.yaml` `settings.oats.okf`; a soul's `knowledge:`
109
+ payload carries only what is true of all its instances, such as
110
+ `harvest-runtime` or the harvest opt-out.
160
111
 
161
- `owns` identifies harvest destinations; it does not make a working instance the
162
- author or direct maintainer of the base. `reads` selects initial context.
163
- **Neither is an ACL.** All configured bases are discoverable/readable. Missing
164
- bindings, owner declarations, base metadata or indexes fail required spawn rather
165
- than silently bootstrapping empty knowledge.
112
+ ## The soul's okf.json
166
113
 
167
- Provisioning is an explicit operator action. Prepare node-map files (the
168
- `nodes` object above, without its wrapper), then run from the **deployment
169
- directory** (the one holding `oats-local.yaml`), naming the soul whose
170
- `knowledge:` payload and `settings.oats.okf` the command should run with:
114
+ Each soul that uses oats.okf has an `okf.json` beside its `soul.yaml`:
171
115
 
172
- ```bash
173
- # New directory base: refuses an existing destination.
174
- oats okf init --base team --nodes /absolute/config/team-nodes.json --confirm --soul domain-expert --json
175
- # Git: writes an operator proposal, never pushes or claims acceptance.
176
- oats okf init --base project --nodes /absolute/config/project-nodes.json --output /absolute/new-bundle-stage --soul domain-expert --json
116
+ ```json
117
+ { "version": 1, "owner": "domain-expert", "owns": ["project/expert"], "reads": ["project/steward", "team/operations"] }
177
118
  ```
178
119
 
179
- These run **before any instance exists**. Outside an instance home the kernel
180
- resolves `oats okf … --soul <name>` exactly as `oats spawn <name>` would
181
- (discover → resolve → the soul's `oats.okf` module at its locked commit and
182
- integrity), fetches that module into the deployment's module store
183
- (`<deployment>/.oats/modules/oats.okf@<commit12>/`) and dispatches to that copy
184
- with the soul's merged payload as `OATS_SETTINGS`; `--soul` is required
185
- (`E_BAD_ARGS` names it) unless the namespace's capability is a workspace
186
- default. It never runs "the newest instance's copy" and never a cache read the
187
- lock does not pin (`E_PACKAGE_MISSING` until `oats sync` locks the declared
188
- version; drifted content is `E_PACKAGE_INTEGRITY`).
189
- *0.25.0 still answers `E_CAPABILITY_INACTIVE` here (the operator-level dispatch
190
- lands in 0.25.1); the interim is to run the module binary directly with
191
- `OATS_SETTINGS` and `OATS_CLI_BIN` set, as the tarball smoke does.*
192
-
193
- Put the Git proposal at the configured root in an operator-owned checkout and
194
- review/merge it through a PR before spawning working sources. Existing ownership
195
- changes require an explicit reviewed operator change, not harvest. The standalone
196
- capability includes JSON Schemas; filesystem containment, ownership and full OKF
197
- validation remain additional runtime checks.
198
-
199
- ## Working-agent reads and capture
200
-
201
- At session start, after compaction and on resume, read `STATE.md` and the relevant
202
- knowledge indexes. `knowledge/view.json` identifies each base's relative path,
203
- digest and Git accepted head. Content lives under `knowledge/bases/<alias>/`.
204
- Follow relevant links only; do not bulk-load bases. A link `/expert/decision.md`
205
- is rooted in **that base**, not filesystem `/`. Consult prior decisions before
206
- re-deriving them and cite base/node/concept paths.
207
-
208
- **Working agents never write accepted knowledge or soul knowledge.** This is an
209
- instruction boundary, not an OS sandbox; tools still have the operator's access.
210
- Snapshots are immutable by protocol, not live mounts. For current accepted text:
120
+ - `owner` is the soul's stable owner ID, which the base's `okf-base.json`
121
+ names as the owner of each of its nodes.
122
+ - `owns` lists the `alias/node` destinations the harvester may write; `reads`
123
+ lists the nodes the soul consults first. **Neither is an access control
124
+ list:** every configured base is readable.
125
+ - A missing `okf.json`, base metadata or index fails the spawn; nothing is
126
+ bootstrapped empty. A legacy `soul/knowledge/` fails it with a migration
127
+ diagnostic.
211
128
 
212
- ```bash
213
- # From the source home:
214
- oats okf read --base project --path expert/index.md --json
215
- oats okf refresh --json
216
- # From the deployment directory (oats-local.yaml), even after source retirement — --soul selects the resolution:
217
- oats okf read --source /absolute/state/sources/UUID/source.json --base project --path expert/index.md --soul domain-expert --json
218
- oats okf refresh --source /absolute/state/sources/UUID/source.json --soul domain-expert --json
219
- ```
129
+ `oats okf init` creates a base ([operator commands](#operator-level-commands)):
130
+ a directory base directly (`--confirm`), a Git base as a proposal (`--output`)
131
+ that you merge through a PR.
220
132
 
221
- Home-selected commands create a new `knowledge-view-<uuid>/` in that home.
222
- **Every `--source` read/refresh** places its view under
223
- `<stateDir>/sources/<source-id>/views/`, even while the source is live. It never
224
- writes a cache into the invoking repository, a retired home or a replacement
225
- home. Results identify the actual path and provider receipts. Choose `--home`
226
- or `--source`, not both. `read` returns full Markdown text; it has no preview cap.
227
-
228
- A Git PR is not accepted until its merge is visible on the accepted branch.
229
- Directory reads hold the cooperative publication lock while copying; a pending
230
- journal blocks fresh views, not existing snapshots. All bases and references
231
- validate before a view is published. Old views remain available; there is no
232
- automatic garbage collection.
233
-
234
- Working agents keep state current, append milestones and capture non-obvious
235
- insights as Markdown notes with provenance. They are not instructed to run a
236
- harvest after commits or taught worker mechanics. Capture should be cheap;
237
- importance is the independent judge's decision.
238
-
239
- ## Durable evidence and retirement
240
-
241
- Required spawn registers a random source ID outside the home; the home retains
242
- only a pointer. The durable descriptor freezes bindings, owner destinations,
243
- source role and allowlisted provenance, not credentials or wholesale launch
244
- metadata. State includes:
245
-
246
- ```text
247
- <stateDir>/owners.json
248
- <stateDir>/sources/<uuid>/source.json
249
- <stateDir>/sources/<uuid>/status.json
250
- <stateDir>/sources/<uuid>/inputs/<hash>.json
251
- <stateDir>/sources/<uuid>/runs/<uuid>/
252
- <stateDir>/sources/<uuid>/views/
253
- <stateDir>/migrations/<uuid>/
254
- ```
133
+ ## The harvest switch
255
134
 
256
- Every capture includes content-versioned **notes AND record**. Changed live notes
257
- remain untouched. Through the supported `OATS_CLI_BIN` boundary, capture uses
258
- native `capture --home`, then `recall --ids-only` byte metadata to plan bounded
259
- windows before fetching full text. Full returned record text is copied into
260
- custody, not saved as commands that still need the source home. Privacy-excluded
261
- sessions remain excluded; raw excluded transcripts are not copied.
262
-
263
- Final capture drains the visible backlog before certifying custody. The capture
264
- budget is 85 seconds; timeouts, holds, skips, malformed/incomplete records or a
265
- single turn over 1 MiB fail closed and retain the source home for retry rather
266
- than truncate evidence. A genuinely empty record is reported honestly.
267
- Retirement captures/enqueues; **it does not wait for a model or GitHub**.
268
- After successful custody transfer the home may disappear while judgment and
269
- publication continue. Unexpected disappearance leaves existing evidence usable
270
- but reports `finalCaptureUncertified`, not fictitious final capture success.
271
- Durable evidence has no automatic deletion.
272
-
273
- One scheduler **command job per source** runs from stable deployment context,
274
- using the durable descriptor and source soul selector. Dispatch remains activation
275
- and trust gated after retirement, without inheriting another instance's identity.
276
- Registration idempotently creates/verifies the job; setup failures are retryable,
277
- and disabled jobs are not silently re-enabled. No host timer is installed without
278
- explicit operator consent. See [schedules](schedules.md#okf-v2-source-jobs).
279
-
280
- ## Independent judgment and delivery
281
-
282
- A worker uses **`work: directory`**, never an attached source tree. It stages
283
- `work/bases/<alias>/` independently of the source branch, runtime and lifetime.
284
- It reads durable `input.json` and `staging.json`, edits only owned staged nodes
285
- and allowed navigation, and writes `judgment.json`. A scaffold-only request
286
- stops before any model launch. Service agents do not register/capture themselves;
287
- no-launch sources cannot cause scheduled model launches.
288
-
289
- OKF's two-part promotion test is: would a future instance act differently, **and**
290
- could it not discover this by reading the repository? Decisions and rationale,
291
- rejected alternatives, discovered limits and owned/freshness-marked slow state
292
- qualify. Code descriptions, task residue, secrets and verbatim third-party
293
- messages do not. Preserve explicit human acceptance evidence instead of
294
- re-judging accepted decisions. These are OKF choices, not kernel-wide doctrine.
295
-
296
- Each input gets `promote`, `merge` or `drop`, a reason and actual concept paths.
297
- Concepts cite input hashes and record turn IDs. Completion validates ownership,
298
- base navigation/history, full OKF conformance, baseline, provenance and explicit
299
- judgment; credential-shaped output checks do not replace human/model judgment.
300
- Deleting a staged concept requires an explicit removal reason. Workers never
301
- edit live notes, accepted bases or soul skills themselves.
302
-
303
- | Provider | Successful delivery |
304
- |---|---|
305
- | Git | Verified content delta, real commit/push and same-repository PR through native `git`/`gh`. No force push, source-branch commit or direct fallback. Merge-visible acceptance is separate from PR delivery. |
306
- | Directory | Durable proposal, cooperative base lock, baseline comparison, publication journal, file-by-file atomic replacement and full validation/digest receipt. Pending publication blocks fresh reads. No Git dependency. |
135
+ Harvest is off unless the **host** switches it on:
307
136
 
308
- Directory recovery is single-host cooperative recovery, not a distributed
309
- transaction. Multiple destinations can be partially delivered with separate
310
- receipts. Inputs are processed only when required destinations resolve. All-drop
311
- or no-change judgment can be successful without inventing a PR. Enqueue, worker
312
- spawn and command exit alone are not successful learning.
137
+ | Where | Setting | Effect |
138
+ |---|---|---|
139
+ | `oats-local.yaml` | `settings.oats.okf.harvest: on` (default `off`) | This host harvests the working souls it spawns. |
140
+ | `soul.yaml` | `knowledge: { harvest: off }` | This soul is never harvested. The opt-out is absolute. |
141
+
142
+ - A soul can only opt out. A soul's `harvest: on` is ignored with a warning,
143
+ and keeps that soul off until the line is removed. An unreadable opt-out
144
+ counts as off.
145
+ - **Off means no capture at all:** no source, custody or schedule, and no
146
+ final capture at retire. A manual `oats okf harvest` answers
147
+ `E_HARVEST_OFF`. Consultation works either way.
148
+ - On applies to new spawns. Off (host or soul) stops capture at a source's
149
+ next scheduled run; evidence already in custody stays.
150
+ - `oats okf setup --harvest on|off` writes the host setting;
151
+ `oats okf harvest-status` reports the effective value, the row that decided
152
+ it and the registered sources.
313
153
 
314
154
  ## Knowledge operations
315
155
 
316
- > **Version scope:** oats.okf **4.0.0** on kernel **0.29.0** (package souls,
317
- > triggers and workspace automations). Everything above describes the 2.x runtime, which 4.0.0 keeps for
318
- > capture, custody and delivery. The design and its decisions are in
319
- > [the knowledge-operations plan](design/2026-09-26-okf-knowledge-operations.md).
320
- > The setup procedure is the `oats-onboarding` skill ("Knowledge operations with
321
- > OKF") and okf's `okf-trigger-setup`.
322
-
323
- From 4.0.0, harvested knowledge is judged by a harvester, reviewed by a
324
- maintainer and merged without an operator in the loop, except where a merge
325
- would supersede a human-accepted decision.
156
+ The rationale is in the
157
+ [knowledge-operations design record](design/2026-09-26-okf-knowledge-operations.md).
326
158
 
327
159
  ### The flow
328
160
 
329
- 1. **Capture.** A working soul whose knowledge slot is `oats.okf`, on a host
330
- where harvest is on (below), registers a source at spawn. Capture and
331
- custody are as above: notes and bounded transcript windows, copied outside
332
- the home.
333
- 2. **Harvest.** The source's `run-source` job spawns the package soul
334
- `oats.okf/knowledge-harvester` (team `okf`). It reads the input in full,
335
- transcript windows included, and judges it with the OKF promotion
336
- doctrine. It stages edits on the owned nodes and opens a PR on the
337
- knowledge-base repo, labelled `okf-harvest`, whose body carries a fenced
338
- `okf-harvest` provenance block (the run, the source soul and instance, the
339
- owned and read nodes, the task references, the harvester's alias). It
340
- stays alive, answering questions in `okf`, until the PR is merged or
341
- closed, then retires. `harvester-max-age` (default 7d) bounds it; it never
342
- closes its own PR.
343
- 3. **Trigger.** The workspace declares the trigger in a member repo,
344
- `oats-triggers/okf-harvest-review.yaml` (`kind: oats-trigger`), from the package template
345
- `oats.okf:harvest-review`. It names the host that runs it (`runsOn`, that
346
- machine's `host.name`) and the GitHub account it acts as (`owner`, which
347
- must be able to merge on the knowledge-base repo). Only that host, logged
348
- in to `gh` as that account, polls for such PRs. For each one it spawns a
349
- NEW `oats.okf/knowledge-maintainer`, joining `okf`. The event reaches it as
350
- `OATS_TRIGGER_EVENT_FILE`. A local trigger (`oats trigger add`, this host
351
- only) is the machine-private alternative. Triggers are described in
352
- [schedules.md, "Triggers"](schedules.md#triggers), and the workspace
353
- file in ["Workspace triggers and schedules"](schedules.md#workspace-triggers-and-schedules).
354
- 4. **Review.** The maintainer checks out the PR and situates it: the
355
- provenance, the source soul's owned and read nodes, the neighbouring
356
- concepts, and the source's tickets when a tasks capability can read them.
357
- It records a verdict on the PR (`merge`, `amend+merge`, `request-changes`
358
- or `close`), amends what needs amending, and merges with the host's `gh`. A
359
- PR that would supersede a concept with human acceptance evidence is not
360
- merged: it is labelled `okf-needs-human` for the workspace's human. The
361
- maintainer tells the harvester the outcome and retires.
161
+ 1. **Consult.** A working instance reads its soul's bases remotely at their
162
+ accepted state (no local copy): at task start, after compaction and before
163
+ decisions. It keeps its own `STATE.md`, `log.md` and `notes/`, and never
164
+ writes accepted knowledge (an instruction boundary, not a sandbox).
165
+ 2. **Capture** (harvest on). Spawn registers a durable source outside the home
166
+ and a scheduler job, `okf-<source id>`. Each job run, and the final capture
167
+ at retire, copies notes and bounded transcript windows into custody.
168
+ Retire never waits for judgment or GitHub.
169
+ 3. **Harvest.** The job spawns the package soul `oats.okf/knowledge-harvester`
170
+ (harness from `harvest-runtime`). It judges the input, edits only the
171
+ source's owned nodes and delivers: for a Git base, a PR labelled
172
+ `okf-harvest` with a fenced `okf-harvest` provenance block. It stays until
173
+ the PR is merged or closed and never closes it. A directory base gets a
174
+ journalled publication instead.
175
+ 4. **Review.** A trigger spawns a new `oats.okf/knowledge-maintainer` per
176
+ harvest PR. It records a verdict (`merge`, `amend+merge`,
177
+ `request-changes` or `close`), merges with the host's `gh` and tells the
178
+ harvester. A PR that would supersede a human-accepted decision gets
179
+ `okf-needs-human` and waits for a human.
180
+
181
+ The promotion test is in
182
+ [What deserves to become knowledge](knowledge-theory.md#what-deserves-to-become-knowledge).
183
+ Both package souls hold `knowledge: none`, so nothing harvests them. They
184
+ message each other through the messaging capability, in the deployment's
185
+ default team.
186
+
187
+ ### Triggers
188
+
189
+ - **Source jobs** run from the deployment and outlive the source instance.
190
+ Registration never installs a host timer: `oats schedule host install` is
191
+ an explicit step. A drained, retired source's job is removed.
192
+ `oats schedule disable okf-<source id>` brakes one source; it is not the
193
+ switch. See [Knowledge harvest jobs](schedules.md#knowledge-harvest-jobs).
194
+ - **The review trigger** comes from the package template
195
+ `oats.okf:harvest-review`: one workspace file
196
+ (`oats-triggers/okf-harvest-review.yaml`, `runsOn` the host, `owner` a
197
+ GitHub account that can merge on the knowledge-base repo), or
198
+ `oats trigger add --from oats.okf:harvest-review --set repo=github.com/<owner>/<repo>`
199
+ on one machine. It is independent of the harvest switch. See
200
+ [Triggers](schedules.md#triggers) and
201
+ [Workspace triggers and schedules](schedules.md#workspace-triggers-and-schedules).
202
+
203
+ The setup procedure is the `okf-trigger-setup` skill. Keep harvest off until
204
+ its `oats trigger test` passes.
362
205
 
363
206
  ### Who gets which okf skills
364
207
 
365
208
  | Capability | Composed into | Skills | Inject |
366
209
  |---|---|---|---|
367
- | `oats.okf` | every working soul whose knowledge slot it fills | `okf-consultation` (reading soul knowledge and citing it); `okf-instance-knowledge` (what instance knowledge is worth capturing, and the form of `STATE.md`, `log.md` and `notes/`) | the work mode: consult instance memory and soul knowledge at task start, after compaction and before decisions; capture before compaction |
368
- | `oats.okf-harvest` | `oats.okf/knowledge-harvester` only | `knowledge-theory` (the OKF promotion doctrine); `knowledge-harvest` (the procedure, through the PR's lifetime); `okf-authoring` | the harvester's: a judge, not a worker; the staged roots are its only write surface |
369
- | `oats.okf-maintenance` | `oats.okf/knowledge-maintainer` only | `knowledge-theory`; `knowledge-review`; `okf-authoring`; `okf-trigger-setup` | the maintainer's: one PR per instance; supersede explicitly, never silently |
370
-
371
- Working souls get no promotion doctrine: the harvester is the only judge of
372
- what is promoted, and the maintainer the only one who merges. The shared
373
- skills ship as identical copies in each capability. The harvester and the
374
- maintainer hold no knowledge slot, so nothing harvests them.
210
+ | `oats.okf` | every working soul it serves | [`okf-consultation`](../mirrors/oats-okf/skills/okf-consultation/SKILL.md), [`okf-instance-knowledge`](../mirrors/oats-okf/skills/okf-instance-knowledge/SKILL.md) | Consult soul and instance knowledge; capture with judgment. |
211
+ | `oats.okf-harvest` | `oats.okf/knowledge-harvester` | `knowledge-theory`, [`knowledge-harvest`](../mirrors/oats-okf-harvest/skills/knowledge-harvest/SKILL.md), `okf-authoring` | A judge; its staged roots are its only write surface. |
212
+ | `oats.okf-maintenance` | `oats.okf/knowledge-maintainer` | `knowledge-theory`, [`knowledge-review`](../mirrors/oats-okf-maintenance/skills/knowledge-review/SKILL.md), `okf-authoring`, [`okf-trigger-setup`](../mirrors/oats-okf-maintenance/skills/okf-trigger-setup/SKILL.md) | One PR per instance; never supersede silently. |
375
213
 
376
- ### The harvest switch
214
+ Working souls get no promotion doctrine: only the harvester judges and only
215
+ the maintainer merges. `knowledge-theory` and `okf-authoring` ship as
216
+ identical copies in both role capabilities.
377
217
 
378
- Harvest is off unless both the host and the soul allow it:
379
-
380
- | Where | Setting | Effect |
381
- |---|---|---|
382
- | The host, `oats-local.yaml` | `settings.oats.okf.harvest: on` (default `off`) | This host harvests its working souls. |
383
- | A soul, `soul.yaml` | `knowledge: { harvest: off }` | This soul is never harvested, whatever the host says. |
218
+ ## Inspection and operator commands
384
219
 
385
- Off means **no capture at all**: no source is registered and no transcript or
386
- notes enter custody, so nothing accumulates for later. Turning it on starts
387
- with the next session. `oats okf setup --harvest on|off` writes the host
388
- setting, and `oats okf harvest-status [--soul <soul>]` reports the effective
389
- value, the row that decided it and the registered sources.
390
- `oats schedule disable <job>` on a source's `run-source` job is an emergency
391
- brake for one source, not the switch. The review trigger does not depend on the
392
- switch: a host can review harvest PRs from other hosts without harvesting.
393
- Keep harvest off until the end-to-end check in `okf-trigger-setup` passes.
220
+ - **From an instance home**, `oats okf …` runs the home's copy of the module
221
+ with the settings recorded at spawn.
222
+ - **From the deployment directory** (holding `oats-local.yaml`), in a shell
223
+ without another instance's `OATS_*` identity, every capability command
224
+ needs `--soul <name>` (`E_BAD_ARGS` without it). The kernel resolves the
225
+ soul as a spawn would, fetches its module at the locked commit into
226
+ `<deployment>/.oats/modules/` and runs it with the soul's merged settings.
227
+ An unlocked package is `E_PACKAGE_MISSING` until `oats sync`.
394
228
 
395
- ### The `okf` team
229
+ ### Consult
396
230
 
397
- The package souls carry `team: okf`. The workspace declares the label and maps
398
- it to a messaging team:
231
+ Consult commands read the accepted state, never an open PR. All take `--json`
232
+ and `--fresh` (refetch the accepted branch now):
399
233
 
400
- ```yaml
401
- teams:
402
- okf: { description: Knowledge operations }
403
- messaging:
404
- byTeam:
405
- okf: { team: <messaging team id> }
234
+ ```bash
235
+ oats okf bases # accepted commit or digest, freshness, validity
236
+ oats okf index [--base ALIAS] [NODE] # owned, then read, nodes' indexes
237
+ oats okf cat --base project /expert/decisions/retry-policy.md [--from PATH]
238
+ oats okf ls --base project /expert/lessons
239
+ oats okf links --base project /expert/decisions/retry-policy.md
240
+ oats okf search backoff [--base ALIAS | --all] [--node NODE] [--regex] [--case-sensitive]
406
241
  ```
407
242
 
408
- Harvesters and maintainers talk there (subjects prefixed `okf:` with the PR's
409
- URL) without writing into the working teams. Like every label it organises and
410
- gates nothing. A workspace without it reports `E_TEAM_UNKNOWN` on both package
411
- souls in discovery. They still spawn, but into no messaging team, so the
412
- harvester and the maintainer cannot talk, and `oats trigger test` fails its
413
- team check.
414
-
415
- ## Inspection and operator commands
243
+ - They run from an instance home, or from the deployment with `--soul NAME`
244
+ and `--home PATH` or `--source FILE` (the source form works after the
245
+ instance retired).
246
+ - `/node/x.md` is rooted in the base; paths never leave it. A failed fetch
247
+ serves the cached commit with `stale: true`.
248
+ - `oats okf read` and `refresh` answer `E_REMOVED`: use `cat` and `index`.
249
+ - `okf-consultation` teaches navigation, search and citation.
416
250
 
417
- Run home-local commands from that source home: inside an instance the
418
- dispatcher resolves `okf` from the home's materialized module
419
- (`instance.json.modules` → `<home>/.oats/modules/oats.okf/`). For cross-source
420
- or retired-source commands, run from the **deployment directory** (the one
421
- holding `oats-local.yaml`) in a clean operator shell without another instance's
422
- `OATS_*`/`PI_*` identity, and select the source soul with `--soul <name>`: the
423
- kernel resolves that soul as a spawn would and dispatches to the deployment's
424
- copy of its `oats.okf` module with the soul's merged payload (see
425
- [Acquire, bind and provision explicitly](#acquire-bind-and-provision-explicitly)).
426
- No `oats-config.yaml` chain is consulted; a namespace no module of the soul
427
- provides is `E_UNKNOWN_COMMAND`.
251
+ ### Inspect
428
252
 
429
253
  ```bash
430
- # Read-only; no capture, refresh, scheduling or worker launch:
431
- oats okf inspect --home /absolute/instance-home --json
432
- oats operation run knowledge:inspect --home /absolute/instance-home --json
433
- # Durable source selection after the home disappears:
254
+ oats okf inspect --home /absolute/instance-home --soul domain-expert --json
434
255
  oats okf inspect --source /absolute/state/sources/UUID/source.json --soul domain-expert --json
435
- # Explicit manual request; --no-launch still captures and creates a worker scaffold:
436
- oats okf harvest --no-launch --json
437
- oats okf run-source --source /absolute/state/sources/UUID/source.json --manual --no-launch --soul domain-expert --json
256
+ oats okf harvest-status --soul domain-expert --json
438
257
  ```
439
258
 
440
- `inspect` reports frozen `owns`, `reads`, `bases`, the registered `acceptedView`
441
- (not a fresh accepted-branch read), durable capture/processing/delivery/acceptance
442
- receipts and scheduler health. `status.lastCapture` is the last attempt, not
443
- proof the source is still present.
444
-
445
- For a **live identity-matching source**, `documents` includes labeled Markdown:
446
- `Working state (STATE.md)`, `Log (log.md)` and sorted `Pending note: <name>`
447
- entries, including nested notes. Missing documents are omitted. A
448
- `Durable processing receipts` text document follows. `liveMemory` supplies
449
- `available`, `reason` and `observedAt`. Retired, missing, reused or unverified
450
- homes expose only durable documents, with an explicit reason. Inspection checks
451
- the source pointer and any instance metadata before and after reading; it rejects
452
- unsafe live files/symlinks/hard links instead of returning a partial success.
453
- Unsafe home identity withholds live memory but retains durable inspection. This
454
- is a best-effort live observation, not a locked multi-file snapshot.
455
-
456
- Inspection retains the **explicit 256 KiB per-document preview cap**. Larger
457
- documents report `truncated: true` and original `bytes`; smaller documents are
458
- byte-exact. The **whole JSON envelope drains through stdout**, even with large
459
- receipts or multiple Markdown documents. Do not confuse this labeled preview
460
- with evidence capture or `read`: those preserve full returned text.
461
-
462
- Completion uses the worker's generated, safely quoted command:
259
+ `inspect` is read-only: frozen `owns`, `reads` and bases, the accepted
260
+ resolution registered at spawn, durable receipts (capture, processing,
261
+ delivery, acceptance) and scheduler health. A live home adds `STATE.md`,
262
+ `log.md` and pending notes (256 KiB preview each, `truncated: true` beyond);
263
+ a retired home shows durable records only; a harvest-off home shows its
264
+ declaration, bases and working memory. `oats operation run knowledge:inspect
265
+ --home PATH --json` is the same view through the generic operation interface.
266
+
267
+ ### Operator-level commands
268
+
269
+ Run these from the deployment with `--soul <name>`:
270
+
271
+ | Command | Purpose |
272
+ |---|---|
273
+ | `setup --harvest on\|off` | Write `settings.oats.okf.harvest` in `oats-local.yaml`. |
274
+ | `setup --source FILE [--enable \| --disable] [--install-host]` | Verify, toggle or host-install a source's job. |
275
+ | `run-source --source FILE [--manual] [--no-launch]` | Run a source's job by hand; `--no-launch` stops at a scaffold. |
276
+ | `init --base ALIAS --nodes FILE (--confirm \| --output PATH)` | Provision a directory base or stage a Git proposal. |
277
+ | `migrate …` | Move a legacy `soul/knowledge/` into a base. |
278
+ | `unlock --lock PATH --token TOKEN` | Release a directory-base lock of a dead local process. |
279
+
280
+ From an instance home, `oats okf harvest [--no-launch]` captures now and
281
+ requests a harvester.
282
+
283
+ ### Completion and recovery
284
+
285
+ The harvester completes its run with `oats okf-harvest complete`, which calls
286
+ the source's `oats okf complete`. The operator forms are for recovery:
463
287
 
464
288
  ```bash
465
- oats okf complete --source /absolute/state/sources/UUID/source.json --run RUN_UUID --judgment /absolute/worker/work/judgment.json --soul domain-expert --json
466
- oats okf retry --source /absolute/state/sources/UUID/source.json --soul domain-expert --json
289
+ oats okf complete --source /absolute/state/sources/UUID/source.json --run RUN_UUID [--judgment FILE] --soul domain-expert --json
290
+ oats okf retry --source /absolute/state/sources/UUID/source.json [--launch | --rejudge | --run ID --rejudge | --adopt-home PATH] --soul domain-expert --json
467
291
  ```
468
292
 
469
- Retry preserves uncertain delivery. `--launch` explicitly starts a ready worker;
470
- `--rejudge` preserves old proposals and refreshes only outstanding destinations,
471
- never redelivering settled ones. A pending directory journal must recover, not
472
- be removed to force rejudgment. After a PR merges, repeat `complete` for the
473
- same source/run without `--judgment` to reconcile acceptance. If launch status
474
- is unknown, inspect the worker session before retrying. See the
475
- [standalone runtime guide](https://github.com/awebai/oats-okf#independent-worker-and-completion)
476
- for exact recovery, adoption and lock-release procedures.
293
+ `retry` never discards an uncertain delivery; `--rejudge` keeps old proposals
294
+ and refreshes only unresolved destinations. After a PR merges, `complete` for
295
+ the run without `--judgment` records acceptance. Never remove a pending
296
+ directory journal to force progress. Exact recovery, adoption and migration
297
+ procedures are in the
298
+ [oats-okf README](https://github.com/awebai/oats-okf#independent-worker-and-completion).
477
299
 
478
300
  ## Without a knowledge capability
479
301
 
480
- `capabilities.layers.knowledge: none` is valid. The kernel creates no OKF state,
481
- notes, bundle or harvest flow. Other capabilities may adopt, adapt or replace
482
- the reference model; they do not inherit OKF's directories or judge. Native
483
- record capture remains a separate surface. Selecting `none` is not a data
484
- migration and does not erase existing memory.
302
+ `knowledge: none`, on a soul or as the workspace default, is valid: no OKF
303
+ state, instructions or harvest source. Another capability may fill the slot
304
+ with its own model ([authoring guide](knowledge-capability-authoring.md)).
305
+ Switching slots migrates and erases nothing.