Skip to content

feat(sync): add the prompt sync command - #814

Merged
ctawiah merged 2 commits into
mainfrom
ctawiah/AIC-3448/prompt-sync-command
Sep 29, 2026
Merged

ctawiah merged 2 commits into
mainfrom
ctawiah/AIC-3448/prompt-sync-command

Conversation

@ctawiah

@ctawiah ctawiah commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Context

This final layer exposes the redesigned workflow through ldcli. The Cobra package stays thin: it parses command options and delegates all sync behavior to internal/sync/prompt.

What changes

  • Adds and registers ldcli sync prompt.
  • Exposes --add, --detach, --link, --format, --dry-run, --yes, --watch, and output selection.
  • Adds command help, analytics wiring, and end-to-end acceptance coverage against the existing config APIs.
  • Verifies archived variations remain archived server resources while reconciliation treats them as absent.
  • Uses a subdued adaptive blue accent for interactive forms on light and dark terminals.
$ ldcli sync prompt
Project: production

support/default
  Action: Update LaunchDarkly from the local file

Sync these changes? [y/N] y
Sync results:
- production/support/default  action=update_server  status=succeeded

Review focus

  • Is the command entry point free of domain logic?
  • Are flag combinations and terminal requirements clear?
  • Do acceptance tests cover the complete local-to-API workflow?

Verification

  • go test ./...
  • go test -race ./internal/sync/... ./cmd/sync
  • go vet ./internal/sync/... ./cmd/sync
  • make build
  • git diff --check

Related changes

Review the stack in this order:

  1. Sync foundations
  2. Prompt reference workspaces
  3. Prompt sync manifests
  4. Local prompt workspaces
  5. Bootstrap prompt workspaces
  6. Link and detach prompt resources
  7. Prompt reconciliation
  8. Prompt sync orchestration
  9. Prompt sync command

Note

Overview
Adds a top-level ldcli sync command (with analytics) and ldcli sync prompt, which wires CLI flags into internal/sync/prompt for bidirectional prompt-variation sync against LaunchDarkly.

The prompt subcommand exposes --add, --detach, --link, --format, --dry-run, --yes, and --watch, plus standard output/auth from the root command. Root help and registration tests list sync.

Also updates sync interactive forms to use adaptive blue accent/button colors for light and dark terminals, tightens plaintext plan output (no raw variation JSON), and adds end-to-end acceptance tests for dry-run, first sync, push/pull, linked files, deletions, conflicts, revalidation, partial failure, and ambiguous writes.

Reviewed by Cursor Bugbot for commit 226e645. Bugbot is set up for automated code reviews on this repo. Configure here.

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread internal/sync/prompt/watch.go
Comment thread internal/sync/prompt/conflict_watch.go Outdated
@ctawiah
ctawiah marked this pull request as draft September 24, 2026 04:33
@ctawiah
ctawiah marked this pull request as ready for review September 24, 2026 14:50
@ctawiah
ctawiah requested a review from a team as a code owner September 24, 2026 17:19
@ctawiah
ctawiah force-pushed the ctawiah/AIC-3448/prompt-sync-command branch from 2245b14 to 40dfa94 Compare September 24, 2026 17:19

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread internal/sync/prompt/conflict.go
Comment thread internal/sync/prompt/watch.go
@ctawiah
ctawiah force-pushed the ctawiah/AIC-3448/prompt-sync-command branch from 40dfa94 to 794e08b Compare September 24, 2026 17:32

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread internal/sync/prompt/conflict.go
Comment thread internal/sync/prompt/runner.go Outdated
@ctawiah
ctawiah force-pushed the ctawiah/AIC-3448/prompt-sync-command branch from 794e08b to 40702cc Compare September 24, 2026 17:40

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ 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 40702cc. Configure here.

Comment thread internal/sync/prompt/watch.go
@ctawiah
ctawiah force-pushed the ctawiah/AIC-3448/prompt-sync-command branch from 40702cc to 71af602 Compare September 24, 2026 17:57
@ctawiah
ctawiah removed this pull request from stack #815 September 24, 2026 17:59
@ctawiah
ctawiah changed the base branch from ctawiah/AIC-3446/prompt-reconciliation to ctawiah/AIC-3448/prompt-sync-orchestration September 24, 2026 17:59
@ctawiah
ctawiah added this pull request to stack #821 September 24, 2026 17:59
@ctawiah
ctawiah force-pushed the ctawiah/AIC-3448/prompt-sync-command branch from 94eccc0 to 217d373 Compare September 25, 2026 16:11
@ctawiah
ctawiah force-pushed the ctawiah/AIC-3448/prompt-sync-command branch 2 times, most recently from d773bd0 to 3596aa2 Compare September 28, 2026 21:38
@ctawiah
ctawiah force-pushed the ctawiah/AIC-3448/prompt-sync-command branch from 3596aa2 to e3e37de Compare September 28, 2026 21:44
@ctawiah
ctawiah force-pushed the ctawiah/AIC-3448/prompt-sync-command branch 3 times, most recently from ebff684 to 60c2f6f Compare September 29, 2026 00:04
@ctawiah
ctawiah force-pushed the ctawiah/AIC-3448/prompt-sync-command branch 2 times, most recently from 9257261 to 6707995 Compare September 29, 2026 00:17
@ctawiah
ctawiah force-pushed the ctawiah/AIC-3448/prompt-sync-command branch 2 times, most recently from 6aaa428 to add2cf0 Compare September 29, 2026 00:30
@ctawiah
ctawiah force-pushed the ctawiah/AIC-3448/prompt-sync-command branch 2 times, most recently from 53968ca to d182c8a Compare September 29, 2026 00:38
@ctawiah
ctawiah force-pushed the ctawiah/AIC-3448/prompt-sync-command branch 2 times, most recently from 9c651b5 to b2a61e4 Compare September 29, 2026 00:49
Base automatically changed from ctawiah/AIC-3448/prompt-sync-orchestration to main September 29, 2026 00:53
@ctawiah
ctawiah force-pushed the ctawiah/AIC-3448/prompt-sync-command branch from b2a61e4 to 226e645 Compare September 29, 2026 00:53
@ctawiah
ctawiah merged commit 9c9183e into main Sep 29, 2026
10 checks passed
@ctawiah
ctawiah deleted the ctawiah/AIC-3448/prompt-sync-command branch September 29, 2026 00:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants