feat: 需求池重构 + 联动引擎 + 开发状态推导

架构:新建 lib/linkage-engine.ts 联动引擎
- deriveReqDevStatus(): 从 devTasks 推导需求开发状态
- canEditRequirement(): 开发中的需求不可编辑
- checkVersionChangeRisk(): 版本变更风险检查
- 所有跨模块推导逻辑集中在此文件

功能改动:
1. 导航改名"需求"→"需求池"
2. 新建需求:所属产品/项目必填,移除产品负责人字段
3. 需求表格新增"开发状态"列:
   未排期/待开发/开发中/已完成(从 devTasks 实时推导)
4. 开发中的需求:编辑按钮禁用
5. 需求设 versionId → 版本详情关联需求天然兼容
   (版本详情通过 filter(r.versionId === versionId) 读取)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Script Generator
2026-06-15 15:09:02 +08:00
parent b30c460571
commit 43d3f76e6a
5 changed files with 76 additions and 28 deletions

View File

@@ -11,7 +11,7 @@ const NAV_GROUPS = [
{ label: '产品', path: '/products', icon: Package },
{ label: '项目', path: '/projects', icon: FolderKanban },
{ label: '版本', path: '/versions', icon: Tag },
{ label: '需求', path: '/requirements', icon: Lightbulb },
{ label: '需求', path: '/requirements', icon: Lightbulb },
{ label: '加班记录', path: '/overtime', icon: Clock },
],
},