Add source.crate field to decouple skill fetch target from activation predicates#236
Merged
nikomatsakis merged 8 commits intoJun 3, 2026
Conversation
Member
Author
|
cc @jlizen |
…on predicates
Previously, `source.crate_path` groups relied on predicate resolution
(plugin-level + group-level `crates`) to determine which crate to fetch
skills from. This forced authors to add a group-level `crates` filter
that also narrowed the activation condition — making it impossible to
say "activate for any of these crates, but fetch skills from this
specific one."
`source = { crate = "name" }` (optionally with `crate_path`) now names
the fetch target explicitly, leaving predicates to control only
activation. Example:
crates = ["dial9-tokio-telemetry", "dial9", "dial9-viewer"]
[[skills]]
source = { crate = "dial9-viewer", crate_path = "skills" }
Co-authored-by: Claude <claude@anthropic.com>
43fdb6e to
2046436
Compare
jlizen
approved these changes
Jun 1, 2026
- Validate that source.crate is non-empty at parse time - Fix misleading error message (crate + crate_path can co-exist) - Remove redundant path+crate_path exclusivity check (already covered) Co-authored-by: Claude <claude@anthropic.com>
Replaces the flat `source.crate`/`source.crate_path` fields with a
structured `source.crate = { name?, path?, version? }` table:
source = "crate" # shorthand, unchanged
source.crate.path = "guidance" # replaces source.crate_path
source.crate.name = "dial9-viewer" # explicit fetch target
source.crate.version = ">=1.0" # version constraint (new)
Also:
- Removes the 0.0.0 version fallback when a named crate isn't in the
workspace — now warns and skips instead
- Validates that source.crate.name is non-empty
- Keeps source.crate_path as a legacy alias during deserialization
Co-authored-by: Claude <claude@anthropic.com>
…o.toml
Crate authors now control where Symposium finds skills via their own
Cargo.toml metadata instead of plugin-side `source.crate` fields. This
gives authors full control over skill layout and enables recursive
redirects (A can point to B for skills, B can point to C, etc.).
Key changes:
- New `crate_metadata` module parses `[package.metadata.symposium]`
- `PluginSource::Crate` simplified to unit variant (no payload)
- `source.crate = { ... }` and `source.crate_path` are now parse errors
with migration hints
- `load_crate_skills` reads metadata, follows redirects recursively with
cycle detection (hyphen/underscore-normalized) and depth limit of 10
- Diamond redirects dedup via SkillOrigin, malformed metadata falls back
to skills/, explicit `skills = []` opts out
Co-authored-by: Claude <claude@anthropic.com>
nikomatsakis
commented
Jun 2, 2026
Address review nit — this module is internal-only. Co-authored-by: Claude <claude@anthropic.com>
These modules are only used internally — the binary accesses them via the CLI dispatch layer, not directly. Co-authored-by: Claude <claude@anthropic.com>
Member
Author
|
This is a breaking change, but I'm inclined to just do it, update the recommendations repo, and encourage folks to upgrade. |
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 does this PR do?
When fetching skills from a crate, check the
Cargo.tomlof the crate for Symposium metadata to allow overriding the path where skills are found or redirecting to other crates. This replaces the oldcrate_pathfield.Example: The dial9 crate has centralized its skills in dial9-viewer. Therefore they would do:
Then in
dial9-tokio-telemetryanddial9they would put:This would fetch skills from the latest version of
dial9-viewer.Disclosure questions
AI disclosure.
Questions for reviewers.