@awebai/oats 0.22.19 → 0.23.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 (69) hide show
  1. package/README.md +54 -20
  2. package/bin/oats.mjs +24 -10
  3. package/capabilities/oats-okf/agents/memory-harvest/AGENTS.md +18 -24
  4. package/capabilities/oats-okf/agents/memory-harvest/soul.yaml +2 -2
  5. package/capabilities/oats-okf/bin/oats-okf.mjs +105 -517
  6. package/capabilities/oats-okf/injects/okf.md +32 -67
  7. package/capabilities/oats-okf/lib/config.mjs +112 -0
  8. package/capabilities/oats-okf/lib/inspection.mjs +96 -0
  9. package/capabilities/oats-okf/lib/io.mjs +103 -0
  10. package/capabilities/oats-okf/lib/migration.mjs +116 -0
  11. package/capabilities/oats-okf/lib/sources.mjs +238 -0
  12. package/capabilities/oats-okf/lib/stores.mjs +331 -0
  13. package/capabilities/oats-okf/lib/worker.mjs +352 -0
  14. package/capabilities/oats-okf/oats.json +23 -7
  15. package/capabilities/oats-okf/schemas/okf-base.schema.json +46 -0
  16. package/capabilities/oats-okf/schemas/okf-bindings.schema.json +112 -0
  17. package/capabilities/oats-okf/schemas/okf-soul.schema.json +37 -0
  18. package/capabilities/oats-okf/skills/memory-harvest/SKILL.md +263 -140
  19. package/capabilities/oats-okf/skills/okf/SKILL.md +13 -4
  20. package/docs/capabilities.md +14 -3
  21. package/docs/configuration.md +11 -1
  22. package/docs/design/2026-09-08-expert-assisted-deployment-proposal.md +558 -0
  23. package/docs/design/2026-09-13-knowledge-and-memory-direction.md +744 -0
  24. package/docs/design/2026-09-13-knowledge-implementation.md +127 -0
  25. package/docs/design/2026-09-13-knowledge-location-contract.md +340 -0
  26. package/docs/design/okf-mirror-provenance.md +105 -0
  27. package/docs/design/package-runtime-api.md +177 -3
  28. package/docs/desktop-cli-api.md +60 -11
  29. package/docs/execution-targets.md +16 -0
  30. package/docs/first-team-demo.md +6 -1
  31. package/docs/first-team.md +151 -115
  32. package/docs/integrations.md +42 -42
  33. package/docs/knowledge-capability-authoring.md +101 -0
  34. package/docs/knowledge-migration.md +138 -0
  35. package/docs/knowledge-reference/acceptance.md +108 -0
  36. package/docs/knowledge-reference/adoption.md +61 -0
  37. package/docs/knowledge-reference/harvester.md +107 -0
  38. package/docs/knowledge-reference/model.md +84 -0
  39. package/docs/knowledge-reference/package-craft.md +126 -0
  40. package/docs/knowledge-reference/provider-mapping.md +77 -0
  41. package/docs/knowledge-reference/reader-capture.md +87 -0
  42. package/docs/knowledge-theory.md +20 -6
  43. package/docs/knowledge.md +316 -129
  44. package/docs/layers.md +65 -69
  45. package/docs/migration-from-oas.md +7 -1
  46. package/docs/oats-config.schema.json +5 -2
  47. package/docs/packages.md +26 -2
  48. package/docs/release-notes/v0.23.0.md +93 -0
  49. package/docs/release-notes/v0.23.1.md +97 -0
  50. package/docs/schedules.md +42 -3
  51. package/docs/souls-and-instances.md +72 -49
  52. package/injects/work-directory.md +18 -0
  53. package/lib/core.mjs +279 -56
  54. package/lib/schedule.mjs +12 -2
  55. package/package-catalog.json +6 -1
  56. package/package.json +2 -2
  57. package/packages/record/README.md +19 -0
  58. package/packages/record/bin/capture.mjs +96 -48
  59. package/packages/record/bin/recall.mjs +17 -11
  60. package/packages/record/bin/record-native-start.mjs +11 -0
  61. package/packages/record/lib/capture-cc.mjs +82 -27
  62. package/packages/record/lib/capture-lock.mjs +15 -2
  63. package/packages/record/lib/formats.mjs +108 -21
  64. package/packages/record/lib/native-history.mjs +87 -0
  65. package/packages/record/lib/session-roots.mjs +90 -0
  66. package/packages/record/lib/session-snapshot.mjs +61 -0
  67. package/packages/record/lib/sessions-for-home.mjs +88 -56
  68. package/skills/oats/SKILL.md +3 -1
  69. package/capabilities/oats-okf/lib/harvest-branch.mjs +0 -43
