Workflow: Dotfiles Sync
Trigger
Run this workflow when you need to:
- reconcile source-vs-target dotfile drift
- inspect pending chezmoi changes before apply
- promote intentional target changes back into source
- perform a safe source-first sync across machines
Inputs
- Active dotfiles source repo at
/Users/jean-patricksmith/.local/share/chezmoi - Local target state under
$HOME dotfileshelper available on PATH- Optional handoff context in
.lev/pm/handoffs/
Steps
- Run
dotfiles statusanddotfiles sync. - Classify results into:
- source-only change
- target-only intentional drift
- same-area conflict
- runtime noise
- Resolve intent into source first:
- source-only wins automatically
- target-only intentional drift may be promoted back into source
- same-area conflicts must pause and escalate
- If source truth changed:
- review
git -C ~/.local/share/chezmoi status --short - commit
- pull
--rebase - push
- review
- Only after source truth is settled:
- run
chezmoi apply --forceon the chosen target set
- run
- Re-run
dotfiles syncto verify the remaining drift is only expected runtime noise or clean.
Team
| Role | Responsibility |
|------|---------------|
| dotfiles operator | Reads dotfiles planner output, classifies drift, and updates source truth |
| git reconciler | Commits, pulls, pushes the chezmoi source repo once intent is resolved |
| escalation agent | Opens AgentPing or human review when same-area conflicts exist |
Outputs
- Updated chezmoi source repo state
- Updated target home state after apply
- Dry-run report at
~/.local/state/lev/dotfiles-sync-plan.latest.txt - Optional handoff updates documenting decisions and escalation points
Validation
dotfiles synccompletes without mutating state and produces a current report- Any committed source changes are pushed successfully
chezmoi apply --forcecompletes only after source truth is reconciled- Same-area conflicts are escalated, never auto-merged
- Final
dotfiles statusreflects either clean state or explicitly accepted runtime noise
Scan to join WeChat group