@radicaltools/mcp 0.6.0 → 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-5N36X7LP.js → chunk-DQYB4GAU.js} +13 -6
  3. package/dist/{chunk-COZU3R23.js → chunk-U5QA6HBS.js} +1 -1
  4. package/dist/{dist-4A76JBX4.js → dist-MPDDP2CV.js} +2 -2
  5. package/dist/{elkLayout-EA73VLB2.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 +1937 -1123
  65. package/dist/{pdfjs-MDC5AZDP.js → pdfjs-PK44HJZP.js} +1 -1
  66. package/package.json +1 -1
@@ -18,7 +18,64 @@
18
18
  "id": "dependency-hygiene",
19
19
  "trigger": "LIST NODES WHERE (type = \"container\" OR type = \"webapp\") AND external != true",
20
20
  "why": "these elements are built from third-party packages that keep moving, so how updates arrive, how versions are locked and what happens to unused, abandoned or wrongly licensed dependencies has to be decided; one decision usually covers a whole repository and is bound to every element built from it.",
21
- "group": "coding"
21
+ "group": "coding",
22
+ "scope": {
23
+ "group": "coding",
24
+ "questions": [
25
+ {
26
+ "key": "TEAM",
27
+ "label": "Who writes the code?",
28
+ "default": "small",
29
+ "hint": "Code others must read and change needs written conventions and documentation.",
30
+ "options": [
31
+ {
32
+ "value": "small",
33
+ "label": "one or two people",
34
+ "description": "One or two developers who know all of it."
35
+ },
36
+ {
37
+ "value": "team",
38
+ "label": "a team",
39
+ "description": "A team of its own, with people joining and leaving."
40
+ },
41
+ {
42
+ "value": "teams",
43
+ "label": "several teams",
44
+ "description": "Several teams working in the same codebase or in parts of it."
45
+ }
46
+ ]
47
+ },
48
+ {
49
+ "key": "LIFETIME",
50
+ "label": "How long must the code live?",
51
+ "default": "years",
52
+ "hint": "A prototype thrown away soon needs little; code kept for years needs its debt paid down.",
53
+ "options": [
54
+ {
55
+ "value": "short",
56
+ "label": "a prototype or a short-lived tool",
57
+ "description": "A trial, a demo or a tool for a few months, then thrown away."
58
+ },
59
+ {
60
+ "value": "years",
61
+ "label": "years",
62
+ "description": "It will be kept and changed for years."
63
+ }
64
+ ]
65
+ }
66
+ ],
67
+ "when": [
68
+ {
69
+ "TEAM": [
70
+ "team",
71
+ "teams"
72
+ ],
73
+ "LIFETIME": [
74
+ "years"
75
+ ]
76
+ }
77
+ ]
78
+ }
22
79
  },
23
80
  "sources": [
24
81
  {
@@ -136,7 +193,13 @@
136
193
  "label": "a report on a cadence, removed in a review",
137
194
  "description": "A scheduled job publishes the unused-dependency report as an issue on a cadence (every 90 days by default) and the team removes or justifies each entry before the next one. Pick it when the analysis has too many false positives on the codebase (plugins loaded by name, dynamic requires) to be a gate yet."
138
195
  }
139
- ]
196
+ ],
197
+ "scopeWhen": {
198
+ "TEAM": [
199
+ "team",
200
+ "teams"
201
+ ]
202
+ }
140
203
  },
141
204
  {
142
205
  "key": "LICENCES",
@@ -160,7 +223,13 @@
160
223
  "label": "no licence check, for an element that is never distributed",
161
224
  "description": "No licence check; the element is never distributed, published or offered to anyone outside the organisation, which is what makes most licence terms moot, and a check keeps it that way. Pick it only for internal tools, and revisit the moment the element leaves the building."
162
225
  }
163
- ]
226
+ ],
227
+ "scopeWhen": {
228
+ "TEAM": [
229
+ "team",
230
+ "teams"
231
+ ]
232
+ }
164
233
  },
165
234
  {
166
235
  "key": "AGE",
@@ -179,7 +248,13 @@
179
248
  "label": "no freshness measure",
180
249
  "description": "Freshness is not measured; updates arrive as the update process delivers them, and nothing fails when the element falls behind. Pick it for a frozen codebase that is only patched, and say so in the decision."
181
250
  }
182
- ]
251
+ ],
252
+ "scopeWhen": {
253
+ "TEAM": [
254
+ "team",
255
+ "teams"
256
+ ]
257
+ }
183
258
  },
184
259
  {
185
260
  "key": "MANUAL_CADENCE_DAYS",
@@ -331,6 +406,10 @@
331
406
  "hubWhen": {
332
407
  "PINNING": [
333
408
  "exact"
409
+ ],
410
+ "AGE": [
411
+ "max-age",
412
+ "none"
334
413
  ]
335
414
  }
336
415
  },
@@ -346,6 +425,10 @@
346
425
  "hubWhen": {
347
426
  "PINNING": [
348
427
  "floating"
428
+ ],
429
+ "AGE": [
430
+ "max-age",
431
+ "none"
349
432
  ]
350
433
  }
351
434
  },
@@ -390,7 +473,13 @@
390
473
  "ears_type": "state-driven",
391
474
  "precondition": "a direct dependency is marked deprecated on its registry, or its latest version was released more than 24 months ago",
392
475
  "action": "fail the daily check naming it until it is replaced, forked or removed within {{REPLACE_DAYS}} days, or listed with an issue in dependency-exceptions.json",
393
- "rationale": "A package nobody maintains gets no fix when the next vulnerability or runtime version arrives; finding out then is too late (OpenSSF Scorecard, Maintained check; Cox et al., Measuring Dependency Freshness)."
476
+ "rationale": "A package nobody maintains gets no fix when the next vulnerability or runtime version arrives; finding out then is too late (OpenSSF Scorecard, Maintained check; Cox et al., Measuring Dependency Freshness).",
477
+ "hubWhen": {
478
+ "AGE": [
479
+ "max-age",
480
+ "none"
481
+ ]
482
+ }
394
483
  },
395
484
  {
396
485
  "id": "req-licence-allowlist",
@@ -537,6 +626,10 @@
537
626
  "hubWhen": {
538
627
  "PINNING": [
539
628
  "exact"
629
+ ],
630
+ "AGE": [
631
+ "max-age",
632
+ "none"
540
633
  ]
541
634
  }
542
635
  },
@@ -552,6 +645,10 @@
552
645
  "hubWhen": {
553
646
  "PINNING": [
554
647
  "floating"
648
+ ],
649
+ "AGE": [
650
+ "max-age",
651
+ "none"
555
652
  ]
556
653
  }
557
654
  },
@@ -593,7 +690,13 @@
593
690
  "y": 1170,
594
691
  "given": "a direct dependency whose maintainer marks it deprecated",
595
692
  "when": "the daily check runs",
596
- "then": "it fails naming the package, and within {{REPLACE_DAYS}} days the package is no longer a dependency or dependency-exceptions.json names it with its issue"
693
+ "then": "it fails naming the package, and within {{REPLACE_DAYS}} days the package is no longer a dependency or dependency-exceptions.json names it with its issue",
694
+ "hubWhen": {
695
+ "AGE": [
696
+ "max-age",
697
+ "none"
698
+ ]
699
+ }
597
700
  },
598
701
  {
599
702
  "id": "sc-licence-allowlist",
@@ -665,7 +768,7 @@
665
768
  "status": "accepted",
666
769
  "date": "",
667
770
  "context": "This element is built from third-party packages that keep moving whether or not we follow. The forces: a dependency left alone for a year is upgraded in one painful jump, with every breaking change at once, while small frequent updates each cost minutes; a bot that merges on its own needs tests worth trusting, and one that only opens pull requests buries the team under them; a manifest with ranges and no lockfile builds something different each week, while exact pins turn every update into a commit someone has to make; a package nobody imports any more still gets installed, scanned and patched, and one whose maintainer left stops getting fixes without telling anyone; and a licence that forbids what we do with the code is found at the worst time, in due diligence. Vulnerability scanning and the deadlines to fix a vulnerable dependency, integrity hashes, where packages are fetched from, SBOMs and build provenance are decided by the Software supply chain concern; this one decides how the dependencies are kept current, pinned, used and licensed, and the Backend stack and Frontend stack packs refer here for updates and pinning. The snippets assume an npm project with package.json and package-lock.json at the root (one per workspace in a monorepo), the GitHub CLI, and dependency-exceptions.json at the root for recorded exceptions; each names the equivalent for Python, Go, the JVM and .NET.",
668
- "decision": "Renovate (the Mend-hosted GitHub app, or the self-hosted runner) opens one pull request per dependency update from renovate.json in the repository, labelled dependencies. Patch and minor updates of packages at 1.0.0 or above merge automatically once the required checks pass and the release has been public for 3 days (minimumReleaseAge); major updates and updates of 0.x packages get a label and wait for a reviewer. Lockfile maintenance runs weekly. Pinning: {{PINNING}}. Unused dependencies: {{UNUSED}}. Licences: {{LICENCES}}. Freshness: {{AGE}}. Deprecated or dormant dependencies (no release for 24 months) are replaced, forked or removed within {{REPLACE_DAYS}} days. Renovate over Dependabot here because Dependabot cannot merge on its own (its cooldown covers the release age, not the merge).",
771
+ "decision": "Renovate (the Mend-hosted GitHub app, or the self-hosted runner) opens one pull request per dependency update from renovate.json in the repository, labelled dependencies. Patch and minor updates of packages at 1.0.0 or above merge automatically once the required checks pass and the release has been public for 3 days (minimumReleaseAge); major updates and updates of 0.x packages get a label and wait for a reviewer. Lockfile maintenance runs weekly. Pinning: {{PINNING}}. Deprecated or dormant dependencies (no release for 24 months) are replaced, forked or removed within {{REPLACE_DAYS}} days. Renovate over Dependabot here because Dependabot cannot merge on its own (its cooldown covers the release age, not the merge).",
669
772
  "consequences": "• Most updates land the day after release, in steps small enough that a failing one is easy to read.\n• The build is the only reviewer of a minor update: it has to be one the team would release on (Test strategy concern), or automerge is a way to ship breakage unattended.\n• A package that breaks semantic versioning in a minor release can still get through; the minimum release age and the tests are the defence, and such a package gets a packageRule that turns automerge off.\n• Renovate needs the app installed and permission to merge; the dependency dashboard issue is where paused and rate-limited updates show up.",
670
773
  "alternatives": "1. One weekly grouped pull request a person merges: more control, more drift, one more chore a week.\n2. Dependabot with automerge through a GitHub Actions workflow: works, with the cooldown as the release age, but the merge logic lives in a workflow of our own.\n3. Manual updates from an outdated report: fine for a frozen codebase, a year of drift for a living one.",
671
774
  "hubWhen": {
@@ -684,7 +787,7 @@
684
787
  "status": "accepted",
685
788
  "date": "",
686
789
  "context": "This element is built from third-party packages that keep moving whether or not we follow. The forces: a dependency left alone for a year is upgraded in one painful jump, with every breaking change at once, while small frequent updates each cost minutes; a bot that merges on its own needs tests worth trusting, and one that only opens pull requests buries the team under them; a manifest with ranges and no lockfile builds something different each week, while exact pins turn every update into a commit someone has to make; a package nobody imports any more still gets installed, scanned and patched, and one whose maintainer left stops getting fixes without telling anyone; and a licence that forbids what we do with the code is found at the worst time, in due diligence. Vulnerability scanning and the deadlines to fix a vulnerable dependency, integrity hashes, where packages are fetched from, SBOMs and build provenance are decided by the Software supply chain concern; this one decides how the dependencies are kept current, pinned, used and licensed, and the Backend stack and Frontend stack packs refer here for updates and pinning. The snippets assume an npm project with package.json and package-lock.json at the root (one per workspace in a monorepo), the GitHub CLI, and dependency-exceptions.json at the root for recorded exceptions; each names the equivalent for Python, Go, the JVM and .NET.",
687
- "decision": "An update bot opens one pull request every {{UPDATE_DAY}} with all pending patch and minor updates grouped, and a separate one per major update, labelled dependencies: Dependabot version updates with groups in .github/dependabot.yml on GitHub, or Renovate with a single groupName and a weekly schedule elsewhere. A person reviews the batch, reads the changelogs of anything that touches the public behaviour, and merges or closes it within 7 days; nothing merges without the required checks, and a daily job fails on an update pull request older than 7 days. Pinning: {{PINNING}}. Unused dependencies: {{UNUSED}}. Licences: {{LICENCES}}. Freshness: {{AGE}}. Deprecated or dormant dependencies (no release for 24 months) are replaced, forked or removed within {{REPLACE_DAYS}} days.",
790
+ "decision": "An update bot opens one pull request every {{UPDATE_DAY}} with all pending patch and minor updates grouped, and a separate one per major update, labelled dependencies: Dependabot version updates with groups in .github/dependabot.yml on GitHub, or Renovate with a single groupName and a weekly schedule elsewhere. A person reviews the batch, reads the changelogs of anything that touches the public behaviour, and merges or closes it within 7 days; nothing merges without the required checks, and a daily job fails on an update pull request older than 7 days. Pinning: {{PINNING}}. Deprecated or dormant dependencies (no release for 24 months) are replaced, forked or removed within {{REPLACE_DAYS}} days.",
688
791
  "consequences": "• A week of drift at most, and the team sees what changed.\n• One batch is bisected by hand when it breaks: with many updates in it, finding the culprit takes a while, which is why majors stay separate.\n• The batch needs an owner each week or it goes stale and the next one conflicts with it.\n• Dependabot groups cannot merge on their own; moving to automerge later means moving to Renovate or adding a workflow.",
689
792
  "alternatives": "1. Automerge of patch and minor updates with Renovate: less drift and no weekly chore, but the tests must be trusted.\n2. One pull request per update, unmerged: dozens of open pull requests that nobody reads.\n3. Manual updates from an outdated report: the same drift with more work.",
690
793
  "hubWhen": {
@@ -703,7 +806,7 @@
703
806
  "status": "accepted",
704
807
  "date": "",
705
808
  "context": "This element is built from third-party packages that keep moving whether or not we follow. The forces: a dependency left alone for a year is upgraded in one painful jump, with every breaking change at once, while small frequent updates each cost minutes; a bot that merges on its own needs tests worth trusting, and one that only opens pull requests buries the team under them; a manifest with ranges and no lockfile builds something different each week, while exact pins turn every update into a commit someone has to make; a package nobody imports any more still gets installed, scanned and patched, and one whose maintainer left stops getting fixes without telling anyone; and a licence that forbids what we do with the code is found at the worst time, in due diligence. Vulnerability scanning and the deadlines to fix a vulnerable dependency, integrity hashes, where packages are fetched from, SBOMs and build provenance are decided by the Software supply chain concern; this one decides how the dependencies are kept current, pinned, used and licensed, and the Backend stack and Frontend stack packs refer here for updates and pinning. The snippets assume an npm project with package.json and package-lock.json at the root (one per workspace in a monorepo), the GitHub CLI, and dependency-exceptions.json at the root for recorded exceptions; each names the equivalent for Python, Go, the JVM and .NET.",
706
- "decision": "No bot opens pull requests. A scheduled job runs every {{MANUAL_CADENCE_DAYS}} days, produces the outdated report (npm outdated --json; pip list --outdated --format=json; go list -m -u all; mvn versions:display-dependency-updates; dotnet list package --outdated) and opens an issue with it labelled dependencies; a person updates or explicitly defers every line in one reviewed change, labelled dependencies, before the next report, and the job fails if the previous report's issue is still open. Pinning: {{PINNING}}. Unused dependencies: {{UNUSED}}. Licences: {{LICENCES}}. Freshness: {{AGE}}. Deprecated or dormant dependencies (no release for 24 months) are replaced, forked or removed within {{REPLACE_DAYS}} days. This decision fits a small or frozen codebase; when the element returns to active development it is superseded by a bot.",
809
+ "decision": "No bot opens pull requests. A scheduled job runs every {{MANUAL_CADENCE_DAYS}} days, produces the outdated report (npm outdated --json; pip list --outdated --format=json; go list -m -u all; mvn versions:display-dependency-updates; dotnet list package --outdated) and opens an issue with it labelled dependencies; a person updates or explicitly defers every line in one reviewed change, labelled dependencies, before the next report, and the job fails if the previous report's issue is still open. Pinning: {{PINNING}}. Deprecated or dormant dependencies (no release for 24 months) are replaced, forked or removed within {{REPLACE_DAYS}} days. This decision fits a small or frozen codebase; when the element returns to active development it is superseded by a bot.",
707
810
  "consequences": "• No bot, no app permissions, no stream of pull requests.\n• Up to {{MANUAL_CADENCE_DAYS}} days of drift, and the update is one larger change rather than many small ones.\n• Depends on a person doing the chore; the failing report job is the only thing that notices when they do not.\n• Security fixes in dependencies wait for the cadence unless the Software supply chain concern's deadlines pull them forward.",
708
811
  "alternatives": "1. Renovate with automerge of patch and minor updates: continuous, needs trusted tests.\n2. A weekly grouped bot pull request: the same cadence with the diff prepared for you; preferable wherever a bot may run.",
709
812
  "hubWhen": {
@@ -813,6 +916,10 @@
813
916
  "hubWhen": {
814
917
  "PINNING": [
815
918
  "exact"
919
+ ],
920
+ "AGE": [
921
+ "max-age",
922
+ "none"
816
923
  ]
817
924
  }
818
925
  },
@@ -831,6 +938,10 @@
831
938
  "hubWhen": {
832
939
  "PINNING": [
833
940
  "floating"
941
+ ],
942
+ "AGE": [
943
+ "max-age",
944
+ "none"
834
945
  ]
835
946
  }
836
947
  },
@@ -953,7 +1064,13 @@
953
1064
  "cadence": "triggered",
954
1065
  "trigger": "nightly",
955
1066
  "invocation": "automated",
956
- "description": "A daily job asks the registry about every direct dependency and fails on one that is deprecated or whose latest version (dist-tags.latest, not the metadata's modified date, which moves on any change) was released more than 24 months ago; each hit gets an issue and a deadline of {{REPLACE_DAYS}} days, recorded in dependency-exceptions.json while the replacement is under way. Python: the PyPI JSON API (releases and yanked flags); Go: go list -m -u -json for the latest version's time; .NET: dotnet list package --deprecated.\n\nThreshold: 0 direct dependencies marked deprecated on the registry or whose latest version was released more than 24 months ago, unless listed with an issue in dependency-exceptions.json\n\nTool: npm view with jq (GitHub Actions schedule)\n\n```bash\n#!/usr/bin/env bash\nset -euo pipefail\njq -r '(.dependencies + .devDependencies) | keys[]' package.json | while read -r pkg; do\n npm view \"$pkg\" --json | jq -r --arg pkg \"$pkg\" '\n ((now - (.time[.\"dist-tags\".latest] | sub(\"\\\\.[0-9]+Z$\"; \"Z\") | fromdateiso8601)) / 86400 | floor) as $days # npm writes milliseconds; jq reads none\n | if .deprecated then \"\\($pkg): deprecated: \\(.deprecated)\"\n elif $days > 730 then \"\\($pkg): latest release \\($days) days ago\"\n else empty end'\ndone | grep -v -F -f <(jq -r '.[].package' dependency-exceptions.json) | tee abandoned.txt\ntest ! -s abandoned.txt # each line gets an issue with a {{REPLACE_DAYS}}-day deadline, listed in dependency-exceptions.json meanwhile\n```"
1067
+ "description": "A daily job asks the registry about every direct dependency and fails on one that is deprecated or whose latest version (dist-tags.latest, not the metadata's modified date, which moves on any change) was released more than 24 months ago; each hit gets an issue and a deadline of {{REPLACE_DAYS}} days, recorded in dependency-exceptions.json while the replacement is under way. Python: the PyPI JSON API (releases and yanked flags); Go: go list -m -u -json for the latest version's time; .NET: dotnet list package --deprecated.\n\nThreshold: 0 direct dependencies marked deprecated on the registry or whose latest version was released more than 24 months ago, unless listed with an issue in dependency-exceptions.json\n\nTool: npm view with jq (GitHub Actions schedule)\n\n```bash\n#!/usr/bin/env bash\nset -euo pipefail\njq -r '(.dependencies + .devDependencies) | keys[]' package.json | while read -r pkg; do\n npm view \"$pkg\" --json | jq -r --arg pkg \"$pkg\" '\n ((now - (.time[.\"dist-tags\".latest] | sub(\"\\\\.[0-9]+Z$\"; \"Z\") | fromdateiso8601)) / 86400 | floor) as $days # npm writes milliseconds; jq reads none\n | if .deprecated then \"\\($pkg): deprecated: \\(.deprecated)\"\n elif $days > 730 then \"\\($pkg): latest release \\($days) days ago\"\n else empty end'\ndone | grep -v -F -f <(jq -r '.[].package' dependency-exceptions.json) | tee abandoned.txt\ntest ! -s abandoned.txt # each line gets an issue with a {{REPLACE_DAYS}}-day deadline, listed in dependency-exceptions.json meanwhile\n```",
1068
+ "hubWhen": {
1069
+ "AGE": [
1070
+ "max-age",
1071
+ "none"
1072
+ ]
1073
+ }
957
1074
  }
958
1075
  ],
