fix(cli): enable cross-domain referencing for installed knowledges - #94
Open
MajorLift wants to merge 1 commit into
Open
fix(cli): enable cross-domain referencing for installed knowledges#94MajorLift wants to merge 1 commit into
MajorLift wants to merge 1 commit into
Conversation
Knowledge is copied per domain, so a skill could only ever cite its own domain's files. Four skills cite `testing-layers.md`, which lives in `testing`: `coding-guidelines`, `pr-guidelines`, `pr-readiness-check`, and `perps-review-pr`. Six citation sites in total, none of which could resolve for any consumer on any operator — the skill installed fine and the reference dangled. The installer now scans a skill for `knowledge/<file>.md` citations its own domain does not satisfy, and copies the file in from whichever domain owns it. Existing citations start working unchanged; no new syntax, and nothing declares a dependency in frontmatter, so the context an agent must load stays bounded. Both the base skill and the applicable repo overlay are scanned. The overlay is merged into the emitted body, and three of the four cases cite from an overlay rather than from `skill.md` — scanning only the base fixed one of four. Resolution is by filename, which is unambiguous today: ten knowledge files, no name shared across domains. If that stops being true the reference is genuinely ambiguous, so the install fails and names the candidates rather than picking one. Verified against the real corpus: 15/15 knowledge citations resolve after install, from 9/15. Both new tests fail against main's installer.
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.
Closes #88.
The defect
Knowledge is copied per domain, so a skill could only ever cite its own domain's files. Four skills cite
testing-layers.md, which lives indomains/testing/knowledge/:coding-guidelines(mobile overlay, ×3 sites)codingtestingpr-guidelines(mobile overlay)pr-workflowtestingpr-readiness-check(mobile overlay)pr-workflowtestingperps-review-prperpstestingSix citation sites, none of which could resolve for any consumer on any operator. The skill installed fine and the reference dangled — no error, the agent simply could not open what the body pointed at.
The fix
The installer scans a skill for
knowledge/<file>.mdcitations its own domain does not satisfy, and copies the file in from whichever domain owns it.Existing citations start working unchanged — no new syntax to learn, and nothing is declared in frontmatter, so the context an agent must load stays bounded. A cross-domain reference remains a body link the agent chooses to follow.
Overlays are scanned too. The repo overlay is merged into the emitted body, so a citation there is just as load-bearing — and three of the four cases cite from
repos/metamask-mobile.mdrather thanskill.md. Scanning only the base fixed one of four, which is how I found it.Ambiguity fails loudly. Resolution is by filename, which is unambiguous today — ten knowledge files, no name shared across domains. If that stops being true the reference is genuinely ambiguous, so the install exits non-zero and names the candidates rather than silently picking one.
Evidence
Real corpus, installing
coding,perps,pr-workflow,testingformetamask-mobile:Three tests, all failing against
main's installer and passing here:Notes
CHANGELOG.mdentry — this is install behavior, so say the word if you want one and which release it lands under.knowledge/installations resolve #87, which guards thatknowledge/citations resolve after install. That guard is what makes this class visible; this closes the remaining cases it surfaced.