Skip to content

feat(sync): write local prompt variation files - #792

Draft
ctawiah wants to merge 10 commits into
ctawiah/AIC-3340/sync-prompt-statusfrom
ctawiah/AIC-3344/bootstrap-add-flow
Draft

ctawiah wants to merge 10 commits into
ctawiah/AIC-3340/sync-prompt-statusfrom
ctawiah/AIC-3344/bootstrap-add-flow

Conversation

@ctawiah

@ctawiah ctawiah commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Context

The sync flow also needs a safe way to materialize LaunchDarkly prompt variations in a local .launchdarkly workspace. This storage layer is shared by first-time interactive bootstrap and future server-to-local operations, while keeping file generation separate from API selection and terminal UI concerns.

The main safety requirement is that existing local work is never overwritten. New files are rendered in the same format accepted by the local parser, and multi-file writes are rolled back if any file cannot be created. This PR does not fetch or select remote variations.

Summary

  • Writes agent and completion variations as .prompt.md files that round-trip through the local parser.
  • Creates a complete .launchdarkly workspace atomically for first-time bootstrap.
  • Adds selected variations without overwriting existing files and rolls back partial writes on failure.
  • Validates path segments, variation modes, and supported message roles.
  • Exposes rendering separately so dry runs can show exact file paths and content without writing.
  • Stays limited to Phase 1 prompt variations and adds no Git requirement or source metadata file.

Verification

  • go test ./internal/sync/local -count=1
  • Focused lint for ./internal/sync/local

@ctawiah
ctawiah added this pull request to stack #790 September 10, 2026 20:26
@ctawiah
ctawiah removed this pull request from stack #790 September 11, 2026 23:01
@ctawiah ctawiah changed the title feat(sync): bootstrap local prompt configs feat(sync): write local prompt variation files Sep 11, 2026
@ctawiah
ctawiah changed the base branch from ctawiah/AIC-3340/sync-prompt-status to ctawiah/AIC-3340/preview-sync-plan September 11, 2026 23:17
@ctawiah
ctawiah added this pull request to stack #795 September 11, 2026 23:17
Base automatically changed from ctawiah/AIC-3340/preview-sync-plan to ctawiah/AIC-3340/sync-prompt-status September 11, 2026 23:50
@ctawiah
ctawiah removed this pull request from stack #795 September 11, 2026 23:51
@ctawiah
ctawiah added this pull request to stack #799 September 11, 2026 23:51
@ctawiah
ctawiah force-pushed the ctawiah/AIC-3344/bootstrap-add-flow branch from 873f1d1 to a6cb831 Compare September 14, 2026 21:14
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.

1 participant