feat: add Review AGENTS.md Skill

This commit is contained in:
Abhishek Kumar 2026-05-20 16:20:07 +05:30
parent ee216c0e40
commit d93d7aff4d
8 changed files with 641 additions and 32 deletions

View file

@ -0,0 +1,10 @@
# Telephony
Shared telephony code lives here. Provider-specific code lives in `providers/`;
read `providers/AGENTS.md` before changing a provider package.
- Keep cross-provider contracts, registry/factory wiring, shared status/transfer handling, and org-scoped config resolution in this folder.
- Keep provider-specific transports, serializers, config models, and webhook handlers in `providers/`.
- Resolve providers through the shared telephony helpers in this folder; do not instantiate provider classes directly from routes, tasks, or unrelated services.
- Keep telephony config lookups tenant-safe and respect any run-scoped telephony configuration carried on a workflow run.
- Keep provider-specific HTTP routes in provider packages; shared route glue belongs in `api/routes/`.

View file

@ -119,5 +119,5 @@ Pick the closest shape and copy from it.
- **Don't add a hardcoded provider list anywhere.** If you need to iterate, use `registry.all_specs()` / `registry.names()`.
- **Don't add a route under `routes/telephony.py` for a single provider.** Provider-specific handlers go in `providers/<name>/routes.py`. Cross-provider handlers (`/inbound/run`, `/twiml`) stay in `routes/telephony.py`.
- **Don't import `.routes` from a provider's `__init__.py`.** That's the cycle we deliberately broke — see "Registration is import-driven."
- **Don't write a frontend form for a new provider.** The UI consumes `GET /api/v1/organizations/telephony-providers/metadata` and renders generically from `ProviderUIField`. If a `field.type` you need doesn't exist (`text`/`password`/`textarea`/`string-array`/`number`), extend the renderer in `ui/src/app/(authenticated)/telephony-configurations/` once — not per provider.
- **Don't write a frontend form for a new provider.** The UI consumes `GET /api/v1/organizations/telephony-providers/metadata` and renders generically from `ProviderUIField`. If a `field.type` you need doesn't exist (`text`/`password`/`textarea`/`string-array`/`number`), extend the shared telephony UI under `ui/src/components/telephony/` once — not per provider.
- **Don't run a database migration to add a provider.** The discriminator lives in JSONB credentials and a `VARCHAR(64)` `mode` column; nothing in the DB schema knows the set of provider names.