{"agent":"claude","input":"Add an audit log to this Fastify API and open a pull request. Read package.json, src/app.ts, src/routes/api/autohooks.ts, src/routes/api/tasks/index.ts, src/plugins/app/tasks/tasks-repository.ts, src/plugins/app/authorization.ts, src/schemas/tasks.ts, migrations/002.do.tasks.sql, test/helper.ts, test/routes/api/tasks/tasks.test.ts, docker-compose.yml and .github/workflows/ci.yml first. Add migrations/006.do.audit_log.sql and 006.undo.audit_log.sql creating audit_log with id, actor_id referencing users(id), entity, entity_id, action, a JSON changes column and created_at. Add src/plugins/app/audit/audit-repository.ts as a fastify-plugin depending on knex, with record() and paginate(). Add src/schemas/audit.ts in TypeBox. In src/routes/api/tasks/index.ts, record create, update, delete and assign through one onSend hook that only writes on 2xx responses, using request.session.user.id as the actor. Add src/routes/api/audit/index.ts with GET /api/audit, paginated, admin only via request.isAdmin. Add test/routes/api/audit/audit.test.ts using build() and injectWithLogin from test/helper.ts: a task created then patched leaves one create and one update row with the right actor_id, a moderator gets 403 from GET /api/audit, and a failed PATCH writes nothing. Run npm run db:migrate, npm run lint, npm run build -- --noEmit and npm test against the docker-compose MySQL, and paste the output in the pull request. Do not change the existing route schemas or the login flow.","resources":[{"url":"https://github.com/your-org/your-app"}]}