2.3 KiB
2.3 KiB
Project AGENTS Router
Root AGENTS.md is a navigation and global-constraint layer only.
Do not place backend/frontend implementation details here.
Rule Order
Apply rules in this order:
- System/developer/platform safety instructions
- Workspace global runtime rules (
AGENTS.mdandrules/*in workspace runtime config) - This file (routing + project-wide constraints)
- Domain sub-rules:
backend/AGENTS.mdapps/AGENTS.md
If two rules conflict, use the stricter one.
Mandatory Routing
- Any change under
backend/**MUST followbackend/AGENTS.md. - Any change under
apps/**MUST followapps/AGENTS.md. - Cross-domain changes MUST satisfy all relevant sub-AGENTS together.
- Infrastructure-only changes under
infra/**follow this file plusinfra/conventions.
Development Context Mapping
| Context | Required Rule Set |
|---|---|
| Backend Python/FastAPI | backend/AGENTS.md |
| Flutter mobile app | apps/AGENTS.md |
| Backend + Flutter in one task | backend/AGENTS.md + apps/AGENTS.md |
| Infra/ops scripts | This file + infra/ conventions |
| API contract/doc updates | Also sync docs/runtime/runtime-route.md |
Project-Wide Constraints
- Default branch is
dev; never develop directly onmain. - Preferred feature workflow:
git worktree add -b feature/xxx ../feature-xxx dev. - Never push remote changes unless the user explicitly requests it.
- Keep AGENTS chain lean: put domain details in sub-AGENTS, avoid duplicate rules across layers.
Protocol as Source of Truth
docs/protocols/ is the single source of truth for data formats and protocols.
- All data schemas, API contracts, and UI schema definitions MUST be documented in
docs/protocols/. - Frontend and backend implementations MUST conform to the protocols defined in
docs/protocols/. - Before modifying any data format or protocol:
- Update the corresponding document in
docs/protocols/first - Verify the change is backward compatible or plan migration
- Then implement the code changes
- Update the corresponding document in
This ensures frontend and backend stay synchronized and prevents drift.
Skills Index
ag-ui: AG-UI protocol implementation guidance.agentscope-skill: AgentScope framework guidance.
Skill invocation and process routing are governed by workspace runtime rules.