@@ -1,21 +1,22 @@
1
1
  # Run your first OATS team
2
2
 
3
- Start with one repository and one small, real task. An OATS soul keeps the
4
- role and knowledge; an instance gets a working session and a Git worktree.
5
- Review its work, let it promote useful notes, then retire the instance.
3
+ Start with one repository and one small, real task. A soul keeps the role and
4
+ curated skills; an instance gets a working session and repository view. With OKF
5
+ v2, expertise lives in external owned nodes, not the soul or task branch.
6
6
 
7
- This guide follows the published **0.22.0** path exercised on 2026-09-05
8
- with `oats.dev` 1.0.0, `oats.okf` 1.4.1, `oats.aweb` 1.8.0, and
9
- `oats.authoring` 1.0.0. The [qualification example](first-team-demo.md)
10
- records the actual tasks and outcomes. Existing OAS users should follow
11
- [the migration guide](migration-from-oas.md) first.
7
+ > This guide targets the **v0.23.1 integration of published OKF 2.0.0**, whose
8
+ > published kernel prerequisite is OATS >=0.23.0. Check the matching framework
9
+ > release availability before installation; see [release notes](release-notes/v0.23.1.md).
10
+ > The [qualification example](first-team-demo.md) records real **v1** tasks on
11
+ > earlier versions, not v2 acceptance. Existing knowledge needs
12
+ > [v1 preservation and cutover](knowledge-migration.md), not fresh initialization.
12
13
 
13
14
  ## Install and choose a scope
14
15
 
15
- Have Node.js 22+, Git, tmux, and an authenticated agent runtime available.
16
- Launch Pi or Claude Code once yourself to confirm that your chosen model
17
- works. The current OKF package runs its harvester in **Pi**, including when
18
- its working agent uses Claude Code, so this configuration needs Pi too.
16
+ Install matching published kernel and Pi adapter releases. Have Node.js 22+, Git, tmux and an authenticated working runtime
17
+ available. OKF's independent worker can use Pi, Claude or Codex; authenticate
18
+ that selected runtime too. Plain-directory knowledge needs no Git/gh, although
19
+ this guide's coding worktree does need Git.
19
20
 
20
21
  ```bash
21
22
  npm install -g @awebai/oats@latest
@@ -23,150 +24,186 @@ pi install npm:@awebai/oats-pi@latest
23
24
  node --version
24
25
  tmux -V
25
26
  oats version
26
- ```
27
-
28
- Install matching kernel and adapter versions from the same release.
29
-
30
- Use a repository with an initial Git commit. Keep your normal working
31
- changes committed or otherwise accounted for before giving an agent work.
32
- The commands below run from that repository:
33
-
34
- ```bash
35
27
  cd /path/to/project
36
- oats init --package oats.dev --config default
28
+ oats init --raw
29
+ oats install git:github.com/awebai/oats-okf@v2.0.0
37
30
  oats list
38
31
  ```
39
32
 
40
- Initialization acquires the package closure and writes an editable
41
- `oats-config.yaml` plus an exact lock. It does not create a team account or
42
- approve executable hooks. `oats.dev` is our reference development policy;
43
- edit its team name and provider choices for your own project.
33
+ Use a repository with an initial commit for this coding-worktree example.
34
+ Raw initialization writes editable configuration with integrations disabled;
35
+ installation separately acquires the published OKF 2.0.0 closure and exact lock.
36
+ Neither step approves hooks, authenticates a runtime or joins a team. Inspect
37
+ the acquired version before continuing. An existing development template or
38
+ lock may still select v1: follow explicit preservation/update/cutover instead
39
+ of applying fresh initialization or carrying v1 knowledge settings into v2.
44
40
 
45
- For several repositories, initialize their common workspace directory
46
- instead. Run create/spawn/retire with `--dir /path/to/workspace/project` for
47
- the repository that owns the soul. `oats status --team` at the workspace
48
- shows the combined roster, but that does not select a repository for spawn.
41
+ For several repositories initialize their common workspace, then select the
42
+ repository owning the soul with `--dir /path/to/workspace/project` for
43
+ create/spawn/retire. A team roster does not select a work repository for spawn.
49
44
 
