Repository navigation
Conversation
ctawiah
added this pull request to stack #955
October 22, 2026 22:19
The add of the bootstrap package can now add tools and skills, as it adds variations. With Kind set to tool or skill, Run reads each selected tool or skill from LaunchDarkly, writes its file, and records its sync.lock and remote manifest entries. Without a selection, it asks for the project and then for one tool or skill, with the search picker of attach. A dry run lists the files. Add refuses a key that LaunchDarkly does not have, a key that is already synced, and a key that has a sync.lock entry but no file. It checks every key before it writes. If the baseline save fails, it removes the new files. The tool and skill picker moves from the prompt package to the interactive package, so that bootstrap and attach share it. No command reaches the new add yet.
cursor
Bot
force-pushed
the
ctawiah/add-attachments-1e8a
branch
from
October 23, 2026 00:13
75dde49 to
ed4bca5
Compare
ctawiah
removed this pull request from stack #955
October 23, 2026 00:15
ctawiah
added this pull request to stack #960
October 23, 2026 00:16
This was referenced Oct 23, 2026
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
ldcli sync prompts addwrites the files of variations that exist in LaunchDarkly, and records their baseline insync.lockand in the LaunchDarkly manifest. The tools and skills of each variation come with it. But no command starts syncing a tool or skill on its own.This stack adds
sync tools addandsync skills addin three PRs, to keep each PR small. This PR adds the add itself. The next PR routes the commands to it by scope, and the PR after that adds the commands.What changes
bootstrap.Runtakes aKind. For a tool or a skill, it calls the newaddAttachments.--keyvalues, add asks for a project and for one tool or skill with a search picker.SelectAttachmentmoves fromprompt/attach.gointointeractive, soattachandaddshare it. Without a terminal, the error names the flags:--project and --key are required with --no-input.sync.lockrow and no file. It also refuses one that LaunchDarkly does not have. So one bad selection writes nothing.--diffshows their content, as for variations.Store.ReplaceAttachments, records the rows, and saves. If the save fails, it removes the new files.The errors name the next step:
A dry run with
--diff:Design notes
ReplaceAttachmentsfrom feat: apply tool and skill rows in a sync #941. The preview reuseswritePreviewsand the newRenderAttachment, a small wrapper of the existing renderer.Store.Renderrenders variation files, so it does not fit a tool alone.AttachmentPathandAttachmentExistsgive the repository path and the existence check of one tool or skill file.Review focus
Verification
go test ./...andgolangci-lint run(v2.9.0) pass.bootstrap/attachments_test.gocovers adds by key, each refusal, the dry run, the cleanup after a failed save, and the errors without input.Runner.Run, and the PR after that runs it through the commands.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)