Files
TJWaterAgent/.opencode/skills/workflow/SKILL.md
T

71 lines
2.4 KiB
Markdown
Raw 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.
---
name: tjwater-workflow
description: 分析类工作流技能。所有工作流遵循 "CLI 获取 → 本地分析 → 报告输出" 模式。
version: 3.0.0
---
# Workflow Domain Skill
## 简介
负责分析场景下的工作流组织与调用入口。前端工具仅用于渲染。
## 使用策略
1. **优先匹配固定工作流** — 用户问题属于已有覆盖场景时,直接走 workflow
2. **按需升级** — 浅层工作流满足不了时,沿升级路径进入深层工作流
3. **缺少 workflow 时** — Agent 自行组合 CLI 命令 + Python 脚本
---
## 工作流决策树
```
用户请求
├─ 含"服务范围/供水分区/水源范围/分区渲染"?
│ └─ 是 → 走 source-service-area-analysis
├─ 含"改管径/瓶颈/扩容"
│ └─ 是 → 直接走 bottleneck-analysis
└─ 否 → 走 simulation-diagnosis(快速诊断)
├─ 全局异常?(断流/未收敛/系统性低压)
│ └─ 直接输出针对性诊断,结束
├─ 少量告警、无紧急项?
│ └─ 输出报告,结束
└─ ≥5 条紧急超速 或 存在多维度交叉异常?
└─ 输出快速诊断报告 + 建议升级 bottleneck-analysis
+ 传递 TOP 问题管段 ID 列表
```
---
## 工作流清单
| 工作流 | 数据需求 | 典型步骤 |
|--------|---------|---------|
| **simulation-diagnosis** | `simulation run` + `data timeseries realtime links/nodes` | 1-2 次 CLI + 诊断脚本 |
| **bottleneck-analysis** | 模拟结果 + `network get-link-properties` 逐管道查询 | 多次 CLI + 合并分析脚本 |
| **source-service-area-analysis** | 模拟结果 + 管道拓扑 + 水库列表 | 多次 CLI + 图遍历脚本 |
---
## 衔接规则
`simulation-diagnosis``bottleneck-analysis` 升级条件:
| 信号 | 阈值 |
|------|------|
| 紧急超速管段数 | ≥ 5 条流速 > 1.5 m/s |
| 多维度交叉异常 | 同一管段同时满足高速 + 高水损 + 大流量 |
| 高水损地理聚集 | TOP 水损管段集中在同一区域 |
## 子模块索引
- **source-service-area-analysis**: `./source-service-area-analysis/SKILL.md`
- **simulation-diagnosis**: `./simulation-diagnosis/SKILL.md`
- **bottleneck-analysis**: `./bottleneck-analysis/SKILL.md`