@radicaltools/mcp 0.1.1 → 0.3.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.
Files changed (161) hide show
  1. package/README.md +52 -26
  2. package/dist/chunk-Z7THA3L5.js +3200 -0
  3. package/dist/elkLayout-TAUBPPVN.js +8 -0
  4. package/dist/hub-catalogue/concern/concern-api-evolution.radical +935 -0
  5. package/dist/hub-catalogue/concern/concern-architecture-style.radical +1112 -0
  6. package/dist/hub-catalogue/concern/concern-authentication.radical +685 -0
  7. package/dist/hub-catalogue/concern/concern-authorization.radical +1464 -0
  8. package/dist/hub-catalogue/concern/concern-availability.radical +804 -0
  9. package/dist/hub-catalogue/concern/concern-backend-stack.radical +1118 -0
  10. package/dist/hub-catalogue/concern/concern-backup-recovery.radical +1304 -0
  11. package/dist/hub-catalogue/concern/concern-capacity.radical +802 -0
  12. package/dist/hub-catalogue/concern/concern-communication-style.radical +1202 -0
  13. package/dist/hub-catalogue/concern/concern-data-consistency.radical +1081 -0
  14. package/dist/hub-catalogue/concern/concern-data-store.radical +960 -0
  15. package/dist/hub-catalogue/concern/concern-decomposition.radical +1143 -0
  16. package/dist/hub-catalogue/concern/concern-deployment.radical +952 -0
  17. package/dist/hub-catalogue/concern/concern-encryption.radical +1055 -0
  18. package/dist/hub-catalogue/concern/concern-frontend-stack.radical +1340 -0
  19. package/dist/hub-catalogue/concern/concern-infrastructure.radical +1151 -0
  20. package/dist/hub-catalogue/concern/concern-integration-resilience.radical +1079 -0
  21. package/dist/hub-catalogue/concern/concern-messaging.radical +940 -0
  22. package/dist/hub-catalogue/concern/concern-module-boundaries.radical +864 -0
  23. package/dist/hub-catalogue/concern/concern-observability.radical +1048 -0
  24. package/dist/hub-catalogue/concern/concern-personal-data.radical +1434 -0
  25. package/dist/hub-catalogue/concern/concern-rate-limiting.radical +1153 -0
  26. package/dist/hub-catalogue/concern/concern-secrets.radical +1026 -0
  27. package/dist/hub-catalogue/concern/concern-supply-chain.radical +1312 -0
  28. package/dist/hub-catalogue/concern/concern-tenant-isolation.radical +1306 -0
  29. package/dist/hub-catalogue/concern/concern-test-strategy.radical +1193 -0
  30. package/dist/index.js +22690 -6064
  31. package/package.json +1 -1
  32. package/dist/chunk-KI4NVSTU.js +0 -1763
  33. package/dist/elkLayout-WC6AXWOG.js +0 -185
  34. package/dist/hub-catalogue/adr/adr-api-versioning.radical +0 -53
  35. package/dist/hub-catalogue/adr/adr-auth-strategy.radical +0 -53
  36. package/dist/hub-catalogue/adr/adr-caching-strategy.radical +0 -59
  37. package/dist/hub-catalogue/adr/adr-data-consistency-model.radical +0 -40
  38. package/dist/hub-catalogue/adr/adr-data-store.radical +0 -47
  39. package/dist/hub-catalogue/adr/adr-deployment-strategy.radical +0 -53
  40. package/dist/hub-catalogue/adr/adr-event-schema-evolution.radical +0 -53
  41. package/dist/hub-catalogue/adr/adr-integration-style.radical +0 -50
  42. package/dist/hub-catalogue/adr/adr-ledger-reconciliation-strategy.radical +0 -38
  43. package/dist/hub-catalogue/adr/adr-llm-provider-strategy.radical +0 -40
  44. package/dist/hub-catalogue/adr/adr-marketplace-payments-model.radical +0 -39
  45. package/dist/hub-catalogue/adr/adr-multi-region.radical +0 -60
  46. package/dist/hub-catalogue/adr/adr-multi-tenancy-strategy.radical +0 -41
  47. package/dist/hub-catalogue/adr/adr-observability.radical +0 -59
  48. package/dist/hub-catalogue/adr/adr-realtime-transport.radical +0 -38
  49. package/dist/hub-catalogue/adr/adr-tech-stack.radical +0 -45
  50. package/dist/hub-catalogue/adr/adr-zero-trust-network.radical +0 -40
  51. package/dist/hub-catalogue/blueprint/bp-ai-assistant-platform.radical +0 -1641
  52. package/dist/hub-catalogue/blueprint/bp-analytical-data-platform.radical +0 -1428
  53. package/dist/hub-catalogue/blueprint/bp-ecommerce-platform.radical +0 -1989
  54. package/dist/hub-catalogue/blueprint/bp-fintech-ledger-platform.radical +0 -1701
  55. package/dist/hub-catalogue/blueprint/bp-marketplace-platform.radical +0 -1792
  56. package/dist/hub-catalogue/blueprint/bp-realtime-collaboration.radical +0 -1421
  57. package/dist/hub-catalogue/blueprint/bp-saas-b2b-platform.radical +0 -1713
  58. package/dist/hub-catalogue/fitness-function/ff-accessibility-scan.radical +0 -34
  59. package/dist/hub-catalogue/fitness-function/ff-ai-eval-gate.radical +0 -52
  60. package/dist/hub-catalogue/fitness-function/ff-api-contract.radical +0 -36
  61. package/dist/hub-catalogue/fitness-function/ff-capacity-load-test.radical +0 -67
  62. package/dist/hub-catalogue/fitness-function/ff-carbon-footprint-guard.radical +0 -62
  63. package/dist/hub-catalogue/fitness-function/ff-change-failure-rate.radical +0 -45
  64. package/dist/hub-catalogue/fitness-function/ff-chaos-resilience-test.radical +0 -53
  65. package/dist/hub-catalogue/fitness-function/ff-cost-efficiency-guard.radical +0 -64
  66. package/dist/hub-catalogue/fitness-function/ff-coupling-guard.radical +0 -45
  67. package/dist/hub-catalogue/fitness-function/ff-data-integrity-check.radical +0 -51
  68. package/dist/hub-catalogue/fitness-function/ff-data-residency.radical +0 -43
  69. package/dist/hub-catalogue/fitness-function/ff-dependency-rules.radical +0 -37
  70. package/dist/hub-catalogue/fitness-function/ff-deploy-frequency.radical +0 -46
  71. package/dist/hub-catalogue/fitness-function/ff-dr-drill-success.radical +0 -52
  72. package/dist/hub-catalogue/fitness-function/ff-duplication-guard.radical +0 -53
  73. package/dist/hub-catalogue/fitness-function/ff-error-budget.radical +0 -59
  74. package/dist/hub-catalogue/fitness-function/ff-fail-safe-verification.radical +0 -34
  75. package/dist/hub-catalogue/fitness-function/ff-infra-drift.radical +0 -34
  76. package/dist/hub-catalogue/fitness-function/ff-latency-slo.radical +0 -59
  77. package/dist/hub-catalogue/fitness-function/ff-lead-time.radical +0 -44
  78. package/dist/hub-catalogue/fitness-function/ff-ledger-balance-integrity.radical +0 -45
  79. package/dist/hub-catalogue/fitness-function/ff-license-compliance.radical +0 -43
  80. package/dist/hub-catalogue/fitness-function/ff-mttr.radical +0 -45
  81. package/dist/hub-catalogue/fitness-function/ff-noisy-neighbor-guard.radical +0 -66
  82. package/dist/hub-catalogue/fitness-function/ff-sast-scan.radical +0 -35
  83. package/dist/hub-catalogue/fitness-function/ff-scale-out-verification.radical +0 -66
  84. package/dist/hub-catalogue/fitness-function/ff-security-scan.radical +0 -45
  85. package/dist/hub-catalogue/fitness-function/ff-startup-shutdown-check.radical +0 -66
  86. package/dist/hub-catalogue/fitness-function/ff-sync-convergence-test.radical +0 -45
  87. package/dist/hub-catalogue/fitness-function/ff-test-coverage.radical +0 -43
  88. package/dist/hub-catalogue/fitness-function/ff-web-vitals.radical +0 -57
  89. package/dist/hub-catalogue/pattern/pattern-anti-corruption-layer.radical +0 -88
  90. package/dist/hub-catalogue/pattern/pattern-api-gateway.radical +0 -168
  91. package/dist/hub-catalogue/pattern/pattern-bff.radical +0 -179
  92. package/dist/hub-catalogue/pattern/pattern-bulkhead.radical +0 -114
  93. package/dist/hub-catalogue/pattern/pattern-circuit-breaker.radical +0 -219
  94. package/dist/hub-catalogue/pattern/pattern-cqrs.radical +0 -195
  95. package/dist/hub-catalogue/pattern/pattern-crdt-sync.radical +0 -200
  96. package/dist/hub-catalogue/pattern/pattern-event-driven.radical +0 -210
  97. package/dist/hub-catalogue/pattern/pattern-event-sourced-ledger.radical +0 -211
  98. package/dist/hub-catalogue/pattern/pattern-hexagonal.radical +0 -196
  99. package/dist/hub-catalogue/pattern/pattern-microservices.radical +0 -262
  100. package/dist/hub-catalogue/pattern/pattern-rag-pipeline.radical +0 -213
  101. package/dist/hub-catalogue/pattern/pattern-rate-limiter.radical +0 -114
  102. package/dist/hub-catalogue/pattern/pattern-saga.radical +0 -208
  103. package/dist/hub-catalogue/pattern/pattern-sidecar.radical +0 -123
  104. package/dist/hub-catalogue/pattern/pattern-strangler-fig.radical +0 -227
  105. package/dist/hub-catalogue/pattern/pattern-transactional-outbox.radical +0 -209
  106. package/dist/hub-catalogue/requirement/req-accessibility.radical +0 -48
  107. package/dist/hub-catalogue/requirement/req-ai-autonomous-resolution.radical +0 -51
  108. package/dist/hub-catalogue/requirement/req-ai-groundedness.radical +0 -45
  109. package/dist/hub-catalogue/requirement/req-ai-human-handoff.radical +0 -46
  110. package/dist/hub-catalogue/requirement/req-alerting.radical +0 -52
  111. package/dist/hub-catalogue/requirement/req-api-response-time.radical +0 -51
  112. package/dist/hub-catalogue/requirement/req-api-standard.radical +0 -45
  113. package/dist/hub-catalogue/requirement/req-audit-logging.radical +0 -43
  114. package/dist/hub-catalogue/requirement/req-auth-response-time.radical +0 -45
  115. package/dist/hub-catalogue/requirement/req-auth.radical +0 -43
  116. package/dist/hub-catalogue/requirement/req-autoscaling.radical +0 -62
  117. package/dist/hub-catalogue/requirement/req-availability.radical +0 -50
  118. package/dist/hub-catalogue/requirement/req-backward-compatibility.radical +0 -46
  119. package/dist/hub-catalogue/requirement/req-batch-job-completion.radical +0 -50
  120. package/dist/hub-catalogue/requirement/req-carbon-efficiency.radical +0 -64
  121. package/dist/hub-catalogue/requirement/req-centralised-logging.radical +0 -45
  122. package/dist/hub-catalogue/requirement/req-ci-pipeline-time.radical +0 -43
  123. package/dist/hub-catalogue/requirement/req-code-complexity.radical +0 -43
  124. package/dist/hub-catalogue/requirement/req-config-propagation.radical +0 -45
  125. package/dist/hub-catalogue/requirement/req-data-integrity.radical +0 -35
  126. package/dist/hub-catalogue/requirement/req-data-retention.radical +0 -44
  127. package/dist/hub-catalogue/requirement/req-db-query-response.radical +0 -44
  128. package/dist/hub-catalogue/requirement/req-disaster-recovery.radical +0 -59
  129. package/dist/hub-catalogue/requirement/req-distributed-tracing.radical +0 -45
  130. package/dist/hub-catalogue/requirement/req-encryption.radical +0 -49
  131. package/dist/hub-catalogue/requirement/req-error-rate.radical +0 -45
  132. package/dist/hub-catalogue/requirement/req-error-recovery.radical +0 -34
  133. package/dist/hub-catalogue/requirement/req-event-schema-compatibility.radical +0 -37
  134. package/dist/hub-catalogue/requirement/req-fail-safe-default.radical +0 -55
  135. package/dist/hub-catalogue/requirement/req-fast-startup-graceful-shutdown.radical +0 -69
  136. package/dist/hub-catalogue/requirement/req-gdpr-erasure.radical +0 -44
  137. package/dist/hub-catalogue/requirement/req-graceful-degradation.radical +0 -39
  138. package/dist/hub-catalogue/requirement/req-health-checks.radical +0 -43
  139. package/dist/hub-catalogue/requirement/req-iac.radical +0 -36
  140. package/dist/hub-catalogue/requirement/req-idempotency.radical +0 -47
  141. package/dist/hub-catalogue/requirement/req-input-validation.radical +0 -37
  142. package/dist/hub-catalogue/requirement/req-least-privilege.radical +0 -47
  143. package/dist/hub-catalogue/requirement/req-ledger-immutability.radical +0 -38
  144. package/dist/hub-catalogue/requirement/req-mfa.radical +0 -36
  145. package/dist/hub-catalogue/requirement/req-ml-extraction-accuracy.radical +0 -42
  146. package/dist/hub-catalogue/requirement/req-onboarding-time.radical +0 -42
  147. package/dist/hub-catalogue/requirement/req-page-load-time.radical +0 -59
  148. package/dist/hub-catalogue/requirement/req-payout-latency.radical +0 -46
  149. package/dist/hub-catalogue/requirement/req-presence-latency.radical +0 -46
  150. package/dist/hub-catalogue/requirement/req-rate-limiting.radical +0 -45
  151. package/dist/hub-catalogue/requirement/req-report-generation.radical +0 -44
  152. package/dist/hub-catalogue/requirement/req-resource-efficiency.radical +0 -64
  153. package/dist/hub-catalogue/requirement/req-resource-headroom.radical +0 -53
  154. package/dist/hub-catalogue/requirement/req-resource-isolation.radical +0 -37
  155. package/dist/hub-catalogue/requirement/req-search-response-time.radical +0 -44
  156. package/dist/hub-catalogue/requirement/req-secrets-management.radical +0 -45
  157. package/dist/hub-catalogue/requirement/req-task-success-rate.radical +0 -42
  158. package/dist/hub-catalogue/requirement/req-test-coverage.radical +0 -42
  159. package/dist/hub-catalogue/requirement/req-throughput.radical +0 -55
  160. package/dist/hub-catalogue/requirement/req-vulnerability-scanning.radical +0 -52
  161. package/dist/hub-catalogue/requirement/req-zero-downtime-deploy.radical +0 -39
