Skip to content

fix(plugin): version is a cache key, so a skill change must bump it - #49

Merged
Ardnived merged 1 commit into
mainfrom
claude/fix-plugin-cache-staleness
Sep 4, 2026
Merged

Ardnived merged 1 commit into
mainfrom
claude/fix-plugin-cache-staleness

Conversation

@Ardnived

@Ardnived Ardnived commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

What this changes

version in workflow/.claude-plugin/plugin.json is the cache key an installed plugin is stored
under. This treats it as one: bumps it to 0.2.0, corrects the guide that said it did not matter,
and makes bumping it part of a skill change rather than a release ceremony.

The failure it prevents — measured, not imagined

On 2026-09-04 a maintainer's session filed sydevs/SahajCloud#694
with no Type, Priority, Effort or Stage. The reflection found the cause was not judgement:

installed_plugins.json → workflow@sydevs
  installPath:   ~/.claude/plugins/cache/sydevs/workflow/0.1.0
  version:       0.1.0
  gitCommitSha:  864e72e      ← this repo's FIRST commit
  installedAt:   2026-08-27   lastUpdated: 2026-08-27 (never advanced)

That copy is 53 commits behind main. It predates triage-issue, the native issue fields and the
Stage field entirely — 12 of the 17 skills did not exist in it. The draft-ticket it loaded
genuinely ends at "create the issue, return the URL", so the fields were never in the instructions
the session was following. The marketplace clone was itself nine commits behind.

Why it stayed invisible

AGENTS.md has said since commit #1 that there is "no release step, no version bump that matters"
because main is consumed live. That is true of one of the two consumers:

Consumer A merge reaches it
The two scheduled cloud routines Next run. They fetch the skills from main every time. Genuinely live.
/plugin install workflow@sydevs Never, until version changes or someone runs /plugin → update.

So the guide actively told every contributor to leave alone the one field that could have
invalidated the cache. Correcting that claim is the durable half of this PR.

The three changes

  1. workflow/.claude-plugin/plugin.json — 0.1.0 → 0.2.0. A one-time invalidation for every
    stale cache already installed. Minor rather than patch: twelve new skills since the pin.
  2. AGENTS.md + docs/why.md — replace the false claim with a table separating the live
    consumer from the pinned one; the story goes behind #an-installed-plugin-does-not-track-main,
    per the rule-here/story-there split.
  3. workflow/skills/cut-release/SKILL.md — the bump gets an owner: any PR touching
    workflow/skills/**, workflow/hooks/** or workflow/lib/** bumps version in the same PR.
    This repo is still never tagged and never gets a GitHub Release — the version is a cache key,
    not an artifact.

One behaviour?

Yes — "the plugin is a version-keyed artifact". The manifest bump is the instance, the cut-release
rule is what stops it recurring, and the AGENTS.md correction is why it was possible. Shipping the
bump alone would fix today and leave the cause in place. No ceiling change is included.

Gate

claude plugin validate ./workflow --strict        ✔ Validation passed
node workflow/lib/rule-delta.mjs --base main workflow/skills
  directives: 56 → 57
  ADDED (1): + Never tag this repo, and never cut a GitHub Release for it.
  No directive disappeared.

⚠ Two conventions crossed, knowingly

  • "Open the PR; never merge it." The maintainer instructed the merge directly in-session. That
    is the approving reviewer exercising the authority the rule reserves for them, not the rule being
    bypassed — but it is worth seeing in the record.
  • No ticket filed. Per AGENTS.md, this repo is ticketless and the PR body is the proposal.

After merging

Existing installs still need one manual step — the bump invalidates the cache, but /plugin →
update (or reinstall) is what fetches it. Until then, this workspace is still running commit #1.

🤖 Generated with Claude Code

`AGENTS.md` has said since the first commit that there is "no version bump
that matters" because `main` is consumed live. That is true of the two cloud
routines, which fetch the skills fresh on every run. It has never been true of
`/plugin install workflow@sydevs`, and nothing in the repo said otherwise.

An install records a `gitCommitSha` in `installed_plugins.json` and unpacks the
skills into `~/.claude/plugins/cache/sydevs/workflow/<version>/`. Neither is
revisited on its own: the commit is a pin, the directory is named after
`version`. With `version` frozen at `0.1.0` for 53 commits, every session on an
installed machine loaded the commit that was `main` on install day, with no
signal anywhere that it was behind.

The failure this prevents, measured rather than imagined: on 2026-09-04 a
maintainer's session filed sydevs/SahajCloud#694 with no Type, Priority, Effort
or Stage. The cause was not judgement — the loaded `draft-ticket` was `864e72e`,
this repo's first commit, pinned at install on 2026-08-27 and eight days stale.
That copy predates `triage-issue`, the native issue fields and the `Stage` field
entirely; twelve of the seventeen skills did not exist in it. The skill genuinely
ended at "create the issue, return the URL". The marketplace clone was itself
nine commits behind.

Three changes, one behaviour — the plugin is a version-keyed artifact:

- bump `0.1.0` → `0.2.0`, a one-time invalidation for every stale cache already
  in the wild (minor: twelve new skills since the pin);
- replace the false claim in `AGENTS.md` with a table separating the consumer
  that is live from the one that is pinned, plus the story in `docs/why.md`;
- give the bump an owner in `cut-release` — any PR touching `workflow/skills/**`,
  `workflow/hooks/**` or `workflow/lib/**` bumps `version` in the same PR, and
  this repo is still never tagged and never gets a Release.

Gate: `claude plugin validate ./workflow --strict` passes; `rule-delta.mjs
--base main workflow/skills` reports 56 → 57 directives, one added ("Never tag
this repo, and never cut a GitHub Release for it") and none dropped.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@Ardnived
Ardnived merged commit cb46fca into main Sep 4, 2026
1 check passed
@Ardnived
Ardnived deleted the claude/fix-plugin-cache-staleness branch September 4, 2026 19:48
@github-project-automation github-project-automation Bot moved this from In progress to Done in SYDevelopers Technical Roadmap Sep 4, 2026
sydevs-bot pushed a commit that referenced this pull request Sep 4, 2026
`main` gained #48, which rewrote `preflight/SKILL.md` in Simplified Technical
English, and #49, which made `version` a cache key. The one conflict was the
`label:awaiting` paragraph: #48 tightened it, this branch made it plural. Kept
#48's register and carried the plural fact into it in three short sentences.

Folded into the same commit, because two of the three touch the file the merge
had to reconcile:

- Rule 4 said "never let a mention pass silently" while the mention query is
  now issue-scoped. It now says the query is issue-scoped, and that a mention
  on a PR reaches the loop through rung 2 or not at all.
- `docs/why.md` records the two decisions the fix forced. First, the new
  `is:pr label:awaiting` query is what the survey routine's drift sweep reads,
  so half of that sweep's PR row becomes enforceable on the first survey after
  the merge — the sweep doing what its own table specifies, but worth knowing
  without a bisect. Second, `search_issues` with a hand-written `is:pr` stays
  the one tool rather than `search_pull_requests`, deliberately.
- `version` 0.2.0 -> 0.2.1. #49 landed after this branch did, and this branch
  changes two skills, so an unchanged version would leave every installed cache
  serving the old ones.

Gate: `claude plugin validate ./workflow --strict` passed. `rule-delta.mjs
--base origin/main` reports 57 -> 57 directives and no removal.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017bAFozAESzffZgcfH3REWX
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

1 participant