mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-06-07 07:55:16 +02:00
feat: add Review AGENTS.md Skill
This commit is contained in:
parent
ee216c0e40
commit
d93d7aff4d
8 changed files with 641 additions and 32 deletions
10
api/services/telephony/AGENTS.md
Normal file
10
api/services/telephony/AGENTS.md
Normal 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/`.
|
||||
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue