Skip to content

feat(setup-steward): auto-overwrite committed bootstrap skill on upgrade - #42

Merged
potiuk merged 1 commit into
apache:mainfrom
potiuk:feat/setup-steward-upgrade-overwrites-bootstrap
May 4, 2026
Merged

feat(setup-steward): auto-overwrite committed bootstrap skill on upgrade#42
potiuk merged 1 commit into
apache:mainfrom
potiuk:feat/setup-steward-upgrade-overwrites-bootstrap

Conversation

@potiuk

@potiuk potiuk commented May 4, 2026

Copy link
Copy Markdown
Member

Summary

When /setup-steward upgrade refreshes the snapshot to a new framework version, automatically replace the adopter-side committed setup-steward skill (the only framework artefact they commit) with the version from the just-installed snapshot.

Why

The committed setup-steward is the only framework skill an adopter copies into their repo (Golden rule 6: "copy this skill, symlink the rest"). When the framework's setup-steward evolves — new sub-action, lock-format change, drift-detection refinement, recipe addition — the adopter's copy must follow, or the bootstrap on a fresh clone will run old logic against a new snapshot.

Before this PR, upgrade only surfaced the drift between the committed copy and the snapshot. After this PR, upgrade actually fixes it.

Behaviour change

upgrade.md adds a new Step 6b — Overwrite the committed setup-steward skill from the new snapshot (between symlink refresh and local-lock update):

  1. Diff the adopter-side committed setup-steward against the snapshot's setup-steward.
  2. If the adopter has local modifications beyond the snapshot's content — surface the diff and stop. Do NOT silently overwrite local work. The user either:
    • confirms the modifications can be discarded, OR
    • upstreams them as a framework PR first, OR
    • defers the bootstrap-skill update to a later upgrade.
  3. Otherwise, cp -r the snapshot's setup-steward over the committed copy. The new content lands in git status for the user to commit as part of the upgrade PR.

Layout-aware:

  • Flat: cp into .claude/skills/setup-steward/.
  • Double-symlinked: cp into .github/skills/setup-steward/. The .claude/skills/setup-steward symlink keeps pointing at the right (now-updated) location.

verify.md Check 7 ("setup-steward up to date") updated to distinguish the two drift directions:

  • Snapshot newer than committed (typical post-framework-upgrade case before the adopter has rerun /setup-steward upgrade) → point at upgrade's Step 6b auto-overwrite.
  • Committed newer than snapshot (anti-pattern: adopter modified bootstrap directly) → upstream the modifications as a PR against apache/airflow-steward, or revert to use .apache-steward-overrides/ instead.

upgrade.md Step 2 ("Surface what changed") updated to reflect that bootstrap-skill drift is no longer a manual decision — Step 6b handles it.

Test plan

  • All prek run --all-files hooks pass (markdownlint, typos, doctoc, check-placeholders)
  • Step 6b heading anchor (#step-6b--overwrite-the-committed-setup-steward-skill-from-the-new-snapshot) is reachable from verify.md's back-reference
  • Reviewer eyeballs the local-modification protection flow: cardinal sin would be silently overwriting work the adopter painted into the bootstrap copy
  • CI link-check (lychee) passes

🤖 Generated with Claude Code

When /setup-steward upgrade refreshes the snapshot to a new
framework version, automatically replace the adopter-side
committed setup-steward skill (the only framework artefact
they commit) with the version from the just-installed
snapshot.

Why this matters

The adopter-side committed setup-steward skill is the only
framework skill that lives as a committed copy rather than a
gitignored symlink (per SKILL.md Golden rule 6 — "copy this
skill, symlink the rest"). When the framework's setup-steward
evolves — new sub-action, lock-format change, drift-
detection refinement, recipe addition — the adopter's copy
must follow, or the bootstrap on a fresh clone will run old
logic against a new snapshot.

Behaviour

upgrade.md adds a new Step 6b (between symlink refresh and
local-lock update):

1. Diff the adopter-side committed setup-steward against the
   snapshot's setup-steward.
2. If the adopter has local modifications beyond the
   snapshot's content — surface the diff and stop. Do NOT
   silently overwrite local work. The user either confirms
   discard, upstreams the modifications as a framework PR
   first, or defers the bootstrap update.
3. Otherwise, copy the snapshot's setup-steward over the
   committed copy. The new content lands as modified files
   in `git status` for the user to review and commit as
   part of the upgrade PR.

For the flat layout: cp into .claude/skills/setup-steward/.
For the double-symlinked layout: cp into
.github/skills/setup-steward/ — the .claude/skills symlink
keeps pointing at the right (now updated) location.

verify.md updated

Check 7 ("setup-steward up to date") now distinguishes the
two drift directions:

- Snapshot newer than committed (typical post-upgrade case
  before the adopter has rerun /setup-steward upgrade) →
  point at upgrade's Step 6b auto-overwrite.
- Committed newer than snapshot (anti-pattern: adopter
  modified bootstrap directly) → upstream the modifications
  as a PR against apache/airflow-steward, or revert to use
  .apache-steward-overrides/ instead.

upgrade.md Step 2 ("Surface what changed") updated to reflect
that bootstrap-skill drift is no longer a manual decision —
Step 6b handles it.

Generated-by: Claude Code (Claude Opus 4.7)
@potiuk
potiuk merged commit 71ea36e into apache:main May 4, 2026
7 checks passed
@andreahlert andreahlert added the mode:platform Substrate / infra — not a mode (sandbox, CI, validators) label May 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mode:platform Substrate / infra — not a mode (sandbox, CI, validators)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants