@radicaltools/mcp 0.6.1 → 0.6.2

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 (66) hide show
  1. package/README.md +1 -1
  2. package/dist/{chunk-H2EUPF2D.js → chunk-DQYB4GAU.js} +13 -6
  3. package/dist/{chunk-CKZSHFE5.js → chunk-U5QA6HBS.js} +1 -1
  4. package/dist/{dist-3IBN4PU7.js → dist-MPDDP2CV.js} +2 -2
  5. package/dist/{elkLayout-7MVDIEFO.js → elkLayout-SUGCAZZ5.js} +2 -2
  6. package/dist/hub-catalogue/concern/concern-accessibility.radical +85 -1
  7. package/dist/hub-catalogue/concern/concern-api-collections.radical +78 -1
  8. package/dist/hub-catalogue/concern/concern-api-errors.radical +78 -1
  9. package/dist/hub-catalogue/concern/concern-api-evolution.radical +78 -1
  10. package/dist/hub-catalogue/concern/concern-api-idempotency.radical +121 -3
  11. package/dist/hub-catalogue/concern/concern-api-resource-design.radical +78 -1
  12. package/dist/hub-catalogue/concern/concern-api-style-guide.radical +78 -1
  13. package/dist/hub-catalogue/concern/concern-architecture-style.radical +83 -7
  14. package/dist/hub-catalogue/concern/concern-audit-trail.radical +77 -1
  15. package/dist/hub-catalogue/concern/concern-authentication.radical +178 -8
  16. package/dist/hub-catalogue/concern/concern-authorization.radical +133 -7
  17. package/dist/hub-catalogue/concern/concern-availability.radical +156 -6
  18. package/dist/hub-catalogue/concern/concern-backend-stack.radical +71 -8
  19. package/dist/hub-catalogue/concern/concern-backup-recovery.radical +136 -6
  20. package/dist/hub-catalogue/concern/concern-caching.radical +73 -1
  21. package/dist/hub-catalogue/concern/concern-capacity.radical +124 -5
  22. package/dist/hub-catalogue/concern/concern-ci-cd-pipeline.radical +154 -15
  23. package/dist/hub-catalogue/concern/concern-code-documentation.radical +131 -13
  24. package/dist/hub-catalogue/concern/concern-code-quality-gate.radical +116 -7
  25. package/dist/hub-catalogue/concern/concern-code-review-branching.radical +174 -13
  26. package/dist/hub-catalogue/concern/concern-code-style.radical +148 -16
  27. package/dist/hub-catalogue/concern/concern-communication-style.radical +94 -7
  28. package/dist/hub-catalogue/concern/concern-data-classification.radical +77 -1
  29. package/dist/hub-catalogue/concern/concern-data-consistency.radical +87 -5
  30. package/dist/hub-catalogue/concern/concern-data-store.radical +87 -5
  31. package/dist/hub-catalogue/concern/concern-decomposition.radical +78 -1
  32. package/dist/hub-catalogue/concern/concern-definition-of-done.radical +150 -11
  33. package/dist/hub-catalogue/concern/concern-delivery-metrics.radical +130 -5
  34. package/dist/hub-catalogue/concern/concern-dependency-hygiene.radical +127 -10
  35. package/dist/hub-catalogue/concern/concern-deployment.radical +113 -9
  36. package/dist/hub-catalogue/concern/concern-encryption.radical +146 -5
  37. package/dist/hub-catalogue/concern/concern-error-handling-logging.radical +118 -12
  38. package/dist/hub-catalogue/concern/concern-eu-dora.radical +69 -1
  39. package/dist/hub-catalogue/concern/concern-frontend-stack.radical +148 -9
  40. package/dist/hub-catalogue/concern/concern-incident-management.radical +122 -1
  41. package/dist/hub-catalogue/concern/concern-infrastructure.radical +54 -1
  42. package/dist/hub-catalogue/concern/concern-integration-resilience.radical +110 -5
  43. package/dist/hub-catalogue/concern/concern-messaging.radical +89 -2
  44. package/dist/hub-catalogue/concern/concern-mobile-performance.radical +67 -1
  45. package/dist/hub-catalogue/concern/concern-module-boundaries.radical +92 -5
  46. package/dist/hub-catalogue/concern/concern-observability.radical +105 -1
  47. package/dist/hub-catalogue/concern/concern-operational-readiness.radical +140 -5
  48. package/dist/hub-catalogue/concern/concern-personal-data.radical +206 -7
  49. package/dist/hub-catalogue/concern/concern-quality-priorities.radical +104 -12
  50. package/dist/hub-catalogue/concern/concern-rate-limiting.radical +110 -1
  51. package/dist/hub-catalogue/concern/concern-release-versioning.radical +99 -7
  52. package/dist/hub-catalogue/concern/concern-retention.radical +130 -9
  53. package/dist/hub-catalogue/concern/concern-secrets.radical +196 -12
  54. package/dist/hub-catalogue/concern/concern-secure-coding.radical +122 -1
  55. package/dist/hub-catalogue/concern/concern-secure-development.radical +118 -1
  56. package/dist/hub-catalogue/concern/concern-security-detection.radical +124 -1
  57. package/dist/hub-catalogue/concern/concern-supply-chain.radical +116 -1
  58. package/dist/hub-catalogue/concern/concern-technical-debt.radical +162 -19
  59. package/dist/hub-catalogue/concern/concern-technology-lifecycle.radical +152 -18
  60. package/dist/hub-catalogue/concern/concern-tenant-isolation.radical +111 -1
  61. package/dist/hub-catalogue/concern/concern-test-strategy.radical +83 -7
  62. package/dist/hub-catalogue/concern/concern-threat-modelling.radical +120 -1
  63. package/dist/hub-catalogue/concern/concern-usability.radical +84 -5
  64. package/dist/index.js +1862 -1066
  65. package/dist/{pdfjs-DDCLOUBH.js → pdfjs-PK44HJZP.js} +1 -1
  66. package/package.json +1 -1
