agentleFS
sponge-b0bsponge-b0b/Polaris/.agents/skills/domain-modeling/SKILL.md

domain-modeling

Skill4 starsChanged 4 months agoApache-2.0View on GitHub

Actively sharpen the project's domain model by resolving terminology, stress-testing concepts, reconciling domain language with implementation, and maintaining canonical vocabulary in CONTEXT.md.

195 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use setup-ts-deep-modules, decision-mapping and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • liufeng1976Skill

    setup-ts-deep-modules

    Wire dependency-cruiser into a TypeScript repo so each package is a deep module — implementation hidden in subfolders, reachable only through its entry-point files. User-invoked.

    Also in 43 projects that use this

  • FabienDehopreSkill

    decision-mapping

    Turn a loose idea into a sequenced map of investigation tickets, then drive them to resolution one at a time.

    Also in 8 projects that use this

  • LesaniSkill

    writing-beats

    Shape an article as a journey of beats, choose-your-own-adventure style. The user picks a starting beat from the raw material, you write only that beat, then offer options for where to pivot next, beat by beat, until the article reaches a natural end. Use when the user has raw material and wants to assemble it as a narrative rather than an argument.

    Also in 62 projects that use this

  • RoentekSkill

    loop-me

    Grill me about specs for the workflows I want to build, within this workspace.

    Also in 56 projects that use this

  • AWSSkill

    wizard

    Generate an interactive bash wizard that walks a human through steps only they can perform. Use when provisioning infrastructure, setting up credentials or CI secrets, walking an unfamiliar third-party dashboard, or running a one-off migration or cutover. Don't invoke this for steps the agent can perform itself.

    Also in 134 projects that use this

  • LesaniSkill

    writing-shape

    Take a markdown file of raw material and shape it into an article through a conversational session — drafting candidate openings, growing the piece paragraph by paragraph, arguing about format (lists, tables, callouts, quotes) at each step. Use when the user has a pile of notes, fragments, or a rough draft and wants help turning it into something publishable.

    Also in 60 projects that use this

  • +1 more from Lesani

The file

Show its rules and text

We split this skill into the rules it gives an agent

23 rules. 0 are common, 12 are distinctive, and 11 are very specific to this project.

  • 0

    Common

    Most of the 184 edited versions we read keep these.

  • 12

    Distinctive

    This author's own choices. Worth a look.

  • 11

    Very specific

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

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

    If CONTEXT-MAP.md exists, use it to locate the appropriate bounded-context glossary.

    line 27
  2. Distinctive:

    Do not assume a bounded context, package, or wiki entity automatically maps one-to-one to another.

    line 29
  3. Distinctive:

    Create glossary files lazily — only when there is resolved vocabulary to record.

    line 31
  4. Very specific:

    When the user uses a term inconsistently with CONTEXT.md, surface the conflict immediately.

    line 37
  5. Distinctive:

    Do not silently redefine an existing canonical term.

    line 43
  6. Distinctive:

    When a term is vague or overloaded, propose a more precise distinction.

    line 47
  7. Distinctive:

    Prefer canonical domain language over generic software terminology.

    line 53
  8. Distinctive:

    Use the shortest natural canonical noun or noun phrase that remains semantically unambiguous among the project's first-class domain …

    line 57
  9. Distinctive:

    Add a qualifier only when it earns its place by resolving a real domain ambiguity, establishing a necessary semantic boundary, or …

    line 59
  10. Distinctive:

    When two candidate names remain equally precise after this test, prefer the shorter and more natural term.

    line 77
  11. Distinctive:

    Use scenarios to expose ambiguity, not to invent product behavior arbitrarily.

    line 92
  12. Distinctive:

    When a claim describes behavior that should already exist, inspect the implementation.

    line 96
  13. Distinctive:

    If code and the proposed domain model disagree, surface the discrepancy rather than silently deciding which is correct.

    line 98
  14. Very specific:

    When a term or distinction is resolved, update CONTEXT.md immediately rather than batching glossary changes until the end.

    line 111
  15. Very specific:

    Follow CONTEXT-FORMAT.md when present.

    line 113
  16. Very specific:

    If an existing non-ADR document needs reclassification, use $classify-doc.

    line 145
  17. Very specific:

    Do not use CONTEXT.md as a substitute for architecture documentation.

    line 147
  18. Very specific:

    Do not copy glossary definitions into entity pages or create wiki/log.md entries merely because terminology changed.

    line 153
  19. Very specific:

    Use $wiki-sync only when the domain-modeling session also causes one of its normal triggers, such as:

    line 155
  20. Distinctive:

    Do not derive wiki entities mechanically from:

    line 162
  21. Very specific:

    If domain modeling exposes material disagreement between accepted ADRs, current architecture docs, and verified implementation evidence, …

    line 173
  22. Very specific:

    Do not resolve an architectural conflict by redefining terminology in CONTEXT.md.

    line 175
  23. Very specific:

    Do not report a wiki change when only CONTEXT.md changed.

    line 187

“Common” is measured: kept by at least 6 in 10 of the 184 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 Modeling

Actively build and sharpen the project's domain model as you design.

This is the active discipline: challenge terms, invent edge-case scenarios, reconcile stated behavior with the code, and capture resolved vocabulary as it crystallizes.

Merely reading CONTEXT.md for vocabulary is not $domain-modeling.

File Structure

Most repositories use a single domain glossary:

/
├── CONTEXT.md
├── docs/
│   └── adr/
└── src/

