Repository navigation
feat(bin): rsync engineer skills to remote secondmate launches - #5
Merged
Merged
Conversation
added 2 commits
September 1, 2026 01:18
At every remote secondmate launch, rsync ~/.claude/skills/ into the route's remote login home, so a remote crewmate always sees the captain's current skill set instead of drifting from a one-off manual copy. Adjacent to, not an extension of, the FM_INHERITABLE_CONFIG allowlist: skills are a directory tree outside FM_HOME. Remote-route only, never --delete, exclusions come from gitignored config/skill-sync-exclude with a documented default, and a failure warns via the existing SECONDMATE_SYNC convention without blocking launch.
…ut and audience inventory
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Captain-directed (2026-08-31): "re-sync skills on every secondmate launch, using rsync."
At every remote secondmate launch, rsync the engineer's
~/.claude/skills/into that route's remote login home, so a remote crewmate always sees the captain's current skill set instead of drifting from a one-off manual copy.Why it matters: the manual copy that prompted this pushed 31 skills / 104 files by hand to
agent-host-staging-adomiothe same eveningsession-handoffgot renamed - exactly the kind of edit a one-off copy never propagates. Without this, every remote secondmate silently runs against a stale skill set until someone remembers to re-copy.This is additive and isolated: local secondmate routes, firstmate's bootstrap convergence sweep, and the existing
FM_INHERITABLE_CONFIGallowlist contract are all untouched (see Out of scope). A failure here warns and never blocks a secondmate launch.Change
bin/fm-remote-skill-sync.sh~/.claude/skills/to a remote route's.claude/skills/bin/fm-spawn.shspawn_remote_secondmate, warn-onlydocs/configuration.mddocs/examples/skill-sync-excludedocs/remote-secondmates.md.agents/skills/secondmate-provisioning/SKILL.mdAGENTS.md,docs/documentation-audiences.jsondocumentstep: layout-inventory entry for the new config item + audience classification for its example filetests/fm-remote-skill-sync.test.shtests/fm-remote-secondmate-skill-sync.test.shtests/fm-remote-secondmate-{trace-context,parent-binding,lifecycle-e2e}.test.shBehavior:
bin/fm-remote-skill-sync.sh <secondmate-id>- guards on the registry'sremote=1field (a local route is a complete no-op, never shells out); destination is the plain relative path<host>:.claude/skills/, which an ssh-invoked rsync resolves against the remote login shell's own$HOME(no new remote-home registry field needed); never passes--delete(a host may legitimately hold skills the laptop does not -no-mistakes, installed there by its own installer, is the concrete example); exclusions come from gitignoredconfig/skill-sync-exclude(one--excludepattern per non-comment line, mirroringconfig/wedge-alarm's shape), which fully replaces, not merges with, a documented built-in default (notebooklm/,notebooklm-to-skill/,notebooklm-to-skill-workspace/,skill-creator/,no-mistakes/,__pycache__,.venv,node_modules).--statsoutput to contain two version-portable lines (Number of files: NandTotal (bytes )?sent: N), so a confirmed zero-file resync (still a full stats block) is told apart from a flag-rejection usage banner that also exits 0 with no stats block at all.SECONDMATE_SYNC: secondmate <id>: skipped: skill sync failed on <host>: ...convention and never blocks the launch.Validation
bash tests/fm-remote-skill-sync.test.sh- 6/6: local route never invokes rsync; default exclusions applied and--deletenever passed; a presentconfig/skill-sync-excludefully overrides the default; an absent rsync and a failing rsync each fail distinctly; a confirmed no-op transfer is told apart from a rejected-flag usage banner that also exits 0.bash tests/fm-remote-secondmate-skill-sync.test.sh- 2/2, against the repo's real SSH/Herdr remote-secondmate fixture: a failing skill sync warns viaSECONDMATE_SYNC:but the realbin/fm-spawn.sh --secondmatelaunch chain still succeeds; a healthy sync targets the route's own registered SSH alias with no warning.fm-remote-secondmate-trace-context.test.sh(6/6),fm-remote-secondmate-parent-binding.test.sh(5/5), and the fullfm-remote-secondmate-lifecycle-e2e.test.sh(all pass, ~7.5 min) - to confirm the override didn't affect anything they assert.bin/fm-lint.sh(pinned ShellCheck 0.11.0 + actionlint 1.7.12): clean.openrsync(macOS system rsync, protocol 29): confirmed--statsoutput matches the script's parsing exactly, and confirmed--info=stats1(the flag the captain's original manual run used) is rejected outright by this rsync - corroborating the flag-portability rationale in the script's own header.--stats-block verification is deliberately kept anyway as defense in depth - it's what the captain's own manual run actually hit - and it costs nothing when the exit-code path already catches a real failure.Out of scope
Deliberately excluded per the captain's own scoping:
bin/fm-bootstrap.sh's deferred sweep is untouched; this only runs at launch. Skills load only at session start, so a mid-session sync would have no live effect anyway.~/.claude/skills/directory; it stays a guarded no-op, never a code path change.FM_INHERITABLE_CONFIGallowlist contract -bin/fm-config-inherit-lib.sh's hashing, generation records, divergence quarantine, and read-only modes are untouched. Skills are a directory tree outsideFM_HOME; this is a separate, adjacent step at the same launch convergence point, not an extension of that allowlist.Pipeline
Updates from git push no-mistakes
🤖 Generated with Claude Code