@@ -18,7 +18,71 @@
18
18
  "trigger": "LIST RELATIONS WHERE source.type != \"person\" AND target.external != true AND (target.type = \"container\" OR target.type = \"component\")",
19
19
  "applyTo": "target",
20
20
  "why": "other elements and systems call these elements' APIs to change things, so how a retried request is kept from acting twice, and how concurrent changes are kept from overwriting each other, has to be decided.",
21
- "group": "api"
21
+ "group": "api",
22
+ "scope": {
23
+ "group": "api",
24
+ "questions": [
25
+ {
26
+ "key": "CALLERS",
27
+ "label": "Who calls its APIs?",
28
+ "default": "own",
29
+ "hint": "An API only our own front end calls can change with it; partners and the public hold us to what we published.",
30
+ "options": [
31
+ {
32
+ "value": "own",
33
+ "label": "only our own front ends",
34
+ "description": "Our own web or mobile app is the only caller, released together with the API."
35
+ },
36
+ {
37
+ "value": "partners",
38
+ "label": "partners we know",
39
+ "description": "Systems of partners or other departments call it, under an agreement."
40
+ },
41
+ {
42
+ "value": "public",
43
+ "label": "anyone",
44
+ "description": "A public API that anyone may sign up for and call."
45
+ }
46
+ ]
47
+ },
48
+ {
49
+ "key": "LIFETIME",
50
+ "label": "Do callers move to a new version with us?",
51
+ "default": "together",
52
+ "hint": "Callers that stay on an old version need versioning and deprecation rules.",
53
+ "options": [
54
+ {
55
+ "value": "together",
56
+ "label": "yes, together",
57
+ "description": "Every caller is updated when the API changes."
58
+ },
59
+ {
60
+ "value": "old",
61
+ "label": "no, some stay on old versions",
62
+ "description": "Some callers (apps people do not update, partners) keep calling an older version for months."
63
+ }
64
+ ]
65
+ },
66
+ {
67
+ "key": "TEAMS",
68
+ "label": "How many teams build its APIs?",
69
+ "default": "one",
70
+ "hint": "Several teams need a shared style guide so the APIs look like one.",
71
+ "options": [
72
+ {
73
+ "value": "one",
74
+ "label": "one team",
75
+ "description": "One team designs every API."
76
+ },
77
+ {
78
+ "value": "several",
79
+ "label": "several teams",
80
+ "description": "Several teams each design some of the APIs."
81
+ }
82
+ ]
83
+ }
84
+ ]
85
+ }
22
86
  },
