ubiquitous-language
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseUbiquitous Language
Ubiquitous Language
Extract and formalize domain terminology from the current conversation into a consistent glossary, saved to a local file.
从当前对话中提取并规范化领域术语,生成统一的术语表并保存到本地文件。
Healthcare domain awareness
医疗领域适配
This skill is particularly valuable in healthcare contexts where precise domain language prevents costly misunderstandings. Healthcare systems deal with overlapping standards (HL7v2, FHIR, HPK, IHE profiles) that each introduce their own terminology for similar concepts — a "patient encounter" in FHIR, an "ADT event" in HL7v2, a "venue" in HPK can all refer to overlapping but distinct ideas. Formalizing a ubiquitous language early avoids bugs, specification drift, and integration errors that are expensive and dangerous in clinical environments.
本工具在医疗场景下价值尤为突出,精准的领域术语可避免代价高昂的误解。医疗系统需要对接各类重叠的标准(HL7v2、FHIR、HPK、IHE profiles),这些标准针对相似概念往往有各自的术语体系——比如FHIR中的「patient encounter」、HL7v2中的「ADT event」、HPK中的「venue」指代的概念互有重叠但又存在差异。早期就规范化Ubiquitous Language可以避免临床环境中成本极高、风险极大的Bug、规范漂移和集成错误。
Bilingual support (French / English)
双语支持(法语/英语)
Our teams work primarily in French, but healthcare domain standards (HL7, FHIR, IHE) and DDD literature use English terminology. The glossary should capture both:
- The canonical term is chosen based on whichever language the team uses most naturally for that concept
- A French term column is included alongside each definition so that team members can map between languages
- When a standard imposes an English term (e.g. "Encounter", "Observation", "MessageHeader"), prefer the standard's English term as canonical and provide the French equivalent
我们的团队主要使用法语工作,但医疗领域标准(HL7、FHIR、IHE)和DDD相关文献使用英语术语。生成的术语表会同时包含两种语言:
- 规范术语会根据团队对该概念最常用的语言来选择
- 每个定义旁会添加法语术语列,方便团队成员在两种语言间映射
- 当标准有指定的英语术语时(例如「Encounter」、「Observation」、「MessageHeader」),优先使用标准的英语术语作为规范术语,并提供对应的法语等价词
Process
执行流程
- Scan the conversation for domain-relevant nouns, verbs, and concepts
- Identify problems:
- Same word used for different concepts (ambiguity)
- Different words used for the same concept (synonyms)
- Vague or overloaded terms
- Terms that conflict with established healthcare standards
- Propose a canonical glossary with opinionated term choices
- Write to in the working directory using the format below
UBIQUITOUS_LANGUAGE.md - Output a summary inline in the conversation
- 扫描对话,识别领域相关的名词、动词和概念
- 识别问题:
- 同一个词指代不同概念(歧义)
- 不同的词指代同一个概念(同义词)
- 模糊或含义过载的术语
- 与现有医疗标准冲突的术语
- 生成规范术语表,给出明确的术语选择建议
- 按照下方格式写入工作目录下的文件
UBIQUITOUS_LANGUAGE.md - 在对话中输出总结内容
Output Format
输出格式
Write a file with this structure:
UBIQUITOUS_LANGUAGE.mdmd
undefined按照以下结构编写文件:
UBIQUITOUS_LANGUAGE.mdmd
undefinedUbiquitous Language
Ubiquitous Language
Patient lifecycle
Patient lifecycle
| Term | Terme français | Definition | Aliases to avoid |
|---|---|---|---|
| Encounter | Rencontre / Venue | A single interaction between a patient and a healthcare provider, bounded by admission and discharge | Visit, stay, séjour, passage |
| Admission | Admission | The act of formally registering a patient for an encounter | Check-in, entrée |
| Term | Terme français | Definition | Aliases to avoid |
|---|---|---|---|
| Encounter | Rencontre / Venue | A single interaction between a patient and a healthcare provider, bounded by admission and discharge | Visit, stay, séjour, passage |
| Admission | Admission | The act of formally registering a patient for an encounter | Check-in, entrée |
Clinical concepts
Clinical concepts
| Term | Terme français | Definition | Aliases to avoid |
|---|---|---|---|
| Observation | Observation | A single clinical measurement or finding recorded during an encounter | Result, measure, mesure, donnée |
| Prescription | Prescription | A clinician's order for medication, treatment, or diagnostic test | Order, ordonnance (when referring to the act, not the document) |
| Term | Terme français | Definition | Aliases to avoid |
|---|---|---|---|
| Observation | Observation | A single clinical measurement or finding recorded during an encounter | Result, measure, mesure, donnée |
| Prescription | Prescription | A clinician's order for medication, treatment, or diagnostic test | Order, ordonnance (when referring to the act, not the document) |
Relationships
Relationships
- An Encounter belongs to exactly one Patient
- A Prescription is issued during one Encounter but may be fulfilled across multiple Encounters
- An Observation is always recorded within one Encounter
- An Encounter belongs to exactly one Patient
- A Prescription is issued during one Encounter but may be fulfilled across multiple Encounters
- An Observation is always recorded within one Encounter
Example dialogue
Example dialogue
Dev: "When a Patient arrives, do we create an Encounter immediately?" Domain expert: "Yes — the Admission triggers the creation of an Encounter. But note that pre-admission paperwork does not constitute an Encounter; it is handled separately." Dev: "And if the Patient is transferred to another unit?" Domain expert: "That is still the same Encounter. A transfer changes the location, not the Encounter itself. A new Encounter only begins if the Patient is discharged and readmitted." Dev: "So the HL7 ADT^A02 transfer message updates the Encounter, it doesn't create a new one?" Domain expert: "Exactly."
Dev: "When a Patient arrives, do we create an Encounter immediately?" Domain expert: "Yes — the Admission triggers the creation of an Encounter. But note that pre-admission paperwork does not constitute an Encounter; it is handled separately." Dev: "And if the Patient is transferred to another unit?" Domain expert: "That is still the same Encounter. A transfer changes the location, not the Encounter itself. A new Encounter only begins if the Patient is discharged and readmitted." Dev: "So the HL7 ADT^A02 transfer message updates the Encounter, it doesn't create a new one?" Domain expert: "Exactly."
Flagged ambiguities
Flagged ambiguities
- "séjour" was used to mean both Encounter (a clinical interaction) and a hospital stay (a period of time) — prefer Encounter for the clinical concept and Hospitalization for the administrative period.
- "venue" in HPK context refers to the location-bound encounter, while "venue" in everyday French means something different entirely — always use Encounter in code and documentation.
undefined- "séjour" was used to mean both Encounter (a clinical interaction) and a hospital stay (a period of time) — prefer Encounter for the clinical concept and Hospitalization for the administrative period.
- "venue" in HPK context refers to the location-bound encounter, while "venue" in everyday French means something different entirely — always use Encounter in code and documentation.
undefinedRules
规则
- 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.
- 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.
- Include French terms. Every table row must have a "Terme français" column. When the canonical term is already French, the column may repeat it or note "identique".
- Respect healthcare standards. When a term is defined by HL7, FHIR, IHE, or HPK, prefer the standard's canonical spelling and casing. Note the source standard in the definition if helpful.
- 给出明确的选择:当同一个概念存在多个表述时,选择最合适的一个,将其他表述列为需避免的别名
- 明确标注冲突:如果对话中某术语使用存在歧义,在「Flagged ambiguities」部分标注并给出清晰的建议
- 定义简洁凝练:最多一句话,说明术语是什么,而不是它的作用
- 展示关系:使用加粗的术语名称,在明确的地方标注基数关系
- 仅包含领域术语:忽略通用编程概念(数组、函数、接口),除非它们有领域特定的含义
- 当术语出现自然聚类时,可分组到多个表格中(例如按子领域、生命周期、参与角色划分),每个分组有独立的标题和表格。如果所有术语都属于同一个内聚的领域,一个表格即可,不要强行分组
- 编写示例对话:一段开发人员和领域专家之间的简短对话(3-5轮交互),展示术语的自然使用方式。对话需要厘清相关概念之间的边界,展示术语的准确用法
- 包含法语术语:每个表格行必须有「Terme français」列。如果规范术语本身就是法语,该列可以重复术语或者标注「identique」
- 遵循医疗标准:如果术语由HL7、FHIR、IHE或HPK定义,优先使用标准的规范拼写和大小写。必要时可以在定义中注明来源标准
Re-running
重新运行规则
When invoked again in the same conversation:
- Read the existing
UBIQUITOUS_LANGUAGE.md - Incorporate any new terms from subsequent discussion
- Update definitions if understanding has evolved
- Mark changed entries with "(updated)" and new entries with "(new)"
- Re-flag any new ambiguities
- Rewrite the example dialogue to incorporate new terms
在同一段对话中再次调用本工具时:
- 读取现有的
UBIQUITOUS_LANGUAGE.md - 合并后续对话中出现的新术语
- 如果对概念的理解发生变化,更新对应定义
- 用「(updated)」标记修改过的条目,用「(new)」标记新增的条目
- 重新标注所有新出现的歧义
- 重写示例对话,加入新术语
Post-output instruction
输出后提示
After writing the file, state:
I've written/updated. From this point forward I will use these terms consistently. If I drift from this language or you notice a term that should be added, let me know.UBIQUITOUS_LANGUAGE.md
写完文件后,输出以下内容:
我已编写/更新。后续我会统一使用这些术语。如果我没有遵循该术语规范,或者你发现需要新增术语,请告知我。UBIQUITOUS_LANGUAGE.md