{"agent":"claude","input":"A Linear issue labeled agent says: \"Add role-based permissions to the users API. We need admin, editor and viewer roles, only admins may create or update users or change roles, and the list and detail endpoints must require login.\" Do the work in this repository following its service and selector conventions: add the role field with a migration that maps existing is_admin users to admin, add DRF permission classes, a role-change service that keeps at least one admin, wire the users APIs and expose the role in the admin and the list filter. Add service and API tests, run ruff, mypy and pytest, and open a pull request that links back to the issue.","resources":[{"url":"https://github.com/your-org/your-app"}]}