Agile Observer
Proactive agile metrics engine for Scrum Masters and Agile Coaches.
Analyzes Trello or Jira boards to compute flow metrics, detect problems, and generate health reports.
Workflow
- 1. Identify platform and credentials. Ask for Trello or Jira. Look for credential files in workspace secrets (
trello-credentials.json or jira-credentials.json). - List boards/projects. Fetch available boards and let the user choose, or use the one specified.
- Fetch board data. Pull lists/statuses, cards/issues, and movement history using the API patterns in references.
- Classify workflow states. Map list names or status categories to: backlog, doing, review, done.
- Compute metrics. Calculate cycle time, throughput, WIP, aging, and blockers.
- Generate health report. Assess overall health and add coaching suggestions.
Metrics to Compute
| Metric | Formula | Source |
|---|
| Cycle Time (median + P85) | Time from "doing" to "done" per item | Card/issue transition history |
| Throughput |
Items completed in period | Cards/issues moved to done |
| WIP | Items currently in doing/review | Current board state |
| Aging WIP | In-progress items with no activity for 5+ days | dateLastActivity or changelog |
| Blockers | Items with "blocked" label or blocker priority | Labels/flags |
| Sprint Burndown | Done points vs. committed points (Jira only) | Story points field |
List/Status Classification
Map names to workflow states using these patterns (case-insensitive):
- - Backlog: backlog, to do, todo, icebox, upcoming
- Doing: doing, in progress, working, development, dev, active
- Review: review, testing, qa, validation, code review
- Done: done, complete, finished, deployed, released, closed
For Jira, use statusCategory.key: new = backlog, indeterminate = doing, done = done.
Health Score Logic
- - 🟢 GOOD: No significant issues. Steady flow.
- 🟡 ATTENTION: WIP exceeds 10 items, OR items aging without activity, OR blockers present.
- 🔴 CONCERN: Cycle time median exceeds 7 days, OR multiple blockers, OR very low throughput.
Report Format
CODEBLOCK0
Coaching Suggestions
Include actionable advice based on findings:
- - High WIP: "Consider a WIP limit of [team size x 1.5]. What needs finishing before starting something new?"
- Slow cycle time: "Where do items spend the most time? Look at the flow between columns."
- Stale items: "This item hasn't moved in [X] days. Still a priority, or should we park it?"
- Blockers: "What would it take to unblock [item]? Who needs to be involved?"
- Good health: "Flow looks healthy. What's one thing to improve next sprint?"
Platform API Details
- - Trello endpoints and patterns: See INLINECODE6
- Jira endpoints and patterns: See INLINECODE7
- Detailed metric definitions: See INLINECODE8
Credential Formats
Trello
{"api_key": "...", "token": "..."}
Also accepts:
apiKey + INLINECODE10
Jira
CODEBLOCK2
Scheduling
For automated recurring reports, create a cron job:
- - Schedule: weekly Monday 9:00 AM
- Task: Run agile-observer for board [X], deliver report to primary channel
敏捷观察者
面向Scrum Master和敏捷教练的主动式敏捷度量引擎。
分析Trello或Jira看板,计算流程指标,检测问题,并生成健康报告。
工作流程
- 1. 识别平台和凭证。 询问使用Trello还是Jira。在工作区密钥中查找凭证文件(trello-credentials.json或jira-credentials.json)。
- 列出看板/项目。 获取可用看板,让用户选择,或使用指定的看板。
- 获取看板数据。 使用参考资料中的API模式,拉取列表/状态、卡片/事项以及移动历史记录。
- 分类工作流状态。 将列表名称或状态类别映射为:待办、进行中、评审、已完成。
- 计算指标。 计算周期时间、吞吐量、在制品、老化时间和阻塞项。
- 生成健康报告。 评估整体健康状况并添加辅导建议。
需计算的指标
| 指标 | 公式 | 数据来源 |
|---|
| 周期时间(中位数 + P85) | 每个事项从进行中到已完成的时间 | 卡片/事项的流转历史 |
| 吞吐量 |
周期内完成的事项数 | 移至已完成的卡片/事项 |
| 在制品 | 当前处于进行中/评审状态的事项数 | 当前看板状态 |
| 老化在制品 | 超过5天无活动的进行中事项 | dateLastActivity或变更日志 |
| 阻塞项 | 带有阻塞标签或阻塞优先级的事项 | 标签/标记 |
| 冲刺燃尽图 | 已完成点数 vs 承诺点数(仅限Jira) | 故事点字段 |
列表/状态分类
使用以下模式(不区分大小写)将名称映射到工作流状态:
- - 待办: backlog, to do, todo, icebox, upcoming
- 进行中: doing, in progress, working, development, dev, active
- 评审: review, testing, qa, validation, code review
- 已完成: done, complete, finished, deployed, released, closed
对于Jira,使用statusCategory.key:new = 待办,indeterminate = 进行中,done = 已完成。
健康评分逻辑
- - 🟢 良好: 无明显问题。流程稳定。
- 🟡 关注: 在制品超过10项,或事项老化无活动,或存在阻塞项。
- 🔴 警示: 周期时间中位数超过7天,或多个阻塞项,或吞吐量极低。
报告格式
📊 敏捷健康报告 — [看板/项目名称]
周期:最近 [N] 天
🔄 吞吐量:已完成 [X] 个事项
⏱ 周期时间:中位数 [X]天 | P85 [X]天(测量 [N] 个事项)
📋 在制品:进行中 [X] 个事项
📈 冲刺进度:[X]/[Y] 点([Z]%)— 仅限Jira
🚫 阻塞:[X] 个事项 — [名称]
🧓 陈旧:[事项](无活动 [X]天)
[🟢/🟡/🔴] 健康状况 — [摘要]
辅导建议
根据发现结果提供可操作的建议:
- - 在制品过高:考虑设置在制品限制为[团队规模 x 1.5]。在开始新事项前,需要完成哪些工作?
- 周期时间过长:事项在哪个环节耗时最多?查看各列之间的流转情况。
- 陈旧事项:此事项已有[X]天未移动。仍是优先事项,还是应该搁置?
- 阻塞项:解除[事项]的阻塞需要什么条件?需要哪些人参与?
- 健康状况良好:流程看起来健康。下一个冲刺有哪些可以改进的地方?
平台API详情
- - Trello端点和模式: 参见 references/trello-api.md
- Jira端点和模式: 参见 references/jira-api.md
- 详细指标定义: 参见 references/metrics.md
凭证格式
Trello
json
{api_key: ..., token: ...}
也接受:apiKey + apiToken
Jira
json
{instance: mycompany, email: user@example.com, api_token: ...}
定时任务
如需自动生成定期报告,创建cron任务:
- - 计划:每周一上午9:00
- 任务:对看板[X]运行敏捷观察者,将报告发送至主频道