Guidance for AI coding agents working in this repository.
Minimalist Nette (PHP) web playground. No test suite, no frontend build. Keep it minimalist: do not add presenters, templates or components that are not strictly required by the task.
composer install # install dependencies
composer start # dev server: php -S localhost:11000 -t www
php vendor/bin/phpstan analyse # static analysis, level 8 — must stay greennette/tester is a dev dependency but there is no tests/ directory — do not claim tests are run.
Project-scoped official Nette skills (the nette/claude-code set) live in .pi/skills/ — consult them for Nette/Latte/NEON specifics.
www/index.php— front controller.App\Bootstrap—Configurator: addsconfig/common.neon+config/services.neon, enables Tracy (logs tolog/), registers a robot loader forapp/.App\Core\RouterFactory::createRouter()— the only route source.- Closure routes are executed by the built-in
Nette:Micropresenter: a handler MUST return aNette\Application\Responses\Response.echoin a handler is forbidden (PHPStan flags it). - Error handling is built into the framework: Tracy BlueScreen in debug mode,
Nette:Error4xx/Nette:Error5xx(NetteModule\ErrorPresenter) in production. Do NOT setapplication.errorPresenterin NEON unless you also create the matching presenters underapp/Presentation/Error/— a dangling mapping silently breaks production. config/services.neonauto-discovers*Facade,*Factory,*Repository,*Serviceclasses inapp/— a new class with such a suffix is registered as a service automatically.temp/(DI container, caches) andlog/(Tracy) are runtime dirs, self-ignored by git — never commit their contents. The container regenerates automatically when config changes; no manual clearing needed.
declare(strict_types=1);in every PHP file.- Tab indentation, no trailing whitespace.
finalfor classes not meant to be extended.- Two blank lines between class members; no blank line after the class opening brace.
- Trailing commas in multi-line calls.
- Docblocks only when they add information beyond the signature (imperative, no signature restating).
- PSR-4:
App\→app/.
- Tab indentation, no trailing commas, booleans as
yes/no.
.gitattributes:* text=auto(LF in the repo).- Keep diffs atomic; run PHPStan before committing.