Skip to content

feat(capabilities): capability registry schema + read-model projection#6

Merged
ProtocolWarden merged 2 commits into
mainfrom
feat/capability-registry-schema
Jun 15, 2026
Merged

feat(capabilities): capability registry schema + read-model projection#6
ProtocolWarden merged 2 commits into
mainfrom
feat/capability-registry-schema

Conversation

@ProtocolWarden

Copy link
Copy Markdown
Owner

What

Adds the fleet capability plane as a graph-native RepoGraph module
(src/repograph/capabilities/). Capabilities are first-class nodes with
typed edges (owns/targets/executes/requires/validates/produces).
Ergonomic flat authoring fields compile to the canonical node+edge graph — the
graph is the truth, the fields are sugar.

  • SchemaKind.CAPABILITIES @ 1.0.0; EntityKind.CAPABILITY; "Capability" added
    to the public_safe / public_docs projection entity kinds;
    project_capability_registry drops non-public capabilities; to_payload()
    gives a deterministic hash for boundary coverage.
  • Invariants: exactly one owns edge per capability (accountability is one,
    participation is many); target_scope ∈ {repo (resolves), repo_set (selector
    validated, membership NOT expanded), fleet (no id/selector)}; risk ≥
    mutates_fleet requires an explicit preferred_lane; unknown enums fail
    closed.
  • Layer boundary: RepoGraph stays import-free of the fleet — invocation.ref
    is opaque here, resolved later by Custodian's CAP1 detector (separate PR).

This is the read-model foundation. v1 has no mutation API.

Tests

tests/test_capability_registry.py (32) — edge compilation, exactly-one-owner,
fail-closed enums, repo/repo_set/fleet scope rules, public projection, boundary
hash, dangerous-risk lane requirement, schema-header load, direct-import
coverage. 98 pass; ruff clean; custodian-multi clean (0 findings).

Train

First of three. PlatformManifest (instances + CLI) and Custodian (CAP1
ref-resolution) depend on this schema and follow once it merges.

🤖 Generated with Claude Code

ProtocolWarden and others added 2 commits June 15, 2026 00:21
…jection

Introduce the fleet capability plane as a graph-native module in RepoGraph:
capabilities are first-class nodes with typed edges (owns/targets/executes/
requires/validates/produces) to repos and artifacts. Ergonomic flat authoring
fields compile to the canonical node+edge graph — the graph is the truth.

- enums/models/compiler/validation/projection under src/repograph/capabilities/
- SchemaKind.CAPABILITIES @ 1.0.0; EntityKind.CAPABILITY; public-safe projection
  drops non-public capabilities; to_payload() gives a deterministic boundary hash
- invariants: exactly one owns edge per capability; target_scope repo/repo_set/
  fleet (selector validated, membership NOT expanded); dangerous risk requires an
  explicit preferred_lane; unknown enums fail closed
- tests cover the full matrix; T1/T6 satisfied by genuine direct-import tests,
  only T7 excluded for capabilities/** (flat tests/ layout)

RepoGraph stays import-free of the fleet: invocation.ref is recorded opaque and
resolved by Custodian (CAP1), not here.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The "LAST" doc from the capability-registry design: states the capability plane
is fleet-level and must not be migrated into topology (it is not a RepoNode) or
execution (not a TeamExecutor lane / CoreRunner job / OC task). OC, SwitchBoard,
and CoreRunner are consumers of the plane, not owners. Restates the four
load-bearing invariants and the language/instances/reality-check layering.
Indexed in docs/README.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@ProtocolWarden ProtocolWarden merged commit bd1741f into main Jun 15, 2026
2 checks passed
@ProtocolWarden ProtocolWarden deleted the feat/capability-registry-schema branch June 15, 2026 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant