Repository navigation
feat: refresh installed flux skills on flux update - #21
Merged
Merged
Conversation
After replacing the binary, flux update runs "<binary> install <agent>" for every agent (claude, omp, codex) that already has the skill, so the skill comes from the new release. It also refreshes when already up to date. Symlinked skills are skipped; a failed refresh is a warning and the command still exits 0. --no-skill skips the step.
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.
Goal
flux update should also update the Flux skill (reuse flux install)
flux updatereplaced only the binary, so the skill installed byflux installstayed at the old version and agents didn't learn about new commands. With this change,flux updaterefreshes the skill for every agent that already has one, from the binary it just installed.Changes
flux updateruns<binary path> install <agent>for each of claude, omp and codex whose<root>/skills/flux/SKILL.mdexists, under the same roots and override variables asflux install. The skill therefore comes from the new release, and an edited skill is backed up toSKILL.md.bak-<time>exactly asflux installdoes.brew upgradeor by the first update fromv0.5.0(that update still runsv0.5.0's code).SKILL.mdis skipped withSkipped <agent>: <path> is a symlink. A failed refresh prints a warning to stderr, the other agents still refresh, and the command exits 0, because the binary update succeeded. With no skill installed, it prints one hint to runflux install.--no-skillskips the refresh.agentstable incmd/install.go, shared byinstallandupdate.flux install --helpandskill/SKILL.md(Quick Reference) document the refresh.Verification
go vet ./...andgo test -race ./...pass. The new table-drivenTestRefreshSkillsuses a fakefluxscript and covers: nothing installed, one agent, all three, a folder withoutSKILL.md, a symlinked folder, a symlinkedSKILL.md, and one failing install.HOMEwith the built binary:v0.5.0(already latest): claude and omp backed up and refreshed, symlinked codex skipped, exit 0;--no-skillleft all skills untouched; a read-only claude folder gave the warning, omp still refreshed, exit 0; no skills gave the hintv0.4.9: downloadedv0.5.0, and the refreshed skill is byte-identical tov0.5.0'sskill/SKILL.md, not this branch's, so the skill comes from the new binary