feat(capabilities): capability registry schema + read-model projection#6
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds the fleet capability plane as a graph-native RepoGraph module
(
src/repograph/capabilities/). Capabilities are first-class nodes withtyped 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" addedto the public_safe / public_docs projection entity kinds;
project_capability_registrydrops non-public capabilities;to_payload()gives a deterministic hash for boundary coverage.
ownsedge per capability (accountability is one,participation is many);
target_scope∈ {repo (resolves), repo_set (selectorvalidated, membership NOT expanded), fleet (no id/selector)}; risk ≥
mutates_fleetrequires an explicitpreferred_lane; unknown enums failclosed.
invocation.refis 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-multiclean (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