50
- ## Set the model and connect messaging
45
+ ## Configure explicit knowledge and optional messaging
51
46
 
52
47
  Edit the existing entries in `oats-config.yaml`; do not append a second
53
- `capabilities` block. Set `team.name` to your own team. If you already use
54
- aw, set `team.id` to its exact existing ID so instances join that team.
55
-
56
- Under `capabilities.layers`, configure the model your Pi installation can
57
- actually use. This example was used in our qualification; replace the
58
- model if you authenticate through another provider:
48
+ `capabilities` map. This example targets only the source soul for knowledge:
59
49
 
60
50
  ```yaml
61
- knowledge:
62
- capability: oats.okf
63
- from: installed
64
- settings:
65
- harvest-model: openai-codex/gpt-5.5
66
- messaging:
67
- capability: oats.aweb
68
- from: installed
69
- global: true
70
- souls:
71
- memory-harvest: false
72
- tasks: none
51
+ agent-types:
52
+ developers:
53
+ description: Coding experts
54
+ capabilities:
55
+ layers:
56
+ knowledge:
57
+ capability: oats.okf
58
+ from: installed
59
+ souls:
60
+ backend-expert:
61
+ enabled: true
62
+ settings:
63
+ bindings-file: /absolute/config/okf-bindings.json
64
+ harvest-runtime: pi
65
+ messaging: none
66
+ tasks: none
73
67
  ```
74
68
 
75
- The `oats.okf` 1.4.1 default harvester model is
76
- `github-copilot/gpt-5.5`; it will not work without that provider. The
77
- messaging exclusion above keeps temporary harvesters from creating aliases
78
- while an identity-retirement issue is being corrected. Workers still get
79
- messaging identities. With a `souls` exclusion, state `global: true`
80
- explicitly so scope-level commands such as `oats aweb setup` stay active.
69
+ There is no hardcoded required harvester model in v2: omitted `harvest-model`
70
+ uses the selected runtime's configured default. Choose a model explicitly if
71
+ needed. Source and worker runtimes are independent.
81
72
 
82
- Review and approve the executable capabilities, then check onboarding:
73
+ Review the acquired Git payload and approve executable surfaces:
83
74
 
84
75
  ```bash
85
76
  oats trust oats.okf
86
- oats trust oats.aweb
87
- oats aweb setup
88
- oats doctor
89
77
  ```
90
78
 
91
- `oats aweb setup` prints the next step: install the `aw` CLI if needed,
92
- initialize an identity with `aw init`, then create or join your team. Follow
93
- that output and rerun setup until it confirms membership. For an existing
94
- team, join it rather than creating another with the same name. Setup's exit
95
- status alone does not establish that onboarding finished.
96
-
97
- Messaging is optional. To work without it, set `messaging: none`, omit the
98
- aweb trust/setup commands, and keep the knowledge configuration above.
99
- Packages, souls, Git worktrees, and local knowledge do not require hosted
100
- messaging. See [configuration](configuration.md) for other providers.
79
+ Use the catalog Git package, not the bundled npm mirror: npm omits the source
80
+ worker's `CLAUDE.md` symlink, so the mirror is not a self-contained distribution.
81
+ Acquisition alone is not activation or trust.
101
82
 
102
- ## Give an instance a real task
83
+ Messaging is optional. If desired, retain/configure the template's `oats.aweb`
84
+ layer, set `team.name` and any existing `team.id`, then review/trust it and run
85
+ `oats aweb setup`. Follow its install, initialization and create/join instructions
86
+ until it confirms membership. Join an existing team rather than duplicating it;
87
+ setup's exit status alone does not establish onboarding completion. A source-only
88
+ knowledge target does not require the service worker to have a messaging identity.
103
89
 
104
- On 0.22.0, create the roster directory first; a fresh-scope creation fix is
105
- included in 0.22.1.
90
+ ## Create the soul and provision an external base
106
91
 
107
92
  ```bash
108
- mkdir -p agents
109
93
  oats create backend-expert --type developers --repo . --work worktree --runtime pi
110
94
  ```
111
95
 