23
87
  "sources": [
24
88
  {
@@ -100,7 +164,13 @@
100
164
  "label": "a shared Redis with an expiry on every key",
101
165
  "description": "The key is claimed in Redis before the change runs and replaced by the response after it, each with an expiry, so Redis removes old keys itself. Pick it when the changes do not land in one relational database (a document store, several stores) or several services share one key store."
102
166
  }
103
- ]
167
+ ],
168
+ "scopeWhen": {
169
+ "CALLERS": [
170
+ "partners",
171
+ "public"
172
+ ]
173
+ }
104
174
  },
105
175
  {
106
176
  "key": "CONCURRENCY",
@@ -180,6 +250,10 @@
180
250
  "hubWhen": {
181
251
  "IDEMPOTENCY": [
182
252
  "key"
253
+ ],
254
+ "STORE": [
255
+ "database",
256
+ "redis"
183
257
  ]
184
258
  }
185
259
  },
@@ -196,6 +270,10 @@
196
270
  "hubWhen": {
197
271
  "IDEMPOTENCY": [
198
272
  "key"
273
+ ],
274
+ "STORE": [
275
+ "database",
276
+ "redis"
199
277
  ]
200
278
  }
201
279
  },
@@ -212,6 +290,10 @@
212
290
  "hubWhen": {
213
291
  "IDEMPOTENCY": [
214
292
  "key"
293
+ ],
294
+ "STORE": [
295
+ "database",
296
+ "redis"
215
297
  ]
216
298
  }
217
299
  },
@@ -227,6 +309,10 @@
227
309
  "hubWhen": {
228
310
  "IDEMPOTENCY": [
229
311
  "key"
312
+ ],
313
+ "STORE": [
314
+ "database",
315
+ "redis"
230
316
  ]
231
317
  }
232
318
  },
@@ -341,6 +427,10 @@
341
427
  "hubWhen": {
342
428
  "CONCURRENCY": [
343
429
  "etag"
430
+ ],
431
+ "STORE": [
432
+ "database",
433
+ "redis"
344
434
  ]
345
435
  }
346
436
  },
@@ -402,6 +492,10 @@
402
492
  "hubWhen": {
403
493
  "IDEMPOTENCY": [
404
494
  "key"
495
+ ],
496
+ "STORE": [
497
+ "database",
498
+ "redis"
405
499
  ]
406
500
  }
407
501
  },
@@ -417,6 +511,10 @@
417
511
  "hubWhen": {
418
512
  "IDEMPOTENCY": [
419
513
  "key"
514
+ ],
515
+ "STORE": [
516
+ "database",
517
+ "redis"
420
518
  ]
421
519
  }
422
520
  },
@@ -432,6 +530,10 @@
432
530
  "hubWhen": {
433
531
  "IDEMPOTENCY": [
434
532
  "key"
533
+ ],
534
+ "STORE": [
535
+ "database",
536
+ "redis"
435
537
  ]
436
538
  }
437
539
  },
@@ -447,6 +549,10 @@
447
549
  "hubWhen": {
448
550
  "IDEMPOTENCY": [
449
551
  "key"
552
+ ],
553
+ "STORE": [
554
+ "database",
555
+ "redis"
450
556
  ]
451
557
  }
452
558
  },
@@ -558,6 +664,10 @@
558
664
  "hubWhen": {
559
665
  "CONCURRENCY": [
560
666
  "etag"
667
+ ],
668
+ "STORE": [
669
+ "database",
670
+ "redis"
561
671
  ]
562
672
  }
563
673
  },
@@ -601,7 +711,7 @@
601
711
  "status": "accepted",
602
712
  "date": "",
603
713
  "context": "Other elements, partners and browsers call this element's HTTP API to change things, over networks that drop connections. The forces: a timeout does not tell the caller whether the change happened, and gateways, SDKs, mobile apps and impatient users try again, so an order, a payment or a message is made twice; POST and PATCH are not idempotent in HTTP, while PUT and DELETE are; remembering requests costs a store, an expiry and a write on every call; two clients that read the same resource and write it back overwrite each other without either knowing (the lost update); and preventing that asks every client to keep and send a version. Retries of the calls this element makes to others are decided in the Integration resilience pack, duplicate messages in the Messaging pack, transactions and isolation in the Data consistency pack, and the body of every error answer in the Errors pack of the API Guidelines.",
