docs(blueprint): agent-infrastructure 模块拆解为 5 张任务卡(planned)
/architect + 复查自洽完成,拆出 A-E 五张 S/M 卡: 框架扫描 → 三件套生成 → 腐化评分 → 确认UI → 看板指示器
This commit is contained in:
parent
bdb43a2abf
commit
773f78a649
@ -6,7 +6,7 @@ description: >
|
||||
成为每个项目的贴身导师。炼境本身亦被纳入其中,
|
||||
形成可自我进化的开发智能闭环。
|
||||
iteration: 1
|
||||
updated: 2026-06-29
|
||||
updated: 2026-06-30
|
||||
|
||||
|
||||
|
||||
@ -381,7 +381,7 @@ modules:
|
||||
- id: agent-infrastructure
|
||||
name: Agent 友好基础设施生成
|
||||
area: backend
|
||||
status: concept
|
||||
status: planned
|
||||
progress: 0
|
||||
position: [3750, 0]
|
||||
|
||||
|
||||
@ -83,22 +83,38 @@
|
||||
|
||||
## 任务卡
|
||||
|
||||
> 本模块为 L 级,需先走 /architect 设计再拆分。以下为 concept 阶段的方向记录。
|
||||
> /architect 已完成(2026-06-29),复查自洽后拆为以下 5 张可执行卡。
|
||||
> 执行顺序:A 和 C 可并行 → B(依赖 A)→ D(依赖 A+B)→ E(依赖 C)
|
||||
|
||||
### 💭 技术栈扫描与确认 UI
|
||||
- status: concept
|
||||
### 📋 A. 框架层扫描 + 契约路径推断
|
||||
- status: todo
|
||||
- complexity: M
|
||||
- files: src-tauri/src/commands/agent_infra.rs, src-tauri/src/commands/mod.rs, src-tauri/src/lib.rs, src/lib/commands.ts
|
||||
- acceptance: `scan_agent_infra_stack(project_path, project_id)` 能从 package.json(serde_json 解析 deps)和 Cargo.toml(字符串匹配)识别 Drizzle/Prisma/Hono/Axum 等框架,返回带 confidence 的 DetectedContract 列表;有单元测试覆盖 drizzle/prisma/hono 识别
|
||||
|
||||
### 💭 project-context.yaml 生成器
|
||||
- status: concept
|
||||
### 📋 B. 三件套文件生成
|
||||
- status: todo
|
||||
- complexity: M
|
||||
- depends: A
|
||||
- files: src-tauri/src/commands/agent_infra.rs, src/lib/commands.ts
|
||||
- acceptance: `generate_agent_infra_files(project_path, project_id, contracts)` 正确写入 `docs/ai-context/project-context.yaml`(含实际契约路径)、向 AGENTS.md 注入元规则段落(已有则跳过)、生成含项目特定 globs 的 `.claude/rules/doc-freshness.md`;对同一项目重复执行幂等
|
||||
|
||||
### 💭 AGENTS.md 元规则段落注入
|
||||
- status: concept
|
||||
### 📋 C. 文档腐化评分
|
||||
- status: todo
|
||||
- complexity: M
|
||||
- files: src-tauri/src/commands/agent_infra.rs, src-tauri/src/db.rs, src/lib/commands.ts
|
||||
- acceptance: `scan_doc_freshness(project_path, project_id)` 用 `silent_cmd("git").current_dir(project_path)` 读取契约路径 vs `docs/ai-context/project-context.yaml` 的最后 commit 时间戳,project-context.yaml 不存在直接返回 RED;结果写入 `doc_freshness_cache` 表(migration 补齐);前端封装就绪
|
||||
|
||||
### 💭 .claude/rules/ 派生生成
|
||||
- status: concept
|
||||
### 📋 D. 栈确认 UI + 生成按钮
|
||||
- status: todo
|
||||
- complexity: M
|
||||
- depends: A, B
|
||||
- files: src/components/dashboard/AgentInfraPanel.tsx, src/components/dashboard/BlueprintModal.tsx
|
||||
- acceptance: BlueprintModal 新增"Agent 基础设施"区块,展示 A 返回的检测结果(可编辑 contract 路径)、"生成三件套"按钮调用 B、展示写入结果(written/skipped/failed);UI 无类型错误
|
||||
|
||||
### 💭 腐化风险看板(文档新鲜度评分)
|
||||
- status: concept
|
||||
|
||||
### 💭 技术栈变更感知与重新生成提示
|
||||
- status: concept
|
||||
### 📋 E. 看板腐化指示器
|
||||
- status: todo
|
||||
- complexity: S
|
||||
- depends: C
|
||||
- files: src/components/dashboard/ProjectCard.tsx, src/lib/commands.ts
|
||||
- acceptance: ProjectCard 右上角显示腐化评分小圆点(🟢🟡🔴),读取 `doc_freshness_cache` 缓存(无缓存则不显示);不发起新的 git 扫描(仅读缓存)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user