2026-03-12 16:41:45 +08:00
|
|
|
# Project AGENTS Router
|
2026-01-28 15:21:06 +08:00
|
|
|
|
2026-03-12 16:41:45 +08:00
|
|
|
Root `AGENTS.md` is a navigation and global-constraint layer only.
|
|
|
|
|
Do not place backend/frontend implementation details here.
|
2026-01-29 17:02:09 +08:00
|
|
|
|
2026-03-12 16:41:45 +08:00
|
|
|
## Rule Order
|
2026-01-29 17:02:09 +08:00
|
|
|
|
2026-03-12 16:41:45 +08:00
|
|
|
Apply rules in this order:
|
2026-01-29 17:02:09 +08:00
|
|
|
|
2026-03-12 16:41:45 +08:00
|
|
|
1. System/developer/platform safety instructions
|
|
|
|
|
2. Workspace global runtime rules (`AGENTS.md` and `rules/*` in workspace runtime config)
|
|
|
|
|
3. This file (routing + project-wide constraints)
|
|
|
|
|
4. Domain sub-rules:
|
|
|
|
|
- `backend/AGENTS.md`
|
|
|
|
|
- `apps/AGENTS.md`
|
2026-01-29 17:02:09 +08:00
|
|
|
|
2026-03-12 16:41:45 +08:00
|
|
|
If two rules conflict, use the stricter one.
|
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-12 16:41:45 +08:00
|
|
|
- Any change under `backend/**` MUST follow `backend/AGENTS.md`.
|
|
|
|
|
- Any change under `apps/**` MUST follow `apps/AGENTS.md`.
|
|
|
|
|
- Cross-domain changes MUST satisfy all relevant sub-AGENTS together.
|
|
|
|
|
- Infrastructure-only changes under `infra/**` follow this file plus `infra/` conventions.
|
2026-02-26 14:37:51 +08:00
|
|
|
|
2026-03-12 16:41:45 +08:00
|
|
|
## Development Context Mapping
|
2026-02-26 14:37:51 +08:00
|
|
|
|
2026-03-12 16:41:45 +08:00
|
|
|
| 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` |
|
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-12 16:41:45 +08:00
|
|
|
- Default branch is `dev`; never develop directly on `main`.
|
|
|
|
|
- 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.
|
2026-02-26 14:37:51 +08:00
|
|
|
|
2026-03-12 16:42:25 +08:00
|
|
|
## 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:
|
|
|
|
|
1. Update the corresponding document in `docs/protocols/` first
|
|
|
|
|
2. Verify the change is backward compatible or plan migration
|
|
|
|
|
3. Then implement the code changes
|
|
|
|
|
|
|
|
|
|
This ensures frontend and backend stay synchronized and prevents drift.
|
|
|
|
|
|
2026-03-12 16:41:45 +08:00
|
|
|
## Skills Index
|
2026-02-27 18:36:21 +08:00
|
|
|
|
2026-03-12 16:41:45 +08:00
|
|
|
- `ag-ui`: AG-UI protocol implementation guidance.
|
|
|
|
|
- `agentscope-skill`: AgentScope framework guidance.
|
2026-03-19 18:43:23 +08:00
|
|
|
- `ui-ux-pro-max`: APP UI design guidelines.
|
2026-03-02 17:02:09 +08:00
|
|
|
|
2026-03-12 16:41:45 +08:00
|
|
|
Skill invocation and process routing are governed by workspace runtime rules.
|