New, List, Map
The strategic layer — bounded contexts, context relationships, subdomains — is the most consequential layer of the corpus. @frenchexdev/ddd-cli-plugin-bc gives the operator three verbs to inspect and extend it: bc:new to scaffold a new context, bc:list to inventory existing ones, bc:map to render the full strategic map.
The Three Tasks
bc:new <name> — scaffold a new bounded-context skeleton at the consumer site. Produces a typed anchor class with @BoundedContext({ name }) and an empty ubiquitous map ready for the team to populate. The discipline of one bounded context per file, named after the context's strategic identity lives in the scaffolder.
bc:list — scan the workspace for @BoundedContext-decorated classes and print each with its name, source file, and declared ubiquitous-language term count. Output is the operator's quick what contexts exist here answer without grepping.
bc:map — render the context map. Combines the BOUNDED_CONTEXT_REGISTRY (every BC, sorted) and the RELATIONSHIP_REGISTRY (every relationship, with power-directed arrows) into a single Mermaid flowchart. The result is the strategic diagram, generated from the source of truth (the decorators), not hand-drawn from the architect's memory.
The three tasks together cover the operator's strategic workflow: add a context, audit the contexts, visualise their relationships.
Cross-Links
- Reads
BOUNDED_CONTEXT_REGISTRYemitted by BoundedContext codegen. - Reads
RELATIONSHIP_REGISTRYand per-relationshipCONTEXT_MAP_FRAGMENToutputs from ContextRelationship codegen. - Built on CLI Framework + CLI Kernel.
Back to the series index.