Check that the skills still match the documentation - #6
Closed
rebekaburnett wants to merge 2 commits into
Closed
Conversation
The skills restate facts from developer.vippsmobilepay.com, which changes without touching this repository. Nothing was watching for that. sources.json declares which documentation pages each skill is derived from. scripts/check_sources.py asserts every declared and cited page still resolves, and that no skill cites a page it has not declared, so the declarations cannot quietly go stale. It runs on pull requests, on push to main, and weekly, since the scheduled run is the one that catches a page being moved or removed. review-skill-accuracy.yml covers the harder case: the page still exists but a value in it changed. Monthly, it compares the numbers, enums, endpoints, and error codes in each skill against its sources and opens a draft pull request when they disagree. It never pushes to main, and it skips with a notice until ANTHROPIC_API_KEY is set. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The published Markdown is generated from the .mdx sources at build time, so the repository is ahead of the site, keeps content the generator strips, and above all can be diffed. Diffing is what makes the review cheap and precise: it looks at the pages that changed instead of re-deriving every claim. scripts/changed_sources.py maps a documentation diff onto the skills that summarize the changed pages. sources.json now records the documentation repo, the branch, and the commit last reviewed, seeded to the state the skills were written from. The workflow runs in this repository and checks the documentation out read-only, so nothing has to be installed or duplicated on that side. With no credentials it falls back to the public site, which cannot be diffed. When no declared page has changed it skips the model entirely, which is what makes a weekly schedule affordable. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
rebekaburnett
force-pushed
the
plugin-drift-checks
branch
from
August 6, 2026 11:52
de989da to
92e0744
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #5. Base is
plugin-skills, so the diff here is only the checking machinery. GitHub retargets this tomainwhen #5 merges.
Why
The skills restate facts from
vippsas/vipps-developer-docs. That documentation changes without touching thisrepository, and nothing was watching for it. There is no file to sync — the risk is that a fact stops being true.
Everything here runs on GitHub Actions runners. Nothing needs a developer's machine.
One repository drives both
The review job lives here and checks the documentation repository out read-only. Nothing is installed, duplicated, or
mirrored on that side, and the documentation repository needs no workflow of its own.
What is here
plugins/vipps/sources.jsondeclares which documentation pages each skill is derived from — 68 pages — plus thedocumentation repository, its branch, and
reviewed_commit, the commit last audited. Site paths convert to repositorypaths mechanically:
/docs/x.mdisdocs/x.mdx.scripts/check_sources.pyasserts every declared and cited page still resolves, and that no skill cites a page ithas not declared, so the declarations cannot quietly go stale. Standard library only.
scripts/changed_sources.pymaps a documentation diff onto the skills that summarize the changed pages, so thereview looks at what moved instead of re-deriving every claim.
.github/workflows/check-sources.ymlruns the source check on pull requests touchingplugins/, on push tomain,and every Monday. The scheduled run is the one that earns its keep, since a page can be renamed with no commit here.
.github/workflows/review-skill-accuracy.ymlis the weekly audit. It diffsreviewed_commitagainst thedocumentation
main, reviews only the pages that changed, and compares the numbers, enums, endpoint paths, and errorcodes against what each skill claims. It opens a draft pull request when it finds a difference, does nothing when it
does not, and never pushes to
main.Reading the repository rather than the site
The published Markdown is generated from
.mdxat build time. The repository is ahead of the deploy, keeps content theraw generator strips, and includes
generated-specs/and the_common/partials where a lot of the truth actuallylives. Most importantly it can be diffed, which is what makes this cheap and precise. The published site stays the
target for link checking, since that is what an agent fetches at runtime.
Secrets, all optional
ANTHROPIC_API_KEYAPP_ID+APP_PRIVATE_KEYDOCS_REPO_TOKENDOCS_REPO_TOKENA GitHub App with
Contents: readonvipps-developer-docsis the better of the two, being organization owned withshort-lived tokens. Both repositories are internal, so
GITHUB_TOKENalone cannot reach across.Behaviour worth knowing
reviewed_commitadvances only when a review opens a pull request. A clean run leaves it, so the next run re-reads thesame window. Deliberate: it can waste tokens, never skip a page. Bump it by hand after a confirmed clean run.
workflow_dispatchtakesforce_full_reviewto audit everything regardless of the marker.Checks
python scripts/check_sources.pypasses: 68 URLs, all 200..mdxpaths exist in the documentation repository.changed_sources.pywas run against real history: across the last 60 documentation commits it correctly identified 15changed declared pages and attributed them to skills. Against the seeded
reviewed_commitit reports nothing toreview, which is right, since the skills were written from that state.
Worth one manual
workflow_dispatchrun onceANTHROPIC_API_KEYexists, to confirm the action inputs behave as expectedbefore trusting the schedule.
🤖 Generated with Claude Code