@awebai/oats 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +380 -0
- package/bin/oats.mjs +3294 -0
- package/capabilities/oats-authoring/oats.json +12 -0
- package/capabilities/oats-aweb/bin/oats-aweb.mjs +297 -0
- package/capabilities/oats-aweb/injects/aweb.md +55 -0
- package/capabilities/oats-aweb/oats.json +47 -0
- package/capabilities/oats-aweb/package.json +20 -0
- package/capabilities/oats-jira/bin/oats-jira.mjs +40 -0
- package/capabilities/oats-jira/injects/jira.md +10 -0
- package/capabilities/oats-jira/oats.json +22 -0
- package/capabilities/oats-jira/package.json +25 -0
- package/capabilities/oats-jira/skills/jira-tasks/SKILL.md +176 -0
- package/capabilities/oats-linear/README.md +234 -0
- package/capabilities/oats-linear/bin/oats-linear-hook.mjs +32 -0
- package/capabilities/oats-linear/bin/oats-linear.mjs +344 -0
- package/capabilities/oats-linear/injects/linear.md +8 -0
- package/capabilities/oats-linear/oats.json +24 -0
- package/capabilities/oats-linear/package.json +29 -0
- package/capabilities/oats-linear/skills/linear-tasks/SKILL.md +217 -0
- package/capabilities/oats-linear/test/oats-linear.test.mjs +168 -0
- package/capabilities/oats-okf/agents/memory-harvest.md +25 -0
- package/capabilities/oats-okf/bin/oats-okf.mjs +283 -0
- package/capabilities/oats-okf/injects/okf.md +62 -0
- package/capabilities/oats-okf/oats.json +20 -0
- package/capabilities/oats-okf/package.json +22 -0
- package/capabilities/oats-okf/skills/memory-harvest/SKILL.md +100 -0
- package/capabilities/oats-okf/skills/okf/SKILL.md +107 -0
- package/capabilities/oats-okf/skills/okf/scripts/okf-validate.mjs +123 -0
- package/capabilities/oats-review/agents/reviewer/AGENTS.md +53 -0
- package/capabilities/oats-review/agents/reviewer/soul.yaml +6 -0
- package/capabilities/oats-review/injects/review.md +68 -0
- package/capabilities/oats-review/oats.json +10 -0
- package/capabilities/oats-review/skills/code-review/SKILL.md +44 -0
- package/capabilities/oats-review/skills/security-review/SKILL.md +59 -0
- package/docs/capabilities.md +505 -0
- package/docs/capability-manifest.schema.json +223 -0
- package/docs/configuration.md +482 -0
- package/docs/conventions.md +73 -0
- package/docs/design/desktop-ux-plan.md +362 -0
- package/docs/design/package-engine-contract.md +813 -0
- package/docs/design/package-runtime-api.md +414 -0
- package/docs/desktop-cli-api.md +89 -0
- package/docs/desktop-succession.md +51 -0
- package/docs/desktop.md +187 -0
- package/docs/implementation.md +282 -0
- package/docs/integrations.md +123 -0
- package/docs/knowledge-theory.md +97 -0
- package/docs/knowledge.md +139 -0
- package/docs/layers.md +110 -0
- package/docs/migration-from-oas.md +122 -0
- package/docs/oats-config.schema.json +140 -0
- package/docs/oats-lock.schema.json +175 -0
- package/docs/oats-package.schema.json +129 -0
- package/docs/packages.md +442 -0
- package/docs/release-lane.md +132 -0
- package/docs/release-notes/v0.18.2.md +79 -0
- package/docs/release-notes/v0.18.3.md +63 -0
- package/docs/release-notes/v0.18.4.md +65 -0
- package/docs/release-notes/v0.18.5.md +66 -0
- package/docs/release-notes/v0.18.6.md +87 -0
- package/docs/release-notes/v0.19.0.md +186 -0
- package/docs/release-notes/v0.19.1.md +24 -0
- package/docs/release-notes/v0.19.2.md +32 -0
- package/docs/release-notes/v0.19.3.md +16 -0
- package/docs/release-notes/v0.19.4.md +12 -0
- package/docs/release-notes/v0.20.0.md +89 -0
- package/docs/release-notes/v0.22.0.md +180 -0
- package/docs/souls-and-instances.md +344 -0
- package/injects/framework-workspace.md +7 -0
- package/injects/instance-boundary.md +43 -0
- package/injects/local-soul.md +19 -0
- package/injects/oats.md +11 -0
- package/injects/work-attached.md +16 -0
- package/injects/work-checkout.md +12 -0
- package/injects/work-workspace.md +22 -0
- package/injects/work-worktree.md +13 -0
- package/lib/core.mjs +6792 -0
- package/lib/packages.mjs +1375 -0
- package/lib/tmux-config.mjs +35 -0
- package/package-catalog.json +44 -0
- package/package.json +55 -0
- package/packages/record/README.md +151 -0
- package/packages/record/bin/capture.mjs +256 -0
- package/packages/record/bin/recall.mjs +102 -0
- package/packages/record/bin/setup.mjs +281 -0
- package/packages/record/bin/turn-record.mjs +47 -0
- package/packages/record/docs/turn-record-sot.md +350 -0
- package/packages/record/lib/canonical.mjs +151 -0
- package/packages/record/lib/capture-aw.mjs +179 -0
- package/packages/record/lib/capture-cc.mjs +322 -0
- package/packages/record/lib/formats.mjs +296 -0
- package/packages/record/lib/ignore.mjs +155 -0
- package/packages/record/lib/index-db.mjs +524 -0
- package/packages/record/lib/project-aweb.mjs +251 -0
- package/packages/record/lib/segments.mjs +186 -0
- package/packages/record/lib/store.mjs +447 -0
- package/packages/record/lib/tags.mjs +114 -0
- package/packages/record/package.json +45 -0
- package/packages/record/test/vectors/README.md +34 -0
- package/packages/record/test/vectors/aweb-projection-v1.json +231 -0
- package/packages/record/test/vectors/journal-merge-v1.json +261 -0
- package/packages/record/test/vectors/turn-id-v1.json +152 -0
- package/packages/record/test/vectors/validate.mjs +391 -0
- package/skills/integration-authoring/SKILL.md +76 -0
- package/skills/oats/SKILL.md +151 -0
- package/skills/oats-config/SKILL.md +162 -0
- package/skills/oats-getting-started/SKILL.md +159 -0
- package/skills/oats-packages/SKILL.md +180 -0
- package/skills/oats-support/SKILL.md +79 -0
- package/skills/skill-craft/SKILL.md +109 -0
- package/skills/soul-craft/SKILL.md +109 -0
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: oats-config
|
|
3
|
+
description: >-
|
|
4
|
+
How to configure OATS deployments with oats-config.yaml and the oats CLI.
|
|
5
|
+
Use for capability activation, fundamental-layer integrations, agent
|
|
6
|
+
types, targeting souls, binding settings, injection overrides, config
|
|
7
|
+
scopes, or adopting a package config template. Triggers: "bind a layer",
|
|
8
|
+
"target these souls", "agent type", "override an injection", "oats use",
|
|
9
|
+
"oats init", "configure OATS", "oats-config.yaml", "adopt a config template".
|
|
10
|
+
Package acquisition/update/remove, locks, restore, and trust mechanics
|
|
11
|
+
belong to the oats-packages skill.
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Configuring OATS
|
|
15
|
+
|
|
16
|
+
Config lives in `oats-config.yaml` at laptop (`~`), workspace, and repository
|
|
17
|
+
levels; resolution walks from a soul's repository outward, closest scope wins.
|
|
18
|
+
Prefer the CLI for config edits (`oats init`, `oats use`, `oats type`,
|
|
19
|
+
`oats inject eject`, `oats create --type`); hand-editing is valid but the CLI
|
|
20
|
+
writes the canonical shape.
|
|
21
|
+
|
|
22
|
+
## Shape
|
|
23
|
+
|
|
24
|
+
```yaml
|
|
25
|
+
team: # deployment boundary (typically workspace scope)
|
|
26
|
+
name: lfx-engineering
|
|
27
|
+
# id: lfx-engineering:example.com # provider team id (aweb <name>:<namespace>)
|
|
28
|
+
agent-types:
|
|
29
|
+
developers:
|
|
30
|
+
description: Agents that build the service
|
|
31
|
+
capabilities:
|
|
32
|
+
layers: # exclusive fundamental slots
|
|
33
|
+
knowledge:
|
|
34
|
+
capability: oats.okf
|
|
35
|
+
from: installed # enforced provenance: installed|owned|path:<dir>
|
|
36
|
+
# injection-override: .agents/injections/capabilities/oats.okf.md
|
|
37
|
+
messaging: none # explicit none suppresses inherited integrations
|
|
38
|
+
tasks: none
|
|
39
|
+
additive: # non-exclusive packages
|
|
40
|
+
vendor.review:
|
|
41
|
+
from: installed
|
|
42
|
+
agent-types:
|
|
43
|
+
developers:
|
|
44
|
+
enabled: true
|
|
45
|
+
settings: {depth: normal}
|
|
46
|
+
souls:
|
|
47
|
+
api-expert:
|
|
48
|
+
enabled: true
|
|
49
|
+
settings: {depth: exhaustive}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
`global` means every soul governed by the declaring level. Bindings can also
|
|
53
|
+
target **agent types** (families — declared in config via `oats type add`,
|
|
54
|
+
joined via `type: <name>` in each soul.yaml) and individual souls. Matching
|
|
55
|
+
global + agent-type + soul bindings compose. Settings precedence is
|
|
56
|
+
soul > agent-type > global, then closer config. Equal-specificity conflicts
|
|
57
|
+
error. `false`/`enabled: false` is an explicit exclusion and follows the same
|
|
58
|
+
precedence. V1 does not target instances or use tags/selectors.
|
|
59
|
+
|
|
60
|
+
The closest `team:` declaration marks the deployment boundary: all repos
|
|
61
|
+
under it share one team (identity + `oats status --team` discovery + the
|
|
62
|
+
messaging provider's team). Declare it once at the workspace scope. With
|
|
63
|
+
aweb messaging active, `oats aweb setup` walks the onboarding (aw CLI →
|
|
64
|
+
workspace init → team create/join) and `oats aweb roster` shows the
|
|
65
|
+
cross-machine member directory.
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
oats type add <name> [--description <d>] [--dir <level>]
|
|
69
|
+
oats type list
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Injection overrides
|
|
73
|
+
|
|
74
|
+
Capability entries and the `oats:` kernel block take an
|
|
75
|
+
`injection-override: <path>|none|default`. Work-mode briefings are packaged
|
|
76
|
+
and NOT overridable; the only work-mode key is `setup:` (env bootstrap run in
|
|
77
|
+
each new worktree). The clean path is ejecting:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
oats inject eject <capability-id|oats> [--dir <level>]
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
It copies the packaged default to the conventional
|
|
84
|
+
`.agents/injections/{capabilities/<id>.md, oats-defaults/oats.md}` path and
|
|
85
|
+
sets the override — the file then stops
|
|
86
|
+
tracking package updates, deliberately. Overrides are **not allowed** on
|
|
87
|
+
`from: owned`/`path:` capabilities: the scope owns the package source, so
|
|
88
|
+
edit `.agents/capabilities/owned/<id>/injects/` directly.
|
|
89
|
+
|
|
90
|
+
## Activate
|
|
91
|
+
|
|
92
|
+
Acquisition, trust, and package lifecycle → the **oats-packages** skill. The
|
|
93
|
+
config side is activation and targeting of already-acquired capabilities
|
|
94
|
+
(acquired or catalog availability never implies activation):
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
oats use <capability> --global [--dir <level>]
|
|
98
|
+
oats use <capability> --type <agent-type> [--disable]
|
|
99
|
+
oats use <capability> --soul <name> [--settings k=v [k2=v2 ...]]
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
`oats init` creates config and activates only explicit defaults.
|
|
103
|
+
|
|
104
|
+
## Package config templates
|
|
105
|
+
|
|
106
|
+
A distribution package can ship reference **config templates**. Adopting one
|
|
107
|
+
writes it as this scope's ordinary `oats-config.yaml` and records the exact
|
|
108
|
+
template as a commit-safe **adopted base** — provenance, never live inheritance.
|
|
109
|
+
Installing the package alone adopts no template.
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
oats init --package <id|path|git-url> [--config <name>] # acquire + adopt one template
|
|
113
|
+
oats config diff # report drift; never merges
|
|
114
|
+
oats config sync [--accept <regionId>=local|package] # apply upstream; keep local edits
|
|
115
|
+
oats config sync --reset --yes # discard local; take the template verbatim
|
|
116
|
+
oats config adopt <package> [--config <name>] # switch to a different base
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
The config is yours: retarget, disable, re-set, or replace anything the template
|
|
120
|
+
enabled; nested repository configs override it per the normal cascade; package
|
|
121
|
+
updates never rewrite it or the adopted base. `oats config sync` preserves your
|
|
122
|
+
untouched bytes, comments, and formatting, and a region changed both locally and
|
|
123
|
+
upstream is a conflict you must resolve explicitly. See docs/packages.md for the
|
|
124
|
+
full adoption and sync UX.
|
|
125
|
+
|
|
126
|
+
## Fundamental layers
|
|
127
|
+
|
|
128
|
+
Knowledge, messaging, and tasks are formal exclusive contracts. A package
|
|
129
|
+
manifest declaring one `layer` is an integration. Two active integrations for
|
|
130
|
+
the same layer error; a closer scope's entry (or `none`) overrides outer ones.
|
|
131
|
+
|
|
132
|
+
| Layer | Bundled | Requirement |
|
|
133
|
+
|---|---|---|
|
|
134
|
+
| knowledge | `oats.okf` | none |
|
|
135
|
+
| messaging | `oats.aweb` | `aw` CLI |
|
|
136
|
+
| tasks | none by default; `oats.jira` or `oats.linear` available | provider-specific |
|
|
137
|
+
|
|
138
|
+
Activation uses the manifest-declared layer — `oats use` writes the entry
|
|
139
|
+
under `capabilities.layers.<layer>` automatically:
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
oats use <capability> --global|--type <agent-type>|--soul <name>
|
|
143
|
+
oats use none --layer <layer>
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
`capabilities` is the only activation map: fundamental integrations under
|
|
147
|
+
`capabilities.layers.<layer>` (entry or explicit `none`), everything else
|
|
148
|
+
under `capabilities.additive`.
|
|
149
|
+
|
|
150
|
+
Rare hand-edited keys: `skill-overrides:` (names the winning source on
|
|
151
|
+
duplicate skill names), the top-level `agents-md-injection:` map (extra
|
|
152
|
+
unconditional instruction blocks), `templates:` (named init seeds).
|
|
153
|
+
|
|
154
|
+
## Verify
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
oats doctor [context] [--soul <name>] [--json]
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
Doctor shows config chain, acquired/active packages, layer selection, target
|
|
161
|
+
and settings provenance, requirements, trust, skill sources, instruction
|
|
162
|
+
blocks, and — with `--soul` — the final composed AGENTS.md.
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: oats-getting-started
|
|
3
|
+
description: >-
|
|
4
|
+
How to set up OATS (Open Agent Team Specification) in a workspace from scratch —
|
|
5
|
+
install the CLI/pi adapter, choose fundamental-layer integrations and shared
|
|
6
|
+
capabilities, create oats-config.yaml, and create/spawn the first specialized
|
|
7
|
+
agent. Use for "get started with OATS", "set up/install/adopt OATS", "create
|
|
8
|
+
my first agent", or "how do I start using OATS".
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Getting started with OATS
|
|
12
|
+
|
|
13
|
+
OATS gives a workspace durable specialized **souls**, disposable **instances**,
|
|
14
|
+
and targetable **capability packages**. Do not run setup blindly: present each
|
|
15
|
+
default and ask the user before writing config or spawning agents.
|
|
16
|
+
|
|
17
|
+
## 1. Install
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npm install -g @awebai/oats
|
|
21
|
+
pi install npm:@awebai/oats-pi
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
The CLI/kernel is runtime-neutral. The pi adapter supplies only minimal runtime
|
|
25
|
+
glue. Install matching versions and upgrade both packages together. Exact pi
|
|
26
|
+
isolation needs the kernel's launch flags and the changed adapter's
|
|
27
|
+
instance-only discovery. Reload pi after installing or upgrading the adapter.
|
|
28
|
+
|
|
29
|
+
This skill is the one pre-workspace ambient bootstrap. Spawned instances
|
|
30
|
+
receive exact local skills.
|
|
31
|
+
|
|
32
|
+
## 2. Choose scope
|
|
33
|
+
|
|
34
|
+
`oats-config.yaml` can live at:
|
|
35
|
+
|
|
36
|
+
- laptop (`~/oats-config.yaml`): defaults for governed workspaces;
|
|
37
|
+
- workspace: shared multi-repo policy; or
|
|
38
|
+
- repository: repo-specific policy.
|
|
39
|
+
|
|
40
|
+
Ask which scope the user intends. `oats init` detects home as laptop, a `.git`
|
|
41
|
+
root as repository, and another directory as workspace.
|
|
42
|
+
|
|
43
|
+
## 3. Present fundamental-layer defaults
|
|
44
|
+
|
|
45
|
+
Knowledge, messaging, and tasks remain formal, exclusive slots. Their
|
|
46
|
+
implementations are capability packages called integrations.
|
|
47
|
+
|
|
48
|
+
| Layer | Default | Gives | Needs |
|
|
49
|
+
|---|---|---|---|
|
|
50
|
+
| knowledge | `oats.okf` | soul OKF bundle, instance memory, harvest | nothing |
|
|
51
|
+
| messaging | `oats.aweb` | instance identity and team messaging | `aw` CLI |
|
|
52
|
+
| tasks | none | choose Jira, Linear, or another integration | provider-specific |
|
|
53
|
+
|
|
54
|
+
Present these defaults to the user and ask before creating config. Common
|
|
55
|
+
choices: disable messaging for a solo repo; choose `oats.linear`/`oats.jira` for
|
|
56
|
+
tasks; use `--raw` for all layers off. Official integrations are acquired like
|
|
57
|
+
any other package; `oats init` acquires the selected ones into this scope's
|
|
58
|
+
installed/ store (locked). Executable surfaces (like OKF's harvest) need
|
|
59
|
+
`oats trust` before use — acquisition never grants executable trust. In an
|
|
60
|
+
interactive terminal with no layer flags, bare `oats init` prompts per layer;
|
|
61
|
+
through an agent, always pass explicit flags.
|
|
62
|
+
|
|
63
|
+
If the user keeps aweb messaging: declare the team in the deployment scope's
|
|
64
|
+
config (`team:` with a name; see the oats-config skill), then run
|
|
65
|
+
`oats aweb setup` — it checks the `aw` CLI, the aweb workspace at the team
|
|
66
|
+
scope, and team membership, and prints exactly the one next step each time
|
|
67
|
+
(including first-ever aweb account creation via `aw init`). Users who have
|
|
68
|
+
never used aweb just follow its prompts; nothing else is required.
|
|
69
|
+
|
|
70
|
+
Also ask whether they want normal mouse/trackpad scrolling in tmux agent
|
|
71
|
+
windows. Pass the answer explicitly when commands run through an agent, because
|
|
72
|
+
that shell is non-interactive:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
oats init --tmux-mouse
|
|
76
|
+
oats init --messaging none --tmux-mouse
|
|
77
|
+
oats init --raw --knowledge oats.okf --no-tmux-mouse
|
|
78
|
+
oats init --tasks oats.linear --tmux-mouse
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
The scrolling option appends `set -g mouse on` to the existing `~/.tmux.conf`
|
|
82
|
+
or XDG tmux config and reloads a running server; it never changes terminal
|
|
83
|
+
keyboard mappings. An interactive terminal prompts when neither tmux flag is
|
|
84
|
+
provided.
|
|
85
|
+
|
|
86
|
+
`init` activates only packages explicitly represented by the layer choices;
|
|
87
|
+
it acquires the chosen layer capabilities into this scope's installed/ store, and does not activate anything else.
|
|
88
|
+
|
|
89
|
+
## 4. Decide shared capability targets
|
|
90
|
+
|
|
91
|
+
Ask whether reusable non-layer capabilities should apply to:
|
|
92
|
+
|
|
93
|
+
- every soul governed by this config (`global`);
|
|
94
|
+
- an explicit agent type (family — souls opt in via `type:` in soul.yaml); or
|
|
95
|
+
- one soul.
|
|
96
|
+
|
|
97
|
+
Do not invent agent types before the souls are known. Example after agents exist:
|
|
98
|
+
|
|
99
|
+
```yaml
|
|
100
|
+
agent-types:
|
|
101
|
+
developers:
|
|
102
|
+
description: Agents that build the product
|
|
103
|
+
capabilities:
|
|
104
|
+
additive:
|
|
105
|
+
vendor.code-review:
|
|
106
|
+
from: installed
|
|
107
|
+
agent-types:
|
|
108
|
+
developers: true
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
External packages must be acquired/locked before activation; executable
|
|
112
|
+
commands, hooks, and launch-environment authority need explicit trust. The
|
|
113
|
+
minimal first-time sequence — this skill is the only one available before the
|
|
114
|
+
first spawn, so it carries the bootstrap commands directly:
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
oats install <git-url|path> --dir /path/to/workspace # acquire + exact-lock; inactive
|
|
118
|
+
oats trust vendor.code-review --dir /path/to/workspace # approve executable surfaces
|
|
119
|
+
oats use vendor.code-review --type developers --dir /path/to/workspace
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Acquisition never means activation and never silently updates a lock. Never
|
|
123
|
+
hand-edit `oats-lock.json` or installed stores — the CLI owns them. Anything
|
|
124
|
+
beyond this bootstrap (updates, removal, lock restore/migration,
|
|
125
|
+
requirements, package diagnosis) belongs to the `oats-packages` skill — part
|
|
126
|
+
of the kernel baseline inside spawned instances; in this pre-workspace
|
|
127
|
+
context use docs/packages.md and the top-level `oats help` output.
|
|
128
|
+
|
|
129
|
+
## 5. Verify
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
oats doctor /path/to/context --json
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
After creating a soul, use `--soul <name>` to inspect its exact capabilities,
|
|
136
|
+
skills, trust, and final generated `AGENTS.md` before spawn.
|
|
137
|
+
|
|
138
|
+
## 6. Create and spawn the first specialist
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
mkdir -p agents
|
|
142
|
+
oats create backend-expert --description "Owns backend architecture and implementation" --work worktree
|
|
143
|
+
# Optional: --type <agent-type> joins a declared family so typed config targets apply.
|
|
144
|
+
# Edit agents/backend-expert/soul/AGENTS.md: durable role, boundaries, workflow.
|
|
145
|
+
oats doctor . --soul backend-expert
|
|
146
|
+
oats spawn backend-expert --task "First concrete task"
|
|
147
|
+
oats status
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
The committed soul stays config-independent. Spawn generates instance
|
|
151
|
+
instructions and materializes only kernel + soul + active capability skills in
|
|
152
|
+
that instance. Do not put deployment-specific package prose into the soul.
|
|
153
|
+
|
|
154
|
+
Create/spawn only when asked. Suggest a team shape, then let the user decide.
|
|
155
|
+
For operations load the `oats` skill; for local deployment policy and
|
|
156
|
+
config-template adoption use `oats-config`; package acquisition/locks/trust beyond the
|
|
157
|
+
bootstrap above belong to `oats-packages` (kernel baseline inside spawned
|
|
158
|
+
instances); for custom layer/package work use `integration-authoring`; for
|
|
159
|
+
deep architecture or bugs use `oats-support`.
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: oats-packages
|
|
3
|
+
description: >-
|
|
4
|
+
How to acquire, lock, restore, trust, update, remove, and migrate OATS
|
|
5
|
+
distribution packages with the oats CLI. Use for package sources (git/local/
|
|
6
|
+
official catalog), oats-lock.json v2, all-or-nothing scope migration, exact restore,
|
|
7
|
+
per-capability executable trust, runtime dependency closures, or package
|
|
8
|
+
doctor failures. Triggers: "install a package", "oats install", "oats list",
|
|
9
|
+
"oats update", "oats remove", "oats migrate", "oats trust", "lockfileVersion",
|
|
10
|
+
"integrity drift", "package won't restore".
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# OATS distribution packages
|
|
14
|
+
|
|
15
|
+
A **package** is the install/update/review unit: one git repo (or local dir)
|
|
16
|
+
with an `oats-package.json` exporting one or more **capabilities** (the
|
|
17
|
+
activation unit) and optional config templates. Acquiring a package activates
|
|
18
|
+
NOTHING — activation stays in `oats-config.yaml` (see the oats-config skill).
|
|
19
|
+
Never hand-edit `oats-lock.json` or the stores; every operation below is a CLI
|
|
20
|
+
command, and all of them take `--json` (one stdout envelope, stable error
|
|
21
|
+
codes) and `--dir <scope>`.
|
|
22
|
+
|
|
23
|
+
## Sources
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
oats install git:github.com/org/repo@v1.0.0 # git shorthand (ref optional; resolved once, exact-locked)
|
|
27
|
+
oats install https://host/org/repo.git@v1.0.0 # raw HTTPS/SSH git URL
|
|
28
|
+
oats install ../my-package # local path (dev escape hatch)
|
|
29
|
+
oats install <catalog-id> # official catalog short id (identity only — no auto-trust)
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Which directory in the repo is the package?
|
|
33
|
+
|
|
34
|
+
A git repository CONTAINS a package; it is not one. The package root is the
|
|
35
|
+
directory carrying `oats-package.json`, and a git source selects it with a
|
|
36
|
+
`#<path>` fragment after any `@ref`:
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
oats install git:github.com/org/repo@v1.0.0 # → repo's oats-package/ (the DEFAULT)
|
|
40
|
+
oats install git:github.com/org/repo@v1.0.0#dist/oats # → repo's dist/oats/
|
|
41
|
+
oats install git:github.com/org/repo@v1.0.0#. # → the repository ROOT
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
- **Omit it and you get `oats-package/`.** Every official example, scaffold and
|
|
45
|
+
convention uses `oats-package/` — never a generic `package/`. A repo whose
|
|
46
|
+
manifest sits at the root needs `#.`; the error message says so.
|
|
47
|
+
- **Only the selected subtree is installed and hashed.** Repository docs, CI
|
|
48
|
+
config, owner souls and sibling packages never become installed bytes and
|
|
49
|
+
never affect `integrity` — so editing them cannot invalidate approvals, and
|
|
50
|
+
editing the payload (including a nested capability-agent soul) always does.
|
|
51
|
+
- **One repo can ship several packages** at different paths; install each by
|
|
52
|
+
its own source. Two contained roots claiming the SAME package identity still
|
|
53
|
+
fail with `duplicate-package-identity`.
|
|
54
|
+
- **Catalog ids take no fragment** — the catalog entry carries `path` itself.
|
|
55
|
+
- **Local paths take no fragment either**: `oats install /repo/custom-root`
|
|
56
|
+
treats that exact directory as the package root whatever it is named. There
|
|
57
|
+
is no `oats-package` default for local sources.
|
|
58
|
+
|
|
59
|
+
The lock records the selected root in its own `path` field, in canonical form
|
|
60
|
+
(`.` for a root selection). A bare `oats install` restores the locked
|
|
61
|
+
source + commit + **path** + integrity even if upstream moved the directory or
|
|
62
|
+
the catalog repointed; only `oats update <package>` may adopt a new path, and it
|
|
63
|
+
reports the move. Attempting to move it with a plain `oats install` is refused
|
|
64
|
+
with `integrity-drift`.
|
|
65
|
+
|
|
66
|
+
Local capability development is untouched by all of this:
|
|
67
|
+
`.agents/capabilities/owned/<id>` (`from: owned`) and `from: path:<dir>` are
|
|
68
|
+
not package sources and are never routed through package paths.
|
|
69
|
+
|
|
70
|
+
Installing a package MATERIALIZES each capability it exports into
|
|
71
|
+
`<scope>/.agents/capabilities/installed/<id>/` (gitignored). There is no
|
|
72
|
+
persistent package store. Dependencies declared in `oats-package.json` must be
|
|
73
|
+
pinnable (official selector, tag/commit, or path). The whole closure is
|
|
74
|
+
exact-locked in the scope's `oats-lock.json` (`lockfileVersion: 2`), which
|
|
75
|
+
records two maps: `packages` (source, exact commit, selected path, payload
|
|
76
|
+
integrity, dependencies) and `capabilities` (each artifact's version, provider
|
|
77
|
+
package, path, integrity, trust).
|
|
78
|
+
|
|
79
|
+
## Everyday operations
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
oats install # bare: EXACT restore of this chain's locks (never advances refs)
|
|
83
|
+
oats list [--json] # packages, exported capabilities, scopes, trust state
|
|
84
|
+
oats update <package> # transactional: temp fetch, closure validation, diff,
|
|
85
|
+
# artifact+lock replaced together; approvals of every
|
|
86
|
+
# CHANGED-integrity package are invalidated (unchanged
|
|
87
|
+
# packages in the closure keep theirs)
|
|
88
|
+
oats remove <package> # refuses while config or dependent packages reference it
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Trust
|
|
92
|
+
|
|
93
|
+
Executable surfaces (commands/hooks) are blocked until approved at each
|
|
94
|
+
capability artifact's EXACT integrity:
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
oats trust <capability> # approve only that capability
|
|
98
|
+
oats trust <package> --all-capabilities # explicit bulk; prints the full executable surface first
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Any artifact integrity change (update, drift) resets that capability's trust —
|
|
102
|
+
re-review, then re-trust. Skill/instruction/config-only capabilities need lock
|
|
103
|
+
integrity but no approval. Official-catalog identity is NOT executable trust.
|
|
104
|
+
|
|
105
|
+
## Runtime dependencies
|
|
106
|
+
|
|
107
|
+
A capability may check in `package.json` + `package-lock.json`; OATS materializes
|
|
108
|
+
it with `npm ci --omit=dev --omit=peer --ignore-scripts` — production tree only,
|
|
109
|
+
no lifecycle scripts. The package payload hash EXCLUDES `node_modules`. The
|
|
110
|
+
materialized `node_modules` is instead part of that capability's own artifact
|
|
111
|
+
integrity, so tampering with materialized deps resets the capability's trust
|
|
112
|
+
just like source drift, and restore re-verifies it. Closures must be
|
|
113
|
+
platform-invariant. Host peer APIs are reached only through the supported
|
|
114
|
+
runtime boundary, never auto-installed.
|
|
115
|
+
|
|
116
|
+
## Migration from v1 locks
|
|
117
|
+
|
|
118
|
+
```
|
|
119
|
+
oats migrate --dry-run # plan: which v1 capability locks map to packages
|
|
120
|
+
oats migrate # convert this scope to revised v2 — all-or-nothing
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
`oats migrate` is all-or-nothing per scope. It converts a scope to the revised v2
|
|
124
|
+
lock only when EVERY entry maps to a package. If any entry cannot be mapped yet
|
|
125
|
+
(a marketplace id the catalog does not resolve, an unknown source), the whole
|
|
126
|
+
scope stays byte-identical v1 and keeps working — re-run when it can map. A
|
|
127
|
+
successful run writes a fresh v2 lock for the scope. There is NO residue
|
|
128
|
+
container: a converted lock never carries leftover v1 entries. Approvals never
|
|
129
|
+
carry over — re-trust after migrating.
|
|
130
|
+
|
|
131
|
+
### Upgrading a 0.18 deployment (bundled official capabilities → packages)
|
|
132
|
+
|
|
133
|
+
```
|
|
134
|
+
oats migrate --official --recursive --dry-run --dir <team-root> # plan every scope
|
|
135
|
+
oats migrate --official --recursive --dir <team-root> # apply, scope by scope
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Guided mode for existing users. It plans every visible lock-owning scope first
|
|
139
|
+
(ancestor chain incl. outer/laptop locks, team boundary, pruned descendants;
|
|
140
|
+
path order, ancestors first), then applies each scope transactionally.
|
|
141
|
+
|
|
142
|
+
- Which package supplies a legacy capability is CATALOG data: identity by
|
|
143
|
+
default, plus aliases (`oats.review` → package `oats.dev`). Never a hardcoded
|
|
144
|
+
URL or tag, and no ref is guessed from the v1 capability version.
|
|
145
|
+
- Config files are never rewritten — exported ids are unchanged, so activation,
|
|
146
|
+
layers, targets, settings and exclusions stay valid.
|
|
147
|
+
- No mapping yet at a scope → that scope is HELD and left byte-identical v1
|
|
148
|
+
(nonzero exit, `--dry-run` included); legacy capabilities keep working. A
|
|
149
|
+
converting scope moves whole to revised v2 — there is no residue container, so
|
|
150
|
+
a converted lock never carries leftover v1 entries.
|
|
151
|
+
- `git:`/`path:`/unknown entries are never acquired by guided mode. A scope
|
|
152
|
+
containing only those entries is skipped with their IDs under `retained`; a
|
|
153
|
+
scope mixing them with official capabilities is blocked whole and stays v1.
|
|
154
|
+
Plain `oats migrate` can convert custom sources only when every entry maps.
|
|
155
|
+
- After it runs: `oats trust <capability> --dir <scope>` for each executable
|
|
156
|
+
surface it names (approvals never transfer), then `oats install --dir <scope>`
|
|
157
|
+
— already-installed host requirements verify, nothing is reinstalled.
|
|
158
|
+
- `--json` emits one envelope; an aggregate failure is `ok:false` with
|
|
159
|
+
`error.code = E_MIGRATE_FAILED` and the complete per-scope report (including
|
|
160
|
+
the scopes that DID migrate) under `error.details`.
|
|
161
|
+
|
|
162
|
+
`oats doctor` detects the upgradeable state and prints the exact command
|
|
163
|
+
(`officialMigration` in `--json`), or says migration is not available yet while
|
|
164
|
+
confirming the legacy capabilities remain supported.
|
|
165
|
+
|
|
166
|
+
## Troubleshooting
|
|
167
|
+
|
|
168
|
+
`oats doctor [dir] [--json]` distinguishes: missing locked package (run
|
|
169
|
+
`oats install`), integrity drift (reacquire/update explicitly — approvals are
|
|
170
|
+
already invalid), a capability whose `.oats-installation.json` disagrees with
|
|
171
|
+
the lock, untrusted executable surface (`oats trust <capability>`), and a legacy
|
|
172
|
+
v1 lock pending migration (`legacyLockFiles[]` plus `officialMigration`
|
|
173
|
+
readiness). A refused lock — including the superseded transitional v2 shape —
|
|
174
|
+
is reported as the single `lockError` diagnosis and is never partially
|
|
175
|
+
interpreted.
|
|
176
|
+
|
|
177
|
+
Source of truth beyond this skill: `oats --help` output,
|
|
178
|
+
`docs/oats-package.schema.json`, `docs/oats-lock.schema.json`, and
|
|
179
|
+
`docs/design/package-engine-contract.md` (+ `package-runtime-api.md`) in the
|
|
180
|
+
framework repo; `docs/capabilities.md` for the user-level walkthrough.
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: oats-support
|
|
3
|
+
description: >-
|
|
4
|
+
Route deep OATS framework questions to the framework's own expert agent.
|
|
5
|
+
Use when a user asks how OATS works beyond the basics in the oats skill, why
|
|
6
|
+
the framework behaves a certain way, wants framework changes or roadmap
|
|
7
|
+
context, or hits framework bugs — the answer is to instantiate the
|
|
8
|
+
oats-expert soul from the OATS framework repo and delegate. Triggers: "ask
|
|
9
|
+
the OATS experts", "why does OATS do X", "is this an OATS bug", "OATS
|
|
10
|
+
architecture question", "who maintains this framework".
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# OATS support — delegate to the framework's expert
|
|
14
|
+
|
|
15
|
+
The OATS framework repo carries its own agents. The **oats-expert** soul holds
|
|
16
|
+
the framework's architecture record, decisions, and roadmap — knowledge no
|
|
17
|
+
generic session has. For deep questions, instantiate it and let the user
|
|
18
|
+
talk to it directly. Do not guess at framework internals yourself.
|
|
19
|
+
|
|
20
|
+
## 1. Find the OATS framework repo locally
|
|
21
|
+
|
|
22
|
+
Check in this order. Verify a hit by remote URL — it must point at
|
|
23
|
+
`awebai/oats`:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
# a) an existing pi install from a local path IS the repo
|
|
27
|
+
python3 -c "import json,os; [print(p if isinstance(p,str) else p.get('source','')) for p in json.load(open(os.path.expanduser('~/.pi/agent/settings.json'))).get('packages',[])]"
|
|
28
|
+
# b) common spots
|
|
29
|
+
ls -d ~/oats ~/oats-framework 2>/dev/null
|
|
30
|
+
# c) verify any candidate
|
|
31
|
+
git -C <candidate> remote get-url origin # expect awebai/oats
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
**Do not use a pi-managed git clone** (`~/.pi/agent/git/...`) as the home
|
|
35
|
+
for agent instantiation. `pi update` resets and cleans those clones, which
|
|
36
|
+
would wipe the souls' accumulated knowledge.
|
|
37
|
+
|
|
38
|
+
## 2. If not found, ask the user where to clone
|
|
39
|
+
|
|
40
|
+
Never pick a location silently. Suggest `~/oats` or a sibling of
|
|
41
|
+
their workspace, then:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
git clone https://github.com/awebai/oats <chosen-path>
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## 3. Instantiate the oats-expert soul
|
|
48
|
+
|
|
49
|
+
Spawn from the repo's own agents root (`--dir` targets it regardless of
|
|
50
|
+
where your session runs):
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
oats spawn oats-expert --dir <repo> --purpose <short-slug> \
|
|
54
|
+
--task "<the user question, plus their workspace path and any config context>"
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Do NOT pass `--parent` here: `--dir <repo>` targets a DIFFERENT deployment's
|
|
58
|
+
agents root, and lineage is deployment-local — your instance is not
|
|
59
|
+
discoverable (or renderable) in the target's hierarchy, so the spawn is
|
|
60
|
+
correctly operator-origin/top-level there. Pass `--parent "$OATS_INSTANCE"`
|
|
61
|
+
only when spawning within your own deployment.
|
|
62
|
+
|
|
63
|
+
Include in the task briefing: the user's actual question, their workspace
|
|
64
|
+
path, and relevant `oats doctor` output. The expert reads its soul knowledge
|
|
65
|
+
and answers with citations.
|
|
66
|
+
|
|
67
|
+
## 4. Hand off
|
|
68
|
+
|
|
69
|
+
Tell the user the instance is running and how to reach it:
|
|
70
|
+
`tmux attach -t pi-agents`, then pick the window. Report the window name.
|
|
71
|
+
Retirement is the user's call (or yours if they delegate it) — retiring
|
|
72
|
+
harvests the instance's notes back into the expert's soul.
|
|
73
|
+
|
|
74
|
+
## Scope note
|
|
75
|
+
|
|
76
|
+
Quick questions (home layout, roster, lifecycle, doctor) are already
|
|
77
|
+
answered by the **oats** skill — use that first. Delegate to the expert for
|
|
78
|
+
architecture, design rationale, roadmap, and anything you would otherwise
|
|
79
|
+
guess about.
|