feat(sync): link and detach prompt resources - #819
Merged
Merged
Conversation
ctawiah
added this pull request to stack #821
September 24, 2026 17:59
This was referenced Sep 24, 2026
ctawiah
force-pushed
the
ctawiah/AIC-3445/prompt-link-detach
branch
2 times, most recently
from
September 25, 2026 16:00
61a513b to
fc61d0c
Compare
ctawiah
force-pushed
the
ctawiah/AIC-3445/prompt-link-detach
branch
2 times, most recently
from
September 25, 2026 16:11
03d76ba to
d00b1e5
Compare
nieblara
reviewed
Sep 28, 2026
nieblara
reviewed
Sep 28, 2026
ctawiah
force-pushed
the
ctawiah/AIC-3445/prompt-link-detach
branch
2 times, most recently
from
September 28, 2026 21:38
2150c82 to
cf2b5fa
Compare
ctawiah
force-pushed
the
ctawiah/AIC-3445/prompt-link-detach
branch
from
September 28, 2026 21:44
cf2b5fa to
6f5836a
Compare
ctawiah
force-pushed
the
ctawiah/AIC-3445/prompt-link-detach
branch
3 times, most recently
from
September 29, 2026 00:04
f252623 to
c369444
Compare
ctawiah
force-pushed
the
ctawiah/AIC-3445/prompt-link-detach
branch
from
September 29, 2026 00:10
c369444 to
685cd3a
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 685cd3a. Configure here.
ctawiah
force-pushed
the
ctawiah/AIC-3445/prompt-link-detach
branch
from
September 29, 2026 00:17
685cd3a to
cb9066b
Compare
ctawiah
force-pushed
the
ctawiah/AIC-3445/prompt-link-detach
branch
2 times, most recently
from
September 29, 2026 00:30
e5ffa88 to
f636284
Compare
Base automatically changed from
ctawiah/AIC-3445/prompt-workspace-management
to
main
September 29, 2026 00:32
ctawiah
force-pushed
the
ctawiah/AIC-3445/prompt-link-detach
branch
from
September 29, 2026 00:32
f636284 to
9c4b6b2
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
After a workspace exists, users need to connect prompts that already live elsewhere in the repository and stop tracking resources without mutating LaunchDarkly. This change contains those two lifecycle workflows.
What changes
plain-markdownadapter..launchdarklywrapper.Review focus
Verification
go test ./internal/sync/...git diff --checkRelated changes
Review the stack in this order:
Note
Overview
Adds link and detach workflows for prompt sync: connect an existing repo file to a LaunchDarkly variation via a local wrapper, or drop local tracking without touching LaunchDarkly or referenced sources.
Link (
internal/sync/link) walks an interactive flow (project → config → model config, plus any missing key/name/content), parses the source through theplain-markdownadapter, validates destination (mode match, no duplicate server/local keys), then writes a.launchdarklywrapper that points at the external file. Empty prompts can be filled only after validation; failed wrapper creation rolls the source file back.Createexposes the same path with a pre-selected destination for tests/CLI.Detach (
internal/sync/detach) lists the union of manifest entries and on-disk wrappers, multi-selects resources in the terminal, updates the manifest first, deletes local variation wrappers when present, and restores the manifest if deletion fails. Referenced prompt files are left intact.synclocal.ReplaceFileAtomicallyreuses the existing staged-rename + content-snapshot check so link (and similar callers) cannot clobber a file that changed after read.Reviewed by Cursor Bugbot for commit 9c4b6b2. Bugbot is set up for automated code reviews on this repo. Configure here.