2026-02-24 18:18:42 +08:00
|
|
|
## Repository Structure
|
2026-01-28 15:21:06 +08:00
|
|
|
|
2026-02-24 18:18:42 +08:00
|
|
|
- `infra/`: Infrastructure and operations (Docker, scripts, deployment).
|
|
|
|
|
- `backend/`: FastAPI backend.
|
|
|
|
|
- `apps/`: Flutter mobile app.
|
|
|
|
|
- `docs/`: Documentation and design/planning artifacts.
|
2026-01-29 17:02:09 +08:00
|
|
|
|
2026-02-24 18:18:42 +08:00
|
|
|
## Rules Hierarchy
|
2026-01-29 17:02:09 +08:00
|
|
|
|
2026-02-24 18:18:42 +08:00
|
|
|
- This root `AGENTS.md` defines global rules and applies to all changes.
|
|
|
|
|
- When editing `backend/`, you must also follow `backend/AGENTS.md`.
|
|
|
|
|
- When editing `apps/`, you must also follow `apps/AGENTS.md`.
|
2026-01-29 17:02:09 +08:00
|
|
|
|
2026-02-24 18:18:42 +08:00
|
|
|
## Docker Startup
|
2026-01-29 17:02:09 +08:00
|
|
|
|
2026-02-05 15:13:06 +08:00
|
|
|
Always start services with the env file:
|
2026-02-24 18:18:42 +08:00
|
|
|
|
2026-02-05 15:13:06 +08:00
|
|
|
```bash
|
2026-02-24 16:38:30 +08:00
|
|
|
docker compose --env-file .env -f infra/docker/docker-compose.yml up -d
|
2026-02-05 15:13:06 +08:00
|
|
|
```
|
2026-02-24 18:18:42 +08:00
|
|
|
|
|
|
|
|
## Git Branch and Worktree Policy
|
|
|
|
|
|
|
|
|
|
- Use `dev` as the default base branch for day-to-day development.
|
|
|
|
|
- New development worktrees must be created from `dev` (never from `main`).
|
|
|
|
|
- Do not develop or commit directly on `main` outside explicit release/merge workflows.
|
|
|
|
|
- Do not rewrite `main` history unless explicitly requested (including reset and force push).
|