{"agent":"claude","input":"Add CORS to this Slim 4 API. Read composer.json, public/index.php, app/middleware.php, app/routes.php, app/settings.php, the existing middleware class, tests/TestCase.php and the CI workflow first. Write a PSR-15 CorsMiddleware configured from a cors block in settings with origins from a CORS_ORIGINS environment variable, exact-match origins only, Vary: Origin, credentials only with an explicit list, and a 204 preflight answer with methods, headers and max-age. Keep the existing OPTIONS catch-all route. Add the middleware so that it is outermost, after the error middleware, in both index.php and the test app factory, and explain the ordering in the PR. Add PHPUnit tests for an allowed preflight, an allowed GET, a disallowed origin and a 404 that still carries the header. Run phpunit, phpstan and phpcs and include the output. Document the variable in the README and docker-compose. Open a pull request.","resources":[{"url":"https://github.com/your-org/your-app"}]}