Problem
AGENTS.md duplicates rules already enforced by pre-commit tools. That wastes AI context and creates drift risk.
Root cause
- No Inline Imports is fully enforced by ruff
PLC0415
str = None → str | None = None is enforced by mypy no_implicit_optional
- Broader type-annotation guidance (
Any justified, complete annotations) is only partially covered by mypy and must stay
Proposed approach
- Drop the full No Inline Imports (MUST) section from AGENTS.md; replace with a short one-liner pointing to ruff
PLC0415 (and note TYPE_CHECKING exception if still useful)
- Delete only the sentence under Type Annotations about default
None / str | None
- Keep Type Annotations MUST for complete annotations + justified
Any
- Update any cross-references to "No Inline Imports" (e.g. conftest placement section)
Out of scope
- Security-related hooks/rules
- Adding new ruff rules (UP006/UP035) — separate follow-up
- Automating other AGENTS.md rules
Done
Problem
AGENTS.md duplicates rules already enforced by pre-commit tools. That wastes AI context and creates drift risk.
Root cause
PLC0415str = None→str | None = Noneis enforced by mypyno_implicit_optionalAnyjustified, complete annotations) is only partially covered by mypy and must stayProposed approach
PLC0415(and note TYPE_CHECKING exception if still useful)None/str | NoneAnyOut of scope
Done
str = Nonesentence removed from Type AnnotationsAnyguidance retained