feat(context): Fleet Capabilities in startup context (capability plane Phase 1)#68
Merged
Merged
Conversation
…ity plane Phase 1) First consumer of the capability registry. build_resume_prompt appends a "Fleet Capabilities" section to the compiled .console/.context (owner, scope, risk, lane), so an operator/agent sees what the fleet can do before acting. Reads PlatformManifest's capabilities.yaml directly via PyYAML — no platform_manifest/repograph import, no RepoGraph compile (the flat authoring YAML already carries the fields). Located in-repo when anchored at PlatformManifest, else a sibling checkout. Fail-soft: missing/malformed registry omits the section, never blocks context compilation. Private capabilities (visibility != public) are never surfaced. Routing stays descriptive. 14 tests: locator (in-repo + sibling), scope trichotomy, grouping/sort, private-exclusion, fail-soft (missing/malformed/non-list/empty), integration. 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
The first consumer of the capability registry.
build_resume_promptnow appends a Fleet Capabilities section to the compiled.console/.context, so an operator/agent sees what the fleet can do — owner, target scope, risk, lane — before acting. This turns the registry from correct-but-inert into read.How (deliberately dependency-free)
Reads PlatformManifest's
capabilities.yamldirectly via PyYAML — noplatform_manifest/repographimport and no RepoGraph graph-compile. An adversarial review of the plan flagged that the obviousload_default_capabilities()path drags in a full RepoGraph compile + a sibling-checkout import assumption that OperatorConsole (not a pip package; only PyYAML+cxrp) cannot satisfy. The flat authoring YAML already carriesowner_repo_id/target_scope/risk/routing.preferred_laneas fields, so a direct read needs none of that.PlatformManifestcheckout.visibility != public) are never surfaced.Rendered output (real registry):
Tests
14 new tests: locator (in-repo + sibling), scope trichotomy (repo/repo_set/fleet), grouping+sort, private-exclusion, fail-soft (missing/malformed/non-list/empty), and integration with
build_resume_prompt.Note: two pre-existing
test_pipeline.pyfailures (run-dirwritten_attimestamp-resolution flakes) are unrelated to this change — they reproduce onmainwith this diff reverted.🤖 Generated with Claude Code