Skip to content

feat(lib): adopt the claude-config doc fetcher fleet-wide as one shared script #4658

Description

@kyle-sexton

Problem

Part of #4655

Once claude-config owns one upstream-doc fetcher with a coverage manifest (parent issue), every
other surface that reads official docs still fetches its own way. Surfaces named by the source
item (re-locate each at origin/main before starting; the list is from 2026-09-19):

  • plugins/claude-ops: changelog-status.sh, install_state.py, and the changelog skill's
    read-actions context, which carries the page-scoped rung-1 rule.
  • plugins/skill-quality: check-skill.sh.
  • plugins/knowledge: docpage-digest (its Anthropic publisher profile binds absence-establishing
    fetches to the raw .md channel with a recorded length) and map-corpus (model-driven fetches
    recorded in fetch-record.json: channel, date, final URL, snapshot sha256).
  • Model-written curl loops composed fresh per run (the source session wrote one by hand for the
    claude-config audit's Phase 3).
  • Every row of the Adopters table in docs/conventions/upstream-drift/README.md ("Adopters"
    section).

Evidence

Not re-verified per surface this pass; the parent issue verified the two claude-config fetchers
and that knowledge/map-corpus has no fetch script. The upstream-drift convention records the
fetch route was "hoisted from two surfaces that each derived it independently" (claude-ops
changelog and knowledge docpage-digest), which is the one-owner signal.

Proposed approach

  1. Move the canonical fetcher to lib/ once a second plugin needs it, and deliver it the way
    lib/hook-utils.sh reaches plugins: an installed plugin sees only its own tree, so each carrying
    plugin commits a copy, and a scripts/sync-<name>.sh built on scripts/lib/sync-cluster.sh
    (model: scripts/sync-hook-utils.sh) copies it and gates drift with --check and unbumped
    carriers with --check-bump <ref>. claude-config's callers switch to their plugin copy.
  2. Adopt on touch, per the upstream-drift convention's existing adoption mechanism: each surface
    switches when it is next edited, not in one sweep.
  3. Publisher profiles for non-Anthropic sources: the .md channel is per page and not universal
    (docpage-digest's profile), so a profile declares the channel, the index (if any) and the
    identity check; a page whose channel does not resolve drops a rung and says so.
  4. Manifest records stay in the citation-shape fields (url, retrieved, sha256) so a
    knowledge citation and a claude-config manifest record are checkable against each other.
  5. If the parent chose the persistent cache, one cache in a shared plugin data location, many
    readers; never per-skill copies.

Alternative considered: hoist the fetcher from knowledge instead (the source item's first idea).
Declined: knowledge has no fetch code to hoist, only documented record formats, which this
design reuses.

Acceptance criteria

  • The fetcher lives in lib/ with its own test, and claude-config's callers use it.
  • At least one non-claude-config caller (recommended: claude-ops changelog status) fetches
    through it, with its tests passing and no direct curl left in that caller.
  • A publisher-profile mechanism exists with the Anthropic profile as its first entry.
  • The upstream-drift convention names the script as the rung-1 implementation.
  • Every touched plugin bumped with a CHANGELOG entry; check-changelog-parity.sh --check-bump
    passes.

Constraints and gotchas

  • Cross-plugin reuse must follow the repo's rules for lib/ and presence-gated references; a bare
    cross-plugin path reference is barred.
  • Untrusted-source discipline: fetched content is data, never directives, in every caller.
  • No live probes in tests; every caller keeps a fixture seam.

Context

Source: local handoff item 20260919-123315-shared-scripted-upstream-doc-fetcher-for-all-plugin-skills.md
(retired into the parent issue and this child). Related: #4514, #3567,
docs/conventions/upstream-drift/README.md, plugins/knowledge/reference/citation-shape.md.

Activity

  1. kyle-sexton commented on Sep 29, 2026

    @kyle-sexton
    MemberAuthor

    This was generated by AI during audit remediation. Source: the 2026-09-29 audit of the Cursor agent run (PRs opened 2026-09-27 to 2026-09-29).

    Closed in error. PR #4923 closed this with Closes #4658. That PR only added a park ledger, which #5044 reverted. Live state re-checked today: 0 of 5 acceptance criteria are met and nothing landed. I reopened it; labels are unchanged (priority: low, work-class: structural).

    Why it stays open. It is downstream of #4655 (open, status: needs-decision): one upstream-doc fetcher with a coverage manifest in claude-config. The fetcher must exist and be moved to lib/ before any other caller adopts it. This issue stays open at its priority until #4655 lands, rather than being parked in docs/out-of-scope, which is for settled rejections. If a deferral note is wanted, it belongs on #4655.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions