@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
@@ -17,7 +17,61 @@
17
17
  "id": "code-style",
18
18
  "trigger": "LIST NODES WHERE (type = \"container\" OR type = \"webapp\") AND external != true",
19
19
  "why": "code lives in these elements, so how it is formatted, named and laid out has to be decided; one decision usually covers a whole repository and is bound to every element built from it.",
20
- "group": "coding"
20
+ "group": "coding",
21
+ "scope": {
22
+ "group": "coding",
23
+ "questions": [
24
+ {
25
+ "key": "TEAM",
26
+ "label": "Who writes the code?",
27
+ "default": "small",
28
+ "hint": "Code others must read and change needs written conventions and documentation.",
29
+ "options": [
30
+ {
31
+ "value": "small",
32
+ "label": "one or two people",
33
+ "description": "One or two developers who know all of it."
34
+ },
35
+ {
36
+ "value": "team",
37
+ "label": "a team",
38
+ "description": "A team of its own, with people joining and leaving."
39
+ },
40
+ {
41
+ "value": "teams",
42
+ "label": "several teams",
43
+ "description": "Several teams working in the same codebase or in parts of it."
44
+ }
45
+ ]
46
+ },
47
+ {
48
+ "key": "LIFETIME",
49
+ "label": "How long must the code live?",
50
+ "default": "years",
51
+ "hint": "A prototype thrown away soon needs little; code kept for years needs its debt paid down.",
52
+ "options": [
53
+ {
54
+ "value": "short",
55
+ "label": "a prototype or a short-lived tool",
56
+ "description": "A trial, a demo or a tool for a few months, then thrown away."
57
+ },
58
+ {
59
+ "value": "years",
60
+ "label": "years",
61
+ "description": "It will be kept and changed for years."
62
+ }
63
+ ]
64
+ }
65
+ ],
66
+ "when": [
67
+ {
68
+ "TEAM": [
69
+ "team",
70
+ "teams"
71
+ ]
72
+ }
73
+ ]
74
+ }
21
75
  },
22
76
  "sources": [
23
77
  {
@@ -122,7 +176,13 @@
122
176
  "label": "our own short guide built on a published one",
123
177
  "description": "A short guide of the team's own in docs/STYLE.md (30 rules at most by default), each rule naming the published rule it adopts or changes and whether a lint rule or the reviewer checks it. Pick it when the team has conventions no published guide covers (domain terms in names, module layout, test naming), or several languages need one voice."
124
178
  }
125
- ]
179
+ ],
180
+ "scopeWhen": {
181
+ "TEAM": [
182
+ "team",
183
+ "teams"
184
+ ]
185
+ }
126
186
  },
127
187
  {
128
188
  "key": "NAMING",
@@ -141,7 +201,13 @@
141
201
  "label": "written rules checked in review",
142
202
  "description": "The naming rules are written in the guide with an example of a right and a wrong name for each kind of identifier, and the reviewer checks them. Pick it when the linter of a language has no naming rule that expresses the convention (domain terms, abbreviations), or for short-lived code."
143
203
  }
144
- ]
204
+ ],
205
+ "scopeWhen": {
206
+ "TEAM": [
207
+ "team",
208
+ "teams"
209
+ ]
210
+ }
145
211
  },
146
212
  {
147
213
  "key": "EDITOR",
@@ -160,7 +226,13 @@
160
226
  "label": ".editorconfig alone",
161
227
  "description": "Only .editorconfig is shared (charset, line endings, indentation, final newline, line width); no editor-specific settings are committed, and each developer configures format on save in their own editor. Pick it when the team uses many different editors, or settings in the repository have caused conflicts."
162
228
  }
163
- ]
229
+ ],
230
+ "scopeWhen": {
231
+ "TEAM": [
232
+ "team",
233
+ "teams"
234
+ ]
235
+ }
164
236
  },
165
237
  {
166
238
  "key": "LINE_WIDTH",
@@ -217,7 +289,13 @@
217
289
  "y": 130,
218
290
  "ears_type": "ubiquitous",
219
291
  "action": "run each formatter in one exact version pinned in the repository (Prettier or Biome without a range in package.json, ruff==x.y.z among the Python development dependencies), with the commit hook and the editor using that same version, so that 0 files change when another machine runs the formatter",
220
- "rationale": "Even a patch release of Prettier can format differently, which is why Prettier and Biome both install with an exact version (Prettier, Install); pre-commit installs a hook's own copy at the rev in .pre-commit-config.yaml, which drifts from the project's version unless it is kept equal (pre-commit)."
292
+ "rationale": "Even a patch release of Prettier can format differently, which is why Prettier and Biome both install with an exact version (Prettier, Install); pre-commit installs a hook's own copy at the rev in .pre-commit-config.yaml, which drifts from the project's version unless it is kept equal (pre-commit).",
293
+ "hubWhen": {
294
+ "EDITOR": [
295
+ "shared",
296
+ "editorconfig"
297
+ ]
298
+ }
221
299
  },
222
300
  {
223
301
  "id": "req-blame-ignore",
@@ -228,7 +306,13 @@
228
306
  "ears_type": "event-driven",
229
307
  "trigger": "a commit that changes a formatter's settings or version, with the reformatting it causes, reaches the main branch",
230
308
  "action": "list its full SHA, under a comment saying what it changed, in .git-blame-ignore-revs at the repository root within {{BLAME_DAYS}} days, so that git blame with blame.ignoreRevsFile set and the forge's blame view skip it",
231
- "rationale": "A reformatting commit touches thousands of lines and hides who changed each one and why; GitHub's blame view skips the commits listed in .git-blame-ignore-revs at the root (GitHub Docs, Ignore commits in the blame view), and git blame does the same with blame.ignoreRevsFile, one unabbreviated object name per line (git-blame)."
309
+ "rationale": "A reformatting commit touches thousands of lines and hides who changed each one and why; GitHub's blame view skips the commits listed in .git-blame-ignore-revs at the root (GitHub Docs, Ignore commits in the blame view), and git blame does the same with blame.ignoreRevsFile, one unabbreviated object name per line (git-blame).",
310
+ "hubWhen": {
311
+ "EDITOR": [
312
+ "shared",
313
+ "editorconfig"
314
+ ]
315
+ }
232
316
  },
