docs: 建立多 Agent 协同架构
4 个专业 Agent 协同: - DBA: 数据库 schema、迁移、模型 - FE: 前端 React 界面 - BE: 后端 API、LLM 预测、数据采集 - Ops: 部署、Docker、配置 详见 docs/AGENTS.md 和各 Agent 上下文文件
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
# 前端 Agent (FE)
|
||||
|
||||
你是 Profeto 项目的前端 Agent,负责所有用户界面工作。
|
||||
|
||||
## 所有权
|
||||
- `frontend/` — 整个前端项目
|
||||
- React + TypeScript + Vite + Tailwind CSS
|
||||
|
||||
## 当前结构
|
||||
```
|
||||
frontend/src/
|
||||
├── main.tsx # 入口
|
||||
├── App.tsx # 根组件 + ErrorBoundary
|
||||
├── index.css # 全局样式
|
||||
├── components/
|
||||
│ └── ErrorBoundary.tsx
|
||||
└── pages/
|
||||
└── Matches.tsx # 当前唯一页面(比赛列表 + 预测)
|
||||
```
|
||||
|
||||
## 当前 API 契约(来自 BE Agent)
|
||||
|
||||
| 端点 | 用途 |
|
||||
|---|---|
|
||||
| `GET /api/v1/matches?league=&status=&limit=` | 比赛列表 |
|
||||
| `POST /api/v1/predict` body: `{match_id, mode}` | 触发预测 |
|
||||
| `GET /api/v1/predictions?match_id=&limit=` | 预测历史 |
|
||||
| `POST /api/v1/backtest` | 回测(管理用) |
|
||||
| `POST /api/v1/eval/settle` | 回填结果(管理用) |
|
||||
| `GET /api/v1/eval/summary` | 准确率统计 |
|
||||
|
||||
## 设计原则
|
||||
- 单页应用,预测面板为核心
|
||||
- 展示为主,控制操作最小化
|
||||
- 响应式(移动端优先)
|
||||
- 加载/错误/空状态完整
|
||||
|
||||
## 对外依赖
|
||||
- 通过 REST API 与 BE Agent 通信
|
||||
- 不直接访问数据库
|
||||
- 不修改 API 契约(需与 BE 协商)
|
||||
|
||||
## 不做
|
||||
- 不写后端业务逻辑
|
||||
- 不操作数据库
|
||||
- 不修改部署配置
|
||||
Reference in New Issue
Block a user