agentleFS
marinvchmarinvch/Cortex/skills/domain-modeling/SKILL.md

domain-modeling

Skill1 starsChanged 2 months agoMITView on GitHub

Sharpen a repo's domain language — challenge fuzzy terms, and write its CONTEXT.md glossary and ADRs. Triggers — "what should we call this", "these two words mean the same thing", "record this decision", "write an ADR".

171 other projects use a version of this, 133 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use writing-beats, setup-ts-deep-modules 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.
  • RoentekSkill

    writing-beats

    Writing, exploit — assemble raw material into a journey of beats, grounding each term before a beat leans on it.

    Also in 24 projects that use this

  • loulanyueSkill

    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 16 projects that use this

  • risadamsSkill

    which-skill

    Router over this pack's skills and flows. Ask it "which skill fits X" when you don't remember what's available.

    Also in 5 projects that use this

  • RoentekSkill

    writing-shape

    Writing, exploit — shape raw material into an article, paragraph by paragraph.

    Also in 22 projects that use this

  • pahwarangerSkill

    setup-skills

    Sets up an `## Agent skills` block in AGENTS.md/CLAUDE.md and `docs/agents/` so the engineering skills know this repo's ticket tracker (GitHub or local markdown), triage label vocabulary, and domain doc layout. Run before first use of `to-tickets`, `to-prd`, `triage`, `diagnose`, `tdd`, `improve-codebase-architecture`, or `zoom-out` — or if those skills appear to be missing context about the ticket tracker, triage labels, or domain docs.

    Also in 7 projects that use this

  • qwlabsSkill

    claude-handoff

    Hand the current conversation off to a fresh background agent that picks up the work immediately.

    Also in 17 projects that use this

  • +2 more from Roentek

The file

We split this skill into the rules it gives an agent

6 rules. 0 are common, 4 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 160 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 2

    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, the repo has multiple contexts and each lives beside its own code (src/ordering/CONTEXT.md).

    line 40
  2. Distinctive:

    Challenge against the glossary: When a term conflicts with what's already written, say so immediately — "your glossary defines …

    line 45
  3. Distinctive:

    Stress-test with scenarios: When relationships are being discussed, invent concrete edge cases that force precision about where one concept …

    line 51
  4. Distinctive:

    Cross-reference with the code: When the user states how something works, check whether the code agrees.

    line 54
  5. Very specific:

    Keep it a glossary. CONTEXT.md is totally devoid of implementation detail — not a spec, not a scratchpad, not a home for decisions.

    line 61
  6. Distinctive:

    Only when all three are true:

    line 67

“Common” is measured: kept by at least 6 in 10 of the 160 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 — name things once, argue about them never again

Two words for one concept is how a codebase rots. This ritual is the active discipline of fixing that: challenging terms, inventing edge cases that force precision, and writing the result down the moment it settles. Merely reading a glossary for vocabulary is not this skill — that's a one-line habit any ritual can do. Reach for this when you're changing the model.

Pairs with [[codebase-design]] (which names the shape of code) the way a glossary pairs with a blueprint. /install-project stamps the brain; this ritual sharpens the language inside it.

Two different "context" — don't confuse them

LivesHolds
the vault's context/this repo, gitignoredwho the user is — priorities, values, how they work
a repo's CONTEXT.mdthe target repo, committedwhat its words mean — a glossary, nothing else

This ritual only ever writes the second. It never touches context/ here, and it never carries employer or client vocabulary back into this vault — that's the firewall, not a style preference.

Where things go, in the target repo

CONTEXT.md            <- the glossary (root; most repos need only this one)
CONTEXT-MAP.md        <- only if the repo has several bounded contexts
docs/adr/0001-*.md    <- decisions worth remembering (adr/ when docs/ is a published site)

Create files lazily — only when there's something to write. No CONTEXT.md until the first term is actually resolved; no docs/adr/ until the first ADR earns its place. An empty glossary is worse than none: it looks maintained.

If CONTEXT-MAP.md exists, the repo has multiple contexts and each lives beside its own code (src/ordering/CONTEXT.md). Infer which one the current topic belongs to; ask if it's unclear.

During the session

Challenge against the glossary. When a term conflicts with what's already written, say so immediately — "your glossary defines cancellation as X, but you mean Y — which is it?"

Sharpen fuzzy language. Propose a precise canonical term for vague or overloaded ones. "You're saying account — do you mean the Customer or the User? Those are different things."

Stress-test with scenarios. When relationships are being discussed, invent concrete edge cases that force precision about where one concept ends and the next begins.

Cross-reference with the code. When the user states how something works, check whether the code agrees. Surface contradictions: "your code cancels whole Orders, but you just said partial cancellation is possible — which is right?"

Update CONTEXT.md inline. The moment a term resolves, write it. Don't batch — batched glossary updates never happen. Format: CONTEXT-FORMAT.md.

Keep it a glossary. CONTEXT.md is totally devoid of implementation detail — not a spec, not a scratchpad, not a home for decisions. Only terms specific to this domain; general programming concepts don't belong however heavily the project uses them.

Offer ADRs sparingly

Only when all three are true:

  1. Hard to reverse — changing your mind later actually costs something.
  2. Surprising without context — a future reader will wonder "why on earth did they do it this way?"
  3. The result of a real trade-off — there were genuine alternatives and one was picked for specific reasons.

Miss any one and skip it. Easy to reverse? You'll just reverse it. Not surprising? Nobody will wonder. No real alternative? There's nothing to record beyond "we did the obvious thing."

Format and the qualifying categories: ADR-FORMAT.md. Note that a repo's ADRs are not the vault's decisions/log.md — that one is the user's personal decisions, and it stays here.


Adapted from mattpocock/skills (MIT). CONTEXT-FORMAT.md and ADR-FORMAT.md are vendored; the two-contexts warning and firewall rules are Cortex additions.

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.