604
- "decision": "Every POST and PATCH the API offers takes an Idempotency-Key request header as the IETF httpapi working group's Internet-Draft \"The Idempotency-Key HTTP Header Field\" defines it (a draft, not an RFC: pin the draft version the API follows in its documentation). The value is a Structured Field String, a UUID v4 the client generates once per intended change and sends again on every retry of it. The header is required: a request without it is refused with 400. One middleware in front of every POST and PATCH handler, not code in each handler, keeps per calling client (its authenticated identity or API key) the key, a fingerprint of the request (method, path and the SHA-256 of the body) and the response of every request that completed, for {{KEY_HOURS}} hours. A repeat with the same key and fingerprint gets the stored response before any precondition is evaluated; the same key with another fingerprint gets 422; a repeat while the first is still running never runs: it waits at most {{LOCK_SECONDS}} seconds for the first, or gets 409. Keys and responses are kept in {{STORE}}. The OpenAPI document declares the header on every POST and PATCH and states the retention. GET, HEAD, OPTIONS, PUT and DELETE take no key: they are idempotent by definition (RFC 9110, 9.2.2). The bodies of the 400, 409 and 422 answers follow the Errors pack.",
714
+ "decision": "Every POST and PATCH the API offers takes an Idempotency-Key request header as the IETF httpapi working group's Internet-Draft \"The Idempotency-Key HTTP Header Field\" defines it (a draft, not an RFC: pin the draft version the API follows in its documentation). The value is a Structured Field String, a UUID v4 the client generates once per intended change and sends again on every retry of it. The header is required: a request without it is refused with 400. One middleware in front of every POST and PATCH handler, not code in each handler, keeps per calling client (its authenticated identity or API key) the key, a fingerprint of the request (method, path and the SHA-256 of the body) and the response of every request that completed, for {{KEY_HOURS}} hours. A repeat with the same key and fingerprint gets the stored response before any precondition is evaluated; the same key with another fingerprint gets 422; a repeat while the first is still running never runs: it waits at most {{LOCK_SECONDS}} seconds for the first, or gets 409. The OpenAPI document declares the header on every POST and PATCH and states the retention. GET, HEAD, OPTIONS, PUT and DELETE take no key: they are idempotent by definition (RFC 9110, 9.2.2). The bodies of the 400, 409 and 422 answers follow the Errors pack.",
605
715
  "consequences": "• A client may retry any request after a timeout or a dropped connection without doing it twice; SDKs and gateways can retry POST safely.\n• Every POST and PATCH costs a write and a read of the key store, and the stored responses take space.\n• After {{KEY_HOURS}} hours a key is gone and a retry runs again: clients must stop retrying before then.\n• The client must keep the key across its own restarts; a client that makes a new key per attempt gets no protection.\n• The draft may still change (status codes, syntax); following a pinned version keeps callers' expectations stable.",
606
716
  "alternatives": "1. Client-chosen ids with PUT: nothing to store, but every operation must be expressed as a PUT to a known URI.\n2. A secondary key in the body with a unique constraint (Zalando rule 231): a duplicate creation fails with 409 instead of replaying the first answer, and it covers creations only.\n3. The Repeatability-Request-ID and Repeatability-First-Sent headers of the Microsoft REST API Guidelines: the same idea, rarely seen outside Azure.\n4. No protection: simpler, and every timeout becomes a question for a person.",
607
717
  "hubWhen": {
@@ -782,6 +892,10 @@
782
892
  "hubWhen": {
783
893
  "IDEMPOTENCY": [
784
894
  "key"
895
+ ],
896
+ "STORE": [
897
+ "database",
898
+ "redis"
785
899
  ]
786
900
  }
787
901
  },
@@ -800,6 +914,10 @@
800
914
  "hubWhen": {
801
915
  "IDEMPOTENCY": [
802
916
  "key"
917
+ ],
918
+ "STORE": [
919
+ "database",
920
+ "redis"
803
921
  ]
804
922
  }
805
923
  },
