lsp-cross-root
Route strict LSP requests across multiple workspaces with explicit workspace and exact server selection.
SKILL.mdskills/lsp-cross-root/SKILL.md
GitHublsp-cross-root
Make routing explicit when one task spans multiple roots.
WHEN
- Files belong to different project roots.
- Multiple same-language servers make routing ambiguous.
- You need deterministic per-root provenance.
WHEN NOT
- One workspace and one routable server are sufficient.
- The question is path authorization. SmartRead does not invent that policy.
Workflow
- Identify the owning workspace for each target file.
- Pass
workspaceexplicitly on cross-root requests. - Pass exact
serverdescriptor id when multiple candidates exist. - Run each root's request independently and retain envelope provenance.
- Merge results only after preserving workspace/server labels.
Guardrails
- The strict field is
workspace, not legacyroot. serveris exact descriptor-id routing; there is no fuzzy match.- An ambiguous/unavailable envelope is a routing result, not permission denial.
- Read-only. Cross-root read permission remains external to SmartRead.
EXAMPLE
{"operation":"goToDefinition","workspace":"/repo/app-a","server":"typescript","path":"/repo/app-a/src/auth.ts","position":{"line":9,"character":4}}
Budgets
One scoped call chain per workspace; avoid broad duplicate searches across every root.