@@ -0,0 +1,1112 @@
1
+ {
2
+ "hub": {
3
+ "id": "concern-architecture-style",
4
+ "category": "concern",
5
+ "name": "Architecture style",
6
+ "description": "The structure inside one deployable: layers, ports and adapters, clean rings or vertical slices; where the business logic lives; whether reads and writes are separated; and how far the domain stays independent of the framework.",
7
+ "tags": [
8
+ "architecture",
9
+ "layered",
10
+ "hexagonal",
11
+ "clean architecture",
12
+ "vertical slices",
13
+ "cqrs",
14
+ "domain model",
15
+ "ddd"
16
+ ],
17
+ "requiredMetamodel": "c4-ddd-governance-builtin",
18
+ "concern": {
19
+ "id": "architecture-style",
20
+ "trigger": "LIST NODES WHERE (type = \"container\" OR type = \"webapp\") AND external != true",
21
+ "why": "code lives in these deployables, so how it is structured inside, and where its business logic goes, has to be decided.",
22
+ "group": "architecture"
23
+ },
24
+ "sources": [
25
+ {
26
+ "title": "Alistair Cockburn: Hexagonal architecture (ports and adapters)",
27
+ "url": "https://alistair.cockburn.us/hexagonal-architecture/"
28
+ },
29
+ {
30
+ "title": "Robert C. Martin: The Clean Architecture",
31
+ "url": "https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html"
32
+ },
33
+ {
34
+ "title": "Martin Fowler: PresentationDomainDataLayering",
35
+ "url": "https://martinfowler.com/bliki/PresentationDomainDataLayering.html"
36
+ },
37
+ {
38
+ "title": "Jimmy Bogard: Vertical Slice Architecture",
39
+ "url": "https://www.jimmybogard.com/vertical-slice-architecture/"
40
+ },
41
+ {
42
+ "title": "Martin Fowler: Transaction Script (Patterns of Enterprise Application Architecture)",
43
+ "url": "https://martinfowler.com/eaaCatalog/transactionScript.html"
44
+ },
45
+ {
46
+ "title": "Martin Fowler: AnemicDomainModel",
47
+ "url": "https://martinfowler.com/bliki/AnemicDomainModel.html"
48
+ },
49
+ {
50
+ "title": "Martin Fowler: CQRS",
51
+ "url": "https://martinfowler.com/bliki/CQRS.html"
52
+ },
53
+ {
54
+ "title": "microservices.io, Command Query Responsibility Segregation (CQRS)",
55
+ "url": "https://microservices.io/patterns/data/cqrs.html"
56
+ },
57
+ {
58
+ "title": "jMolecules: architecture and DDD concepts as code",
59
+ "url": "https://github.com/xmolecules/jmolecules"
60
+ },
61
+ {
62
+ "title": "ArchUnit user guide",
63
+ "url": "https://www.archunit.org/userguide/html/000_Index.html"
64
+ }
65
+ ],
66
+ "templateParams": [
67
+ {
68
+ "key": "STYLE",
69
+ "title": "Structure",
70
+ "label": "How is the code inside the deployable structured?",
71
+ "hint": "This decides what a part of the code is (a layer, the core and its adapters, a ring, a feature) and which way dependencies between those parts may point. How the system is split into deployables is the Decomposition pack; how modules are kept apart is Module boundaries.",
72
+ "defaultValue": "hexagonal",
73
+ "options": [
74
+ {
75
+ "value": "layered",
76
+ "label": "layers (presentation, business, data access)",
77
+ "description": "Each layer uses only the one below it. Pick it for mostly forms over data with few business rules, one team, and a framework that already works this way (Spring MVC, ASP.NET MVC, Django, Rails)."
78
+ },
79
+ {
80
+ "value": "hexagonal",
81
+ "label": "ports and adapters (hexagonal)",
82
+ "description": "A core with the use cases and domain rules and no framework, database or transport in it; it declares ports, and adapters for HTTP, the database and messaging implement them. Pick it when the business rules are the valuable part and must be tested without infrastructure, or when the database, broker or transport is likely to change."
83
+ },
84
+ {
85
+ "value": "clean",
86
+ "label": "clean or onion rings",
87
+ "description": "Concentric rings (entities, use cases, interface adapters, frameworks and drivers) with every source dependency pointing inwards and one class per use case. Pick it for a large, long-lived domain with many use cases and several delivery channels (web, API, jobs, messaging), where the extra mapping pays for itself."
88
+ },
89
+ {
90
+ "value": "slices",
91
+ "label": "vertical slices, one per feature",
92
+ "description": "One folder per request (a command or a query) holding its endpoint, handler, validation and data access; slices do not use each other, and only what several slices really share moves to a common domain folder. Pick it for many independent features changed at a high rate, where most changes are a new or changed request and layers would make every change touch every layer."
93
+ }
94
+ ]
95
+ },
96
+ {
97
+ "key": "LOGIC",
98
+ "title": "Domain logic",
99
+ "label": "Where do the business rules live?",
100
+ "hint": "Rules kept with the data they protect hold everywhere that data changes; rules kept in procedures are simpler until the same rule is needed in a second procedure.",
101
+ "defaultValue": "rich",
102
+ "options": [
103
+ {
104
+ "value": "rich",
105
+ "label": "a rich domain model (aggregates)",
106
+ "description": "Entities and aggregates carry the behaviour and protect their own invariants; state changes only through their methods and one transaction changes one aggregate (DDD tactical patterns). Pick it when there are many rules and invariants (pricing, eligibility, state machines) used by several use cases."
107
+ },
108
+ {
109
+ "value": "scripts",
110
+ "label": "transaction scripts per use case",
111
+ "description": "Each use case is one procedure (an application-service method or handler) that reads, decides and writes in one transaction, over simple data objects. Pick it when the rules are few and mostly validation, each belongs to one use case, and the domain is close to CRUD."
112
+ }
113
+ ]
114
+ },
115
+ {
116
+ "key": "CQRS",
117
+ "title": "Reads and writes",
118
+ "label": "Are reads and writes served by separate models?",
119
+ "hint": "Screens and reports want joined, flattened data; rules want aggregates. Separating them helps when the two shapes pull apart, and costs a second model or a second store.",
120
+ "defaultValue": "none",
121
+ "options": [
122
+ {
123
+ "value": "none",
124
+ "label": "no, one model for both",
125
+ "description": "Queries read the same model the commands change. Pick it when reads look like the entities they show and read and write load are of the same order."
126
+ },
127
+ {
128
+ "value": "models",
129
+ "label": "separate read models, same database",
130
+ "description": "Commands go through the domain model; queries read from the same database through their own query objects or SQL views shaped for the screen, never through aggregates. Pick it when screens need joins and projections the domain model should not carry, but reads must be up to date at once."
131
+ },
132
+ {
133
+ "value": "store",
134
+ "label": "a separate read store, updated by events",
135
+ "description": "Commands change the write store and publish events; projections update a read store (a search index, a document store, denormalised tables) a few seconds later. Pick it when reads outnumber writes by orders of magnitude, need a different technology (full-text search, aggregates for dashboards), or must scale apart, and a short staleness is acceptable."
136
+ }
137
+ ]
138
+ },
139
+ {
140
+ "key": "FRAMEWORK",
141
+ "title": "Framework",
142
+ "label": "How far does the domain code stay independent of the framework?",
143
+ "hint": "Annotations from the ORM and the validation library in domain classes save mapping code, and tie the domain to those libraries and their upgrades.",
144
+ "defaultValue": "pure",
145
+ "options": [
146
+ {
147
+ "value": "pure",
148
+ "label": "fully: plain language only",
149
+ "description": "Domain classes import nothing but the language and the domain itself; persistence and transport models live in adapters with explicit mapping. Pick it with ports and adapters or clean rings, a domain expected to outlive the framework, or several persistence or delivery technologies."
150
+ },
151
+ {
152
+ "value": "annotations",
153
+ "label": "mapping and validation annotations allowed",
154
+ "description": "Domain classes may carry ORM mapping and validation annotations (Jakarta Persistence, Bean Validation, EF Core attributes) but call no framework service, transaction, HTTP or messaging API. Pick it to save mapping code when the ORM is a settled choice and the domain is mapped one to one to tables."
155
+ }
156
+ ]
157
+ },
158
+ {
159
+ "key": "DOMAIN_COVERAGE",
160
+ "label": "What line coverage must the infrastructure-free unit tests reach on the domain code (%)?",
161
+ "defaultValue": "80",
162
+ "type": "number"
163
+ },
164
+ {
165
+ "key": "READ_LAG_SECONDS",
166
+ "label": "How stale may a separate read store get at the 99th percentile (seconds)?",
167
+ "defaultValue": "5",
168
+ "type": "number"
169
+ }
170
+ ]
171
+ },
172
+ "nodes": [
173
+ {
174
+ "id": "need",
175
+ "type": "need",
176
+ "label": "Code structured on purpose",
177
+ "x": 0,
178
+ "y": 0,
179
+ "kind": "brief",
180
+ "source": "Hub concern pack: Architecture style",
181
+ "description": "Each deployable holds code several people change every week. Where a business rule, a query, a framework call or a mapping goes should follow from a decided structure, not from whoever wrote it first: then the rules can be tested without starting a database, a change of framework or database stays in one place, a new feature has an obvious home, and reads and writes each get the shape they need. The structure has to hold as the code grows, so the build checks it."
182
+ },
183
+ {
184
+ "id": "req-layers",
185
+ "type": "requirement",
186
+ "label": "Layers call downwards",
187
+ "x": 260,
188
+ "y": 0,
189
+ "ears_type": "ubiquitous",
190
+ "action": "let presentation depend only on business logic and business logic only on data access, never the reverse, with 0 HTTP or user-interface types in the business layer and 0 SQL outside data access",
191
+ "rationale": "Layering keeps each concern in one place, so a change of screen or of database stays in its layer (Fowler, PresentationDomainDataLayering).",
192
+ "hubWhen": {
193
+ "STYLE": [
194
+ "layered"
195
+ ]
196
+ }
197
+ },
198
+ {
199
+ "id": "req-ports",
200
+ "type": "requirement",
201
+ "label": "Core reached through ports",
202
+ "x": 260,
203
+ "y": 130,
204
+ "ears_type": "ubiquitous",
205
+ "action": "keep the core free of framework, database, messaging and HTTP imports, let adapters reach it only through the ports it declares, and let no adapter use another adapter",
206
+ "rationale": "The application is driven and drives the outside world only through ports, so each side can be replaced or tested alone (Cockburn, Hexagonal architecture).",
207
+ "hubWhen": {
208
+ "STYLE": [
209
+ "hexagonal"
210
+ ]
211
+ }
212
+ },
213
+ {
214
+ "id": "req-rings",
215
+ "type": "requirement",
216
+ "label": "Dependencies point inwards",
217
+ "x": 260,
218
+ "y": 260,
219
+ "ears_type": "ubiquitous",
220
+ "action": "point every source dependency inwards (frameworks and drivers, then interface adapters, then use cases, then entities), with 0 outward dependencies and each use case in a class of its own with its input and output boundaries",
221
+ "rationale": "The dependency rule is what makes the inner rings independent of the UI, the database and the frameworks (Martin, The Clean Architecture).",
222
+ "hubWhen": {
223
+ "STYLE": [
224
+ "clean"
225
+ ]
226
+ }
227
+ },
228
+ {
229
+ "id": "req-slices",
230
+ "type": "requirement",
231
+ "label": "Slices stand alone",
232
+ "x": 260,
233
+ "y": 390,
234
+ "ears_type": "ubiquitous",
235
+ "action": "keep each feature's endpoint, handler, validation and data access in its own slice, with 0 dependencies from one slice on another and shared code only in the common domain folder",
236
+ "rationale": "Coupling is minimised between slices and maximised within one, so a change to a feature stays in its slice (Bogard, Vertical Slice Architecture).",
237
+ "hubWhen": {
238
+ "STYLE": [
239
+ "slices"
240
+ ]
241
+ }
242
+ },
243
+ {
244
+ "id": "req-domain-tests",
245
+ "type": "requirement",
246
+ "label": "Rules tested without infrastructure",
247
+ "x": 260,
248
+ "y": 520,
249
+ "ears_type": "ubiquitous",
250
+ "action": "test the business rules with unit tests that start no database, broker or web server and cover at least {{DOMAIN_COVERAGE}}% of the lines of the domain code",
251
+ "rationale": "Rules that can only be tested through the infrastructure are tested slowly and rarely; testability is part of maintainability (ISO/IEC 25010)."
252
+ },
253
+ {
254
+ "id": "req-cqs",
255
+ "type": "requirement",
256
+ "label": "Commands and queries apart",
257
+ "x": 260,
258
+ "y": 650,
259
+ "ears_type": "ubiquitous",
260
+ "action": "make every operation either a command that changes state and returns at most an identifier or a result code, or a query that returns data and changes nothing",
261
+ "rationale": "An operation that both answers and changes cannot be retried, cached or reasoned about safely (command–query separation, Meyer; Fowler, CQRS)."
262
+ },
263
+ {
264
+ "id": "req-aggregates",
265
+ "type": "requirement",
266
+ "label": "Aggregates guard invariants",
267
+ "x": 260,
268
+ "y": 780,
269
+ "ears_type": "ubiquitous",
270
+ "action": "enforce every invariant inside the aggregate it belongs to, change an aggregate's state only through its methods (0 public setters on domain classes), and change at most one aggregate per transaction",
271
+ "rationale": "Rules kept with the data they protect hold in every use case; logic in services over data-only objects is the anemic domain model (Fowler, AnemicDomainModel; Evans, Domain-Driven Design).",
272
+ "hubWhen": {
273
+ "LOGIC": [
274
+ "rich"
275
+ ]
276
+ }
277
+ },
278
+ {
279
+ "id": "req-scripts",
280
+ "type": "requirement",
281
+ "label": "One script per use case",
282
+ "x": 260,
283
+ "y": 910,
284
+ "ears_type": "ubiquitous",
285
+ "action": "put each use case's business logic in one transaction script that runs in one transaction, with 0 business rules in controllers, views or database triggers and 0 calls from one script to another",
286
+ "rationale": "A transaction script is simplest when each procedure stands alone; scripts calling each other become a domain model without its protections (Fowler, Transaction Script).",
287
+ "hubWhen": {
288
+ "LOGIC": [
289
+ "scripts"
290
+ ]
291
+ }
292
+ },
293
+ {
294
+ "id": "req-read-models",
295
+ "type": "requirement",
296
+ "label": "Queries use read models",
297
+ "x": 260,
298
+ "y": 1040,
299
+ "ears_type": "ubiquitous",
300
+ "action": "serve every query from a read model shaped for the screen or API that uses it, with 0 queries loading aggregates or using the write side's repositories",
301
+ "rationale": "Separating the read side lets each model take the shape its job needs (Fowler, CQRS; microservices.io, CQRS).",
302
+ "hubWhen": {
303
+ "CQRS": [
304
+ "models",
305
+ "store"
306
+ ]
307
+ }
308
+ },
309
+ {
310
+ "id": "req-read-lag",
311
+ "type": "requirement",
312
+ "label": "Read store catches up",
313
+ "x": 260,
314
+ "y": 1170,
315
+ "ears_type": "event-driven",
316
+ "trigger": "a command commits a change",
317
+ "action": "update every read model it affects within {{READ_LAG_SECONDS}} seconds at the 99th percentile, and let a client that made the change read its own write",
318
+ "rationale": "A separate read store is eventually consistent; bounding the lag and keeping read-your-writes makes it acceptable to users (microservices.io, CQRS).",
319
+ "hubWhen": {
320
+ "CQRS": [
321
+ "store"
322
+ ]
323
+ }
324
+ },
325
+ {
326
+ "id": "req-pure",
327
+ "type": "requirement",
328
+ "label": "Domain imports no framework",
329
+ "x": 260,
330
+ "y": 1300,
331
+ "ears_type": "ubiquitous",
332
+ "action": "keep the domain code free of framework, ORM, serialisation and validation-library imports and annotations, with 0 such imports, so that a framework upgrade changes no domain file",
333
+ "rationale": "A domain tied to no framework outlives framework upgrades and is tested as plain code (Martin, The Clean Architecture; Cockburn, Hexagonal architecture).",
334
+ "hubWhen": {
335
+ "FRAMEWORK": [
336
+ "pure"
337
+ ]
338
+ }
339
+ },
340
+ {
341
+ "id": "req-annotations",
342
+ "type": "requirement",
343
+ "label": "Only mapping annotations",
344
+ "x": 260,
345
+ "y": 1430,
346
+ "ears_type": "ubiquitous",
347
+ "action": "allow in the domain code only the persistence-mapping and validation annotations of the chosen libraries, with 0 uses of framework services, transactions, HTTP or messaging APIs",
348
+ "rationale": "Mapping annotations are declarations the domain can live with; calls into the framework make the domain depend on its runtime (jMolecules, architecture concepts as code).",
349
+ "hubWhen": {
350
+ "FRAMEWORK": [
351
+ "annotations"
352
+ ]
353
+ }
354
+ },
355
+ {
356
+ "id": "sc-layers",
357
+ "type": "scenario",
358
+ "label": "Upward call refused",
359
+ "x": 520,
360
+ "y": 0,
361
+ "given": "the layer rules",
362
+ "when": "data-access code imports a presentation type",
363
+ "then": "the rule check reports the upward dependency and the build fails",
364
+ "hubWhen": {
365
+ "STYLE": [
366
+ "layered"
367
+ ]
368
+ }
369
+ },
370
+ {
371
+ "id": "sc-ports",
372
+ "type": "scenario",
373
+ "label": "Adapter bypasses port",
374
+ "x": 520,
375
+ "y": 130,
376
+ "given": "the core with its ports and the web and persistence adapters",
377
+ "when": "the web adapter calls the persistence adapter directly, or the core imports a database driver",
378
+ "then": "the rule check reports both and the build fails",
379
+ "hubWhen": {
380
+ "STYLE": [
381
+ "hexagonal"
382
+ ]
383
+ }
384
+ },
385
+ {
386
+ "id": "sc-rings",
387
+ "type": "scenario",
388
+ "label": "Outward dependency refused",
389
+ "x": 520,
390
+ "y": 260,
391
+ "given": "the four rings",
392
+ "when": "a use case imports a controller or an entity imports a repository implementation",
393
+ "then": "the rule check reports the outward dependency and the build fails",
394
+ "hubWhen": {
395
+ "STYLE": [
396
+ "clean"
397
+ ]
398
+ }
399
+ },
400
+ {
401
+ "id": "sc-slices",
402
+ "type": "scenario",
403
+ "label": "Slice uses another",
404
+ "x": 520,
405
+ "y": 390,
406
+ "given": "the slices for placing and for cancelling an order",
407
+ "when": "the cancel handler calls a class of the place-order slice",
408
+ "then": "the rule check reports the dependency between slices and the build fails",
409
+ "hubWhen": {
410
+ "STYLE": [
411
+ "slices"
412
+ ]
413
+ }
414
+ },
415
+ {
416
+ "id": "sc-domain-tests",
417
+ "type": "scenario",
418
+ "label": "Domain tests run alone",
419
+ "x": 520,
420
+ "y": 520,
421
+ "given": "a build agent with no database, broker or container runtime",
422
+ "when": "the domain unit tests run",
423
+ "then": "they all pass and cover at least {{DOMAIN_COVERAGE}}% of the domain code's lines"
424
+ },
425
+ {
426
+ "id": "sc-cqs",
427
+ "type": "scenario",
428
+ "label": "Query changes nothing",
429
+ "x": 520,
430
+ "y": 650,
431
+ "given": "a snapshot of the stores",
432
+ "when": "every query of the deployable runs",
433
+ "then": "the stores are unchanged"
434
+ },
435
+ {
436
+ "id": "sc-aggregates",
437
+ "type": "scenario",
438
+ "label": "Invariant cannot be bypassed",
439
+ "x": 520,
440
+ "y": 780,
441
+ "given": "an order whose total may not exceed its credit limit",
442
+ "when": "a use case adds a line that passes the limit, and another tries to set the total directly",
443
+ "then": "the first is refused by the order itself and the second does not compile",
444
+ "hubWhen": {
445
+ "LOGIC": [
446
+ "rich"
447
+ ]
448
+ }
449
+ },
450
+ {
451
+ "id": "sc-scripts",
452
+ "type": "scenario",
453
+ "label": "Script stands alone",
454
+ "x": 520,
455
+ "y": 910,
456
+ "given": "the scripts for placing and for cancelling an order",
457
+ "when": "the rule check runs",
458
+ "then": "each script is called only from entry points, runs in a transaction, and calls no other script",
459
+ "hubWhen": {
460
+ "LOGIC": [
461
+ "scripts"
462
+ ]
463
+ }
464
+ },
465
+ {
466
+ "id": "sc-read-models",
467
+ "type": "scenario",
468
+ "label": "Query skips the aggregates",
469
+ "x": 520,
470
+ "y": 1040,
471
+ "given": "the order list screen",
472
+ "when": "its query runs",
473
+ "then": "it reads the order summary read model and loads no order aggregate",
474
+ "hubWhen": {
475
+ "CQRS": [
476
+ "models",
477
+ "store"
478
+ ]
479
+ }
480
+ },
481
+ {
482
+ "id": "sc-read-lag",
483
+ "type": "scenario",
484
+ "label": "Read store catches up",
485
+ "x": 520,
486
+ "y": 1170,
487
+ "given": "a read store fed by events",
488
+ "when": "an order is placed and the order list is read",
489
+ "then": "the person who placed it sees it at once, and every reader within {{READ_LAG_SECONDS}} seconds",
490
+ "hubWhen": {
491
+ "CQRS": [
492
+ "store"
493
+ ]
494
+ }
495
+ },
496
+ {
497
+ "id": "sc-pure",
498
+ "type": "scenario",
499
+ "label": "Framework upgrade",
500
+ "x": 520,
501
+ "y": 1300,
502
+ "given": "the domain code",
503
+ "when": "the rule check runs, and later the framework is upgraded a major version",
504
+ "then": "the check finds 0 framework imports and the upgrade changes no domain file",
505
+ "hubWhen": {
506
+ "FRAMEWORK": [
507
+ "pure"
508
+ ]
509
+ }
510
+ },
511
+ {
512
+ "id": "sc-annotations",
513
+ "type": "scenario",
514
+ "label": "Framework call refused",
515
+ "x": 520,
516
+ "y": 1430,
517
+ "given": "a domain entity with mapping annotations",
518
+ "when": "a change makes it call a repository or publish through the framework's event bus",
519
+ "then": "the rule check reports it and the build fails",
520
+ "hubWhen": {
521
+ "FRAMEWORK": [
522
+ "annotations"
523
+ ]
524
+ }
525
+ },
526
+ {
527
+ "id": "adr-layered",
528
+ "type": "adr",
529
+ "label": "The code is layered",
530
+ "x": 780,
531
+ "y": 0,
532
+ "concern": "architecture-style",
533
+ "status": "accepted",
534
+ "date": "",
535
+ "context": "This deployable holds code that keeps changing, and its inner structure decides where each piece of that code goes. The forces: business rules mixed with HTTP handlers, SQL and framework calls can only be tested by starting everything, and change whenever the framework does; a structure with more rings and mappings than the domain needs is ceremony that slows every feature; a feature cut across technical layers touches every layer, while a feature kept in one slice may duplicate what its neighbours do; reads and writes often want different shapes, and forcing both through one model makes either the screens or the rules awkward; and a rule that lives only in a diagram is broken by the first deadline.",
536
+ "decision": "Inside the deployable the code is cut into three layers, presentation, business logic and data access, each depending only on the one below; SQL stays in data access and HTTP and user-interface types stay in presentation. Business rules: {{LOGIC}}. Reads and writes: {{CQRS}}. Domain code and the framework: {{FRAMEWORK}}. The rules are checked in the build: ArchUnit's layeredArchitecture() on the JVM, NetArchTest on .NET, dependency-cruiser or eslint-plugin-boundaries for TypeScript, import-linter's layers contract for Python; pick the one that runs as a unit test in the existing test runner.",
537
+ "consequences": "• Simple to explain and matches most web frameworks, so new people find their way at once.\n• Business logic depends on data access, so its tests need a database or mocks of the data layer.\n• A feature cuts across all three layers; with many features the layers grow wide and features blur inside them.\n• Moving to ports and adapters later means inverting the dependency between business logic and data access.",
538
+ "alternatives": "1. Ports and adapters: business logic without infrastructure, at the cost of ports and mapping code.\n2. Vertical slices: a feature in one place instead of three layers, with some duplication.\n3. No explicit structure: fastest for a prototype, and the most expensive to untangle later.",
539
+ "hubWhen": {
540
+ "STYLE": [
541
+ "layered"
542
+ ]
543
+ }
544
+ },
545
+ {
546
+ "id": "adr-hexagonal",
547
+ "type": "adr",
548
+ "label": "Ports and adapters",
549
+ "x": 780,
550
+ "y": 130,
551
+ "concern": "architecture-style",
552
+ "status": "accepted",
553
+ "date": "",
554
+ "context": "This deployable holds code that keeps changing, and its inner structure decides where each piece of that code goes. The forces: business rules mixed with HTTP handlers, SQL and framework calls can only be tested by starting everything, and change whenever the framework does; a structure with more rings and mappings than the domain needs is ceremony that slows every feature; a feature cut across technical layers touches every layer, while a feature kept in one slice may duplicate what its neighbours do; reads and writes often want different shapes, and forcing both through one model makes either the screens or the rules awkward; and a rule that lives only in a diagram is broken by the first deadline.",
555
+ "decision": "Inside the deployable the code has a core (domain model and use cases) that imports no framework, database, messaging or HTTP library; the core declares driving ports (the use cases it offers) and driven ports (repositories, publishers, clients it needs), and adapters outside it implement them. Dependencies point into the core only and adapters do not use each other. Business rules: {{LOGIC}}. Reads and writes: {{CQRS}}. Domain code and the framework: {{FRAMEWORK}}. The rules are checked in the build: jMolecules' hexagonal annotations with JMoleculesArchitectureRules.ensureHexagonal() (ArchUnit) on the JVM, NetArchTest on .NET, dependency-cruiser for TypeScript, import-linter for Python.",
556
+ "consequences": "• The core is tested in milliseconds without infrastructure, and an adapter is replaced without touching it.\n• More code: ports, adapters and the mapping between core objects and persistence or transport models.\n• Framework conveniences that reach into the core (transactions, ORM lazy loading, validation by annotation) move to adapters or are given up.\n• It says nothing about cutting the core by domain: with several domains, combine it with modules (Module boundaries).",
557
+ "alternatives": "1. Layers: less code and closer to the framework, but business logic depends on data access.\n2. Clean or onion rings: the same inward rule with more named rings and one class per use case.\n3. Vertical slices: less mapping, but no common core the slices are tested against.",
558
+ "hubWhen": {
559
+ "STYLE": [
560
+ "hexagonal"
561
+ ]
562
+ }
563
+ },
564
+ {
565
+ "id": "adr-clean",
566
+ "type": "adr",
567
+ "label": "Clean architecture rings",
568
+ "x": 780,
569
+ "y": 260,
570
+ "concern": "architecture-style",
571
+ "status": "accepted",
572
+ "date": "",
573
+ "context": "This deployable holds code that keeps changing, and its inner structure decides where each piece of that code goes. The forces: business rules mixed with HTTP handlers, SQL and framework calls can only be tested by starting everything, and change whenever the framework does; a structure with more rings and mappings than the domain needs is ceremony that slows every feature; a feature cut across technical layers touches every layer, while a feature kept in one slice may duplicate what its neighbours do; reads and writes often want different shapes, and forcing both through one model makes either the screens or the rules awkward; and a rule that lives only in a diagram is broken by the first deadline.",
574
+ "decision": "Inside the deployable the code is cut into four rings: entities (enterprise rules), use cases (one interactor class per use case with its input and output boundaries), interface adapters (controllers, presenters, gateways) and frameworks and drivers (web framework, ORM, broker clients). Every source dependency points inwards; data crosses a boundary as simple structures, never as ORM entities or HTTP requests. Business rules: {{LOGIC}}. Reads and writes: {{CQRS}}. Domain code and the framework: {{FRAMEWORK}}. The rules are checked in the build: ArchUnit's onionArchitecture() or jMolecules' ensureOnionClassical() on the JVM, NetArchTest on .NET, dependency-cruiser for TypeScript, import-linter's layers contract for Python.",
575
+ "consequences": "• Use cases read as the list of what the system does, each testable alone with fake gateways.\n• The most mapping code of the options: request, response and persistence models at every boundary.\n• Delivery channels (web, API, jobs, messages) reuse the same use cases.\n• Too much ceremony for a domain with few rules; the rings must earn their keep.",
576
+ "alternatives": "1. Ports and adapters: the same inward rule with fewer named rings.\n2. Layers: less mapping, but the business layer depends on data access.\n3. Vertical slices: each request self-contained, with less structure shared between them.",
577
+ "hubWhen": {
578
+ "STYLE": [
579
+ "clean"
580
+ ]
581
+ }
582
+ },
583
+ {
584
+ "id": "adr-slices",
585
+ "type": "adr",
586
+ "label": "Vertical slices",
587
+ "x": 780,
588
+ "y": 390,
589
+ "concern": "architecture-style",
590
+ "status": "accepted",
591
+ "date": "",
592
+ "context": "This deployable holds code that keeps changing, and its inner structure decides where each piece of that code goes. The forces: business rules mixed with HTTP handlers, SQL and framework calls can only be tested by starting everything, and change whenever the framework does; a structure with more rings and mappings than the domain needs is ceremony that slows every feature; a feature cut across technical layers touches every layer, while a feature kept in one slice may duplicate what its neighbours do; reads and writes often want different shapes, and forcing both through one model makes either the screens or the rules awkward; and a rule that lives only in a diagram is broken by the first deadline.",
593
+ "decision": "Inside the deployable the code is cut by feature: one slice per request (a command or a query) holding its endpoint, request and response types, validation, handler and data access. Slices do not use each other; code moves to the common domain folder only when a second slice really needs it. Requests go through a mediator or the framework's routing (MediatR or Wolverine on .NET, Spring's handlers or Axon on the JVM, a plain handler map in TypeScript). Business rules: {{LOGIC}}. Reads and writes: {{CQRS}}. Domain code and the framework: {{FRAMEWORK}}. The rules are checked in the build: NetArchTest on .NET, ArchUnit's slices().should().notDependOnEachOther() on the JVM, dependency-cruiser for TypeScript.",
594
+ "consequences": "• A new or changed feature touches one folder, so changes are small and reviews focused.\n• Each slice may pick the simplest data access for its job (raw SQL for a report, the ORM for a command).\n• Some duplication between slices is accepted; rules needed by several slices must be noticed and moved to the domain.\n• Without discipline the common folder becomes a hidden layer.",
595
+ "alternatives": "1. Layers: shared technical structure, but every feature crosses every layer.\n2. Ports and adapters: a shared, infrastructure-free core, at the cost of ports and mapping.\n3. Clean rings: use cases as classes too, with full rings around them.",
596
+ "hubWhen": {
597
+ "STYLE": [
598
+ "slices"
599
+ ]
600
+ }
601
+ },
602
+ {
603
+ "id": "adr-rich-domain",
604
+ "type": "adr",
605
+ "label": "A rich domain model",
606
+ "x": 780,
607
+ "y": 520,
608
+ "concern": "architecture-style",
609
+ "status": "accepted",
610
+ "date": "",
611
+ "context": "This deployable holds code that keeps changing, and its inner structure decides where each piece of that code goes. The forces: business rules mixed with HTTP handlers, SQL and framework calls can only be tested by starting everything, and change whenever the framework does; a structure with more rings and mappings than the domain needs is ceremony that slows every feature; a feature cut across technical layers touches every layer, while a feature kept in one slice may duplicate what its neighbours do; reads and writes often want different shapes, and forcing both through one model makes either the screens or the rules awkward; and a rule that lives only in a diagram is broken by the first deadline.",
612
+ "decision": "Business rules live in a rich domain model: aggregates and entities carry behaviour, protect their invariants and change state only through their methods; value objects replace primitive types for money, quantities and identifiers; an aggregate refers to another only by identifier; one transaction changes one aggregate, and changes to others follow from domain events. Use cases (or handlers) load an aggregate, call it and save it, and hold no rules themselves. On the JVM jMolecules annotations (@AggregateRoot, @Entity, @ValueObject) mark the roles and its ArchUnit rules check them; elsewhere the same rules are written as architecture tests.",
613
+ "consequences": "• A rule is written once and holds in every use case that changes the data.\n• Domain tests are plain unit tests of objects, without mocks of repositories.\n• Mapping to the database takes care (aggregates as consistency boundaries, no lazy navigation between them).\n• Overkill for a domain that is mostly CRUD.",
614
+ "alternatives": "1. Transaction scripts: simpler for few rules, but a rule needed in two scripts gets copied.\n2. An anemic model with services: looks like a domain model but has the costs of both and the protections of neither.\n3. Rules in the database (constraints, procedures): enforced everywhere, but hard to test and to change.",
615
+ "hubWhen": {
616
+ "LOGIC": [
617
+ "rich"
618
+ ]
619
+ }
620
+ },
621
+ {
622
+ "id": "adr-transaction-scripts",
623
+ "type": "adr",
624
+ "label": "Transaction scripts",
625
+ "x": 780,
626
+ "y": 650,
627
+ "concern": "architecture-style",
628
+ "status": "accepted",
629
+ "date": "",
630
+ "context": "This deployable holds code that keeps changing, and its inner structure decides where each piece of that code goes. The forces: business rules mixed with HTTP handlers, SQL and framework calls can only be tested by starting everything, and change whenever the framework does; a structure with more rings and mappings than the domain needs is ceremony that slows every feature; a feature cut across technical layers touches every layer, while a feature kept in one slice may duplicate what its neighbours do; reads and writes often want different shapes, and forcing both through one model makes either the screens or the rules awkward; and a rule that lives only in a diagram is broken by the first deadline.",
631
+ "decision": "Business rules live in transaction scripts: each use case is one procedure (an application-service method or a request handler) that validates, reads, decides and writes in one transaction over simple data objects. Scripts are called only from entry points (controllers, message listeners, jobs) and never call each other; a rule needed by two scripts moves into a small function both call. When rules start being copied between scripts, this decision is revisited in favour of a domain model.",
632
+ "consequences": "• The simplest code for a domain close to CRUD: one place per use case, easy to follow.\n• A rule needed by several use cases has to be noticed and extracted, or it is copied and drifts.\n• Tests of a script usually need the data access, so they run against an in-memory or containerised database.\n• Moving to a domain model later is a refactoring per script, not a rewrite.",
633
+ "alternatives": "1. A rich domain model: rules kept with the data in every use case, at the cost of modelling and mapping.\n2. Table module: one class per table with the rules about it; fits record-set frameworks.\n3. Rules in stored procedures: close to the data, hard to test and version.",
634
+ "hubWhen": {
635
+ "LOGIC": [
636
+ "scripts"
637
+ ]
638
+ }
639
+ },
640
+ {
641
+ "id": "adr-read-models",
642
+ "type": "adr",
643
+ "label": "Separate read models",
644
+ "x": 780,
645
+ "y": 780,
646
+ "concern": "architecture-style",
647
+ "status": "accepted",
648
+ "date": "",
649
+ "context": "This deployable holds code that keeps changing, and its inner structure decides where each piece of that code goes. The forces: business rules mixed with HTTP handlers, SQL and framework calls can only be tested by starting everything, and change whenever the framework does; a structure with more rings and mappings than the domain needs is ceremony that slows every feature; a feature cut across technical layers touches every layer, while a feature kept in one slice may duplicate what its neighbours do; reads and writes often want different shapes, and forcing both through one model makes either the screens or the rules awkward; and a rule that lives only in a diagram is broken by the first deadline.",
650
+ "decision": "Commands go through the domain model; queries go through read models of their own (query objects with SQL, database views, or jOOQ, Dapper or Kysely queries) shaped for the screen or API that uses them, on the same database, so they are up to date at once. Queries never load aggregates or use the write side's repositories, and the write side never reads the read models to decide.",
651
+ "consequences": "• Screens get exactly the joins and projections they need without bending the domain model.\n• Reads are consistent with writes at once, since both use one database.\n• Two models to change when a field is added that both sides need.\n• Read and write load still share one database; scaling them apart needs a separate store.",
652
+ "alternatives": "1. One model for both: less code, while reads look like the entities.\n2. A separate read store updated by events: scales reads apart, at the cost of staleness and projections to run.",
653
+ "hubWhen": {
654
+ "CQRS": [
655
+ "models"
656
+ ]
657
+ }
658
+ },
659
+ {
660
+ "id": "adr-read-store",
661
+ "type": "adr",
662
+ "label": "A separate read store",
663
+ "x": 780,
664
+ "y": 910,
665
+ "concern": "architecture-style",
666
+ "status": "accepted",
667
+ "date": "",
668
+ "context": "This deployable holds code that keeps changing, and its inner structure decides where each piece of that code goes. The forces: business rules mixed with HTTP handlers, SQL and framework calls can only be tested by starting everything, and change whenever the framework does; a structure with more rings and mappings than the domain needs is ceremony that slows every feature; a feature cut across technical layers touches every layer, while a feature kept in one slice may duplicate what its neighbours do; reads and writes often want different shapes, and forcing both through one model makes either the screens or the rules awkward; and a rule that lives only in a diagram is broken by the first deadline.",
669
+ "decision": "Commands change the write store through the domain model and publish events from it (through an outbox, see the Messaging pack); projections consume them and update a read store chosen for the queries (Elasticsearch or OpenSearch for search, a document store or denormalised tables for screens, a columnar store for dashboards). Read models lag by at most {{READ_LAG_SECONDS}} seconds at the 99th percentile, and the client that made a change reads its own write (it is served from the command's response or waits for the projection's version). A projection can be rebuilt from the events.",
670
+ "consequences": "• Reads scale and pick their technology apart from writes.\n• Readers see data up to {{READ_LAG_SECONDS}} seconds old; screens have to be designed for that.\n• Projections are more code to run, watch and rebuild; their lag is an operational metric.\n• The events become a contract between the write and the read side.",
671
+ "alternatives": "1. Separate read models on the same database: fresh reads, but shared load.\n2. One model for both: the least code while reads and writes look alike.\n3. A database read replica: scales reads without projections, but keeps the write model's shape.",
672
+ "hubWhen": {
673
+ "CQRS": [
674
+ "store"
675
+ ]
676
+ }
677
+ },
678
+ {
679
+ "id": "ff-layers",
680
+ "type": "fitness-fn",
681
+ "label": "Layers call downwards",
682
+ "x": 1040,
683
+ "y": 0,
684
+ "category": "structural",
685
+ "threshold": "0 layer violations: no layer is accessed by a layer above the one it serves",
686
+ "description": "An ArchUnit test declares the three layers and which may access which; it runs with the unit tests and fails on any upward access.\n\nTool: ArchUnit\n\n```java\n@AnalyzeClasses(packages = \"com.example.shop\")\nclass LayerRulesTest {\n @ArchTest\n static final ArchRule layers = layeredArchitecture().consideringAllDependencies()\n .layer(\"Presentation\").definedBy(\"..web..\")\n .layer(\"Business\").definedBy(\"..service..\")\n .layer(\"DataAccess\").definedBy(\"..repository..\")\n .whereLayer(\"Presentation\").mayNotBeAccessedByAnyLayer()\n .whereLayer(\"Business\").mayOnlyBeAccessedByLayers(\"Presentation\")\n .whereLayer(\"DataAccess\").mayOnlyBeAccessedByLayers(\"Business\");\n}\n```",
687
+ "hubWhen": {
688
+ "STYLE": [
689
+ "layered"
690
+ ]
691
+ }
692
+ },
693
+ {
694
+ "id": "ff-hexagonal",
695
+ "type": "fitness-fn",
696
+ "label": "Ports and adapters hold",
697
+ "x": 1040,
698
+ "y": 130,
699
+ "category": "structural",
700
+ "threshold": "0 violations of the hexagonal rules: the core depends on no adapter, adapters reach the core only through ports and do not use each other",
701
+ "description": "Ports and adapters are marked with jMolecules' hexagonal annotations (on package-info.java or the types); the jMolecules ArchUnit rules derive the allowed dependencies from them and fail the test on any other. On .NET, NetArchTest expresses the same rules; in TypeScript, dependency-cruiser with one forbidden rule per direction.\n\nTool: jMolecules ArchUnit rules (ArchUnit)\n\n```java\n// adapter/web/package-info.java: @PrimaryAdapter package com.example.shop.adapter.web;\n// adapter/persistence/package-info.java: @SecondaryAdapter package com.example.shop.adapter.persistence;\n// core/port/in/package-info.java: @PrimaryPort package com.example.shop.core.port.in;\n// core/port/out/package-info.java: @SecondaryPort package com.example.shop.core.port.out;\n\n@AnalyzeClasses(packages = \"com.example.shop\")\nclass HexagonalRulesTest {\n @ArchTest\n static final ArchRule hexagonal = JMoleculesArchitectureRules.ensureHexagonal();\n\n @ArchTest\n static final ArchRule coreIsPlain = noClasses().that().resideInAPackage(\"..core..\")\n .should().dependOnClassesThat().resideInAnyPackage(\"org.springframework..\", \"jakarta.persistence..\", \"..adapter..\");\n}\n```",
702
+ "hubWhen": {
703
+ "STYLE": [
704
+ "hexagonal"
705
+ ]
706
+ }
707
+ },
708
+ {
709
+ "id": "ff-rings",
710
+ "type": "fitness-fn",
711
+ "label": "Rings depend inwards",
712
+ "x": 1040,
713
+ "y": 260,
714
+ "category": "structural",
715
+ "threshold": "0 dependencies from an inner ring to an outer one",
716
+ "description": "Dependency rules forbid each ring to import any ring outside it; the build fails on a violation. On the JVM, ArchUnit's onionArchitecture() with domainModels, domainServices, applicationServices and adapters declares the same rings.\n\nTool: dependency-cruiser\n\n```js\n// .dependency-cruiser.cjs, rings: src/entities < src/use-cases < src/adapters < src/frameworks\nconst outer = { entities: ['use-cases', 'adapters', 'frameworks'], 'use-cases': ['adapters', 'frameworks'], adapters: ['frameworks'] }\nmodule.exports = {\n forbidden: Object.entries(outer).map(([ring, outside]) => ({\n name: `${ring}-depends-inwards`,\n comment: 'ADR Clean architecture rings: source dependencies point inwards',\n severity: 'error',\n from: { path: `^src/${ring}/` },\n to: { path: outside.map((o) => `^src/${o}/`) },\n })),\n options: { tsConfig: { fileName: 'tsconfig.json' } },\n}\n```",
717
+ "hubWhen": {
718
+ "STYLE": [
719
+ "clean"
720
+ ]
721
+ }
722
+ },
723
+ {
724
+ "id": "ff-slices",
725
+ "type": "fitness-fn",
726
+ "label": "Slices independent",
727
+ "x": 1040,
728
+ "y": 390,
729
+ "category": "structural",
730
+ "threshold": "0 dependencies from one feature slice on another",
731
+ "description": "A test finds the slices (namespaces under Features) and checks that none depends on another; it runs with the unit tests. On the JVM, ArchUnit's slices().matching(\"..features.(*)..\").should().notDependOnEachOther() is the same rule.\n\nTool: NetArchTest (xUnit)\n\n```csharp\npublic class SliceRulesTests\n{\n static readonly Assembly App = typeof(Program).Assembly;\n static readonly string[] Slices = App.GetTypes()\n .Select(t => t.Namespace).OfType<string>()\n .Where(n => n.StartsWith(\"Shop.Features.\"))\n .Select(n => string.Join('.', n.Split('.').Take(3)))\n .Distinct().ToArray();\n\n public static IEnumerable<object[]> SliceNames => Slices.Select(s => new object[] { s });\n\n [Theory, MemberData(nameof(SliceNames))]\n public void SliceDependsOnNoOtherSlice(string slice)\n {\n var result = Types.InAssembly(App).That().ResideInNamespace(slice)\n .ShouldNot().HaveDependencyOnAny(Slices.Where(s => s != slice).ToArray())\n .GetResult();\n Assert.True(result.IsSuccessful, string.Join(\", \", result.FailingTypeNames ?? []));\n }\n}\n```",
732
+ "hubWhen": {
733
+ "STYLE": [
734
+ "slices"
735
+ ]
736
+ }
737
+ },
738
+ {
739
+ "id": "ff-domain-tests",
740
+ "type": "fitness-fn",
741
+ "label": "Domain tested alone",
742
+ "x": 1040,
743
+ "y": 520,
744
+ "category": "structural",
745
+ "threshold": "The domain unit tests run with no database, broker or container runtime and cover at least {{DOMAIN_COVERAGE}}% of the domain code's lines",
746
+ "description": "The domain tests are a test project of their own that starts no infrastructure (no Testcontainers, no global setup); the coverage threshold applies to the domain folder only, and the CI job that runs them has no Docker available, so a test that needs infrastructure fails there.\n\nTool: Vitest (coverage thresholds per glob)\n\n```ts\n// vitest.config.ts: run in a CI job without Docker\nimport { defineConfig } from 'vitest/config'\nexport default defineConfig({\n test: {\n projects: [{ test: { name: 'domain', include: ['src/domain/**/*.test.ts'], environment: 'node' } }],\n coverage: {\n provider: 'v8',\n include: ['src/domain/**'],\n thresholds: { 'src/domain/**': { lines: {{DOMAIN_COVERAGE}} } },\n },\n },\n})\n```"
747
+ },
748
+ {
749
+ "id": "ff-pure",
750
+ "type": "fitness-fn",
751
+ "label": "Domain imports no framework",
752
+ "x": 1040,
753
+ "y": 650,
754
+ "category": "structural",
755
+ "threshold": "0 imports of framework, ORM, serialisation or validation libraries in the domain code",
756
+ "description": "An ArchUnit rule lets domain classes depend only on the language and the domain itself; the build fails on any other dependency. In TypeScript, a dependency-cruiser rule from src/domain to node_modules does the same.\n\nTool: ArchUnit\n\n```java\n@AnalyzeClasses(packages = \"com.example.shop\")\nclass DomainPurityTest {\n @ArchTest\n static final ArchRule domainIsPlain = classes().that().resideInAPackage(\"..domain..\")\n .should().onlyDependOnClassesThat().resideInAnyPackage(\"..domain..\", \"java..\")\n .because(\"ADR: the domain imports no framework\");\n}\n```",
757
+ "hubWhen": {
758
+ "FRAMEWORK": [
759
+ "pure"
760
+ ]
761
+ }
762
+ },
763
+ {
764
+ "id": "ff-annotations",
765
+ "type": "fitness-fn",
766
+ "label": "Only mapping annotations",
767
+ "x": 1040,
768
+ "y": 780,
769
+ "category": "structural",
770
+ "threshold": "0 dependencies of domain classes outside the language, the domain, Jakarta Persistence and Bean Validation",
771
+ "description": "An ArchUnit rule allows the domain the mapping and validation annotations and nothing else of the framework; a call into Spring, a transaction API or a messaging client fails the build.\n\nTool: ArchUnit\n\n```java\n@AnalyzeClasses(packages = \"com.example.shop\")\nclass DomainAnnotationsTest {\n @ArchTest\n static final ArchRule onlyMapping = classes().that().resideInAPackage(\"..domain..\")\n .should().onlyDependOnClassesThat().resideInAnyPackage(\n \"..domain..\", \"java..\", \"jakarta.persistence..\", \"jakarta.validation..\")\n .because(\"ADR: mapping and validation annotations only, no framework services\");\n}\n```",
772
+ "hubWhen": {
773
+ "FRAMEWORK": [
774
+ "annotations"
775
+ ]
776
+ }
777
+ },
778
+ {
779
+ "id": "ff-aggregates",
780
+ "type": "fitness-fn",
781
+ "label": "Aggregates guard their state",
782
+ "x": 1040,
783
+ "y": 910,
784
+ "category": "structural",
785
+ "threshold": "0 public setters on domain classes and 0 violations of the jMolecules DDD rules (aggregates referenced by identifier only)",
786
+ "description": "Aggregates, entities and value objects are marked with jMolecules annotations; its ArchUnit rules check that aggregates refer to each other only by identifier and entities belong to one aggregate, and a second rule forbids public setters in the domain.\n\nTool: jMolecules DDD rules (ArchUnit)\n\n```java\n@AnalyzeClasses(packages = \"com.example.shop\")\nclass DomainModelRulesTest {\n @ArchTest\n static final ArchRule ddd = JMoleculesDddRules.all();\n\n @ArchTest\n static final ArchRule noSetters = methods().that().areDeclaredInClassesThat().resideInAPackage(\"..domain..\")\n .and().haveNameMatching(\"set[A-Z].*\")\n .should().notBePublic()\n .because(\"ADR A rich domain model: state changes through behaviour\");\n}\n```",
787
+ "hubWhen": {
788
+ "LOGIC": [
789
+ "rich"
790
+ ]
791
+ }
792
+ },
793
+ {
794
+ "id": "ff-scripts",
795
+ "type": "fitness-fn",
796
+ "label": "Scripts stand alone",
797
+ "x": 1040,
798
+ "y": 1040,
799
+ "category": "structural",
800
+ "threshold": "0 scripts called by another script; 100% of public script methods run in a transaction",
801
+ "description": "ArchUnit rules: scripts are used only by entry points (web, messaging, jobs), and every public script method is transactional.\n\nTool: ArchUnit\n\n```java\n@AnalyzeClasses(packages = \"com.example.shop\")\nclass ScriptRulesTest {\n @ArchTest\n static final ArchRule calledOnlyFromEntryPoints = classes().that().resideInAPackage(\"..usecase..\")\n .should().onlyHaveDependentClassesThat().resideInAnyPackage(\"..web..\", \"..messaging..\", \"..jobs..\");\n\n @ArchTest\n static final ArchRule oneTransactionEach = methods().that().arePublic()\n .and().areDeclaredInClassesThat().resideInAPackage(\"..usecase..\")\n .should().beAnnotatedWith(Transactional.class);\n}\n```",
802
+ "hubWhen": {
803
+ "LOGIC": [
804
+ "scripts"
805
+ ]
806
+ }
807
+ },
808
+ {
809
+ "id": "ff-read-models",
810
+ "type": "fitness-fn",
811
+ "label": "Queries skip the write side",
812
+ "x": 1040,
813
+ "y": 1170,
814
+ "category": "structural",
815
+ "threshold": "0 dependencies from query code on aggregates or write-side repositories, and 0 from command code on read models",
816
+ "description": "ArchUnit rules keep the two sides apart: the query package may not use the domain model or its repositories, and the command side may not read the read models.\n\nTool: ArchUnit\n\n```java\n@AnalyzeClasses(packages = \"com.example.shop\")\nclass CqrsRulesTest {\n @ArchTest\n static final ArchRule queriesSkipWriteSide = noClasses().that().resideInAPackage(\"..query..\")\n .should().dependOnClassesThat().resideInAnyPackage(\"..domain.model..\", \"..domain.repository..\", \"..command..\");\n\n @ArchTest\n static final ArchRule commandsSkipReadModels = noClasses().that().resideInAPackage(\"..command..\")\n .should().dependOnClassesThat().resideInAPackage(\"..query..\");\n}\n```",
817
+ "hubWhen": {
818
+ "CQRS": [
819
+ "models",
820
+ "store"
821
+ ]
822
+ }
823
+ },
824
+ {
825
+ "id": "ff-read-lag",
826
+ "type": "fitness-fn",
827
+ "label": "Read store lag bounded",
828
+ "x": 1040,
829
+ "y": 1300,
830
+ "category": "operational",
831
+ "threshold": "99th percentile of projection lag at most {{READ_LAG_SECONDS}} seconds over 10 minutes",
832
+ "description": "Each projection records, for every event it applies, the seconds between the event's commit and the read store update as a histogram; an alert fires when the 99th percentile passes the limit.\n\nTool: Prometheus alerting rule\n\n```yaml\ngroups:\n - name: read-models\n rules:\n - alert: ReadModelLagging\n expr: |\n histogram_quantile(0.99, sum by (le, projection) (rate(projection_lag_seconds_bucket[10m]))) > {{READ_LAG_SECONDS}}\n for: 10m\n labels: { severity: page }\n annotations:\n summary: \"Projection {{ $labels.projection }} lags more than {{READ_LAG_SECONDS}} s (ADR A separate read store)\"\n```",
833
+ "hubWhen": {
834
+ "CQRS": [
835
+ "store"
836
+ ]
837
+ }
838
+ }
839
+ ],
840
+ "relations": [
841
+ {
842
+ "id": "req-layers--derives--need",
843
+ "sourceId": "req-layers",
844
+ "targetId": "need",
845
+ "relationType": "derives"
846
+ },
847
+ {
848
+ "id": "req-ports--derives--need",
849
+ "sourceId": "req-ports",
850
+ "targetId": "need",
851
+ "relationType": "derives"
852
+ },
853
+ {
854
+ "id": "req-rings--derives--need",
855
+ "sourceId": "req-rings",
856
+ "targetId": "need",
857
+ "relationType": "derives"
858
+ },
859
+ {
860
+ "id": "req-slices--derives--need",
861
+ "sourceId": "req-slices",
862
+ "targetId": "need",
863
+ "relationType": "derives"
864
+ },
865
+ {
866
+ "id": "req-domain-tests--derives--need",
867
+ "sourceId": "req-domain-tests",
868
+ "targetId": "need",
869
+ "relationType": "derives"
870
+ },
871
+ {
872
+ "id": "req-cqs--derives--need",
873
+ "sourceId": "req-cqs",
874
+ "targetId": "need",
875
+ "relationType": "derives"
876
+ },
877
+ {
878
+ "id": "req-aggregates--derives--need",
879
+ "sourceId": "req-aggregates",
880
+ "targetId": "need",
881
+ "relationType": "derives"
882
+ },
883
+ {
884
+ "id": "req-scripts--derives--need",
885
+ "sourceId": "req-scripts",
886
+ "targetId": "need",
887
+ "relationType": "derives"
888
+ },
889
+ {
890
+ "id": "req-read-models--derives--need",
891
+ "sourceId": "req-read-models",
892
+ "targetId": "need",
893
+ "relationType": "derives"
894
+ },
895
+ {
896
+ "id": "req-read-lag--derives--need",
897
+ "sourceId": "req-read-lag",
898
+ "targetId": "need",
899
+ "relationType": "derives"
900
+ },
901
+ {
902
+ "id": "req-pure--derives--need",
903
+ "sourceId": "req-pure",
904
+ "targetId": "need",
905
+ "relationType": "derives"
906
+ },
907
+ {
908
+ "id": "req-annotations--derives--need",
909
+ "sourceId": "req-annotations",
910
+ "targetId": "need",
911
+ "relationType": "derives"
912
+ },
913
+ {
914
+ "id": "sc-layers--verifies--req-layers",
915
+ "sourceId": "sc-layers",
916
+ "targetId": "req-layers",
917
+ "relationType": "verifies"
918
+ },
919
+ {
920
+ "id": "sc-ports--verifies--req-ports",
921
+ "sourceId": "sc-ports",
922
+ "targetId": "req-ports",
923
+ "relationType": "verifies"
924
+ },
925
+ {
926
+ "id": "sc-rings--verifies--req-rings",
927
+ "sourceId": "sc-rings",
928
+ "targetId": "req-rings",
929
+ "relationType": "verifies"
930
+ },
931
+ {
932
+ "id": "sc-slices--verifies--req-slices",
933
+ "sourceId": "sc-slices",
934
+ "targetId": "req-slices",
935
+ "relationType": "verifies"
936
+ },
937
+ {
938
+ "id": "sc-domain-tests--verifies--req-domain-tests",
939
+ "sourceId": "sc-domain-tests",
940
+ "targetId": "req-domain-tests",
941
+ "relationType": "verifies"
942
+ },
943
+ {
944
+ "id": "sc-cqs--verifies--req-cqs",
945
+ "sourceId": "sc-cqs",
946
+ "targetId": "req-cqs",
947
+ "relationType": "verifies"
948
+ },
949
+ {
950
+ "id": "sc-aggregates--verifies--req-aggregates",
951
+ "sourceId": "sc-aggregates",
952
+ "targetId": "req-aggregates",
953
+ "relationType": "verifies"
954
+ },
955
+ {
956
+ "id": "sc-scripts--verifies--req-scripts",
957
+ "sourceId": "sc-scripts",
958
+ "targetId": "req-scripts",
959
+ "relationType": "verifies"
960
+ },
961
+ {
962
+ "id": "sc-read-models--verifies--req-read-models",
963
+ "sourceId": "sc-read-models",
964
+ "targetId": "req-read-models",
965
+ "relationType": "verifies"
966
+ },
967
+ {
968
+ "id": "sc-read-lag--verifies--req-read-lag",
969
+ "sourceId": "sc-read-lag",
970
+ "targetId": "req-read-lag",
971
+ "relationType": "verifies"
972
+ },
973
+ {
974
+ "id": "sc-pure--verifies--req-pure",
975
+ "sourceId": "sc-pure",
976
+ "targetId": "req-pure",
977
+ "relationType": "verifies"
978
+ },
979
+ {
980
+ "id": "sc-annotations--verifies--req-annotations",
981
+ "sourceId": "sc-annotations",
982
+ "targetId": "req-annotations",
983
+ "relationType": "verifies"
984
+ },
985
+ {
986
+ "id": "ff-layers--implements--adr-layered",
987
+ "sourceId": "ff-layers",
988
+ "targetId": "adr-layered",
989
+ "relationType": "implements"
990
+ },
991
+ {
992
+ "id": "ff-hexagonal--implements--adr-hexagonal",
993
+ "sourceId": "ff-hexagonal",
994
+ "targetId": "adr-hexagonal",
995
+ "relationType": "implements"
996
+ },
997
+ {
998
+ "id": "ff-rings--implements--adr-clean",
999
+ "sourceId": "ff-rings",
1000
+ "targetId": "adr-clean",
1001
+ "relationType": "implements"
1002
+ },
1003
+ {
1004
+ "id": "ff-slices--implements--adr-slices",
1005
+ "sourceId": "ff-slices",
1006
+ "targetId": "adr-slices",
1007
+ "relationType": "implements"
1008
+ },
1009
+ {
1010
+ "id": "ff-domain-tests--implements--adr-layered",
1011
+ "sourceId": "ff-domain-tests",
1012
+ "targetId": "adr-layered",
1013
+ "relationType": "implements"
1014
+ },
1015
+ {
1016
+ "id": "ff-domain-tests--implements--adr-hexagonal",
1017
+ "sourceId": "ff-domain-tests",
1018
+ "targetId": "adr-hexagonal",
1019
+ "relationType": "implements"
1020
+ },
1021
+ {
1022
+ "id": "ff-domain-tests--implements--adr-clean",
1023
+ "sourceId": "ff-domain-tests",
1024
+ "targetId": "adr-clean",
1025
+ "relationType": "implements"
1026
+ },
1027
+ {
1028
+ "id": "ff-domain-tests--implements--adr-slices",
1029
+ "sourceId": "ff-domain-tests",
1030
+ "targetId": "adr-slices",
1031
+ "relationType": "implements"
1032
+ },
1033
+ {
1034
+ "id": "ff-pure--implements--adr-layered",
1035
+ "sourceId": "ff-pure",
1036
+ "targetId": "adr-layered",
1037
+ "relationType": "implements"
1038
+ },
1039
+ {
1040
+ "id": "ff-pure--implements--adr-hexagonal",
1041
+ "sourceId": "ff-pure",
1042
+ "targetId": "adr-hexagonal",
1043
+ "relationType": "implements"
1044
+ },
1045
+ {
1046
+ "id": "ff-pure--implements--adr-clean",
1047
+ "sourceId": "ff-pure",
1048
+ "targetId": "adr-clean",
1049
+ "relationType": "implements"
1050
+ },
1051
+ {
1052
+ "id": "ff-pure--implements--adr-slices",
1053
+ "sourceId": "ff-pure",
1054
+ "targetId": "adr-slices",
1055
+ "relationType": "implements"
1056
+ },
1057
+ {
1058
+ "id": "ff-annotations--implements--adr-layered",
1059
+ "sourceId": "ff-annotations",
1060
+ "targetId": "adr-layered",
1061
+ "relationType": "implements"
1062
+ },
1063
+ {
1064
+ "id": "ff-annotations--implements--adr-hexagonal",
1065
+ "sourceId": "ff-annotations",
1066
+ "targetId": "adr-hexagonal",
1067
+ "relationType": "implements"
1068
+ },
1069
+ {
1070
+ "id": "ff-annotations--implements--adr-clean",
1071
+ "sourceId": "ff-annotations",
1072
+ "targetId": "adr-clean",
1073
+ "relationType": "implements"
1074
+ },
1075
+ {
1076
+ "id": "ff-annotations--implements--adr-slices",
1077
+ "sourceId": "ff-annotations",
1078
+ "targetId": "adr-slices",
1079
+ "relationType": "implements"
1080
+ },
1081
+ {
1082
+ "id": "ff-aggregates--implements--adr-rich-domain",
1083
+ "sourceId": "ff-aggregates",
1084
+ "targetId": "adr-rich-domain",
1085
+ "relationType": "implements"
1086
+ },
1087
+ {
1088
+ "id": "ff-scripts--implements--adr-transaction-scripts",
1089
+ "sourceId": "ff-scripts",
1090
+ "targetId": "adr-transaction-scripts",
1091
+ "relationType": "implements"
1092
+ },
1093
+ {
1094
+ "id": "ff-read-models--implements--adr-read-models",
1095
+ "sourceId": "ff-read-models",
1096
+ "targetId": "adr-read-models",
1097
+ "relationType": "implements"
1098
+ },
1099
+ {
1100
+ "id": "ff-read-models--implements--adr-read-store",
1101
+ "sourceId": "ff-read-models",
1102
+ "targetId": "adr-read-store",
1103
+ "relationType": "implements"
1104
+ },
1105
+ {
1106
+ "id": "ff-read-lag--implements--adr-read-store",
1107
+ "sourceId": "ff-read-lag",
1108
+ "targetId": "adr-read-store",
1109
+ "relationType": "implements"
1110
+ }
1111
+ ]
1112
+ }