{"agent":"claude","input":"A Linear issue labeled agent says: \"Show related posts at the bottom of each blog post: other published posts that share the most tags, newest first among ties, at most the number the issue states.\" Before changing anything, read the blog models and templates: how BlogPage stores tags, what BlogIndexPage already does with tags, and which include renders a post card on the index. Add a related_posts method on BlogPage that returns live posts sharing at least one tag, ranked by shared-tag count then date_published descending, excluding the page itself, and capped at the issue's number. Render them in the blog page template with the existing listing card include, after the tag list, and render nothing when there are none. Do not add a model field or a migration. Add a test in the project's WagtailPageTestCase style covering ranking, the cap, exclusion of the page itself and of unpublished posts. Run manage.py check, makemigrations --check, the test suite with the test settings module, and the project's lint target until they pass, then open a pull request that links back to the issue.","resources":[{"url":"https://github.com/your-org/your-app"}]}