Your AI Agent Is Only as Good as Your Types
AI agents benefit greatly from strong type systems because they rely on machine-readable feedback rather than visual IDE hints. Static analysis tools like PHPStan serve as the feedback mechanism in the agentic loop: the agent writes code, runs analysis, reads errors, and fixes them iteratively. The Nette PHP framework has been fully typed since PHP 7.1 and now all packages pass PHPStan at level 8, providing a well-typed foundation that reduces guesswork for AI agents. Nette also ships a PHPStan extension that teaches the analyzer framework-specific patterns like form control types and dependency injection. The post argues that the value of IDEs has shifted toward types and tests as the primary feedback mechanism for both humans and machines.