ubiquitous-language

โดย mattpocock

แยกอภิธานศัพท์ภาษาสากลแบบ DDD จากการสนทนาปัจจุบัน ระบุความคลุมเครือและเสนอคำศัพท์มาตรฐาน บันทึกไปยัง UBIQUITOUS_LANGUAGE.md ใช้เมื่อผู้ใช้ต้องการกำหนดคำศัพท์เฉพาะโดเมน สร้างอภิธานศัพท์ ปรับปรุงคำศัพท์ให้แข็งแกร่ง สร้างภาษาสากล หรือกล่าวถึง "domain model" หรือ "DDD

npx skills add https://github.com/mattpocock/skills --skill ubiquitous-language

Ubiquitous Language

Extract and formalize domain terminology from the current conversation into a consistent glossary, saved to a local file.

Process

  1. Scan the conversation for domain-relevant nouns, verbs, and concepts
  2. Identify problems:
    • Same word used for different concepts (ambiguity)
    • Different words used for the same concept (synonyms)
    • Vague or overloaded terms
  3. Propose a canonical glossary with opinionated term choices
  4. Write to UBIQUITOUS_LANGUAGE.md in the working directory using the format below
  5. Output a summary inline in the conversation

Output Format

Write a UBIQUITOUS_LANGUAGE.md file with this structure:

# Ubiquitous Language

## Order lifecycle

| Term        | Definition                                              | Aliases to avoid      |
| ----------- | ------------------------------------------------------- | --------------------- |
| **Order**   | A customer's request to purchase one or more items      | Purchase, transaction |
| **Invoice** | A request for payment sent to a customer after delivery | Bill, payment request |

## People

| Term         | Definition                                  | Aliases to avoid       |
| ------------ | ------------------------------------------- | ---------------------- |
| **Customer** | A person or organization that places orders | Client, buyer, account |
| **User**     | An authentication identity in the system    | Login, account         |

## Relationships

- An **Invoice** belongs to exactly one **Customer**
- An **Order** produces one or more **Invoices**

## Example dialogue

> **Dev:** "When a **Customer** places an **Order**, do we create the **Invoice** immediately?"
> **Domain expert:** "No — an **Invoice** is only generated once a **Fulfillment** is confirmed. A single **Order** can produce multiple **Invoices** if items ship in separate **Shipments**."
> **Dev:** "So if a **Shipment** is cancelled before dispatch, no **Invoice** exists for it?"
> **Domain expert:** "Exactly. The **Invoice** lifecycle is tied to the **Fulfillment**, not the **Order**."

## Flagged ambiguities

- "account" was used to mean both **Customer** and **User** — these are distinct concepts: a **Customer** places orders, while a **User** is an authentication identity that may or may not represent a **Customer**.

Rules

  • 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. If a term is used ambiguously in the conversation, call it out in the "Flagged ambiguities" section with a clear recommendation.
  • Only include terms relevant for domain experts. Skip the names of modules or classes unless they have meaning in the domain language.
  • Keep definitions tight. One sentence max. Define what it IS, not what it does.
  • Show relationships. Use bold term names and express cardinality where obvious.
  • Only include domain terms. Skip generic programming concepts (array, function, endpoint) unless they have domain-specific meaning.
  • Group terms into multiple tables when natural clusters emerge (e.g. by subdomain, lifecycle, or actor). Each group gets its own heading and table. If all terms belong to a single cohesive domain, one table is fine — don't force groupings.
  • Write an example dialogue. A short conversation (3-5 exchanges) between a dev and a domain expert that demonstrates how the terms interact naturally. The dialogue should clarify boundaries between related concepts and show terms being used precisely.

Example dialogue

Dev: "How do I test the sync service without Docker?"

Domain expert: "Provide the filesystem layer instead of the Docker layer. It implements the same Sandbox service interface but uses a local directory as the sandbox."

Dev: "So sync-in still creates a bundle and unpacks it?"

Domain expert: "Exactly. The sync service doesn't know which layer it's talking to. It calls exec and copyIn — the filesystem layer just runs those as local shell commands."

Re-running

