@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,109 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: skill-craft
|
|
3
|
+
description: >-
|
|
4
|
+
How to create, evaluate, and maintain agent skills (SKILL.md files per the
|
|
5
|
+
Agent Skills standard). Use when writing a new skill, improving or debugging
|
|
6
|
+
an existing one (skill not triggering, agent ignoring instructions, skill too
|
|
7
|
+
long), turning a repeated procedure or correction into a skill, deciding
|
|
8
|
+
whether knowledge belongs in a skill versus the knowledge base versus
|
|
9
|
+
AGENTS.md, bundling scripts into skills, or evaluating whether a skill
|
|
10
|
+
actually helps. Based on the agentskills.io creator guides and Anthropic
|
|
11
|
+
best practices.
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Skill craft — create, evaluate, maintain
|
|
15
|
+
|
|
16
|
+
A skill is a directory with a `SKILL.md` (YAML frontmatter + markdown body),
|
|
17
|
+
optionally `scripts/`, `references/`, `assets/`. Agents load only `name` +
|
|
18
|
+
`description` at startup; the body loads **only when the description matches
|
|
19
|
+
the task** — the description carries the entire burden of triggering.
|
|
20
|
+
|
|
21
|
+
## Where does this knowledge belong? (decide first)
|
|
22
|
+
|
|
23
|
+
- **Repeatable procedure** ("how to do X, again and again") → **skill**.
|
|
24
|
+
- **Declarative fact/decision/lesson** ("what is true and why") → **OKF
|
|
25
|
+
concept** in the knowledge base (see `okf` skill). Skills may reference
|
|
26
|
+
concepts for the why.
|
|
27
|
+
- **Applies to every session of this agent** (role, boundaries, core workflow)
|
|
28
|
+
→ **AGENTS.md** (see `soul-craft`). Rule of thumb: AGENTS.md is loaded
|
|
29
|
+
always — keep it minimal; skills load on demand — put domain workflows there.
|
|
30
|
+
|
|
31
|
+
## Creating a skill
|
|
32
|
+
|
|
33
|
+
**Ground it in real expertise — never generate from thin air.** The valuable
|
|
34
|
+
content is what a capable model *doesn't* already know: your APIs, your
|
|
35
|
+
conventions, the corrections you had to make. Best sources: a hands-on task
|
|
36
|
+
you just completed (extract the steps that worked, the corrections given, the
|
|
37
|
+
formats used), runbooks, review comments, real failures and their fixes. A
|
|
38
|
+
skill with generic content ("handle errors appropriately") is worthless — cut
|
|
39
|
+
or ground it.
|
|
40
|
+
|
|
41
|
+
**Frontmatter rules** (spec + hard-won):
|
|
42
|
+
- `name`: lowercase alphanum + hyphens, ≤64 chars, **must match the directory
|
|
43
|
+
name**, no leading/trailing/double hyphens.
|
|
44
|
+
- `description`: ≤1024 chars, non-empty. ⚠️ **Use a `>-` block scalar if it
|
|
45
|
+
contains any `: ` colon-space** — an unquoted colon breaks YAML parsing and
|
|
46
|
+
the skill silently fails to load. Verify new skills actually load.
|
|
47
|
+
|
|
48
|
+
**Write the description for triggering** (it's the only thing the agent sees
|
|
49
|
+
before deciding):
|
|
50
|
+
- Imperative: "Use when..." not "This skill does...".
|
|
51
|
+
- Name the **user intents** it serves, not the implementation. Include
|
|
52
|
+
trigger phrases users actually say, and cover cases where they don't name
|
|
53
|
+
the domain ("even if they don't mention X").
|
|
54
|
+
- Precise beats broad: an over-broad description fires on near-miss tasks
|
|
55
|
+
and pollutes context.
|
|
56
|
+
|
|
57
|
+
**Write the body for a loaded context window** — it competes with everything
|
|
58
|
+
else once loaded:
|
|
59
|
+
- **Only what the agent would get wrong without it.** For every line ask:
|
|
60
|
+
"would removing this cause mistakes?" No → cut.
|
|
61
|
+
- ≤500 lines / ~5k tokens. Larger → move detail to `references/` and tell the
|
|
62
|
+
agent **when** to load each file ("read references/errors.md if the API
|
|
63
|
+
returns non-200"), not just that it exists.
|
|
64
|
+
- **Defaults, not menus**: pick one tool/approach, mention alternatives in
|
|
65
|
+
one line. Match prescriptiveness to fragility: fragile sequences get exact
|
|
66
|
+
commands ("run exactly this"); judgment tasks get goals + why.
|
|
67
|
+
- Procedures over answers: teach the approach that generalizes, with one
|
|
68
|
+
concrete worked example.
|
|
69
|
+
- **Gotchas section** — often the highest-value part: concrete corrections to
|
|
70
|
+
mistakes the agent *will* make ("the /health endpoint lies; use /ready").
|
|
71
|
+
- For multi-step workflows: an explicit checklist. For fragile output: a
|
|
72
|
+
template (agents pattern-match better than they follow prose). For
|
|
73
|
+
correctness-critical work: a validation loop (do → validate → fix → repeat)
|
|
74
|
+
or plan-validate-execute with a validator script.
|
|
75
|
+
|
|
76
|
+
**Scripts**: when you see an agent reinventing the same logic across runs,
|
|
77
|
+
write it once, test it, bundle it in `scripts/`, and reference it from the
|
|
78
|
+
body with exact invocations. Prefer zero-dependency scripts; pin versions for
|
|
79
|
+
`npx`/`uvx` one-offs. Scripts should print errors an agent can self-correct
|
|
80
|
+
from ("field X not found — available: a, b, c").
|
|
81
|
+
|
|
82
|
+
## Evaluating (before trusting)
|
|
83
|
+
|
|
84
|
+
- **Trigger check**: draft ~10 realistic prompts that *should* fire the skill
|
|
85
|
+
(varied phrasing, some not naming the domain) and ~10 near-misses that
|
|
86
|
+
*shouldn't* (share keywords, need something else). Run them; the skill
|
|
87
|
+
triggered if its body was loaded. Fix the description, not the body, for
|
|
88
|
+
trigger failures.
|
|
89
|
+
- **Output check**: run 2-3 real tasks **with and without** the skill. If
|
|
90
|
+
with-skill isn't clearly better, the skill isn't earning its context — cut
|
|
91
|
+
or sharpen it. Read execution traces, not just outputs: wasted steps mean
|
|
92
|
+
vague instructions, inapplicable instructions being followed, or menus
|
|
93
|
+
without defaults.
|
|
94
|
+
|
|
95
|
+
## Maintaining
|
|
96
|
+
|
|
97
|
+
- **Every correction is a candidate gotcha.** When a human (or reviewer)
|
|
98
|
+
corrects an agent following the skill, add the correction to the gotchas —
|
|
99
|
+
this is the single best maintenance loop.
|
|
100
|
+
- Treat skills like code: prune on every edit; if the agent ignores a rule,
|
|
101
|
+
the skill is probably too long and the rule is drowning. Test behavior
|
|
102
|
+
changes by observing runs, not by rereading the text.
|
|
103
|
+
- Never let a skill grow past one coherent unit of work — split like you'd
|
|
104
|
+
split a function.
|
|
105
|
+
- Log skill changes in the soul's `knowledge/log.md` (`**Update**: skills/x —
|
|
106
|
+
added gotcha about …`) so knowledge history and skill history stay one
|
|
107
|
+
timeline. Knowledge maintenance and skill maintenance are the same duty:
|
|
108
|
+
declarative lessons go to OKF concepts, procedural lessons go to skills,
|
|
109
|
+
and each should link to the other.
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: soul-craft
|
|
3
|
+
description: >-
|
|
4
|
+
How to author and maintain an agent's soul — its AGENTS.md/CLAUDE.md
|
|
5
|
+
operating doc, soul.yaml config, and the balance between AGENTS.md, skills,
|
|
6
|
+
and the OKF knowledge base. Use when creating a new agent (writing its first
|
|
7
|
+
AGENTS.md), refining an existing soul that underperforms (agent ignores
|
|
8
|
+
instructions, drifts from its role, bloated operating doc), reviewing a
|
|
9
|
+
soul's setup, or deciding what goes in AGENTS.md versus a skill versus
|
|
10
|
+
knowledge. Based on the agents.md standard and Anthropic CLAUDE.md guidance.
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Soul craft — author and maintain agent operating docs
|
|
14
|
+
|
|
15
|
+
A soul's `AGENTS.md` is loaded **every session of
|
|
16
|
+
every instance**. It is the most expensive real estate in the agent's context:
|
|
17
|
+
everything in it taxes every task, relevant or not. The craft is keeping it
|
|
18
|
+
minimal and pushing everything else to on-demand layers.
|
|
19
|
+
|
|
20
|
+
**Canonical files:** `AGENTS.md` and `.agents/skills/` are the canonical
|
|
21
|
+
sources; `CLAUDE.md` and `.claude/skills` must always be relative symlinks to
|
|
22
|
+
them, never independent files (the spawner creates these links — if you find a
|
|
23
|
+
real CLAUDE.md file diverging from AGENTS.md, that's a defect: merge and relink).
|
|
24
|
+
|
|
25
|
+
## The three-layer rule
|
|
26
|
+
|
|
27
|
+
| Layer | Loaded | Belongs there |
|
|
28
|
+
|---|---|---|
|
|
29
|
+
| **AGENTS.md** | always | Role, boundaries, the default workflow, memory pointers — only what applies to *every* session |
|
|
30
|
+
| **skills/** | on demand (description match) | Domain workflows, repeatable procedures ("how") — see `skill-craft` |
|
|
31
|
+
| **knowledge/** | on demand (index-first) | Facts, decisions, lessons ("what/why") — format per the knowledge integration (default okf) |
|
|
32
|
+
|
|
33
|
+
The test for every AGENTS.md line: **"would removing this cause mistakes in
|
|
34
|
+
most sessions?"** No → move it to a skill or a knowledge concept, or cut it.
|
|
35
|
+
Bloated operating docs cause agents to ignore the rules that matter — a rule
|
|
36
|
+
being ignored is usually a symptom of too many rules.
|
|
37
|
+
|
|
38
|
+
## Writing a soul's AGENTS.md
|
|
39
|
+
|
|
40
|
+
Structure that works (keep the whole thing short — a screen or two):
|
|
41
|
+
|
|
42
|
+
1. **Role, one paragraph.** Who this agent is, what it owns, where it stops.
|
|
43
|
+
Boundaries beat capabilities: "you never merge", "you never modify the
|
|
44
|
+
assignee", "UI belongs to the ui agent" prevent more damage than feature
|
|
45
|
+
lists add value.
|
|
46
|
+
2. **Operating loop.** The default shape of a work session — for a developer:
|
|
47
|
+
read ticket → plan in STATE.md → implement in ./work → verify → commit →
|
|
48
|
+
review loop → hand off. Concrete, not aspirational.
|
|
49
|
+
3. **Verification.** How this agent checks its own work: the build/test/lint
|
|
50
|
+
commands that must pass, what "done" means. An agent with a check it can
|
|
51
|
+
run closes its own loop; without one, "looks done" is the only signal.
|
|
52
|
+
Include exact commands the agent can't guess (`make test-unit`, not
|
|
53
|
+
"run the tests").
|
|
54
|
+
4. **Memory pointers.** Where its knowledge and state live (knowledge base
|
|
55
|
+
index, STATE.md discipline). Point, don't duplicate — the protocol lives
|
|
56
|
+
with your knowledge integration (default okf: the memory-harvest skill).
|
|
57
|
+
5. **Escalation.** When to stop and ask the human or coordinator: the
|
|
58
|
+
human-gate triggers (security, authz, migrations, contract breaks),
|
|
59
|
+
plus "report to your spawner, don't self-fix" for infrastructure faults.
|
|
60
|
+
|
|
61
|
+
Style rules (from the agents.md standard + field experience):
|
|
62
|
+
- Write commands, not prose: `pnpm vitest run -t "<name>"` beats "run the
|
|
63
|
+
relevant test".
|
|
64
|
+
- Include only what can't be inferred from the repo: conventions that differ
|
|
65
|
+
from defaults, env quirks, etiquette (branch naming, PR format).
|
|
66
|
+
- Exclude: standard language conventions, file-by-file codebase tours, API
|
|
67
|
+
docs (link instead), anything that changes weekly (that's knowledge),
|
|
68
|
+
self-evident advice ("write clean code").
|
|
69
|
+
- Emphasis (**IMPORTANT**, YOU MUST) sparingly — it works, and it stops
|
|
70
|
+
working when everything is emphasized.
|
|
71
|
+
- The repo's own AGENTS.md (in ./work) covers repo mechanics — the soul doc
|
|
72
|
+
covers the *role*. Don't duplicate the repo doc; instruct reading it.
|
|
73
|
+
|
|
74
|
+
## soul.yaml
|
|
75
|
+
|
|
76
|
+
Keep honest: `repo` (what it works on), `work` (worktree for builders,
|
|
77
|
+
checkout for reviewers/coordinators), `runtime`, `model` (only pin when the
|
|
78
|
+
role needs a specific one — reviewers on a different model than authors),
|
|
79
|
+
`description` (one line; shows in rosters and pickers).
|
|
80
|
+
|
|
81
|
+
## Maintaining a soul
|
|
82
|
+
|
|
83
|
+
- **Change AGENTS.md rarely and deliberately** — it defines the agent. The
|
|
84
|
+
bar: a change in how the agent fundamentally operates, proven by instance
|
|
85
|
+
experience. Day-to-day lessons go to knowledge; procedures to skills.
|
|
86
|
+
- When an instance repeatedly misbehaves, diagnose in order: (1) is the rule
|
|
87
|
+
drowning in a bloated doc? → prune the doc; (2) is it ambiguous? → sharpen
|
|
88
|
+
with a command or example; (3) is it missing? → add it, minimally. Test by
|
|
89
|
+
observing the next instance's behavior, not by rereading.
|
|
90
|
+
- **Prune on every edit.** Adding a line? Look for two to cut.
|
|
91
|
+
- Log every soul change in `knowledge/log.md` (`**Update**: AGENTS.md — …`)
|
|
92
|
+
so the soul's evolution is reconstructible.
|
|
93
|
+
- Agents never rewrite their own role or safety boundaries; soul changes that
|
|
94
|
+
alter behavior go through the human (or a documented review workflow).
|
|
95
|
+
- Periodic review (worth doing when spawning feels off): does the role still
|
|
96
|
+
match reality? Do skills cover the recurring procedures? Is the knowledge
|
|
97
|
+
index current? Are the verification commands still correct?
|
|
98
|
+
|
|
99
|
+
## Bootstrapping a new soul
|
|
100
|
+
|
|
101
|
+
Fastest path to a *grounded* soul (never write one from imagination):
|
|
102
|
+
1. Do (or supervise) the role's work once in a plain session, noting
|
|
103
|
+
corrections, commands, and conventions as you go.
|
|
104
|
+
2. Distill: role/boundaries/loop/verification/escalation → AGENTS.md;
|
|
105
|
+
repeated procedures → first skills; facts and decisions → first knowledge
|
|
106
|
+
concepts.
|
|
107
|
+
3. Spawn an instance on a real task; watch where it stumbles; fold the
|
|
108
|
+
corrections back (doc, skill gotcha, or concept — per the three-layer rule).
|
|
109
|
+
Two rounds of this beat any amount of upfront authoring.
|