{"agent":"claude","input":"Add Prometheus metrics to this Slim 4 app. Read composer.json, public/index.php, app/settings.php, app/dependencies.php, app/middleware.php, app/routes.php, src/Application/Actions/Action.php, src/Application/Middleware/SessionMiddleware.php, tests/TestCase.php, tests/Application/Actions/User/ListUserActionTest.php, phpunit.xml, phpstan.neon.dist, phpcs.xml and .github/workflows/tests.yml first. Require promphp/prometheus_client_php with a constraint every PHP version in the CI matrix can install and explain the choice. Add a metrics block to app/settings.php that selects InMemory, APCng or Redis storage, and define a CollectorRegistry in app/dependencies.php from it. Add src/Application/Middleware/MetricsMiddleware.php that observes an http_request_duration_seconds histogram and increments an http_requests_total counter, labelled by method, route pattern from RouteContext and status, with unmatched when no route resolved; register it in app/middleware.php. Add GET /metrics in app/routes.php served by src/Application/Actions/MetricsAction.php using RenderTextFormat and its MIME type. Add tests/Application/Actions/MetricsActionTest.php that requests /users then /metrics and asserts the counter sample for route /users with status 200, adding addRoutingMiddleware to tests/TestCase.php so the route pattern is available. Run vendor/bin/phpcs, vendor/bin/phpstan and vendor/bin/phpunit until they pass, scrape /metrics once with curl against composer start, then open a pull request that lists the metrics, their labels, and the storage to pick per deployment.","resources":[{"url":"https://github.com/your-org/your-app"}]}