{"agent":"claude","input":"Add CSRF protection to this CodeIgniter 4 app. Read composer.json, app/Config/Filters.php, app/Config/Security.php, app/Config/Cookie.php, app/Config/Routes.php, app/Controllers/Home.php, app/Views/welcome_message.php, tests/unit/HealthTest.php, phpunit.dist.xml and .github/workflows/phpunit.yml first, and read the framework's Security::verify and the CSRF filter in vendor to confirm which methods and token sources are checked. Enable csrf in $globals before in Filters.php and leave a commented except entry for api/* with a note. In Security.php set tokenRandomize true and rename tokenName to csrf_token and cookieName to csrf_cookie, keeping cookie-based protection, and explain why in the pull request. Add csrf_meta() to the head of welcome_message.php with a short comment on sending X-CSRF-TOKEN from fetch. Add tests/feature/CsrfFilterTest.php using CIUnitTestCase and FeatureTestTrait with a temporary POST submit route from withRoutes, asserting a SecurityException on a POST without a token, 200 with csrf_token() => csrf_hash() in the body, 200 with the X-CSRF-TOKEN header on a JSON body via withBodyFormat('json'), and 200 on GET /. Run composer install and vendor/bin/phpunit, start php spark serve and curl / to show the meta tag, then open a pull request that pastes the test output and the curl excerpt.","resources":[{"url":"https://github.com/your-org/your-app"}]}