| name | devops-project-inspection |
| description | This skill should be used when the user asks to "inspect project", "health check", "project patrol", "check project health", "项目巡检", "健康检查", "项目体检", "日常巡检", "迭代前检查", "迭代后检查", "定期检查", "全面检查", or discusses systematic project health inspection (系统化项目健康巡检). |
| version | 1.0.0 |
云效项目巡检(多 Agent 并行版)
对云效项目做健康巡检,采用多 Agent 并行架构,4 个维度同时执行。
架构概览
用户请求 → Skill 识别巡检类型 → 并行启动维度 Agent → 汇总报告
├─ workitem-health-inspector (工作项健康)
├─ sprint-health-inspector (迭代健康)
├─ pipeline-health-inspector (流水线健康)
└─ code-health-inspector (代码健康)
可用 Sub-Agent(4 个维度 Agent + 1 个协调器)
协调器: devops-project-inspector
用于: 编排维度 Agent,汇总生成最终巡检报告
1. devops-workitem-health-inspector
维度: 工作项健康
检查项: 逾期工作项、阻塞工作项、未分配工作项、状态分布、类型分布
2. devops-sprint-health-inspector
维度: 迭代健康
检查项: 迭代进度、燃尽趋势、完成速率、剩余工作量、范围变更
3. devops-pipeline-health-inspector
维度: 流水线健康
检查项: 最近失败、成功率、运行时长、活跃流水线、重复失败
4. devops-code-health-inspector
维度: 代码健康
检查项: 待审查 MR、长期未合并 MR、过期分支、审查效率、仓库活跃度
决策树
用户请求:
├─ "项目巡检" / "健康检查" / "项目体检"
│ └─ 启动 devops-project-inspector(scope: "full")→ 并行 4 个维度
│
├─ "快速检查" / "简单看看项目状态"
│ └─ 启动 devops-project-inspector(scope: "quick")→ 工作项 + 迭代
│
├─ "工作项巡检" / "检查工作项健康"
│ └─ 启动 devops-project-inspector(scope: "workitems")→ 工作项维度
│
├─ "迭代巡检" / "Sprint 健康检查"
│ └─ 启动 devops-project-inspector(scope: "sprints")→ 迭代维度
│
├─ "流水线巡检" / "CI/CD 健康检查"
│ └─ 启动 devops-project-inspector(scope: "pipelines")→ 流水线维度
│
├─ "代码巡检" / "代码健康检查"
│ └─ 启动 devops-project-inspector(scope: "code")→ 代码维度
│
├─ "巡检所有项目"
│ └─ 获取项目列表 → 为每个项目并行启动 devops-project-inspector
│
├─ "迭代前检查"
│ └─ 启动 devops-project-inspector(scope: "full",记录基线)
│
└─ "迭代后检查"
└─ 启动 devops-project-inspector(scope: "full",与基线对比)
并行执行模式
模式 1: 单项目完整巡检(4 Agent 并行)
用户: "对 my-project 做一次完整巡检"
→ 步骤 1: 确定项目 ID
→ 步骤 2: 启动 devops-project-inspector 协调器
→ 步骤 3: 协调器并行启动 4 个维度 Agent
Agent 1: devops-workitem-health-inspector
Agent 2: devops-sprint-health-inspector
Agent 3: devops-pipeline-health-inspector
Agent 4: devops-code-health-inspector
→ 步骤 4: 汇总 4 个维度报告,计算整体评分
模式 2: 多项目并行巡检(N × 4 Agent)
用户: "巡检所有项目"
→ 步骤 1: search_projects 获取所有项目
→ 步骤 2: 为每个项目并行启动 devops-project-inspector
项目 1: 4 个维度 Agent 并行
项目 2: 4 个维度 Agent 并行
(共 N×4 个 Agent 并行运行)
→ 步骤 3: 生成多项目巡检总览
模式 3: 快速巡检(2 Agent 并行)
用户: "快速检查一下项目状态"
→ 启动 devops-project-inspector(scope: "quick")
→ 并行启动 2 个维度 Agent:
Agent 1: devops-workitem-health-inspector
Agent 2: devops-sprint-health-inspector
巡检范围 → Agent 映射速查表
| 范围 | Agent 数量 | 维度 Agent |
|---|
| full | 4 | workitem-health + sprint-health + pipeline-health + code-health |
| quick | 2 | workitem-health + sprint-health |
| workitems | 1 | workitem-health |
| sprints | 1 | sprint-health |
| pipelines | 1 | pipeline-health |
| code | 1 | code-health |
巡检最佳实践
- 日常巡检:每天执行 quick 巡检(2 Agent),关注工作项和迭代
- 周巡检:每周执行 full 巡检(4 Agent),覆盖所有维度
- 迭代巡检:迭代开始和结束时做 full 巡检,对比差异
- 事件驱动:流水线大量失败后执行 pipelines 专项巡检
错误处理
- 维度 Agent 失败: 在报告中标注该维度为"巡检失败",不影响其他维度评分
- 项目不存在: 提示用户检查项目名称或 ID
- 权限不足: 尽可能巡检可访问资源,注明权限限制
- 数据不完整: 基于可用数据生成报告,标注缺失项
与其他技能的关系
| 巡检发现问题 | 后续行动 | 使用技能 |
|---|
| 逾期工作项 | 更新状态、重新排期 | project-management |
| 迭代延期风险 | 调整迭代范围 | project-management |
| 流水线失败 | 查看日志、修复 | pipeline-management |
| 待审查 MR | 审查代码 | code-management |
| 过期分支 | 清理分支 | code-management |