233
317
  {
234
318
  "id": "req-editorconfig",
@@ -238,7 +322,13 @@
238
322
  "y": 390,
239
323
  "ears_type": "ubiquitous",
240
324
  "action": "keep a root .editorconfig (root = true) whose [*] section sets charset utf-8, end_of_line lf, insert_final_newline true, trim_trailing_whitespace true and max_line_length {{LINE_WIDTH}}, with indentation per file type, agreeing with every formatter setting it overlaps, and keep 0 tracked text files that break it",
241
- "rationale": "EditorConfig makes every editor, and the files no formatter covers (shell scripts, Makefiles, Dockerfiles), follow the same basic style (EditorConfig Specification); Prettier reads indentation, line endings and line width from it, so setting them once there leaves no second value to drift (Prettier, Configuration File)."
325
+ "rationale": "EditorConfig makes every editor, and the files no formatter covers (shell scripts, Makefiles, Dockerfiles), follow the same basic style (EditorConfig Specification); Prettier reads indentation, line endings and line width from it, so setting them once there leaves no second value to drift (Prettier, Configuration File).",
326
+ "hubWhen": {
327
+ "EDITOR": [
328
+ "shared",
329
+ "editorconfig"
330
+ ]
331
+ }
242
332
  },
243
333
  {
244
334
  "id": "req-defaults",
@@ -379,7 +469,13 @@
379
469
  "y": 130,
380
470
  "given": "package.json with \"prettier\": \"^3.6.0\", and a pre-commit rev of ruff one release behind the version pyproject.toml pins",
381
471
  "when": "the check runs",
382
- "then": "it fails on both, naming the version to pin"
472
+ "then": "it fails on both, naming the version to pin",
473
+ "hubWhen": {
474
+ "EDITOR": [
475
+ "shared",
476
+ "editorconfig"
477
+ ]
478
+ }
383
479
  },
384
480
  {
385
481
  "id": "sc-blame-ignore",
@@ -389,7 +485,13 @@
389
485
  "y": 260,
390
486
  "given": "a commit on main that raised the Prettier version and reformatted 40 files",
391
487
  "when": "the daily check runs {{BLAME_DAYS}} days later and the SHA is not in .git-blame-ignore-revs",
392
- "then": "the check fails naming the commit; once the SHA is listed it passes and git blame skips the commit"
488
+ "then": "the check fails naming the commit; once the SHA is listed it passes and git blame skips the commit",
489
+ "hubWhen": {
490
+ "EDITOR": [
491
+ "shared",
492
+ "editorconfig"
493
+ ]
494
+ }
393
495
  },
394
496
  {
395
497
  "id": "sc-editorconfig",
@@ -399,7 +501,13 @@
399
501
  "y": 390,
400
502
  "given": "the root .editorconfig and pyproject.toml",
401
503
  "when": "a pull request adds a shell script with CRLF line endings, and another sets Ruff's line-length to 120 while .editorconfig says {{LINE_WIDTH}}",
402
- "then": "the first fails the .editorconfig check naming the file, and the second fails the consistency check naming both values"
504
+ "then": "the first fails the .editorconfig check naming the file, and the second fails the consistency check naming both values",
505
+ "hubWhen": {
506
+ "EDITOR": [
507
+ "shared",
508
+ "editorconfig"
509
+ ]
510
+ }
403
511
  },