959
1076
  "relations": [
@@ -19,7 +19,71 @@
19
19
  "id": "deployment",
20
20
  "trigger": "LIST NODES WHERE (type = \"container\" OR type = \"webapp\") AND external != true",
21
21
  "why": "these elements are deployed and changed in production, so how a change rolls out, and how it is taken back, has to be decided.",
22
- "group": "sdlc"
22
+ "group": "sdlc",
23
+ "scope": {
24
+ "group": "sdlc",
25
+ "questions": [
26
+ {
27
+ "key": "USE",
28
+ "label": "What is the software for?",
29
+ "default": "business",
30
+ "hint": "Software for one's own use can be built by hand; an organisation that runs or ships it needs a repeatable way to build, release and deploy.",
31
+ "options": [
32
+ {
33
+ "value": "personal",
34
+ "label": "our own or home use",
35
+ "description": "A hobby project or a tool for oneself or a household; nobody else depends on it."
36
+ },
37
+ {
38
+ "value": "business",
39
+ "label": "a system an organisation runs",
40
+ "description": "A company or public body runs it for its staff or customers (an internal tool, an online shop, a booking system)."
41
+ },
42
+ {
43
+ "value": "product",
44
+ "label": "a product we ship to others",
45
+ "description": "Software sold or handed to customers who install or run it themselves, or offered to many organisations."
46
+ }
47
+ ]
48
+ },
49
+ {
50
+ "key": "TEAM",
51
+ "label": "Who builds it?",
52
+ "default": "small",
53
+ "hint": "Review, a Definition of Done and delivery metrics need more than one or two people.",
54
+ "options": [
55
+ {
56
+ "value": "small",
57
+ "label": "one or two people",
58
+ "description": "One or two developers."
59
+ },
60
+ {
61
+ "value": "team",
62
+ "label": "a team",
63
+ "description": "A team of its own."
64
+ },
65
+ {
66
+ "value": "teams",
67
+ "label": "several teams",
68
+ "description": "Several teams contributing to it."
69
+ }
70
+ ]
71
+ }
72
+ ],
73
+ "when": [
74
+ {
75
+ "USE": [
76
+ "product"
77
+ ]
78
+ },
79
+ {
80
+ "TEAM": [
81
+ "team",
82
+ "teams"
83
+ ]
84
+ }
85
+ ]
86
+ }
23
87
  },
24
88
  "sources": [
25
89
  {
@@ -133,7 +197,13 @@
133
197
  "label": "no flags: a deploy is a release",
134
198
  "description": "What is merged and deployed is live for everyone. Pick it for small teams with fast rollback and features small enough to finish in one change; it avoids the cost of flags and their clean-up."
135
199
  }
136
- ]
200
+ ],
201
+ "scopeWhen": {
202
+ "TEAM": [
203
+ "team",
204
+ "teams"
205
+ ]
206
+ }
137
207
  },
138
208
  {
139
209
  "key": "CADENCE",
@@ -210,7 +280,13 @@
210
280
  "y": 130,
211
281
  "ears_type": "ubiquitous",
212
282
  "action": "leave the load balancer and let its requests in flight finish, for up to 30 seconds, before an instance stops, and receive traffic on a new instance only once its readiness check (decided in the Observability pack) passes, so that a deployment under steady load fails 0 requests",
213
- "rationale": "Requests cut off at shutdown and traffic sent to instances still starting are the errors every deployment causes unless they are designed out (Kubernetes documentation, Pod Lifecycle: termination of pods)."
283
+ "rationale": "Requests cut off at shutdown and traffic sent to instances still starting are the errors every deployment causes unless they are designed out (Kubernetes documentation, Pod Lifecycle: termination of pods).",
284
+ "hubWhen": {
285
+ "FLAGS": [
286
+ "yes",
287
+ "no"
288
+ ]
289
+ }
214
290
  },
