From 61ba07aba60046a1bbc4e77ffd4786e51b72a240 Mon Sep 17 00:00:00 2001 From: "anthony-hermes[bot]" <363759337+anthony-hermes[bot]@users.noreply.github.com> Date: Sat, 5 Dec 2026 14:53:58 -0500 Subject: [PATCH] docs(contract): record code and test standards deltas The shared standards skill is the default and this repo's gate is stricter in places: mypy over src and tests, assertion-named tests, protocols with fakes, 3.14 typing. State those as deltas so an agent reads the repo's rule rather than inferring it. --- AGENTS.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index 3bf3f69..6ca3bf5 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -23,6 +23,23 @@ PATH="$PWD/.venv/bin:$PATH" make check VIRTUAL_ENV=.venv uv pip install -e '.[dev]' ``` +## Code and tests + +The shared coding standards are the default; this section records only what is true here. + +- mypy is the typing gate and runs over `src` and `tests`, so every def is annotated. + Never relax `disallow_untyped_defs` to land a change. +- Ruff is the only formatter and linter. `T20` (print), `PT` (pytest mistakes) and + `RUF100` (unused noqa) are candidates once the suite is clean under them; enabling a + rule is its own change. +- A test is named after the acceptance assertion it protects (`OUT6.1`, `FT5.7`), not + the function under test. A changed function is not a test obligation; an assertion is. +- Speech and translation stay behind the protocols with the fakes in `tests/fakes.py`: + no network, no API key and no GPU in the default suite. `slow` and `gpu` mark the + exceptions. +- Python 3.14 syntax: `list[str]`, `X | None`, no `from __future__ import annotations`. +- No coverage gate and no test-count target. + ## Ownership lanes | lane | paths | notes |