404
512
  {
405
513
  "id": "sc-defaults",
@@ -531,7 +639,7 @@
531
639
  "status": "accepted",
532
640
  "date": "",
533
641
  "context": "Code lives in this element and is read far more often than it is written, by people who did not write it; how it looks decides whether a diff shows what changed in meaning or drowns it in moved braces, and whether review time goes to design or to taste. The forces: a formatter ends the arguments about layout, but every option it offers starts a new argument about the option; adopting or upgrading a formatter rewrites thousands of lines at once and buries who wrote what under one commit; two versions of the same formatter, or a second configuration file in a subfolder, format the same file two ways and every save produces a diff; a published style guide costs nothing to adopt but leaves the team's own conventions unwritten, while a guide of the team's own grows until nobody reads it; naming rules nobody checks are kept by whoever reviews; and editors that format on save in one way and the commit hook in another fight over every file. Running the formatter on commit and checking it in CI, and the lint rules that find bugs, are the Code quality gate's decision; comments and documentation are the Code documentation pack's; how errors and logs are written is the Error handling and logging pack's; the review itself is the Code review and branching pack's.",
534
- "decision": "Each language is formatted by its opinionated formatter on its defaults: Prettier for TypeScript, JavaScript, JSON, CSS and Markdown (or Biome, which formats and lints in one tool), Ruff format for Python (Black-compatible; Black where Ruff is not used), gofmt for Go, ktlint with the ktlint_official code style for Kotlin, google-java-format for Java, dotnet format for C#. A formatter's configuration file sets no more than {{MAX_FORMAT_OPTIONS}} formatting options besides the files it ignores; the line width ({{LINE_WIDTH}}), indentation and line endings are set once in the root .editorconfig, which Prettier, ktlint and dotnet format read, and Ruff's line-length is set to the same value. Each formatter is pinned to one exact version, used alike by the commit hook, CI and the editor. Adopting the formatter, upgrading it or changing an option is a pull request of its own that reformats the whole tree and changes nothing else, and its commit is listed in .git-blame-ignore-revs. That the formatter runs on commit and is checked in CI is the Code quality gate's decision. Style guide: {{GUIDE}}. Naming: {{NAMING}}. Editors: {{EDITOR}}.",
642
+ "decision": "Each language is formatted by its opinionated formatter on its defaults: Prettier for TypeScript, JavaScript, JSON, CSS and Markdown (or Biome, which formats and lints in one tool), Ruff format for Python (Black-compatible; Black where Ruff is not used), gofmt for Go, ktlint with the ktlint_official code style for Kotlin, google-java-format for Java, dotnet format for C#. A formatter's configuration file sets no more than {{MAX_FORMAT_OPTIONS}} formatting options besides the files it ignores; the line width ({{LINE_WIDTH}}), indentation and line endings are set once in the root .editorconfig, which Prettier, ktlint and dotnet format read, and Ruff's line-length is set to the same value. Each formatter is pinned to one exact version, used alike by the commit hook, CI and the editor. Adopting the formatter, upgrading it or changing an option is a pull request of its own that reformats the whole tree and changes nothing else, and its commit is listed in .git-blame-ignore-revs. That the formatter runs on commit and is checked in CI is the Code quality gate's decision. ",
535
643
  "consequences": "• Layout is never discussed in review again; every file looks the same whoever wrote it.\n• The first adoption reformats most lines at once: every open branch conflicts and has to be rebased with the formatter run on it, and blame needs the ignore file to stay useful.\n• Some defaults will annoy someone (Prettier's 80 columns, Biome's tabs); the decision accepts that, and the line width is the one setting the team chose.\n• A formatter upgrade can change hundreds of lines; with an exact pin it arrives as one reviewed, blame-ignored pull request instead of noise in unrelated changes.\n• The exact pin of the formatter is an exception to any range policy for dependencies, which the formatters' own install guides ask for.",
536
644
  "alternatives": "1. A formatter configured to match the existing code: fewer lines change at adoption, but every option is a style argument kept alive and a setting to maintain.\n2. No formatter, style left to the reviewer: no adoption cost, and a style comment in every review for as long as the code lives.\n3. A different formatter per team or folder: each team gets its taste, and every cross-team change reformats the files it touches.",
537
645
  "hubWhen": {
@@ -550,7 +658,7 @@
550
658
  "status": "accepted",
551
659
  "date": "",
552
660
  "context": "Code lives in this element and is read far more often than it is written, by people who did not write it; how it looks decides whether a diff shows what changed in meaning or drowns it in moved braces, and whether review time goes to design or to taste. The forces: a formatter ends the arguments about layout, but every option it offers starts a new argument about the option; adopting or upgrading a formatter rewrites thousands of lines at once and buries who wrote what under one commit; two versions of the same formatter, or a second configuration file in a subfolder, format the same file two ways and every save produces a diff; a published style guide costs nothing to adopt but leaves the team's own conventions unwritten, while a guide of the team's own grows until nobody reads it; naming rules nobody checks are kept by whoever reviews; and editors that format on save in one way and the commit hook in another fight over every file. Running the formatter on commit and checking it in CI, and the lint rules that find bugs, are the Code quality gate's decision; comments and documentation are the Code documentation pack's; how errors and logs are written is the Error handling and logging pack's; the review itself is the Code review and branching pack's.",
553
- "decision": "Each language is formatted by one formatter (Prettier or Biome, Ruff format, gofmt, ktlint, google-java-format, dotnet format), configured so that the existing code changes as little as possible: an option is set only to keep a convention the code already follows (quote style, indentation, trailing commas, the line width of {{LINE_WIDTH}}), and each is preceded by a comment naming that convention, so the settings live in files that hold comments (.prettierrc.yaml, pyproject.toml, .editorconfig). Formatters without options (gofmt, google-java-format) run on their defaults. Each formatter is pinned to one exact version, used alike by the commit hook, CI and the editor. Changing an option, or upgrading a formatter, is a pull request of its own that reformats the whole tree, and its commit is listed in .git-blame-ignore-revs. That the formatter runs on commit and is checked in CI is the Code quality gate's decision. Style guide: {{GUIDE}}. Naming: {{NAMING}}. Editors: {{EDITOR}}.",
661
+ "decision": "Each language is formatted by one formatter (Prettier or Biome, Ruff format, gofmt, ktlint, google-java-format, dotnet format), configured so that the existing code changes as little as possible: an option is set only to keep a convention the code already follows (quote style, indentation, trailing commas, the line width of {{LINE_WIDTH}}), and each is preceded by a comment naming that convention, so the settings live in files that hold comments (.prettierrc.yaml, pyproject.toml, .editorconfig). Formatters without options (gofmt, google-java-format) run on their defaults. Each formatter is pinned to one exact version, used alike by the commit hook, CI and the editor. Changing an option, or upgrading a formatter, is a pull request of its own that reformats the whole tree, and its commit is listed in .git-blame-ignore-revs. That the formatter runs on commit and is checked in CI is the Code quality gate's decision. ",
554
662
  "consequences": "• Adoption changes few lines, so long-lived branches keep merging and blame stays mostly intact.\n• Every option is a style choice the team made and may argue about again; the comment on each says why it is there and when it could go.\n• Options interact with formatter upgrades: a new release may treat an option differently, and the configuration needs reading at each major version.\n• Code copied from elsewhere, or from tools that write code (generators, assistants), arrives in the formatter's defaults and is reformatted on commit.\n• The exact pin of the formatter is an exception to any range policy for dependencies, which the formatters' own install guides ask for.",
555
663
  "alternatives": "1. An opinionated formatter on its defaults: nothing to argue about or maintain, at the cost of one large reformatting commit.\n2. Formatting only the files a change touches: no big commit, but the code stays in two styles for years and every touched file shows unrelated reformatting in its diff.\n3. No formatter: no adoption cost, and layout argued in every review.",
556
664
  "hubWhen": {
@@ -621,7 +729,13 @@
621
729
  "cadence": "triggered",
622
730
  "trigger": "pull-request",
623
731
  "invocation": "automated",
624
- "description": "A CI step reads the formatter versions from package.json and compares the rev of the ruff-pre-commit hook with the version pyproject.toml pins. On the Node side the hook (lint-staged) and the editor (the Prettier and Biome extensions use the project's installed copy first) run the version in node_modules, so an exact pin is enough; on the Python side pre-commit installs a copy of its own, which this keeps equal, and the Ruff extension finds Ruff in the environment first (ruff.importStrategy fromEnvironment, its default).\n\nThreshold: Prettier and Biome pinned without a range in package.json; the ruff-pre-commit rev equal to the ruff==x.y.z pinned in pyproject.toml; the step fails on any difference\n\nTool: jq, grep and sed in a CI step (for Kotlin and Java: the ktlint or Spotless version in libs.versions.toml; for C#: the SDK version in global.json)\n\n```bash\n#!/usr/bin/env bash\n# CI step: one exact formatter version, for the commit hook, CI and the editor alike\nset -euo pipefail\nfail=0\nfor tool in prettier @biomejs/biome; do\n v=$(jq -r --arg t \"$tool\" '(.devDependencies // {})[$t] // empty' package.json 2>/dev/null || true)\n [ -z \"$v\" ] || [[ \"$v\" =~ ^[0-9]+\\.[0-9]+\\.[0-9]+$ ]] || { echo \"package.json: $tool is $v; pin it exactly (npm i -D -E $tool)\"; fail=1; }\ndone\nif [ -f .pre-commit-config.yaml ] && grep -q 'astral-sh/ruff-pre-commit' .pre-commit-config.yaml; then\n hook=$(grep -A2 'astral-sh/ruff-pre-commit' .pre-commit-config.yaml | sed -n 's/^ *rev: *v\\{0,1\\}\\([0-9.]*\\).*/\\1/p')\n pinned=$(grep -oE '\"ruff==[0-9.]+\"' pyproject.toml | grep -oE '[0-9.]*[0-9]' || true)\n [ \"$hook\" = \"$pinned\" ] || { echo \"pre-commit runs ruff $hook, pyproject.toml pins ruff==$pinned; make them equal\"; fail=1; }\nfi\nexit $fail\n```"
732
+ "description": "A CI step reads the formatter versions from package.json and compares the rev of the ruff-pre-commit hook with the version pyproject.toml pins. On the Node side the hook (lint-staged) and the editor (the Prettier and Biome extensions use the project's installed copy first) run the version in node_modules, so an exact pin is enough; on the Python side pre-commit installs a copy of its own, which this keeps equal, and the Ruff extension finds Ruff in the environment first (ruff.importStrategy fromEnvironment, its default).\n\nThreshold: Prettier and Biome pinned without a range in package.json; the ruff-pre-commit rev equal to the ruff==x.y.z pinned in pyproject.toml; the step fails on any difference\n\nTool: jq, grep and sed in a CI step (for Kotlin and Java: the ktlint or Spotless version in libs.versions.toml; for C#: the SDK version in global.json)\n\n```bash\n#!/usr/bin/env bash\n# CI step: one exact formatter version, for the commit hook, CI and the editor alike\nset -euo pipefail\nfail=0\nfor tool in prettier @biomejs/biome; do\n v=$(jq -r --arg t \"$tool\" '(.devDependencies // {})[$t] // empty' package.json 2>/dev/null || true)\n [ -z \"$v\" ] || [[ \"$v\" =~ ^[0-9]+\\.[0-9]+\\.[0-9]+$ ]] || { echo \"package.json: $tool is $v; pin it exactly (npm i -D -E $tool)\"; fail=1; }\ndone\nif [ -f .pre-commit-config.yaml ] && grep -q 'astral-sh/ruff-pre-commit' .pre-commit-config.yaml; then\n hook=$(grep -A2 'astral-sh/ruff-pre-commit' .pre-commit-config.yaml | sed -n 's/^ *rev: *v\\{0,1\\}\\([0-9.]*\\).*/\\1/p')\n pinned=$(grep -oE '\"ruff==[0-9.]+\"' pyproject.toml | grep -oE '[0-9.]*[0-9]' || true)\n [ \"$hook\" = \"$pinned\" ] || { echo \"pre-commit runs ruff $hook, pyproject.toml pins ruff==$pinned; make them equal\"; fail=1; }\nfi\nexit $fail\n```",
733
+ "hubWhen": {
734
+ "EDITOR": [
735
+ "shared",
736
+ "editorconfig"
737
+ ]
738
+ }
625
739
  },
626
740
  {
627
741
  "id": "ff-blame-ignore",
@@ -634,7 +748,13 @@
634
748
  "cadence": "triggered",
635
749
  "trigger": "nightly",
636
750
  "invocation": "automated",
637
- "description": "A daily job on main lists every commit whose diff changes a formatter version or a formatting setting in package.json, pyproject.toml, the formatter configuration or .editorconfig, and looks for its full SHA in .git-blame-ignore-revs. Listing a version bump that reformatted nothing is harmless: blame skips only the lines that commit changed. Each developer runs git config blame.ignoreRevsFile .git-blame-ignore-revs once (or the repository's setup script does); GitHub reads the file by itself.\n\nThreshold: 0 commits older than {{BLAME_DAYS}} days that changed a formatter's settings or version and are missing from .git-blame-ignore-revs; younger ones are reported as warnings\n\nTool: git log -G in a scheduled GitHub Actions job (actions/checkout with fetch-depth: 0)\n\n```bash\n#!/usr/bin/env bash\n# run daily on main by .github/workflows/blame-ignore.yml (actions/checkout with fetch-depth: 0)\nset -euo pipefail\n# changed lines that mean \"a formatter's settings or version changed\"\nSETTINGS='\"(prettier|@biomejs/biome)\": \"|ruff==|black==|printWidth|tabWidth|useTabs|lineWidth|indentWidth|indentStyle|line-length|quote-style|indent-style|indent_size|indent_style|max_line_length'\ncutoff=$(( $(date +%s) - {{BLAME_DAYS}} * 86400 ))\nlate=0\nwhile read -r sha committed; do\n grep -qx \"$sha\" .git-blame-ignore-revs 2>/dev/null && continue\n if [ \"$committed\" -lt \"$cutoff\" ]; then\n echo \"::error::$sha changed a formatter's settings or version and is not in .git-blame-ignore-revs\"; late=1\n else\n echo \"::warning::$sha changed a formatter's settings or version; list it in .git-blame-ignore-revs\"\n fi\ndone < <(git log --format='%H %ct' -G \"$SETTINGS\" HEAD -- package.json pyproject.toml .prettierrc.json .prettierrc.yaml biome.json .editorconfig)\nexit $late\n```"
751
+ "description": "A daily job on main lists every commit whose diff changes a formatter version or a formatting setting in package.json, pyproject.toml, the formatter configuration or .editorconfig, and looks for its full SHA in .git-blame-ignore-revs. Listing a version bump that reformatted nothing is harmless: blame skips only the lines that commit changed. Each developer runs git config blame.ignoreRevsFile .git-blame-ignore-revs once (or the repository's setup script does); GitHub reads the file by itself.\n\nThreshold: 0 commits older than {{BLAME_DAYS}} days that changed a formatter's settings or version and are missing from .git-blame-ignore-revs; younger ones are reported as warnings\n\nTool: git log -G in a scheduled GitHub Actions job (actions/checkout with fetch-depth: 0)\n\n```bash\n#!/usr/bin/env bash\n# run daily on main by .github/workflows/blame-ignore.yml (actions/checkout with fetch-depth: 0)\nset -euo pipefail\n# changed lines that mean \"a formatter's settings or version changed\"\nSETTINGS='\"(prettier|@biomejs/biome)\": \"|ruff==|black==|printWidth|tabWidth|useTabs|lineWidth|indentWidth|indentStyle|line-length|quote-style|indent-style|indent_size|indent_style|max_line_length'\ncutoff=$(( $(date +%s) - {{BLAME_DAYS}} * 86400 ))\nlate=0\nwhile read -r sha committed; do\n grep -qx \"$sha\" .git-blame-ignore-revs 2>/dev/null && continue\n if [ \"$committed\" -lt \"$cutoff\" ]; then\n echo \"::error::$sha changed a formatter's settings or version and is not in .git-blame-ignore-revs\"; late=1\n else\n echo \"::warning::$sha changed a formatter's settings or version; list it in .git-blame-ignore-revs\"\n fi\ndone < <(git log --format='%H %ct' -G \"$SETTINGS\" HEAD -- package.json pyproject.toml .prettierrc.json .prettierrc.yaml biome.json .editorconfig)\nexit $late\n```",
752
+ "hubWhen": {
753
+ "EDITOR": [
754
+ "shared",
755
+ "editorconfig"
756
+ ]
757
+ }
638
758
  },
639
759
  {
640
760
  "id": "ff-editorconfig",
@@ -647,7 +767,13 @@
647
767
  "cadence": "triggered",
648
768
  "trigger": "pull-request",
649
769
  "invocation": "automated",
650
- "description": "The root .editorconfig carries what every editor and every file must agree on; editorconfig-checker runs over the tracked files on every pull request and fails on any file that breaks it, which covers the files no formatter touches. Its line-length check is off, because the formatters decide where lines break and leave long strings and URLs whole.\n\nThreshold: 0 tracked text files that break the root .editorconfig (charset, line endings, final newline, trailing whitespace, indentation); line length is left to the formatters\n\nTool: editorconfig-checker (npm package editorconfig-checker, or its Docker image) in a CI step\n\n```ini\n# .editorconfig, at the repository root\nroot = true\n\n[*]\ncharset = utf-8\nend_of_line = lf\ninsert_final_newline = true\ntrim_trailing_whitespace = true\nindent_style = space\nindent_size = 2\nmax_line_length = {{LINE_WIDTH}}\n\n[*.py]\nindent_size = 4\n\n[{*.go,Makefile}]\nindent_style = tab\n\n[*.md]\ntrim_trailing_whitespace = false\n\n# CI step: npx --yes editorconfig-checker@7.0.0 -format github-actions -disable-max-line-length\n```"
770
+ "description": "The root .editorconfig carries what every editor and every file must agree on; editorconfig-checker runs over the tracked files on every pull request and fails on any file that breaks it, which covers the files no formatter touches. Its line-length check is off, because the formatters decide where lines break and leave long strings and URLs whole.\n\nThreshold: 0 tracked text files that break the root .editorconfig (charset, line endings, final newline, trailing whitespace, indentation); line length is left to the formatters\n\nTool: editorconfig-checker (npm package editorconfig-checker, or its Docker image) in a CI step\n\n```ini\n# .editorconfig, at the repository root\nroot = true\n\n[*]\ncharset = utf-8\nend_of_line = lf\ninsert_final_newline = true\ntrim_trailing_whitespace = true\nindent_style = space\nindent_size = 2\nmax_line_length = {{LINE_WIDTH}}\n\n[*.py]\nindent_size = 4\n\n[{*.go,Makefile}]\nindent_style = tab\n\n[*.md]\ntrim_trailing_whitespace = false\n\n# CI step: npx --yes editorconfig-checker@7.0.0 -format github-actions -disable-max-line-length\n```",
771
+ "hubWhen": {
772
+ "EDITOR": [
773
+ "shared",
774
+ "editorconfig"
775
+ ]
776
+ }
651
777
  },
652
778
  {
653
779
  "id": "ff-editorconfig-consistent",
@@ -660,7 +786,13 @@
660
786
  "cadence": "triggered",
661
787
  "trigger": "pull-request",
662
788
  "invocation": "automated",
663
- "description": "A script reads .editorconfig (with a section added for its preamble, so Python's configparser accepts it), checks the [*] section, refuses Prettier settings that .editorconfig already carries (Prettier reads them from it, so a second value could only disagree), and compares Ruff's line-length, which does not read .editorconfig, with the width set for Python files. For ktlint and dotnet format nothing needs comparing: they read their settings from .editorconfig itself.\n\nThreshold: .editorconfig has root = true and its [*] section sets charset utf-8, end_of_line lf, insert_final_newline, trim_trailing_whitespace and max_line_length {{LINE_WIDTH}}; .prettierrc.json sets none of printWidth, tabWidth, useTabs, endOfLine; Ruff's line-length equals the .editorconfig width for Python\n\nTool: Python 3.11 or later (configparser, tomllib) in a CI step\n\n```python\n# scripts/check_editorconfig.py (CI: python3 scripts/check_editorconfig.py): .editorconfig and the formatters agree\nimport configparser, json, pathlib, sys, tomllib\n\nec = configparser.ConfigParser(interpolation=None)\nec.read_string(\"[preamble]\\n\" + pathlib.Path(\".editorconfig\").read_text())\nstar = ec[\"*\"] if ec.has_section(\"*\") else {}\nproblems = [] if ec.get(\"preamble\", \"root\", fallback=\"\") == \"true\" else [\".editorconfig: no root = true before the first section\"]\nfor key, value in {\"charset\": \"utf-8\", \"end_of_line\": \"lf\", \"insert_final_newline\": \"true\", \"trim_trailing_whitespace\": \"true\", \"max_line_length\": \"{{LINE_WIDTH}}\"}.items():\n if star.get(key) != value:\n problems.append(f\".editorconfig [*]: {key} is {star.get(key)}, should be {value}\")\nprettier = pathlib.Path(\".prettierrc.json\")\nfor key in json.loads(prettier.read_text()) if prettier.exists() else []:\n if key in (\"printWidth\", \"tabWidth\", \"useTabs\", \"endOfLine\"):\n problems.append(f\".prettierrc.json sets {key}; set it once in .editorconfig, which Prettier reads\")\npyproject = pathlib.Path(\"pyproject.toml\")\nruff = tomllib.loads(pyproject.read_text()).get(\"tool\", {}).get(\"ruff\", {}) if pyproject.exists() else {}\npy_width = ec.get(\"*.py\", \"max_line_length\", fallback=star.get(\"max_line_length\"))\nif ruff and str(ruff.get(\"line-length\", 88)) != py_width:\n problems.append(f\"pyproject.toml [tool.ruff] line-length is {ruff.get('line-length', 88)}, .editorconfig says {py_width} for *.py\")\nprint(\"\\n\".join(problems) or \".editorconfig agrees with the formatters\")\nsys.exit(1 if problems else 0)\n```"
789
+ "description": "A script reads .editorconfig (with a section added for its preamble, so Python's configparser accepts it), checks the [*] section, refuses Prettier settings that .editorconfig already carries (Prettier reads them from it, so a second value could only disagree), and compares Ruff's line-length, which does not read .editorconfig, with the width set for Python files. For ktlint and dotnet format nothing needs comparing: they read their settings from .editorconfig itself.\n\nThreshold: .editorconfig has root = true and its [*] section sets charset utf-8, end_of_line lf, insert_final_newline, trim_trailing_whitespace and max_line_length {{LINE_WIDTH}}; .prettierrc.json sets none of printWidth, tabWidth, useTabs, endOfLine; Ruff's line-length equals the .editorconfig width for Python\n\nTool: Python 3.11 or later (configparser, tomllib) in a CI step\n\n```python\n# scripts/check_editorconfig.py (CI: python3 scripts/check_editorconfig.py): .editorconfig and the formatters agree\nimport configparser, json, pathlib, sys, tomllib\n\nec = configparser.ConfigParser(interpolation=None)\nec.read_string(\"[preamble]\\n\" + pathlib.Path(\".editorconfig\").read_text())\nstar = ec[\"*\"] if ec.has_section(\"*\") else {}\nproblems = [] if ec.get(\"preamble\", \"root\", fallback=\"\") == \"true\" else [\".editorconfig: no root = true before the first section\"]\nfor key, value in {\"charset\": \"utf-8\", \"end_of_line\": \"lf\", \"insert_final_newline\": \"true\", \"trim_trailing_whitespace\": \"true\", \"max_line_length\": \"{{LINE_WIDTH}}\"}.items():\n if star.get(key) != value:\n problems.append(f\".editorconfig [*]: {key} is {star.get(key)}, should be {value}\")\nprettier = pathlib.Path(\".prettierrc.json\")\nfor key in json.loads(prettier.read_text()) if prettier.exists() else []:\n if key in (\"printWidth\", \"tabWidth\", \"useTabs\", \"endOfLine\"):\n problems.append(f\".prettierrc.json sets {key}; set it once in .editorconfig, which Prettier reads\")\npyproject = pathlib.Path(\"pyproject.toml\")\nruff = tomllib.loads(pyproject.read_text()).get(\"tool\", {}).get(\"ruff\", {}) if pyproject.exists() else {}\npy_width = ec.get(\"*.py\", \"max_line_length\", fallback=star.get(\"max_line_length\"))\nif ruff and str(ruff.get(\"line-length\", 88)) != py_width:\n problems.append(f\"pyproject.toml [tool.ruff] line-length is {ruff.get('line-length', 88)}, .editorconfig says {py_width} for *.py\")\nprint(\"\\n\".join(problems) or \".editorconfig agrees with the formatters\")\nsys.exit(1 if problems else 0)\n```",
790
+ "hubWhen": {
791
+ "EDITOR": [
792
+ "shared",
793
+ "editorconfig"
794
+ ]
795
+ }
664
796
  },
665
797
  {
666
798
  "id": "ff-minimal-config",
@@ -23,7 +23,84 @@
23
23
  "trigger": "LIST RELATIONS WHERE source.external != true AND target.external != true AND (source.type = \"container\" OR source.type = \"webapp\" OR source.type = \"component\") AND (target.type = \"container\" OR target.type = \"component\" OR target.type = \"queue\")",
24
24
  "applyTo": "source",
25
25
  "why": "these parts of the system call or message other parts of it, so how they talk, and how they fail together, has to be decided.",
26
- "group": "architecture"
26
+ "group": "architecture",
27
+ "scope": {
28
+ "group": "architecture",
29
+ "questions": [
30
+ {
31
+ "key": "TEAMS",
32
+ "label": "How many teams build it?",
33
+ "default": "one",
34
+ "hint": "Several teams need the system cut into parts each can own and change alone.",
35
+ "options": [
36
+ {
37
+ "value": "one",
38
+ "label": "one team or fewer",
39
+ "description": "One person or one team builds all of it."
40
+ },
41
+ {
42
+ "value": "several",
43
+ "label": "several teams",
44
+ "description": "Several teams each own parts of it."
45
+ }
46
+ ]
47
+ },
48
+ {
49
+ "key": "SCALE",
50
+ "label": "How large is it?",
51
+ "default": "small",
52
+ "hint": "Caches, queues and split services pay for themselves only at some scale.",
53
+ "options": [
54
+ {
55
+ "value": "small",
56
+ "label": "small",
57
+ "description": "One site or one team's users; up to some thousands of users or requests a day."
58
+ },
59
+ {
60
+ "value": "medium",
61
+ "label": "medium",
62
+ "description": "Several sites or a region; tens of thousands of users a day, or peaks it must be sized for."
63
+ },
64
+ {
65
+ "value": "large",
66
+ "label": "large",
67
+ "description": "Hundreds of thousands of users or more, several regions, load that scales out and back."
68
+ }
69
+ ]
70
+ },
71
+ {
72
+ "key": "INTEGRATIONS",
73
+ "label": "How many other systems does it depend on?",
74
+ "default": "few",
75
+ "hint": "Every system it calls can be slow or down; many of them need resilience patterns.",
76
+ "options": [
77
+ {
78
+ "value": "few",
79
+ "label": "a few",
80
+ "description": "Up to two or three external systems (a payment provider, an e-mail service)."
81
+ },
82
+ {
83
+ "value": "many",
84
+ "label": "many",
85
+ "description": "Many external or internal systems it calls or exchanges data with."
86
+ }
87
+ ]
88
+ }
89
+ ],
90
+ "when": [
91
+ {
92
+ "SCALE": [
93
+ "medium",
94
+ "large"
95
+ ]
96
+ },
97
+ {
98
+ "TEAMS": [
99
+ "several"
100
+ ]
101
+ }
102
+ ]
103
+ }
27
104
  },
28
105
  "sources": [
29
106
  {
@@ -142,7 +219,12 @@
142
219
  "label": "no flow spans parts",
143
220
  "description": "Every business operation completes inside one part and one local transaction; boundaries are drawn so that this holds. Pick it for a monolith or modular monolith, or services cut so that no operation needs two of them."
144
221
  }
145
- ]
222
+ ],
223
+ "scopeWhen": {
224
+ "TEAMS": [
225
+ "several"
226
+ ]
227
+ }
146
228
  },
