Files

41 lines
1.9 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 架构设计摘要
> 摘自 PRD 第 5 章(prd_final.md),为归档速查版;完整论证见 01_input/prd_final.md。
## 总体方案
最大复用现有 zt_* 功能,缺口分三类补齐:
1. **数值指标加列**:zt_story_expand.ai_participation_rate(一期唯一 DDL);任务级 AI 工时直接入 zt_task.estimate(zt_task_extend 已砍,CHG-019)
2. **AI 文档走 MD 文件流**(CHG-014 用户拍板):审查报告/工作日志/测试报告/纪要 = MD 附件,不建结构化表
3. **绩效统计接入**:IZtCountService 消费 zt_story_expand 指标(三期)
## 核心机制
| 机制 | 决策 | 依据 |
|---|---|---|
| 扩展表模式(数值) | ✅ 采用 | zt_story_expand 先例;不碰老表 |
| MD 文件流(文档) | ✅ 采用(CHG-014) | 不建表、人可直接阅读;弱结构化用 MD 头部约定补偿 |
| zt_task 直接加列 | ❌ 放弃 | 污染禅道老表 |
| 验收指标结构化新表 | ❌ 放弃 | 富文本够用,过度设计 |
## 三通道上传架构
| 通道 | 接口 | 模式 | 鉴权(CHG-061) |
|---|---|---|---|
| 数值指标 | /zt-story-expand saveOrUpdate | 幂等(业务键有则更新) | 限 ai 账户 |
| 任务批量 | /zt-task aiBatchAdd | 双通道(AI 框架 + 人工保留) | 限 ai 账户 |
| MD 文档 | /common/upload + uploadBind | 文件+绑定两步 | 需登录 |
## ID 流转约定(5.6)
1. storyId:zentao 建单分配 → 回填 PRD「关联需求ID」→ 上传以此为键
2. taskId:aiBatchAdd 响应返回,框架记录
3. MD 关联:zt_file.objectID=storyId,objectType 区分类型
4. 共享载体 = PRD 文档(非个人工作区);ai 账户与使用者解耦
## 关键卡点
- code_review_status(pass/reject)未 pass → 禁提测试报告(CHG-023)
- FileTypes 扩展:aiCodeReview / aiWorkLog / testCase / testReport / testReportSubmit / testOther