Logo di Architecture Paradigm Domain Driven

Architecture Paradigm Domain Driven

Community
athola
architecture-paradigm-domain-driven

Models a business in its own language. Use when the domain has real business rules to capture.

Add to TypingMind

Panoramica

Pubblicato daathola
Repositoryclaude-night-market
Nome della skillarchitecture-paradigm-domain-driven
Stelle
343
Fork
37
File inclusi
Solo istruzioni
LicenzaMIT
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • Tutto nelle istruzioni

    Tutto ciò che serve al modello è nelle istruzioni: nessun file aggiuntivo da sincronizzare.

  • Open source

    Pubblicata da athola su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Architecture Paradigm Domain Driven in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/athola/claude-night-market/tree/master/plugins/archetypes/skills/architecture-paradigm-domain-driven
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/athola/claude-night-market.git /tmp/claude-night-market
mkdir -p .claude/skills
cp -r /tmp/claude-night-market/plugins/archetypes/skills/architecture-paradigm-domain-driven .claude/skills/architecture-paradigm-domain-driven
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Architecture Paradigm Domain Driven in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Architecture Paradigm Domain Driven non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Architecture Paradigm Domain Driven non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

The Domain-Driven Design Paradigm

Design for the future, build for now.

DDD is modeling a business in the business's own language. The goal is not to avoid structure. It is to avoid structure you cannot back out of, and to defer structure you do not yet need.

What DDD Is

Ubiquitous language, bounded contexts, and a model built by talking to the people who do the work. The measure of a domain model is whether a person in the business would recognize their own job in it.

What DDD Is Not

Clean Architecture. Mandatory layering. A mapper between every tier. A count of design patterns applied before the first line of business logic is written.

These are DDD-adjacent choices. Each has its own justification, and none of them is entailed by DDD. Wanting to decouple an API from the domain is a good reason to add a DTO. "This is what DDD requires" is not, because it does not.

Strategic Design Is The Core

The building blocks are not the point, and this is not the repo's opinion. Evans said so himself, ten years after the book, about the book:

"things like the entities and value objects [..] [People] come away thinking that that's really the core of DDD, whereas, in fact, it's really not."

"I really think that the way I arranged the book gives people the wrong emphasis, so that's the biggest part of what I do is rearrange those things."

Source: SE-Radio Episode 226, "Eric Evans on Domain-Driven Design at 10 Years" (video). Quotes as transcribed by The Core of Domain-Driven Design, which also cites his DDD Europe 2016 keynote criticizing the "over-emphasis on building blocks."

What the core actually is: discovering subdomains and drawing bounded contexts, in language the business already speaks. Entities, value objects, and aggregates are how a model reaches code once it exists. They are the translation, not the thing being translated.

Read the rest of this skill in that light. Every mechanism below is optional machinery serving a model you found by talking to people.

When To Use

  • The domain has business rules a domain expert could argue about.
  • The team can talk to the people who do the work being modeled.
  • The system is expected to grow into complexity you cannot yet name.

When NOT To Use

  • Domains with no meaningful business rules (CRUD over a form).
  • Single-actor tools with no business vocabulary to share.
  • Anything where the model would be a database schema with a new name.

Build For Now

Once a domain exists, create the data store and one concrete data object. Pass that object from the repository into the business layer. At the start of a project, pass it out to the view as well.

That is a legitimate starting state, not technical debt. One object moving through every layer is the cheapest thing that can work, and it is the shape the divergence protocol below is designed to split.

The Divergence Protocol

The DTO arrives at the moment of divergence, not in anticipation of it.

Trigger: the view's response shape must hold for contract reasons while the domain model needs to change.

Move: the old data object becomes the view DTO. The new domain object gains a translation into it. Where fields differ, a copy constructor maps them, in either direction as needed.

That is the whole mechanism. It works because the starting state (one shared object) is the same shape as the ending state's DTO, so the split costs one rename and one translation function. This is why "we might need a DTO later" is not a reason to build one now: later is cheap.

Shared-Type Options When Shapes Overlap

Ordered by cost:

  1. Same type in every layer. The default. If the objects look the same everywhere, use the same object.
  2. Builder, when different contexts select different subsets of one fixed field set.
  3. Shared base class with per-context subclasses (entity, DTO, domain object, JSON representation). Each context adds its own fields on top of a shared core. This reduces duplication when several contexts genuinely share that core.

