@phuc1403/musketeer 0.9.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/INSTALLATION.md +52 -52
- package/bin/musketeer.js +168 -168
- package/package.json +48 -48
- package/src/dotnet-scaffold-copier.js +79 -79
- package/src/provisioner/detect.js +93 -93
- package/src/self-update.js +77 -77
- package/template/.claude/agents/git-manager.md +18 -18
- package/template/.claude/agents/hallmark-auditor.md +78 -78
- package/template/.claude/agents/researcher.md +33 -33
- package/template/.claude/hooks/block-unsafe-adr-title.cjs +85 -85
- package/template/.claude/hooks/init-adr-dir.cjs +173 -173
- package/template/.claude/hooks/inject-adr-flags.cjs +94 -94
- package/template/.claude/hooks/lib/adr/command-scan.cjs +115 -115
- package/template/.claude/hooks/lib/characteristics/checker.cjs +357 -357
- package/template/.claude/hooks/lib/git-info-cache.cjs +191 -191
- package/template/.claude/hooks/sync-adr-toc.cjs +146 -146
- package/template/.claude/hooks/usage-quota-cache-refresh.cjs +166 -166
- package/template/.claude/hooks/validate-characteristics-hook.cjs +66 -66
- package/template/.claude/hooks/validate-cml-hook.js +145 -145
- package/template/.claude/skills/adr-writer/SKILL.md +48 -48
- package/template/.claude/skills/adr-writer/references/adr-example.md +35 -35
- package/template/.claude/skills/architecture-characteristic-writer/SKILL.md +215 -215
- package/template/.claude/skills/architecture-characteristic-writer/assets/worksheet-template.md +29 -29
- package/template/.claude/skills/architecture-characteristic-writer/references/characteristics-catalog.md +40 -40
- package/template/.claude/skills/architecture-characteristic-writer/scripts/ranking-table.cjs +171 -171
- package/template/.claude/skills/context-map/SKILL.md +80 -80
- package/template/.claude/skills/context-map/example.cml +106 -106
- package/template/.claude/skills/context-map/reference/Bounded Context/Bounded Context.md +40 -40
- package/template/.claude/skills/context-map/reference/Bounded Context/businessModel.md +5 -5
- package/template/.claude/skills/context-map/reference/Bounded Context/domainVisionStatement.md +2 -2
- package/template/.claude/skills/context-map/reference/Bounded Context/evolution.md +5 -5
- package/template/.claude/skills/context-map/reference/Bounded Context/implementationTechnology.md +1 -1
- package/template/.claude/skills/context-map/reference/Bounded Context/implements.md +1 -1
- package/template/.claude/skills/context-map/reference/Bounded Context/knowledgeLevel.md +4 -4
- package/template/.claude/skills/context-map/reference/Bounded Context/realizes.md +9 -9
- package/template/.claude/skills/context-map/reference/Bounded Context/refines.md +10 -10
- package/template/.claude/skills/context-map/reference/Bounded Context/responsibilities.md +26 -26
- package/template/.claude/skills/context-map/reference/Bounded Context/type.md +23 -23
- package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Anticorruption Layer.md +5 -5
- package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Bounded Context Relationship.md +12 -12
- package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Conformist.md +5 -5
- package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Customer-Supplier (C-S).md +22 -22
- package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Open Host Service.md +4 -4
- package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Partnership (P).md +13 -13
- package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Published Language.md +4 -4
- package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Shared Kernel (SK).md +12 -12
- package/template/.claude/skills/context-map/reference/Context Map.md +62 -62
- package/template/.claude/skills/context-map/reference/Domain/Domain.md +30 -30
- package/template/.claude/skills/context-map/reference/Domain/supports.md +33 -33
- package/template/.claude/skills/context-map/reference/Domain/type.md +3 -3
- package/template/.claude/skills/context-map/reference/Semantic Rules.md +32 -32
- package/template/.claude/skills/hallmark/SKILL.md +552 -552
- package/template/.claude/skills/hallmark/references/anti-patterns.md +412 -412
- package/template/.claude/skills/hallmark/references/assets.md +406 -406
- package/template/.claude/skills/hallmark/references/color.md +95 -95
- package/template/.claude/skills/hallmark/references/component-cookbook.md +256 -256
- package/template/.claude/skills/hallmark/references/components/c1-outlined-chip.md +12 -12
- package/template/.claude/skills/hallmark/references/components/c2-inline-form-as-cta.md +16 -16
- package/template/.claude/skills/hallmark/references/components/c3-typographic-link.md +8 -8
- package/template/.claude/skills/hallmark/references/components/c4-sticky-bottom-bar.md +16 -16
- package/template/.claude/skills/hallmark/references/components/f1-bento-grid.md +20 -20
- package/template/.claude/skills/hallmark/references/components/f2-sticky-scroll-stack.md +20 -20
- package/template/.claude/skills/hallmark/references/components/f3-tabular-spec-sheet.md +11 -11
- package/template/.claude/skills/hallmark/references/components/f4-step-sequence.md +11 -11
- package/template/.claude/skills/hallmark/references/components/f5-annotated-screenshot.md +11 -11
- package/template/.claude/skills/hallmark/references/components/f6-product-card-grid.md +41 -41
- package/template/.claude/skills/hallmark/references/components/ft1-mast-headed.md +13 -13
- package/template/.claude/skills/hallmark/references/components/ft2-inline-rule-single-line.md +10 -10
- package/template/.claude/skills/hallmark/references/components/ft3-index-style-category-list.md +12 -12
- package/template/.claude/skills/hallmark/references/components/ft4-dense-typographic.md +10 -10
- package/template/.claude/skills/hallmark/references/components/ft5-statement.md +21 -21
- package/template/.claude/skills/hallmark/references/components/ft6-letter-close.md +19 -19
- package/template/.claude/skills/hallmark/references/components/ft7-newsletter-first.md +27 -27
- package/template/.claude/skills/hallmark/references/components/ft8-marquee-scroll.md +25 -25
- package/template/.claude/skills/hallmark/references/components/h1-marquee.md +15 -15
- package/template/.claude/skills/hallmark/references/components/h2-split-diptych.md +15 -15
- package/template/.claude/skills/hallmark/references/components/h3-quote-led.md +11 -11
- package/template/.claude/skills/hallmark/references/components/h4-stat-led.md +14 -14
- package/template/.claude/skills/hallmark/references/components/h5-letter-hero.md +11 -11
- package/template/.claude/skills/hallmark/references/components/h6-photographic-fold.md +16 -16
- package/template/.claude/skills/hallmark/references/components/h7-demo-video-clipped-by-viewport-edge.md +27 -27
- package/template/.claude/skills/hallmark/references/components/h8-mockup-split-browser-framed.md +23 -23
- package/template/.claude/skills/hallmark/references/components/h9-custom-illustration-centerpiece.md +27 -27
- package/template/.claude/skills/hallmark/references/components/n1-wordmark-2-links.md +12 -12
- package/template/.claude/skills/hallmark/references/components/n10-floating-on-scroll-morph.md +19 -19
- package/template/.claude/skills/hallmark/references/components/n2-floating-chip.md +14 -14
- package/template/.claude/skills/hallmark/references/components/n3-side-rail.md +14 -14
- package/template/.claude/skills/hallmark/references/components/n4-hidden-behind-k.md +9 -9
- package/template/.claude/skills/hallmark/references/components/n5-floating-pill.md +28 -28
- package/template/.claude/skills/hallmark/references/components/n6-newspaper-masthead.md +24 -24
- package/template/.claude/skills/hallmark/references/components/n7-brutal-slab.md +22 -22
- package/template/.claude/skills/hallmark/references/components/n8-terminal-command.md +21 -21
- package/template/.claude/skills/hallmark/references/components/n9-edge-aligned-minimal.md +17 -17
- package/template/.claude/skills/hallmark/references/components/s1-left-margin-numbered.md +15 -15
- package/template/.claude/skills/hallmark/references/components/s2-hanging.md +13 -13
- package/template/.claude/skills/hallmark/references/components/s3-sticky-pinned.md +19 -19
- package/template/.claude/skills/hallmark/references/components/s4-inline-no-break.md +11 -11
- package/template/.claude/skills/hallmark/references/components/s5-bottom-anchored.md +13 -13
- package/template/.claude/skills/hallmark/references/components/t1-pull-quote-with-marginalia.md +12 -12
- package/template/.claude/skills/hallmark/references/components/t2-logo-wall-hairline.md +19 -19
- package/template/.claude/skills/hallmark/references/components/t3-single-huge-quote.md +11 -11
- package/template/.claude/skills/hallmark/references/components/t4-numbered-stat-strip.md +14 -14
- package/template/.claude/skills/hallmark/references/contract.md +24 -24
- package/template/.claude/skills/hallmark/references/copy.md +182 -182
- package/template/.claude/skills/hallmark/references/custom-craft.md +626 -626
- package/template/.claude/skills/hallmark/references/custom-theme.md +329 -329
- package/template/.claude/skills/hallmark/references/design-md.md +116 -116
- package/template/.claude/skills/hallmark/references/export-formats.md +328 -328
- package/template/.claude/skills/hallmark/references/floating-nav.md +89 -89
- package/template/.claude/skills/hallmark/references/genres/atmospheric.md +65 -65
- package/template/.claude/skills/hallmark/references/genres/editorial.md +70 -70
- package/template/.claude/skills/hallmark/references/genres/modern-minimal.md +67 -67
- package/template/.claude/skills/hallmark/references/genres/playful.md +65 -65
- package/template/.claude/skills/hallmark/references/hero-enrichment.md +474 -474
- package/template/.claude/skills/hallmark/references/imagery-kit.md +170 -170
- package/template/.claude/skills/hallmark/references/interaction-and-states.md +207 -207
- package/template/.claude/skills/hallmark/references/layout-and-space.md +111 -111
- package/template/.claude/skills/hallmark/references/macrostructures/01-bento-grid.md +35 -35
- package/template/.claude/skills/hallmark/references/macrostructures/02-long-document.md +34 -34
- package/template/.claude/skills/hallmark/references/macrostructures/03-marquee-hero.md +31 -31
- package/template/.claude/skills/hallmark/references/macrostructures/04-stat-led.md +32 -32
- package/template/.claude/skills/hallmark/references/macrostructures/05-workbench.md +32 -32
- package/template/.claude/skills/hallmark/references/macrostructures/06-conversational-faq.md +33 -33
- package/template/.claude/skills/hallmark/references/macrostructures/07-manifesto.md +32 -32
- package/template/.claude/skills/hallmark/references/macrostructures/08-photographic.md +34 -34
- package/template/.claude/skills/hallmark/references/macrostructures/09-quote-led.md +32 -32
- package/template/.claude/skills/hallmark/references/macrostructures/10-specimen.md +32 -32
- package/template/.claude/skills/hallmark/references/macrostructures/11-catalogue.md +23 -23
- package/template/.claude/skills/hallmark/references/macrostructures/12-letter.md +23 -23
- package/template/.claude/skills/hallmark/references/macrostructures/13-index-first.md +23 -23
- package/template/.claude/skills/hallmark/references/macrostructures/14-narrative-workflow.md +23 -23
- package/template/.claude/skills/hallmark/references/macrostructures/15-split-studio.md +23 -23
- package/template/.claude/skills/hallmark/references/macrostructures/16-feature-stack.md +23 -23
- package/template/.claude/skills/hallmark/references/macrostructures/17-type-specimen.md +23 -23
- package/template/.claude/skills/hallmark/references/macrostructures/18-portfolio-grid.md +23 -23
- package/template/.claude/skills/hallmark/references/macrostructures/19-map-diagram.md +23 -23
- package/template/.claude/skills/hallmark/references/macrostructures/20-ecosystem-index.md +23 -23
- package/template/.claude/skills/hallmark/references/macrostructures/21-component-playground.md +23 -23
- package/template/.claude/skills/hallmark/references/macrostructures.md +89 -89
- package/template/.claude/skills/hallmark/references/microinteractions.md +260 -260
- package/template/.claude/skills/hallmark/references/motion.md +109 -109
- package/template/.claude/skills/hallmark/references/preview-examples.md +49 -49
- package/template/.claude/skills/hallmark/references/responsive.md +138 -138
- package/template/.claude/skills/hallmark/references/slop-test.md +205 -205
- package/template/.claude/skills/hallmark/references/structure.md +164 -164
- package/template/.claude/skills/hallmark/references/study.md +511 -511
- package/template/.claude/skills/hallmark/references/typography.md +243 -243
- package/template/.claude/skills/hallmark/references/verbs/audit.md +25 -25
- package/template/.claude/skills/hallmark/references/verbs/redesign.md +269 -269
- package/template/.claude/skills/hallmark-loop/SKILL.md +105 -105
- package/template/.claude/skills/hallmark-loop/references/auditor-call.md +60 -60
- package/template/.claude/skills/hallmark-loop/references/capture.md +78 -78
- package/template/.claude/skills/hallmark-loop/references/loop-control.md +79 -79
- package/template/.claude/skills/handoff/SKILL.md +15 -15
- package/template/.claude/skills/knowledge-crunching/SKILL.md +94 -94
- package/template/.claude/skills/research/SKILL.md +69 -69
- package/template/.claude/skills/tdd/SKILL.md +142 -142
- package/template/.claude/skills/tdd/deep-modules.md +15 -15
- package/template/.claude/skills/tdd/interface-design.md +31 -31
- package/template/.claude/skills/tdd/mocking.md +59 -59
- package/template/.claude/skills/tdd/refactoring.md +10 -10
- package/template/.claude/skills/tdd/tests.md +61 -61
- package/template/.claude/statusline.cjs +100 -37
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
```cml
|
|
2
|
-
CargoBookingContext [SK]<->[SK] VoyagePlanningContext {
|
|
3
|
-
implementationTechnology = "Java Library"
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
argoBookingContext Shared-Kernel VoyagePlanningContext {
|
|
7
|
-
implementationTechnology = "Java Library"
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
CargoBookingContext Shared-Kernel VoyagePlanningContext : BookingVoyageRelationship {
|
|
11
|
-
implementationTechnology = "Java Library"
|
|
12
|
-
}
|
|
1
|
+
```cml
|
|
2
|
+
CargoBookingContext [SK]<->[SK] VoyagePlanningContext {
|
|
3
|
+
implementationTechnology = "Java Library"
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
argoBookingContext Shared-Kernel VoyagePlanningContext {
|
|
7
|
+
implementationTechnology = "Java Library"
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
CargoBookingContext Shared-Kernel VoyagePlanningContext : BookingVoyageRelationship {
|
|
11
|
+
implementationTechnology = "Java Library"
|
|
12
|
+
}
|
|
13
13
|
```
|
|
@@ -1,63 +1,63 @@
|
|
|
1
|
-
A context map contains bounded contexts and defines their relationships.
|
|
2
|
-
|
|
3
|
-
```cml
|
|
4
|
-
ContextMap DDDSampleContextMap {
|
|
5
|
-
type SYSTEM_LANDSCAPE
|
|
6
|
-
state AS_IS
|
|
7
|
-
// type = SYSTEM_LANDSCAPE
|
|
8
|
-
// state = AS_IS
|
|
9
|
-
|
|
10
|
-
contains CargoBookingContext, VoyagePlanningContext, LocationContext
|
|
11
|
-
// contains CargoBookingContext
|
|
12
|
-
// contains VoyagePlanningContext
|
|
13
|
-
// contains LocationContext
|
|
14
|
-
|
|
15
|
-
CargoBookingContext [SK]<->[SK] VoyagePlanningContext
|
|
16
|
-
}
|
|
17
|
-
```
|
|
18
|
-
A context map can be of one of the following `type`s:
|
|
19
|
-
- `SYSTEM_LANDSCAPE` represents the default type of context map in which the bounded contexts represent software systems (or applications).
|
|
20
|
-
- `ORGANIZATIONAL` map (or ‘team map’) illustrates the relationships between teams.
|
|
21
|
-
|
|
22
|
-
The `state` expressing whether the given context map represents the current or a desired state:
|
|
23
|
-
- `AS_IS`: Current State
|
|
24
|
-
- `TO_BE`: Desired State
|
|
25
|
-
[[Bounded Context Relationship]]
|
|
26
|
-
# Relationship Roles
|
|
27
|
-
You can further specify the relationship roles such as Open Host Service (OHS) or Anti-Corruption Layer (ACL) within the brackets. Roles must always be specified behind the U (upstream) and the D (downstream) if they are not omitted.
|
|
28
|
-
|
|
29
|
-
```cml
|
|
30
|
-
VoyagePlanningContext [D,ACL]<-[U,OHS,PL] LocationContext
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
Upstream roles:
|
|
34
|
-
- Open Host Service (OHS)
|
|
35
|
-
- Published Language (PL)
|
|
36
|
-
The patterns OHS and PL can only be implemented by the upstream context in an upstream-downstream relationship. The upstream context always provides and exposes a certain functionality. The downstream context uses and consumes this services and does not expose parts of his/her own domain model. If this was the case and the upstream used this functionality, the definition that the upstream is independent of the downstream would be contradicted.
|
|
37
|
-
|
|
38
|
-
Downstream roles:
|
|
39
|
-
- Conformist (CF)
|
|
40
|
-
- Anticorruption Layer (ACL).
|
|
41
|
-
# Relationship Attributes
|
|
42
|
-
`implementationTechnology`: Within the body of the declaration, it is possible to specify the implementation technology used to realize this relationship:
|
|
43
|
-
|
|
44
|
-
`downstreamRights`: defines which governance rights, and therefore which influence, the downstream has on the upstream within the specified relationship:
|
|
45
|
-
The possible governance rights values are:
|
|
46
|
-
- INFLUENCER
|
|
47
|
-
- OPINION_LEADER
|
|
48
|
-
- VETO_RIGHT
|
|
49
|
-
- DECISION_MAKER
|
|
50
|
-
- MONOPOLIST
|
|
51
|
-
|
|
52
|
-
`exposedAggregates`: offers the possibility to declare which Aggregates of the upstream bounded context are exposed in order to realize this relationship. The attribute takes a comma-separated list of references to Aggregates. The referenced Aggregates must be part of the upstream context of the relationship.
|
|
53
|
-
|
|
54
|
-
```cml
|
|
55
|
-
VoyagePlanningContext [D,ACL]<-[U,OHS,PL] LocationContext {
|
|
56
|
-
implementationTechnology = "RESTful HTTP"
|
|
57
|
-
downstreamRights = VETO_RIGHT
|
|
58
|
-
exposedAggregates = Customers, Addresses
|
|
59
|
-
}
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
[[Bounded Context]]
|
|
1
|
+
A context map contains bounded contexts and defines their relationships.
|
|
2
|
+
|
|
3
|
+
```cml
|
|
4
|
+
ContextMap DDDSampleContextMap {
|
|
5
|
+
type SYSTEM_LANDSCAPE
|
|
6
|
+
state AS_IS
|
|
7
|
+
// type = SYSTEM_LANDSCAPE
|
|
8
|
+
// state = AS_IS
|
|
9
|
+
|
|
10
|
+
contains CargoBookingContext, VoyagePlanningContext, LocationContext
|
|
11
|
+
// contains CargoBookingContext
|
|
12
|
+
// contains VoyagePlanningContext
|
|
13
|
+
// contains LocationContext
|
|
14
|
+
|
|
15
|
+
CargoBookingContext [SK]<->[SK] VoyagePlanningContext
|
|
16
|
+
}
|
|
17
|
+
```
|
|
18
|
+
A context map can be of one of the following `type`s:
|
|
19
|
+
- `SYSTEM_LANDSCAPE` represents the default type of context map in which the bounded contexts represent software systems (or applications).
|
|
20
|
+
- `ORGANIZATIONAL` map (or ‘team map’) illustrates the relationships between teams.
|
|
21
|
+
|
|
22
|
+
The `state` expressing whether the given context map represents the current or a desired state:
|
|
23
|
+
- `AS_IS`: Current State
|
|
24
|
+
- `TO_BE`: Desired State
|
|
25
|
+
[[Bounded Context Relationship]]
|
|
26
|
+
# Relationship Roles
|
|
27
|
+
You can further specify the relationship roles such as Open Host Service (OHS) or Anti-Corruption Layer (ACL) within the brackets. Roles must always be specified behind the U (upstream) and the D (downstream) if they are not omitted.
|
|
28
|
+
|
|
29
|
+
```cml
|
|
30
|
+
VoyagePlanningContext [D,ACL]<-[U,OHS,PL] LocationContext
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Upstream roles:
|
|
34
|
+
- Open Host Service (OHS)
|
|
35
|
+
- Published Language (PL)
|
|
36
|
+
The patterns OHS and PL can only be implemented by the upstream context in an upstream-downstream relationship. The upstream context always provides and exposes a certain functionality. The downstream context uses and consumes this services and does not expose parts of his/her own domain model. If this was the case and the upstream used this functionality, the definition that the upstream is independent of the downstream would be contradicted.
|
|
37
|
+
|
|
38
|
+
Downstream roles:
|
|
39
|
+
- Conformist (CF)
|
|
40
|
+
- Anticorruption Layer (ACL).
|
|
41
|
+
# Relationship Attributes
|
|
42
|
+
`implementationTechnology`: Within the body of the declaration, it is possible to specify the implementation technology used to realize this relationship:
|
|
43
|
+
|
|
44
|
+
`downstreamRights`: defines which governance rights, and therefore which influence, the downstream has on the upstream within the specified relationship:
|
|
45
|
+
The possible governance rights values are:
|
|
46
|
+
- INFLUENCER
|
|
47
|
+
- OPINION_LEADER
|
|
48
|
+
- VETO_RIGHT
|
|
49
|
+
- DECISION_MAKER
|
|
50
|
+
- MONOPOLIST
|
|
51
|
+
|
|
52
|
+
`exposedAggregates`: offers the possibility to declare which Aggregates of the upstream bounded context are exposed in order to realize this relationship. The attribute takes a comma-separated list of references to Aggregates. The referenced Aggregates must be part of the upstream context of the relationship.
|
|
53
|
+
|
|
54
|
+
```cml
|
|
55
|
+
VoyagePlanningContext [D,ACL]<-[U,OHS,PL] LocationContext {
|
|
56
|
+
implementationTechnology = "RESTful HTTP"
|
|
57
|
+
downstreamRights = VETO_RIGHT
|
|
58
|
+
exposedAggregates = Customers, Addresses
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
[[Bounded Context]]
|
|
63
63
|
[[Semantic Rules]]
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
Domains are defined on the root level of a CML file.
|
|
2
|
-
They provide a container to specify all subdomains which are then referenced on a bounded context with the `implements` keyword.
|
|
3
|
-
A bounded context can also implement the compete domain.
|
|
4
|
-
|
|
5
|
-
```cml
|
|
6
|
-
/* Syntax example: Domain and Subdomains */
|
|
7
|
-
Domain Insurance {
|
|
8
|
-
domainVisionStatement = "Insurance domain vision statement ..."
|
|
9
|
-
|
|
10
|
-
Subdomain CustomerManagementDomain {
|
|
11
|
-
type = CORE_DOMAIN
|
|
12
|
-
domainVisionStatement = "Subdomain managing everything customer-related."
|
|
13
|
-
|
|
14
|
-
Entity Customer {
|
|
15
|
-
String firstname
|
|
16
|
-
String familyname
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
/* Add more entities ... */
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
Subdomain ContractManagementDomain {}
|
|
23
|
-
|
|
24
|
-
/* Add more subdomains ... */
|
|
25
|
-
}
|
|
26
|
-
```
|
|
27
|
-
[[domainVisionStatement]]
|
|
28
|
-
[[Domain-Driven Design/Context Map/Domain/type|type]]
|
|
29
|
-
[[supports]]
|
|
30
|
-
|
|
1
|
+
Domains are defined on the root level of a CML file.
|
|
2
|
+
They provide a container to specify all subdomains which are then referenced on a bounded context with the `implements` keyword.
|
|
3
|
+
A bounded context can also implement the compete domain.
|
|
4
|
+
|
|
5
|
+
```cml
|
|
6
|
+
/* Syntax example: Domain and Subdomains */
|
|
7
|
+
Domain Insurance {
|
|
8
|
+
domainVisionStatement = "Insurance domain vision statement ..."
|
|
9
|
+
|
|
10
|
+
Subdomain CustomerManagementDomain {
|
|
11
|
+
type = CORE_DOMAIN
|
|
12
|
+
domainVisionStatement = "Subdomain managing everything customer-related."
|
|
13
|
+
|
|
14
|
+
Entity Customer {
|
|
15
|
+
String firstname
|
|
16
|
+
String familyname
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/* Add more entities ... */
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
Subdomain ContractManagementDomain {}
|
|
23
|
+
|
|
24
|
+
/* Add more subdomains ... */
|
|
25
|
+
}
|
|
26
|
+
```
|
|
27
|
+
[[domainVisionStatement]]
|
|
28
|
+
[[Domain-Driven Design/Context Map/Domain/type|type]]
|
|
29
|
+
[[supports]]
|
|
30
|
+
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
The `supports` keyword specifies which user requirements a Subdomain implements.
|
|
2
|
-
|
|
3
|
-
```cml
|
|
4
|
-
/* Syntax example for Subdomain that supports specific user requirements: */
|
|
5
|
-
Domain Insurance {
|
|
6
|
-
domainVisionStatement = "Insurance domain vision statement ..."
|
|
7
|
-
|
|
8
|
-
Subdomain CustomerManagementDomain supports CreateCustomers, CreateCustomerAddresses {
|
|
9
|
-
type = CORE_DOMAIN
|
|
10
|
-
domainVisionStatement = "Subdomain managing everything customer-related."
|
|
11
|
-
|
|
12
|
-
Entity Customer {
|
|
13
|
-
String firstname
|
|
14
|
-
String familyname
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
UserStory CreateCustomers {
|
|
21
|
-
As an "Insurance Employee"
|
|
22
|
-
I want to "create" a "Customer" with its "firstname", "lastname"
|
|
23
|
-
so that "I am able to manage the customers data and offer them insurance contracts."
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
UserStory CreateCustomerAddresses {
|
|
27
|
-
As an "Insurance Employee"
|
|
28
|
-
I want to "create" an "Address" for a "Customer"
|
|
29
|
-
I want to "update" an "Address" for a "Customer"
|
|
30
|
-
so that "I am able to manage the customers addresses."
|
|
31
|
-
}
|
|
32
|
-
```
|
|
33
|
-
|
|
1
|
+
The `supports` keyword specifies which user requirements a Subdomain implements.
|
|
2
|
+
|
|
3
|
+
```cml
|
|
4
|
+
/* Syntax example for Subdomain that supports specific user requirements: */
|
|
5
|
+
Domain Insurance {
|
|
6
|
+
domainVisionStatement = "Insurance domain vision statement ..."
|
|
7
|
+
|
|
8
|
+
Subdomain CustomerManagementDomain supports CreateCustomers, CreateCustomerAddresses {
|
|
9
|
+
type = CORE_DOMAIN
|
|
10
|
+
domainVisionStatement = "Subdomain managing everything customer-related."
|
|
11
|
+
|
|
12
|
+
Entity Customer {
|
|
13
|
+
String firstname
|
|
14
|
+
String familyname
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
UserStory CreateCustomers {
|
|
21
|
+
As an "Insurance Employee"
|
|
22
|
+
I want to "create" a "Customer" with its "firstname", "lastname"
|
|
23
|
+
so that "I am able to manage the customers data and offer them insurance contracts."
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
UserStory CreateCustomerAddresses {
|
|
27
|
+
As an "Insurance Employee"
|
|
28
|
+
I want to "create" an "Address" for a "Customer"
|
|
29
|
+
I want to "update" an "Address" for a "Customer"
|
|
30
|
+
so that "I am able to manage the customers addresses."
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
34
|
[[UserStory]]
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
CORE_DOMAIN
|
|
2
|
-
SUPPORTING_DOMAIN
|
|
3
|
-
GENERIC_SUBDOMAIN
|
|
1
|
+
CORE_DOMAIN
|
|
2
|
+
SUPPORTING_DOMAIN
|
|
3
|
+
GENERIC_SUBDOMAIN
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
The following semantic rules are either implicitly given by the domain model on which the language is based (see above), or enforced by corresponding semantic checkers.
|
|
2
|
-
|
|
3
|
-
Note that the model and the semantic rules express how we understand the DDD patterns and how they can be combined, and how we applied DDD on projects ourselves. Rationale: the literature is somewhat ambiguous.
|
|
4
|
-
|
|
5
|
-
# 1: Permitted Upstream Roles
|
|
6
|
-
The patterns OHS and PL can only be implemented by the upstream context in an upstream-downstream relationship. The upstream context always provides and exposes a certain functionality. The downstream context uses and consumes this services and does not expose parts of his/her own domain model. If this was the case and the upstream used this functionality, the definition that the upstream is independent of the downstream would be contradicted.
|
|
7
|
-
|
|
8
|
-
# 2: Permitted Downstream Roles
|
|
9
|
-
The patterns ACL and CF can only be applied by the downstream context in an upstream-downstream relationship. These patterns solve a downstream problem, namely how to deal with a dependency to another context. It is always the downstream context that has to integrate the upstream model.
|
|
10
|
-
|
|
11
|
-
# 3: Protect or Conform
|
|
12
|
-
The patterns ACL and CF cannot be applied jointly, but provide alternatives. The downstream either conforms (CF) or protects itself with an ACL.
|
|
13
|
-
|
|
14
|
-
# 4: Integrity of Symmetric Relationships
|
|
15
|
-
The patterns OHS, PL, ACL and CF are not applicable in symmetric relationships (Partnership and Shared Kernel), since doing so would lead to contradictions with the pattern definitions. In a Shared Kernel relationship, the two contexts communicate over shared code such as a library. Both contexts manage the shared code together, which clearly contradicts with the mentioned four pattern definitions. An OHS indicates a directed provider/consumer behavior which is not the case here. There is no need for a common inter-context language (PL), since the two contexts simply share the same model. An ACL is not required either since the two participants share the model anyway. And neither context has to conform to the model of the other since it is one shared model. In a Partnership relationship both contexts depend on each other, which means they can only succeed or fail together.
|
|
16
|
-
|
|
17
|
-
# 5: Customer vs. Conformist
|
|
18
|
-
The CF pattern is not applicable within a customer-supplier relationship. In a customer-supplier relationship the customer has influence on the supplier and can at least negotiate regarding priorities of the requirements and the implementation. A conformist in contrast has no influence and simply decides to conform to what the upstream provides.
|
|
19
|
-
|
|
20
|
-
# 6: Generic vs. Custom Service
|
|
21
|
-
The OHS pattern is not applicable within a customer-supplier relationship. Whereas the customer-supplier pattern implies that the involved teams work closely together, meaning that the upstream respects the downstreams requirements in his planning sessions, the OHS pattern indicates that the upstream team decides to implement one API in a one for all approach. This is contradictory since it is unlikely that such an upstream implementing an OHS is able to have a close customer-supplier relationship with all its downstreams. From personal practical experience a customer-supplier relationship leads to individual requirements of single customers. As soon as the supplier implements a customer-specific API feature it is by pattern definition no longer an OHS.
|
|
22
|
-
|
|
23
|
-
# 7: Protect or Cooperate
|
|
24
|
-
The ACL pattern should not be used within a customer-supplier relationship. Changes of the supplier should be in-sync with the needs of the customer. Protection should be unnecessary. Note that this is only a soft rule since the combination is possible but not common. Our tool issues a warning rather than an error message if it detects a violation of the rule.
|
|
25
|
-
|
|
26
|
-
# 8: ORGANIZATIONAL Context Maps
|
|
27
|
-
A context map of the type ORGANIZATIONAL (team map), can only contain bounded contexts of the type TEAM. This checker provides consistency within team maps. On such a map a bounded context represents a team and not a classical bounded context such as a system, feature or application.
|
|
28
|
-
|
|
29
|
-
# 9: SYSTEM LANDSCAPES
|
|
30
|
-
A bounded context of the type TEAM can not be contained by a context map of the type SYSTEM_LANDSCAPE. This checker provides consistency within context maps. Can be seen as the inverse case of rule #8.
|
|
31
|
-
|
|
32
|
-
# 10: Teams realize Bounded Contexts
|
|
1
|
+
The following semantic rules are either implicitly given by the domain model on which the language is based (see above), or enforced by corresponding semantic checkers.
|
|
2
|
+
|
|
3
|
+
Note that the model and the semantic rules express how we understand the DDD patterns and how they can be combined, and how we applied DDD on projects ourselves. Rationale: the literature is somewhat ambiguous.
|
|
4
|
+
|
|
5
|
+
# 1: Permitted Upstream Roles
|
|
6
|
+
The patterns OHS and PL can only be implemented by the upstream context in an upstream-downstream relationship. The upstream context always provides and exposes a certain functionality. The downstream context uses and consumes this services and does not expose parts of his/her own domain model. If this was the case and the upstream used this functionality, the definition that the upstream is independent of the downstream would be contradicted.
|
|
7
|
+
|
|
8
|
+
# 2: Permitted Downstream Roles
|
|
9
|
+
The patterns ACL and CF can only be applied by the downstream context in an upstream-downstream relationship. These patterns solve a downstream problem, namely how to deal with a dependency to another context. It is always the downstream context that has to integrate the upstream model.
|
|
10
|
+
|
|
11
|
+
# 3: Protect or Conform
|
|
12
|
+
The patterns ACL and CF cannot be applied jointly, but provide alternatives. The downstream either conforms (CF) or protects itself with an ACL.
|
|
13
|
+
|
|
14
|
+
# 4: Integrity of Symmetric Relationships
|
|
15
|
+
The patterns OHS, PL, ACL and CF are not applicable in symmetric relationships (Partnership and Shared Kernel), since doing so would lead to contradictions with the pattern definitions. In a Shared Kernel relationship, the two contexts communicate over shared code such as a library. Both contexts manage the shared code together, which clearly contradicts with the mentioned four pattern definitions. An OHS indicates a directed provider/consumer behavior which is not the case here. There is no need for a common inter-context language (PL), since the two contexts simply share the same model. An ACL is not required either since the two participants share the model anyway. And neither context has to conform to the model of the other since it is one shared model. In a Partnership relationship both contexts depend on each other, which means they can only succeed or fail together.
|
|
16
|
+
|
|
17
|
+
# 5: Customer vs. Conformist
|
|
18
|
+
The CF pattern is not applicable within a customer-supplier relationship. In a customer-supplier relationship the customer has influence on the supplier and can at least negotiate regarding priorities of the requirements and the implementation. A conformist in contrast has no influence and simply decides to conform to what the upstream provides.
|
|
19
|
+
|
|
20
|
+
# 6: Generic vs. Custom Service
|
|
21
|
+
The OHS pattern is not applicable within a customer-supplier relationship. Whereas the customer-supplier pattern implies that the involved teams work closely together, meaning that the upstream respects the downstreams requirements in his planning sessions, the OHS pattern indicates that the upstream team decides to implement one API in a one for all approach. This is contradictory since it is unlikely that such an upstream implementing an OHS is able to have a close customer-supplier relationship with all its downstreams. From personal practical experience a customer-supplier relationship leads to individual requirements of single customers. As soon as the supplier implements a customer-specific API feature it is by pattern definition no longer an OHS.
|
|
22
|
+
|
|
23
|
+
# 7: Protect or Cooperate
|
|
24
|
+
The ACL pattern should not be used within a customer-supplier relationship. Changes of the supplier should be in-sync with the needs of the customer. Protection should be unnecessary. Note that this is only a soft rule since the combination is possible but not common. Our tool issues a warning rather than an error message if it detects a violation of the rule.
|
|
25
|
+
|
|
26
|
+
# 8: ORGANIZATIONAL Context Maps
|
|
27
|
+
A context map of the type ORGANIZATIONAL (team map), can only contain bounded contexts of the type TEAM. This checker provides consistency within team maps. On such a map a bounded context represents a team and not a classical bounded context such as a system, feature or application.
|
|
28
|
+
|
|
29
|
+
# 9: SYSTEM LANDSCAPES
|
|
30
|
+
A bounded context of the type TEAM can not be contained by a context map of the type SYSTEM_LANDSCAPE. This checker provides consistency within context maps. Can be seen as the inverse case of rule #8.
|
|
31
|
+
|
|
32
|
+
# 10: Teams realize Bounded Contexts
|
|
33
33
|
Only teams can realize bounded contexts. This checker ensures that the realize keyword can only be used for bounded contexts of the type TEAM. The keyword is added to the language definition in order to reference the bounded contexts a team is realizing. It would not make sense for a classical bounded context (system, feature or application).
|