@@ -18,7 +18,84 @@
18
18
  "trigger": "LIST RELATIONS WHERE source.type != \"person\" AND target.external != true AND (target.type = \"container\" OR target.type = \"component\")",
19
19
  "applyTo": "target",
20
20
  "why": "other parts and systems call these elements over an API, so how its resources, paths, fields, methods and status codes look has to be decided.",
21
- "group": "api"
21
+ "group": "api",
22
+ "scope": {
23
+ "group": "api",
24
+ "questions": [
25
+ {
26
+ "key": "CALLERS",
27
+ "label": "Who calls its APIs?",
28
+ "default": "own",
29
+ "hint": "An API only our own front end calls can change with it; partners and the public hold us to what we published.",
30
+ "options": [
31
+ {
32
+ "value": "own",
33
+ "label": "only our own front ends",
34
+ "description": "Our own web or mobile app is the only caller, released together with the API."
35
+ },
36
+ {
37
+ "value": "partners",
38
+ "label": "partners we know",
39
+ "description": "Systems of partners or other departments call it, under an agreement."
40
+ },
41
+ {
42
+ "value": "public",
43
+ "label": "anyone",
44
+ "description": "A public API that anyone may sign up for and call."
45
+ }
46
+ ]
47
+ },
48
+ {
49
+ "key": "LIFETIME",
50
+ "label": "Do callers move to a new version with us?",
51
+ "default": "together",
52
+ "hint": "Callers that stay on an old version need versioning and deprecation rules.",
53
+ "options": [
54
+ {
55
+ "value": "together",
56
+ "label": "yes, together",
57
+ "description": "Every caller is updated when the API changes."
58
+ },
59
+ {
60
+ "value": "old",
61
+ "label": "no, some stay on old versions",
62
+ "description": "Some callers (apps people do not update, partners) keep calling an older version for months."
63
+ }
64
+ ]
65
+ },
66
+ {
67
+ "key": "TEAMS",
68
+ "label": "How many teams build its APIs?",
69
+ "default": "one",
70
+ "hint": "Several teams need a shared style guide so the APIs look like one.",
71
+ "options": [
72
+ {
73
+ "value": "one",
74
+ "label": "one team",
75
+ "description": "One team designs every API."
76
+ },
77
+ {
78
+ "value": "several",
79
+ "label": "several teams",
80
+ "description": "Several teams each design some of the APIs."
81
+ }
82
+ ]
83
+ }
84
+ ],
85
+ "when": [
86
+ {
87
+ "CALLERS": [
88
+ "partners",
89
+ "public"
90
+ ]
91
+ },
92
+ {
93
+ "TEAMS": [
94
+ "several"
95
+ ]
96
+ }
97
+ ]
98
+ }
22
99
  },