When invoked again in the same conversation:

  1. Read the existing UBIQUITOUS_LANGUAGE.md
  2. Incorporate any new terms from subsequent discussion
  3. Update definitions if understanding has evolved
  4. Re-flag any new ambiguities
  5. Rewrite the example dialogue to incorporate new terms

Skills เพิ่มเติมจาก mattpocock

improve-codebase-architecture
mattpocock
ค้นหาโอกาสในการปรับปรุงโค้ดเบสให้ลึกซึ้งยิ่งขึ้น โดยอิงจากภาษาของโดเมนใน CONTEXT.md และการตัดสินใจใน docs/adr/ ใช้เมื่อผู้ใช้ต้องการปรับปรุงสถาปัตยกรรม ค้นหาโอกาสในการรีแฟกเตอร์ รวมโมดูลที่เชื่อมโยงกันอย่างแน่นหนา หรือทำให้โค้ดเบสสามารถทดสอบได้และนำทางด้วย AI ได้ง่ายขึ้น
developmentcode-reviewapi
tdd
mattpocock
การพัฒนาที่ขับเคลื่อนด้วยการทดสอบด้วยวงจรแดง-เขียว-ปรับปรุง ใช้เมื่อผู้ใช้ต้องการสร้างฟีเจอร์หรือแก้ไขบั๊กโดยใช้ TDD กล่าวถึง "แดง-เขียว-ปรับปรุง" ต้องการการทดสอบแบบบูรณาการ หรือขอให้พัฒนาด้วยการทดสอบก่อน
developmenttesting
handoff
mattpocock
ย่อบทสนทนาปัจจุบันให้เป็นเอกสารส่งต่อสำหรับเอเจนต์อื่นเพื่อดำเนินการต่อ
communicationproject-managementdocument
prototype
mattpocock
สร้างต้นแบบที่ใช้แล้วทิ้งเพื่อขยายแบบก่อนตัดสินใจ เส้นทางระหว่างสองสาขา — แอปเทอร์มินัลที่รันได้สำหรับคำถามเกี่ยวกับสถานะ/ตรรกะทางธุรกิจ หรือรูปแบบ UI ที่แตกต่างกันอย่างสิ้นเชิงหลายแบบที่สามารถสลับได้จากเส้นทางเดียว ใช้เมื่อผู้ใช้ต้องการสร้างต้นแบบ ตรวจสอบความถูกต้องของโมเดลข้อมูลหรือสถานะเครื่องจักร สร้าง UI จำลอง สำรวจตัวเลือกการออกแบบ หรือพูดว่า "สร้างต้นแบบนี้" "ให้ฉันลองเล่นดู" "ลองออกแบบสองสามแบบ
developmentdesigncreative
triage
mattpocock
จัดการปัญหาผ่านเครื่องสถานะที่ขับเคลื่อนด้วยบทบาทการคัดแยก ใช้เมื่อผู้ใช้ต้องการสร้างปัญหา คัดแยกปัญหา ตรวจสอบข้อบกพร่องหรือคำขอฟีเจอร์ที่เข้ามา เตรียมปัญหาสำหรับเอเจนต์ AFK หรือจัดการเวิร์กโฟลว์ของปัญหา
developmentproject-managementcommunication
obsidian-vault
mattpocock
ค้นหา สร้าง และจัดการโน้ตใน Obsidian vault ด้วย wikilinks และ index notes ใช้เมื่อผู้ใช้ต้องการค้นหา สร้าง หรือจัดระเบียบโน้ตใน Obsidian
productivitydocument
edit-article
mattpocock
แก้ไขและปรับปรุงบทความโดยการจัดโครงสร้างส่วนต่างๆ เพิ่มความชัดเจน และกระชับข้อความ ใช้เมื่อผู้ใช้ต้องการแก้ไข ปรับปรุง หรือพัฒนาร่างบทความ
documentcreative
writing-great-skills
mattpocock
ข้อมูลอ้างอิงสำหรับการเขียนและแก้ไขสกิลอย่างมีประสิทธิภาพ — คำศัพท์และหลักการที่ทำให้สกิลสามารถคาดเดาได้
documentdevelopment