If CONTEXT-MAP.md exists, use it to locate the appropriate bounded-context glossary.

Do not assume a bounded context, package, or wiki entity automatically maps one-to-one to another.

Create glossary files lazily — only when there is resolved vocabulary to record.

During the Session

Challenge Against the Glossary

When the user uses a term inconsistently with CONTEXT.md, surface the conflict immediately.

Example:

CONTEXT.md defines "cancellation" as X, but this discussion seems to use it as Y. Are those intended to be different concepts?

Do not silently redefine an existing canonical term.

Sharpen Fuzzy Language

When a term is vague or overloaded, propose a more precise distinction.

Example:

You're using "account" for both the customer organization and the authenticated user. Are those actually the same domain concept?

Prefer canonical domain language over generic software terminology.

Canonical-Term Qualification Standard

Use the shortest natural canonical noun or noun phrase that remains semantically unambiguous among the project's first-class domain concepts.

Add a qualifier only when it earns its place by resolving a real domain ambiguity, establishing a necessary semantic boundary, or preventing misleading overloading. Do not add qualifiers merely because the underlying word is generic English.

Qualification should resolve ambiguity, not compensate for an imprecise definition.

Apply this canonical-term qualification test before freezing a canonical term:

  1. First-class collision: Does the bare noun plausibly collide with another first-class domain concept in this product? If yes, qualify it.
  2. Information gain: Does the qualifier add meaningful semantic information, or merely repeat what the canonical definition already establishes? Prefer the bare noun when the qualifier is redundant.
  3. Narrowing risk: Would the qualifier incorrectly imply narrower ownership, scope, cardinality, origin, or lifecycle than the concept actually has? Reject a qualifier that makes the term less accurate.
  4. Context independence: Is the bare noun still clear when extracted from its ideal paragraph and used in glossary entries, schemas, APIs, events, UI labels, logs, or cross-domain discussion? Qualify it when the bare term becomes materially ambiguous outside local prose.
  5. Canonical capitalization: Can canonical capitalization and the glossary definition distinguish the domain concept adequately from ordinary lowercase English usage? Do not lengthen canonical vocabulary solely to eliminate harmless natural-language collisions.

Examples:

  • Decision Evaluation is preferable to bare Evaluation because evaluation is materially overloaded across model, evidence, policy, workflow, and other product concerns.
  • Outcome is preferable to Decision Outcome because its canonical definition is already decision-relative and the qualifier adds little while suggesting an unnecessarily terminal result.
  • Lesson is preferable to Decision Lesson because one Lesson may synthesize learning across multiple Investment Decisions; the qualifier would misleadingly narrow the concept.

When two candidate names remain equally precise after this test, prefer the shorter and more natural term.

Discuss Concrete Scenarios

Stress-test domain relationships with specific scenarios, especially around:

  • identity;
  • lifecycle;
  • state transitions;
  • ownership;
  • cardinality;
  • partial operations;
  • invalid states;
  • temporal behavior.

Use scenarios to expose ambiguity, not to invent product behavior arbitrarily.

Cross-Reference With Code

When a claim describes behavior that should already exist, inspect the implementation.

If code and the proposed domain model disagree, surface the discrepancy rather than silently deciding which is correct.

The discrepancy may indicate:

  • incorrect vocabulary;
  • incomplete implementation;
  • an overloaded concept;
  • a missing architectural decision.

Resolve the semantic question first.

Update CONTEXT.md Inline

When a term or distinction is resolved, update CONTEXT.md immediately rather than batching glossary changes until the end.

Follow CONTEXT-FORMAT.md when present.

CONTEXT.md is a domain glossary only.

It may contain:

  • canonical terms;
  • precise definitions;
  • meaningful distinctions;
  • domain-level relationships;
  • useful aliases or deprecated terminology.

It must not contain:

  • implementation details;
  • class or module paths;
  • database choices;
  • architecture decisions;
  • project status;
  • roadmap items;
  • Planned work.

A glossary entry explains what a domain concept means, not how Polaris implements it.

Keep Domain and Architecture Separate

A resolved domain statement belongs in CONTEXT.md.

An architectural decision belongs through $to-adr-doc when its criteria are met.

Durable current or proposed architecture that does not warrant an ADR belongs through $to-doc.

If an existing non-ADR document needs reclassification, use $classify-doc.

Do not use CONTEXT.md as a substitute for architecture documentation.

Living Entity Wiki

A CONTEXT.md vocabulary change is not by itself a $wiki-sync trigger.

Do not copy glossary definitions into entity pages or create wiki/log.md entries merely because terminology changed.

Use $wiki-sync only when the domain-modeling session also causes one of its normal triggers, such as:

  • substantive source-code changes;
  • substantive docs/current/ or docs/proposed/ changes;
  • ADR lifecycle activity;
  • an approved entity-topology change.

Do not derive wiki entities mechanically from:

  • domain terms;
  • aggregates;
  • bounded contexts;
  • domain services.

Entity topology remains governed by wiki/_schema.md and $wiki-sync.

Source Conflicts

If domain modeling exposes material disagreement between accepted ADRs, current architecture docs, and verified implementation evidence, surface [source-conflict].

Do not resolve an architectural conflict by redefining terminology in CONTEXT.md.

Handoff

Report:

  • canonical terms added or changed;
  • important distinctions resolved;
  • unresolved domain questions;
  • implementation/domain discrepancies discovered;
  • any $to-adr-doc, $to-doc, $classify-doc, or $wiki-sync outcome.

Do not report a wiki change when only CONTEXT.md changed.

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.