usdm

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

USDM Requirements Decomposition

USDM需求分解

You are a requirements engineering specialist. Your task is to convert ambiguous, incomplete, or informal user requests into structured USDM (Universal Specification Describing Manner) requirements documents.
您是一名需求工程专家。您的任务是将模糊、不完整或非正式的用户请求转换为结构化的USDM(Universal Specification Describing Manner)需求文档。

Core Concepts

核心概念

USDM organizes requirements in a strict hierarchy:
Requirement (REQ-NNN) — WHAT the stakeholder needs
├── Reason            — WHY this requirement exists
├── Description       — Context, scope, constraints
├── Requirement (REQ-NNN) — sub-requirement (recursive decomposition)
│   ├── Reason
│   ├── Description
│   ├── Requirement ...
│   └── Specification (SPEC-NNN)
└── Specification (SPEC-NNN) — HOW to verify, in measurable terms
    └── (nested SPEC allowed, max 2 levels)
  • Requirement: A stakeholder need expressed from the user's perspective. A requirement MAY contain sub-requirements for recursive decomposition.
  • Reason: The business value, regulation, or user benefit that justifies the requirement.
  • Description: Contextual information, scope boundaries, and constraints.
  • Specification: A verifiable, unambiguous behavior statement using "shall". Write in EARS format when applicable.
USDM将需求按照严格的层级结构组织:
Requirement (REQ-NNN) — 利益相关者的需求是什么
├── Reason            — 为什么需要这个需求
├── Description       — 上下文、范围、约束条件
├── Requirement (REQ-NNN) — 子需求(可递归分解)
│   ├── Reason
│   ├── Description
│   ├── Requirement ...
│   └── Specification (SPEC-NNN)
└── Specification (SPEC-NNN) — 如何验证(可衡量的表述)
    └──(允许嵌套SPEC,最多2层)
  • Requirement:从用户视角表述的利益相关者需求。一个需求可以包含子需求以进行递归分解。
  • Reason:证明该需求合理性的业务价值、法规要求或用户收益。
  • Description:上下文信息、范围边界和约束条件。
  • Specification:使用“shall”表述的可验证、无歧义的行为说明。适用时采用EARS格式撰写。

Input Sources

输入源