147
229
  {
148
230
  "key": "CONTRACTS",
@@ -161,7 +243,12 @@
161
243
  "label": "consumer-driven contract tests",
162
244
  "description": "Each consumer records the calls and messages it relies on as pacts; every provider build verifies them, and can-i-deploy blocks a release that breaks one. Pick it when the consuming parts are known teams who run Pact in their builds."
163
245
  }
164
- ]
246
+ ],
247
+ "scopeWhen": {
248
+ "TEAMS": [
249
+ "several"
250
+ ]
251
+ }
165
252
  },
166
253
  {
167
254
  "key": "MAX_DEPTH",
@@ -623,7 +710,7 @@
623
710
  "status": "accepted",
624
711
  "date": "",
625
712
  "context": "The system's own parts (services, modules, front ends and back ends) have to ask each other for data and to get things done. How they do it decides how they fail together. The forces: a synchronous call ties the caller to the callee being up and fast at that moment (temporal coupling), and a chain of them multiplies latency and the odds that one link is down; asynchronous messages decouple in time but make the result arrive later and the flow harder to follow; events let parts react without the publisher knowing them, until nobody can tell what happens after an order is placed; a flow across parts needs either a coordinator that knows every step or a chain of reactions nobody owns; and parts are released apart, so every interaction is a contract that must not break. Delivery guarantees of a queue are the Messaging pack, calls to systems outside are Integration resilience, and contracts with callers outside the system are the API evolution pack.",
626
- "decision": "Parts talk by synchronous request and response by default: {{SYNC_API}}, with clients generated from the contracts. Every call carries the remaining deadline of the user's request (gRPC deadlines, or the X-Request-Deadline header the server honours, as an absolute Unix epoch in milliseconds); a user request spends at most {{CALL_BUDGET_MS}} ms in calls between parts and a chain is at most {{MAX_DEPTH}} calls deep. A command over a queue or an event is used instead, recorded as an exception, when the caller does not need the result to answer, the work takes longer than the budget, several parts react, or the callee may be down longer than the caller can wait. Flows across parts are orchestrated or stay local, as the flows decision records; choreography needs published events, so with this default it falls back to the orchestrator. Contract checks: {{CONTRACTS}}.",
713
+ "decision": "Parts talk by synchronous request and response by default: {{SYNC_API}}, with clients generated from the contracts. Every call carries the remaining deadline of the user's request (gRPC deadlines, or the X-Request-Deadline header the server honours, as an absolute Unix epoch in milliseconds); a user request spends at most {{CALL_BUDGET_MS}} ms in calls between parts and a chain is at most {{MAX_DEPTH}} calls deep. A command over a queue or an event is used instead, recorded as an exception, when the caller does not need the result to answer, the work takes longer than the budget, several parts react, or the callee may be down longer than the caller can wait. Flows across parts are orchestrated or stay local, as the flows decision records; choreography needs published events, so with this default it falls back to the orchestrator. ",
627
714
  "consequences": "• Simplest to write, follow and debug: one request, one trace, an answer or an error.\n• The caller is only as available as everything it calls: availabilities multiply along a chain, hence the depth limit.\n• Overload spreads upstream unless deadlines and load shedding stop it.\n• Work that takes long or must survive a callee being down needs the recorded exceptions.",
628
715
  "alternatives": "1. Commands over queues: callers do not wait, at the cost of answering later.\n2. Published events: no temporal coupling, at the cost of copies and eventual consistency.\n3. A service mesh to add retries and timeouts: helps, but does not remove the coupling of waiting.",
629
716
  "hubWhen": {
@@ -642,7 +729,7 @@
642
729
  "status": "accepted",
643
730
  "date": "",
644
731
  "context": "The system's own parts (services, modules, front ends and back ends) have to ask each other for data and to get things done. How they do it decides how they fail together. The forces: a synchronous call ties the caller to the callee being up and fast at that moment (temporal coupling), and a chain of them multiplies latency and the odds that one link is down; asynchronous messages decouple in time but make the result arrive later and the flow harder to follow; events let parts react without the publisher knowing them, until nobody can tell what happens after an order is placed; a flow across parts needs either a coordinator that knows every step or a chain of reactions nobody owns; and parts are released apart, so every interaction is a contract that must not break. Delivery guarantees of a queue are the Messaging pack, calls to systems outside are Integration resilience, and contracts with callers outside the system are the API evolution pack.",
645
- "decision": "A part that needs another to do something sends a command to that part's own queue (RabbitMQ or Azure Service Bus queues, Amazon SQS; one owning part per queue) and answers its own caller with the command's id; the receiver replies with an outcome message the sender correlates by id, within {{PROPAGATION_SECONDS}} seconds at the 99th percentile while it is up. Queries that need an answer now stay synchronous ({{SYNC_API}}), at most {{MAX_DEPTH}} calls deep, each carrying the remaining deadline and spending at most {{CALL_BUDGET_MS}} ms per user request. Messages are described in AsyncAPI; delivery guarantees, deduplication and dead-lettering follow the Messaging pack. Flows across parts are orchestrated or stay local, as the flows decision records; choreography needs published events, so with this default it falls back to the orchestrator. Contract checks: {{CONTRACTS}}.",
732
+ "decision": "A part that needs another to do something sends a command to that part's own queue (RabbitMQ or Azure Service Bus queues, Amazon SQS; one owning part per queue) and answers its own caller with the command's id; the receiver replies with an outcome message the sender correlates by id, within {{PROPAGATION_SECONDS}} seconds at the 99th percentile while it is up. Queries that need an answer now stay synchronous ({{SYNC_API}}), at most {{MAX_DEPTH}} calls deep, each carrying the remaining deadline and spending at most {{CALL_BUDGET_MS}} ms per user request. Messages are described in AsyncAPI; delivery guarantees, deduplication and dead-lettering follow the Messaging pack. Flows across parts are orchestrated or stay local, as the flows decision records; choreography needs published events, so with this default it falls back to the orchestrator. ",
646
733
  "consequences": "• Senders keep working while a receiver is busy or down; bursts wait in the queue.\n• Users see an accepted state and the outcome later, so screens and APIs must show pending work.\n• Each queue has one owner, so who executes a command is never in doubt.\n• Following a request means following a correlation id across messages.",
647
734
  "alternatives": "1. Synchronous calls: immediate answers, coupled availability.\n2. Published events: receivers decide what to do, no one is told to do anything.\n3. A shared job table polled by workers: no broker, but a database used as a queue.",
648
735
  "hubWhen": {
@@ -661,7 +748,7 @@
661
748
  "status": "accepted",
662
749
  "date": "",
663
750
  "context": "The system's own parts (services, modules, front ends and back ends) have to ask each other for data and to get things done. How they do it decides how they fail together. The forces: a synchronous call ties the caller to the callee being up and fast at that moment (temporal coupling), and a chain of them multiplies latency and the odds that one link is down; asynchronous messages decouple in time but make the result arrive later and the flow harder to follow; events let parts react without the publisher knowing them, until nobody can tell what happens after an order is placed; a flow across parts needs either a coordinator that knows every step or a chain of reactions nobody owns; and parts are released apart, so every interaction is a contract that must not break. Delivery guarantees of a queue are the Messaging pack, calls to systems outside are Integration resilience, and contracts with callers outside the system are the API evolution pack.",
664
- "decision": "Each part publishes events about its own committed changes (through an outbox, as the Data consistency pack decides; as CloudEvents described in AsyncAPI) carrying the state its subscribers need; subscribers keep their own copies and answer user requests from them. Events go through a publish-subscribe broker: Apache Kafka for many subscribers and replay, Amazon SNS with SQS or Google Pub/Sub on those clouds, Azure Service Bus topics on Azure. Copies are updated within {{PROPAGATION_SECONDS}} seconds at the 99th percentile. A command to one specific part goes to that part's queue; a synchronous call between back-end parts ({{SYNC_API}}, at most {{MAX_DEPTH}} deep, carrying the remaining deadline, at most {{CALL_BUDGET_MS}} ms per user request) is a recorded exception for an answer only its owner can give now, such as a payment authorisation; the front end calling its back end is no exception. Flows across parts: {{FLOWS}}. Contract checks: {{CONTRACTS}}.",
751
+ "decision": "Each part publishes events about its own committed changes (through an outbox, as the Data consistency pack decides; as CloudEvents described in AsyncAPI) carrying the state its subscribers need; subscribers keep their own copies and answer user requests from them. Events go through a publish-subscribe broker: Apache Kafka for many subscribers and replay, Amazon SNS with SQS or Google Pub/Sub on those clouds, Azure Service Bus topics on Azure. Copies are updated within {{PROPAGATION_SECONDS}} seconds at the 99th percentile. A command to one specific part goes to that part's queue; a synchronous call between back-end parts ({{SYNC_API}}, at most {{MAX_DEPTH}} deep, carrying the remaining deadline, at most {{CALL_BUDGET_MS}} ms per user request) is a recorded exception for an answer only its owner can give now, such as a payment authorisation; the front end calling its back end is no exception. ",
665
752
  "consequences": "• A part keeps answering while the parts it depends on are down: no temporal coupling on the user path.\n• Data is copied and eventually consistent; screens and rules must tolerate {{PROPAGATION_SECONDS}} seconds of lag.\n• Publishers do not know their subscribers; what happens after an event is visible only in the contracts and traces.\n• Event schemas become long-lived contracts that need versioning.",
666
753
  "alternatives": "1. Synchronous calls: simpler, coupled availability.\n2. Commands over queues: the sender decides what happens, coupling it to the receivers.\n3. Event notification without state (subscribers call back for data): smaller events, but the temporal coupling returns.",
667
754
  "hubWhen": {
@@ -680,7 +767,7 @@
680
767
  "status": "accepted",
681
768
  "date": "",
682
769
  "context": "The system's own parts (services, modules, front ends and back ends) have to ask each other for data and to get things done. How they do it decides how they fail together. The forces: a synchronous call ties the caller to the callee being up and fast at that moment (temporal coupling), and a chain of them multiplies latency and the odds that one link is down; asynchronous messages decouple in time but make the result arrive later and the flow harder to follow; events let parts react without the publisher knowing them, until nobody can tell what happens after an order is placed; a flow across parts needs either a coordinator that knows every step or a chain of reactions nobody owns; and parts are released apart, so every interaction is a contract that must not break. Delivery guarantees of a queue are the Messaging pack, calls to systems outside are Integration resilience, and contracts with callers outside the system are the API evolution pack.",
683
- "decision": "Parts write their events to a durable, partitioned log: Apache Kafka on Kubernetes with Strimzi, whose topics are KafkaTopic manifests (a managed Kafka such as Confluent Cloud, Amazon MSK or Redpanda Cloud declares its topics in Terraform and checks the same retention there). Topics are keyed by entity so that order holds per entity, retained for at least {{RETENTION_DAYS}} days, with topics holding current state compacted. Consumers read at their own pace, keep their own views (Kafka Streams, Apache Flink or plain consumers) and can rebuild them by replaying from the start; events reach every consumer within {{PROPAGATION_SECONDS}} seconds at the 99th percentile. Synchronous calls between back-end parts ({{SYNC_API}}, at most {{MAX_DEPTH}} deep, carrying the remaining deadline, at most {{CALL_BUDGET_MS}} ms per user request) are recorded exceptions; the front end calling its back end is no exception. Flows across parts: {{FLOWS}}. Contract checks: {{CONTRACTS}}.",
770
+ "decision": "Parts write their events to a durable, partitioned log: Apache Kafka on Kubernetes with Strimzi, whose topics are KafkaTopic manifests (a managed Kafka such as Confluent Cloud, Amazon MSK or Redpanda Cloud declares its topics in Terraform and checks the same retention there). Topics are keyed by entity so that order holds per entity, retained for at least {{RETENTION_DAYS}} days, with topics holding current state compacted. Consumers read at their own pace, keep their own views (Kafka Streams, Apache Flink or plain consumers) and can rebuild them by replaying from the start; events reach every consumer within {{PROPAGATION_SECONDS}} seconds at the 99th percentile. Synchronous calls between back-end parts ({{SYNC_API}}, at most {{MAX_DEPTH}} deep, carrying the remaining deadline, at most {{CALL_BUDGET_MS}} ms per user request) are recorded exceptions; the front end calling its back end is no exception. ",
684
771
  "consequences": "• New consumers and new views are added without asking producers, by replaying history.\n• High throughput, with order per key and parallelism per partition.\n• A cluster to run (or pay for) and partitions to size; consumer lag becomes a key metric.\n• Events in the log live for days or forever, so their schemas must stay readable for that long.",
685
772
  "alternatives": "1. Published events through a pub/sub broker without replay: simpler, but views cannot be rebuilt from history.\n2. Commands over queues: work distribution, not a history.\n3. Change data capture from each database: no code to publish, but internal tables become the contract.",
686
773
  "hubWhen": {
@@ -17,7 +17,83 @@
17
17
  "id": "data-classification",
18
18
  "trigger": "LIST NODES WHERE (type = \"database\" OR type = \"queue\") AND external != true",
19
19
  "why": "these elements keep data, so which classification level it carries, who sets it and where data of each level may go 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
  {