@radicaltools/cli 0.2.0 → 0.3.1

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 (57) hide show
  1. package/README.md +353 -33
  2. package/dist/hub-catalogue/concern/concern-api-collections.radical +1136 -0
  3. package/dist/hub-catalogue/concern/concern-api-errors.radical +1180 -0
  4. package/dist/hub-catalogue/concern/concern-api-evolution.radical +1174 -0
  5. package/dist/hub-catalogue/concern/concern-api-idempotency.radical +1218 -0
  6. package/dist/hub-catalogue/concern/concern-api-resource-design.radical +1102 -0
  7. package/dist/hub-catalogue/concern/concern-api-style-guide.radical +1210 -0
  8. package/dist/hub-catalogue/concern/concern-architecture-style.radical +1268 -0
  9. package/dist/hub-catalogue/concern/concern-audit-trail.radical +1096 -0
  10. package/dist/hub-catalogue/concern/concern-authentication.radical +895 -0
  11. package/dist/hub-catalogue/concern/concern-authorization.radical +1686 -0
  12. package/dist/hub-catalogue/concern/concern-availability.radical +1028 -0
  13. package/dist/hub-catalogue/concern/concern-backend-stack.radical +1037 -0
  14. package/dist/hub-catalogue/concern/concern-backup-recovery.radical +1560 -0
  15. package/dist/hub-catalogue/concern/concern-caching.radical +1294 -0
  16. package/dist/hub-catalogue/concern/concern-capacity.radical +915 -0
  17. package/dist/hub-catalogue/concern/concern-code-documentation.radical +1397 -0
  18. package/dist/hub-catalogue/concern/concern-code-quality-gate.radical +1409 -0
  19. package/dist/hub-catalogue/concern/concern-code-review-branching.radical +1416 -0
  20. package/dist/hub-catalogue/concern/concern-code-style.radical +1058 -0
  21. package/dist/hub-catalogue/concern/concern-communication-style.radical +1508 -0
  22. package/dist/hub-catalogue/concern/concern-data-classification.radical +970 -0
  23. package/dist/hub-catalogue/concern/concern-data-consistency.radical +1112 -0
  24. package/dist/hub-catalogue/concern/concern-data-store.radical +1282 -0
  25. package/dist/hub-catalogue/concern/concern-decomposition.radical +1318 -0
  26. package/dist/hub-catalogue/concern/concern-definition-of-done.radical +1214 -0
  27. package/dist/hub-catalogue/concern/concern-delivery-metrics.radical +966 -0
  28. package/dist/hub-catalogue/concern/concern-dependency-hygiene.radical +1345 -0
  29. package/dist/hub-catalogue/concern/concern-deployment.radical +1203 -0
  30. package/dist/hub-catalogue/concern/concern-encryption.radical +1318 -0
  31. package/dist/hub-catalogue/concern/concern-error-handling-logging.radical +1197 -0
  32. package/dist/hub-catalogue/concern/concern-eu-dora.radical +1321 -0
  33. package/dist/hub-catalogue/concern/concern-frontend-stack.radical +1647 -0
  34. package/dist/hub-catalogue/concern/concern-incident-management.radical +1204 -0
  35. package/dist/hub-catalogue/concern/concern-infrastructure.radical +2183 -0
  36. package/dist/hub-catalogue/concern/concern-integration-resilience.radical +1116 -0
  37. package/dist/hub-catalogue/concern/concern-messaging.radical +973 -0
  38. package/dist/hub-catalogue/concern/concern-module-boundaries.radical +867 -0
  39. package/dist/hub-catalogue/concern/concern-observability.radical +997 -0
  40. package/dist/hub-catalogue/concern/concern-operational-readiness.radical +1249 -0
  41. package/dist/hub-catalogue/concern/concern-personal-data.radical +1949 -0
  42. package/dist/hub-catalogue/concern/concern-quality-priorities.radical +1091 -0
  43. package/dist/hub-catalogue/concern/concern-rate-limiting.radical +1445 -0
  44. package/dist/hub-catalogue/concern/concern-release-versioning.radical +1358 -0
  45. package/dist/hub-catalogue/concern/concern-retention.radical +1399 -0
  46. package/dist/hub-catalogue/concern/concern-secrets.radical +1284 -0
  47. package/dist/hub-catalogue/concern/concern-secure-coding.radical +1379 -0
  48. package/dist/hub-catalogue/concern/concern-secure-development.radical +1245 -0
  49. package/dist/hub-catalogue/concern/concern-security-detection.radical +1153 -0
  50. package/dist/hub-catalogue/concern/concern-supply-chain.radical +1386 -0
  51. package/dist/hub-catalogue/concern/concern-technical-debt.radical +1450 -0
  52. package/dist/hub-catalogue/concern/concern-technology-lifecycle.radical +1145 -0
  53. package/dist/hub-catalogue/concern/concern-tenant-isolation.radical +1440 -0
  54. package/dist/hub-catalogue/concern/concern-test-strategy.radical +1212 -0
  55. package/dist/hub-catalogue/concern/concern-threat-modelling.radical +1143 -0
  56. package/dist/index.js +12712 -7144
  57. package/package.json +5 -3
