Skip to content

Add a tasks.py/Makefile-equivalent task runner mirroring the documented validation commands #412

@dgenio

Description

@dgenio

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

  1. 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.
  2. 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.
  3. Optionally expose it via a thin Makefile for make ci muscle memory, delegating to scripts/dev.py.
  4. 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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions