Conversation
Walk .launchdarkly and compile prompt variations and versioned tools into a common resource with a stable fingerprint. Top-level system, user, and assistant tags become messages; nested tags stay in the prompt body.
2e0e6cd to
faf6f4b
Compare
…e-local-synced-resources
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ 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 910e2dc. Configure here.
| after, ok := consumeLineEnding(rest[index+4:]) | ||
| if !ok { | ||
| after = nil | ||
| } |
There was a problem hiding this comment.
Closing fence drops prompt body
Medium Severity
When the closing --- fence is not followed by a line ending or EOF, splitFrontMatter discards the rest of the file and returns an empty body instead of failing. consumeLineEnding already treats EOF as success, so this branch only hits trailing spaces, extra dashes, or same-line text after the closer. Compile then succeeds with empty instructions or messages, so those prompts can be synced as blank.
Reviewed by Cursor Bugbot for commit 910e2dc. Configure here.
| }) | ||
| if errors.Is(err, fs.ErrNotExist) { | ||
| return nil, nil | ||
| } |
There was a problem hiding this comment.
Walk errors empty a project
Low Severity
compileProjectVariations treats any fs.ErrNotExist from the walk as an empty project, not only a missing configs directory. A later ReadFile miss, such as a dangling symlink to a .prompt.md file, returns nil, nil and drops variations already collected for that project instead of surfacing the path error.
Reviewed by Cursor Bugbot for commit 910e2dc. Configure here.


Context
This is the foundation for Phase 1 of code canonical sync for AI Config prompt variations. The CLI needs a stable local format that people can edit and that later planning requests can send to Gonfalon without recreating or interpreting server-owned fields.
This PR is intentionally local-only. It defines how prompt files are discovered, parsed, validated, and converted into sync resources. It does not call Gonfalon, calculate fingerprints, create plans, or apply changes.
Summary
.prompt.mdformat.Verification
go test ./internal/sync/... -count=1