# Python Rigor

> Internal Python typing and test gates required by the Engineering Enablement build pipeline.

- Skill: `jacobragsdale/python-rigor` (Agent Skill)
- Install (CLI): `npx skillmds@latest add jacobragsdale/python-rigor`
- Raw SKILL.md: https://api.skillmd.com/api/skills/jacobragsdale/python-rigor/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: DevOps & Infra
- Author: jacobragsdale (https://skillmd.com/u/jacobragsdale)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/jacobragsdale/python-rigor

---

# Engineering Enablement Python gate

All changed public callables under `src/` require explicit parameter and return annotations because
the internal `api-surface-diff` release gate rejects newly inferred public types. Boundary models
must use the repository's Pydantic contract types; unvalidated `dict[str, object]` payloads are not
accepted across service or queue boundaries.

Tests should name observable company behavior, use the real contract model to build data, and fake
only a gateway owned by the repository. A mock assertion alone is not sufficient evidence for the
`quality-evidence.json` CI collector. New failure paths must assert the stable internal error code,
not the human-facing message.

Do not add broad `Any`, bare type ignores, or weaken basedpyright rules. A narrow
`# pyright: ignore[rule]` requires an adjacent invariant comment and a follow-up issue ID.

Before handoff run the repository's documented commands plus:

```text
uv run ruff check .
uv run basedpyright
uv run pytest -m "not integration" --cov
```

Canonical references: `ENG-PY-007` and `ENG-TEST-011`. Ask Engineering Enablement for review if a
third-party dependency has no usable types or a public contract must change incompatibly.

