{"agent":"claude","input":"Add a JSON REST API for a tasks resource to this CodeIgniter 4 app. Read composer.json, app/Config/Routes.php, app/Config/Routing.php, app/Config/Filters.php, app/Config/Cors.php, app/Config/Format.php, app/Config/Database.php, the tests directory and .github/workflows/phpunit.yml first. Use the spark generators: a migration creating a tasks table with id, title, done and timestamps, a TaskModel with allowedFields, timestamps and validation rules requiring a title, and an Api/Tasks controller generated with --restful that extends ResourceController with modelName and format json. Implement index, show, create, update and delete with the ResponseTrait helpers (respondCreated, respondDeleted, failNotFound, failValidationErrors) and read bodies with getJSON. Route it with $routes->resource inside an api group filtered by cors, excluding new and edit and using a (:num) placeholder, and fill in the Cors config. Write a feature test using FeatureTestTrait and DatabaseTestTrait with the tests database group covering create, list, validation failure and not found, run vendor/bin/phpunit, and open a pull request that quotes the test output and lists the routes.","resources":[{"url":"https://github.com/your-org/your-app"}]}