/ddd-ts-kit:bounded-contexts [context or concept under discussion]from ddd-ts-kit
Guides cutting systems into bounded contexts using DDD patterns. Tests language, autonomy, consistency, size, and team fit to propose and classify contexts as core, supporting, or generic.
Ships in ddd-ts-kit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Under discussion: $ARGUMENTS
Input: docs/architecture/discovery.md for a new system, npx ddd-ts-kit list for an
existing one. Boundaries are the owner's decision: propose, argue, wait.
The terms of one context are skill ddd-ts-kit:glossary; the relationships between contexts,
skill ddd-ts-kit:context-map.
Walk the timeline of the discovery and group commands and events that speak one language. A boundary usually sits where:
| Test | Question | A no means |
|---|---|---|
| Language | Does every term have one meaning inside? | split |
| Autonomy | Can its rules change without its neighbours noticing? Is there one owner? | move the shared rule to one side |
| Consistency | Is everything that must be true at the same instant inside one context? | merge, or accept eventual consistency and say so |
| Size | Does it decide something, beyond storing data for another? | it is a table of its neighbour, merge |
| Team | Could one person or one agent hold it in mind alone? | split along the next language seam |
Prefer few contexts. Two well-named ones beat five guessed ones, and splitting later is cheap when the language is clean. Warning signs: a use case writing in two contexts, a context needing most fields of another's aggregate, a shared kernel that grows.
| Classification | It is | Consequence |
|---|---|---|
core | why the business wins | richest model, most tests, best people, never bought |
supporting | needed and specific, not differentiating | simple model, plain design |
generic | solved elsewhere (identity, payment, mail) | buy or wrap behind an anti-corruption layer |
One or two cores at most: if everything is core, nothing is.
There is no sub-context, child context or nested context in the references (Evans, DDD
Reference). A part with a language of its own is a context; a part of one model, same
language, same schema, same transaction, is a module of the model: one folder of the
context holding its own layers (<module>/domain/, <module>/application/, ...), declared in
contexts.<name>.modules, named with glossary terms
(docs/concepts/modules.md). Its tests go with it (<module>/test/), and what belongs to no module
is in one shared/ folder, never a module name; no layer folder stays at the root.
shared, common, core).context/no-cycle): ask in this order
(docs/guides/cycle-between-contexts.md): 1. one language, one model? then one context
divided into modules; 2. can one direction become an integration event? 3. is a concept
missing, the one both fight over? Refusing the cycle is a choice of the kit, not of DDD.docs/guides/many-dependencies.md.Once the owner agreed, npx ddd-ts-kit generate module <context> <module> --purpose "..." and
npx ddd-ts-kit move-to-module <context> <module> <path>... (a path may be a spec, a fake or a builder; a move that would close a cycle between modules is refused with the file to move along: follow it, --allow-cycle is the owner's call; npx ddd-ts-kit context-layout moves a project laid out before) (skill ddd-ts-kit:scaffold).
# Bounded contexts
| Context | Classification | Purpose (two sentences, business terms) | Owns (events of the timeline) | Owner |
|---|---|---|---|---|
| ordering | core | Takes and tracks customer orders. ... | 1 to 4 | sales |
## Why these boundaries
- ordering / billing: "order" means a request to sales and a debt to accounting (language).
## Rejected cuts
- a separate `pricing` context: no rule of its own yet; revisit when discounts arrive.
Names are kebab-case nouns of the business (ordering, claims-handling), never technical
(core, common, api, data; the generator refuses schema, the main file of a Prisma schema). In an existing project a new context is created with
npx ddd-ts-kit generate context (skill ddd-ts-kit:scaffold) once the owner agreed. A row
that is a preset of the kit (identity) says so in its Purpose cell (preset: identity): its
glossary is the preset's, see ddd-ts-kit:glossary.
Put this to the owner: is each context one language and one owner, is the core named, and
is every boundary argued in one line? On a yes, the next step is ddd-ts-kit:glossary.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
26 skills in this plugin
/access-controlUse when adding a permission, a role or an ownership rule, when code needs the connected user or the tenant, when filtering a list by rights, or on an authz/* rule. Authentication, authorization, access scopes, policies, RBAC, ABAC, ReBAC./bootstrapChooses the stack and creates the project with the ddd-ts-kit CLI: config, platform, database, pipeline, contexts, in an empty directory or an existing backend. Run by the user with /ddd-ts-kit:bootstrap./clean-codeUse when a clean/*, purity/* or language/* rule is reported, or when asked to clean, simplify, rename or make code more readable: business names, small functions, stepdown order, comments only for what code cannot say, no escape hatches, Clock, IdGenerator./commit-disciplineUse when about to commit, when asked to commit, to write a commit message or to split a change, or when the guard reports too many uncommitted changes. One use case or concept per commit, messages scoped by context./context-mapUse when two contexts depend on each other, a context needs data or a reaction from another, when choosing upstream, downstream and pattern (customer-supplier, conformist, anti-corruption layer, open-host service, shared kernel, published language), or on context/* rules./cross-cuttingUse for logs, metrics, traces, error tracking, audit log, retry, timeout, circuit breaker, cache, rate limit, choosing a logger, correlation id, tenant or session, a home-made Logger, UserContext or paginated result, on aspects/*, standard/*, a tracing or audit import in domain or application.npx claudepluginhub ddd-ts-kit/ddd-ts-kit --plugin ddd-ts-kitOther plugins' skills for the same job