Recheck against upstream

From melodic-software/claude-code-plugins · View interactive version

Recheck against upstream is an AI agent skill from the GitHub repository melodic-software/claude-code-plugins. Re-anchors that existing state (config, code, docs, infra) is not evidence of its own correctness, and audits it against CURRENT official upstream docs. Use when: 'recheck against upstream', 'check this against the docs', 'is our config still current', 'did upstream change', 'are we still doing this

How to use this skill

Skill file

Recheck against upstream

A drift corrector for the discipline that existing state does not vouch for

itself. The shared method (re-anchor, audit the work in flight, correct

forward, report) lives in

CODE0.

Read it; this file adds only what is specific to upstream-conformance

discipline.

The discipline this re-anchors

Existing state, a config file, a code path, a runbook, an infra

definition, is evidence of what is, never proof that it matches the

upstream it depends on. Resolve the source of truth per the method doc's

ladder: if the consuming project states an upstream-conformance rule in its

own CLAUDE.md / .claude/rules/, re-anchor that. Otherwise re-anchor this

portable baseline:

way" and "the code does X" describe the state; neither shows it still

matches upstream. Conformance is a claim to verify, not to assume.

the vendor's live documentation for the surface in play this session, never training-data recall of it, never a stale in-repo summary of it.

Read each docs page through the shared docs lookup, not a WebFetch

summary: the procedure is

${CLAUDE_PLUGIN_ROOT}/reference/docs-lookup-procedure.md. Read it before

the first fetch and follow it, with <scripts> =

${CLAUDE_PLUGIN_ROOT}/scripts (fetch-docs.sh --cache) and <session> =

${CLAUDE_SESSION_ID}. Report each page's age. A read that settles a

verdict uses raw bytes (the procedure's step 6). A source that is not a

docs page, such as a changelog repository or GitHub release notes, keeps

its existing route.

supported major/minor, compare against the docs for that version. The

latest docs can legitimately prescribe APIs and defaults the pin does not

have. Divergence between the pinned line and latest is its own finding

(upgrade candidate or deliberate hold), never a false gap against the pin.

is unaudited, not passing. Report what was compared and what was skipped;

do not launder the unchecked into a green result.

The loop's audit step. Classify each divergence

Run the method doc's audit as a compare-and-classify pass. For the surface

in flight, fetch the current upstream docs through the lookup above, diff the

repo's state against them, and sort every divergence into one of three categories:

  1. Gap. Docs say X, we do Y, and no rationale is recorded anywhere in

the repo. Treat as a straight defect to correct toward upstream. Call out

deprecation and version drift here: a flag upstream renamed, a default it

changed, an API it marked deprecated is a gap even when the old form

still functions today.

  1. Deliberate divergence, a rationale is recorded in the repo's docs or

an ADR. Do not "correct" it. Audit only whether it still holds against

the current docs: upstream may have shipped the very thing the workaround

was written to route around, obsoleting the recorded rationale. Report-

only when the rationale still holds; flag it when the docs have overtaken

it.

  1. Undocumented divergence, the state looks intentional but no written

rationale exists, so the correct resolution is the human's call: adopt

the docs' way, or keep the divergence and record its rationale. Route the

resolution to the repo's ADR / docs convention (read it from the

consuming project's own instruction layer); do not silently pick a side.

Correct each forward now per the method doc: fix gaps toward upstream,

re-check that deliberate divergences still hold, and surface undocumented

ones for the human with both options stated. Where your own reading of the

docs is the suspected source of error, re-verify in a fresh-context

subagent. Resolve the verification level once with

bash "${CLAUDE_PLUGIN_ROOT}/lib/read-verification.sh" --plugin discipline --skill recheck-against-upstream --file docs/conventions/discipline.yaml

and report its line (levels):

light and off skip that subagent and the fan-out tier's dispatch, as the method doc and

CODE0 say.

The fan-out tier

The inline recheck of the surface in play is the default. Take the fan-out

tier instead when the invocation argument is fan-out, or when the request

covers a whole subsystem, framework, or repo that leans on many upstream

contracts at once. The optional scope argument names what to cover. A single

surface or a short session stays inline: there the fan-out's subagent cost

buys nothing.

Never inside a batch or a fork. When this skill runs as a member of a

/discipline:sweep-all audit fork, or in any fork, run the inline recheck

only, whatever the argument or trigger. Where the fan-out would fit, add a

ledger entry recommending a direct `/discipline:recheck-against-upstream

fan-out` run instead. The batch is audit-only and keeps its cost bounded by

leaving fan-out tiers out.

Available tools.

Then read reference/fan-out-tier.md before

enumerating surfaces: it owns the doc-by-doc dispatch, the mid-run checkpoint,

the divergence ledger, and work-item routing, and replaces the inline audit

and correct-forward steps.

Several repositories

A target form from

CODE0

(--repo <repo> and the others) runs the recheck once per repository, per

the method doc's "Several repositories"; with none, the tiers above run as

written. A repository named this way is a whole repo, so each one takes the

fan-out tier unless the scope argument narrows it to one surface, which then

runs inline in each repository. The fork rule above governs the run as a

whole: a target-form run inside a batch or a fork records the recommendation

and runs nothing across repositories. Outside one, each repository's

subagent is a fresh subagent that runs its own fan-out dispatch. Each

repository resolves its own pinned upstream version. Its mid-run checkpoint

and divergence ledger go in that repository's working-docs root, never the

invoking session's slice, and work items offered for it route to that

repository's tracker.

Distinct axes. What this is not

precedent coasting on "that's how it's done here". This one measures

against an external upstream authority: the vendor's current docs.

consuming org's own engineering standards. This one audits against the

third-party vendor's documentation the state depends on.

divergence audits clean; the duty is to classify, not to force every

difference back to the default.

Related

Gotchas

superseded default that has not yet been removed is a gap, not a pass; version drift is a finding even before it breaks.

decided this once" as permanent; re-check it against what upstream ships

today, because the workaround may now be obsolete.

compared and the ones you did not; an honest skip list is part of the

report, not an admission of failure.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.