@@ -3,266 +3,180 @@
> 维护者: coord( 协调 AI)
> 维护规则:各 AI 在 `worklines/[模块名]_workline.md` 写入甘特图工作排期 → coord 汇总到本文件
> 模式:**全并行**(各 AI 一口气完成 P2-P6 全部代码,开发期间用 mock, 最后统一集成测试)
> 关联文档:[ai-work-orchestr ation.md](../ai-work-orchestr ation.md)、[coord.md](./coord.md)、[matrix.md](./matrix.md)、[president-final-rulings.md](../president-final-rulings .md)
> 关联文档:[ai-alloc ation.md](../ai-alloc ation.md) v2.0 、[coord.md](./coord.md)、[matrix.md](./matrix.md)、[issues/README.md](./README .md)
---
## §1 16 AI 总时间线(甘特图)
## §1 全并行总览
15 AI 同时启动,各自完成自己模块从 P2 到 P6 的所有代码。开发期间用 mock( 见 [matrix.md §7 ](./matrix.md#§7-全并行开发-mock-策略汇总 )),所有模块就绪后统一集成测试。
```
各 AI 独立开发(全并行) coord 协调
│ │
读 contract.md 维护 proto 契约
写 workline.md 仲裁异议( objections/)
用 mock 开发 汇总就绪信号( matrix.md §8)
│ │
▼ ▼
交付:完整代码 + 就绪信号 交付:契约 + 仲裁 + 总矩阵
│ │
└────────► 统一集成测试 ◄──────┘
(release/integration)
```
---
## §2 15 AI 总甘特图
``` mermaid
gantt
title Edu 项目 16 AI 功能时间线(总裁裁决 §6.1 最终版)
title Edu 项目 15 AI 全并行时间线
dateFormat YYYY-MM-DD
axisFormat %m-%d
section 批次0 coord前置 3-5天
coord 0.1-0.14 proto+工具包 :crit, b0 , 2026-07-09, 4 d
ai13 0.15 packages骨架 :b0a , 2026-07-09, 3 d
section 网关层
ai01 api-gateway :a01 , 2026-07-10, 10 d
ai02 push-gateway :a02 , 2026-07-10, 12 d
section 批次1 P2 7-10天
ai01 Gateway路由+shared-go :b1a, after b 0, 8 d
ai06 iam P2.1 gRPC+8RPC :crit, b1b, after b 0, 8 d
ai03 teacher-bff GraphQL Must :b1c, after b 0, 8 d
ai13 teacher-portal P2 MF Shell :b1d, after b0, 8d
section BFF 层
ai03 teacher-bff :a03, 2026-07-1 0, 12 d
ai04 student-bff :a04, 2026-07-1 0, 10 d
ai05 parent-bff :a05, 2026-07-1 0, 10 d
section 批次2 P3 7-10天
ai07 classes代码交接 :b2a, after b1b, 2 d
ai08 core-edu gRPC 50053 :crit, b2b, after b1b, 8 d
ai04 student-bff GraphQL :b2c, after b1c, 8 d
ai14 student-portal P3 :b2d, after b1d, 8 d
ai03 teacher-bff P3扩展 :b2e, after b1c, 5 d
section 业务服务
ai06 iam :crit, a06, 2026-07-10, 10 d
ai08 core-edu :crit, a08, 2026-07-10, 12 d
ai09 content :a09, 2026-07-10, 12 d
ai10 msg :a10, 2026-07-10, 10 d
ai11 data-ana :a11, 2026-07-10, 12 d
ai12 ai服务 :a12, 2026-07-10, 10d
section 批次3 P4 10-12天
ai09 content gRPC 50054+Question :crit, b3a, after b2b , 11 d
ai11 data-ana gRPC 50055 :b3b, after b2b , 11 d
ai0 5 parent-bff GraphQL :b3c, after b2c , 11 d
ai15 parent-portal P4 :b3d, after b2d , 11 d
section 前端
ai13 teacher-portal :crit, a13, 2026-07-10 , 12 d
ai14 student-portal :a14, 2026-07-10 , 10 d
ai1 5 parent-portal :a15, 2026-07-10 , 10 d
ai16 admin-portal :a16, 2026-07-10 , 12 d
section 批次4 P5 12-15天
ai10 msg gRPC 50056 :crit, b4a , after b3a, 13 d
ai02 push-gateway HTTP :b4b, after b3a, 13d
ai12 ai服务 gRPC 50058 :b4c, after b3a, 13d
ai03 teacher-bff P5扩展 :b4d, after b3a, 8d
section 批次5 P6 10-12天
ai16 admin-portal MVP :crit, b5a, after b4a, 11d
iam P2.2补全 :b5b, after b4a, 11d
持续优化 /readyz硬化 :b5c, after b4a, 11d
section 集成
统一集成测试 :crit, integ , after a06, 7 d
```
**关键路径 ** (红色 crit) : 批次0 → iam P2.1 → core-edu → content → msg → admin-portal
**总时间线 ** : 49-64 天(约 10-13 周)
**关键路径 ** (红色 crit) : iam + core-edu + teacher-portal → 统一集成测试
**总时间线 ** : 12-15 天(各 AI 并行)+ 7 天集成测试 = **约 19-22 天 **
---
## §2 批次概览
## §3 各 AI 工作清单(汇总)
| 批次 | 阶段 | 时间 | 参与AI | 完成信号 |
| ---- | ---------- | -------- | ------------------------------------ | ------------------ |
| 0 | coord 前置 | 3-5 天 | coord + ai13 | ✅ 2026-07-09 完成 |
| 1 | P2 | 7-10 天 | ai01 + ai06 + ai03 ⟷ ai13 | ⏳ 进行中 |
| 2 | P3 | 7-10 天 | ai07 + ai08 + ai04 ⟷ ai14 + ai03扩展 | ⏳ |
| 3 | P4 | 10-12 天 | ai09 + ai11 + ai05 ⟷ ai15 | ⏳ |
| 4 | P5 | 12-15 天 | ai10 ⟷ ai02 + ai12 + ai03扩展 | ⏳ |
| 5 | P6 | 10-12 天 | ai16 + 持续优化 | ⏳ |
> 详细排期见各模块 `worklines/[模块名]_workline.md`
### 3.1 网关层
| AI | 模块 | 全阶段目标 | workline |
| ---- | ------------ | ----------------------------------------------------------- | ------------------------------------------------ |
| ai01 | api-gateway | 路由 + JWT RS256 验签 + 限流 + 熔断 + CORS + shared-go 接入 | [workline ](./worklines/api-gateway_workline.md ) |
| ai02 | push-gateway | HTTP /internal/* + WebSocket/SSE + 多设备会话 + 审计表 | [workline ](./worklines/push-gateway_workline.md ) |
### 3.2 BFF 层
| AI | 模块 | 全阶段目标 | workline |
| ---- | ----------- | ---------------------------------------------------------- | ----------------------------------------------- |
| ai03 | teacher-bff | GraphQL schema + DataLoader + ActionState + admin 命名空间 | [workline ](./worklines/teacher-bff_workline.md ) |
| ai04 | student-bff | GraphQL schema + Dashboard + 考试作答 + 作业提交 | [workline ](./worklines/student-bff_workline.md ) |
| ai05 | parent-bff | GraphQL schema + Dashboard + 多子女切换 + 成绩趋势 | [workline ](./worklines/parent-bff_workline.md ) |
### 3.3 业务服务
| AI | 模块 | 全阶段目标 | workline |
| ---- | -------- | ----------------------------------------------------------------------------- | -------------------------------------------- |
| ai06 | iam | gRPC 50052 + 12 RPC + RBAC + DataScope + JWT + 审计日志 + Outbox | [workline ](./worklines/iam_workline.md ) |
| ai08 | core-edu | gRPC 50053 + 5 Service 22 RPC + Outbox + 考试/作业/成绩状态机(含原 classes) | [workline ](./worklines/core-edu_workline.md ) |
| ai09 | content | gRPC 50054 + 4 Service 18 RPC + Neo4j + ES + Outbox | [workline ](./worklines/content_workline.md ) |
| ai10 | msg | gRPC 50056 + 3 Service 13 RPC + Outbox + 多渠道通知 | [workline ](./worklines/msg_workline.md ) |
| ai11 | data-ana | gRPC 50055 + 12 RPC + ClickHouse + CDC 消费 | [workline ](./worklines/data-ana_workline.md ) |
| ai12 | ai | gRPC 50057 + 6 RPC + ES 检索 + LLM 网关 + 流式响应 | [workline ](./worklines/ai_workline.md ) |
### 3.4 前端
| AI | 模块 | 全阶段目标 | workline |
| ---- | -------------- | ------------------------------------------------- | -------------------------------------------------- |
| ai13 | teacher-portal | MF Shell + GraphQL client + AppShell + 共享组件库 | [workline ](./worklines/teacher-portal_workline.md ) |
| ai14 | student-portal | MF Remote + 考试作答 + 作业提交 | [workline ](./worklines/student-portal_workline.md ) |
| ai15 | parent-portal | MF Remote + Dashboard + 多子女切换 | [workline ](./worklines/parent-portal_workline.md ) |
| ai16 | admin-portal | MF Remote + 用户管理 + 角色权限 + 审计日志 | [workline ](./worklines/admin-portal_workline.md ) |
### 3.5 coord
| 职责 | 内容 |
| ---------- | ------------------------------------------------------------ |
| proto 契约 | 统一管理 packages/shared-proto/ |
| 仲裁 | 审阅 objections/ → 写入 coord.md |
| 总矩阵 | 维护 matrix.md + 就绪信号跟踪 |
| 共享包 | shared-proto / shared-ts / shared-go / shared-py / ui-tokens |
| 集成 | 合并各模块到 release/integration → 集成测试 → 合并到 main |
---
## §3 批次 1( P2) 详细排期
## §4 就绪信号跟踪
### 3.1 总甘特图
> 各 AI 完成模块后,在 [matrix.md §8](./matrix.md#§8-就绪信号跟踪表) 更新状态
``` mermaid
gantt
title 批次 1( P2) 详细排期
dateFormat YYYY-MM-DD
axisFormat %m-%d
section ai01 api-gateway
1.1 路由表+双入口+shared-go接入 :a1a, 2026-07-10, 3d
1.2 JWT校验+JWKS fetcher :a1b, after a1a, 3d
1.3 限流+熔断+CORS :a1c, after a1b, 2d
section ai06 iam P2.1
6.1 gRPC server 50052启用 :crit, a6a, 2026-07-10, 2d
6.2 8 RPC实现(Register-GetChildrenByParent) :crit, a6b, after a6a, 4d
6.3 /readyz深度(5依赖检查) :a6c, after a6b, 1d
6.4 iam_student_guardians表+DataScope :a6d, after a6b, 1d
section ai03 teacher-bff
3.1 GraphQL schema第一版(ARB-001) :crit, a3a, 2026-07-10, 2d
3.2 Yoga endpoint+5 Query Resolver :crit, a3b, after a3a, 3d
3.3 DataLoader+N+1防御 :a3c, after a3b, 1d
3.4 ActionState信封+降级模式B :a3d, after a3b, 1d
3.5 /readyz探针列表 :a3e, after a3d, 1d
section ai13 teacher-portal
13.1 MF Shell配置(exposes+shared) :crit, a13a, 2026-07-10, 2d
13.2 GraphQLProvider+urql client单例 :crit, a13b, after a13a, 2d
13.3 AppShell改造(REST→GraphQL) :a13c, after a13b, 2d
13.4 登录页+Dashboard页+班级列表页 :a13d, after a13c, 2d
```
### 3.2 依赖关系
```
ai06.6.1 gRPC 启用 ──┬──> ai03.3.2 GraphQL Resolver( 调用 iam gRPC)
└──> ai01.1.2 JWT 校验(调用 iam GetPublicKey)
ai03.3.1 schema 第一版 ──> ai13.13.2 GraphQLProvider( 消费 schema)
ai03.3.2 Resolver ────────> ai13.13.3 AppShell 改造( viewports query)
ai01.1.1 路由表 ──> ai03.3.2 endpoint 对外可访问
└──> ai13.13.4 页面可访问
```
### 3.3 完成信号
批次 1 完成的 5 个标志:
1. ai06: iam gRPC 50052 启用 + 12 RPC 全部实现 + /readyz 返回 5 项依赖状态
2. ai01: api-gateway 路由 `/api/v1/teacher/*` → teacher-bff:3003 + JWKS 验签 + 限流
3. ai03: teacher-bff `POST /graphql` 可用 + 5 Query Resolver + DataLoader + ActionState
4. ai13: teacher-portal MF Shell 配置就绪 + 登录/Dashboard/班级列表页可用
5. 端到端:教师登录 → 看到 Dashboard( 含班级列表 + 视口导航)
| 模块 | AI | 就绪信号 | 状态 |
| -------------- | ---- | ------------------------------------------- | ---- |
| iam | ai06 | gRPC 50052 + 12 RPC + HealthService SERVING | ⏳ |
| api-gateway | ai01 | :8080 可访问 + JWT 验签 | ⏳ |
| teacher-bff | ai03 | POST /graphql + 5 Query | ⏳ |
| teacher-portal | ai13 | :4000 可访问 + 登录→Dashboard | ⏳ |
| core-edu | ai08 | gRPC 50053 + 22 RPC + HealthService SERVING | ⏳ |
| content | ai09 | gRPC 50054 + 18 RPC + HealthService SERVING | ⏳ |
| msg | ai10 | gRPC 50056 + 13 RPC + HealthService SERVING | ⏳ |
| data-ana | ai11 | gRPC 50055 + 12 RPC + HealthService SERVING | ⏳ |
| ai | ai12 | gRPC 50057 + 6 RPC + HealthService SERVING | ⏳ |
| student-bff | ai04 | POST /graphql + Dashboard Query | ⏳ |
| parent-bff | ai05 | POST /graphql + Dashboard Query | ⏳ |
| push-gateway | ai02 | :8081 可访问 + /internal/push | ⏳ |
| student-portal | ai14 | :4001 可访问 + MF Remote | ⏳ |
| parent-portal | ai15 | :4002 可访问 + MF Remote | ⏳ |
| admin-portal | ai16 | :4003 可访问 + MF Remote + admin | ⏳ |
---
## §4 各 AI 工作清单(汇总)
## §5 统一集成测试
> 详细排期见各模块 `_workline.md` 文件
> 所有模块就绪后,按 [matrix.md §9](./matrix.md#§9-统一集成测试检查清单) 检查清单进行
### 4 .1 ai01( api-gateway)
### 5 .1 集成测试流程
- P2: 路由表 + JWT RS256 验签( JWKS) + 限流 + 熔断 + CORS + shared-go 接入
- 详见:[api-gateway_workline.md ](./api-gateway_workline.md )
1. 各 AI 在自己分支完成开发 + mock 测试
2. 通知 coord 模块就绪
3. coord 将各分支合并到 `release/integration`
4. coord 运行集成测试检查清单( 5 大链路)
5. 集成测试通过后, coord 合并到 `main`
### 4 .2 ai02( push-gateway)
### 5 .2 集成测试 5 大链路
- P5: HTTP /internal/* + Kafka 双通道 + 多设备会话隔离 + 审计表
- 详见:[push-gateway_workline.md ](./push-gateway_workline.md )
### 4.3 ai03( teacher-bff)
- P2: GraphQL schema 第一版 + 5 Query Resolver + DataLoader + ActionState
- P3 扩展: exams/homework/grades Query + Mutation
- P5 扩展: notifications Query + SSE
- 详见:[teacher-bff_workline.md ](./teacher-bff_workline.md )
### 4.4 ai04( student-bff)
- P3: GraphQL schema + Dashboard + 考试作答 + 作业提交
- 详见:[student-bff_workline.md ](./student-bff_workline.md )
### 4.5 ai05( parent-bff)
- P4: GraphQL schema + Dashboard + 多子女切换 + 成绩趋势
- 详见:[parent-bff_workline.md ](./parent-bff_workline.md )
### 4.6 ai06( iam)
- P2.1: gRPC 50052 + 12 RPC + /readyz 深度 + iam_student_guardians + DataScope
- P2.2: P3-P6 期间持续补充
- 详见:[iam_workline.md ](./iam_workline.md )
### 4.7 ai07( classes → core-edu 交接)
- P3: classes 代码交接 + core-edu 服务骨架
- 详见:[core-edu_workline.md ](./core-edu_workline.md )
### 4.8 ai08( core-edu)
- P3: gRPC 50053 + exams/homework/grades/attendance/class 全部 RPC + Outbox
- 详见:[core-edu_workline.md ](./core-edu_workline.md )
### 4.9 ai09( content)
- P4: gRPC 50054 + textbook/chapter/knowledge-graph/question 4 service + Neo4j + ES
- 详见:[content_workline.md ](./content_workline.md )
### 4.10 ai10( msg)
- P5: gRPC 50056 + notification/preference/template 3 service + Outbox
- 详见:[msg_workline.md ](./msg_workline.md )
### 4.11 ai11( data-ana)
- P4: gRPC 50055 + 4 Dashboard + Warning + Mastery + ClickHouse + CDC 消费
- 详见:[data-ana_workline.md ](./data-ana_workline.md )
### 4.12 ai12( ai 服务)
- P5: gRPC 50058 + Chat/GenerateQuestion/OptimizeExpression/LessonPlan + ES 检索
- 详见:[ai_workline.md ](./ai_workline.md )
### 4.13 ai13( teacher-portal)
- P2: MF Shell + AppShell + GraphQL client + 登录/Dashboard/班级列表
- P3: 考试/作业/成绩页面 + MF Remote 就绪
- 详见:[teacher-portal_workline.md ](./teacher-portal_workline.md )
### 4.14 ai14( student-portal)
- P3: MF Remote + 考试作答 + 作业提交
- 详见:[student-portal_workline.md ](./student-portal_workline.md )
### 4.15 ai15( parent-portal)
- P4: MF Remote + Dashboard + 多子女切换
- 详见:[parent-portal_workline.md ](./parent-portal_workline.md )
### 4.16 ai16( admin-portal)
- P6: MVP + 用户管理 + 角色权限 + 审计日志
- 详见:[admin-portal_workline.md ](./admin-portal_workline.md )
| 链路 | 测试内容 |
| ------------ | -------------------------------------------------------------- |
| 认证链路 | 前端登录 → gateway → iam → JWT 签发 → 验签 → x-user-id 注入 |
| GraphQL 链路 | 前端 → BFF GraphQL → 业务服务 gRPC 并行聚合 → ActionState 信封 |
| 事件链路 | core-edu 发布事件 → Kafka → msg 消费 → push-gateway 推送 |
| MF 链路 | teacher-portal Shell 加载 Remote + GraphQL client 单例共享 |
| 推送链路 | msg → push-gateway /internal/push → WebSocket 推送前端 |
---
## §5 工作流说明
## §6 历史参考
### 5.1 各 AI 写入 `_workline.md`
以下文档为**批次模式时期**( 2026-07-09) 的历史产物, 保留作为追溯凭证:
各 AI 在自己模块的 `[模块名]_workline.md` 中写入甘特图排期,格式:
- [president-final-rulings.md ](../president-final-rulings.md ) — 总裁最终裁决( 70+ 问题逐个裁决 + 6 批次时间线)
- [coord-final-decisions.md ](../coord-final-decisions.md ) — coord 强制裁决( 80+ 项)
- [coord-cross-review.md ](../coord-cross-review.md ) — coord 交叉审查报告
- [ai-work-orchestration.md ](../ai-work-orchestration.md ) — 6 批次并行规划
````markdown
# [模块名] 工作排期
**当前权威文档 ** :
## §1 总览
[模块职责简述]
## §2 甘特图
` ``mermaid
gantt
title [模块名] 工作排期
dateFormat YYYY-MM-DD
...
` ``
` ```
## §3 详细任务
### [阶段] [任务编号]: [任务名]
- 负责人: aiXX
- 依赖:[前置任务]
- 交付物:[具体文件/功能]
- 验收标准:[验收点]
` ``
### 5.2 coord 汇总
coord 审阅各 ` _workline.md` 后, 在本文件( workline.md) 汇总:
- §1 总时间线( 16 AI 甘特图)
- §2 批次概览
- §3 当前批次详细排期
- §4 各 AI 工作清单(链接到各 ` _workline.md`)
### 5.3 更新时机
- 批次启动前: coord 写入 §3 当前批次详细排期
- 批次进行中:各 AI 更新自己的 ` _workline.md`(标记完成进度)
- 批次完成后: coord 更新 §2 完成信号 + §1 总进度
` ``
- [ai-allocation.md ](../ai-allocation.md ) v2.0 — 15 AI 分配方案 + 全并行模式
- [issues/README.md ](./README.md ) — AI 协作文档使用指南
- [issues/matrix.md ](./matrix.md ) — 上下游对接总矩阵