Skip to main content

/sync - One-Command Framework Sync

Zero-interaction, fully automated framework sync.

Syncs your coditect-core changes to GitHub and protected installation in one command.

System Prompt

EXECUTION DIRECTIVE: When the user invokes /sync, you MUST:

  1. Execute immediately - No confirmation needed
  2. Run the core-sync script with appropriate flags
  3. Report results - Show what was synced
python3 ~/.coditect/scripts/core-sync.py

After sync completes, run integrity scan (ADR-182):

python3 "$CODITECT_CORE/scripts/file_integrity.py" --scan --recorded-by "sync"

This updates the file integrity registry with the newly synced state, ensuring the registry always reflects the latest known-good baseline.

For dry-run preview:

python3 ~/.coditect/scripts/core-sync.py --dry-run

For custom message:

python3 ~/.coditect/scripts/core-sync.py --message "fix: your message"

Usage

/sync                    # Full auto sync (recommended)
/sync --dry-run # Preview what would happen
/sync -m "fix: bug" # Custom commit message
/sync --skip-parent # Only sync coditect-core
/sync --skip-protected # Don't update ~/.coditect

What It Does

In one command:

┌─────────────────────────────────────────────────────────────────┐
│ YOUR CHANGES │
│ (agents, commands, skills, scripts, etc.) │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────┐ │
│ │ 1. AUTO-DETECT changes │ │
│ │ 2. AUTO-GENERATE commit message │ │
│ │ 3. COMMIT to coditect-core │ │
│ │ 4. PUSH to GitHub │ │
│ └─────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────┐ │
│ │ 5. UPDATE parent submodule reference │ │
│ │ 6. COMMIT parent (rollout-master) │ │
│ │ 7. PUSH parent to GitHub │ │
│ └─────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────┐ │
│ │ 8. SYNC protected installation │ │
│ │ ~/Library/Application Support/... │ │
│ └─────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────┐ │
│ │ 9. INTEGRITY SCAN (ADR-182) │ │
│ │ Update file integrity registry │ │
│ └─────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ DONE! Changes live everywhere. │
└─────────────────────────────────────────────────────────────────┘

Auto-Generated Commit Messages

The script intelligently generates commit messages based on what changed:

Change TypeGenerated Message
Single agentfeat(agents): Add/Update {name} agent
Single commandfeat(commands): Add/Update /{name} command
Single skillfeat(skills): Add/Update {name} skill
Multiple agentsfeat(agents): Update {N} agents
Mixed changesfeat: Update {N} agents, {M} commands
Config onlychore(config): Update {name}
Docs onlydocs: Update {name}

Examples

Quick Sync After Making Changes

# Made changes to agents/my-agent.md
/sync
# Output:
# === Syncing coditect-core ===
# Changed files (1):
# agents/my-agent.md
# Commit message: feat(agents): Update my-agent agent
# Committed
# Pushed to origin/main
# === Syncing coditect-rollout-master ===
# Committed submodule update
# Pushed to origin/main
# === Syncing protected installation ===
# Protected now at: abc1234
# Sync complete!

Preview Before Syncing

/sync --dry-run

Custom Message

/sync -m "fix(extractors): Remove --json flag footgun"

Comparison with /framework-sync

Feature/sync/framework-sync
Confirmation promptsNoYes
Machine registrationNot requiredRequired
Commit messageAuto-generatedInteractive
Protected updateGit pullFull re-clone
SpeedFastSlower
Use caseQuick iterationFormal releases

Use /sync for:

  • Day-to-day development
  • Quick fixes
  • Iterating on components

Use /framework-sync for:

  • First-time setup
  • Machine registration
  • Full protected re-clone

Troubleshooting

"Lock file exists"

The script auto-removes stale lock files. If you still see this:

rm -f ~/PROJECTS/coditect-rollout-master/.git/index.lock
rm -f ~/.git/modules/submodules/core/coditect-core/index.lock

"Protected location not found"

Run the initial setup:

python3 ~/.coditect/scripts/CODITECT-CORE-INITIAL-SETUP.py

"Push failed"

Check your GitHub authentication:

gh auth status

See Also

  • /integrity - File integrity verification (ADR-182)
  • /framework-sync - Full sync with registration
  • /component-create - Create new components
  • /symlinks - Manage symlinks

Script: scripts/core-sync.py Track: H.9 (Framework Automation) Created: 2026-01-29

Changelog:

  • v1.1.0 - ADR-182: Step 9 post-sync integrity scan, /integrity in See Also
  • v1.0.0 - Initial release