215
291
  {
216
292
  "id": "req-rolling",
@@ -385,7 +461,13 @@
385
461
  "y": 130,
386
462
  "given": "steady traffic at the usual rate against staging",
387
463
  "when": "a new version is deployed",
388
- "then": "no request fails because of the deployment"
464
+ "then": "no request fails because of the deployment",
465
+ "hubWhen": {
466
+ "FLAGS": [
467
+ "yes",
468
+ "no"
469
+ ]
470
+ }
389
471
  },
390
472
  {
391
473
  "id": "sc-rolling",
@@ -547,7 +629,7 @@
547
629
  "status": "accepted",
548
630
  "date": "",
549
631
  "context": "This element is changed and deployed while people use it. The forces: most outages start with a change, so how a change reaches production decides much of the availability; a release that cannot be undone quickly turns a small mistake into a long outage; old and new versions run side by side during most deployments and both must work against the same database; a schema change that the previous version cannot read makes rollback impossible; small, frequent changes fail less often and are easier to undo than large, rare ones (DORA); and deploying is not the same as releasing: code can be in production without users seeing it. The snippets of this pack assume the element is deployed to the shop namespace as order-api; rename them for yours.",
550
- "decision": "New versions roll out as a rolling update: on Kubernetes a Deployment with maxUnavailable 0 and maxSurge 1, a preStop delay, a progress deadline of 5 minutes and the readiness probes decided in the Observability pack; on other platforms the equivalent (ECS rolling deployments with the deployment circuit breaker, Azure App Service or Cloud Run revisions). The pipeline watches the error rate during the rollout and runs kubectl rollout undo (or the platform's rollback) when it rises. The previous version's image stays in the registry, so rollback takes {{ROLLBACK_MINUTES}} minutes at most. Schema changes: {{MIGRATIONS}}. Feature flags: {{FLAGS}}. Cadence: {{CADENCE}}.",
632
+ "decision": "New versions roll out as a rolling update: on Kubernetes a Deployment with maxUnavailable 0 and maxSurge 1, a preStop delay, a progress deadline of 5 minutes and the readiness probes decided in the Observability pack; on other platforms the equivalent (ECS rolling deployments with the deployment circuit breaker, Azure App Service or Cloud Run revisions). The pipeline watches the error rate during the rollout and runs kubectl rollout undo (or the platform's rollback) when it rises. The previous version's image stays in the registry, so rollback takes {{ROLLBACK_MINUTES}} minutes at most. Schema changes: {{MIGRATIONS}}. Cadence: {{CADENCE}}.",
551
633
  "consequences": "• Nothing to install beyond the platform; the cheapest strategy.\n• Old and new versions serve together for minutes: both must work with the same schema and messages.\n• A bad version reaches a growing share of users until someone or something notices.\n• Rollback is another rolling update, minutes rather than seconds.",
552
634
  "alternatives": "1. Canary with automatic analysis: limits a bad version to 5 % of traffic, but needs Argo Rollouts or Flagger and metrics per version.\n2. Blue-green: instant switch back, at double capacity during each release.",
553
635
  "hubWhen": {
@@ -566,7 +648,7 @@
566
648
  "status": "accepted",
567
649
  "date": "",
568
650
  "context": "This element is changed and deployed while people use it. The forces: most outages start with a change, so how a change reaches production decides much of the availability; a release that cannot be undone quickly turns a small mistake into a long outage; old and new versions run side by side during most deployments and both must work against the same database; a schema change that the previous version cannot read makes rollback impossible; small, frequent changes fail less often and are easier to undo than large, rare ones (DORA); and deploying is not the same as releasing: code can be in production without users seeing it. The snippets of this pack assume the element is deployed to the shop namespace as order-api; rename them for yours.",
569
- "decision": "New versions deploy beside the live one and take traffic all at once after their smoke tests pass: on Kubernetes with Argo Rollouts (blueGreen strategy with pre-promotion analysis), elsewhere with AWS CodeDeploy blue/green, Azure App Service deployment slots or two target groups behind the load balancer. The previous version keeps running for 60 minutes after the switch, so switching back takes seconds and always within {{ROLLBACK_MINUTES}} minutes. Schema changes: {{MIGRATIONS}}. Feature flags: {{FLAGS}}. Cadence: {{CADENCE}}. Choose the tool by the platform the element runs on.",
651
+ "decision": "New versions deploy beside the live one and take traffic all at once after their smoke tests pass: on Kubernetes with Argo Rollouts (blueGreen strategy with pre-promotion analysis), elsewhere with AWS CodeDeploy blue/green, Azure App Service deployment slots or two target groups behind the load balancer. The previous version keeps running for 60 minutes after the switch, so switching back takes seconds and always within {{ROLLBACK_MINUTES}} minutes. Schema changes: {{MIGRATIONS}}. Cadence: {{CADENCE}}. Choose the tool by the platform the element runs on.",
570
652
  "consequences": "• Rollback is a switch: seconds, not a redeploy.\n• Users never see two versions at once, but the database does: the schema must still suit both.\n• Double the capacity during each release, and a full environment to warm up.\n• All users get the new version at once; smoke tests are the only gate before them.",
571
653
  "alternatives": "1. Canary: exposes a bad version to a few users first, with gradual traffic shifting.\n2. Rolling update: no extra capacity, but rollback is slower and versions mix.",
572
654
  "hubWhen": {
@@ -585,7 +667,7 @@
585
667
  "status": "accepted",
586
668
  "date": "",
587
669
  "context": "This element is changed and deployed while people use it. The forces: most outages start with a change, so how a change reaches production decides much of the availability; a release that cannot be undone quickly turns a small mistake into a long outage; old and new versions run side by side during most deployments and both must work against the same database; a schema change that the previous version cannot read makes rollback impossible; small, frequent changes fail less often and are easier to undo than large, rare ones (DORA); and deploying is not the same as releasing: code can be in production without users seeing it. The snippets of this pack assume the element is deployed to the shop namespace as order-api; rename them for yours.",
588
- "decision": "New versions roll out as a canary: 5 %, 25 %, 50 %, then 100 % of traffic, 10 minutes per step, with an automatic analysis at every step from Prometheus (or the metrics backend): the canary's success rate must stay at or above {{CANARY_SUCCESS_PERCENT}} % and its 95th percentile latency within 20 % of the stable version's, or the rollout aborts. Tooling: Argo Rollouts or Flagger on Kubernetes, with traffic split by the ingress or service mesh (NGINX, Istio, Linkerd, Gateway API); AWS CodeDeploy or App Mesh canaries on ECS and Lambda. Choose Argo Rollouts when the team already uses Argo CD, Flagger when it uses Flux. An abort returns all traffic to the stable version within {{ROLLBACK_MINUTES}} minutes. Schema changes: {{MIGRATIONS}}. Feature flags: {{FLAGS}}. Cadence: {{CADENCE}}.",
670
+ "decision": "New versions roll out as a canary: 5 %, 25 %, 50 %, then 100 % of traffic, 10 minutes per step, with an automatic analysis at every step from Prometheus (or the metrics backend): the canary's success rate must stay at or above {{CANARY_SUCCESS_PERCENT}} % and its 95th percentile latency within 20 % of the stable version's, or the rollout aborts. Tooling: Argo Rollouts or Flagger on Kubernetes, with traffic split by the ingress or service mesh (NGINX, Istio, Linkerd, Gateway API); AWS CodeDeploy or App Mesh canaries on ECS and Lambda. Choose Argo Rollouts when the team already uses Argo CD, Flagger when it uses Flux. An abort returns all traffic to the stable version within {{ROLLBACK_MINUTES}} minutes. Schema changes: {{MIGRATIONS}}. Cadence: {{CADENCE}}.",
589
671
  "consequences": "• A bad version reaches 5 % of users for minutes, not everyone.\n• Rollback is automatic and does not wait for a person.\n• Needs metrics per version and enough traffic for the analysis to be meaningful; at low traffic the steps judge noise.\n• A rollout takes 30 minutes or more; urgent fixes need a documented fast path.",
590
672
  "alternatives": "1. Rolling update with a person watching: simpler, but slower to notice and a bad version reaches everyone.\n2. Blue-green: instant switch back, but everyone gets the new version at once.",
591
673
  "hubWhen": {
@@ -705,6 +787,10 @@
705
787
  "hubWhen": {
706
788
  "CADENCE": [
707
789
  "continuous"
790
+ ],
791
+ "FLAGS": [
792
+ "yes",
793
+ "no"
708
794
  ]
709
795
  }
710
796
  },
@@ -718,12 +804,16 @@
718
804
  "status": "accepted",
719
805
  "date": "",
720
806
  "context": "This element is changed and deployed while people use it. The forces: most outages start with a change, so how a change reaches production decides much of the availability; a release that cannot be undone quickly turns a small mistake into a long outage; old and new versions run side by side during most deployments and both must work against the same database; a schema change that the previous version cannot read makes rollback impossible; small, frequent changes fail less often and are easier to undo than large, rare ones (DORA); and deploying is not the same as releasing: code can be in production without users seeing it. The snippets of this pack assume the element is deployed to the shop namespace as order-api; rename them for yours.",
721
- "decision": "Changes merged before a weekly cut-off are released together within 2 working days, through the same automated pipeline and rollout strategy; urgent fixes can leave outside the train. Feature flags: {{FLAGS}}. The DORA metrics: a weekly job checks deployment frequency (at least one production release every 7 days) and lead time (every merge in production within 7 days); the change failure rate and the recovery time ({{ROLLBACK_MINUTES}} minutes by rollback) come from the incident tracker and the rollback drill, and all four are reviewed every month (Apache DevLake, Sleuth, LinearB or the CI system's own reports).",
807
+ "decision": "Changes merged before a weekly cut-off are released together within 2 working days, through the same automated pipeline and rollout strategy; urgent fixes can leave outside the train. The DORA metrics: a weekly job checks deployment frequency (at least one production release every 7 days) and lead time (every merge in production within 7 days); the change failure rate and the recovery time ({{ROLLBACK_MINUTES}} minutes by rollback) come from the incident tracker and the rollback drill, and all four are reviewed every month (Apache DevLake, Sleuth, LinearB or the CI system's own reports).",
722
808
  "consequences": "• Releases are predictable for customers, support and app stores.\n• Batches are a week of changes: a failure is harder to pin on one change.\n• Lead time is up to a week by design; moving to continuous deployment later is a change of policy, not of tooling.",
723
809
  "alternatives": "1. Continuous deployment: smaller batches and shorter lead time, with full trust in the pipeline.\n2. Monthly or quarterly releases: big batches that fail more often and are hard to undo (DORA).",
724
810
  "hubWhen": {
725
811
  "CADENCE": [
726
812
  "train"
813
+ ],
814
+ "FLAGS": [
815
+ "yes",
816
+ "no"
727
817
  ]
728
818
  }
729
819
  },
@@ -751,7 +841,13 @@
751
841
  "cadence": "triggered",
752
842
  "trigger": "deploy",
753
843
  "invocation": "automated",
754
- "description": "The staging pipeline starts a k6 run at a steady rate, deploys the new version while it runs, and lets the run end two minutes after the rollout finished; the threshold fails the run, and the pipeline, on any failed request. It catches instances stopped with requests in flight and traffic routed before readiness.\n\nThreshold: 0 failed requests (connection errors, 502, 503, 504) in a k6 run that spans a staging deployment at a steady rate\n\nTool: Grafana k6, started by the staging deploy job\n\n```js\n// k6 run --env BASE_URL=https://staging.shop.example deploy-under-load.js &\n// then, in the same job: kubectl -n shop-staging set image deployment/order-api order-api=$IMAGE\n// && kubectl -n shop-staging rollout status deployment/order-api --timeout=4m; wait (the k6 exit code fails the job)\nimport http from 'k6/http'\n\nexport const options = {\n scenarios: {\n steady: { executor: 'constant-arrival-rate', rate: 50, timeUnit: '1s', duration: '6m', preAllocatedVUs: 100, maxVUs: 500 },\n },\n thresholds: {\n http_req_failed: ['rate==0'], // one connection reset or 5xx during the rollout fails the run\n },\n}\n\nexport default function () {\n http.get(`${__ENV.BASE_URL}/orders?page=1`)\n}\n```"
844
+ "description": "The staging pipeline starts a k6 run at a steady rate, deploys the new version while it runs, and lets the run end two minutes after the rollout finished; the threshold fails the run, and the pipeline, on any failed request. It catches instances stopped with requests in flight and traffic routed before readiness.\n\nThreshold: 0 failed requests (connection errors, 502, 503, 504) in a k6 run that spans a staging deployment at a steady rate\n\nTool: Grafana k6, started by the staging deploy job\n\n```js\n// k6 run --env BASE_URL=https://staging.shop.example deploy-under-load.js &\n// then, in the same job: kubectl -n shop-staging set image deployment/order-api order-api=$IMAGE\n// && kubectl -n shop-staging rollout status deployment/order-api --timeout=4m; wait (the k6 exit code fails the job)\nimport http from 'k6/http'\n\nexport const options = {\n scenarios: {\n steady: { executor: 'constant-arrival-rate', rate: 50, timeUnit: '1s', duration: '6m', preAllocatedVUs: 100, maxVUs: 500 },\n },\n thresholds: {\n http_req_failed: ['rate==0'], // one connection reset or 5xx during the rollout fails the run\n },\n}\n\nexport default function () {\n http.get(`${__ENV.BASE_URL}/orders?page=1`)\n}\n```",
845
+ "hubWhen": {
846
+ "FLAGS": [
847
+ "yes",
848
+ "no"
849
+ ]
850
+ }
755
851
  },
756
852
  {
757
853
  "id": "ff-rolling",
@@ -930,6 +1026,10 @@
930
1026
  "hubWhen": {
931
1027
  "CADENCE": [
932
1028
  "continuous"
1029
+ ],
1030
+ "FLAGS": [
1031
+ "yes",
1032
+ "no"
933
1033
  ]
934
1034
  }
935
1035
  },
@@ -948,6 +1048,10 @@
948
1048
  "hubWhen": {
949
1049
  "CADENCE": [
950
1050
  "train"
1051
+ ],
1052
+ "FLAGS": [
1053
+ "yes",
1054
+ "no"
951
1055
  ]
952
1056
  }
953
1057
  }