23
100
  "sources": [
24
101
  {
@@ -18,7 +18,84 @@
18
18
  "trigger": "LIST RELATIONS WHERE source.type != \"person\" AND target.external != true AND (target.type = \"container\" OR target.type = \"component\")",
19
19
  "applyTo": "target",
20
20
  "why": "other systems or other parts call these elements, so which API guideline their interfaces follow, and how that is checked, has to be decided.",
21
- "group": "api"
21
+ "group": "api",
22
+ "scope": {
23
+ "group": "api",
24
+ "questions": [
25
+ {
26
+ "key": "CALLERS",
27
+ "label": "Who calls its APIs?",
28
+ "default": "own",
29
+ "hint": "An API only our own front end calls can change with it; partners and the public hold us to what we published.",
30
+ "options": [
31
+ {
32
+ "value": "own",
33
+ "label": "only our own front ends",
34
+ "description": "Our own web or mobile app is the only caller, released together with the API."
35
+ },
36
+ {
37
+ "value": "partners",
38
+ "label": "partners we know",
39
+ "description": "Systems of partners or other departments call it, under an agreement."
40
+ },
41
+ {
42
+ "value": "public",
43
+ "label": "anyone",
44
+ "description": "A public API that anyone may sign up for and call."
45
+ }
46
+ ]
47
+ },
48
+ {
49
+ "key": "LIFETIME",
50
+ "label": "Do callers move to a new version with us?",
51
+ "default": "together",
52
+ "hint": "Callers that stay on an old version need versioning and deprecation rules.",
53
+ "options": [
54
+ {
55
+ "value": "together",
56
+ "label": "yes, together",
57
+ "description": "Every caller is updated when the API changes."
58
+ },
59
+ {
60
+ "value": "old",
61
+ "label": "no, some stay on old versions",
62
+ "description": "Some callers (apps people do not update, partners) keep calling an older version for months."
63
+ }
64
+ ]
65
+ },
66
+ {
67
+ "key": "TEAMS",
68
+ "label": "How many teams build its APIs?",
69
+ "default": "one",
70
+ "hint": "Several teams need a shared style guide so the APIs look like one.",
71
+ "options": [
72
+ {
73
+ "value": "one",
74
+ "label": "one team",
75
+ "description": "One team designs every API."
76
+ },
77
+ {
78
+ "value": "several",
79
+ "label": "several teams",
80
+ "description": "Several teams each design some of the APIs."
81
+ }
82
+ ]
83
+ }
84
+ ],
85
+ "when": [
86
+ {
87
+ "CALLERS": [
88
+ "partners",
89
+ "public"
90
+ ]
91
+ },
92
+ {
93
+ "TEAMS": [
94
+ "several"
95
+ ]
96
+ }
97
+ ]
98
+ }
22
99
  },
23
100
  "sources": [
24
101
  {
@@ -19,7 +19,71 @@
19
19
  "id": "architecture-style",
20
20
  "trigger": "LIST NODES WHERE (type = \"container\" OR type = \"webapp\") AND external != true",
21
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"
22
+ "group": "architecture",
23
+ "scope": {
24
+ "group": "architecture",
25
+ "questions": [
26
+ {
27
+ "key": "TEAMS",
28
+ "label": "How many teams build it?",
29
+ "default": "one",
30
+ "hint": "Several teams need the system cut into parts each can own and change alone.",
31
+ "options": [
32
+ {
33
+ "value": "one",
34
+ "label": "one team or fewer",
35
+ "description": "One person or one team builds all of it."
36
+ },
37
+ {
38
+ "value": "several",
39
+ "label": "several teams",
40
+ "description": "Several teams each own parts of it."
41
+ }
42
+ ]
43
+ },
44
+ {
45
+ "key": "SCALE",
46
+ "label": "How large is it?",
47
+ "default": "small",
48
+ "hint": "Caches, queues and split services pay for themselves only at some scale.",
49
+ "options": [
50
+ {
51
+ "value": "small",
52
+ "label": "small",
53
+ "description": "One site or one team's users; up to some thousands of users or requests a day."
54
+ },
55
+ {
56
+ "value": "medium",
57
+ "label": "medium",
58
+ "description": "Several sites or a region; tens of thousands of users a day, or peaks it must be sized for."
59
+ },
60
+ {
61
+ "value": "large",
62
+ "label": "large",
63
+ "description": "Hundreds of thousands of users or more, several regions, load that scales out and back."
64
+ }
65
+ ]
66
+ },
67
+ {
68
+ "key": "INTEGRATIONS",
69
+ "label": "How many other systems does it depend on?",
70
+ "default": "few",
71
+ "hint": "Every system it calls can be slow or down; many of them need resilience patterns.",
72
+ "options": [
73
+ {
74
+ "value": "few",
75
+ "label": "a few",
76
+ "description": "Up to two or three external systems (a payment provider, an e-mail service)."
77
+ },
78
+ {
79
+ "value": "many",
80
+ "label": "many",
81
+ "description": "Many external or internal systems it calls or exchanges data with."
82
+ }
83
+ ]
84
+ }
85
+ ]
86
+ }
23
87
  },
24
88
  "sources": [
25
89
  {
@@ -118,7 +182,13 @@
118
182
  "label": "transaction scripts per use case",
119
183
  "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
184
  }
121
- ]
185
+ ],
186
+ "scopeWhen": {
187
+ "SCALE": [
188
+ "medium",
189
+ "large"
190
+ ]
191
+ }
122
192
  },
123
193
  {
124
194
  "key": "CQRS",
@@ -142,7 +212,13 @@
142
212
  "label": "a separate read store, updated by events",
143
213
  "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
214
  }
145
- ]
215
+ ],
216
+ "scopeWhen": {
217
+ "SCALE": [
218
+ "medium",
219
+ "large"
220
+ ]
221
+ }
146
222
  },
