Use when working with rpc_load_balancer for TODO
API wrapper patterns for the CheddarFlow project. TRIGGER when: writing or modifying API wrapper apps (apps with _api suffix), making HTTP requests to external services, working with SharedUtils.HTTP, Tesla middleware, or Finch pools. Also trigger when creating response structs with new!/1 constructors. DO NOT TRIGGER when: working with internal Elixir code that doesn't make external HTTP calls.
Authentication and authorization patterns for the CheddarFlow project. TRIGGER when: writing or modifying authentication, authorization, sessions, Auth0 integration, user access control, entitlements, or any plug/middleware that checks user identity or permissions. Also trigger when working with SessionCache, JWKS, or Ueberauth. DO NOT TRIGGER when: working with code that doesn't involve auth or user identity.
Oban background job patterns for the CheddarFlow project. TRIGGER when: writing or modifying Oban workers, background jobs, cron schedules, job queue configuration, or any code that enqueues or processes Oban jobs. Also trigger when working with Schemas.JobsRepo for job-related queries. DO NOT TRIGGER when: working with code that doesn't involve background job processing.
Caching patterns for the CheddarFlow project. TRIGGER when: writing or modifying caching code involving Redis, ETS, elixir_cache, Cachex, or any of the _cache apps. Also trigger when working with RedisLock, Cache.Redis, Cache.ETS, or cache sandbox testing. DO NOT TRIGGER when: working with code that doesn't involve caching layers.
Umbrella dependency management patterns for the CheddarFlow project. TRIGGER when: adding dependencies, creating new apps, modifying mix.exs files, working with CFX.MixHelpers, or changing the mix_helpers.exs file. Also trigger when adding tags like :root, :web, :http to app configurations. DO NOT TRIGGER when: working with code that doesn't involve dependency or project configuration.
Distributed cluster patterns for the CheddarFlow project. TRIGGER when: writing or modifying code involving cross-node communication, CFXRpc, libcluster, Phoenix.PubSub broadcasting, distributed Erlang, or node routing. Also trigger when working with SharedUtils.Cluster, CFXPubSub, or any code that needs to handle dev/test vs prod cluster differences. DO NOT TRIGGER when: working with single-node code that doesn't involve distribution.
Ecto schema, migration, and database patterns for the CheddarFlow project. TRIGGER when: writing or modifying Ecto schemas, changesets, migrations, database queries, context modules, or any code in the schemas app. Also trigger when creating new database tables, adding indexes, working with EctoShorts, QueryBuilder, TimescaleDB, or FactoryEx factories. DO NOT TRIGGER when: working with code that doesn't touch the database layer.