agentleFS
smixssmixs/disruptor-skills/skills/setting-up-domain-model/SKILL.md

setting-up-domain-model

Skill19 starsChanged 5 months agoMITView on GitHub

Use when starting the flow in a repo that has no CONTEXT.md / conventions yet, when a term keeps getting used two ways, or when a hard-to-reverse decision was just made and needs recording. Triggers: "set up the repo conventions", "what's our vocabulary", "record this decision", "write an ADR", "the glossary".

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Create both lazily — only when the first term or the first real decision appears.

    line 39
  2. Distinctive:

    Do this the first time the flow touches a repo.

    line 44
  3. Distinctive:

    Project-specific only: If it's a general programming concept, it doesn't belong.

    line 71
  4. Distinctive:

    Sharpen on contact: When a stage uses a fuzzy word, or a term two ways, resolve it here immediately — a concrete edge-case scenario is the …

    line 72
  5. Distinctive:

    Grow it lazily: Add a term the moment it's resolved.

    line 74
  6. Distinctive:

    When reality diverges from an ADR, update the ADR — don't let the code quietly redefine the decision.

    line 96

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “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

Setup and domain model

Stage contract

  • Stage: 0. Setup (once per repo) + cross-cutting upkeep · Kind: method
  • Inputs: the repo; whatever domain terms and decisions surface as the flow runs.
  • Outputs: CONTEXT.md (glossary) and docs/adr/ (decision records), created lazily and kept live.
  • Entry gate: first time through the flow in this repo (no CONTEXT.md / conventions recorded), or a term/decision needs pinning down mid-flow.
  • Done when: conventions are recorded; every term the flow relies on has one canonical definition; every hard-to-reverse decision is an ADR.
  • Next: the stage you were routed to — usually the designing-with-7w3 skill.
  • Maintains: it owns CONTEXT.md and docs/adr/; every other stage keeps them live.

Why this exists

The whole flow rests on the invariant the document is the source of truth — design, spec, and decisions are the record; code realizes them. That invariant needs a concrete home, or it stays a slogan. These two artifacts are that home:

  • CONTEXT.md keeps the vocabulary from drifting. When "user", "account", and "member" mean the same thing in three files, the design has already started to rot. One canonical term per concept keeps every later stage — spec, breakdown, reviews — talking about the same things.
  • docs/adr/ keeps the why of hard-to-reverse choices from evaporating. A decision that isn't recorded gets silently re-litigated or quietly reversed by an agent that never saw the trade-off.

Create both lazily — only when the first term or the first real decision appears. An empty CONTEXT.md on day one is ceremony; a stale one is worse than none.

Once-per-repo setup

Do this the first time the flow touches a repo. Keep it to what the flow actually needs:

  1. Decide where the artifacts live.
    • Single domain: CONTEXT.md + docs/adr/ at the repo root.
    • Multiple bounded contexts: a root CONTEXT-MAP.md pointing to src/<context>/CONTEXT.md + per-context docs/adr/.
  2. Record the conventions the flow assumes (a short block in CLAUDE.md / AGENTS.md, or a docs/agents/ note): where CONTEXT.md and ADRs live, and any project-specific rule the base invariants don't already cover.
  3. Don't scaffold empty files. Note the locations; create the files when the first term/decision actually lands (see below).

CONTEXT.md — the glossary

One entry per project-specific concept. Not a dictionary of general programming terms — only the words that mean something particular here.

## <Canonical term>
<What it IS, in 1–2 sentences — "is", not "does". State the thing, not its behavior.>
_Avoid:_ <synonyms/near-terms that must not be used for this concept>

Rules:

  • Is, not does. Define what the term is, not what it does.
  • One opinionated choice. Pick the canonical word; list the synonyms to avoid so they don't creep back.
  • Project-specific only. If it's a general programming concept, it doesn't belong.
  • Sharpen on contact. When a stage uses a fuzzy word, or a term two ways, resolve it here immediately — a concrete edge-case scenario is the fastest way to force precision.
  • Grow it lazily. Add a term the moment it's resolved; don't pre-populate.

docs/adr/ — decision records

Number sequentially: 0001-slug.md, 0002-slug.md.

# <NNNN>. <Decision title>
<The decision and the WHY, in 1–3 sentences.>
<!-- optional, only if they carry weight: Status · Considered options · Consequences -->

Offer an ADR sparingly — only when a decision is hard-to-reverse AND surprising AND the result of a real trade-off. Qualifies: architectural shape, integration pattern, technology lock-in, a boundary decision, a deliberate deviation, a rejected alternative with subtle reasoning. Does not qualify: routine choices, anything obvious, anything a reader would guess. An ADR for every decision is noise that buries the few that matter.

Keeping them live (every stage's job)

  • 7w3 design and spec cite CONTEXT.md terms and propose ADRs as decisions land.
  • Any stage that discovers a term drifting fixes it in CONTEXT.md then, not later.
  • When reality diverges from an ADR, update the ADR — don't let the code quietly redefine the decision. Same rule as the design of record: the document leads, code follows.

Source: Serge Shima (@aostrikov_agents_chat), Setup and domain model.

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.