112
- Edit `agents/backend-expert/soul/AGENTS.md` to describe the role, repository
113
- conventions, and the checks that matter. Review and commit the new soul,
114
- configuration, lock, generated ignore rules, and adopted template base under
115
- `.agents/config-templates/adopted/`. A worktree starts from a Git commit;
116
- uncommitted soul changes are not present on the worker's branch. Keep aw
117
- credentials out of Git.
96
+ Edit `agents/backend-expert/soul/AGENTS.md` for the role and required checks.
97
+ V2 does not scaffold knowledge in the soul. For a small local first base, create
98
+ `/absolute/config/okf-bindings.json`:
118
99
 
119
- Then launch one bounded task:
100
+ ```json
101
+ {"version":1,"stateDir":"../durable-okf-state","bases":{"team":{"id":"team-knowledge","kind":"directory","path":"../team-knowledge"}}}
102
+ ```
103
+
104
+ Those paths resolve from `/absolute/config`, not the project. Choose durable,
105
+ physical paths outside the source home/worktree and **outside every Git working
106
+ tree**, including ignored directories. State, accepted bases and bindings must
107
+ not overlap. Review [full placement rules](knowledge.md#bindings-document).
108
+
109
+ Create `/absolute/config/team-nodes.json`:
110
+
111
+ ```json
112
+ {"backend":{"path":"backend","owner":"backend-expert-stable-id"}}
113
+ ```
114
+
115
+ Explicitly provision the new base, refusing any existing destination:
120
116
 
121
117
  ```bash
122
- oats spawn backend-expert --purpose first-fix --task "Fix one small issue, run the relevant checks, commit the change, and report what changed. Capture any reusable lesson and harvest it before finishing."
118
+ oats okf init --base team --nodes /absolute/config/team-nodes.json --confirm --soul backend-expert --json
119
+ ```
120
+
121
+ Write `agents/backend-expert/soul/okf.json`:
122
+
123
+ ```json
124
+ {"version":1,"owner":"backend-expert-stable-id","owns":["team/backend"],"reads":[]}
125
+ ```
126
+
127
+ For team-shared Git knowledge instead, follow [Git provisioning](knowledge.md#owner-and-base-descriptors)
128
+ and review/merge its initialization PR before spawning. Git knowledge always
129
+ uses PR delivery, not commits on the coding instance's branch.
130
+
131
+ Review and commit soul/configuration/lock changes, generated ignore rules and
132
+ the adopted template base under `.agents/config-templates/adopted/`. Keep
133
+ credentials and private durable evidence out of Git. Check `oats doctor --soul
134
+ backend-expert --json`. Configuration and a successful doctor do not substitute
135
+ for accepted-base validation by the required spawn hook.
136
+
137
+ ## Give an instance a real task
138
+
139
+ ```bash
140
+ oats spawn backend-expert --purpose first-fix --task "Fix one small issue, run the relevant checks, commit the code change, and report what changed. Read the relevant accepted knowledge indexes and capture non-obvious lessons in notes."
123
141
  oats status --team
124
142
  ```
125
143
 
126
- Choose `--runtime claude` at creation for a Claude Code worker. Today its
127
- first session can require **two interactive confirmations**: folder trust
128
- and the development-channels confirmation used by the aweb integration.
129
- Attach to the tmux session printed by spawn and answer them. A created
130
- window is not evidence that the agent has started working.
144
+ Choose `--runtime claude` or `codex` if preferred. Complete any native folder
145
+ trust, authentication or messaging-plugin confirmations in the printed session.
146
+ A created window is not proof the agent is working.
147
+
148
+ The instance home is under `agents/<soul>/instances/<instance>/`; `work/` is its
149
+ Git worktree. `knowledge/view.json` identifies immutable accepted snapshots.
150
+ The worker reads indexes selectively, maintains state/log/notes, and never edits
151
+ accepted knowledge. This is instructional, not an OS filesystem sandbox.
152
+ Review its code commits through the repository's ordinary PR workflow.
131
153
 
132
- Each instance has a home under `agents/<soul>/instances/<instance>/`; its
133
- `work/` directory is the repository worktree. Read the instance's report
134
- and review its commits there. Agents using aw run coordination commands
135
- from their own home, which holds their identity.
154
+ ## Inspect, judge and retire
136
155
 
137
- ## Harvest, review, and retire
156
+ From the source home, read-only inspection shows identity-matching state/log/notes
157
+ plus durable processing receipts:
138
158
 
139
- With OKF active, the worker keeps state and notes in its home. After a
140
- commit it can run `oats okf harvest` there. If it reports pending notes but
141
- has not harvested, ask it to do so, or run the command from that instance's
142
- home yourself. Retirement does not initiate knowledge promotion.
159
+ ```bash
160
+ oats okf inspect --json
161
+ ```
162
+
163
+ Spawn registered one per-source command job, but **did not install a host timer**.
164
+ For this first task an operator may request one manual harvest from the source
165
+ home; without `--no-launch` this starts the configured model worker:
166
+
167
+ ```bash
168
+ oats okf harvest --json
169
+ ```
143
170
 
144
- The harvester reviews notes, updates the soul's knowledge, and commits the
145
- promotion into the worker's branch. Let it finish before final review or
146
- retirement. Review **all** commits, including the promotion, and merge the
147
- accepted work into the repository's main branch through your normal
148
- workflow. Then, from the repository scope:
171
+ The worker judges durable notes **and captured record**, in its own directory
172
+ execution space. It leaves live notes and soul skills untouched. Directory
173
+ delivery is recoverable publication with validation and receipts. Git delivery
174
+ requires a real reviewed PR and merge-visible acceptance. Inspect receipts rather
175
+ than equating a worker spawn with learning. See [operator commands](knowledge.md#inspection-and-operator-commands)
176
+ for scaffold-only requests, completion and retry.
177
+
178
+ Source retirement need not wait for a worker to finish: it must first certify
179
+ final notes/record custody. From the repository scope:
149
180
 
150
181
  ```bash
151
182
  oats retire backend-expert-first-fix
152
183
  oats status --team
153
184
  ```
154
185
 
155
- Read the retirement result, including any retained home or recovery path.
156
- With aweb enabled, also inspect `oats aweb roster`: local retirement alone
157
- is not proof that a remote alias was removed. During the current hosted
158
- alias-retirement issue, use a fresh purpose for the next instance and have
159
- the team administrator clear any stale alias before reusing its name.
186
+ Read the retirement result. An uncertified capture retains the home for retry;
187
+ never delete it to bypass recovery. Durable descriptors, evidence and runs survive
188
+ successful retirement. Use `oats okf inspect --source <absolute-source.json>
189
+ --soul backend-expert --json` from deployment context afterward. If messaging is
190
+ active, also verify its retirement receipt and roster rather than assuming local
191
+ cleanup proves identity release.
192
+
193
+ For automatic future judgment, review [source jobs](schedules.md#okf-v2-source-jobs)
194
+ and explicitly opt into host-timer installation. No-launch tests should never
195
+ install it or enable live model launches.
160
196
 
161
- Start the same soul on the next useful task after its knowledge commit is
162
- on main. Check that the new instance can find and use the promoted lesson.
163
- That completes the first lifecycle: useful work, reviewed learning, clean
164
- local retirement, and a successor with the updated soul.
197
+ After provider acceptance, start a fresh instance of the same soul on a useful
198
+ task. Check that it finds **and uses** the promoted lesson without the original
199
+ source. That is the learning acceptance step; a no-launch reader only verifies
200
+ scaffolding and references.
165
201
 
166
- ## Optional conversation record
202
+ ## Optional host-wide conversation capture
167
203
 
168
- Knowledge promotion and conversation capture are separate. To enable the
169
- local transcript record and query it:
204
+ Knowledge judgment and the native conversation record are separate. OKF uses
205
+ source-targeted native capture through the CLI; host-wide watcher/hook setup is
206
+ an additional deliberate operator action:
170
207
 
171
208
  ```bash
172
209
  oats setup
@@ -174,6 +211,5 @@ oats capture --status
174
211
  oats recall "a phrase from your completed task"
175
212
  ```
176
213
 
177
- Capture reads supported transcripts and aweb logs after setup, subject to
178
- ignore rules. Native turns are content-addressed; signed aweb messages
179
- retain their source signatures. See [the turn record](../README.md#the-turn-record).
214
+ Capture respects privacy exclusions. Native turns are content-addressed; signed
215
+ aweb messages retain their source signatures. See [the turn record](../README.md#the-turn-record).
@@ -43,6 +43,8 @@ capabilities:
43
43
  knowledge:
44
44
  capability: oats.okf
45
45
  from: installed
46
+ settings:
47
+ bindings-file: /absolute/config/okf-bindings.json
46
48
  messaging:
47
49
  capability: oats.aweb
48
50
  from: installed
@@ -65,7 +67,7 @@ capabilities:
65
67
  CLI equivalents:
66
68
 
67
69
  ```bash
68
- oats use oats.okf --global
70
+ oats use oats.okf --global --settings bindings-file=/absolute/config/okf-bindings.json
69
71
  oats use oats.aweb --type product-agents
70
72
  oats use oats.linear --type product-agents
71
73
  oats use none --layer tasks # leave an inherited slot deliberately unfilled
@@ -78,11 +80,14 @@ is different from a soul whose type restricts its reach.
78
80
 
79
81
  ## Bundled integrations
80
82
 
81
- **`oats.okf`** fills `knowledge`: OKF soul bundles, instance `STATE.md`,
82
- `log.md`, and `notes/`, the `okf` and `memory-harvest` skills, and
83
- `oats okf harvest`, which promotes pending notes after a commit through the
84
- capability-defined `memory-harvest` soul. Its scaffold and spawn hooks own
85
- memory mechanics; the kernel stays knowledge-format agnostic.
83
+ **`oats.okf` v2** fills `knowledge`: external owned OKF bases, immutable
84
+ reader views, instance `STATE.md`/`log.md`/`notes/`, durable notes-and-record
85
+ custody and an independent directory worker. Git delivery is PR-only; plain
86
+ directory delivery is recoverable and needs no Git/gh. Explicit bindings,
87
+ `soul/okf.json` and accepted base metadata are required before a working source
88
+ can spawn. `owns`/`reads` are responsibility/context, not ACLs. See
89
+ [knowledge](knowledge.md) for the **prepared** version scope, provisioning and
90
+ commands, and [migration](knowledge-migration.md) before updating v1.
86
91
 
87
92
  **`oats.aweb`** fills `messaging`: mints an instance identity at spawn,
88
93
  removes it at retire, contributes the aweb messaging and team skills, wires
@@ -117,13 +122,15 @@ kernel only through `OATS_CLI_BIN` and the JSON envelope, never by importing
117
122
  kernel files. Never name target souls in the manifest; targeting belongs to
118
123
  configuration.
119
124
 
120
- **Knowledge.** Scaffold the soul's store on `soul-scaffold`; create instance
121
- ephemeral state on `spawn`; teach the read side (index-first, selective,
122
- binding) in the inject and skill; ship a harvester as a capability-defined
123
- soul and a command that spawns it attached to the source instance's tree;
124
- route promotions by custody (commit, pull request, or direct edit); apply the
125
- promotion doctrine in the contract; and, once the `harvest` event exists,
126
- declare it instead of relying on the instance to call the command.
125
+ **Knowledge.** Each capability owns its complete runtime and format, including
126
+ reader/capture instructions, judgment and provider-native delivery. Do not
127
+ assume a soul bundle, attached worker, Git store or mandatory shared harvester.
128
+ The optional [authoring guide](knowledge-capability-authoring.md) describes the
129
+ reference model and how to adapt or replace it. OKF v2 is one implementation:
130
+ explicit external ownership, instructional read-only sources, evidence custody
131
+ outside disposable homes, independent workers, PR-only Git and recoverable
132
+ non-Git publication. Existing lifecycle hooks and supported CLI/scheduler
133
+ commands implement it; no proposed universal `harvest` event is required.
127
134
 
128
135
  **Communication.** Mint an address on `spawn` with a `required` hook and
129
136
  remove it on `retire`; supply the roster; teach send, reply, chat, and "read
@@ -140,40 +147,33 @@ Test an integration as a capability package: acquire, lock, trust, activate,
140
147
  spawn, retire, with the golden fixtures as the behavior oracle for the kernel
141
148
  side.
142
149
 
143
- ## oats.okf harvest settings (1.5.1)
150
+ ## oats.okf v2 settings and recovery
144
151
 
145
- The harvester can use a different harness from the source instance. Select one
146
- that is installed and authenticated on the host where the harvest runs:
152
+ V2 requires `bindings-file`, an absolute path to capability-owned JSON. Paths
153
+ inside it resolve from that file's directory. The source soul needs stable
154
+ `owner`, `owns` and `reads` declarations; every referenced accepted node must
155
+ exist and match its owner. Acquisition/activation never bootstraps a knowledge
156
+ base. If activating globally, provision each working soul first or target only
157
+ ready sources.
147
158
 
148
159
  ```bash
149
- oats use oats.okf --settings harvest-runtime=claude
160
+ oats use oats.okf --soul domain-expert --settings bindings-file=/absolute/config/okf-bindings.json harvest-runtime=claude
150
161
  ```
151
162
 
152
- - `harvest-runtime: pi | claude | codex` defaults to `pi`.
153
- - `harvest-model` is an optional pin, for example to use a cheaper model.
154
- When omitted, each harness uses its configured default. Pi accepts
155
- provider/model patterns. Claude and Codex require a native model name
156
- (for example `sonnet` or `gpt-5.5`), without a Pi provider prefix.
157
-
158
- These settings apply to note and record harvests, including deferred retirement
159
- and remote harvests. For a remote instance, configure its host's knowledge
160
- binding; the local viewer does not supply its own provider credentials.
161
-
162
- If a record harvester was spawned but did not advance its watermark, planning
163
- the same windows again warns with that instance and the boundary IDs and skips
164
- another spawn. Inspect the previous attempt first. `oats okf harvest
165
- --from-record --force` retries those windows explicitly; it still refuses to
166
- start a second harvester while the first one's home exists. The check uses the
167
- existing prepared watermark file and does not treat a successful spawn as
168
- completed learning.
169
-
170
- ## oats.okf 1.5.2
171
-
172
- `okf harvest` exits non-zero when it reports a failure (the plain and the
173
- `--json` forms alike). A leftover `memory-harvest/<slug>` branch from a merged
174
- promotion is deleted before the next workspace-mode harvest; an unmerged one
175
- refuses the harvest and names the remedy. `oats okf harvest --help` prints
176
- usage and never spawns.
163
+ - `harvest-runtime: pi | claude | codex` defaults to `pi`, independently of the
164
+ source. Select an installed/authenticated runtime on the execution host.
165
+ - `harvest-model` optionally pins its model. Omitted models use the harness
166
+ default; native Claude/Codex names are not Pi provider-prefixed patterns.
167
+ - Old record-window settings and `--from-record --force` recovery are not v2
168
+ interfaces. Every capture takes notes **and** record; use durable run receipts
169
+ and explicit `retry`/`complete` reconciliation, never old watermark moves.
170
+
171
+ For remote sources, configure custody and credentials on their execution host,
172
+ not the viewer. One source job continues from stable deployment context after
173
+ retirement, subject to current activation/trust. Timer installation requires
174
+ explicit consent. `inspect` is read-only and combines identity-guarded live
175
+ memory with durable receipts; `--source` remains usable after home deletion.
176
+ [Command and recovery details](knowledge.md#inspection-and-operator-commands).
177
177
 
178
178
  ## oats.aweb late joins (1.10.3)
179
179
 
@@ -0,0 +1,101 @@
1
+ # Authoring a knowledge capability
2
+
3
+ This is the canonical source for the optional `oats.knowledge-theory` authoring
4
+ curriculum. Its linked reference documents form a self-contained local set.
5
+ The released skill includes checked copies of this set; authors and the
6
+ `knowledge-theory-expert` can use it without a framework checkout or network.
7
+
8
+ ## Authority and scope
9
+
10
+ OATS offers an opinionated reference knowledge theory. Default OKF follows it;
11
+ other capabilities may adopt, adapt, or replace it. The kernel owns generic
12
+ layer selection, configuration, composition, lifecycle, work-mode boundaries
13
+ and executable trust, not a compulsory memory ontology or universal judge.
14
+
15
+ This guide distills the approved 2026-09-13 knowledge scoping session. The
16
+ reference derivation comes from OATS's knowledge theory; its historical
17
+ references to physical soul bundles are replaced here by external knowledge
18
+ custody. The approved implementation plan settles plain-directory OKF as the
19
+ first non-Git path and keeps Omnigraph an uninvestigated authoring scenario.
20
+ Earlier drafts' open choices are not implementation facts. The curriculum is
21
+ a design/authoring reference, not a claim that all default runtime behavior
22
+ has already shipped. Verify the capability version actually being evaluated.
23
+
24
+ Every implementing capability supplies its full runtime package: reader tools,
25
+ injections, capture conventions, judgment instructions, harvester if any,
26
+ lifecycle/scheduling machinery, validation, delivery and diagnostics. Reuse
27
+ may be explicit and versioned, never a hidden fetch of mutable doctrine.
28
+ The theory expert advises authors; it does not operate their stores or approve
29
+ their compatibility. Installing the theory package activates nothing.
30
+
31
+ ## Install the optional authoring package
32
+
33
+ The kernel's npm package ships this public guide and the CLI, **not** the
34
+ optional expert payload. The catalog selects `oats.knowledge-theory` 1.0.0
35
+ from the already-published framework v0.23.0 Git `oats-package/` subtree. Git preserves the canonical
36
+ source `CLAUDE.md -> AGENTS.md` symlink; npm omits symlinks, so a partial npm
37
+ copy is not a supported distribution. Acquisition does not repair source
38
+ aliases or relax installed-artifact integrity checks.
39
+
40
+ Select a deployment scope explicitly and acquire the published source, then
41
+ opt in for an author soul:
42
+
43
+ ```bash
44
+ oats install git:github.com/awebai/oats@v0.23.0 --dir /path/to/scope
45
+ oats use oats.knowledge-theory --soul <author-soul> --dir /path/to/scope
46
+ ```
47
+
48
+ Git sources select `oats-package/` by default and lock the resolved commit.
49
+ The `oats.knowledge-theory` catalog shortcut uses that same published v0.23.0
50
+ source. The current authoring-reference patch is package 1.0.1: once framework
51
+ v0.23.1 is published, an explicit initial Git acquisition at that tag selects
52
+ the patch instead. It does not silently change the catalog's 1.0.0 selection
53
+ or an existing lock. For local development, use an explicit complete source
54
+ package path instead. Activation exposes the expert and targets
55
+ the authoring skill, without selecting or replacing a knowledge integration.
56
+ There are no executable surfaces to trust in this package. Installed experts
57
+ use their materialized local curriculum, not this repository at runtime.
58
+
59
+ ## A bounded authoring session
60
+
61
+ 1. **Choose a model.** Read the [reference model](knowledge-reference/model.md)
62
+ and [adoption choices](knowledge-reference/adoption.md). Record what the
63
+ author is choosing, not what the kernel supposedly requires.
64
+ 2. **Establish real custody.** Fill the [provider map](knowledge-reference/provider-mapping.md)
65
+ from tool/version evidence. A Git-backed knowledge repository is still Git;
66
+ a directory implementation must work without Git/GitHub. Do not invent
67
+ native graph operations to fill gaps in the table.
68
+ 3. **Author working behavior.** Use the [reader/capture pattern](knowledge-reference/reader-capture.md).
69
+ Keep every-session instructions short; load detailed native operations from
70
+ that capability's own skills.
71
+ 4. **Author deliberate judgment.** Use the [harvester pattern](knowledge-reference/harvester.md)
72
+ if adopting this model. Freeze inputs and destinations before execution,
73
+ separate semantic outcomes from delivery outcomes, and define recovery.
74
+ 5. **Deliver an independently usable package.** Follow [package craft](knowledge-reference/package-craft.md).
75
+ No path in a released soul or skill may depend on an author's checkout.
76
+ 6. **Verify observable outcomes.** Run the relevant [acceptance cases](knowledge-reference/acceptance.md).
77
+ Structural success is not proof that an agent learned or that a store is safe
78
+ under crashes. State the limit of each test.
79
+
80
+ ## Hand-off template
81
+
82
+ - Model: adopt / adapt / alternative; rationale and deliberate departures.
83
+ - Provider and version: verified tools, evidence, unknown guarantees.
84
+ - Responsibility map: who supplies reader, capture, judgment, delivery,
85
+ lifecycle, scheduling and diagnostics; no unowned runtime step.
86
+ - Custody: named destinations, owner identity, accepted state, concurrency,
87
+ retry and reader-refresh semantics. No credentials in the report.
88
+ - Proposed artifacts: capability manifest, local resources, instructions,
89
+ skills, optional agent, hooks/operations and declared trust surface.
90
+ - Verification: tests run, actual receipts/visibility, failures, untested claims
91
+ and the next required approvals. Do not call scaffold-only an agent trial.
92
+
93
+ ## Maintaining these references
94
+
95
+ Edit this file and `docs/knowledge-reference/` in the framework source, then
96
+ run `node scripts/check-knowledge-theory-package.mjs --write` from that checkout.
97
+ Run `node scripts/check-knowledge-theory-package.mjs` and
98
+ `node --test test/knowledge-theory-package.test.mjs` to verify parity and the
99
+ installed artifact. These are maintainer commands, not tools required in an
100
+ installed expert's work tree. The copies belong to a package release; edits to
101
+ repository docs do not change any installed capability at runtime.