feat(supervision): port upstream self-update skill and ghost-text fix to herdr - #1
Merged
Merged
Conversation
… to herdr Port two upstream changes onto the herdr backend: - kunchenguid#61 self-update: bin/fm-update.sh fast-forwards the firstmate repo and every secondmate home from origin, fast-forward-only with fm-fleet-sync safety (never force/merge-commit/stash; skip dirty/diverged/offline/wrong-branch). Secondmate homes are herdr worktrees on lease branch secondmate-<id> rather than detached-HEAD treehouse leases, and nudges target fm-<id> (herdr pane). Adds the /updatefirstmate skill, AGENTS.md section 12, README entries, and tests/fm-update.test.sh. - kunchenguid#59 ghost text: launch claude with CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION=false and make fm-herdr-lib.sh capture `herdr pane read --format ansi` then strip dim/faint (SGR 2) runs before border-aware classification, so Claude's predicted-prompt ghost text never reads as pending input. The styled capture stays internal; fm-peek stays plain. Adds tests/fm-composer-ghost.test.sh.
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.
What & why
Adapts the
herdr-backendfork to two upstream firstmate commits that were genuinely missing after an audit of the post-fork upstream history. A straight rebase/merge ofupstream/mainwas rejected on purpose: this fork deliberately dropped tmux + treehouse +fm-bootstrapand re-implemented those features for the herdr backend, so selective porting is the maintenance model. Base isherdr-backend(the fork's trunk), notmain(which mirrors upstream).Ported changes
kunchenguid#61 — self-update skill (
/updatefirstmate)bin/fm-update.sh: fast-forwards the running firstmate repo and every registered secondmate home fromorigin, fast-forward only, mirroringfm-fleet-syncsafety (never force / merge-commit / stash; skip + report dirty / diverged / offline / wrong-branch), so prime directive chore: port upstream brief-contract and skill-set doc fixes (#73, #72) #3 holds and no unlanded work is discarded.secondmate-<id>, soff_targetaccepts the default branch or that lease branch or a detached HEAD and fast-forwards it toorigin/<default>. Nudges targetfm-<id>(the herdr pane, resolved byfm-send) instead of tmux window targets./updatefirstmateskill,AGENTS.md§12, and README entries.tests/fm-update.test.sh— 12 cases, including a herdr-specific lease-branch skip test.kunchenguid#59 — composer detection ignores Claude ghost text
Claude renders a dim/faint predicted-next-prompt suggestion inside an otherwise-empty composer; the herdr composer detector (shared by the away-mode daemon and
fm-send) would misread it as pending input. Both upstream prongs ported:CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION=false(per-launch env prefix infm-spawn.sh, scoped to firstmate-launched agents; never touches the captain's global config).fm-herdr-lib.shnow capturesherdr pane read --format ansiand strips dim/faint (SGR 2) runs via a newfm_herdr_strip_ghost(ported verbatim from upstream's hardened awk, which preserves SGR-colored normal-intensity typed text) before the existing border-aware classification. The styled capture stays internal;fm-peekand human-facing reads stay plain.tests/fm-composer-ghost.test.sh— 9 cases.AGENTS.md§4/§8 synced.Deferred (separate decision)
tasks-axi(kunchenguid#55/kunchenguid#60) intentionally not ported:tasks-axiis not installed here, upstream treats it as dormant/conditional scaffolding, and its wiring hangs off thefm-bootstrapthis fork removed. Revisit if/when the tool is adopted.Validation
shellcheck bin/*.sh tests/*.shclean;bash -nclean.CLAUDE.md → AGENTS.mdand.claude/skillssymlink invariants hold.bin/fm-update.shon a non-default branch safely skips (never forces), prints correct action lines, leaves HEAD untouched.🤖 Generated with Claude Code