Commit 5a3beca
Retire the linked-record plane;
* docs(vrs): retire the linked-record plane; add R35 st2-owned Resource profiles
st2 carried two disjoint durable edges both called "resource": Agent Spec
Resource bindings, and the link records written by `st2 resource add`. Nothing
in the corpus said they were disjoint, and `ontology.md` — the disambiguation
index that exists to prevent exactly this — defined neither.
Measured on one live catalog of 655 declarations: 889 distinct binding URIs and
233 distinct link-record URLs share zero members, exactly and after
normalization on all five schemes both planes used. The planes are disjoint by
construction — bindings carry what an agent is for, link records carried what it
made — so a shared descriptor type deduplicates nothing.
The link plane was write-only (its only reader was its own `ls`/`read` verb),
adopted by 12.5% of declarations, decaying, and superseded by
`axe work update --artifact/--pty`. It is retired.
The drift between the planes was caused by write-cost asymmetry, not by two
concepts sharing a word: 45 of 241 link records were dependency edges filed in a
products store, because a binding needed publisher authority plus
whole-declaration CAS republication while a link record was one file write.
Adds the 07-resource tree, ontology entries for Resource, Resource binding,
linked record (retired), agent resource directory, and working state, and three
decision records. R35 names the st2-owned Resource profiles that R20's "st2 does
not register schemes" otherwise forbids, so `working-state` can exist without
leaving R20 contradicted.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
agent-identity: unknown
agent-persona: generalist
agent-supervisor: unavailable
agent-tool: Claude Code
agent-tool-version: 2.1.237
agent-runtime: Claude Code 2.1.237
tooling-profile: dotfiles@11eaf2d-dirty
* feat(resource): repoint `st2 resource` at declared bindings with mediated writes
`st2 resource` managed link records under `<agent-dir>/resources/links/` — a
plane nothing read, that 12.5% of declarations used, and that `axe work update
--artifact/--pty` has superseded. It is removed, and the verb now reads and
writes the plane that has the spec authority.
st2 resource ls [<identity>] [--json]
st2 resource read [<identity>] <name> [--json]
st2 resource add <name> --uri <uri> --reason <text> [--inactive-reason <text>]
st2 resource remove <name>
st2 resource rename <old> <new>
`ls`/`read` project declared bindings; bindings previously had no human surface
at all, which is why agents reaching for `st2 resource ls` measured the other
store. The write verbs do read-modify-CAS-publish internally so the caller never
renders KDL, and they are the fourth caller of the `agent_author` pattern after
streams, desired state, and presentation — full-catalog validation, exact-target
selection, compare-and-swap, fail-closed concurrent change, and the Nix-managed
refusal all come from the existing machinery. A binding-only change does not
relaunch healthy work (R21), and URI bytes are preserved without normalization
(R20).
`<agent-dir>/resources/` is untouched and remains canonical for an agent's
resource files; only `links/` goes.
Two `catalog_apply` tests used `st2 resource add` as a state-plane write probe.
That is now a declaration-plane write, so they probe `context append` and
`message send` instead — the writers that still route through
`with_resolved_state_dir`.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
agent-identity: unknown
agent-persona: generalist
agent-supervisor: unavailable
agent-tool: Claude Code
agent-tool-version: 2.1.237
agent-runtime: Claude Code 2.1.237
tooling-profile: dotfiles@11eaf2d-dirty
* fix(resource): drop the dead `links` state-dir entry; correct the ls example ordering
`marker_state_exists` still validated `resources/links` as a real directory. st2
no longer owns that path — the linked-record plane is retired and nothing reads
or writes there — so asserting on it is stale vocabulary. The orphaned
directories remain on disk untouched; st2 simply stops making claims about them.
The 07-resource worked example listed bindings in declaration order. `ls` sorts
by name, which is correct: declaration order has no meaning. Verified against the
real catalog byte-for-byte, including the width-aware name padding.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
agent-identity: unknown
agent-persona: generalist
agent-supervisor: unavailable
agent-tool: Claude Code
agent-tool-version: 2.1.237
agent-runtime: Claude Code 2.1.237
tooling-profile: dotfiles@11eaf2d-dirty
* fix(resource): handle a binding's trailing line comment on remove and update
A hand-authored `resource "work" uri="…" reason="…" // why it is here` could not
be removed: `remove_field`'s standalone-line path accepted only whitespace after
the node, so it fell through to the compact path and refused with
`unsafe-source-shape`. The line's own trailing `//` comment is now removable
trivia and goes with the binding it explains. `/*` is deliberately not accepted —
a block comment can span lines and this only ever sees one.
Updating the same binding had a quieter defect: the node span runs to the start
of trailing trivia, so replacing it verbatim glued the rendered node onto the
comment (`reason="Changed."// why`). The separator is now preserved. The output
still parsed, so this was cosmetic rather than corrupting.
Reported by Codex review on #361 (P2). The remove case is the one that hard-failed;
the update case was found while confirming the scope.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
agent-identity: unknown
agent-persona: generalist
agent-supervisor: unavailable
agent-tool: Claude Code
agent-tool-version: 2.1.237
agent-runtime: Claude Code 2.1.237
tooling-profile: dotfiles@11eaf2d-dirty
* docs(vrs): reconcile with the merged Resource Profile foundation
#351 landed first and rewrote R20: a binding's URI scheme is now the exact
lookup key for an optional, catalog-declared Resource Profile, scheme meaning
stays downstream-owned, and st2 ships no built-in profiles.
Drop R35. It existed only because R20 then read "st2 does not register schemes",
which a scheme st2 resolves would have contradicted; it granted an exemption from
a clause R20 no longer contains, so rebasing it would have carried a
self-contradiction into requirements.md. `working-state` needs no exemption under
the merged R20 — st2 writes the carrier through `st2 context`, and resolving the
scheme is a catalog's choice. requirements.md is now identical to main: this
branch makes no constitutional edit.
Decision 0012 records the withdrawal as an amendment rather than rewriting its
history. Nothing about the carrier, its scheme name, or its realization changes.
Renumber this branch's decisions 0008/0009/0010 to 0011/0012/0013; #351 and #345
took 0008 and 0009 on main.
Correct three places that asserted the pre-#351 contract: the ontology's Resource
and working-state entries, and 07-resource/spec.md.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
agent-identity: unknown
agent-persona: generalist
agent-supervisor: unavailable
agent-tool: Claude Code
agent-tool-version: 2.1.237
agent-runtime: Claude Code 2.1.237
tooling-profile: dotfiles@11eaf2d-dirty
* docs(vrs): scope the resource boundaries to this document, not to st2
"No Resource registry, no generic resolution" described st2 before #351 landed
one. Resolution is out of scope for 07-resource, not absent from st2: the
scheme-keyed profile registry lives in 07-resource-profile. The two are
orthogonal — a binding names a Resource whether or not a profile resolves its
scheme, and `st2 resource` neither reads nor requires one.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
agent-identity: unknown
agent-persona: generalist
agent-supervisor: unavailable
agent-tool: Claude Code
agent-tool-version: 2.1.237
agent-runtime: Claude Code 2.1.237
tooling-profile: dotfiles@11eaf2d-dirty
* test: align resource validation coverage with the widened #345 envelope
#345 admits a catalog-relative carrier path as a binding uri, not only an
absolute URI, and reserves the binding name `declaration` for resync. Three
assertions written against the older contract went stale on the rebase:
- `agent_author` refused `./issue/1` and `example.com/issue/1`; both are valid
relative carriers now. The refusals worth pinning are the ones that escape the
catalog (`/etc/passwd`, `../outside`), so those replace them, and a positive
case pins that `carriers/goal.md` is admitted.
- `agent_resource` asserted a non-absolute uri is refused; it now asserts the
escaping paths are refused and that the resync-reserved name is refused.
- `agent_publish` drove the retired link-plane `resource add <url>` as a
state-plane write under an incomplete-apply marker. A binding write is a
declaration write, so it probes `context append` for the state plane and now
additionally asserts the marker fences `resource add` — the behaviour that
moving planes makes correct.
Verified against a same-toolchain `git archive origin/main` baseline: the
branch's failing-target set is a strict subset of main's own.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
agent-identity: unknown
agent-persona: generalist
agent-supervisor: unavailable
agent-tool: Claude Code
agent-tool-version: 2.1.237
agent-runtime: Claude Code 2.1.237
tooling-profile: dotfiles@11eaf2d-dirty
---------
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>st2 resource becomes the binding surface (#361)1 parent 4c0c760 commit 5a3beca
18 files changed
Lines changed: 2617 additions & 385 deletions
File tree
- docs/vrs
- .decisions
- 07-resource
- .experiments
- src
- templates
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
263 | | - | |
| 263 | + | |
| 264 | + | |
264 | 265 | | |
265 | 266 | | |
266 | 267 | | |
| |||
270 | 271 | | |
271 | 272 | | |
272 | 273 | | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
273 | 277 | | |
274 | 278 | | |
275 | 279 | | |
| |||
468 | 472 | | |
469 | 473 | | |
470 | 474 | | |
471 | | - | |
472 | | - | |
| 475 | + | |
| 476 | + | |
473 | 477 | | |
474 | 478 | | |
475 | 479 | | |
| |||
Lines changed: 98 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
Lines changed: 106 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 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 | + | |
Lines changed: 101 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 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 | + | |
0 commit comments