跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
开发与测试

ddd

Interview a person as the domain expert to build a shared DDD language and model, map where the code diverges, hand off prioritized implementation, then check the merged code against the model.

rome-os · 已有静态检查记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add rome-os/rome --skill ddd

技能说明


name: ddd description: Interview a person as the domain expert to build a shared DDD language and model, map where the code diverges, hand off prioritized implementation, then check the merged code against the model.

Shared language and model, from interview to code

What this skill is for

A person knows what their domain is; the code only knows what it does today. This skill runs the whole Domain-Driven Design loop between them, so that the person, the AI and the code end up using one language:

  1. Interview the person as the domain expert until the words and their rules are settled.
  2. Write the language they can read and correct without knowing code.
  3. Shape the model: context map with direction, aggregates, and a walk of a real story through it.
  4. Map divergence: where today's code contradicts the model, ranked with the person.
  5. Hand off implementation in priority order, with the language as the brief.
  6. Check drift once the code has merged, and bring every gap back as a decision.

It is long-running. One pass can take dozens of rounds over a day or more, and the artifacts are living documents edited in place, not reports written once.

Code and model

The code is an authority on facts: what the system does today, how outside platforms behave, and what a change would cost. Read those yourself instead of asking, and report what the code does, not what its names imply. The code is not an authority on the model: whether a concept is right or where a boundary belongs is the person's call. ADRs and docs are the same as code here. Five rules follow from this:

  1. Two records. "Today" comes from the code and lives in the notes; the language holds what the person decides. The divergence map is where they meet.
  2. Today is never the default. Show today's behaviour as one labelled option among others. Recommending it needs a reason other than "it exists".
  3. Compare against the language, not the code. A new concept is tested against agreed words. A concept that exists only in code is a candidate to test, not a baseline.
  4. Cost decides when, not what. How hard a change is sets its priority in the divergence map; it never bends the model.
  5. Strain in the code becomes a question. Where the code's words pull apart, ask the person; don't copy the design.

Ground rules

Talk to a domain expert, not a programmer. No table names, columns, file paths or type names in questions or in the language document. If a question needs code to be understood, it is the wrong question. Short beats complete: one line per word, a short story, a few questions per round.

Use only the language's words. Every noun and verb you use in a question must already be in the language, or be the one you are asking about. When you catch yourself saying a word the language doesn't have ("bot", "disconnect the agent"), stop, consolidate it into a language word, and add that word to the language.

One meaning per word inside a context. A context states the question it answers ("who said what, where, and as whom"). A word that is a term in two contexts is written with its context in front, everywhere ("People link", "Envoy link").

Stay in scope. The person decides what the current focus is. Words and rules outside it get one line, "keeps today's behaviour, not part of ", and no further questions. Don't fill gaps the person has put out of scope.

The five facts every word needs

DDD prescribes no glossary format, but a word is only usable for design when it states:

  • Meaning, in the person's words.
  • Identity: what makes two of them the same one.
  • Lifecycle: when one starts to exist and when it stops.
  • Operations: the verbs people use on it (not create/read/update/delete).
  • Rules: what must always hold.

Plus, across contexts, the context map: which context depends on which, and which side bends.

Identity and lifecycle carry the most weight; one answer about them can move an aggregate boundary. Most words come out of early rounds with meaning and rules but no identity or lifecycle. Checking every word against these five, as a table, is the review step below.

A word earns its place only if it has an identity, lifecycle or rule that no other word already carries. Test existing words against this too, not just new ones: a word whose every job is done by others (who it is → account, how messages move → connection, where they live → chat) is plumbing, not domain, and leaves the language. The code may keep it as a technical word.

Stage 1: Interview

Prepare

Read the code, docs and any earlier modeling notes for the area. Write the as-is model in the practitioner's notes (below): each term as the code has it, where it lives, and a short list of strain points, places where the words pull apart (one word naming two things, a thing with three names, an identity that surprises). The strain points seed the first questions.

Rounds

Keep rounds small, and offer concrete options with a recommendation rather than open blanks.

  • Start with the words the person uses most, and the open "what is X, in your words?" question for anything central. Then test their answer with a concrete case that would break it ("one chat or two, if a group has two of the product's accounts in it?").
  • Ground abstract questions in real instances. When the person says "I don't understand the question", you jumped ahead: back up, show a plain table of the actual cases (every connection that exists today, whose it is, what it allows) and ask about those.
  • Settle lifecycle by experiment, not definition: write a numbered story ("1. you connect account A. 2. … 6. you remove it") and ask what exists at each step.
  • When an answer could be read two ways, say which reading you took. When you and the person read a step differently, name both readings and ask again; don't build on the ambiguity.
  • When the person reverses an earlier de
阅读完整来源 ↗