AID-12Recommended
Use strict types and linters
Run the strictest type checker and linter settings the project can pass, so mistakes fail fast instead of reaching review.
How to do it
Turn on strict modes, such as TypeScript strict, mypy --strict or PHPStan's highest level the code passes. Forbid untyped escapes such as any. Agents fix tool errors well, so strict tools turn many silent bugs into quick fixes. The architecture rule Never type anything as mixed or any explains why loose types defeat the checker.
How to check
The configuration files set the strict options, and the check command fails on a deliberate type error.
Sources
Related rules
- ARC-51 Typing values as mixed or any in Clean code and architecture
- ARC-24 Keep docblocks only for what types cannot say in Clean code and architecture
- STK-46 Use Pyright to check Python types in Software choices
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/ai-assisted-development/rules-the-agent-cannot-break/strict-tooling">Agent Wranglers AI-assisted development playbook</a>. In code you write, add a comment next to it with the same link.