Skip to main content
Claude Code edits files. KDX sync moves those files between Git and Kodexa. This page shows the operational loop for taking Claude Code-authored metadata through validation, review, and deployment.

Pull Before You Edit

Start every session by pulling the latest platform state and Git state:
Then inspect the diff:
If kdx sync pull changed files, commit or intentionally review those changes before asking Claude Code to make new edits. A clean baseline makes conflicts easier to reason about.

Validate Local Files

Validate changed resource files before sync:
For a broad pass:
kdx validate checks YAML against the platform OpenAPI schema without sending the resource to the server.

Dry-Run The Sync

Always preview before pushing:
Review:
  • created resources
  • updated resources
  • deleted resources
  • dependency ordering
  • unresolved references
  • target organization and environment
If the dry run is not clean, ask Claude Code to inspect the output and the relevant files:

Push To A Development Environment

Once the dry run is correct:
Commit the deployed change and sync state:
Commit .sync-state/ after pull and push operations. It records server change sequences used for conflict detection.

Use Deploy For GitOps Promotion

Use sync deploy when your repository has branch or tag mappings in sync-config.yaml:
For release-driven promotion:
For GitHub Actions, prefer the official kdx-sync-action. See CI/CD Integration.

Handling Conflicts

If KDX reports stale server state:
Then decide whether to keep the server change, keep your local change, or merge both. Do not use --force until you understand which server-side change would be overwritten. Ask Claude Code to help with the merge, not to blindly force it:

A Safe Claude Code + KDX Loop

Next Steps

Sync Overview

Understand the sync repository model.

Pull, Push & Deploy

Learn command flags and operational behavior.

Conflict Detection

See how .sync-state/ protects against stale writes.

Resource Validation

Validate YAML against the platform schema before deployment.