What problem does it solve?
Backend work on the Phoenix AI observability platform involves conventions that are easy to get wrong: GraphQL mutations vs queries, Alembic migrations that must stay SQLite-compatible, async session lifecycle, and test patterns for LLM span emission. This Skill encodes those conventions so changes to src/phoenix/server/, src/phoenix/db/, and tests/unit/server/ follow the project's established patterns.
Core Features & Use Cases
- GraphQL Patterns: Templates for mutations, types, subscriptions, and input types, including the hard rule that side effects belong on Mutation with permission classes to avoid unauthenticated SSRF vectors.
- Database Patterns: Alembic migration scaffolding, batch_alter_table for SQLite compatibility, self-contained JSONB shims, and async session management rules.
- Test Patterns: Fixtures like db and gql_client, mutation/query test templates, GlobalID handling, and VCR cassette workflows for deterministic LLM trace tests with OpenInference span assertions.
- Use Case: When adding a new mutation to the Phoenix GraphQL API, follow the mixin template, register it in mutations/init.py, run make graphql, and write a test asserting both result.data and database state.
Quick Start
Ask the assistant to add a new GraphQL mutation with input validation, permission classes, and a matching unit test to the Phoenix backend.