Repository navigation
Conversation
ctawiah
added this pull request to stack #955
October 22, 2026 22:19
cursor
Bot
force-pushed
the
ctawiah/create-variations-1e8a
branch
from
October 23, 2026 00:13
083d37a to
7320951
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
ctawiah
marked this pull request as ready for review
October 23, 2026 14:12
ctawiah
requested review from
nieblara and
nkester-ld
and removed request for
a team
October 23, 2026 14:12
cursor
Bot
force-pushed
the
ctawiah/create-variations-1e8a
branch
from
October 23, 2026 14:27
7320951 to
b7a258a
Compare
cursor
Bot
force-pushed
the
ctawiah/create-variations-1e8a
branch
2 times, most recently
from
October 23, 2026 14:44
9e3ebfd to
e561178
Compare
cursor
Bot
force-pushed
the
ctawiah/create-variations-1e8a
branch
2 times, most recently
from
October 23, 2026 17:07
0c269d2 to
266321b
Compare
cursor
Bot
force-pushed
the
ctawiah/create-variations-1e8a
branch
from
October 23, 2026 21:17
266321b to
07f03a7
Compare
cursor
Bot
force-pushed
the
ctawiah/create-variations-1e8a
branch
from
October 23, 2026 21:26
07f03a7 to
28a23d3
Compare
An add of prompt variations can now carry the content of a new variation: its prompt, its model config key, and its name. The prompt is read with the body rules of a variation file, so it is the instructions of an agent config, or the role blocks of a completion config, where plain text is one system message. A create needs a config that exists. It uses the latest version of the model config, as link does, and refuses the key of an archived variation. If the config has the variation with the prompt, name, and model config key that the user passed, add starts syncing it through the existing add. If one of them differs, add stops and changes nothing. The create runs the same steps as a tool or skill create, so runCreate now has one driver and one builder for each kind. The driver plans the create in memory, asks for confirmation, writes the file, applies the plan of the new resource, and removes the file after a definite failure. link and add build the new variation with the same NewVariation. The command flags come in the next change.
cursor
Bot
force-pushed
the
ctawiah/create-variations-1e8a
branch
from
October 23, 2026 21:39
28a23d3 to
4e53008
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
sync prompts addcan only start syncing a variation that exists in LaunchDarkly. The only command that creates a variation islink, which needs an external prompt file. This PR lets an add create a variation in an existing config from its content. The create, adopt, and refuse rules are the same as for a tool or skill. The next PR adds the flags.What changes
create.Inputgets the model config key. A variation create needs the content and the model config key. The name is optional, and comes from the key by default.<system>...</system>, or plain text as one system message.local.ParsePromptBodyis exported for this.--key, and noproject-key/config-key/variation-keyarguments with a createvariation creation requires --project, --config-key, --key, and --model-config-key without interactive inputsync.lockrowlinkdoes. It writes the file withupsert: trueand noref, and runs the same steps as a tool create.With the flags of the next PR, against a stand-in for the LaunchDarkly API:
The new file:
Design notes
runCreatenow has one driver,createResource, and one builder for each kind:createAttachmentandcreateVariation. The driver plans in memory, asks, writes, applies the plan of the one resource, and removes the file after a definite failure. A builder gives it the reviewed row and the write.adoptis shared too.linkand the create build the new variation with onecreate.NewVariation.planResourcewith the new variation in memory. The variation has a model config version, so the model canonicalization of the plan does not change it. The row that the apply reads from the new file is therefore the same.Review focus
Verification
go test ./...andgolangci-lint run(v2.9.0) pass. Every tool and skill create test passes without edits after the driver split.Runner.Run:TestCreateRefusesTheKeyOfAnArchivedVariationfails without the archived check.create/prompt_test.gocovers the error for missing flags, both content modes, and the adopt comparison.ldcliand ran the flag-only scripts of the sync commands and oflinkagainst a stand-in for the LaunchDarkly API. Their output is the same as before this PR. The next PR has the manual checks of the variation create.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 prompts addcan create a new prompt variation from flags (content, model config, optional name) in an existing AI config, using the same create / adopt / refuse behavior as tools and skills.Create validation moves to shared
create.InputwithModelConfigKeyandCheck(kind syncdomain.Kind).--contentis parsed like a variation file (ParsePromptBodyis exported): agent instructions vs completion role blocks or plain text.runCreatesplits intocreateVariationandcreateAttachment, with a sharedcreateResource/adoptpath. Existing remote variations with matching prompt (and optional name / model config key) start syncing without mutation; mismatches and archived keys are rejected before writes.linkbuilds variations viacreate.NewVariation.Reviewed by Cursor Bugbot for commit 4e53008. Bugbot is set up for automated code reviews on this repo. Configure here.