Repository navigation
feat: add firstmate self-update skill - #61
Conversation
Fast-forward-only self-update for a running firstmate and its secondmates: fm-update.sh FFs this repo's default branch from origin, then FFs each registered secondmate home (worktrees at detached HEAD) the same way, mirroring fm-fleet-sync's safety (never force/merge-commit/stash; skip dirty/diverged/offline/wrong-branch). It emits reread-firstmate and nudge-secondmates action lines; the skill re-reads AGENTS.md and nudges each updated secondmate so the whole tree converges on the latest bin/ and instructions. Touches only the firstmate repo and its worktrees.
Rework kunchenguid#61 into a fork-aware upstream porter (report-only)
… to herdr (#1) 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.
Hero headlines that movedWith the panel gone, the open How We Help links end 164px down on desktop at the default 16px text size, and about
This section was meant for the PR description; the author account cannot edit the description, so it is posted here. One correction to the Risk Assessment above: the physician-pixel test that could pass without checking anything was fixed in review (e4df407). It now waits for each width's backdrop to load and decode, and fails on a zero natural width. |
* feat(docs): add Herdr layout convergence preview with real lab captures Stage the approved convergence direction - upstream's one-worker-per-container execution unit under our human-readable project labels - and capture what it actually looks like at eight workers across three projects before anything changes on the live fleet. Two candidates were staged against today's layout. A project header row with its workers indented beneath it reproduces today's reading order, but Herdr appends every new workspace to the end of the list and exposes no reorder, so a worker that starts out of project order lands under the wrong header while the header still counts it. Carrying the project name on each worker row is order-independent and keeps outcome, state, runtime and branch, at the cost of the per-project count line. Also record the underlying Herdr fact in the backend verification doc: workspace ordering is creation order and cannot be changed, so any layout that encodes a relationship in adjacency separates when work arrives out of order. That applies to upstream's own child rows too. bin/fm-visible-format-lib.sh extracts the captain-facing state vocabulary from bin/fm-visible-status.sh so the preview reuses it instead of copying it. fm-visible-status.sh behaves identically; its tests are unchanged and pass. Nothing here changes live fleet behavior. Every Herdr operation, cleanup included, went through bin/fm-herdr-lab.sh in generated non-default lab sessions, and the default-session tripwire verified clean after each run. * no-mistakes(review): address review: drop dead rank helper, harden preview e2e, correct doc claims * no-mistakes(review): correct capture attribution and record summary-row width limit * no-mistakes(review): qualify count-line recovery heading to match section * no-mistakes(document): Fix broken preview provenance link * no-mistakes: apply CI fixes * no-mistakes: apply CI fixes
|
Head of before:
|
…ry pane (kunchenguid#61) * feat(bin): fold a factory's routine runs into one line on the Factory pane A factory's registry entry may mark its work, or kinds of its jobs, as routine with a routine: line. On the overview each routine kind becomes one line with its runs today and the last one, a pass that runs or waits folds into it, and a finished, landed or closed pass stays out of the since you last looked list. A failed, stuck or owner-facing pass shows as before, and without the line the pane is unchanged. * no-mistakes(review): Leave folded routine passes out of running counts * no-mistakes(review): Keep other cards visible beside a folded pass * no-mistakes(review): Draw a folded-only factory as idle, cards kept * no-mistakes(document): Correct idle routine factory overview wording
Intent
Add a project-level, user-invocable skill /updatefirstmate plus a helper bin/fm-update.sh that self-updates a running firstmate and its secondmates to the latest from origin.
Goal: firstmate is its own repo behind the no-mistakes gate, so improvements to AGENTS.md, bin/, and skills land on main and then wait for each running firstmate to pull them. This skill performs that in-place pull for the running main firstmate and every secondmate, so the whole tree converges on the latest bin/ + instructions without restarting anything.
Key deliberate design decisions a reviewer reading only the diff would not know:
Tests: tests/fm-update.test.sh adds 9 cases (FF success + reread/nudge signalling, single-parent non-merge verification, instruction-only reread gate, dirty-skip with edit preserved, diverged-skip with local commit preserved, idempotency, registry backstop, dedup + firstmate self-exclusion, off-default-branch skip). shellcheck is clean across bin/.sh and tests/.sh and the full suite is green.
What Changed
/updatefirstmateskill andbin/fm-update.shhelper that fast-forwards the running firstmate repo and seeded secondmate homes fromoriginwhen safe.AGENTS.mdandREADME.md, and added focused coverage intests/fm-update.test.shfor the update and skip behavior.Risk Assessment
✅ Low: Captain, the change is narrowly scoped to a fast-forward-only helper plus its skill/docs, with the previously identified safety gaps addressed and no material remaining issues found.
Testing
Captain, I confirmed the change scope, ran the focused fm-update automated suite, captured an end-to-end CLI transcript showing a real fast-forward of main plus a detached secondmate with correct
reread-firstmateandnudge-secondmateslines, verified a dirty secondmate is skipped without losing its edit, checked skill discoverability through.claude/skills, removed the temporary fixture, and ended with a clean worktree.Evidence: fm-update end-to-end CLI transcript
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
🔧 **Review** - 4 issues found → auto-fixed ✅
bin/fm-update.sh:149- Real seeded secondmate homes contain the untracked.fm-secondmate-homemarker written byfm-home-seed.sh, and this repo does not ignore that path. This dirty check runs before any fast-forward, so real secondmate homes will be reported asskipped: dirty working treeand never update. Filter that marker out of the dirty check, and add a fixture that includes it.bin/fm-update.sh:215-home=values from state and the registry are passed directly intoff_targetwithout the seeded-secondmate validation used byfm-spawn.shandfm-backlog-handoff.sh. A stale or bad entry pointing atprojects/...or any other clean git repo could be fetched and fast-forwarded, violating the helper's safety promise. Validate the resolved home, marker id, firstmate files, and path boundaries before merging.bin/fm-update.sh:217- Registry-only secondmates have nostate/<id>.meta, but the script still appendsfm-$idtonudge-secondmates. The documented follow-up commandbin/fm-send.sh fm-$id ...refuses barefm-*targets without metadata, so/updatefirstmatecan fail immediately after updating a registry-only home. Only list live windows known from metadata, or output an explicit no-live-window status for registry-only updates.bin/fm-update.sh:143- The detached-HEAD allowance applies to every target, including the primary firstmate repo. If the running firstmate checkout is detached, this can move that checkout even though the docs say the primary repo must be on its default branch, and it leaves the local default branch ref unchanged. Require the default branch for the firstmate target and allow detached HEAD only for secondmate homes.🔧 Fix: Captain: harden firstmate update safety
✅ Re-checked - no issues remain.
✅ **Test** - passed
✅ No issues found.
git status --short,git rev-parse HEAD, andgit merge-base HEAD 3718fd0cd010a0a2668493d8c11eeb6331904d7dto confirm the isolated worktree state and target commit.git diff --stat 3718fd0cd010a0a2668493d8c11eeb6331904d7d...HEADandgit diff --name-only 3718fd0cd010a0a2668493d8c11eeb6331904d7d...HEADto scope the changed files before testing.bash tests/fm-update.test.shfor the focused automated coverage of fast-forward success, no-merge behavior, reread/nudge signalling, dirty/diverged preservation, idempotency, registry backstop, dedup/self-exclusion, off-branch skip, detached firstmate skip, and unsafe-home skip.Manual evidence fixture:FM_ROOT_OVERRIDE=<fixture>/main FM_HOME=<fixture>/home bin/fm-update.shwith a clean main firstmate plus detached live secondmate behindorigin/main, captured in the transcript artifact.Manual evidence fixture:FM_ROOT_OVERRIDE=<fixture>/main FM_HOME=<fixture>/home bin/fm-update.shwith a dirty live secondmate, captured in the transcript artifact to show skip/no-nudge behavior and preserved local edit.test -f .claude/skills/updatefirstmate/SKILL.md && sed -n '1,8p' .claude/skills/updatefirstmate/SKILL.mdto verify the user-invocable skill is discoverable through the existing.claude/skillssymlink.Finalgit status --shortto confirm the working tree stayed clean after testing.✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.