AGENT SKILL

用户故事复杂度分析

complexity-analysis

针对已知工作、风险和场景的用户故事进行复杂度分析。当您需要估算工作量、故事点、规模或分析用户故事复杂度时使用。不要用于冲刺估算(使用 devsquad.sprint)或产物质量校验(使用 quality-gate)。

适用职业产品经理
License 许可
MIT
最近更新
2026-11-14
Stars
★ 50
Forks
12

01 前言 Front Matter

name
complexity-analysis
description
Complexity analysis for user stories with known work, risks, and scenarios. Use when you need to estimate effort, points, size, or analyze complexity of a user story. Do not use for sprint estimates (use devsquad.sprint) or for artifact quality validation (use quality-gate).

02 资源文件 10

03 SKILL.md 正文

Principle

Focus on the unknowns, not the knowns. Unknown work dominates software projects.

Evidence Rule

Every classification (known/unknown) must cite the evidence that supports it. Reference code, ADR, spec, or absence thereof. If uncertain, say so and indicate what information would resolve the uncertainty.

Analysis Structure

1. Known Work

Tasks whose effort can be estimated with confidence:

  • We have done something similar in this project
  • Established pattern in ADR or existing code
  • Well-defined scope in the spec
  • Existing test coverage in the affected area
  • Localized change (few impacted dependencies)

For each item, indicate why it is known (e.g., "CRUD endpoint, same pattern as src/api/users").

2. Unknown Work (Risks)

Signals of uncertainty:

  • First time (new technology, integration, or pattern)
  • External dependency (third-party API, another team's service)
  • Vague requirement ("must be fast", "easy to use")
  • Pending decision (no ADR exists for technical choice)
  • Legacy code (area without tests or documentation)
  • Concurrency/scale (behavior under load not tested)
  • Cross-team coordination without agreed interface

For each risk, indicate: what the risk is, why it is a risk, and impact if it materializes.

3. Dependencies

Dependency Owner (team/service) Status Impact if delayed

Flag tentative dependencies, without commitment, or without agreed timeline.

4. Open Questions

Before proposing scenarios, list decisions or information that need a human response:

  • Decisions needed before starting
  • Pending requirement clarifications
  • Access or approvals not granted

5. Scenarios (2-3 approaches)

Scenario Approach If it goes well If risks materialize Trade-offs

6. Recommendation

Indicate the recommended scenario with explicit justification ("recommended because..."), linking to evidence and identified risks.

For high risks, suggest a spike or timebox to reduce uncertainty before committing.

Risk Classification

Risk Criteria Implication
High 2+ unknown risks, critical external dependency, or missing ADR Mandatory supervision, consider spike
Medium 1 manageable risk, or complex logic Validation checkpoints
Low Only known work, established pattern Candidate for autonomous execution

Format for Work Items

In the User Story body (GitHub/Azure DevOps):

## Complexity Analysis

**Risk:** [High/Medium/Low]

### Known Work
- Item 1 (estimate)
- Item 2 (estimate)

### Identified Risks
- Risk 1: [description and potential impact]
- Risk 2: [description and potential impact]

### Scenarios
| Scenario | Base effort | If risks materialize | Recommended? |
|----------|-------------|----------------------|--------------|
| A | X days | Y days | |
| B | X days | Y days | yes |

### Decision
[Chosen scenario and justification, or "Awaiting team decision"]

When to Revisit Analysis

The analysis should be updated when:

  • A risk materializes (document actual impact)
  • A new risk is discovered during implementation
  • The scenario decision is changed
  • A relevant ADR is created or modified

Anti-patterns

  • Do not give a number without justification (e.g., "3 story points")
  • Do not ignore risks to appear faster
  • Do not list only known work
  • Do not present a single scenario as "the solution"
  • Do not hide assumptions: always make them explicit
  • Do not claim confidence you do not have: declare the uncertainty

04 同仓库更多 Skills

microsoft
microsoft/devsquad-copilot

工作项实施流程

work-item-workflow

用于实施的工作项工作流。当开始在 GitHub issue 或 Azure DevOps 工作项上工作时使用,用于核实负责人、依赖关系、优先级和产能。不适用于创建新工作项(使用 work-item-creation)、建议下一个任务(使用 next-task),或工作来源仅为 tasks.md 而没有 issue/工作项的情况。

软件开发工程师工单与问题跟踪管理
★ 50
microsoft
microsoft/devsquad-copilot

工作项创建规范

work-item-creation

在 GitHub Issues 或 Azure DevOps 上创建工作项的规则与清单。当需要在看板上创建 issue、用户故事、任务、epic 或功能时使用。不适用于平台配置(使用 board-config)、管理现有任务的工作流(使用 work-item-workflow),或对工作项的评论。

软件开发工程师工单与问题跟踪管理
★ 50
microsoft
microsoft/devsquad-copilot

Issue与工单分诊

triage-workflow

用于分诊 issue 和工作项的基于标签的状态机。管理状态转换、生成持久的分诊工件,并支持可恢复的会话。用于分诊 GitHub issue 或 Azure DevOps 工作项。不用于从零开始创建新工作项(使用 work-item-creation),也不用于管理已分诊项的实现工作流(使用 work-item-workflow)。

项目经理工单与问题跟踪管理
★ 50
microsoft
microsoft/devsquad-copilot

行为聚焦测试规范

test-discipline

用于行为聚焦、抗重构测试的测试实践。在实现功能、修复缺陷、重构或添加/审查测试时使用,以确保测试通过公共接口验证意图,并避免同义反复的断言。也用于在修复缺陷后添加回归测试。实现 agent 在编码时参考此技能,审查 agent 在验证测试质量时参考。不用于测试策略决策(使用 complexity-analysis)、不用于失败分诊和根因分析(使用 debugging-recovery;根因定位后,可使用 test-discipline 添加复现问题的回归测试并修复),也不用于集成测试基础设施搭建。

测试工程师测试与质量保障
★ 50
microsoft
microsoft/devsquad-copilot

代码与架构安全审查

security-review

安全评估工作流,包含两种模式:架构(设计)模式和代码(实现)模式。当在规划阶段检测到安全触发条件(架构模式),或在实现/审查阶段(代码模式)时使用。涵盖 STRIDE、OWASP、依赖扫描、Azure 合规和 GitHub 安全告警。不用于一般代码质量检查(使用 devsquad.review),不用于作为独立活动的威胁建模,也不用于合规审计。

安全工程师安全检测工程
★ 50
microsoft
microsoft/devsquad-copilot

SDD 决策记录与交接

reasoning

在 SDD 智能体执行过程中记录决策及其依据,并通过交接信封(handoff envelope)在智能体之间传递结构化上下文。当智能体需要记录已做出的决策(推理日志 Reasoning Log)或向另一个智能体交接时使用。不要用于架构文档(使用 ADR)、复杂度分析(使用 complexity-analysis)或调试日志。

软件开发工程师会话上下文交接
★ 50