AGENT SKILL

领域术语表构建与维护

domain-glossary

提取并维护领域术语表,包含规范术语、歧义标记和关系映射。适用于定义领域术语、构建术语表、强化术语规范,或当规范文档、ADR(架构决策记录)或工作项中出现同义词漂移时。也可在规范文档创建期间用于验证术语一致性。不要用于架构决策(使用 ADR)、代码级命名约定(使用 coding-guidelines),或不会在多个制品中重复出现的一次性术语定义。

License 许可
MIT
最近更新
2026-11-14
Stars
★ 50
Forks
12

01 前言 Front Matter

name
domain-glossary
description
Extract and maintain a domain glossary with canonical terms, ambiguity flags, and relationship mappings. Use when defining domain terms, building a glossary, hardening terminology, or when synonym drift is detected across specs, ADRs, or work items. Also use during spec creation to validate terminology consistency. Do not use for architecture decisions (use ADRs), for code-level naming conventions (use coding-guidelines), or for one-time term definitions that do not recur across artifacts.

02 资源文件 1

03 SKILL.md 正文

Domain Glossary

Principle

Enterprise systems accumulate terminology debt: the same concept called different names across teams, specs, and code. Synonym drift corrupts search, work-item labeling, and cross-spec consistency. A shared canonical glossary reduces misunderstanding and improves spec-to-code traceability.

Operations

This skill has two modes: extract (build or update a glossary) and validate (check an artifact against the glossary).


1. Extract: Build or Update the Glossary

When to Extract

Trigger Action
New feature spec created (devsquad.specify) Extract terms from the spec
Envisioning completed (devsquad.envision) Extract terms from the envisioning document
Domain discussion in conversation Extract terms as they emerge
Explicit user request ("build a glossary", "define domain terms") Full extraction from available artifacts
Review finding: inconsistent terminology Update glossary with canonical choice

Extract Procedure

  1. Check for existing glossary: Read docs/domain/GLOSSARY.md (or create from template if it does not exist)
  2. Scan sources for domain-relevant nouns, verbs, and concepts:
    • Conversation context
    • Spec files (docs/features/**/spec.md)
    • Envisioning documents (docs/envisioning/*.md)
    • ADRs (docs/architecture/decisions/*.md)
    • Code (class names, module names, API endpoints) via codebase search
  3. Identify problems:
    • Same word used for different concepts (ambiguity)
    • Different words used for the same concept (synonyms)
    • Vague or overloaded terms
    • Terms in code that differ from terms in specs
  4. Propose canonical terms: be opinionated; pick the best term and list others as aliases to avoid
  5. Write or update docs/domain/GLOSSARY.md using the format below
  6. Present summary inline in the conversation

Glossary Format

# Domain Glossary

## [Domain Group]

| Term | Definition | Status | Aliases to avoid |
|------|-----------|--------|-----------------|
| **[Term]** | [One sentence: what it IS, not what it does] | [Established/Proposed/Contested] | [Synonyms to avoid] |

## Relationships

- A **[Term A]** belongs to exactly one **[Term B]**
- A **[Term C]** produces one or more **[Term D]**

## Flagged Ambiguities

- "[word]" was used to mean both **[Term X]** and **[Term Y]**. These are distinct concepts: [explanation of the difference and recommended usage].

Rules for Extraction

  • Be opinionated: when multiple words exist for the same concept, pick the best one and list the others as aliases to avoid
  • Flag conflicts explicitly with a clear recommendation
  • Only include terms relevant for domain experts; skip generic programming concepts (array, function, endpoint) unless they have domain-specific meaning
  • Keep definitions tight: one sentence maximum; define what it IS, not what it does
  • Show relationships with bold term names and express cardinality where obvious
  • Group terms into multiple tables when natural clusters emerge (by subdomain, lifecycle, or actor)
  • Create files lazily: only create GLOSSARY.md when the first terms are resolved; do not bloat new projects

Confidence Levels

Level Criterion
Established Term appears consistently in accepted specs and ADRs
Proposed Term chosen during extraction but not yet validated by the team
Contested Multiple stakeholders use different terms for the same concept

Mark contested terms in the Flagged Ambiguities section until resolved.


2. Validate: Check Artifact Against Glossary

When to Validate

Agent Artifact Check
devsquad.specify spec.md Terms used in the spec exist in the glossary; no synonym drift
devsquad.review.spec spec.md Flag terms that contradict or diverge from the glossary
devsquad.review.code Source code Flag domain-language violations (code uses synonyms instead of canonical terms)
quality-gate Any artifact Terminology consistency as a quality dimension

Validate Procedure

  1. Read docs/domain/GLOSSARY.md
    • If file does not exist, skip validation (no glossary yet)
  2. Scan the artifact for domain terms
  3. For each term found:
    • If it matches a canonical term: OK
    • If it matches an "alias to avoid": flag as terminology drift
    • If it is a domain-relevant term not in the glossary: suggest adding it
  4. Report findings:
Terminology check: [artifact]

Drift detected:
- "[alias]" used in [location] — canonical term is **[Term]**

New terms (not in glossary):
- "[new term]" — suggest adding with definition: [proposed definition]

No issues: [count] terms checked, all consistent

3. Code Cross-Reference

When validating code (called from devsquad.review.code):

  1. Search for class names, module names, and API endpoints that represent domain concepts
  2. Compare against the glossary:
    • Class UserAccount when glossary says Customer: flag as translation smell
    • API endpoint /api/clients when glossary says Customer: flag as inconsistency
  3. Do not flag internal implementation names (private variables, utility functions) unless they represent domain concepts exposed in public interfaces
  4. Exempt intentional translation boundaries: anti-corruption layers, legacy database schemas, vendor API contracts, and external system adapters may use different terms by design. If a mismatch is at a known boundary, note it but do not flag as drift.

Anti-patterns

  • Do not create a glossary for projects with a single bounded context and fewer than 5 domain terms (overhead exceeds value)
  • Do not block delivery for terminology drift (flag it, do not enforce)
  • Do not capture generic technical terms ("database", "API", "service") unless they have project-specific meaning
  • Do not override terms that the team has explicitly chosen, even if another term seems "better"
  • Do not duplicate definitions that already exist in accepted ADRs

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