@@ -0,0 +1,1268 @@
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. The snippets are for the JVM (ArchUnit, jMolecules, JaCoCo); each tool line names the .NET, TypeScript and Python equivalent.",
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": "Eric Evans: Domain-Driven Design (reference and summary)",
51
+ "url": "https://www.domainlanguage.com/ddd/"
52
+ },
53
+ {
54
+ "title": "Martin Fowler: CQRS",
55
+ "url": "https://martinfowler.com/bliki/CQRS.html"
56
+ },
57
+ {
58
+ "title": "microservices.io, Command Query Responsibility Segregation (CQRS)",
59
+ "url": "https://microservices.io/patterns/data/cqrs.html"
60
+ },
61
+ {
62
+ "title": "ISO/IEC 25010, Maintainability: modularity, testability",
63
+ "url": "https://iso25000.com/index.php/en/iso-25000-standards/iso-25010"
64
+ },
65
+ {
66
+ "title": "jMolecules: architecture and DDD concepts as code",
67
+ "url": "https://github.com/xmolecules/jmolecules"
68
+ },
69
+ {
70
+ "title": "ArchUnit user guide",
71
+ "url": "https://www.archunit.org/userguide/html/000_Index.html"
72
+ }
73
+ ],
74
+ "templateParams": [
75
+ {
76
+ "key": "STYLE",
77
+ "title": "Structure",
78
+ "label": "How is the code inside the deployable structured?",
79
+ "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.",
80
+ "defaultValue": "hexagonal",
81
+ "options": [
82
+ {
83
+ "value": "layered",
84
+ "label": "layers (presentation, business, data access)",
85
+ "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)."
86
+ },
87
+ {
88
+ "value": "hexagonal",
89
+ "label": "ports and adapters (hexagonal)",
90
+ "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. Goes with a domain kept plain of framework annotations."
91
+ },
92
+ {
93
+ "value": "clean",
94
+ "label": "clean or onion rings",
95
+ "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. Goes with a domain kept plain of framework annotations."
96
+ },
97
+ {
98
+ "value": "slices",
99
+ "label": "vertical slices, one per feature",
100
+ "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."
101
+ }
102
+ ]
103
+ },
104
+ {
105
+ "key": "LOGIC",
106
+ "title": "Domain logic",
107
+ "label": "Where do the business rules live?",
108
+ "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.",
109
+ "defaultValue": "rich",
110
+ "options": [
111
+ {
112
+ "value": "rich",
113
+ "label": "a rich domain model (aggregates)",
114
+ "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."
115
+ },
116
+ {
117
+ "value": "scripts",
118
+ "label": "transaction scripts per use case",
119
+ "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."
120
+ }
121
+ ]
122
+ },
123
+ {
124
+ "key": "CQRS",
125
+ "title": "Reads and writes",
126
+ "label": "Are reads and writes served by separate models?",
127
+ "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.",
128
+ "defaultValue": "none",
129
+ "options": [
130
+ {
131
+ "value": "none",
132
+ "label": "no, one model for both",
133
+ "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."
134
+ },
135
+ {
136
+ "value": "models",
137
+ "label": "separate read models, same database",
138
+ "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."
139
+ },
140
+ {
141
+ "value": "store",
142
+ "label": "a separate read store, updated by events",
143
+ "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."
144
+ }
145
+ ]
146
+ },
147
+ {
148
+ "key": "FRAMEWORK",
149
+ "title": "Framework",
150
+ "label": "How far does the domain code stay independent of the framework?",
151
+ "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. Only layers and vertical slices admit them: ports and adapters and clean rings keep their core plain.",
152
+ "defaultValue": "pure",
153
+ "options": [
154
+ {
155
+ "value": "pure",
156
+ "label": "plain language, no framework annotations",
157
+ "description": "Domain classes import nothing but the language, the domain itself and the jMolecules role annotations; 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."
158
+ },
159
+ {
160
+ "value": "annotations",
161
+ "label": "mapping and validation annotations allowed",
162
+ "description": "Domain classes may carry ORM mapping and validation annotations (Jakarta Persistence and Bean Validation; EF Core attributes on .NET) 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; not with ports and adapters or clean rings, whose core imports no framework."
163
+ }
164
+ ]
165
+ },
166
+ {
167
+ "key": "DOMAIN_COVERAGE",
168
+ "label": "What line coverage must the infrastructure-free unit tests reach on the domain code (%)?",
169
+ "defaultValue": "80",
170
+ "type": "number"
171
+ },
172
+ {
173
+ "key": "READ_LAG_SECONDS",
174
+ "label": "How stale may a separate read store get at the 99th percentile (seconds)?",
175
+ "defaultValue": "5",
176
+ "type": "number"
177
+ }
178
+ ]
179
+ },
180
+ "nodes": [
181
+ {
182
+ "id": "need",
183
+ "type": "need",
184
+ "label": "Code structured on purpose",
185
+ "x": 0,
186
+ "y": 0,
187
+ "kind": "brief",
188
+ "source": "Hub concern pack: Architecture style",
189
+ "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. Every rule below assumes one package layout under com.example.shop: `domain` holds the domain model (`domain.model`) and domain services (`domain.service`); `application` holds the use cases or transaction scripts and the ports (`application.port.in`, `application.port.out`); `adapter.web`, `adapter.persistence`, `adapter.messaging` and `adapter.jobs` hold the adapters, which are also the presentation and data-access layers; `features.<name>` is one vertical slice; `query` holds read models (in a slice, `features.<name>.query`). Test classes are left out of the rules."
190
+ },
191
+ {
192
+ "id": "req-layers",
193
+ "type": "requirement",
194
+ "label": "Layers call downwards",
195
+ "x": 260,
196
+ "y": 0,
197
+ "ears_type": "ubiquitous",
198
+ "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",
199
+ "rationale": "Layering keeps each concern in one place, so a change of screen or of database stays in its layer (Fowler, PresentationDomainDataLayering).",
200
+ "hubWhen": {
201
+ "STYLE": [
202
+ "layered"
203
+ ]
204
+ }
205
+ },
206
+ {
207
+ "id": "req-ports",
208
+ "type": "requirement",
209
+ "label": "Core reached through ports",
210
+ "x": 260,
211
+ "y": 130,
212
+ "ears_type": "ubiquitous",
213
+ "action": "keep the core (domain and application) free of framework-service, database-driver, messaging and HTTP imports, let adapters reach it only through the ports it declares, and let no adapter use another adapter",
214
+ "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).",
215
+ "hubWhen": {
216
+ "STYLE": [
217
+ "hexagonal"
218
+ ]
219
+ }
220
+ },
221
+ {
222
+ "id": "req-rings",
223
+ "type": "requirement",
224
+ "label": "Dependencies point inwards",
225
+ "x": 260,
226
+ "y": 260,
227
+ "ears_type": "ubiquitous",
228
+ "action": "point every source dependency inwards (adapters, then application services, then domain services, then the domain model), with 0 outward dependencies and each use case as one interactor class in application.usecase implementing an input boundary from application.port.in",
229
+ "rationale": "The dependency rule is what makes the inner rings independent of the UI, the database and the frameworks (Martin, The Clean Architecture).",
230
+ "hubWhen": {
231
+ "STYLE": [
232
+ "clean"
233
+ ]
234
+ }
235
+ },
236
+ {
237
+ "id": "req-slices",
238
+ "type": "requirement",
239
+ "label": "Slices stand alone",
240
+ "x": 260,
241
+ "y": 390,
242
+ "ears_type": "ubiquitous",
243
+ "action": "keep each feature's endpoint, handler, validation and data access in its own slice under features, with 0 dependencies from one slice on another and 0 dependencies from the common domain folder on any slice",
244
+ "rationale": "Coupling is minimised between slices and maximised within one, so a change to a feature stays in its slice (Bogard, Vertical Slice Architecture).",
245
+ "hubWhen": {
246
+ "STYLE": [
247
+ "slices"
248
+ ]
249
+ }
250
+ },
251
+ {
252
+ "id": "req-domain-tests",
253
+ "type": "requirement",
254
+ "label": "Rules tested without infrastructure",
255
+ "x": 260,
256
+ "y": 520,
257
+ "ears_type": "ubiquitous",
258
+ "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 every domain package",
259
+ "rationale": "Rules that can only be tested through the infrastructure are tested slowly and rarely; testability is part of maintainability (ISO/IEC 25010).",
260
+ "hubWhen": {
261
+ "LOGIC": [
262
+ "rich"
263
+ ]
264
+ }
265
+ },
266
+ {
267
+ "id": "req-aggregates",
268
+ "type": "requirement",
269
+ "label": "Aggregates guard invariants",
270
+ "x": 260,
271
+ "y": 650,
272
+ "ears_type": "ubiquitous",
273
+ "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 refer from one aggregate to another by identifier only (0 object references between aggregates)",
274
+ "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).",
275
+ "hubWhen": {
276
+ "LOGIC": [
277
+ "rich"
278
+ ]
279
+ }
280
+ },
281
+ {
282
+ "id": "req-scripts",
283
+ "type": "requirement",
284
+ "label": "One script per use case",
285
+ "x": 260,
286
+ "y": 780,
287
+ "ears_type": "ubiquitous",
288
+ "action": "put each use case's business logic in one transaction script (a class named *Script) that runs in one transaction, with 0 business rules in controllers, views or database triggers and 0 calls from one script to another",
289
+ "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).",
290
+ "hubWhen": {
291
+ "LOGIC": [
292
+ "scripts"
293
+ ]
294
+ }
295
+ },
296
+ {
297
+ "id": "req-one-model",
298
+ "type": "requirement",
299
+ "label": "One model serves both",
300
+ "x": 260,
301
+ "y": 910,
302
+ "ears_type": "ubiquitous",
303
+ "action": "serve queries and commands from the one model, with 0 read-model packages or projections in the deployable, and let a query change nothing",
304
+ "rationale": "A read side that appears without a decision is the second model with none of its benefits; keeping it out until decided keeps the code to one shape (Fowler, CQRS).",
305
+ "hubWhen": {
306
+ "CQRS": [
307
+ "none"
308
+ ]
309
+ }
310
+ },
311
+ {
312
+ "id": "req-read-models",
313
+ "type": "requirement",
314
+ "label": "Queries use read models",
315
+ "x": 260,
316
+ "y": 1040,
317
+ "ears_type": "ubiquitous",
318
+ "action": "serve every query from a read model in the query package shaped for the screen or API that uses it, with 0 queries loading aggregates or using the write side's repositories and 0 commands reading a read model to decide",
319
+ "rationale": "Separating the read side lets each model take the shape its job needs (Fowler, CQRS; microservices.io, CQRS).",
320
+ "hubWhen": {
321
+ "CQRS": [
322
+ "models",
323
+ "store"
324
+ ]
325
+ }
326
+ },
327
+ {
328
+ "id": "req-read-lag",
329
+ "type": "requirement",
330
+ "label": "Read store catches up",
331
+ "x": 260,
332
+ "y": 1170,
333
+ "ears_type": "event-driven",
334
+ "trigger": "a command commits a change",
335
+ "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",
336
+ "rationale": "A separate read store is eventually consistent; bounding the lag and keeping read-your-writes makes it acceptable to users (microservices.io, CQRS).",
337
+ "hubWhen": {
338
+ "CQRS": [
339
+ "store"
340
+ ]
341
+ }
342
+ },
343
+ {
344
+ "id": "req-rebuild",
345
+ "type": "requirement",
346
+ "label": "Projections can be rebuilt",
347
+ "x": 260,
348
+ "y": 1300,
349
+ "ears_type": "ubiquitous",
350
+ "action": "keep every projection rebuildable from the retained events alone, so that a read model cleared and replayed from the start of the stream equals the one built as the events arrived",
351
+ "rationale": "A read store that cannot be rebuilt is a second source of truth; replay is what makes it disposable (Fowler, CQRS; microservices.io, CQRS).",
352
+ "hubWhen": {
353
+ "CQRS": [
354
+ "store"
355
+ ]
356
+ }
357
+ },
358
+ {
359
+ "id": "req-pure",
360
+ "type": "requirement",
361
+ "label": "Domain imports no framework",
362
+ "x": 260,
363
+ "y": 1430,
364
+ "ears_type": "ubiquitous",
365
+ "action": "keep the domain code free of framework, ORM, serialisation and validation-library imports and annotations, with 0 such imports (the jMolecules role annotations excepted), so that a framework upgrade changes no domain file",
366
+ "rationale": "A domain tied to no framework outlives framework upgrades and is tested as plain code (Martin, The Clean Architecture; Cockburn, Hexagonal architecture).",
367
+ "hubWhen": {
368
+ "FRAMEWORK": [
369
+ "pure"
370
+ ]
371
+ }
372
+ },
373
+ {
374
+ "id": "req-annotations",
375
+ "type": "requirement",
376
+ "label": "Only mapping annotations",
377
+ "x": 260,
378
+ "y": 1560,
379
+ "ears_type": "ubiquitous",
380
+ "action": "allow in the domain code only Jakarta Persistence and Bean Validation annotations (and the jMolecules role annotations), with 0 uses of framework services, transactions, HTTP or messaging APIs",
381
+ "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).",
382
+ "hubWhen": {
383
+ "FRAMEWORK": [
384
+ "annotations"
385
+ ]
386
+ }
387
+ },
388
+ {
389
+ "id": "sc-layers",
390
+ "type": "scenario",
391
+ "label": "Upward call refused",
392
+ "x": 520,
393
+ "y": 0,
394
+ "given": "the layer rules",
395
+ "when": "data-access code imports a presentation type, or a service imports a Spring MVC type",
396
+ "then": "the rule check reports both and the build fails",
397
+ "hubWhen": {
398
+ "STYLE": [
399
+ "layered"
400
+ ]
401
+ }
402
+ },
403
+ {
404
+ "id": "sc-ports",
405
+ "type": "scenario",
406
+ "label": "Adapter bypasses port",
407
+ "x": 520,
408
+ "y": 130,
409
+ "given": "the core with its ports and the web and persistence adapters",
410
+ "when": "the web adapter calls the persistence adapter directly, or the core imports a Spring class",
411
+ "then": "the rule check reports both and the build fails",
412
+ "hubWhen": {
413
+ "STYLE": [
414
+ "hexagonal"
415
+ ]
416
+ }
417
+ },
418
+ {
419
+ "id": "sc-rings",
420
+ "type": "scenario",
421
+ "label": "Outward dependency refused",
422
+ "x": 520,
423
+ "y": 260,
424
+ "given": "the rings",
425
+ "when": "a use case imports a controller, or an interactor is added that implements no input boundary",
426
+ "then": "the rule check reports both and the build fails",
427
+ "hubWhen": {
428
+ "STYLE": [
429
+ "clean"
430
+ ]
431
+ }
432
+ },
433
+ {
434
+ "id": "sc-slices",
435
+ "type": "scenario",
436
+ "label": "Slice uses another",
437
+ "x": 520,
438
+ "y": 390,
439
+ "given": "the slices for placing and for cancelling an order",
440
+ "when": "the cancel handler calls a class of the place-order slice",
441
+ "then": "the rule check reports the dependency between slices and the build fails",
442
+ "hubWhen": {
443
+ "STYLE": [
444
+ "slices"
445
+ ]
446
+ }
447
+ },
448
+ {
449
+ "id": "sc-domain-tests",
450
+ "type": "scenario",
451
+ "label": "Domain tests run alone",
452
+ "x": 520,
453
+ "y": 520,
454
+ "given": "a build agent with no database, broker or container runtime",
455
+ "when": "the domain unit tests run",
456
+ "then": "they all pass and cover at least {{DOMAIN_COVERAGE}}% of the lines of every domain package",
457
+ "hubWhen": {
458
+ "LOGIC": [
459
+ "rich"
460
+ ]
461
+ }
462
+ },
463
+ {
464
+ "id": "sc-aggregates",
465
+ "type": "scenario",
466
+ "label": "Invariant cannot be bypassed",
467
+ "x": 520,
468
+ "y": 650,
469
+ "given": "an order whose total may not exceed its credit limit",
470
+ "when": "a use case adds a line that passes the limit, and another tries to set the total directly",
471
+ "then": "the first is refused by the order itself and the second does not compile",
472
+ "hubWhen": {
473
+ "LOGIC": [
474
+ "rich"
475
+ ]
476
+ }
477
+ },
478
+ {
479
+ "id": "sc-scripts",
480
+ "type": "scenario",
481
+ "label": "Script stands alone",
482
+ "x": 520,
483
+ "y": 780,
484
+ "given": "the scripts for placing and for cancelling an order",
485
+ "when": "the rule check runs",
486
+ "then": "each script is called only from entry points, runs in a transaction, and calls no other script",
487
+ "hubWhen": {
488
+ "LOGIC": [
489
+ "scripts"
490
+ ]
491
+ }
492
+ },
493
+ {
494
+ "id": "sc-one-model",
495
+ "type": "scenario",
496
+ "label": "Read side arrives undecided",
497
+ "x": 520,
498
+ "y": 910,
499
+ "given": "the one-model rule",
500
+ "when": "a change adds a query package with read models",
501
+ "then": "the rule check reports it and the build fails until a new decision separates reads and writes",
502
+ "hubWhen": {
503
+ "CQRS": [
504
+ "none"
505
+ ]
506
+ }
507
+ },
508
+ {
509
+ "id": "sc-read-models",
510
+ "type": "scenario",
511
+ "label": "Query skips the aggregates",
512
+ "x": 520,
513
+ "y": 1040,
514
+ "given": "the order list screen",
515
+ "when": "its query runs",
516
+ "then": "it reads the order summary read model and loads no order aggregate",
517
+ "hubWhen": {
518
+ "CQRS": [
519
+ "models",
520
+ "store"
521
+ ]
522
+ }
523
+ },
524
+ {
525
+ "id": "sc-read-lag",
526
+ "type": "scenario",
527
+ "label": "Read store catches up",
528
+ "x": 520,
529
+ "y": 1170,
530
+ "given": "a read store fed by events",
531
+ "when": "an order is placed and the order list is read",
532
+ "then": "the person who placed it sees it at once, and every reader within {{READ_LAG_SECONDS}} seconds",
533
+ "hubWhen": {
534
+ "CQRS": [
535
+ "store"
536
+ ]
537
+ }
538
+ },
539
+ {
540
+ "id": "sc-rebuild",
541
+ "type": "scenario",
542
+ "label": "Projection rebuilt",
543
+ "x": 520,
544
+ "y": 1300,
545
+ "given": "an order summary read model built from events",
546
+ "when": "it is cleared and the projection replays the stream from the start",
547
+ "then": "the rebuilt read model equals the one built incrementally",
548
+ "hubWhen": {
549
+ "CQRS": [
550
+ "store"
551
+ ]
552
+ }
553
+ },
554
+ {
555
+ "id": "sc-pure",
556
+ "type": "scenario",
557
+ "label": "Framework upgrade",
558
+ "x": 520,
559
+ "y": 1430,
560
+ "given": "the domain code",
561
+ "when": "the rule check runs, and later the framework is upgraded a major version",
562
+ "then": "the check finds 0 framework imports and the upgrade changes no domain file",
563
+ "hubWhen": {
564
+ "FRAMEWORK": [
565
+ "pure"
566
+ ]
567
+ }
568
+ },
569
+ {
570
+ "id": "sc-annotations",
571
+ "type": "scenario",
572
+ "label": "Framework call refused",
573
+ "x": 520,
574
+ "y": 1560,
575
+ "given": "a domain entity with mapping annotations",
576
+ "when": "a change makes it call a repository or publish through the framework's event bus",
577
+ "then": "the rule check reports it and the build fails",
578
+ "hubWhen": {
579
+ "FRAMEWORK": [
580
+ "annotations"
581
+ ]
582
+ }
583
+ },
584
+ {
585
+ "id": "adr-layered",
586
+ "type": "adr",
587
+ "label": "The code is layered",
588
+ "x": 780,
589
+ "y": 0,
590
+ "concern": "architecture-style",
591
+ "status": "accepted",
592
+ "date": "",
593
+ "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.",
594
+ "decision": "Inside the deployable the code is cut into three layers, presentation (adapter.web, adapter.jobs), business logic (application, domain) and data access (adapter.persistence, adapter.messaging), 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 with ArchUnit's layeredArchitecture(); NetArchTest on .NET, dependency-cruiser or eslint-plugin-boundaries for TypeScript and import-linter's layers contract for Python express the same rules, as a unit test in the existing test runner.",
595
+ "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.",
596
+ "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.",
597
+ "hubWhen": {
598
+ "STYLE": [
599
+ "layered"
600
+ ]
601
+ }
602
+ },
603
+ {
604
+ "id": "adr-hexagonal",
605
+ "type": "adr",
606
+ "label": "Ports and adapters",
607
+ "x": 780,
608
+ "y": 130,
609
+ "concern": "architecture-style",
610
+ "status": "accepted",
611
+ "date": "",
612
+ "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.",
613
+ "decision": "Inside the deployable the code has a core (domain and application) that imports no framework service, database driver, messaging or HTTP library; the core declares driving ports (application.port.in, the use cases it offers) and driven ports (application.port.out: repositories, publishers, clients it needs), and the 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 with jMolecules' hexagonal annotations and JMoleculesArchitectureRules.ensureHexagonal() (ArchUnit); NetArchTest on .NET, dependency-cruiser for TypeScript and import-linter for Python express the same rules.",
614
+ "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).",
615
+ "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.",
616
+ "hubWhen": {
617
+ "STYLE": [
618
+ "hexagonal"
619
+ ]
620
+ }
621
+ },
622
+ {
623
+ "id": "adr-clean",
624
+ "type": "adr",
625
+ "label": "Clean architecture rings",
626
+ "x": 780,
627
+ "y": 260,
628
+ "concern": "architecture-style",
629
+ "status": "accepted",
630
+ "date": "",
631
+ "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.",
632
+ "decision": "Inside the deployable the code is cut into rings: the domain model (domain.model, the entities), domain services (domain.service), application services (application: one interactor class per use case in application.usecase, each implementing an input boundary from application.port.in and calling output boundaries from application.port.out) and the adapters (adapter.web, adapter.persistence, adapter.messaging, adapter.jobs: controllers, presenters, gateways and the framework wiring). 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 with ArchUnit's onionArchitecture(); NetArchTest on .NET, dependency-cruiser for TypeScript and import-linter's layers contract for Python express the same rules.",
633
+ "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.",
634
+ "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.",
635
+ "hubWhen": {
636
+ "STYLE": [
637
+ "clean"
638
+ ]
639
+ }
640
+ },
641
+ {
642
+ "id": "adr-slices",
643
+ "type": "adr",
644
+ "label": "Vertical slices",
645
+ "x": 780,
646
+ "y": 390,
647
+ "concern": "architecture-style",
648
+ "status": "accepted",
649
+ "date": "",
650
+ "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.",
651
+ "decision": "Inside the deployable the code is cut by feature: one slice per request (a command or a query) under features.<name>, 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, and the domain folder knows no slice. Requests go through the framework's routing with one handler class per request (Spring MVC on the JVM, MediatR or Wolverine on .NET, 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 with ArchUnit's slices().should().notDependOnEachOther(); NetArchTest on .NET and dependency-cruiser for TypeScript express the same rule.",
652
+ "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.",
653
+ "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.",
654
+ "hubWhen": {
655
+ "STYLE": [
656
+ "slices"
657
+ ]
658
+ }
659
+ },
660
+ {
661
+ "id": "adr-rich-domain",
662
+ "type": "adr",
663
+ "label": "A rich domain model",
664
+ "x": 780,
665
+ "y": 520,
666
+ "concern": "architecture-style",
667
+ "status": "accepted",
668
+ "date": "",
669
+ "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.",
670
+ "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. The domain is tested by unit tests that start no infrastructure and cover at least {{DOMAIN_COVERAGE}}% of the lines of every domain package. jMolecules annotations (@AggregateRoot, @Entity, @ValueObject) mark the roles and its ArchUnit rules check them; on .NET and in TypeScript the same rules are written as architecture tests over naming conventions.",
671
+ "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.",
672
+ "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.",
673
+ "hubWhen": {
674
+ "LOGIC": [
675
+ "rich"
676
+ ]
677
+ }
678
+ },
679
+ {
680
+ "id": "adr-transaction-scripts",
681
+ "type": "adr",
682
+ "label": "Transaction scripts",
683
+ "x": 780,
684
+ "y": 650,
685
+ "concern": "architecture-style",
686
+ "status": "accepted",
687
+ "date": "",
688
+ "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.",
689
+ "decision": "Business rules live in transaction scripts: each use case is one procedure in a class named *Script (an application service 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. Tests of a script exercise its data access: through fakes of the ports with ports and adapters or clean rings, against a containerised database otherwise. When rules start being copied between scripts, this decision is revisited in favour of a domain model.",
690
+ "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 need its data access, as fakes or a container, so they are slower than tests of a domain object.\n• Moving to a domain model later is a refactoring per script, not a rewrite.",
691
+ "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.",
692
+ "hubWhen": {
693
+ "LOGIC": [
694
+ "scripts"
695
+ ]
696
+ }
697
+ },
698
+ {
699
+ "id": "adr-one-model",
700
+ "type": "adr",
701
+ "label": "One model for reads and writes",
702
+ "x": 780,
703
+ "y": 780,
704
+ "concern": "architecture-style",
705
+ "status": "accepted",
706
+ "date": "",
707
+ "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.",
708
+ "decision": "Reads and writes share one model: queries load the same entities or data objects the commands change, through the same repositories, and the presentation code shapes them for the screen. A query changes nothing. A screen that needs a join or projection the model cannot give gets a query method or SQL of its own in data access, recorded as the exception. This decision is revisited when reads outnumber writes by orders of magnitude, screens need projections the model should not carry, or reads must scale apart from writes.",
709
+ "consequences": "• The least code: one model, one set of repositories, no projections to run.\n• Screens are shaped like the entities; joins and projections beyond them need the recorded exceptions.\n• Read load hits the write model's tables and indexes; scaling reads apart later means a replica or a separate read store.\n• With a rich domain model, loading an aggregate to show a list is wasteful; the exceptions grow with the number of list screens.",
710
+ "alternatives": "1. Separate read models on the same database: screens get their shape, reads stay fresh, two models to keep.\n2. A separate read store updated by events: reads scale apart, at the cost of staleness and projections to run.\n3. A database read replica: more read capacity without a second model, same shape.",
711
+ "hubWhen": {
712
+ "CQRS": [
713
+ "none"
714
+ ]
715
+ }
716
+ },
717
+ {
718
+ "id": "adr-read-models",
719
+ "type": "adr",
720
+ "label": "Separate read models",
721
+ "x": 780,
722
+ "y": 910,
723
+ "concern": "architecture-style",
724
+ "status": "accepted",
725
+ "date": "",
726
+ "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.",
727
+ "decision": "Commands go through the domain model; queries go through read models of their own in the query package (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.",
728
+ "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.",
729
+ "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.",
730
+ "hubWhen": {
731
+ "CQRS": [
732
+ "models"
733
+ ]
734
+ }
735
+ },
736
+ {
737
+ "id": "adr-read-store",
738
+ "type": "adr",
739
+ "label": "A separate read store",
740
+ "x": 780,
741
+ "y": 1040,
742
+ "concern": "architecture-style",
743
+ "status": "accepted",
744
+ "date": "",
745
+ "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.",
746
+ "decision": "Commands change the write store through the domain model and publish events from it (through an outbox, as the Data consistency pack decides); projections in the query package 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). Every projection can be rebuilt by clearing its read model and replaying the stream from the start; a test proves it.",
747
+ "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.",
748
+ "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.",
749
+ "hubWhen": {
750
+ "CQRS": [
751
+ "store"
752
+ ]
753
+ }
754
+ },
755
+ {
756
+ "id": "ff-layers",
757
+ "type": "fitness-fn",
758
+ "label": "Layers call downwards",
759
+ "x": 1040,
760
+ "y": 0,
761
+ "characteristic": "maintainability",
762
+ "scope": "atomic",
763
+ "cadence": "triggered",
764
+ "trigger": "pull-request",
765
+ "invocation": "automated",
766
+ "description": "An ArchUnit test declares the three layers and which may access which, forbids web types in the business layer and SQL outside data access; it runs with the unit tests and fails on any violation.\n\nThreshold: 0 layer violations: no layer is accessed by a layer above the one it serves, 0 Spring MVC or servlet types in the business layer, 0 SQL or JDBC types outside data access\n\nTool: ArchUnit (JUnit 5); for .NET: NetArchTest; for TypeScript: dependency-cruiser; for Python: import-linter layers contract\n\n```java\n@AnalyzeClasses(packages = \"com.example.shop\", importOptions = ImportOption.DoNotIncludeTests.class)\nclass LayerRulesTest {\n @ArchTest\n static final ArchRule layers = layeredArchitecture().consideringAllDependencies()\n .layer(\"Presentation\").definedBy(\"..adapter.web..\", \"..adapter.jobs..\")\n .layer(\"Business\").definedBy(\"..application..\", \"..domain..\")\n .layer(\"DataAccess\").definedBy(\"..adapter.persistence..\", \"..adapter.messaging..\")\n .whereLayer(\"Presentation\").mayNotBeAccessedByAnyLayer()\n .whereLayer(\"Business\").mayOnlyBeAccessedByLayers(\"Presentation\")\n .whereLayer(\"DataAccess\").mayOnlyBeAccessedByLayers(\"Business\")\n .withOptionalLayers(true);\n\n @ArchTest\n static final ArchRule noWebInBusiness = noClasses().that().resideInAnyPackage(\"..application..\", \"..domain..\")\n .should().dependOnClassesThat().resideInAnyPackage(\"org.springframework.web..\", \"jakarta.servlet..\");\n\n @ArchTest\n static final ArchRule sqlOnlyInDataAccess = noClasses().that().resideOutsideOfPackage(\"..adapter.persistence..\")\n .should().dependOnClassesThat().resideInAnyPackage(\"java.sql..\", \"javax.sql..\", \"org.springframework.jdbc..\", \"org.jooq..\", \"org.hibernate..\");\n}\n```",
767
+ "hubWhen": {
768
+ "STYLE": [
769
+ "layered"
770
+ ]
771
+ }
772
+ },
773
+ {
774
+ "id": "ff-hexagonal",
775
+ "type": "fitness-fn",
776
+ "label": "Ports and adapters hold",
777
+ "x": 1040,
778
+ "y": 130,
779
+ "characteristic": "maintainability",
780
+ "scope": "atomic",
781
+ "cadence": "triggered",
782
+ "trigger": "pull-request",
783
+ "invocation": "automated",
784
+ "description": "Each package names its role in package-info.java with jMolecules' hexagonal annotations; JMoleculesArchitectureRules.ensureHexagonal() derives the allowed dependencies from them and fails the test on any other, and a second rule keeps the core free of adapters and framework services (whether persistence annotations may appear in the domain is the FRAMEWORK decision, checked by its own rule).\n\nThreshold: 0 violations of the hexagonal rules: the core depends on no adapter and no framework service, adapters reach the core only through ports and do not use each other\n\nTool: jMolecules ArchUnit rules (jmolecules-archunit with ArchUnit, JUnit 5); for .NET: NetArchTest; for TypeScript: dependency-cruiser; for Python: import-linter\n\n```java\n// package-info.java of each package names its role (org.jmolecules.architecture.hexagonal):\n// @Application package com.example.shop.application;\n// @PrimaryPort package com.example.shop.application.port.in;\n// @SecondaryPort package com.example.shop.application.port.out;\n// @PrimaryAdapter package com.example.shop.adapter.web;\n// @SecondaryAdapter package com.example.shop.adapter.persistence;\n\n@AnalyzeClasses(packages = \"com.example.shop\", importOptions = ImportOption.DoNotIncludeTests.class)\nclass HexagonalRulesTest {\n @ArchTest\n static final ArchRule hexagonal = JMoleculesArchitectureRules.ensureHexagonal();\n\n @ArchTest\n static final ArchRule coreIsPlain = noClasses().that().resideInAnyPackage(\"..domain..\", \"..application..\")\n .should().dependOnClassesThat().resideInAnyPackage(\n \"..adapter..\", \"org.springframework..\", \"jakarta.servlet..\", \"jakarta.transaction..\", \"jakarta.jms..\")\n .because(\"ADR Ports and adapters: the core imports no adapter and no framework service\");\n}\n```",
785
+ "hubWhen": {
786
+ "STYLE": [
787
+ "hexagonal"
788
+ ]
789
+ }
790
+ },
791
+ {
792
+ "id": "ff-rings",
793
+ "type": "fitness-fn",
794
+ "label": "Rings depend inwards",
795
+ "x": 1040,
796
+ "y": 260,
797
+ "characteristic": "maintainability",
798
+ "scope": "atomic",
799
+ "cadence": "triggered",
800
+ "trigger": "pull-request",
801
+ "invocation": "automated",
802
+ "description": "ArchUnit's onionArchitecture() declares the rings and fails the test on any dependency pointing outwards; a second rule requires every class in application.usecase to implement an interface from application.port.in, so a use case cannot be reached except through its boundary.\n\nThreshold: 0 dependencies from an inner ring to an outer one; 100% of the interactor classes implement an input boundary\n\nTool: ArchUnit (JUnit 5); for .NET: NetArchTest; for TypeScript: dependency-cruiser; for Python: import-linter layers contract\n\n```java\n@AnalyzeClasses(packages = \"com.example.shop\", importOptions = ImportOption.DoNotIncludeTests.class)\nclass RingRulesTest {\n @ArchTest\n static final ArchRule rings = onionArchitecture()\n .domainModels(\"..domain.model..\")\n .domainServices(\"..domain.service..\")\n .applicationServices(\"..application..\")\n .adapter(\"web\", \"..adapter.web..\")\n .adapter(\"persistence\", \"..adapter.persistence..\")\n .adapter(\"messaging\", \"..adapter.messaging..\")\n .adapter(\"jobs\", \"..adapter.jobs..\")\n .withOptionalLayers(true);\n\n @ArchTest\n static final ArchRule oneInteractorPerUseCase = classes().that().resideInAPackage(\"..application.usecase..\")\n .and().areNotInterfaces()\n .should().implement(JavaClass.Predicates.resideInAPackage(\"..application.port.in..\"))\n .because(\"ADR Clean architecture rings: a use case is reached only through its input boundary\");\n}\n```",
803
+ "hubWhen": {
804
+ "STYLE": [
805
+ "clean"
806
+ ]
807
+ }
808
+ },
809
+ {
810
+ "id": "ff-slices",
811
+ "type": "fitness-fn",
812
+ "label": "Slices independent",
813
+ "x": 1040,
814
+ "y": 390,
815
+ "characteristic": "maintainability",
816
+ "scope": "atomic",
817
+ "cadence": "triggered",
818
+ "trigger": "pull-request",
819
+ "invocation": "automated",
820
+ "description": "ArchUnit finds the slices (the packages under features) and checks that none depends on another, and that the common domain folder depends on no slice; it runs with the unit tests.\n\nThreshold: 0 dependencies from one feature slice on another; 0 dependencies from the domain folder on a slice\n\nTool: ArchUnit (JUnit 5); for .NET: NetArchTest over the Features namespaces; for TypeScript: dependency-cruiser\n\n```java\n@AnalyzeClasses(packages = \"com.example.shop\", importOptions = ImportOption.DoNotIncludeTests.class)\nclass SliceRulesTest {\n @ArchTest\n static final ArchRule slicesStandAlone = slices().matching(\"..features.(*)..\").should().notDependOnEachOther();\n\n @ArchTest\n static final ArchRule domainKnowsNoSlice = noClasses().that().resideInAPackage(\"..domain..\")\n .should().dependOnClassesThat().resideInAPackage(\"..features..\")\n .because(\"ADR Vertical slices: the common domain folder serves the slices and knows none of them\");\n}\n```",
821
+ "hubWhen": {
822
+ "STYLE": [
823
+ "slices"
824
+ ]
825
+ }
826
+ },
827
+ {
828
+ "id": "ff-domain-tests",
829
+ "type": "fitness-fn",
830
+ "label": "Domain tested alone",
831
+ "x": 1040,
832
+ "y": 520,
833
+ "characteristic": "maintainability",
834
+ "scope": "atomic",
835
+ "cadence": "triggered",
836
+ "trigger": "pull-request",
837
+ "invocation": "automated",
838
+ "description": "A Gradle task runs only the tests of the domain packages and a JaCoCo verification task checks their line coverage per domain package; CI runs the task on a runner without Docker, so a domain test that starts a container fails there.\n\nThreshold: The domain unit tests pass on a runner with no database, broker or container runtime and cover at least {{DOMAIN_COVERAGE}}% of the lines of every domain package\n\nTool: Gradle with JaCoCo (JUnit 5), on a CI runner without Docker; for .NET: coverlet with a threshold on the Domain project; for TypeScript: Vitest coverage thresholds per glob (Vitest 3.2 or later for test.projects)\n\n```kotlin\n// build.gradle.kts — CI runs `./gradlew domainTest` on a runner without Docker\nval domainTest by tasks.registering(Test::class) {\n useJUnitPlatform()\n filter { includeTestsMatching(\"com.example.shop.domain.*\") }\n finalizedBy(\"domainCoverage\")\n}\n\ntasks.register<JacocoCoverageVerification>(\"domainCoverage\") {\n executionData(domainTest.get())\n sourceSets(sourceSets.main.get())\n violationRules {\n rule {\n element = \"PACKAGE\"\n includes = listOf(\"com.example.shop.domain.*\")\n limit {\n counter = \"LINE\"\n value = \"COVEREDRATIO\"\n minimum = ({{DOMAIN_COVERAGE}} / 100.0).toBigDecimal()\n }\n }\n }\n}\n```",
839
+ "hubWhen": {
840
+ "LOGIC": [
841
+ "rich"
842
+ ]
843
+ }
844
+ },
845
+ {
846
+ "id": "ff-pure",
847
+ "type": "fitness-fn",
848
+ "label": "Domain imports no framework",
849
+ "x": 1040,
850
+ "y": 650,
851
+ "characteristic": "maintainability",
852
+ "scope": "atomic",
853
+ "cadence": "triggered",
854
+ "trigger": "pull-request",
855
+ "invocation": "automated",
856
+ "description": "An ArchUnit rule lets domain classes depend only on the language, the domain and jMolecules (annotation types count as dependencies); the build fails on any other dependency.\n\nThreshold: 0 dependencies of domain classes outside the language, the domain itself and the jMolecules role annotations\n\nTool: ArchUnit (JUnit 5); for TypeScript: a dependency-cruiser rule from src/domain to node_modules; for .NET: NetArchTest HaveDependencyOnAny over the Domain namespace\n\n```java\n@AnalyzeClasses(packages = \"com.example.shop\", importOptions = ImportOption.DoNotIncludeTests.class)\nclass DomainPurityTest {\n @ArchTest\n static final ArchRule domainIsPlain = classes().that().resideInAPackage(\"..domain..\")\n .should().onlyDependOnClassesThat().resideInAnyPackage(\"..domain..\", \"java..\", \"kotlin..\", \"org.jmolecules..\")\n .because(\"ADR: the domain imports no framework; jMolecules annotations only name the roles\");\n}\n```",
857
+ "hubWhen": {
858
+ "FRAMEWORK": [
859
+ "pure"
860
+ ]
861
+ }
862
+ },
863
+ {
864
+ "id": "ff-annotations",
865
+ "type": "fitness-fn",
866
+ "label": "Only mapping annotations",
867
+ "x": 1040,
868
+ "y": 780,
869
+ "characteristic": "maintainability",
870
+ "scope": "atomic",
871
+ "cadence": "triggered",
872
+ "trigger": "pull-request",
873
+ "invocation": "automated",
874
+ "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\nThreshold: 0 dependencies of domain classes outside the language, the domain, jMolecules, Jakarta Persistence and Bean Validation\n\nTool: ArchUnit (JUnit 5); for .NET: NetArchTest allowing only the EF Core and DataAnnotations namespaces\n\n```java\n@AnalyzeClasses(packages = \"com.example.shop\", importOptions = ImportOption.DoNotIncludeTests.class)\nclass DomainAnnotationsTest {\n @ArchTest\n static final ArchRule onlyMapping = classes().that().resideInAPackage(\"..domain..\")\n .should().onlyDependOnClassesThat().resideInAnyPackage(\n \"..domain..\", \"java..\", \"kotlin..\", \"org.jmolecules..\", \"jakarta.persistence..\", \"jakarta.validation..\")\n .because(\"ADR: mapping and validation annotations only, no framework services\");\n}\n```",
875
+ "hubWhen": {
876
+ "FRAMEWORK": [
877
+ "annotations"
878
+ ]
879
+ }
880
+ },
881
+ {
882
+ "id": "ff-aggregates",
883
+ "type": "fitness-fn",
884
+ "label": "Aggregates guard their state",
885
+ "x": 1040,
886
+ "y": 910,
887
+ "characteristic": "maintainability",
888
+ "scope": "atomic",
889
+ "cadence": "triggered",
890
+ "trigger": "pull-request",
891
+ "invocation": "automated",
892
+ "description": "Aggregates, entities and value objects are marked with jMolecules annotations; JMoleculesDddRules.all() checks 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\nThreshold: 0 public setters on domain classes and 0 violations of the jMolecules DDD rules (aggregates referenced by identifier only, entities inside one aggregate)\n\nTool: jMolecules DDD rules (jmolecules-archunit with ArchUnit, JUnit 5); for .NET and TypeScript: an architecture test over the naming conventions of aggregates and identifiers\n\n```java\n@AnalyzeClasses(packages = \"com.example.shop\", importOptions = ImportOption.DoNotIncludeTests.class)\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```",
893
+ "hubWhen": {
894
+ "LOGIC": [
895
+ "rich"
896
+ ]
897
+ }
898
+ },
899
+ {
900
+ "id": "ff-scripts",
901
+ "type": "fitness-fn",
902
+ "label": "Scripts stand alone",
903
+ "x": 1040,
904
+ "y": 1040,
905
+ "characteristic": "maintainability",
906
+ "scope": "atomic",
907
+ "cadence": "triggered",
908
+ "trigger": "pull-request",
909
+ "invocation": "automated",
910
+ "description": "ArchUnit rules over the classes named *Script: a script is used only by entry points and application code (never by another script), and every public method of a script is transactional.\n\nThreshold: 0 scripts depended on by another script; 100% of public script methods annotated @Transactional\n\nTool: ArchUnit (JUnit 5); for .NET: NetArchTest over classes named *Script; for TypeScript: dependency-cruiser between *Script files\n\n```java\n@AnalyzeClasses(packages = \"com.example.shop\", importOptions = ImportOption.DoNotIncludeTests.class)\nclass ScriptRulesTest {\n @ArchTest\n static final ArchRule calledOnlyFromEntryPoints = classes().that().haveSimpleNameEndingWith(\"Script\")\n .should().onlyHaveDependentClassesThat().resideInAnyPackage(\"..adapter..\", \"..application..\", \"..features..\");\n\n @ArchTest\n static final ArchRule noScriptCallsAnother = noClasses().that().haveSimpleNameEndingWith(\"Script\")\n .should().dependOnClassesThat().haveSimpleNameEndingWith(\"Script\");\n\n @ArchTest\n static final ArchRule oneTransactionEach = methods().that().arePublic()\n .and().areDeclaredInClassesThat().haveSimpleNameEndingWith(\"Script\")\n .should().beAnnotatedWith(Transactional.class);\n}\n```",
911
+ "hubWhen": {
912
+ "LOGIC": [
913
+ "scripts"
914
+ ]
915
+ }
916
+ },
917
+ {
918
+ "id": "ff-one-model",
919
+ "type": "fitness-fn",
920
+ "label": "No read side without a decision",
921
+ "x": 1040,
922
+ "y": 1170,
923
+ "characteristic": "maintainability",
924
+ "scope": "atomic",
925
+ "cadence": "triggered",
926
+ "trigger": "pull-request",
927
+ "invocation": "automated",
928
+ "description": "An ArchUnit rule fails the build when a query package or a projection class appears, which would mean a read side arrived without its decision.\n\nThreshold: 0 classes in a query package and 0 projections in the deployable\n\nTool: ArchUnit (JUnit 5); for TypeScript: a dependency-cruiser rule forbidding src/query; for .NET: NetArchTest over a Query namespace\n\n```java\n@AnalyzeClasses(packages = \"com.example.shop\", importOptions = ImportOption.DoNotIncludeTests.class)\nclass OneModelRulesTest {\n @ArchTest\n static final ArchRule noReadSide = noClasses().should().resideInAPackage(\"..query..\")\n .orShould().haveSimpleNameEndingWith(\"Projection\")\n .because(\"ADR One model for reads and writes: supersede it before adding read models or projections\");\n}\n```",
929
+ "hubWhen": {
930
+ "CQRS": [
931
+ "none"
932
+ ]
933
+ }
934
+ },
935
+ {
936
+ "id": "ff-read-models",
937
+ "type": "fitness-fn",
938
+ "label": "Queries skip the write side",
939
+ "x": 1040,
940
+ "y": 1300,
941
+ "characteristic": "maintainability",
942
+ "scope": "atomic",
943
+ "cadence": "triggered",
944
+ "trigger": "pull-request",
945
+ "invocation": "automated",
946
+ "description": "ArchUnit rules keep the two sides apart: the query package (or a slice's query package) may not use the domain model, the use cases or the write side's repositories, and the write side may not read the read models.\n\nThreshold: 0 dependencies from the query package on the domain, the application or the persistence adapter, and 0 from the write side on the query package\n\nTool: ArchUnit (JUnit 5); for .NET: NetArchTest over the Query and Domain namespaces; for TypeScript: dependency-cruiser between src/query and src/domain\n\n```java\n@AnalyzeClasses(packages = \"com.example.shop\", importOptions = ImportOption.DoNotIncludeTests.class)\nclass CqrsRulesTest {\n @ArchTest\n static final ArchRule queriesSkipWriteSide = noClasses().that().resideInAPackage(\"..query..\")\n .should().dependOnClassesThat().resideInAnyPackage(\"..domain..\", \"..application..\", \"..adapter.persistence..\")\n .because(\"ADR: queries read their read models, never aggregates or the write side's repositories\");\n\n @ArchTest\n static final ArchRule writeSideSkipsReadModels = noClasses().that()\n .resideInAnyPackage(\"..domain..\", \"..application..\", \"..features..\").and().resideOutsideOfPackage(\"..query..\")\n .should().dependOnClassesThat().resideInAPackage(\"..query..\");\n}\n```",
947
+ "hubWhen": {
948
+ "CQRS": [
949
+ "models",
950
+ "store"
951
+ ]
952
+ }
953
+ },
954
+ {
955
+ "id": "ff-read-lag",
956
+ "type": "fitness-fn",
957
+ "label": "Read store lag bounded",
958
+ "x": 1040,
959
+ "y": 1430,
960
+ "characteristic": "performance-efficiency",
961
+ "scope": "atomic",
962
+ "cadence": "continual",
963
+ "invocation": "automated",
964
+ "description": "Each projection records, for every event it applies, the seconds between the event's commit and the read store update as a histogram projection_lag_seconds labelled with the projection; an alert fires when the 99th percentile passes the limit.\n\nThreshold: 99th percentile of projection lag at most {{READ_LAG_SECONDS}} seconds over 10 minutes\n\nTool: Prometheus alerting rule (the histogram is exported by the projections with Micrometer)\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```",
965
+ "hubWhen": {
966
+ "CQRS": [
967
+ "store"
968
+ ]
969
+ }
970
+ },
971
+ {
972
+ "id": "ff-projection-rebuild",
973
+ "type": "fitness-fn",
974
+ "label": "Projection rebuilt from the stream",
975
+ "x": 1040,
976
+ "y": 1560,
977
+ "characteristic": "reliability",
978
+ "scope": "atomic",
979
+ "cadence": "triggered",
980
+ "trigger": "pull-request",
981
+ "invocation": "automated",
982
+ "description": "An integration test starts the broker in a container, places an order and waits for the read model, then clears the read store, seeks the projection's consumer group to the start and waits for the rebuild; the two read models must be equal. One such test per projection.\n\nThreshold: For every projection, the read model cleared and replayed from the start of the stream equals the one built as the events arrived\n\nTool: Testcontainers (Kafka) with Spring Boot and Awaitility (JUnit 5); for TypeScript: the same test with @testcontainers/kafka and Vitest\n\n```java\n@SpringBootTest\n@Testcontainers\nclass OrderSummaryProjectionRebuildTest {\n @Container @ServiceConnection\n static KafkaContainer kafka = new KafkaContainer(\"apache/kafka:3.9.0\");\n\n @Autowired PlaceOrderUseCase placeOrder;\n @Autowired OrderSummaryReadStore readStore; // the read model\n @Autowired OrderSummaryProjection projection; // its consumer, with a consumer group of its own\n\n @Test\n void rebuildEqualsIncrementalBuild() {\n var id = placeOrder.place(new PlaceOrder(CUSTOMER, LINES));\n await().atMost(Duration.ofSeconds({{READ_LAG_SECONDS}})).until(() -> readStore.find(id).isPresent());\n var built = readStore.find(id).orElseThrow();\n\n readStore.clear();\n projection.seekToBeginning(); // resets the consumer group's offsets to the start of the topic\n await().atMost(Duration.ofSeconds(30)).until(() -> readStore.find(id).isPresent());\n assertEquals(built, readStore.find(id).orElseThrow());\n }\n}\n```",
983
+ "hubWhen": {
984
+ "CQRS": [
985
+ "store"
986
+ ]
987
+ }
988
+ }
989
+ ],
990
+ "relations": [
991
+ {
992
+ "id": "req-layers--derives--need",
993
+ "sourceId": "req-layers",
994
+ "targetId": "need",
995
+ "relationType": "derives"
996
+ },
997
+ {
998
+ "id": "req-ports--derives--need",
999
+ "sourceId": "req-ports",
1000
+ "targetId": "need",
1001
+ "relationType": "derives"
1002
+ },
1003
+ {
1004
+ "id": "req-rings--derives--need",
1005
+ "sourceId": "req-rings",
1006
+ "targetId": "need",
1007
+ "relationType": "derives"
1008
+ },
1009
+ {
1010
+ "id": "req-slices--derives--need",
1011
+ "sourceId": "req-slices",
1012
+ "targetId": "need",
1013
+ "relationType": "derives"
1014
+ },
1015
+ {
1016
+ "id": "req-domain-tests--derives--need",
1017
+ "sourceId": "req-domain-tests",
1018
+ "targetId": "need",
1019
+ "relationType": "derives"
1020
+ },
1021
+ {
1022
+ "id": "req-aggregates--derives--need",
1023
+ "sourceId": "req-aggregates",
1024
+ "targetId": "need",
1025
+ "relationType": "derives"
1026
+ },
1027
+ {
1028
+ "id": "req-scripts--derives--need",
1029
+ "sourceId": "req-scripts",
1030
+ "targetId": "need",
1031
+ "relationType": "derives"
1032
+ },
1033
+ {
1034
+ "id": "req-one-model--derives--need",
1035
+ "sourceId": "req-one-model",
1036
+ "targetId": "need",
1037
+ "relationType": "derives"
1038
+ },
1039
+ {
1040
+ "id": "req-read-models--derives--need",
1041
+ "sourceId": "req-read-models",
1042
+ "targetId": "need",
1043
+ "relationType": "derives"
1044
+ },
1045
+ {
1046
+ "id": "req-read-lag--derives--need",
1047
+ "sourceId": "req-read-lag",
1048
+ "targetId": "need",
1049
+ "relationType": "derives"
1050
+ },
1051
+ {
1052
+ "id": "req-rebuild--derives--need",
1053
+ "sourceId": "req-rebuild",
1054
+ "targetId": "need",
1055
+ "relationType": "derives"
1056
+ },
1057
+ {
1058
+ "id": "req-pure--derives--need",
1059
+ "sourceId": "req-pure",
1060
+ "targetId": "need",
1061
+ "relationType": "derives"
1062
+ },
1063
+ {
1064
+ "id": "req-annotations--derives--need",
1065
+ "sourceId": "req-annotations",
1066
+ "targetId": "need",
1067
+ "relationType": "derives"
1068
+ },
1069
+ {
1070
+ "id": "sc-layers--verifies--req-layers",
1071
+ "sourceId": "sc-layers",
1072
+ "targetId": "req-layers",
1073
+ "relationType": "verifies"
1074
+ },
1075
+ {
1076
+ "id": "sc-ports--verifies--req-ports",
1077
+ "sourceId": "sc-ports",
1078
+ "targetId": "req-ports",
1079
+ "relationType": "verifies"
1080
+ },
1081
+ {
1082
+ "id": "sc-rings--verifies--req-rings",
1083
+ "sourceId": "sc-rings",
1084
+ "targetId": "req-rings",
1085
+ "relationType": "verifies"
1086
+ },
1087
+ {
1088
+ "id": "sc-slices--verifies--req-slices",
1089
+ "sourceId": "sc-slices",
1090
+ "targetId": "req-slices",
1091
+ "relationType": "verifies"
1092
+ },
1093
+ {
1094
+ "id": "sc-domain-tests--verifies--req-domain-tests",
1095
+ "sourceId": "sc-domain-tests",
1096
+ "targetId": "req-domain-tests",
1097
+ "relationType": "verifies"
1098
+ },
1099
+ {
1100
+ "id": "sc-aggregates--verifies--req-aggregates",
1101
+ "sourceId": "sc-aggregates",
1102
+ "targetId": "req-aggregates",
1103
+ "relationType": "verifies"
1104
+ },
1105
+ {
1106
+ "id": "sc-scripts--verifies--req-scripts",
1107
+ "sourceId": "sc-scripts",
1108
+ "targetId": "req-scripts",
1109
+ "relationType": "verifies"
1110
+ },
1111
+ {
1112
+ "id": "sc-one-model--verifies--req-one-model",
1113
+ "sourceId": "sc-one-model",
1114
+ "targetId": "req-one-model",
1115
+ "relationType": "verifies"
1116
+ },
1117
+ {
1118
+ "id": "sc-read-models--verifies--req-read-models",
1119
+ "sourceId": "sc-read-models",
1120
+ "targetId": "req-read-models",
1121
+ "relationType": "verifies"
1122
+ },
1123
+ {
1124
+ "id": "sc-read-lag--verifies--req-read-lag",
1125
+ "sourceId": "sc-read-lag",
1126
+ "targetId": "req-read-lag",
1127
+ "relationType": "verifies"
1128
+ },
1129
+ {
1130
+ "id": "sc-rebuild--verifies--req-rebuild",
1131
+ "sourceId": "sc-rebuild",
1132
+ "targetId": "req-rebuild",
1133
+ "relationType": "verifies"
1134
+ },
1135
+ {
1136
+ "id": "sc-pure--verifies--req-pure",
1137
+ "sourceId": "sc-pure",
1138
+ "targetId": "req-pure",
1139
+ "relationType": "verifies"
1140
+ },
1141
+ {
1142
+ "id": "sc-annotations--verifies--req-annotations",
1143
+ "sourceId": "sc-annotations",
1144
+ "targetId": "req-annotations",
1145
+ "relationType": "verifies"
1146
+ },
1147
+ {
1148
+ "id": "ff-layers--implements--adr-layered",
1149
+ "sourceId": "ff-layers",
1150
+ "targetId": "adr-layered",
1151
+ "relationType": "implements"
1152
+ },
1153
+ {
1154
+ "id": "ff-hexagonal--implements--adr-hexagonal",
1155
+ "sourceId": "ff-hexagonal",
1156
+ "targetId": "adr-hexagonal",
1157
+ "relationType": "implements"
1158
+ },
1159
+ {
1160
+ "id": "ff-rings--implements--adr-clean",
1161
+ "sourceId": "ff-rings",
1162
+ "targetId": "adr-clean",
1163
+ "relationType": "implements"
1164
+ },
1165
+ {
1166
+ "id": "ff-slices--implements--adr-slices",
1167
+ "sourceId": "ff-slices",
1168
+ "targetId": "adr-slices",
1169
+ "relationType": "implements"
1170
+ },
1171
+ {
1172
+ "id": "ff-domain-tests--implements--adr-rich-domain",
1173
+ "sourceId": "ff-domain-tests",
1174
+ "targetId": "adr-rich-domain",
1175
+ "relationType": "implements"
1176
+ },
1177
+ {
1178
+ "id": "ff-pure--implements--adr-layered",
1179
+ "sourceId": "ff-pure",
1180
+ "targetId": "adr-layered",
1181
+ "relationType": "implements"
1182
+ },
1183
+ {
1184
+ "id": "ff-pure--implements--adr-hexagonal",
1185
+ "sourceId": "ff-pure",
1186
+ "targetId": "adr-hexagonal",
1187
+ "relationType": "implements"
1188
+ },
1189
+ {
1190
+ "id": "ff-pure--implements--adr-clean",
1191
+ "sourceId": "ff-pure",
1192
+ "targetId": "adr-clean",
1193
+ "relationType": "implements"
1194
+ },
1195
+ {
1196
+ "id": "ff-pure--implements--adr-slices",
1197
+ "sourceId": "ff-pure",
1198
+ "targetId": "adr-slices",
1199
+ "relationType": "implements"
1200
+ },
1201
+ {
1202
+ "id": "ff-annotations--implements--adr-layered",
1203
+ "sourceId": "ff-annotations",
1204
+ "targetId": "adr-layered",
1205
+ "relationType": "implements"
1206
+ },
1207
+ {
1208
+ "id": "ff-annotations--implements--adr-hexagonal",
1209
+ "sourceId": "ff-annotations",
1210
+ "targetId": "adr-hexagonal",
1211
+ "relationType": "implements"
1212
+ },
1213
+ {
1214
+ "id": "ff-annotations--implements--adr-clean",
1215
+ "sourceId": "ff-annotations",
1216
+ "targetId": "adr-clean",
1217
+ "relationType": "implements"
1218
+ },
1219
+ {
1220
+ "id": "ff-annotations--implements--adr-slices",
1221
+ "sourceId": "ff-annotations",
1222
+ "targetId": "adr-slices",
1223
+ "relationType": "implements"
1224
+ },
1225
+ {
1226
+ "id": "ff-aggregates--implements--adr-rich-domain",
1227
+ "sourceId": "ff-aggregates",
1228
+ "targetId": "adr-rich-domain",
1229
+ "relationType": "implements"
1230
+ },
1231
+ {
1232
+ "id": "ff-scripts--implements--adr-transaction-scripts",
1233
+ "sourceId": "ff-scripts",
1234
+ "targetId": "adr-transaction-scripts",
1235
+ "relationType": "implements"
1236
+ },
1237
+ {
1238
+ "id": "ff-one-model--implements--adr-one-model",
1239
+ "sourceId": "ff-one-model",
1240
+ "targetId": "adr-one-model",
1241
+ "relationType": "implements"
1242
+ },
1243
+ {
1244
+ "id": "ff-read-models--implements--adr-read-models",
1245
+ "sourceId": "ff-read-models",
1246
+ "targetId": "adr-read-models",
1247
+ "relationType": "implements"
1248
+ },
1249
+ {
1250
+ "id": "ff-read-models--implements--adr-read-store",
1251
+ "sourceId": "ff-read-models",
1252
+ "targetId": "adr-read-store",
1253
+ "relationType": "implements"
1254
+ },
1255
+ {
1256
+ "id": "ff-read-lag--implements--adr-read-store",
1257
+ "sourceId": "ff-read-lag",
1258
+ "targetId": "adr-read-store",
1259
+ "relationType": "implements"
1260
+ },
1261
+ {
1262
+ "id": "ff-projection-rebuild--implements--adr-read-store",
1263
+ "sourceId": "ff-projection-rebuild",
1264
+ "targetId": "adr-read-store",
1265
+ "relationType": "implements"
1266
+ }
1267
+ ]
1268
+ }