Repository navigation
feat: route sync, add, and detach by scope - #948
Merged
Merged
Conversation
cursor
Bot
force-pushed
the
ctawiah/route-scopes-1e8a
branch
from
October 23, 2026 00:13
0aed9eb to
84d0406
Compare
This was referenced Oct 23, 2026
ctawiah
marked this pull request as ready for review
October 23, 2026 14:09
ctawiah
requested review from
btesfamariam and
nkester-ld
and removed request for
a team
October 23, 2026 14:09
cursor
Bot
force-pushed
the
ctawiah/route-scopes-1e8a
branch
from
October 23, 2026 14:27
84d0406 to
d41ab35
Compare
cursor
Bot
force-pushed
the
ctawiah/route-scopes-1e8a
branch
from
October 23, 2026 14:40
d41ab35 to
31dcddf
Compare
cursor
Bot
force-pushed
the
ctawiah/route-scopes-1e8a
branch
from
October 23, 2026 14:44
31dcddf to
000e9ee
Compare
cursor
Bot
force-pushed
the
ctawiah/route-scopes-1e8a
branch
from
October 23, 2026 14:56
000e9ee to
5b45276
Compare
nkester-ld
approved these changes
Oct 23, 2026
cursor
Bot
force-pushed
the
ctawiah/route-scopes-1e8a
branch
from
October 23, 2026 17:07
5b45276 to
720df6f
Compare
nkester-ld
approved these changes
Oct 23, 2026
cursor
Bot
force-pushed
the
ctawiah/route-scopes-1e8a
branch
from
October 26, 2026 19:37
720df6f to
01513f2
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 01513f2. Configure here.
ctawiah
force-pushed
the
ctawiah/route-scopes-1e8a
branch
3 times, most recently
from
October 26, 2026 20:36
743062e to
7614d8d
Compare
The scope moves from SyncAction to Options, so that every action has it. A sync of prompts, tools, skills, or all kinds plans only its scope. An add or a detach takes resources of the kind of the scope, and the add of tools and skills uses the add from the bootstrap package. A sync of every kind in a repository without sync files fails with a message that names the three add commands. A sync of tools or skills starts its add, as a sync of prompts does. An empty scope names its add command. A sync of prompts notes the tool and skill files that no variation uses, because its plan leaves them out. The note counts paths and reads no file. After a sync of tools or skills pushes a tool or skill, a note names each local variation that repins on the next sync of prompts. Without a terminal, an unresolved conflict outside the prompts scope names only --conflict, because only sync prompts has --resolve.
ctawiah
force-pushed
the
ctawiah/route-scopes-1e8a
branch
from
October 26, 2026 20:51
7614d8d to
597ac2d
Compare
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.

Context
Since #939, the sync code has a scope:
prompts,tools,skills, orall. Only the sync uses it, throughSyncAction. Soaddanddetachalways work on variations, and every message talks about prompts. This PR routes sync, add, and detach by scope, so that the next PR only adds the commands.What changes
Scopemoves fromSyncActiontoOptions, so that every action gets it.AddAction.VariationsbecomesResources.sync allfails withNothing to sync in this repository. To start, run ldcli sync prompts add, ldcli sync tools add, or ldcli sync skills add.--resolveonly in the prompts scope, because onlysync promptshas it.No tools are synced in this repository. To start, run ldcli sync tools add.Design notes
ParseManagedPath), so an invalid standalone file never breakssync prompts. Only a prompts plan counts. A tool or skill with a row in the plan, for example a row from the first PR of this stack, is not counted.usedBy, set in the same loop that setsSyncedElsewhere. The repin note is its only user. The other option, a second compile of the variations after the apply, reads the files twice.applyConflictResolutionsnow copies the rows of the plan before it changes them, so the reviewed plan stays as it was.Review focus
Verification
go test ./...andgolangci-lint run(v2.9.0) pass.Runner.Run:TestWritePlanReviewNamesTheAddOfAnEmptyScopechecks the empty-plan message of each scope.Related changes
This stack builds on #937 to #941, which are merged.
ctawiah/fix-prompt-tool-diff-5b1c)ctawiah/plan-referenced-attachments-1e8a)ctawiah/keep-unused-attachments-1e8a)ctawiah/add-attachments-1e8a)ctawiah/route-scopes-1e8a)ctawiah/scope-commands-1e8a)ctawiah/create-attachments-1e8a)ctawiah/create-attachment-flags-1e8a)ctawiah/share-variation-selection-1e8a)ctawiah/create-variations-1e8a)ctawiah/create-variation-flags-1e8a)Note
Overview
Sync, add, and detach are driven by command scope (
prompts,tools,skills, orall) viaOptions.Scope, replacing scope onSyncAction.AddActionnow takes genericResourcesinstead of variation-onlyVariations, and add/detach/bootstrap use the scope’s resource kind for filters, selections, and validation.Behavior and UX changes:
sync allin an empty repo errors with a message pointing atldcli sync prompts/tools/skills add; scoped tool/skill sync still auto-starts add like prompts today. Tools/skills scopes reject--config-keyand variation-style positional args. Prompt-only plans note standalone tools/skills left out of the plan; after a tools/skills push, notes tell users which prompts need a follow-up repin. Empty-plan and non-interactive conflict messages are scope-specific (--resolveonly mentioned for prompts).Planning: Plans carry
Scopeand optionalstandalonecounts (path-only, prompts scope); tool/skill rows trackusedByvariations for repin notes.Filter.Validaterejects--config-keyfor non-variation kinds.Reviewed by Cursor Bugbot for commit 79c0f5a. Bugbot is set up for automated code reviews on this repo. Configure here.