2026-02-27 15:22:42 +08:00
|
|
|
# Project Development Guide
|
2026-01-28 15:21:06 +08:00
|
|
|
|
2026-02-27 15:22:42 +08:00
|
|
|
This file serves as the entry point for project development, directing to appropriate constraint files based on development context.
|
2026-01-29 17:02:09 +08:00
|
|
|
|
2026-02-27 15:22:42 +08:00
|
|
|
## Project Structure
|
2026-01-29 17:02:09 +08:00
|
|
|
|
2026-02-27 15:22:42 +08:00
|
|
|
```
|
|
|
|
|
social-app/
|
|
|
|
|
├── apps/ # Flutter mobile app
|
|
|
|
|
├── backend/ # FastAPI backend service
|
|
|
|
|
├── infra/ # Infrastructure (Docker, deployment scripts)
|
|
|
|
|
└── docs/ # Documentation and design/planning artifacts
|
|
|
|
|
```
|
2026-01-29 17:02:09 +08:00
|
|
|
|
2026-02-27 15:22:42 +08:00
|
|
|
## Rules Hierarchy
|
2026-01-29 17:02:09 +08:00
|
|
|
|
2026-02-27 15:22:42 +08:00
|
|
|
Follow this hierarchy when developing:
|
2026-02-24 18:18:42 +08:00
|
|
|
|
2026-02-27 15:22:42 +08:00
|
|
|
```
|
|
|
|
|
~/.config/opencode/AGENTS.md # Global core rules (skills, agents, process)
|
|
|
|
|
├── This file (root AGENTS.md) # Project-level entry
|
|
|
|
|
│ ├── backend/AGENTS.md # Backend-specific rules
|
|
|
|
|
│ └── apps/AGENTS.md # Frontend-specific rules
|
2026-02-05 15:13:06 +08:00
|
|
|
```
|
2026-02-24 18:18:42 +08:00
|
|
|
|
2026-02-27 15:22:42 +08:00
|
|
|
## Development Guidance
|
2026-02-26 14:37:51 +08:00
|
|
|
|
2026-02-27 15:22:42 +08:00
|
|
|
| Development Context | Follow Rules |
|
|
|
|
|
|--------------------|--------------|
|
|
|
|
|
| Backend Python dev | [backend/AGENTS.md](backend/AGENTS.md) |
|
|
|
|
|
| Flutter mobile dev | [apps/AGENTS.md](apps/AGENTS.md) |
|
|
|
|
|
| Infrastructure/ops | This file + infra/ directory conventions |
|
|
|
|
|
| API doc changes | Sync to `docs/runtime/runtime-route.md` |
|
2026-02-26 14:37:51 +08:00
|
|
|
|
2026-02-27 15:22:42 +08:00
|
|
|
## Git Workflow
|
2026-02-26 14:37:51 +08:00
|
|
|
|
2026-02-27 15:22:42 +08:00
|
|
|
- Default branch: `dev`
|
|
|
|
|
- Feature development: use worktree `git worktree add -b feature/xxx ../feature-xxx dev`
|
|
|
|
|
- Never develop directly on `main`
|
2026-02-27 18:36:21 +08:00
|
|
|
|
|
|
|
|
## Supabase Services
|
|
|
|
|
|
|
|
|
|
Project uses locally hosted Supabase for development.
|
|
|
|
|
|
|
|
|
|
- Docker config: `infra/docker/docker-compose.yml`
|
|
|
|
|
- Start services: `cd infra/docker && docker compose up -d`
|
|
|
|
|
- Stop services: `cd infra/docker && docker compose down`
|