Skip to content

Sync

/flow-next:sync is the manual escape hatch for plan-sync.

/flow-next:work runs plan-sync automatically after every task when planSync.enabled is true. Use this skill when code changed outside the work loop — manual edits, an external PR, a worker that completed but did not trigger sync — and downstream task specs need to be re-checked against reality.

  • A spec’s later tasks reference paths or APIs that earlier tasks have since renamed.
  • A teammate pushed changes that affect a task you have not started yet.
  • /flow-next:work ran with plan-sync disabled and you want to catch up.
  • You want to preview drift before acting on it.
Terminal window
/flow-next:sync <id> [--dry-run]

<id> accepts:

  • A spec ID (fn-1-add-oauth or legacy fn-1). Syncs all tasks under the spec.
  • A task ID (fn-1-add-oauth.2 or legacy fn-1.2). Syncs that task and its downstream peers.

--dry-run shows what would change without writing.

For each downstream task, sync compares the task spec against the current state of the codebase and the committed work of upstream tasks. When it finds drift — stale paths, renamed exports, signatures that no longer match — it surfaces the reason and proposes an update.

Plan-sync never silently rewrites a spec. The user always sees the diff and approves it before any write.

ResultMeaning
cleanNo drift. Downstream tasks still match reality.
driftProposed updates with reasons. User approves or rejects per file.
regenerateSpec is too far gone to patch cleanly; offer to regenerate the affected tasks.
  • Not a code change. Sync edits task specs, not implementation files.
  • Not a replacement for /flow-next:plan when the spec is fundamentally out of date. If most tasks need regeneration, restart planning.
Terminal window
/flow-next:work <next-ready-task>

Or, if drift surfaced design-level issues, revisit the spec:

Terminal window
/flow-next:plan-review <spec-id>