ワンクリックで
sdv-regen-docs
Regenerate sdv-py reference docs, verify the Docusaurus build, and snapshot a versioned archive at release.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Regenerate sdv-py reference docs, verify the Docusaurus build, and snapshot a versioned archive at release.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Use when porting R logic into the Python SportsDataverse package (sdv-py) — e.g. translating an nflfastR / cfbfastR / cfbscrapR / baseballr / hoopR R function, reconciling a fix from the pandas `0.36-live` branch into polars `main`, or re-implementing a modeling recipe (EP/WP/QBR/CPOE) from R. Enforces a parity-test-first workflow (golden fixture from the R output → failing parity test → port → green) and the polars-1x + ID-dtype + no-lookaround conventions. Also covers R numeric fidelity when outputs must match R bit-for-bit (R>=4.0 fround, 80-bit long-double sum, non-na.rm null-poisoning, dplyr group order), stale-fork sibling packages (wbigballR-style), and oracle integrity (a browser/rvest-captured oracle can be corrupt — fix the bug, don't match it). Invoke for "port this R function to polars", "port from nflfastR/bigballR", "reconcile 0.36-live into main", "translate this dplyr/np.select to polars", "re-implement the R model recipe in Python", or when a parity test fails on a handful of rounding-boundar
Use when shipping a change in sportsdataverse-py (sdv-py) — opening, pushing, or merging a PR. Runs the steps in the correct order (regenerate codegen docs, update changelog/docs/tutorials, lint, full pytest, commit + verify it landed, push, triage bot reviews CodeRabbit/Sourcery/Copilot immediately — in parallel with CI, not after it — wait for CI green, confirm merge, write a session note) and never cleans up a branch before the merge is confirmed. Invoke for "ship this", "open/merge the PR", "land this change", or any end-of-change release flow.
Use when executing a model-spine implementation plan (the ClaudeCowork specs/plans backlog — prediction stacks, ratings engines, projection/impact models) or building any oracle-gated analytics module in an SDV repo. Covers the full loop — isolated worktree + baseline, Phase-0 oracle harness (metrics/constants/leakage split/fixtures), per-task TDD with verified commits, oracle gates with the never-lower rule, league-shim parity, mypy/codegen close-out, reviewer pass, and the session restart prompt. Invoke for "implement T<x>", "start the <sport> model spine", "continue the prediction stack", or any multi-phase model build.
Use when capturing an external oracle/validation corpus into committed test fixtures — Torvik/KenPom ratings, ESPN BPI/predictor/odds, market closing lines, MoneyPuck, published RAPM/EPM, or any third-party reference a model gate will assert against. Covers column contracts, Utf8-id discipline, the team/player name-crosswalk recipe (contracting normalizer + candidate keys + alias table + match-rate reporting), rate-limit-aware sampling, and the mandatory provenance README. Invoke for "capture the oracle corpus", "commit the <source> fixtures", or any Task-0-style fixture capture in a model plan.
Use when porting Python logic from the SportsDataverse Python package (sdv-py) into a SportsDataverse R package — cfbfastR, hoopR, wehoop, baseballr, fastRhockey, softballR, etc. Enforces a parity-test-first workflow (golden fixture from the Python output → failing testthat test → port → green) plus the tidyverse/data.table idiom map and R package conventions (roxygen2 docs, snake_case, tibble returns, pkgdown reference coverage). Invoke for "port this to cfbfastR", "translate this polars logic to dplyr", "re-implement the sdv-py parser in R", or "bring this Python fix back to the R package".
Add a CBS Sports (NAPI) league/resource — capture + catalog in sdv-internal-refs/cbs.
| name | sdv-regen-docs |
| description | Regenerate sdv-py reference docs, verify the Docusaurus build, and snapshot a versioned archive at release. |
| disable-model-invocation | true |
Keep the generated reference docs in sync after adding or changing endpoints, parsers, or schemas. All commands run from the repo root (c:\Users\saiem\Documents\GitHub-Data\sdv-dev\sdv-py) unless noted.
| Path | Status |
|---|---|
docs/docs/<sport>/index.md | GENERATED — never hand-edit |
docs/docs/<sport>/reference/*.md | GENERATED — never hand-edit |
docs/docs/<sport>/_category_.json | GENERATED — never hand-edit |
docs/docs/reference/ | GENERATED — never hand-edit |
docs/docs/intro.md | Hand-authored — survives regen |
docs/docs/architecture/ | Hand-authored — survives regen |
docs/docs/parsers/ | Hand-authored — survives regen |
docs/docs/quality-of-life.md | Hand-authored — survives regen |
# Rewrites generated per-league reference subtrees and docs/docs/reference/.
# Conceptual pages (intro, architecture, parsers) are preserved.
uv run python tools/codegen/generate.py --docs
To also regenerate wrapper/loader/parser modules (not just docs):
uv run python tools/codegen/generate.py # wrappers + docs together
# Fails if generated files are stale relative to YAML sources.
# Run this before committing; CI runs it on every PR.
uv run python tools/codegen/generate.py --check
The sdv-codegen pre-commit hook also runs --check automatically when tools/codegen/ or *.yaml files are staged.
cd docs
yarn build
Expected warnings that are OK to ignore:
versioned_docs/version-0.0.50/ tree.CHANGELOG.md doctoc fragments.Any new broken-link warning outside those two locations is a real error to fix.
cd docs
yarn version:docs <x.y.z> # e.g. yarn version:docs 0.0.52
This snapshots docs/docs/ → versioned_docs/version-<x.y.z>/ and adds an entry to versions.json. Then commit:
git add docs/versioned_docs/version-<x.y.z>/ docs/versions.json
git commit -m "docs(release): snapshot version <x.y.z>"
Never change lastVersion away from 'current' in docusaurus.config.ts — the live unversioned tree must stay the default URL.
Vercel auto-deploys on every push to main. Do not add a GitHub Pages action — it would double-publish. To preview locally:
cd docs
yarn start # http://localhost:3000
docs/docs/<sport>/reference/ by hand — it will be clobbered on the next --docs run.yarn version:docs without first building (yarn build) — the snapshot captures whatever is on disk, so a broken build gets frozen.--check before pushing — the drift gate will fail CI.