skills/sync/SKILL.md
Sync local project with remote sources — pulls DoltHub beads and GitHub repo to local. Handles the "no common ancestor" Dolt error that occurs when bd init creates a fresh local DB that conflicts with an existing DoltHub history. Use when local beads are out of sync, after a fresh init on a project that already has DoltHub data, or to pull the latest GitHub changes.
npx skillsauth add tunneleven/C4Flow c4flow:syncInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Agent type: Main agent (interactive)
Syncs both Dolt beads and GitHub code to the local workspace:
scripts/dolt_sync.sh which handles all cases automaticallygit pull from originFind the skill's scripts/dolt_sync.sh (in the same directory as this SKILL.md), then run it from the project root:
bash <skill-dir>/scripts/dolt_sync.sh "$(pwd)"
The script handles all cases automatically:
doltRemote from .state.jsonMISSING_DB)NEEDS_REMOTE)If the script exits with an error, report it to the user verbatim — don't try to fix it manually, as improvised bash can corrupt the Dolt journal.
Critical rule the script enforces: dolt reset --hard only runs while the server is live. Doing it while the server is stopped corrupts journal files and breaks the server.
git status --short 2>&1
git remote -v 2>&1 | head -2
If there are uncommitted changes, ask the user: stash and pull, commit first, or skip?
If clean:
git pull origin $(git rev-parse --abbrev-ref HEAD) 2>&1
| Error | Action |
|-------|--------|
| no tracking information | git branch --set-upstream-to=origin/main main then retry |
| merge conflict | Show conflicting files, tell user to resolve manually |
| not a git repository | Skip GitHub sync, note it |
✅ Dolt sync complete
Remote: <url>
HEAD: <hash> (<message>)
Beads: <N> issues
✅ GitHub sync complete
Branch: <branch>
Status: <result>
| Error from script | Cause | Fix |
|-------------------|-------|-----|
| No .state.json found | Missing state file | Run c4flow:init |
| No doltRemote in .state.json | DoltHub not configured | Run c4flow:init --remote <url> |
| DoltHub authentication required | Not logged in | dolt login |
| Local DB has N commits | May have local-only data | Review manually before reset |
| Server failed to restart | Journal issue | Check bd dolt status and logs |
development
Quality gate aggregation — runs bd preflight, combines with Codex review results, declares Ready for PR status. Use when the user wants to check if code is ready for PR, verify quality gates, or run preflight checks. Also triggers when mentioning "verify", "preflight", "quality gate", or "ready for PR".
development
Run unit and integration tests with coverage checking. Auto-detect framework, classify failures, enforce coverage threshold before advancing to review. Use when the user wants to run tests, check coverage, or validate implementation quality. Triggers on "run tests", "check coverage", "test suite", or when the code phase completes.
development
Test-driven development — RED-GREEN-REFACTOR cycles for all C4Flow implementation work. Merged into c4flow:code as a sub-agent phase with a mandatory RED gate pause. Use c4flow:code to run the full task loop.
content-media
Generate structured spec artifacts (proposal, tech-stack, spec, design) through interactive collaboration, using research.md as structured input.