{"agent":"claude","input":"Find and add the missing database indexes in this FastAPI and SQLModel backend. Read backend/app/models.py, every query in backend/app/api/routes/ and backend/app/crud.py, backend/app/alembic/env.py and its versions, backend/scripts/ and .github/workflows/test-backend.yml first. List each query with its WHERE and ORDER BY columns and which existing index, if any, serves it. There is no Docker here: install PostgreSQL from the system packages, create the app database, set DATABASE_URL and run uv run bash scripts/prestart.sh. Seed enough rows for realistic plans (tens of thousands of items across hundreds of owners), capture EXPLAIN for each candidate query, and delete the seed data afterwards. Declare each index on the model: Field(index=True) for one column, __table_args__ with sqlalchemy Index for composites, with the column order and direction the query needs. Generate the migration with alembic revision --autogenerate from backend/, then change it to build with postgresql_concurrently=True inside op.get_context().autocommit_block(), and drop the same way on downgrade. Apply it, capture EXPLAIN again, run alembic check, uv run bash scripts/tests-start.sh and scripts/lint.sh. Add only indexes the plans justify. Open a pull request with the query list and the before and after plans.","resources":[{"url":"https://github.com/your-org/your-app"}]}