Skip to content

feat(sync): bootstrap prompt workspaces - #812

Merged
ctawiah merged 1 commit into
mainfrom
ctawiah/AIC-3445/prompt-workspace-management
Sep 29, 2026
Merged

ctawiah merged 1 commit into
mainfrom
ctawiah/AIC-3445/prompt-workspace-management

Conversation

@ctawiah

@ctawiah ctawiah commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Context

A repository with no .launchdarkly directory needs a guided way to select existing LaunchDarkly variations and create its initial local workspace. This change adds that bootstrap experience and the shared terminal primitives it uses.

What changes

  • Uses Huh forms for project, config, and variation selection.
  • Loads catalog data in stable name order and shows progress while requests run.
  • Displays each option name above its key or description with clear spacing.
  • Omits already tracked variations and explains how many were skipped.
  • Writes or previews selected wrappers and seeds their manifest fingerprints.
  • Centralizes user-facing terminal text through a small shared console writer.

Review focus

  • Can every form be canceled without partial state?
  • Are existing wrappers protected from overwrite?
  • Are loading, validation, preview, and empty states clear?

Verification

  • go test ./internal/sync/...
  • 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 an interactive bootstrap flow for creating a local .launchdarkly workspace by picking LaunchDarkly projects, configs, and prompt variations from the API catalog. The flow requires a real TTY, uses Charm Huh forms for single- and multi-select, and routes status/preview output through a small sync/console writer.

Selection skips variations that already have local wrappers (with a count in the UI), supports dry-run previews of would-be files, and on commit writes wrappers via Bootstrap/Add then updates the sync manifest last—rolling back created files if manifest persistence fails. Dependencies add github.com/charmbracelet/huh and bump bubbles to a newer pre-release.

Reviewed by Cursor Bugbot for commit 265ccb0. 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/link/picker.go Outdated
Comment thread internal/sync/bootstrap/model.go Outdated
Comment thread internal/sync/bootstrap/model.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 force-pushed the ctawiah/AIC-3445/prompt-workspace-management branch from 949c60e to 9292bf0 Compare September 24, 2026 17:19
@ctawiah
ctawiah requested a review from a team as a code owner 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/bootstrap/bootstrap.go
Comment thread internal/sync/link/link.go Outdated
@ctawiah
ctawiah force-pushed the ctawiah/AIC-3445/prompt-workspace-management branch from 9292bf0 to 90e81a3 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.

Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.

There are 3 total unresolved issues (including 1 from previous review).

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 90e81a3. Configure here.

Comment thread internal/sync/bootstrap/bootstrap.go
Comment thread internal/sync/detach/detach.go Outdated
@ctawiah
ctawiah force-pushed the ctawiah/AIC-3445/prompt-workspace-management branch from 90e81a3 to 5ea109f Compare September 24, 2026 17:40
@ctawiah
ctawiah force-pushed the ctawiah/AIC-3445/prompt-workspace-management branch from 5ea109f to e8d2052 Compare September 24, 2026 17:57
@ctawiah ctawiah changed the title feat(sync): manage tracked prompt variations feat(sync): bootstrap prompt workspaces Sep 24, 2026
@ctawiah
ctawiah removed this pull request from stack #815 September 24, 2026 17:59
@ctawiah
ctawiah added this pull request to stack #821 September 24, 2026 17:59

@nieblara nieblara left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM! If it's low hanging fruit enough to make this agent friendly outside an interactive terminal, we should probably do that - can be a follow up imo, though!

@ctawiah
ctawiah force-pushed the ctawiah/AIC-3445/prompt-workspace-management branch 2 times, most recently from 4421361 to 9f46cb5 Compare September 25, 2026 16:00
@ctawiah
ctawiah force-pushed the ctawiah/AIC-3445/prompt-workspace-management branch from 9f46cb5 to e12bafe Compare September 25, 2026 16:07
@ctawiah
ctawiah force-pushed the ctawiah/AIC-3445/prompt-workspace-management branch 3 times, most recently from 4163af1 to bd37ab6 Compare September 28, 2026 21:38
@ctawiah
ctawiah force-pushed the ctawiah/AIC-3445/prompt-workspace-management branch from bd37ab6 to 84b1ea2 Compare September 28, 2026 21:44
@ctawiah
ctawiah force-pushed the ctawiah/AIC-3445/prompt-workspace-management branch 3 times, most recently from 5246920 to 454b77b Compare September 29, 2026 00:04
@ctawiah
ctawiah force-pushed the ctawiah/AIC-3445/prompt-workspace-management branch from 454b77b to 25acca5 Compare September 29, 2026 00:10
Base automatically changed from ctawiah/AIC-3444/local-prompt-workspaces to main September 29, 2026 00:17
@ctawiah
ctawiah force-pushed the ctawiah/AIC-3445/prompt-workspace-management branch from 25acca5 to be4343a Compare September 29, 2026 00:17
@ctawiah

ctawiah commented Sep 29, 2026

Copy link
Copy Markdown
Contributor Author

LGTM! If it's low hanging fruit enough to make this agent friendly outside an interactive terminal, we should probably do that - can be a follow up imo, though!

Good call! I already have a ticket for this.

@ctawiah
ctawiah force-pushed the ctawiah/AIC-3445/prompt-workspace-management branch from be4343a to 265ccb0 Compare September 29, 2026 00:24
@ctawiah
ctawiah merged commit c64ed62 into main Sep 29, 2026
10 checks passed
@ctawiah
ctawiah deleted the ctawiah/AIC-3445/prompt-workspace-management branch September 29, 2026 00:32
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