docs: ai 协作文档体系重构与多 ai 仲裁结果落地

1.AI 协作文档体系重构(objections/worklines/contracts+matrix.md)

2.coord 仲裁文档(final-decisions/cross-review/final-rulings/orchestration)

3.各服务 01/02 文档补全

4.共享包初始化(shared-ts/shared-go/hooks/ui-components/ui-tokens)

5.Proto 契约补全

6.004 架构影响地图更新

7.端口分配表

8.设计规格文档
This commit is contained in:
SpecialX
2026-07-10 12:58:22 +08:00
parent 2a2a56f541
commit faaaf29f67
120 changed files with 23201 additions and 2 deletions

View File

@@ -0,0 +1,57 @@
# api-gateway 工作排期
> 负责人ai01
> 关联:[workline.md](../workline.md)、[coord.md](../coord.md)、[contracts/api-gateway_contract.md](../contracts/api-gateway_contract.md)
> 模式:全并行(各 AI 一口气完成 P2-P6 全部代码,最后统一集成测试)
---
## §1 总览
api-gateway 是 Edu 系统统一入口负责路由、JWT 验签、限流、熔断、CORS。全阶段目标P2 路由+JWT → P3 限流加固 → P4-P6 持续优化。
---
## §2 全阶段甘特图P2-P6各 AI 自行细化)
```mermaid
gantt
title ai01 api-gateway 全阶段排期
dateFormat YYYY-MM-DD
axisFormat %m-%d
section P2 基础
路由表+双入口+shared-go :a1a, 2026-07-10, 3d
JWT校验+JWKS fetcher :a1b, after a1a, 3d
限流+熔断+CORS :a1c, after a1b, 2d
section P3-P6 持续优化
路由扩展(student/parent/admin) :a1d, after a1c, 2d
指标+链路加固 :a1e, after a1d, 2d
```
> **注意**:以上为 coord 初始规划ai01 接管后必须自行细化为完整 P2-P6 排期。
---
## §3 详细任务
### P2路由表 + JWT + 限流
- **负责人**ai01
- **交付物**
- `services/api-gateway/internal/routing/router.go` — 路由表
- `/api/v1/teacher/*` → teacher-bff:3003 代理
- `/api/v1/iam/*` → iam:3002 代理
- JWT RS256 验签shared-go/jwks
- 限流 + 熔断 + CORS
- **依赖**shared-go 骨架(批次 0 已完成)+ iam GetPublicKeyai06
- **验收标准**:路由双入口 + JWT 验签 + 限流 + CORS 白名单
- **完整 P3-P6 任务**:⚠️ 由 ai01 自行补充
---
## §4 依赖与就绪信号
- **我依赖**iam GetPublicKey RPCai06
- **我的就绪信号**api-gateway :8080 可访问 + JWT 验签可用