refactor: 移除前端 Mock API,新增共享组件,优化认证流程
- 删除 mock_api_client、mock_calendar_service、mock_history_service - 新增 fixed_length_code_input、link_button、message_composer 共享组件 - 优化登录/注册/密码重置页面使用新组件 - 简化 injection.dart 移除 mock 分支 - 更新 env.dart 配置(BACKEND_URL 替换 API_URL) - 后端 agentscope 工具和测试更新 - 重构 AGENTS.md 文档结构 - 新增 deploy/ 目录和 protocol 文档
This commit is contained in:
@@ -1,53 +1,48 @@
|
||||
# Project Development Guide
|
||||
# Project AGENTS Router
|
||||
|
||||
This file serves as the entry point for project development, directing to appropriate constraint files based on development context.
|
||||
Root `AGENTS.md` is a navigation and global-constraint layer only.
|
||||
Do not place backend/frontend implementation details here.
|
||||
|
||||
## Project Structure
|
||||
## Rule Order
|
||||
|
||||
```
|
||||
social-app/
|
||||
├── apps/ # Flutter mobile app
|
||||
├── backend/ # FastAPI backend service
|
||||
├── infra/ # Infrastructure (Docker, deployment scripts)
|
||||
└── docs/ # Documentation and design/planning artifacts
|
||||
```
|
||||
Apply rules in this order:
|
||||
|
||||
## Rules Hierarchy
|
||||
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`
|
||||
|
||||
Follow this hierarchy when developing:
|
||||
If two rules conflict, use the stricter one.
|
||||
|
||||
```
|
||||
├── This file (root AGENTS.md) # Project-level entry
|
||||
│ ├── backend/AGENTS.md # Backend-specific rules
|
||||
│ └── apps/AGENTS.md # Frontend-specific rules
|
||||
```
|
||||
## Mandatory Routing
|
||||
|
||||
## Development Guidance
|
||||
- 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.
|
||||
|
||||
| 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` |
|
||||
## Development Context Mapping
|
||||
|
||||
## Backend Startup
|
||||
| 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` |
|
||||
|
||||
**Always use `./infra/scripts/app.sh` to start/stop the backend.** Do not start uvicorn directly.
|
||||
**Always use `./logs/*.log` to check the backend log output.**
|
||||
## Project-Wide Constraints
|
||||
|
||||
## Git Workflow
|
||||
- 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.
|
||||
|
||||
- Default branch: `dev`
|
||||
- Feature development: use worktree `git worktree add -b feature/xxx ../feature-xxx dev`
|
||||
- Never develop directly on `main`
|
||||
- **Never push to remote unless explicitly requested by user**
|
||||
## Skills Index
|
||||
|
||||
## Skills (Domain Knowledge)
|
||||
- `ag-ui`: AG-UI protocol implementation guidance.
|
||||
- `agentscope-skill`: AgentScope framework guidance.
|
||||
|
||||
| Skill | Purpose | When to Use |
|
||||
|-------|---------|-------------|
|
||||
| **ag-ui** | AG-UI protocol for agent-user interaction | Agent chat, streaming events, tool calls, state sync |
|
||||
| **agentscope-skill** | AgentScope framework reference and examples | AgentScope multi-agent orchestration, API usage, implementation patterns |
|
||||
|
||||
**Usage**: Reference skills by name (e.g., "use the `ag-ui` skill") in development rules. Skills provide complete documentation, examples, and best practices.
|
||||
Skill invocation and process routing are governed by workspace runtime rules.
|
||||
|
||||
Reference in New Issue
Block a user