agentleFS
MicrosoftKnown publishermicrosoft/devsquad-copilot/.github/plugins/devsquad/skills/domain-glossary/SKILL.md

domain-glossary

Skill50 starsChanged 16 days agoMITView on GitHub

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.

We split this skill into the rules it gives an agent

16 rules. 0 are common, 13 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 13

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Check for existing glossary: Read docs/domain/GLOSSARY.md (or create from template if it does not exist)

    line 32
  2. Distinctive:

    Only include terms relevant for domain experts.

    line 73
  3. Distinctive:

    Keep definitions tight: one sentence maximum.

    line 74
  4. Very specific:

    Create files lazily: only create GLOSSARY.md when the first terms are resolved.

    line 77
  5. Distinctive:

    If file does not exist, skip validation (no glossary yet)

    line 105
  6. Distinctive:

    If it matches a canonical term: OK

    line 108
  7. Distinctive:

    If it matches an "alias to avoid": flag as terminology drift

    line 109
  8. Distinctive:

    If it is a domain-relevant term not in the glossary: suggest adding it

    line 110
  9. Very specific:

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

    line 129
  10. Distinctive:

    Search for class names, module names, and API endpoints that represent domain concepts

    line 131
  11. Distinctive:

    Do not flag internal implementation names (private variables, utility functions) unless they represent domain concepts exposed in public …

    line 135
  12. Distinctive:

    Do not create a glossary for projects with a single bounded context and fewer than 5 domain terms (overhead exceeds value)

    line 142
  13. Distinctive:

    Do not block delivery for terminology drift (flag it, do not enforce)

    line 143
  14. Distinctive:

    Do not capture generic technical terms ("database", "API", "service") unless they have project-specific meaning

    line 144
  15. Distinctive:

    Do not override terms that the team has explicitly chosen, even if another term seems "better"

    line 145
  16. Distinctive:

    Do not duplicate definitions that already exist in accepted ADRs

    line 146

“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
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

TriggerAction
New feature spec created (devsquad.specify)Extract terms from the spec
Envisioning completed (devsquad.envision)Extract terms from the envisioning document
Domain discussion in conversationExtract terms as they emerge
Explicit user request ("build a glossary", "define domain terms")Full extraction from available artifacts
Review finding: inconsistent terminologyUpdate 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

LevelCriterion
EstablishedTerm appears consistently in accepted specs and ADRs
ProposedTerm chosen during extraction but not yet validated by the team
ContestedMultiple 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

AgentArtifactCheck
devsquad.specifyspec.mdTerms used in the spec exist in the glossary; no synonym drift
devsquad.review.specspec.mdFlag terms that contradict or diverge from the glossary
devsquad.review.codeSource codeFlag domain-language violations (code uses synonyms instead of canonical terms)
quality-gateAny artifactTerminology 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

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.