src/claude/skills/captain-sync-all/SKILL.md
Captain-only. Fetch, merge origin into master, merge unique worktree work into master, and sync all worktrees. The daily rhythm command. NEVER pushes to remote. NEVER rebases. NEVER resets to origin. Formerly `/sync-all` — v2 rename to captain-actor-verb.
npx skillsauth add the-agency-ai/the-agency captain-sync-allInstall 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.
Captain's daily master-sync rhythm command. Reconciles master with origin, merges any unique worktree work into master (with confirmation), and syncs every worktree to the updated master. Never pushes. Push is a separate concern (merged PRs land on master server-side).
Name pattern: captain- actor prefix (captain-only) + sync-all (compound noun-verb, the action). Grouped with captain-release, captain-log, captain-review in the captain family.
Captain runs /captain-sync-all after any of these events:
| Trigger | Emitted by | Scope |
|---|---|---|
| PR merge | GitHub | Automatic — /pr-captain-post-merge invokes this as its Step 5 |
| /iteration-complete | worktree agent | Integrate committed iteration work |
| /phase-complete | worktree agent | Integrate principal-approved phase commit |
| /plan-complete | worktree agent | Integrate plan-level milestone |
| /seed completion | worktree agent | Share seed artifact with fleet |
| /define completion | worktree agent | Share PVR with fleet |
| /design completion | worktree agent | Share A&D with fleet |
| /plan completion | worktree agent | Share plan with fleet |
| Session start | captain | Catch overnight drift before other work |
Two critical distinctions, mirrored in CLAUDE-CAPTAIN.md "Standing Duty":
Captain is the single coordination point for master state across the fleet. After a PR lands on GitHub or after captain-side coord commits, the local master + every worktree's local view of master must be reconciled. Without this skill, each worktree drifts independently and sync-pain accumulates.
Never pushes. Pushing from master is structurally banned by the framework. PR-merged commits reach origin/master via GitHub's merge; local sync pulls those down.
Never rebases, never resets to origin. Per REFERENCE-GIT-MERGE-NOT-REBASE.md, all sync uses true merge commits.
Before proceeding, Read the files listed in required_reading: frontmatter.
/captain-sync-all
No arguments. Skill is fully automatic; prompts for confirmation before merging worktree work into master.
./agency/tools/git-captain fetch
Check divergence:
git log --oneline origin/master..master # local-only commits
git log --oneline master..origin/master # remote-only commits
If diverged (both sides > 0 — typical after PR merge + local coord commits):
git merge-base origin/master HEAD. If fails, ABORT with recovery hint.git tag sync/pre-merge-$(date +%Y%m%d-%H%M%S)../agency/tools/git-captain merge-from-origin (produces merge commit).If behind only: ./agency/tools/git-captain merge-from-origin fast-forwards.
Never git reset --hard origin/master. Never git rebase origin/master.
For each worktree, determine: branch name, clean/dirty status, commits ahead of master.
For each worktree with commits ahead of master:
git merge <branch> --no-ff.If any worktree work merged into master in Step 5, dispatch main-updated to all agents with worktrees:
./agency/tools/dispatch create --type main-updated --to <repo>/<principal>/<agent> --subject "Main updated — new work merged"
Agents see this on their next iscp-check / /session-resume.
For each worktree: git -C <worktree-path> merge master. Picks up new master content.
Present status table:
Sync complete:
Worktree Branch Status Merged Synced
-----------------------------------------------------------------
fix-auth fix-auth clean 3 commits yes
proto-tooling proto/tooling dirty skipped yes
Light update to captain handoff: "what synced, what was merged into master, any worktrees skipped."
paths: [] — no file-path auto-activation; universally discoverable for the captain but scoped out of agent worktree contexts.captain- — scope visible at a glance in skill listings.(Historically disable-model-invocation: true was a fourth layer. That flag was removed 2026-04-20 because the captain session IS the principal's session — DMI was blocking the captain from invoking captain-* skills. See REFERENCE-SKILL-CONVENTIONS.md §1.)
active (v2, refactored from legacy sync-all 2026-04-19).
/pr-captain-post-merge — invokes this as Step 5 after a merge/sync — agent-side push skill (different scope entirely)/worktree-sync — single-worktree sync (agent-side; this skill calls it across all worktrees)agency/tools/git-captain — safe captain-side git operationsagency/REFERENCE-GIT-MERGE-NOT-REBASE.md — the merge disciplineagency/REFERENCE-WORKTREE-DISCIPLINE.md — worktree modelOFFENDERS WILL BE FED TO THE — CUTE — ATTACK KITTENS!
business
Sync worktree with master — merge, copy settings, run sandbox-sync, report changes
tools
List all git worktrees with status info (branch, clean/dirty, deps)
tools
Remove a git worktree and optionally delete its branch
development
Create a new git worktree with dedicated branch and bootstrapped dev environment