Git sync
Personas mirror to a Git repository as YAML + markdown — pull, push, or bidirectional, scoped to a base path, with Git blob SHA conflict detection.
Git sync makes your persona library visible in pull requests. The canonical Moonborn state mirrors to a configured Git repository; the repo can be the source of truth, the audit trail, or both.
Preview status. Domain + application layers are implemented (
@moonborn/integration-git); the HTTP API surface + onboarding UI are landing in the next release. Early-access customers can wire it up via direct integration.
Modes
integrations.git.sync_direction:
pull— Git → Moonborn. Repo is canonical.push— Moonborn → Git. Product UI is canonical; Git is the audit trail.bidirectional— both, with conflict resolution.
File format
---
id: persona_01H...
name: Mert Aksoy
version: 4
layer: Soul
desire: build something the world can't ignore
fear: being seen as ordinary
wound: a parent who measured love in achievement
growth_arc: from approval-seeking to self-trusting
---
Mert spent his twenties in the Istanbul tech scene. His first
company sold to a Turkish telco — a quiet exit that he still
describes as "fine."Frontmatter carries the four structured layers; markdown body is the
narrative grounding. Path: {base_path}/{persona_id}.yaml (default
personas/).
Conflict resolution
Last-write-wins with explicit rejection — no three-way merge:
remote_wins— pulls overwrite local changes.local_wins— pushes overwrite remote.error— surface aPersonaFileSyncConflictErrorwith affected persona IDs; the sync halts.
Conflict detection is by Git blob SHA — we record what we last saw, re-check, fail loud if the SHAs disagree.
Commit strategy
integrations.git.commit_strategy:
per_change— one commit per persona changed.batched— one commit per sync run.manual— emit a draft batch; commit is operator-driven.
Per-change is the default for pushes — every persona refine becomes a reviewable commit. Batched is useful for periodic syncs.
Supported providers
| Provider | Status | Config |
|---|---|---|
| GitHub | live | integrations.git.providers.github |
| GitLab | live | integrations.git.providers.gitlab |
| Bitbucket | live | integrations.git.providers.bitbucket |
Each provider is independently tier-gated under
integrations.git.providers.*. All three are Team+.
What's still landing
- A
/v1/integrations/git/*REST surface (currently direct integration only). - Product-UI onboarding for OAuth to GitHub / GitLab / Bitbucket.
- A
git pushwebhook receiver so external pushes auto-trigger sync. - A conflict-resolution UI for the
errorstrategy. - Native audit-log emission per sync operation (Git history is the de-facto change log today).
Tier
Team and up.
Honest scope
Git sync is the persona repository mirror. It is not:
- A workspace export tool (use the Privacy export endpoint).
- A backup service (set up Git remote redundancy yourself).
- A code-review tool for the personas (use your usual PR review flow).
Next
- Setup walkthrough: Persona-as-code tutorial.
- Use case framing: Persona-as-code use case.