Upgrade the stayfixed scaffold in a repository after a plugin update, keeping every hand edit. Use when the user asks to upgrade, update or refresh stayfixed's files, or after the plugin version changed.
Install
npx skillscat add stayfixed/stayfixed-plugin/upgrade Install via the SkillsCat registry.
SKILL.md
Upgrading the scaffold
stayfixed upgrade moves [stayfixed] version to the stayfixed running and refreshes every
scaffold file whose bytes are still the ones stayfixed wrote. When the workflow pins stayfixed by
commit, [ci] ref and the workflow's pin move with the version: all three, or none. A file the
user edited is skipped and named, never overwritten.
- Run
stayfixed upgrade --dry-runand relay what it prints: the opening line, thestayfixed.toml:line with each key it would move, thescaffold:report with each file's
verdict, theCI:line, and everynote:line. - For each file reported
skip_modified, edited by the user or never written by stayfixed, ask
whether the user wants it overwritten. Only on a yes for that file, add--force <path>for
it, with the path exactly as the report prints it. Never force a path the user did not name. - If any
--forcewas added, runstayfixed upgrade --dry-runagain with the same flags and
relay the new report, so the user sees what forcing changes before anything is written. - Run
stayfixed upgradewith the same flags, and relay the real run's report the same way. - Ask the user to commit
stayfixed.toml,.stayfixed/manifest.jsonand the changed files
together.
Rules
- An exit of 1 wrote nothing. A
REFUSEDsection names each artifact and why. Relay every
line and stop. - An exit of 2 is a refusal, and it may have come part-way through. A refusal about the
project itself — not initialised, nostayfixed.toml, a newer, unreadable or unordered
recorded version, a key written in a shape it will not edit — comes before any write. One that
says a file cannot be written comes while writing: what was done before it is on disk and recorded.
Relay it as printed, rungit statusto show the user what changed, and after they fix the
cause runstayfixed upgrade --dry-runagain, which plans from what is there now. When it
says the project records a newer stayfixed than the one running, the plugin is what needs
updating: relay that, and never edit[stayfixed] versionto get past it. - A
note:saying[stayfixed] versionand[ci] refwere left as they are is not a
failure. The scaffold was still refreshed, and the note says what would let the three move
together. Relay it as printed. When the workflow is reportedskip_modified, forcing it is
step 2's question like any other file's. - A
[ci] refthat is not a commit, such asv1, is the user's choice. Only the version
moves and the workflow is left as it is. Relay theCI:line, and never change the ref. stayfixed.tomlkeeps every byte but the values it moves. If the command refuses to
rewrite a key because of how the file writes it, relay the refusal: it names the key and the
value to set by hand.- A
note:about records this stayfixed does not produce is not an error. Those files were
left where they are, on purpose. - A file kept out of git is refreshed only while it holds what stayfixed last wrote there.
One that changed since is skipped like an edited file, because nothing brings it back once it
is overwritten. A copy left behind where the artifact no longer goes (its id left[artifacts] local, or its[paths]value moved) is removed asrelocatedwhile it holds
those bytes, and skipped once it changed. Ask before forcing a skipped one, like any other. - A refusal saying git ignores files at a place a
[paths]value chose wrote nothing. Relay
it with the files it names. Pointing that key at a path git does not ignore, or taking it out,
is the user's decision; never editstayfixed.tomlor an ignore file to get past it. - A target printed as
<id>is one the manifest recorded outside the path grammar. Relay it
as printed, and never look up or guess the path behind it. - There are no hooks to re-trust.
initwrites no project-level hook entries, so an upgrade
changes none.