147
223
  {
148
224
  "key": "FRAMEWORK",
@@ -591,7 +667,7 @@
591
667
  "status": "accepted",
592
668
  "date": "",
593
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.",
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.",
670
+ "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. 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
671
  "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
672
  "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
673
  "hubWhen": {
@@ -610,7 +686,7 @@
610
686
  "status": "accepted",
611
687
  "date": "",
612
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.",
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.",
689
+ "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. 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
690
  "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
691
  "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
692
  "hubWhen": {
@@ -629,7 +705,7 @@
629
705
  "status": "accepted",
630
706
  "date": "",
631
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.",
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.",
708
+ "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. 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
709
  "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
710
  "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
711
  "hubWhen": {
@@ -648,7 +724,7 @@
648
724
  "status": "accepted",
649
725
  "date": "",
650
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.",
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.",
727
+ "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). 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
728
  "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
729
  "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
730
  "hubWhen": {
@@ -17,7 +17,83 @@
17
17
  "id": "audit-trail",
18
18
  "trigger": "LIST NODES WHERE (type = \"container\" OR type = \"webapp\") AND external != true",
19
19
  "why": "these elements run the operations a regulator, an auditor or an investigation may ask about, so how their audit trail is recorded, protected, kept and read has to be decided.",
20
- "group": "compliance"
20
+ "group": "compliance",
21
+ "scope": {
22
+ "group": "compliance",
23
+ "questions": [
24
+ {
25
+ "key": "PERSONAL",
26
+ "label": "What does it keep about people?",
27
+ "default": "ordinary",
28
+ "hint": "Any personal data brings the GDPR's duties; special categories or children bring more (Art. 9, WP248).",
29
+ "options": [
30
+ {
31
+ "value": "none",
32
+ "label": "nothing about people",
33
+ "description": "No personal data beyond staff sign-in."
34
+ },
35
+ {
36
+ "value": "ordinary",
37
+ "label": "ordinary personal data",
38
+ "description": "Names, e-mail addresses, phone numbers, orders, accounts."
39
+ },
40
+ {
41
+ "value": "special",
42
+ "label": "special categories or children",
43
+ "description": "Health, biometrics, genetic data, religion, politics, sexual orientation, union membership, criminal records, or data about children (GDPR Art. 9 and 10)."
44
+ }
45
+ ]
46
+ },
47
+ {
48
+ "key": "REGULATION",
49
+ "label": "Which law or standard binds it most?",
50
+ "default": "none",
51
+ "hint": "Pick the most binding one; a lawyer settles the exceptions. This only says which packs to consider.",
52
+ "options": [
53
+ {
54
+ "value": "none",
55
+ "label": "none beyond the GDPR",
56
+ "description": "No sector law or payment standard applies."
57
+ },
58
+ {
59
+ "value": "cards",
60
+ "label": "card numbers on our own pages",
61
+ "description": "Card numbers are typed into pages we serve (PCI DSS beyond SAQ A); with a payment provider's hosted page or iframe, pick none."
62
+ },
63
+ {
64
+ "value": "finance",
65
+ "label": "EU financial services",
66
+ "description": "A bank, payment or e-money institution, investment firm, crypto-asset provider, insurer or pension fund in the EU, or an ICT supplier to one (DORA)."
67
+ },
68
+ {
69
+ "value": "health",
70
+ "label": "health records",
71
+ "description": "Patient or health records, or a supplier to a health provider or plan (HIPAA in the US)."
72
+ },
73
+ {
74
+ "value": "essential",
75
+ "label": "an essential sector",
76
+ "description": "Energy, transport, water, health, digital infrastructure, managed IT or security services, public administration, manufacturing, food and the like, with 50+ staff or €10M+ turnover (NIS2)."
77
+ }
78
+ ]
79
+ }
80
+ ],
81
+ "when": [
82
+ {
83
+ "PERSONAL": [
84
+ "special"
85
+ ]
86
+ },
87
+ {
88
+ "REGULATION": [
89
+ "cards",
90
+ "finance",
91
+ "health",
92
+ "essential"
93
+ ]
94
+ }
95
+ ]
96
+ }
21
97
  },
22
98
  "sources": [
23
99
  {