Option 3 carries a cost worth stating plainly: inheritance couples the layers. Changing the base changes every context at once, which is the opposite of the flexibility the divergence protocol buys. It also feeds straight into the boundary hazard below. Reach for it when duplication is the larger present pain, and reach for it knowing what it trades away.

The IO Boundary Rule

Do not reuse a data type across a network or other IO boundary without validating that you are not sharing something you should not.

This is the one non-negotiable constraint in this skill. Everything else here can be deferred, dropped, or added later. This cannot.

Option 3 is where it bites hardest: a field added to a shared base class appears silently in every serialized representation that inherits it, including the one crossing the wire. The convenience is real and so is the leak.

Request DTOs Earn Their Keep Here

When two or more systems exchange commands over a network and do not deploy atomically, a versioned request DTO lets you introduce a new shape while continuing to serve the old one, and migrate the systems one at a time. Without it, any change to the command shape requires every system to update simultaneously, which fails the moment one update fails or one release waits on an app store, an IT department, or another team.

That is a deployment constraint, not a DDD principle. Name it as such when you justify the DTO, so the next reader knows which force put it there and when it can go.

Strangling An Existing Application Into Domains

Never in one pass. A refactor that tries to do every layer at once does not land. Per domain, in order:

  1. Data layer. Split fetching into a reasonable domain boundary.
  2. Business layer. One business entity, responsible for one domain.
  3. Strangle existing call sites over to that domain.
  4. View layer. Last.

Then repeat for the next domain. Keep the implementation simple until a need for more appears.

Adoption Steps

  1. Build the language. Talk to the people in the business. Write down the terms they use, and use exactly those terms in code.
  2. Draw the bounded contexts. Name where one meaning of a term stops and another starts. A term meaning two things is two contexts.
  3. Create the store and one data object. Pass it through the layers.
  4. Wait for divergence. Apply the protocol above when the contract and the model actually pull apart, not before.
  5. Audit the boundaries. Every type crossing IO gets its fields read.

Key Deliverables

  • A glossary of domain terms that a domain expert would sign off on.
  • A context map naming each bounded context and its relationships.
  • An ADR recording which ceremony was adopted and which need drove it.
  • A field audit for every type crossing an IO boundary.

Risks and Mitigations

  • Ceremony without need:
    • Mitigation: Name the current need in the pull request that adds any DTO, mapper, command object, or layer boundary, and apply the ceremony-audit lens in Skill(pensive:architecture-review). A mapper whose fields are all 1:1 copies is a mapper with no job.
  • Anemic model:
    • Mitigation: If the domain objects carry no behavior and every rule lives in a service, the model is a schema with a new name. Move the rules onto the objects that own them, or accept that this domain does not need DDD.
  • Silent field leak across a boundary:
    • Mitigation: The IO boundary rule above. Treat shared base classes as a leak risk, not just a duplication fix.

Concrete Components

Vocabulary for the tools and abstractions an implementation of this paradigm tends to carry. Not dependencies, and not tools: frontmatter.

  • ubiquitous-language-glossary: the term list the business and the code both use, maintained as a first-class artifact
  • context-map: names each bounded context and the relationships between them, including where one term changes meaning
  • copy-constructor: the translation introduced at the moment of divergence, mapping fields between a domain object and its view DTO

Exit Criteria

  • The domain model uses terms a person in the business would recognize without translation.
  • Every mapper in the codebase has at least one field that is not a 1:1 copy, or a documented contract reason to exist.
  • Every type crossing an IO boundary has had its fields audited for what they expose.
  • A decomposition in progress names which domain is being strangled and which layer it has reached.

Domande frequenti

Cosa fa la skill IA Architecture Paradigm Domain Driven?

Models a business in its own language. Use when the domain has real business rules to capture.

Perché usare Architecture Paradigm Domain Driven su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Architecture Paradigm Domain Driven è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Architecture Paradigm Domain Driven in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/athola/claude-night-market/tree/master/plugins/archetypes/skills/architecture-paradigm-domain-driven. TypingMind legge il file SKILL.md e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Architecture Paradigm Domain Driven?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Architecture Paradigm Domain Driven?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Architecture Paradigm Domain Driven: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Architecture Paradigm Domain Driven è gratuita?

Sì. È pubblicata su GitHub da athola con licenza MIT. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