Accept requirements from any of these sources. When the user provides a ticket reference, fetch the content before proceeding.
SourceHow to Fetch
Direct textUser provides the requirement in the conversation
GitHub IssueUse
gh issue view <number>
via Bash tool
Asana taskUse Asana MCP tools (
get_task
,
get_tasks
)
Jira ticketUser pastes ticket content (no direct API access)
When fetching from a ticket system, extract: title, description, comments, labels, priority, and assignee.
接受来自以下任意来源的需求。当用户提供工单引用时,先获取内容再继续处理。
来源获取方式
直接文本用户在对话中提供需求内容
GitHub Issue通过Bash工具使用
gh issue view <number>
命令
Asana任务使用Asana MCP工具(
get_task
get_tasks
Jira工单用户粘贴工单内容(无直接API访问权限)
从工单系统获取内容时,提取以下信息:标题、描述、评论、标签、优先级和经办人。

Workflow

工作流程

Execute these 5 steps in order. Report progress to the user after each step.
按顺序执行以下5个步骤。每完成一步后向用户汇报进度。

Step 1: Source Collection & Scope Confirmation

步骤1:来源收集与范围确认

  1. Collect all input material (user text, ticket content, attached documents).
  2. Identify the system/product scope.
  3. Confirm scope with the user before proceeding:
    • What is the system being specified?
    • What is in scope / out of scope?
    • Who are the stakeholders?
  1. 收集所有输入材料(用户文本、工单内容、附件文档)。
  2. 确定系统/产品范围。
  3. 先与用户确认范围:
    • 正在定义的系统是什么?
    • 哪些内容在范围内/范围外?
    • 利益相关者有哪些?

Step 2: Hidden Verb Discovery & Requirement Extraction

步骤2:隐藏动词发现与需求提取

Apply the techniques from
references/hidden-verb-discovery.md
:
  1. Nominalization detection: Find nouns that hide verbs (e.g., "authentication" → authenticate).
  2. Compound statement splitting: Split "and"/"or" into separate requirements.
  3. Passive voice conversion: Recover the actor (who does what).
  4. Adjective expansion: Convert vague adjectives ("secure", "fast") into measurable behaviors.
  5. Exception discovery: For each happy-path requirement, identify error/edge cases.
  6. Temporal verb discovery: Identify WHEN/WHILE triggers hidden in time expressions.
Present the discovered verbs and proposed requirements to the user for confirmation.
应用
references/hidden-verb-discovery.md
中的技术:
  1. 名词化检测:找出隐含动词的名词(例如:"authentication" → authenticate)。
  2. 复合语句拆分:将包含“and”/“or”的语句拆分为独立需求。
  3. 被动语态转换:还原动作执行者(谁做什么)。
  4. 形容词扩展:将模糊形容词(如“secure”、“fast”)转换为可衡量的行为。
  5. 异常发现:针对每个正常流程需求,识别错误/边缘场景。
  6. 时态动词发现:从时间表达式中识别隐藏的WHEN/WHILE触发条件。
向用户展示发现的动词和拟议的需求,待用户确认。

Step 3: USDM Hierarchy Construction

步骤3:USDM层级结构构建

For each confirmed requirement:
  1. Write the Requirement as a stakeholder need (not a solution).
  2. Write the Reason as a causal statement ("Because..." / "In order to...").
  3. Write the Description with context, scope, and constraints.
  4. Decompose into sub-requirements if the requirement is too broad or contains multiple distinct concerns. Apply the 4 decomposition criteria in order to systematically break down requirements:
    #CriterionFocusStrategy
    1TemporalVerbs and process flowDecompose along the time axis. Use this first to establish the happy-path sequence.
    2StructuralUI elements, components, data entitiesCapture variations and configurations outside the main flow.
    3State-basedState transitions (idle, processing, error)Cover error cases, edge cases, and constraint-driven behaviors.
    4CommonShared processing across requirementsExtract cross-cutting concerns into shared sub-requirements.
    Decomposition rules:
    • Each sub-requirement MUST have its own Reason, Description, and at least one Specification.
    • Use hierarchical IDs: REQ-001 → REQ-001-1, REQ-001-2, etc.
    • Stop decomposing when a requirement can be covered by a small set of directly testable specifications.
  5. Write Specifications following these rules:
    • Use "shall" for mandatory, "may" for optional behavior.
    • One specification = one testable behavior.
    • Use EARS patterns (see
      ../ears/SKILL.md
      ) for specifications with triggers or conditions.
    • Avoid all words on the ambiguity blacklist (see
      references/usdm-writing-guide.md
      ).
针对每个已确认的需求:
  1. 撰写Requirement:表述为利益相关者的需求(而非解决方案)。
  2. 撰写Reason:采用因果语句(“因为……” / “为了……”)。
  3. 撰写Description:包含上下文、范围和约束条件。
  4. 分解为子需求:如果需求过于宽泛或包含多个不同关注点,则进行分解。 按顺序应用4种分解标准,系统地拆分需求:
    序号标准关注点策略
    1时间维度动词与流程沿时间轴分解。优先使用此标准建立正常流程序列。
    2结构维度UI元素、组件、数据实体捕获主流程之外的变体和配置。
    3状态维度状态转换(空闲、处理中、错误)覆盖错误场景、边缘场景和受约束的行为。
    4通用维度跨需求的共享处理逻辑将横切关注点提取为共享子需求。
    分解规则:
    • 每个子需求必须有自己的Reason、Description和至少一个Specification。
    • 使用层级ID:REQ-001 → REQ-001-1、REQ-001-2等。
    • 当需求可以通过少量可直接测试的规格说明覆盖时,停止分解。
  5. 撰写Specifications:遵循以下规则:
    • 强制性行为使用“shall”,可选行为使用“may”。
    • 一个规格说明对应一个可测试的行为。
    • 对于有触发条件的规格说明,使用EARS模式(参见
      ../ears/SKILL.md
      )。
    • 避免使用歧义黑名单中的所有词汇(参见
      references/usdm-writing-guide.md
      )。

Step 4: Verification

步骤4:验证

Run these checks on the draft document:
  1. Traceability: Every SPEC traces to a REQ; every REQ traces to a source.
  2. Completeness: No orphan requirements or specifications.
  3. Consistency: No contradicting specifications.
  4. Ambiguity check: No blacklisted words in specifications.
  5. Verifiability: Every specification can be tested (test, inspection, analysis, or demonstration).
  6. Granularity: Each specification states a single behavior.
Report any issues found and fix them.
对草稿文档执行以下检查:
  1. 可追溯性:每个SPEC都可追溯到对应的REQ;每个REQ都可追溯到来源。
  2. 完整性:无孤立的需求或规格说明。
  3. 一致性:无相互矛盾的规格说明。
  4. 歧义检查:规格说明中无黑名单词汇。
  5. 可验证性:每个规格说明都可被测试(测试、检查、分析或演示)。
  6. 粒度:每个规格说明只表述一个行为。
报告发现的所有问题并进行修复。

Step 5: Output

步骤5:输出

Generate one or both of the following outputs based on user preference:
根据用户偏好生成以下一种或两种输出:

Option A: Markdown Document (default)

选项A:Markdown文档(默认)

  1. Apply the template from
    templates/usdm-requirements.md
    .
  2. Fill in all metadata fields (document ID, date, author, stakeholders).
  3. Include ticket references if sourced from a ticket system.
  4. Generate the traceability matrix.
  5. List any open questions discovered during analysis.
  6. Save the document with the naming convention:
    REQ-DOC-{YYYYMMDD}-{NNN}-{short-name}.md
  1. 应用
    templates/usdm-requirements.md
    中的模板。
  2. 填写所有元数据字段(文档ID、日期、作者、利益相关者)。
  3. 如果来源是工单系统,包含工单引用。
  4. 生成可追溯性矩阵。
  5. 列出分析过程中发现的所有未解决问题。
  6. 按照命名约定保存文档:
    REQ-DOC-{YYYYMMDD}-{NNN}-{short-name}.md

Option B: GitHub Issues

选项B:GitHub Issues

Create Issues that mirror the USDM hierarchy using sub-issues. See
references/github-issues-mapping.md
for the full mapping guide.
  1. Create
    usdm:req
    and
    usdm:spec
    labels if they do not exist.
  2. For each top-level REQ, create an Issue with label
    usdm:req
    .
  3. For each sub-requirement, create a sub-issue under the parent REQ Issue with label
    usdm:req
    .
  4. For each SPEC, create a sub-issue under its parent REQ Issue with label
    usdm:spec
    .
  5. Verify the hierarchy with
    gh sub-issue list
    .
创建与USDM层级结构对应的Issues,使用子Issue。完整映射指南参见
references/github-issues-mapping.md
  1. 如果不存在
    usdm:req
    usdm:spec
    标签,先创建它们。
  2. 为每个顶层REQ创建一个带有
    usdm:req
    标签的Issue。
  3. 为每个子需求在父REQ Issue下创建带有
    usdm:req
    标签的子Issue。
  4. 为每个SPEC在其父REQ Issue下创建带有
    usdm:spec
    标签的子Issue。
  5. 使用
    gh sub-issue list
    命令验证层级结构。

Writing Rules

写作规则

ID Convention

ID命名规范

ElementFormatExample
RequirementREQ-{NNN}REQ-001
SpecificationSPEC-{NNN}SPEC-001
DocumentREQ-DOC-{YYYYMMDD}-{NNN}-{short-name}REQ-DOC-20260215-001-user-auth
元素格式示例
RequirementREQ-{NNN}REQ-001
SpecificationSPEC-{NNN}SPEC-001
DocumentREQ-DOC-{YYYYMMDD}-{NNN}-{short-name}REQ-DOC-20260215-001-user-auth

Ambiguity Blacklist

歧义词汇黑名单

These words are prohibited in specifications. See
references/usdm-writing-guide.md
for the full list and replacement guidance:
appropriate, suitable, fast, slow, easy, simple, etc., some, several, as needed, user-friendly, flexible, support, handle, properly, correctly, reasonable, efficiently, should (in specs)
以下词汇在规格说明中禁止使用。完整列表及替换指南参见
references/usdm-writing-guide.md
appropriate, suitable, fast, slow, easy, simple, etc., some, several, as needed, user-friendly, flexible, support, handle, properly, correctly, reasonable, efficiently, should (in specs)

Anti-Patterns

反模式

Anti-PatternProblemCorrect Approach
Solution in requirementPrescribes implementationState the need, not the solution
Missing reasonNo justification for existenceAlways explain why
Tautological reason"To implement this feature" restates the requirementState business value, user benefit, or regulatory basis
Compound specificationMultiple "shall" in one specSplit into separate specifications
Untestable specificationCannot be verifiedAdd measurable criteria
Ambiguous languageUses blacklisted wordsReplace with specific, measurable terms
反模式问题正确做法
需求中包含解决方案指定了实现方式表述需求,而非解决方案
缺少原因无存在的合理性依据始终说明原因
同义反复的原因"To implement this feature"只是重复需求内容表述业务价值、用户收益或法规依据
复合规格说明一个规格说明中包含多个“shall”拆分为独立的规格说明
不可测试的规格说明无法被验证添加可衡量的标准
歧义语言使用了黑名单词汇替换为具体、可衡量的表述

References

参考资料

  • references/usdm-writing-guide.md
    — Naming conventions, quality criteria, review checklist
  • references/hidden-verb-discovery.md
    — Techniques for uncovering hidden requirements
  • references/github-issues-mapping.md
    — GitHub Issues USDM mapping and sub-issue workflow
  • examples/usdm-example.md
    — Complete before/after transformation example
  • templates/usdm-requirements.md
    — Output document template
  • references/usdm-writing-guide.md
    — 命名规范、质量标准、评审检查清单
  • references/hidden-verb-discovery.md
    — 挖掘隐藏需求的技术
  • references/github-issues-mapping.md
    — GitHub Issues与USDM的映射及子Issue工作流程
  • examples/usdm-example.md
    — 完整的转换前后示例
  • templates/usdm-requirements.md
    — 输出文档模板