@awebai/oats 0.23.0 → 0.23.2
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.
- package/README.md +48 -18
- package/capabilities/oats-okf/agents/memory-harvest/AGENTS.md +18 -24
- package/capabilities/oats-okf/agents/memory-harvest/soul.yaml +2 -2
- package/capabilities/oats-okf/bin/oats-okf.mjs +105 -517
- package/capabilities/oats-okf/injects/okf.md +32 -67
- package/capabilities/oats-okf/lib/config.mjs +112 -0
- package/capabilities/oats-okf/lib/inspection.mjs +96 -0
- package/capabilities/oats-okf/lib/io.mjs +103 -0
- package/capabilities/oats-okf/lib/migration.mjs +116 -0
- package/capabilities/oats-okf/lib/sources.mjs +238 -0
- package/capabilities/oats-okf/lib/stores.mjs +331 -0
- package/capabilities/oats-okf/lib/worker.mjs +352 -0
- package/capabilities/oats-okf/oats.json +23 -7
- package/capabilities/oats-okf/schemas/okf-base.schema.json +46 -0
- package/capabilities/oats-okf/schemas/okf-bindings.schema.json +112 -0
- package/capabilities/oats-okf/schemas/okf-soul.schema.json +37 -0
- package/capabilities/oats-okf/skills/memory-harvest/SKILL.md +263 -140
- package/capabilities/oats-okf/skills/okf/SKILL.md +13 -4
- package/docs/capabilities.md +14 -3
- package/docs/configuration.md +11 -1
- package/docs/design/okf-mirror-provenance.md +105 -0
- package/docs/desktop-cli-api.md +59 -10
- package/docs/first-team-demo.md +6 -1
- package/docs/first-team.md +151 -115
- package/docs/integrations.md +42 -42
- package/docs/knowledge-capability-authoring.md +10 -7
- package/docs/knowledge-migration.md +138 -0
- package/docs/knowledge.md +316 -129
- package/docs/layers.md +57 -62
- package/docs/migration-from-oas.md +7 -1
- package/docs/packages.md +26 -2
- package/docs/release-notes/v0.23.1.md +97 -0
- package/docs/release-notes/v0.23.2.md +49 -0
- package/docs/schedules.md +42 -3
- package/docs/souls-and-instances.md +55 -48
- package/package-catalog.json +6 -1
- package/package.json +1 -1
- package/capabilities/oats-okf/lib/harvest-branch.mjs +0 -43
package/docs/knowledge.md
CHANGED
|
@@ -1,139 +1,326 @@
|
|
|
1
1
|
# Knowledge — layer 2
|
|
2
2
|
|
|
3
|
-
Specialization is accumulated judgment
|
|
4
|
-
|
|
3
|
+
Specialization is accumulated judgment: decisions and rationale, rejected
|
|
4
|
+
alternatives, discovered limits, and maintained context that changes what a
|
|
5
|
+
future instance does. It is not a second description of the code.
|
|
5
6
|
|
|
6
|
-
OATS
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
OATS keeps knowledge pluggable. The kernel supplies lifecycle, configuration,
|
|
8
|
+
trusted command dispatch and independent execution; each knowledge capability
|
|
9
|
+
owns its format, reader/capture instructions, judgment and delivery. The
|
|
10
|
+
[reference theory](knowledge-theory.md) and [authoring guide](knowledge-capability-authoring.md)
|
|
11
|
+
are optional author resources, not mandatory runtime policy.
|
|
9
12
|
|
|
10
|
-
> **
|
|
11
|
-
>
|
|
12
|
-
>
|
|
13
|
-
>
|
|
14
|
-
>
|
|
15
|
-
> `notes/*.md`, the working agent's own in-session notes; the planned upgrade
|
|
16
|
-
> (epic `aweb-abfz`) feeds the harvester from the captured record as well, so
|
|
17
|
-
> lessons reach the soul even when an agent wrote no notes and never ran
|
|
18
|
-
> harvest. The judgment machinery described here — the promotion bar, the
|
|
19
|
-
> capture/judge split, the routing between knowledge and skills — is unchanged
|
|
20
|
-
> by that upgrade; only the input channel widens.
|
|
13
|
+
> **Version scope:** this guide describes published **oats.okf 2.0.0**, requiring
|
|
14
|
+
> the published OATS >=0.23.0 kernel. Framework v0.23.1 integrates its catalog
|
|
15
|
+
> and mirror; publishing packages does not activate or deploy them automatically.
|
|
16
|
+
> See [release notes](release-notes/v0.23.1.md).
|
|
17
|
+
> V1 soul-contained knowledge needs [explicit migration](knowledge-migration.md).
|
|
21
18
|
|
|
22
|
-
## What
|
|
19
|
+
## What lives where
|
|
23
20
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
- `soul-scaffold`
|
|
27
|
-
- `spawn`
|
|
28
|
-
- `retire`
|
|
29
|
-
|
|
30
|
-
A knowledge integration decides what to do with those events. If config
|
|
31
|
-
resolves `knowledge: none`, the kernel creates no `STATE.md`, no `notes/`, no
|
|
32
|
-
knowledge bundle, and no harvest flow.
|
|
33
|
-
|
|
34
|
-
The ideas behind any of this — what belongs in a soul vs an instance,
|
|
35
|
-
capture vs judgment, consolidation stages — are format-independent and live
|
|
36
|
-
in [knowledge theory](knowledge-theory.md).
|
|
37
|
-
|
|
38
|
-
## The default: oats-okf
|
|
39
|
-
|
|
40
|
-
With `knowledge: okf`, the integration creates two memory spaces.
|
|
41
|
-
|
|
42
|
-
| Space | Files | Purpose |
|
|
43
|
-
|---|---|---|
|
|
44
|
-
| Soul memory | `soul/knowledge/` | Long-term OKF bundle: lessons, decisions, playbooks, references, role-grown sections. |
|
|
45
|
-
| Instance memory | `STATE.md`, `log.md`, `notes/` | Current task state, dated history, and captured insights. |
|
|
46
|
-
|
|
47
|
-
The instance does not promote its own notes. It captures them, and after
|
|
48
|
-
committing with pending notes it runs `oats okf harvest` (its okf injection
|
|
49
|
-
carries this instruction), which spawns a **memory-harvest** agent. That
|
|
50
|
-
harvester judges the notes and updates the soul; the delivery matches the
|
|
51
|
-
soul's custody — a commit on the instance's branch for repo-resident souls,
|
|
52
|
-
a PR to the soul's home repo for workspace-mode souls, and **direct edits
|
|
53
|
-
with no commit** for local souls (their `local-agents/` home is
|
|
54
|
-
uncommitted by contract). Then it retires.
|
|
55
|
-
|
|
56
|
-
## Capture and judgment
|
|
57
|
-
|
|
58
|
-
OATS splits memory work into two roles.
|
|
59
|
-
|
|
60
|
-
**The working instance captures.** It keeps `STATE.md` current, appends
|
|
61
|
-
milestones to `log.md`, and writes every non-obvious insight to `notes/`.
|
|
62
|
-
It does not decide whether an insight is "important enough" for the soul.
|
|
63
|
-
Capture should be cheap and in-flow.
|
|
64
|
-
|
|
65
|
-
**The memory-harvest agent judges.** It reads pending notes and applies the
|
|
66
|
-
promotion bar:
|
|
67
|
-
|
|
68
|
-
> Promote only what is durable and would change what a future instance of
|
|
69
|
-
> this soul does.
|
|
70
|
-
|
|
71
|
-
For each note it chooses one outcome:
|
|
72
|
-
|
|
73
|
-
| Outcome | Meaning |
|
|
21
|
+
| Surface | Purpose |
|
|
74
22
|
|---|---|
|
|
75
|
-
|
|
|
76
|
-
|
|
|
77
|
-
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
`
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
23
|
+
| `soul/AGENTS.md`, `soul/skills/` | Curated specialist identity and procedures, reviewed as soul artifacts. |
|
|
24
|
+
| `soul/okf.json` | Stable owner ID and external `owns`/`reads` node references; no knowledge bytes. |
|
|
25
|
+
| External accepted bases | Durable OKF knowledge, either Git PR-only or a recoverable plain directory. |
|
|
26
|
+
| Instance `knowledge/` | Immutable accepted reader snapshot with `view.json` and `bases/<alias>/`. |
|
|
27
|
+
| Instance `STATE.md`, `log.md`, `notes/` | Rewritable task state, append-only milestones and captured insights. |
|
|
28
|
+
| External `stateDir` | Durable per-source evidence, frozen descriptors, runs, proposals and receipts. |
|
|
29
|
+
| Worker `work/` | Independent directory execution with staged bases and explicit judgment. |
|
|
30
|
+
|
|
31
|
+
The turn record is episodic evidence, not accepted expertise. OKF captures both
|
|
32
|
+
notes **and** attributed record content, then judges them separately from capture.
|
|
33
|
+
V2 never automatically edits soul skills; a procedure candidate may become an
|
|
34
|
+
external Playbook for separate human review.
|
|
35
|
+
|
|
36
|
+
## Acquire, bind and provision explicitly
|
|
37
|
+
|
|
38
|
+
The authoritative distribution is [awebai/oats-okf](https://github.com/awebai/oats-okf),
|
|
39
|
+
whose `oats-package/oats-package.json` exports exactly
|
|
40
|
+
`oats-package/capabilities/oats-okf/`. The framework's `capabilities/oats-okf/`
|
|
41
|
+
is a bundled mirror, **not a self-contained Git distribution in the npm
|
|
42
|
+
artifact**: npm drops the source worker's `CLAUDE.md -> AGENTS.md` symlink.
|
|
43
|
+
Acquire the catalog Git payload; do not install a copied npm mirror as a local
|
|
44
|
+
package or repair missing aliases in installed artifacts.
|
|
45
|
+
|
|
46
|
+
With a released OATS >=0.23.0 kernel, acquire published OKF 2.0.0 from the
|
|
47
|
+
intended deployment configuration context in an operator shell without inherited
|
|
48
|
+
instance identity (an explicit `--soul` does not override an invoking instance's
|
|
49
|
+
saved settings). The explicit Git source works before and after the v0.23.1
|
|
50
|
+
framework catalog integration:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
oats install git:github.com/awebai/oats-okf@v2.0.0
|
|
54
|
+
oats trust oats.okf
|
|
55
|
+
oats use oats.okf --soul domain-expert --settings bindings-file=/absolute/config/okf-bindings.json
|
|
56
|
+
oats doctor --soul domain-expert --json
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Acquisition activates nothing. An existing lock remains exact until an explicit
|
|
60
|
+
`oats update oats.okf`; v1 operators must plan migration before that update.
|
|
61
|
+
Executable changes need review and renewed trust. Target only configured source
|
|
62
|
+
souls; the service worker need not itself receive the knowledge layer.
|
|
63
|
+
|
|
64
|
+
### Bindings document
|
|
65
|
+
|
|
66
|
+
`bindings-file` must be an **absolute path**. Its capability-owned JSON is not a
|
|
67
|
+
new kernel configuration schema. Paths inside it resolve relative to the file's
|
|
68
|
+
directory, not the current working directory:
|
|
69
|
+
|
|
70
|
+
```json
|
|
71
|
+
{
|
|
72
|
+
"version": 1,
|
|
73
|
+
"stateDir": "../durable-okf-state",
|
|
74
|
+
"cron": "*/15 * * * *",
|
|
75
|
+
"tz": "UTC",
|
|
76
|
+
"bases": {
|
|
77
|
+
"project": {
|
|
78
|
+
"id": "project-knowledge",
|
|
79
|
+
"kind": "git",
|
|
80
|
+
"repository": "https://github.com/example/project.git",
|
|
81
|
+
"root": "knowledge",
|
|
82
|
+
"acceptedBranch": "main",
|
|
83
|
+
"pr": {"repository": "example/project"}
|
|
84
|
+
},
|
|
85
|
+
"team": {
|
|
86
|
+
"id": "team-knowledge",
|
|
87
|
+
"kind": "directory",
|
|
88
|
+
"path": "../team-knowledge"
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
- Git supports HTTPS, SSH and durable local repositories. `root: "."` selects
|
|
95
|
+
a dedicated knowledge repository. Initial PR delivery uses same-repository
|
|
96
|
+
branches with native `git`, `gh` and ordinary operator credentials. There is
|
|
97
|
+
no fork-routing or direct-write fallback.
|
|
98
|
+
- Directory custody needs no Git, `gh`, `.git` or fabricated repository.
|
|
99
|
+
A directory inside **any Git working tree**, even ignored, is rejected:
|
|
100
|
+
relabeling Git custody cannot bypass review.
|
|
101
|
+
- Use physical, non-symlinked, nonoverlapping paths. Keep state outside bases and
|
|
102
|
+
source homes/worktrees; keep the bindings file outside state and bases. Local
|
|
103
|
+
Git locators must not be disposable linked worktrees. Directory lock/journal
|
|
104
|
+
artifacts also must not overlap state, sources or another base.
|
|
105
|
+
- Settings are `bindings-file`, `harvest-runtime` (`pi`, `claude`, `codex`,
|
|
106
|
+
default `pi`), and optional `harvest-model`. Choose an installed, authenticated
|
|
107
|
+
worker runtime independently of the source; omitted models use that runtime's
|
|
108
|
+
configured default. V1 record-window settings are not v2 settings.
|
|
109
|
+
|
|
110
|
+
### Owner and base descriptors
|
|
111
|
+
|
|
112
|
+
Each persistent soul declares `soul/okf.json`:
|
|
113
|
+
|
|
114
|
+
```json
|
|
115
|
+
{"version":1,"owner":"domain-expert-stable-id","owns":["project/expert"],"reads":["project/steward","team/operations"]}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
The accepted project base declares `okf-base.json`:
|
|
119
|
+
|
|
120
|
+
```json
|
|
121
|
+
{"version":1,"id":"project-knowledge","nodes":{"expert":{"path":"expert","owner":"domain-expert-stable-id"},"steward":{"path":"steward","owner":"steward-stable-id"}}}
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
The team base similarly declares its ID and `operations` node. Nodes are
|
|
125
|
+
nonoverlapping subdirectories with an `index.md` and `log.md`; each has one stable
|
|
126
|
+
owner. Base roots have their own index and append-only log. Stable owner IDs must
|
|
127
|
+
not ambiguously identify different souls within one state namespace.
|
|
128
|
+
|
|
129
|
+
`owns` means responsibility and write routing; `reads` means initial context.
|
|
130
|
+
**Neither is an ACL.** All configured bases are discoverable/readable. Missing
|
|
131
|
+
bindings, owner declarations, base metadata or indexes fail required spawn rather
|
|
132
|
+
than silently bootstrapping empty knowledge.
|
|
133
|
+
|
|
134
|
+
Provisioning is an explicit operator action. Prepare node-map files (the
|
|
135
|
+
`nodes` object above, without its wrapper), then:
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
# New directory base: refuses an existing destination.
|
|
139
|
+
oats okf init --base team --nodes /absolute/config/team-nodes.json --confirm --soul domain-expert --json
|
|
140
|
+
# Git: writes an operator proposal, never pushes or claims acceptance.
|
|
141
|
+
oats okf init --base project --nodes /absolute/config/project-nodes.json --output /absolute/new-bundle-stage --soul domain-expert --json
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Put the Git proposal at the configured root in an operator-owned checkout and
|
|
145
|
+
review/merge it through a PR before spawning working sources. Existing ownership
|
|
146
|
+
changes require an explicit reviewed operator change, not harvest. The standalone
|
|
147
|
+
capability includes JSON Schemas; filesystem containment, ownership and full OKF
|
|
148
|
+
validation remain additional runtime checks.
|
|
149
|
+
|
|
150
|
+
## Working-agent reads and capture
|
|
151
|
+
|
|
152
|
+
At session start, after compaction and on resume, read `STATE.md` and the relevant
|
|
153
|
+
knowledge indexes. `knowledge/view.json` identifies each base's relative path,
|
|
154
|
+
digest and Git accepted head. Content lives under `knowledge/bases/<alias>/`.
|
|
155
|
+
Follow relevant links only; do not bulk-load bases. A link `/expert/decision.md`
|
|
156
|
+
is rooted in **that base**, not filesystem `/`. Consult prior decisions before
|
|
157
|
+
re-deriving them and cite base/node/concept paths.
|
|
158
|
+
|
|
159
|
+
**Working agents never write accepted knowledge or soul knowledge.** This is an
|
|
160
|
+
instruction boundary, not an OS sandbox; tools still have the operator's access.
|
|
161
|
+
Snapshots are immutable by protocol, not live mounts. For current accepted text:
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
# From the source home:
|
|
165
|
+
oats okf read --base project --path expert/index.md --json
|
|
166
|
+
oats okf refresh --json
|
|
167
|
+
# From the deployment context, even after source retirement:
|
|
168
|
+
oats okf read --source /absolute/state/sources/UUID/source.json --base project --path expert/index.md --soul domain-expert --json
|
|
169
|
+
oats okf refresh --source /absolute/state/sources/UUID/source.json --soul domain-expert --json
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
Home-selected commands create a new `knowledge-view-<uuid>/` in that home.
|
|
173
|
+
**Every `--source` read/refresh** places its view under
|
|
174
|
+
`<stateDir>/sources/<source-id>/views/`, even while the source is live. It never
|
|
175
|
+
writes a cache into the invoking repository, a retired home or a replacement
|
|
176
|
+
home. Results identify the actual path and provider receipts. Choose `--home`
|
|
177
|
+
or `--source`, not both. `read` returns full Markdown text; it has no preview cap.
|
|
178
|
+
|
|
179
|
+
A Git PR is not accepted until its merge is visible on the accepted branch.
|
|
180
|
+
Directory reads hold the cooperative publication lock while copying; a pending
|
|
181
|
+
journal blocks fresh views, not existing snapshots. All bases and references
|
|
182
|
+
validate before a view is published. Old views remain available; there is no
|
|
183
|
+
automatic garbage collection.
|
|
184
|
+
|
|
185
|
+
Working agents keep state current, append milestones and capture non-obvious
|
|
186
|
+
insights as Markdown notes with provenance. They are not instructed to run a
|
|
187
|
+
harvest after commits or taught worker mechanics. Capture should be cheap;
|
|
188
|
+
importance is the independent judge's decision.
|
|
189
|
+
|
|
190
|
+
## Durable evidence and retirement
|
|
191
|
+
|
|
192
|
+
Required spawn registers a random source ID outside the home; the home retains
|
|
193
|
+
only a pointer. The durable descriptor freezes bindings, owner destinations,
|
|
194
|
+
source role and allowlisted provenance, not credentials or wholesale launch
|
|
195
|
+
metadata. State includes:
|
|
196
|
+
|
|
197
|
+
```text
|
|
198
|
+
<stateDir>/owners.json
|
|
199
|
+
<stateDir>/sources/<uuid>/source.json
|
|
200
|
+
<stateDir>/sources/<uuid>/status.json
|
|
201
|
+
<stateDir>/sources/<uuid>/inputs/<hash>.json
|
|
202
|
+
<stateDir>/sources/<uuid>/runs/<uuid>/
|
|
203
|
+
<stateDir>/sources/<uuid>/views/
|
|
204
|
+
<stateDir>/migrations/<uuid>/
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
Every capture includes content-versioned **notes AND record**. Changed live notes
|
|
208
|
+
remain untouched. Through the supported `OATS_CLI_BIN` boundary, capture uses
|
|
209
|
+
native `capture --home`, then `recall --ids-only` byte metadata to plan bounded
|
|
210
|
+
windows before fetching full text. Full returned record text is copied into
|
|
211
|
+
custody, not saved as commands that still need the source home. Privacy-excluded
|
|
212
|
+
sessions remain excluded; raw excluded transcripts are not copied.
|
|
213
|
+
|
|
214
|
+
Final capture drains the visible backlog before certifying custody. The capture
|
|
215
|
+
budget is 85 seconds; timeouts, holds, skips, malformed/incomplete records or a
|
|
216
|
+
single turn over 1 MiB fail closed and retain the source home for retry rather
|
|
217
|
+
than truncate evidence. A genuinely empty record is reported honestly.
|
|
218
|
+
Retirement captures/enqueues; **it does not wait for a model or GitHub**.
|
|
219
|
+
After successful custody transfer the home may disappear while judgment and
|
|
220
|
+
publication continue. Unexpected disappearance leaves existing evidence usable
|
|
221
|
+
but reports `finalCaptureUncertified`, not fictitious final capture success.
|
|
222
|
+
Durable evidence has no automatic deletion.
|
|
223
|
+
|
|
224
|
+
One scheduler **command job per source** runs from stable deployment context,
|
|
225
|
+
using the durable descriptor and source soul selector. Dispatch remains activation
|
|
226
|
+
and trust gated after retirement, without inheriting another instance's identity.
|
|
227
|
+
Registration idempotently creates/verifies the job; setup failures are retryable,
|
|
228
|
+
and disabled jobs are not silently re-enabled. No host timer is installed without
|
|
229
|
+
explicit operator consent. See [schedules](schedules.md#okf-v2-source-jobs).
|
|
230
|
+
|
|
231
|
+
## Independent judgment and delivery
|
|
232
|
+
|
|
233
|
+
A worker uses **`work: directory`**, never an attached source tree. It stages
|
|
234
|
+
`work/bases/<alias>/` independently of the source branch, runtime and lifetime.
|
|
235
|
+
It reads durable `input.json` and `staging.json`, edits only owned staged nodes
|
|
236
|
+
and allowed navigation, and writes `judgment.json`. A scaffold-only request
|
|
237
|
+
stops before any model launch. Service agents do not register/capture themselves;
|
|
238
|
+
no-launch sources cannot cause scheduled model launches.
|
|
239
|
+
|
|
240
|
+
OKF's two-part promotion test is: would a future instance act differently, **and**
|
|
241
|
+
could it not discover this by reading the repository? Decisions and rationale,
|
|
242
|
+
rejected alternatives, discovered limits and owned/freshness-marked slow state
|
|
243
|
+
qualify. Code descriptions, task residue, secrets and verbatim third-party
|
|
244
|
+
messages do not. Preserve explicit human acceptance evidence instead of
|
|
245
|
+
re-judging accepted decisions. These are OKF choices, not kernel-wide doctrine.
|
|
246
|
+
|
|
247
|
+
Each input gets `promote`, `merge` or `drop`, a reason and actual concept paths.
|
|
248
|
+
Concepts cite input hashes and record turn IDs. Completion validates ownership,
|
|
249
|
+
base navigation/history, full OKF conformance, baseline, provenance and explicit
|
|
250
|
+
judgment; credential-shaped output checks do not replace human/model judgment.
|
|
251
|
+
Deleting a staged concept requires an explicit removal reason. Workers never
|
|
252
|
+
edit live notes, accepted bases or soul skills themselves.
|
|
253
|
+
|
|
254
|
+
| Provider | Successful delivery |
|
|
255
|
+
|---|---|
|
|
256
|
+
| 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. |
|
|
257
|
+
| 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. |
|
|
258
|
+
|
|
259
|
+
Directory recovery is single-host cooperative recovery, not a distributed
|
|
260
|
+
transaction. Multiple destinations can be partially delivered with separate
|
|
261
|
+
receipts. Inputs are processed only when required destinations resolve. All-drop
|
|
262
|
+
or no-change judgment can be successful without inventing a PR. Enqueue, worker
|
|
263
|
+
spawn and command exit alone are not successful learning.
|
|
264
|
+
|
|
265
|
+
## Inspection and operator commands
|
|
266
|
+
|
|
267
|
+
Run home-local commands from that source home. For cross-source or retired-source
|
|
268
|
+
commands, use the durable deployment context in a clean operator shell without
|
|
269
|
+
another instance's `OATS_*`/`PI_*` identity; select the configured source soul.
|
|
270
|
+
|
|
271
|
+
```bash
|
|
272
|
+
# Read-only; no capture, refresh, scheduling or worker launch:
|
|
273
|
+
oats okf inspect --home /absolute/instance-home --json
|
|
274
|
+
oats operation run knowledge:inspect --home /absolute/instance-home --json
|
|
275
|
+
# Durable source selection after the home disappears:
|
|
276
|
+
oats okf inspect --source /absolute/state/sources/UUID/source.json --soul domain-expert --json
|
|
277
|
+
# Explicit manual request; --no-launch still captures and creates a worker scaffold:
|
|
278
|
+
oats okf harvest --no-launch --json
|
|
279
|
+
oats okf run-source --source /absolute/state/sources/UUID/source.json --manual --no-launch --soul domain-expert --json
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
`inspect` reports frozen `owns`, `reads`, `bases`, the registered `acceptedView`
|
|
283
|
+
(not a fresh accepted-branch read), durable capture/processing/delivery/acceptance
|
|
284
|
+
receipts and scheduler health. `status.lastCapture` is the last attempt, not
|
|
285
|
+
proof the source is still present.
|
|
286
|
+
|
|
287
|
+
For a **live identity-matching source**, `documents` includes labeled Markdown:
|
|
288
|
+
`Working state (STATE.md)`, `Log (log.md)` and sorted `Pending note: <name>`
|
|
289
|
+
entries, including nested notes. Missing documents are omitted. A
|
|
290
|
+
`Durable processing receipts` text document follows. `liveMemory` supplies
|
|
291
|
+
`available`, `reason` and `observedAt`. Retired, missing, reused or unverified
|
|
292
|
+
homes expose only durable documents, with an explicit reason. Inspection checks
|
|
293
|
+
the source pointer and any instance metadata before and after reading; it rejects
|
|
294
|
+
unsafe live files/symlinks/hard links instead of returning a partial success.
|
|
295
|
+
Unsafe home identity withholds live memory but retains durable inspection. This
|
|
296
|
+
is a best-effort live observation, not a locked multi-file snapshot.
|
|
297
|
+
|
|
298
|
+
Inspection retains the **explicit 256 KiB per-document preview cap**. Larger
|
|
299
|
+
documents report `truncated: true` and original `bytes`; smaller documents are
|
|
300
|
+
byte-exact. The **whole JSON envelope drains through stdout**, even with large
|
|
301
|
+
receipts or multiple Markdown documents. Do not confuse this labeled preview
|
|
302
|
+
with evidence capture or `read`: those preserve full returned text.
|
|
303
|
+
|
|
304
|
+
Completion uses the worker's generated, safely quoted command:
|
|
305
|
+
|
|
306
|
+
```bash
|
|
307
|
+
oats okf complete --source /absolute/state/sources/UUID/source.json --run RUN_UUID --judgment /absolute/worker/work/judgment.json --soul domain-expert --json
|
|
308
|
+
oats okf retry --source /absolute/state/sources/UUID/source.json --soul domain-expert --json
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
Retry preserves uncertain delivery. `--launch` explicitly starts a ready worker;
|
|
312
|
+
`--rejudge` preserves old proposals and refreshes only outstanding destinations,
|
|
313
|
+
never redelivering settled ones. A pending directory journal must recover, not
|
|
314
|
+
be removed to force rejudgment. After a PR merges, repeat `complete` for the
|
|
315
|
+
same source/run without `--judgment` to reconcile acceptance. If launch status
|
|
316
|
+
is unknown, inspect the worker session before retrying. See the
|
|
317
|
+
[standalone runtime guide](https://github.com/awebai/oats-okf#independent-worker-and-completion)
|
|
318
|
+
for exact recovery, adoption and lock-release procedures.
|
|
134
319
|
|
|
135
320
|
## Without a knowledge integration
|
|
136
321
|
|
|
137
|
-
`knowledge: none` is valid. The
|
|
138
|
-
|
|
139
|
-
|
|
322
|
+
`capabilities.layers.knowledge: none` is valid. The kernel creates no OKF state,
|
|
323
|
+
notes, bundle or harvest flow. Other capabilities may adopt, adapt or replace
|
|
324
|
+
the reference model; they do not inherit OKF's directories or judge. Native
|
|
325
|
+
record capture remains a separate surface. Selecting `none` is not a data
|
|
326
|
+
migration and does not erase existing memory.
|
package/docs/layers.md
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Status: contracts on paper (migration step 2 of
|
|
4
4
|
[the 2026-09-03 architecture proposal](2026-09-03-architecture-proposal.md)).
|
|
5
|
-
|
|
5
|
+
Sections distinguish **shipped**, **prepared** and **proposed** behavior.
|
|
6
|
+
The knowledge section describes the prepared OKF v2 integration; its release
|
|
7
|
+
gates are explicit in [v0.23.1 notes](release-notes/v0.23.1.md). A
|
|
6
8
|
proposed clause describes the contract the kernel will be refactored toward;
|
|
7
9
|
it is not a claim about current behavior, and the shipped documents
|
|
8
10
|
([souls and instances](souls-and-instances.md),
|
|
@@ -127,65 +129,58 @@ kernel's code has no branch that names either.
|
|
|
127
129
|
|
|
128
130
|
## The knowledge contract
|
|
129
131
|
|
|
130
|
-
**Shipped.**
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
**Proposed.** The harvester's input widens from the agent's own notes to the
|
|
184
|
-
capture contract (below), so lessons reach the soul even when an agent wrote
|
|
185
|
-
no notes; the promotion doctrine is unchanged, only the input channel widens.
|
|
186
|
-
|
|
187
|
-
**Test.** A plain-Markdown or wiki-backed implementation beside `oats.okf`,
|
|
188
|
-
each with its own harvester; a soul's `AGENTS.md` unchanged between them.
|
|
132
|
+
**Shipped kernel contract.** Zero or one knowledge capability per soul,
|
|
133
|
+
selected under `capabilities.layers.knowledge`. `none` creates no
|
|
134
|
+
provider memory or harvest flow and does not delete existing state. The kernel
|
|
135
|
+
owns neither the format nor a mandatory promotion doctrine.
|
|
136
|
+
|
|
137
|
+
**Prepared reference implementation: oats.okf 2.0.0 / framework v0.23.1.**
|
|
138
|
+
All accepted knowledge is external. Explicit bindings name Git or non-Git
|
|
139
|
+
bases; `soul/okf.json` declares stable ownership and read references, while
|
|
140
|
+
`okf-base.json` identifies accepted nodes. Missing configuration or knowledge
|
|
141
|
+
fails working-source spawn, never creates an empty substitute.
|
|
142
|
+
|
|
143
|
+
*Read.* Sources consult immutable accepted views, index-first and selectively.
|
|
144
|
+
Prior rationale should be consulted rather than re-derived. OKF's `owns` routes
|
|
145
|
+
responsibility and `reads` chooses starting context: neither is an ACL, and all
|
|
146
|
+
configured bases are discoverable/readable. Cannot-write is instruction, not an
|
|
147
|
+
OS sandbox. A directory publication journal blocks fresh views; Git readers see
|
|
148
|
+
only the accepted branch, not an open PR.
|
|
149
|
+
|
|
150
|
+
*Capture and judgment.* Working agents capture state/log/notes; durable source
|
|
151
|
+
custody also copies full native record windows through the public CLI. A separate
|
|
152
|
+
worker judges from frozen input without needing the source home, worktree or
|
|
153
|
+
model. Source retirement waits for certified capture, not a model or GitHub.
|
|
154
|
+
Workers use independent `directory` execution and never edit source notes or
|
|
155
|
+
soul skills. Existing hooks and per-source command schedules supply this flow;
|
|
156
|
+
the proposed generic `harvest` event above is not implemented or required.
|
|
157
|
+
|
|
158
|
+
*Delivery custody.* Knowledge placement, not soul residency or work mode,
|
|
159
|
+
determines delivery. All Git bases use verified PR-only delivery with separate
|
|
160
|
+
merge-visible acceptance. Genuine non-Git directories use cooperative locks,
|
|
161
|
+
baseline comparison, journalled publication and validated receipts, without Git
|
|
162
|
+
or gh. There is no direct Git fallback and no cross-base distributed transaction.
|
|
163
|
+
Source descriptors, proposals and processing/delivery/acceptance receipts outlive
|
|
164
|
+
source retirement. Inspection can show matching live Markdown plus durable
|
|
165
|
+
receipts; missing/reused homes cannot supply live memory for an old source.
|
|
166
|
+
|
|
167
|
+
*Reference promotion doctrine.* OKF accepts durable behavior-changing judgment
|
|
168
|
+
that is not recoverable merely by reading code: rationale, rejected alternatives,
|
|
169
|
+
discovered limits and maintained slow state. It rejects code descriptions, task
|
|
170
|
+
residue, secrets and verbatim third-party messages. Human-accepted decisions keep
|
|
171
|
+
acceptance evidence; maintained state needs an owner and freshness discipline.
|
|
172
|
+
One canonical concept is preferable to copied claims. These are the default
|
|
173
|
+
capability's choices, not a compulsory judge for every knowledge implementation.
|
|
174
|
+
|
|
175
|
+
See [the runtime guide](knowledge.md) and [v1 migration](knowledge-migration.md)
|
|
176
|
+
for current commands and constraints. The [reference theory](knowledge-theory.md)
|
|
177
|
+
and [authoring curriculum](knowledge-capability-authoring.md) are optional;
|
|
178
|
+
capabilities may adopt, adapt or replace them and own their complete runtime.
|
|
179
|
+
|
|
180
|
+
**Test.** OKF's Git and directory providers exercise independent custody within
|
|
181
|
+
one capability. A second knowledge capability with a different model remains a
|
|
182
|
+
separate replaceability test; two OKF providers do not prove that test by
|
|
183
|
+
renaming them as two integrations.
|
|
189
184
|
|
|
190
185
|
## The tasks contract
|
|
191
186
|
|
|
@@ -260,8 +255,8 @@ them.
|
|
|
260
255
|
`packages/record` captures Claude Code, Pi, and Codex transcripts plus aw
|
|
261
256
|
client logs. It skips sources matched by the local record's ignore list. It
|
|
262
257
|
stores captured turns in an append-only, content-addressed record with a search
|
|
263
|
-
index (`oats setup`, `oats capture`, `oats recall`). It is not a capability
|
|
264
|
-
|
|
258
|
+
index (`oats setup`, `oats capture`, `oats recall`). It is not a capability. A knowledge capability may consume source-targeted
|
|
259
|
+
capture/recall through the supported CLI boundary, as OKF v2 does.
|
|
265
260
|
|
|
266
261
|
**Contract.** The format of ephemeral state. Two kinds satisfy it: an agent's
|
|
267
262
|
own notes (its report of what mattered, today created by the knowledge
|
|
@@ -11,6 +11,12 @@ kernel does not read `oas-*` configuration names or `oas.*` capability IDs.
|
|
|
11
11
|
An unchanged agent-directory layout can make an old scope look familiar
|
|
12
12
|
while its knowledge and messaging configuration remains unmigrated.
|
|
13
13
|
|
|
14
|
+
> **Separate knowledge cutover:** OAS/package name migration does not migrate
|
|
15
|
+
> soul knowledge, source memory or v1 watermarks to OKF v2. If the selected
|
|
16
|
+
> catalog update acquires OKF 2.0.0, plan [knowledge preservation and cutover](knowledge-migration.md)
|
|
17
|
+
> before activation/spawn. The v2 integration is [prepared](release-notes/v0.23.1.md),
|
|
18
|
+
> not a claim that those dependencies or any deployment have already changed.
|
|
19
|
+
|
|
14
20
|
## Upgrade one scope
|
|
15
21
|
|
|
16
22
|
Finish or preserve active work before changing a daily-use deployment.
|
|
@@ -83,4 +89,4 @@ requirement to wait for OATS publication.
|
|
|
83
89
|
|
|
84
90
|
See the [0.22.0 release notes](release-notes/v0.22.0.md) for the rename,
|
|
85
91
|
package versions, and compatibility changes, and the
|
|
86
|
-
[first-team qualification](first-team-demo.md) for
|
|
92
|
+
[first-team qualification](first-team-demo.md) for historical v1 operating evidence.
|