{"agent":"claude","input":"Find and fix N+1 query patterns in this Flask app. Read pyproject.toml, the Makefile, flaskbb/configs/testing.py, flaskbb/forum/views.py, flaskbb/forum/models.py and the templates under flaskbb/templates/forum first, and read tests/fixtures/helpers.py for the selects fixture and tests/unit/forum/test_topic_page_permissions.py for how it is used. For the forum index, forum, topic, member list and topic tracker pages, write a test with the selects fixture that loads the page with N and 2N seeded rows and compares SELECT counts. Fix only the pages whose count grows with N, using selectinload, contains_eager or lazy=\"joined\" in the models or views, never in templates. Keep one query-count test per fix. Run uv run pytest, then the tox environment CI uses. Open a pull request listing each page, its statement count before and after, and the relationship that caused it.","resources":[{"url":"https://github.com/your-org/your-app"}]}