Summary
Provide a single, discoverable task runner (a stdlib-only python -m scripts.dev CLI, an invoke/nox file, or a thin Makefile) that wraps the four canonical validation commands (ruff check, ruff format --check, mypy, pytest) plus docs build and the property lane, so contributors run one command instead of copying four from AGENTS.md.
Why this matters
AGENTS.md §7 lists four separate validation commands contributors must run before completion; there is no Makefile, noxfile.py, or tasks.py to run them as a unit (verified absent). A one-command entry point lowers the contribution barrier, reduces "forgot to run mypy" PRs, and gives CI and humans the same vocabulary.
Current evidence
- No
Makefile, noxfile.py, or tasks.py exists at the repo root (verified).
- AGENTS.md §7 / CLAUDE.md enumerate the four commands individually;
docs/agent-context/workflows.md documents the definition of done.
scripts/ already exists (refresh_prices.py, etc.), so a scripts/dev.py has a natural home and keeps the zero-extra-dependency posture.
External context
Task runners (make, nox, invoke, just) are a standard contributor-experience convention; a stdlib-only runner avoids adding a dependency.
Proposed implementation
- Add
scripts/dev.py (stdlib argparse) with subcommands lint, format-check, type, test, docs, property, and ci (run all gating checks) that shell out to the exact commands AGENTS.md documents.
- Keep it dependency-free (no
invoke/nox requirement) to respect the dependency budget; document it in CONTRIBUTING.md and AGENTS.md §7 as the canonical entry point while keeping the underlying commands listed.
- Optionally expose it via a thin
Makefile for make ci muscle memory, delegating to scripts/dev.py.
- Add a CI check that
scripts/dev.py ci runs the same commands CI runs (single source of truth) to prevent drift.
AI-agent execution notes
Inspect AGENTS.md §7, docs/agent-context/workflows.md, .github/workflows/ci.yml (to mirror exactly), scripts/, CONTRIBUTING.md. Do not change the underlying commands — wrap them. Keep cross-platform (Windows runs in CI matrix) — prefer subprocess over shell-isms. Update AGENTS.md/CONTRIBUTING in the same PR (doc-governance rule).
Acceptance criteria
python scripts/dev.py ci runs lint, format-check, type, and test exactly as documented and exits non-zero on any failure.
- CONTRIBUTING.md and AGENTS.md §7 reference the runner.
- A CI/test check asserts the runner's
ci command matches the workflow's gating steps.
Test plan
Invoke each subcommand in a smoke test (dry-run/--list), assert exit-code propagation, cross-platform check on the CI matrix.
Documentation plan
CONTRIBUTING.md, AGENTS.md §7, docs/agent-context/workflows.md, CHANGELOG (dev-tooling note).
Migration and compatibility notes
Not expected to require migration; underlying commands remain valid.
Risks and tradeoffs
A wrapper can drift from CI — the parity check mitigates this. Keep it thin; do not let it accrete bespoke logic that hides what the real commands do.
Suggested labels
developer-experience, contributor-experience
Summary
Provide a single, discoverable task runner (a stdlib-only
python -m scripts.devCLI, aninvoke/noxfile, or a thinMakefile) that wraps the four canonical validation commands (ruff check,ruff format --check,mypy,pytest) plus docs build and the property lane, so contributors run one command instead of copying four fromAGENTS.md.Why this matters
AGENTS.md §7 lists four separate validation commands contributors must run before completion; there is no
Makefile,noxfile.py, ortasks.pyto run them as a unit (verified absent). A one-command entry point lowers the contribution barrier, reduces "forgot to run mypy" PRs, and gives CI and humans the same vocabulary.Current evidence
Makefile,noxfile.py, ortasks.pyexists at the repo root (verified).docs/agent-context/workflows.mddocuments the definition of done.scripts/already exists (refresh_prices.py, etc.), so ascripts/dev.pyhas a natural home and keeps the zero-extra-dependency posture.External context
Task runners (
make,nox,invoke,just) are a standard contributor-experience convention; a stdlib-only runner avoids adding a dependency.Proposed implementation
scripts/dev.py(stdlibargparse) with subcommandslint,format-check,type,test,docs,property, andci(run all gating checks) that shell out to the exact commands AGENTS.md documents.invoke/noxrequirement) to respect the dependency budget; document it in CONTRIBUTING.md and AGENTS.md §7 as the canonical entry point while keeping the underlying commands listed.Makefileformake cimuscle memory, delegating toscripts/dev.py.scripts/dev.py ciruns the same commands CI runs (single source of truth) to prevent drift.AI-agent execution notes
Inspect AGENTS.md §7,
docs/agent-context/workflows.md,.github/workflows/ci.yml(to mirror exactly),scripts/, CONTRIBUTING.md. Do not change the underlying commands — wrap them. Keep cross-platform (Windows runs in CI matrix) — prefersubprocessover shell-isms. Update AGENTS.md/CONTRIBUTING in the same PR (doc-governance rule).Acceptance criteria
python scripts/dev.py ciruns lint, format-check, type, and test exactly as documented and exits non-zero on any failure.cicommand matches the workflow's gating steps.Test plan
Invoke each subcommand in a smoke test (dry-run/
--list), assert exit-code propagation, cross-platform check on the CI matrix.Documentation plan
CONTRIBUTING.md, AGENTS.md §7,
docs/agent-context/workflows.md, CHANGELOG (dev-tooling note).Migration and compatibility notes
Not expected to require migration; underlying commands remain valid.
Risks and tradeoffs
A wrapper can drift from CI — the parity check mitigates this. Keep it thin; do not let it accrete bespoke logic that hides what the real commands do.
Suggested labels
developer-experience, contributor-experience