{"agent":"claude","input":"Add the database indexes this Next.js app's Drizzle queries need. Read package.json, drizzle.config.ts, lib/db/schema.ts, lib/db/queries.ts, lib/db/seed.ts, lib/db/migrations/0000_soft_the_anarchist.sql and meta/_journal.json, app/(login)/actions.ts, app/api/team/route.ts and app/(dashboard)/dashboard/activity/page.tsx first. List every filter, join and order by column, then add only the indexes a query reads, using the array form of pgTable's third argument: team_members on user_id and separately on team_id, activity_logs on (user_id, timestamp desc) and on team_id, and invitations on (team_id, email, status). Leave invitations.invited_by unindexed and say why. Run pnpm db:generate --name add_query_indexes and commit the SQL, snapshot and journal it writes. Install Postgres in your sandbox, set POSTGRES_URL, run pnpm db:migrate and pnpm db:seed, run EXPLAIN for the activity log query and the team member lookup before and after the migration, and paste both plans into the pull request with the output of pnpm build. Change no query, no column and no application code.","resources":[{"url":"https://github.com/your-org/your-app"}]}