2026-03-12 16:41:45 +08:00
# Project AGENTS Router
2026-01-28 15:21:06 +08:00
2026-03-23 17:57:24 +08:00
Root `AGENTS.md` is routing + cross-domain policy only.
2026-03-12 16:41:45 +08:00
Do not place backend/frontend implementation details here.
2026-01-29 17:02:09 +08:00
2026-03-23 17:57:24 +08:00
## Scope
2026-01-29 17:02:09 +08:00
2026-03-23 17:57:24 +08:00
- Applies to repository root and cross-domain tasks.
- Subdomain rules: `backend/AGENTS.md` , `apps/AGENTS.md` .
- If rules conflict, use the stricter one.
2026-01-29 17:02:09 +08:00
2026-03-23 17:57:24 +08:00
## Rule Order
2026-01-29 17:02:09 +08:00
2026-03-23 17:57:24 +08:00
1. System / developer / platform safety instructions
2. Workspace runtime rules (`AGENTS.md` + `rules/*` )
3. This file (routing + project-level constraints)
4. Subdomain rules (backend/apps)
2026-02-24 18:18:42 +08:00
2026-03-12 16:41:45 +08:00
## Mandatory Routing
2026-02-24 18:18:42 +08:00
2026-03-23 17:57:24 +08:00
- `backend/**` must follow `backend/AGENTS.md` .
- `apps/**` must follow `apps/AGENTS.md` .
- Cross-domain changes must satisfy all relevant subdomain rules.
- `infra/**` follows this file plus `infra/` conventions.
2026-03-11 15:28:29 +08:00
2026-03-12 16:41:45 +08:00
## Project-Wide Constraints
2026-03-11 15:28:29 +08:00
2026-03-23 17:57:24 +08:00
- Default development branch is `dev` ; do not develop directly on `main` .
- Never push unless explicitly requested by the user.
- Keep AGENTS layered and lean: shared rules at root, domain rules in sub-AGENTS.
2026-03-30 18:36:57 +08:00
- **No Error Swallowing**: All exceptions must propagate or be converted to typed errors. Never catch an exception, log it, and silently continue. This destroys debuggability.
2026-03-12 16:42:25 +08:00
2026-03-23 17:57:24 +08:00
## Protocol Source of Truth
2026-02-27 18:36:21 +08:00
2026-03-23 17:57:24 +08:00
`docs/protocols/` is the single source of truth for protocol and data format.
2026-03-02 17:02:09 +08:00
2026-03-23 17:57:24 +08:00
- Update protocol docs before changing data/API/UI contracts.
- Document compatibility strategy (backward-compatible vs migration).
- Keep frontend/backend implementations aligned with documented protocol.
2026-03-30 18:36:57 +08:00
## Database Access
When viewing data in the database, use `supabase mcp` tools (`supabase_execute_sql` , `supabase_list_tables` , etc.) instead of direct queries or other methods.