@radicaltools/cli 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 (65) hide show
  1. package/README.md +46 -7
  2. package/dist/{chunk-CWKX2ULF.js → chunk-5EK2V6G3.js} +1 -1
  3. package/dist/{dist-KTTOUFHF.js → dist-BJQ35APN.js} +2 -2
  4. package/dist/hub-catalogue/concern/concern-accessibility.radical +85 -1
  5. package/dist/hub-catalogue/concern/concern-api-collections.radical +78 -1
  6. package/dist/hub-catalogue/concern/concern-api-errors.radical +78 -1
  7. package/dist/hub-catalogue/concern/concern-api-evolution.radical +78 -1
  8. package/dist/hub-catalogue/concern/concern-api-idempotency.radical +121 -3
  9. package/dist/hub-catalogue/concern/concern-api-resource-design.radical +78 -1
  10. package/dist/hub-catalogue/concern/concern-api-style-guide.radical +78 -1
  11. package/dist/hub-catalogue/concern/concern-architecture-style.radical +83 -7
  12. package/dist/hub-catalogue/concern/concern-audit-trail.radical +77 -1
  13. package/dist/hub-catalogue/concern/concern-authentication.radical +178 -8
  14. package/dist/hub-catalogue/concern/concern-authorization.radical +133 -7
  15. package/dist/hub-catalogue/concern/concern-availability.radical +156 -6
  16. package/dist/hub-catalogue/concern/concern-backend-stack.radical +71 -8
  17. package/dist/hub-catalogue/concern/concern-backup-recovery.radical +136 -6
  18. package/dist/hub-catalogue/concern/concern-caching.radical +73 -1
  19. package/dist/hub-catalogue/concern/concern-capacity.radical +124 -5
  20. package/dist/hub-catalogue/concern/concern-ci-cd-pipeline.radical +154 -15
  21. package/dist/hub-catalogue/concern/concern-code-documentation.radical +131 -13
  22. package/dist/hub-catalogue/concern/concern-code-quality-gate.radical +116 -7
  23. package/dist/hub-catalogue/concern/concern-code-review-branching.radical +174 -13
  24. package/dist/hub-catalogue/concern/concern-code-style.radical +148 -16
  25. package/dist/hub-catalogue/concern/concern-communication-style.radical +94 -7
  26. package/dist/hub-catalogue/concern/concern-data-classification.radical +77 -1
  27. package/dist/hub-catalogue/concern/concern-data-consistency.radical +87 -5
  28. package/dist/hub-catalogue/concern/concern-data-store.radical +87 -5
  29. package/dist/hub-catalogue/concern/concern-decomposition.radical +78 -1
  30. package/dist/hub-catalogue/concern/concern-definition-of-done.radical +150 -11
  31. package/dist/hub-catalogue/concern/concern-delivery-metrics.radical +130 -5
  32. package/dist/hub-catalogue/concern/concern-dependency-hygiene.radical +127 -10
  33. package/dist/hub-catalogue/concern/concern-deployment.radical +113 -9
  34. package/dist/hub-catalogue/concern/concern-encryption.radical +146 -5
  35. package/dist/hub-catalogue/concern/concern-error-handling-logging.radical +118 -12
  36. package/dist/hub-catalogue/concern/concern-eu-dora.radical +69 -1
  37. package/dist/hub-catalogue/concern/concern-frontend-stack.radical +148 -9
  38. package/dist/hub-catalogue/concern/concern-incident-management.radical +122 -1
  39. package/dist/hub-catalogue/concern/concern-infrastructure.radical +54 -1
  40. package/dist/hub-catalogue/concern/concern-integration-resilience.radical +110 -5
  41. package/dist/hub-catalogue/concern/concern-messaging.radical +89 -2
  42. package/dist/hub-catalogue/concern/concern-mobile-performance.radical +67 -1
  43. package/dist/hub-catalogue/concern/concern-module-boundaries.radical +92 -5
  44. package/dist/hub-catalogue/concern/concern-observability.radical +105 -1
  45. package/dist/hub-catalogue/concern/concern-operational-readiness.radical +140 -5
  46. package/dist/hub-catalogue/concern/concern-personal-data.radical +206 -7
  47. package/dist/hub-catalogue/concern/concern-quality-priorities.radical +104 -12
  48. package/dist/hub-catalogue/concern/concern-rate-limiting.radical +110 -1
  49. package/dist/hub-catalogue/concern/concern-release-versioning.radical +99 -7
  50. package/dist/hub-catalogue/concern/concern-retention.radical +130 -9
  51. package/dist/hub-catalogue/concern/concern-secrets.radical +196 -12
  52. package/dist/hub-catalogue/concern/concern-secure-coding.radical +122 -1
  53. package/dist/hub-catalogue/concern/concern-secure-development.radical +118 -1
  54. package/dist/hub-catalogue/concern/concern-security-detection.radical +124 -1
  55. package/dist/hub-catalogue/concern/concern-supply-chain.radical +116 -1
  56. package/dist/hub-catalogue/concern/concern-technical-debt.radical +162 -19
  57. package/dist/hub-catalogue/concern/concern-technology-lifecycle.radical +152 -18
  58. package/dist/hub-catalogue/concern/concern-tenant-isolation.radical +111 -1
  59. package/dist/hub-catalogue/concern/concern-test-strategy.radical +83 -7
  60. package/dist/hub-catalogue/concern/concern-threat-modelling.radical +120 -1
  61. package/dist/hub-catalogue/concern/concern-usability.radical +84 -5
  62. package/dist/index.js +299 -100
  63. package/dist/{pdfjs-ABY3IR7F.js → pdfjs-4U3YUAVN.js} +1 -1
  64. package/dist/{undici-7Z7ZFI7Q.js → undici-7IHHEPSO.js} +1 -1
  65. package/package.json +1 -1
@@ -16,7 +16,64 @@
16
16
  "id": "technical-debt",
17
17
  "trigger": "LIST NODES WHERE (type = \"container\" OR type = \"webapp\") AND external != true",
18
18
  "why": "code lives in these elements and accumulates shortcuts, so where that debt is recorded, how it is repaid and how old code is retired has to be decided; one decision usually covers a whole repository and is bound to every element built from it.",
19
- "group": "coding"
19
+ "group": "coding",
20
+ "scope": {
21
+ "group": "coding",
22
+ "questions": [
23
+ {
24
+ "key": "TEAM",
25
+ "label": "Who writes the code?",
26
+ "default": "small",
27
+ "hint": "Code others must read and change needs written conventions and documentation.",
28
+ "options": [
29
+ {
30
+ "value": "small",
31
+ "label": "one or two people",
32
+ "description": "One or two developers who know all of it."
33
+ },
34
+ {
35
+ "value": "team",
36
+ "label": "a team",
37
+ "description": "A team of its own, with people joining and leaving."
38
+ },
39
+ {
40
+ "value": "teams",
41
+ "label": "several teams",
42
+ "description": "Several teams working in the same codebase or in parts of it."
43
+ }
44
+ ]
45
+ },
46
+ {
47
+ "key": "LIFETIME",
48
+ "label": "How long must the code live?",
49
+ "default": "years",
50
+ "hint": "A prototype thrown away soon needs little; code kept for years needs its debt paid down.",
51
+ "options": [
52
+ {
53
+ "value": "short",
54
+ "label": "a prototype or a short-lived tool",
55
+ "description": "A trial, a demo or a tool for a few months, then thrown away."
56
+ },
57
+ {
58
+ "value": "years",
59
+ "label": "years",
60
+ "description": "It will be kept and changed for years."
61
+ }
62
+ ]
63
+ }
64
+ ],
65
+ "when": [
66
+ {
67
+ "TEAM": [
68
+ "team",
69
+ "teams"
70
+ ],
71
+ "LIFETIME": [
72
+ "years"
73
+ ]
74
+ }
75
+ ]
76
+ }
20
77
  },
21
78
  "sources": [
22
79
  {
@@ -119,7 +176,13 @@
119
176
  "label": "the boy-scout rule, no budget",
120
177
  "description": "Every change leaves the code it touches a little better, and a touched file's lint findings may not grow; debt is repaid in passing and the register shrinks only where people work. Pick it for a small codebase with a steady team and little debt, where a budget would be more ceremony than work."
121
178
  }
122
- ]
179
+ ],
180
+ "scopeWhen": {
181
+ "TEAM": [
182
+ "team",
183
+ "teams"
184
+ ]
185
+ }
123
186
  },
124
187
  {
125
188
  "key": "DEPRECATION",
@@ -138,7 +201,13 @@
138
201
  "label": "a marker without a date",
139
202
  "description": "Deprecated code is marked with its reason, replacement and register key, no new code may call it, and it is removed only when it blocks a change. Pick it when callers you do not control depend on it and a date you cannot enforce would only be missed."
140
203
  }
141
- ]
204
+ ],
205
+ "scopeWhen": {
206
+ "TEAM": [
207
+ "team",
208
+ "teams"
209
+ ]
210
+ }
142
211
  },
143
212
  {
144
213
  "key": "REWRITE",
@@ -157,7 +226,13 @@
157
226
  "label": "a full rewrite with a written case",
158
227
  "description": "A full rewrite may be started when a written case with cost, risk, parity criteria and what the old code knows that nobody remembers is accepted by the owners and recorded as an ADR. Pick it when the element is small, its behaviour is fully specified by tests, or it must leave a platform that is going away."
159
228
  }
160
- ]
229
+ ],
230
+ "scopeWhen": {
231
+ "TEAM": [
232
+ "team",
233
+ "teams"
234
+ ]
235
+ }
161
236
  },
162
237
  {
163
238
  "key": "AGE",
@@ -176,7 +251,13 @@
176
251
  "label": "no age limit",
177
252
  "description": "Items stay in the register until they are repaid or someone closes them. Pick it for a short register that one team prunes in its triage anyway."
178
253
  }
179
- ]
254
+ ],
255
+ "scopeWhen": {
256
+ "TEAM": [
257
+ "team",
258
+ "teams"
259
+ ]
260
+ }
180
261
  },
181
262
  {
182
263
  "key": "DEBT_SHARE_PCT",
@@ -256,7 +337,14 @@
256
337
  "ears_type": "event-driven",
257
338
  "trigger": "an iteration ends",
258
339
  "action": "report the share of the pull requests merged in it that repaid debt (labelled tech-debt), with the register's size, where the team and its stakeholders see it",
259
- "rationale": "What is not measured is the first thing cut; Accelerate links sustained delivery performance to time deliberately spent on the system itself."
340
+ "rationale": "What is not measured is the first thing cut; Accelerate links sustained delivery performance to time deliberately spent on the system itself.",
341
+ "hubWhen": {
342
+ "BUDGET": [
343
+ "fixed-share",
344
+ "windows",
345
+ "boy-scout"
346
+ ]
347
+ }
260
348
  },
261
349
  {
262
350
  "id": "req-fixed-share",
@@ -314,7 +402,13 @@
314
402
  "y": 780,
315
403
  "ears_type": "ubiquitous",
316
404
  "action": "mark every deprecated function, module and endpoint with the language's deprecation marker (@deprecated, [Obsolete], warnings.deprecated) whose text names the replacement and the register key, and answer deprecated endpoints with a Deprecation header",
317
- "rationale": "A deprecation without a replacement teaches nothing and is ignored; one with a key can be planned (RFC 9745; ISO 25010 analysability)."
405
+ "rationale": "A deprecation without a replacement teaches nothing and is ignored; one with a key can be planned (RFC 9745; ISO 25010 analysability).",
406
+ "hubWhen": {
407
+ "DEPRECATION": [
408
+ "sunset",
409
+ "tolerated"
410
+ ]
411
+ }
318
412
  },
319
413
  {
320
414
  "id": "req-sunset",
@@ -341,7 +435,13 @@
341
435
  "ears_type": "unwanted-behaviour",
342
436
  "unwanted_condition": "new or changed code calls or imports something marked deprecated",
343
437
  "action": "fail lint, unless the line carries a disable comment naming the register key under which the call is tolerated",
344
- "rationale": "Deprecated code can only be removed when its callers stop growing; a named exception keeps the debt visible instead of hidden in a blanket disable (Fowler, StranglerFigApplication: the old code shrinks only if nothing new depends on it)."
438
+ "rationale": "Deprecated code can only be removed when its callers stop growing; a named exception keeps the debt visible instead of hidden in a blanket disable (Fowler, StranglerFigApplication: the old code shrinks only if nothing new depends on it).",
439
+ "hubWhen": {
440
+ "DEPRECATION": [
441
+ "sunset",
442
+ "tolerated"
443
+ ]
444
+ }
345
445
  },
346
446
  {
347
447
  "id": "req-tolerated",
@@ -466,7 +566,14 @@
466
566
  "y": 260,
467
567
  "given": "an iteration in which 12 pull requests were merged, 3 of them labelled tech-debt",
468
568
  "when": "it ends and the share job runs",
469
- "then": "the report shows 25% debt work and the number of open items"
569
+ "then": "the report shows 25% debt work and the number of open items",
570
+ "hubWhen": {
571
+ "BUDGET": [
572
+ "fixed-share",
573
+ "windows",
574
+ "boy-scout"
575
+ ]
576
+ }
470
577
  },
471
578
  {
472
579
  "id": "sc-fixed-share",
@@ -521,7 +628,13 @@
521
628
  "y": 780,
522
629
  "given": "a function deprecated in a pull request",
523
630
  "when": "the marker check runs",
524
- "then": "its @deprecated text names a replacement and a register key, and a marker without either fails the check"
631
+ "then": "its @deprecated text names a replacement and a register key, and a marker without either fails the check",
632
+ "hubWhen": {
633
+ "DEPRECATION": [
634
+ "sunset",
635
+ "tolerated"
636
+ ]
637
+ }
525
638
  },
526
639
  {
527
640
  "id": "sc-sunset",
@@ -546,7 +659,13 @@
546
659
  "y": 1040,
547
660
  "given": "a function marked @deprecated",
548
661
  "when": "a pull request adds a call to it without a disable comment, and another with one naming KEY-123",
549
- "then": "the first fails lint and the second passes"
662
+ "then": "the first fails lint and the second passes",
663
+ "hubWhen": {
664
+ "DEPRECATION": [
665
+ "sunset",
666
+ "tolerated"
667
+ ]
668
+ }
550
669
  },
551
670
  {
552
671
  "id": "sc-tolerated",
@@ -643,7 +762,7 @@
643
762
  "status": "accepted",
644
763
  "date": "",
645
764
  "context": "Code lives in this element and every deadline leaves a shortcut in it; whether those shortcuts are seen, counted and repaid decides how fast the element can change next year. The forces: debt taken knowingly for a deadline is a sound loan and debt taken unknowingly is a surprise, and both charge interest in every change that touches them (Cunningham's metaphor, Fowler's quadrant); a debt nobody can see is never repaid, while a register nobody prunes becomes a graveyard; time for repayment competes with features in every planning, and a team that gets none slows down without anyone having decided it; deprecated code and endpoints stay because removing them has no sponsor and no date; and a full rewrite looks like freedom from all debt and usually recreates it, two years late (Spolsky). What a change must pass to be merged is decided by the Code quality gate concern and which tests it has by the Test strategy concern; a feature flag past its rollout is a debt item in the register here, but its removal is decided in the Deployment and rollback pack. This decision is about the debt that is already there and the debt taken on purpose. The snippets assume one repository layout: source in src/, tests in test/, decision records in docs/adr and debt records in docs/debt, the pipelines on GitHub Actions with the GitHub CLI, and GitHub Issues, Jira or Linear as the tracker.",
646
- "decision": "Every debt item is an issue in the tracker (GitHub Issues, Jira or Linear) with the label tech-debt, an assignee as owner, a Cost section with the estimate in days and a Consequence section; an issue form (.github/ISSUE_TEMPLATE/tech-debt.yml with required fields) makes cost and consequence mandatory, and a weekly check fails on an open item without them or without an assignee. Debt is triaged in the same weekly triage as bugs. Code points at an item with TODO (KEY-123): lint fails a TODO without a key and a CI script fails the build on a TODO whose issue is closed. A pull request that repays an item carries the label tech-debt. A feature flag past its rollout is an item like any other; its removal follows the Deployment and rollback pack. Repayment budget: {{BUDGET}}. Deprecated code and endpoints: {{DEPRECATION}}. Rewrites: {{REWRITE}}. Age: {{AGE}}. A shortcut taken knowingly in a pull request (a waived quality-gate condition, a suppressed warning, a skipped test) opens its issue in the same pull request.",
765
+ "decision": "Every debt item is an issue in the tracker (GitHub Issues, Jira or Linear) with the label tech-debt, an assignee as owner, a Cost section with the estimate in days and a Consequence section; an issue form (.github/ISSUE_TEMPLATE/tech-debt.yml with required fields) makes cost and consequence mandatory, and a weekly check fails on an open item without them or without an assignee. Debt is triaged in the same weekly triage as bugs. Code points at an item with TODO (KEY-123): lint fails a TODO without a key and a CI script fails the build on a TODO whose issue is closed. A pull request that repays an item carries the label tech-debt. A feature flag past its rollout is an item like any other; its removal follows the Deployment and rollback pack. A shortcut taken knowingly in a pull request (a waived quality-gate condition, a suppressed warning, a skipped test) opens its issue in the same pull request.",
647
766
  "consequences": "• Debt competes for the same backlog as features and bugs, on the same board, with the same estimates.\n• The share of debt work per iteration falls out of the tracker and the labelled pull requests for free.\n• A tracker fills with small items quickly; triage must close duplicates and merge siblings or the label becomes noise.\n• Architectural debt gets a ticket-sized description; the reasoning behind it needs an ADR beside the issue.",
648
767
  "alternatives": "1. Decision records in the repository: better for architectural debt with reasoning, but invisible to the planning board unless mirrored.\n2. A code-analysis platform as the register: free for debt in the code itself, blind to debt in design, process or missing tests.\n3. A wiki page or spreadsheet: easy to start, outside every workflow, and the first thing to go stale.",
649
768
  "hubWhen": {
@@ -662,7 +781,7 @@
662
781
  "status": "accepted",
663
782
  "date": "",
664
783
  "context": "Code lives in this element and every deadline leaves a shortcut in it; whether those shortcuts are seen, counted and repaid decides how fast the element can change next year. The forces: debt taken knowingly for a deadline is a sound loan and debt taken unknowingly is a surprise, and both charge interest in every change that touches them (Cunningham's metaphor, Fowler's quadrant); a debt nobody can see is never repaid, while a register nobody prunes becomes a graveyard; time for repayment competes with features in every planning, and a team that gets none slows down without anyone having decided it; deprecated code and endpoints stay because removing them has no sponsor and no date; and a full rewrite looks like freedom from all debt and usually recreates it, two years late (Spolsky). What a change must pass to be merged is decided by the Code quality gate concern and which tests it has by the Test strategy concern; a feature flag past its rollout is a debt item in the register here, but its removal is decided in the Deployment and rollback pack. This decision is about the debt that is already there and the debt taken on purpose. The snippets assume one repository layout: source in src/, tests in test/, decision records in docs/adr and debt records in docs/debt, the pipelines on GitHub Actions with the GitHub CLI, and GitHub Issues, Jira or Linear as the tracker.",
665
- "decision": "Debt is recorded as decision records in the repository, docs/debt/NNNN-title.md, copied from docs/debt/template.md: YAML front matter with owner, cost_days, date, status (open, accepted, repaid) and, where one exists, sunset, then the sections Context, Decision and Consequences, reviewed in the pull request like code. Its number is its key: TODO (DEBT-0042) points at it from the code, lint fails a TODO without a key, a CI script fails the build on a TODO whose record is repaid, and a test over the records fails the build on a missing owner, cost or Consequences section or a sunset in the past. Items too small for a record are TODO comments pointing at the record of the debt they belong to. A pull request that repays a record carries the label tech-debt. A feature flag past its rollout is a record like any other; its removal follows the Deployment and rollback pack. Repayment budget: {{BUDGET}}. Deprecated code and endpoints: {{DEPRECATION}}. Rewrites: {{REWRITE}}. Age: {{AGE}}. A shortcut taken knowingly in a pull request adds or amends a record in the same pull request.",
784
+ "decision": "Debt is recorded as decision records in the repository, docs/debt/NNNN-title.md, copied from docs/debt/template.md: YAML front matter with owner, cost_days, date, status (open, accepted, repaid) and, where one exists, sunset, then the sections Context, Decision and Consequences, reviewed in the pull request like code. Its number is its key: TODO (DEBT-0042) points at it from the code, lint fails a TODO without a key, a CI script fails the build on a TODO whose record is repaid, and a test over the records fails the build on a missing owner, cost or Consequences section or a sunset in the past. Items too small for a record are TODO comments pointing at the record of the debt they belong to. A pull request that repays a record carries the label tech-debt. A feature flag past its rollout is a record like any other; its removal follows the Deployment and rollback pack. A shortcut taken knowingly in a pull request adds or amends a record in the same pull request.",
666
785
  "consequences": "• The reasoning travels with the code: a record says why the debt was taken and what repaying it means, which a ticket never does.\n• Records are reviewed, versioned and searchable with the code; no second system.\n• Planning does not see docs/debt unless the team mirrors items into the tracker or reads the register at every planning.\n• Small items are expensive to record, so some go unrecorded; the TODO rule catches those that reach the code.",
667
786
  "alternatives": "1. Issues labelled tech-debt: visible in planning, cheaper per item, poorer at reasoning.\n2. A code-analysis platform as the register: measures debt in the code, says nothing about why it is there.\n3. Debt sections inside the architecture ADRs themselves: fewer files, but the debt disappears into decisions nobody reopens.",
668
787
  "hubWhen": {
@@ -681,7 +800,7 @@
681
800
  "status": "accepted",
682
801
  "date": "",
683
802
  "context": "Code lives in this element and every deadline leaves a shortcut in it; whether those shortcuts are seen, counted and repaid decides how fast the element can change next year. The forces: debt taken knowingly for a deadline is a sound loan and debt taken unknowingly is a surprise, and both charge interest in every change that touches them (Cunningham's metaphor, Fowler's quadrant); a debt nobody can see is never repaid, while a register nobody prunes becomes a graveyard; time for repayment competes with features in every planning, and a team that gets none slows down without anyone having decided it; deprecated code and endpoints stay because removing them has no sponsor and no date; and a full rewrite looks like freedom from all debt and usually recreates it, two years late (Spolsky). What a change must pass to be merged is decided by the Code quality gate concern and which tests it has by the Test strategy concern; a feature flag past its rollout is a debt item in the register here, but its removal is decided in the Deployment and rollback pack. This decision is about the debt that is already there and the debt taken on purpose. The snippets assume one repository layout: source in src/, tests in test/, decision records in docs/adr and debt records in docs/debt, the pipelines on GitHub Actions with the GitHub CLI, and GitHub Issues, Jira or Linear as the tracker.",
684
- "decision": "SonarQube (or SonarCloud) is the register: each open issue carries its remediation effort, the sum is the technical debt, and the debt ratio (remediation effort over development cost, SQALE) is a quality-gate condition, at most {{MAX_DEBT_RATIO_PCT}}% on new code; the project dashboard shows the overall ratio and effort and is the report. Every open issue is assigned to an owner, which a weekly check over the issues API enforces; an issue is accepted (won't fix) only with a comment giving the reason, and accepted issues are the tolerated debt. TODO comments are flagged by rule S1135 and counted as debt. A pull request that repays issues carries the label tech-debt. There is no separate list; debt outside the code (a design to change, a missing test suite, a feature flag past its rollout, whose removal follows the Deployment and rollback pack) gets a ticket or ADR only by exception and is linked from a Sonar issue where one exists. Repayment budget: {{BUDGET}}. Deprecated code and endpoints: {{DEPRECATION}}. Rewrites: {{REWRITE}}. Age: {{AGE}}.",
803
+ "decision": "SonarQube (or SonarCloud) is the register: each open issue carries its remediation effort, the sum is the technical debt, and the debt ratio (remediation effort over development cost, SQALE) is a quality-gate condition, at most {{MAX_DEBT_RATIO_PCT}}% on new code; the project dashboard shows the overall ratio and effort and is the report. Every open issue is assigned to an owner, which a weekly check over the issues API enforces; an issue is accepted (won't fix) only with a comment giving the reason, and accepted issues are the tolerated debt. TODO comments are flagged by rule S1135 and counted as debt. A pull request that repays issues carries the label tech-debt. There is no separate list; debt outside the code (a design to change, a missing test suite, a feature flag past its rollout, whose removal follows the Deployment and rollback pack) gets a ticket or ADR only by exception and is linked from a Sonar issue where one exists. ",
685
804
  "consequences": "• Debt in the code is measured without anyone keeping a list, with one number everyone understands.\n• The gate stops new debt from entering while the overall ratio is worked down (Clean as You Code).\n• Design, process and test debt are not code smells; the platform does not see them, so they go unrecorded unless someone makes an exception.\n• Remediation effort is the rule's estimate, not the team's; the ratio is a trend to watch, not a budget to spend.",
686
805
  "alternatives": "1. Issues labelled tech-debt: sees every kind of debt, but each item is written by hand.\n2. Decision records in the repository: best for architectural debt, worst for the hundreds of small smells the platform finds.\n3. Both the platform and a tracker: complete, until the two disagree and neither is maintained.",
687
806
  "hubWhen": {
@@ -700,7 +819,7 @@
700
819
  "status": "accepted",
701
820
  "date": "",
702
821
  "context": "Code lives in this element and every deadline leaves a shortcut in it; whether those shortcuts are seen, counted and repaid decides how fast the element can change next year. The forces: debt taken knowingly for a deadline is a sound loan and debt taken unknowingly is a surprise, and both charge interest in every change that touches them (Cunningham's metaphor, Fowler's quadrant); a debt nobody can see is never repaid, while a register nobody prunes becomes a graveyard; time for repayment competes with features in every planning, and a team that gets none slows down without anyone having decided it; deprecated code and endpoints stay because removing them has no sponsor and no date; and a full rewrite looks like freedom from all debt and usually recreates it, two years late (Spolsky). What a change must pass to be merged is decided by the Code quality gate concern and which tests it has by the Test strategy concern; a feature flag past its rollout is a debt item in the register here, but its removal is decided in the Deployment and rollback pack. This decision is about the debt that is already there and the debt taken on purpose. The snippets assume one repository layout: source in src/, tests in test/, decision records in docs/adr and debt records in docs/debt, the pipelines on GitHub Actions with the GitHub CLI, and GitHub Issues, Jira or Linear as the tracker. Here the element must keep serving while any part of it is rewritten.",
703
- "decision": "A rewrite replaces one piece at a time behind a facade: a reverse proxy, API gateway or an in-process routing module that sends each piece's calls to the old or the new implementation (Envoy, NGINX, Spring Cloud Gateway or a feature flag per piece in the code). Old and new run side by side; each piece has a cut-over, a comparison period (shadow traffic or a diff of both answers where the piece allows it) and a way back by routing. New code reaches the old module only through the facade; a dependency rule fails the build on a direct import of src/legacy. A piece is done when the old implementation is deleted. Big-bang rewrites are not done; a proposal for one is an ADR that supersedes this decision.",
822
+ "decision": "A rewrite replaces one piece at a time behind a facade: a reverse proxy, API gateway or an in-process routing module that sends each piece's calls to the old or the new implementation (Envoy, NGINX, Spring Cloud Gateway or a feature flag per piece in the code). Old and new run side by side; each piece has a cut-over, a comparison period (shadow traffic or a diff of both answers where the piece allows it) and a way back by routing. New code reaches the old module only through the facade; a dependency rule fails the build on a direct import of src/legacy. A piece is done when the old implementation is deleted. Big-bang rewrites are not done; a proposal for one is an ADR that supersedes this decision. Age limit on recorded debt: {{AGE}}.",
704
823
  "consequences": "• Delivery continues during the rewrite and every piece is proven in production before the next starts.\n• A failed piece is routed back in minutes; nothing is bet on a single cut-over day.\n• The facade and two implementations cost running and reasoning effort until the last piece is gone; a strangler that stops halfway is the worst of both.\n• Pieces must be found along seams (a bounded context, a route, a table); an element without seams needs them cut first.",
705
824
  "alternatives": "1. A full rewrite with a written case: one cut-over, months without delivery, and the old code's undocumented behaviour rediscovered in production.\n2. Refactoring in place without a facade: cheaper when the technology stays; not a rewrite.\n3. Running the new system for new customers only: a strangler by tenant, viable when data need not move.",
706
825
  "hubWhen": {
@@ -719,7 +838,7 @@
719
838
  "status": "accepted",
720
839
  "date": "",
721
840
  "context": "Code lives in this element and every deadline leaves a shortcut in it; whether those shortcuts are seen, counted and repaid decides how fast the element can change next year. The forces: debt taken knowingly for a deadline is a sound loan and debt taken unknowingly is a surprise, and both charge interest in every change that touches them (Cunningham's metaphor, Fowler's quadrant); a debt nobody can see is never repaid, while a register nobody prunes becomes a graveyard; time for repayment competes with features in every planning, and a team that gets none slows down without anyone having decided it; deprecated code and endpoints stay because removing them has no sponsor and no date; and a full rewrite looks like freedom from all debt and usually recreates it, two years late (Spolsky). What a change must pass to be merged is decided by the Code quality gate concern and which tests it has by the Test strategy concern; a feature flag past its rollout is a debt item in the register here, but its removal is decided in the Deployment and rollback pack. This decision is about the debt that is already there and the debt taken on purpose. The snippets assume one repository layout: source in src/, tests in test/, decision records in docs/adr and debt records in docs/debt, the pipelines on GitHub Actions with the GitHub CLI, and GitHub Issues, Jira or Linear as the tracker. Here the element is small or leaving a platform, so a full rewrite is on the table.",
722
- "decision": "A full rewrite of the element or of a module may be started only after a case written as an ADR with kind: rewrite in its front matter is accepted in writing by at least two owners (accepted_by): cost in person-months, risks, parity criteria (the tests and behaviours the new code must match, run against both), what the old code handles that no document describes, a data migration and a cut-over plan with a rollback. Until the ADR is accepted no rewrite code is merged: a pull request labelled rewrite must link an accepted rewrite ADR. Where the element serves users during the rewrite, the strangler-fig approach is preferred and the case must say why it does not apply.",
841
+ "decision": "A full rewrite of the element or of a module may be started only after a case written as an ADR with kind: rewrite in its front matter is accepted in writing by at least two owners (accepted_by): cost in person-months, risks, parity criteria (the tests and behaviours the new code must match, run against both), what the old code handles that no document describes, a data migration and a cut-over plan with a rollback. Until the ADR is accepted no rewrite code is merged: a pull request labelled rewrite must link an accepted rewrite ADR. Where the element serves users during the rewrite, the strangler-fig approach is preferred and the case must say why it does not apply. Age limit on recorded debt: {{AGE}}.",
723
842
  "consequences": "• A rewrite becomes a decision with a price instead of a mood; most proposals do not survive writing the case.\n• When one is accepted, the parity criteria make \"done\" testable.\n• The old system still has to be maintained while the new one is built; the case has to budget for both.\n• Months of a rewrite are months without visible features; stakeholders accept that in the ADR, not after.",
724
843
  "alternatives": "1. Strangler fig only: no rewrite stops delivery, but a small element or one leaving its platform pays for a facade it does not need.\n2. No rule: rewrites start on enthusiasm and end on budget.\n3. Rewrite only within fixed windows: bounds the cost but rarely the risk.",
725
844
  "hubWhen": {
@@ -763,6 +882,11 @@
763
882
  "REGISTRY": [
764
883
  "issues",
765
884
  "adrs"
885
+ ],
886
+ "BUDGET": [
887
+ "fixed-share",
888
+ "windows",
889
+ "boy-scout"
766
890
  ]
767
891
  }
768
892
  },
@@ -831,7 +955,14 @@
831
955
  "cadence": "temporal",
832
956
  "every": "14d",
833
957
  "invocation": "automated",
834
- "description": "A scheduled job at the end of each iteration counts the pull requests merged since the iteration started and those among them labelled tech-debt (the label every register variant puts on a repayment), prints the share with the number of open items (issues labelled tech-debt, open records in docs/debt, or unresolved Sonar issues, one line each), and, where a fixed share is agreed, fails below it so that the retrospective sees it. With Jira as the tracker the open count comes from JQL: labels = tech-debt AND resolution = Unresolved.\n\nThreshold: The share of pull requests merged in the iteration that carry the label tech-debt is reported with the register's size; with a fixed share, it is at least {{DEBT_SHARE_PCT}}%\n\nTool: gh pr list in a scheduled job (plus the register's own count)\n\n```bash\n#!/usr/bin/env bash\n# scripts/debt-share.sh [iteration-start YYYY-MM-DD]\nset -euo pipefail\nSINCE=${1:-$(date -d '14 days ago' +%F 2>/dev/null || date -v-14d +%F)}\nMIN=\"${DEBT_SHARE_PCT:-0}\" # with a fixed share the job sets DEBT_SHARE_PCT={{DEBT_SHARE_PCT}}; 0 = report only\nall=$(gh pr list --state merged --search \"merged:>=$SINCE\" --limit 500 --json number --jq length)\ndebt=$(gh pr list --state merged --label tech-debt --search \"merged:>=$SINCE\" --limit 500 --json number --jq length)\nopen=$(gh issue list --state open --label tech-debt --limit 500 --json number --jq length) # issues as the register\n# open=$(grep -L '^status: *repaid' docs/debt/[0-9]*.md | wc -l) # records as the register\n# open=$(curl -sf -u \"$SONAR_TOKEN:\" \"$SONAR_URL/api/issues/search?componentKeys=$PROJECT_KEY&resolved=false&ps=1\" | jq .total) # Sonar\nshare=$(( debt * 100 / (all > 0 ? all : 1) ))\necho \"since $SINCE: $debt of $all merged pull requests repaid debt ($share%), $open debt items open\"\n[ \"$share\" -ge \"$MIN\" ] || { echo \"below the agreed $MIN%\"; exit 1; }\n```"
958
+ "description": "A scheduled job at the end of each iteration counts the pull requests merged since the iteration started and those among them labelled tech-debt (the label every register variant puts on a repayment), prints the share with the number of open items (issues labelled tech-debt, open records in docs/debt, or unresolved Sonar issues, one line each), and, where a fixed share is agreed, fails below it so that the retrospective sees it. With Jira as the tracker the open count comes from JQL: labels = tech-debt AND resolution = Unresolved.\n\nThreshold: The share of pull requests merged in the iteration that carry the label tech-debt is reported with the register's size; with a fixed share, it is at least {{DEBT_SHARE_PCT}}%\n\nTool: gh pr list in a scheduled job (plus the register's own count)\n\n```bash\n#!/usr/bin/env bash\n# scripts/debt-share.sh [iteration-start YYYY-MM-DD]\nset -euo pipefail\nSINCE=${1:-$(date -d '14 days ago' +%F 2>/dev/null || date -v-14d +%F)}\nMIN=\"${DEBT_SHARE_PCT:-0}\" # with a fixed share the job sets DEBT_SHARE_PCT={{DEBT_SHARE_PCT}}; 0 = report only\nall=$(gh pr list --state merged --search \"merged:>=$SINCE\" --limit 500 --json number --jq length)\ndebt=$(gh pr list --state merged --label tech-debt --search \"merged:>=$SINCE\" --limit 500 --json number --jq length)\nopen=$(gh issue list --state open --label tech-debt --limit 500 --json number --jq length) # issues as the register\n# open=$(grep -L '^status: *repaid' docs/debt/[0-9]*.md | wc -l) # records as the register\n# open=$(curl -sf -u \"$SONAR_TOKEN:\" \"$SONAR_URL/api/issues/search?componentKeys=$PROJECT_KEY&resolved=false&ps=1\" | jq .total) # Sonar\nshare=$(( debt * 100 / (all > 0 ? all : 1) ))\necho \"since $SINCE: $debt of $all merged pull requests repaid debt ($share%), $open debt items open\"\n[ \"$share\" -ge \"$MIN\" ] || { echo \"below the agreed $MIN%\"; exit 1; }\n```",
959
+ "hubWhen": {
960
+ "BUDGET": [
961
+ "fixed-share",
962
+ "windows",
963
+ "boy-scout"
964
+ ]
965
+ }
835
966
  },
836
967
  {
837
968
  "id": "ff-debt-windows",
@@ -880,7 +1011,13 @@
880
1011
  "cadence": "triggered",
881
1012
  "trigger": "pull-request",
882
1013
  "invocation": "automated",
883
- "description": "A script run in lint greps the tracked source files for deprecation markers and fails on one whose text (the rest of the line) does not name a register key and a replacement (\"use OrdersV2Client\"); endpoints are covered by the Deprecation header test of the sunset variant and by the handler that writes it.\n\nThreshold: 0 @deprecated, [Obsolete( or warnings.deprecated( markers whose text lacks a register key (KEY-123) or the word \"use\" naming the replacement\n\nTool: git grep in a lint step\n\n```bash\n#!/usr/bin/env bash\n# scripts/check-deprecations.sh: @deprecated use <replacement>: <reason> (KEY-123)\nset -euo pipefail\nbad=$(git grep -nE '@deprecated|\\[Obsolete\\(|warnings\\.deprecated\\(' -- ':!node_modules' ':!*.md' ':!scripts/check-deprecations.sh' \\\n | grep -vE '\\(([A-Z]+-[0-9]+)\\)' ; git grep -nE '@deprecated|\\[Obsolete\\(|warnings\\.deprecated\\(' -- ':!node_modules' ':!*.md' ':!scripts/check-deprecations.sh' \\\n | grep -viE '\\buse [A-Za-z_.]' ; true)\nif [ -n \"$bad\" ]; then\n printf 'deprecation markers without a register key or a replacement (\"use X\"):\\n%s\\n' \"$bad\"\n exit 1\nfi\n```"
1014
+ "description": "A script run in lint greps the tracked source files for deprecation markers and fails on one whose text (the rest of the line) does not name a register key and a replacement (\"use OrdersV2Client\"); endpoints are covered by the Deprecation header test of the sunset variant and by the handler that writes it.\n\nThreshold: 0 @deprecated, [Obsolete( or warnings.deprecated( markers whose text lacks a register key (KEY-123) or the word \"use\" naming the replacement\n\nTool: git grep in a lint step\n\n```bash\n#!/usr/bin/env bash\n# scripts/check-deprecations.sh: @deprecated use <replacement>: <reason> (KEY-123)\nset -euo pipefail\nbad=$(git grep -nE '@deprecated|\\[Obsolete\\(|warnings\\.deprecated\\(' -- ':!node_modules' ':!*.md' ':!scripts/check-deprecations.sh' \\\n | grep -vE '\\(([A-Z]+-[0-9]+)\\)' ; git grep -nE '@deprecated|\\[Obsolete\\(|warnings\\.deprecated\\(' -- ':!node_modules' ':!*.md' ':!scripts/check-deprecations.sh' \\\n | grep -viE '\\buse [A-Za-z_.]' ; true)\nif [ -n \"$bad\" ]; then\n printf 'deprecation markers without a register key or a replacement (\"use X\"):\\n%s\\n' \"$bad\"\n exit 1\nfi\n```",
1015
+ "hubWhen": {
1016
+ "DEPRECATION": [
1017
+ "sunset",
1018
+ "tolerated"
1019
+ ]
1020
+ }
884
1021
  },
885
1022
  {
886
1023
  "id": "ff-expiring-todo",
@@ -947,7 +1084,13 @@
947
1084
  "cadence": "triggered",
948
1085
  "trigger": "pull-request",
949
1086
  "invocation": "automated",
950
- "description": "Lint fails on a call to or import of anything marked @deprecated, using type information so that re-exports and overloads count too; an existing call is tolerated only with a line disable whose description names the register key (the Code quality gate's require-description rule makes the description mandatory). On the JVM the same is javac -Xlint:deprecation -Werror; in .NET, CS0618 as an error in the project file.\n\nThreshold: 0 calls to code marked @deprecated without a line-level disable naming a register key\n\nTool: typescript-eslint (@typescript-eslint/no-deprecated); javac -Xlint:deprecation for the JVM\n\n```js\n// eslint.config.js\nimport tseslint from 'typescript-eslint'\n\nexport default tseslint.config({\n files: ['src/**/*.ts', 'src/**/*.tsx'],\n languageOptions: { parserOptions: { projectService: true } },\n rules: { '@typescript-eslint/no-deprecated': 'error' },\n})\n// a tolerated existing call names its debt item:\n// // eslint-disable-next-line @typescript-eslint/no-deprecated -- SHOP-123, goes with the v1 sunset\n```"
1087
+ "description": "Lint fails on a call to or import of anything marked @deprecated, using type information so that re-exports and overloads count too; an existing call is tolerated only with a line disable whose description names the register key (the Code quality gate's require-description rule makes the description mandatory). On the JVM the same is javac -Xlint:deprecation -Werror; in .NET, CS0618 as an error in the project file.\n\nThreshold: 0 calls to code marked @deprecated without a line-level disable naming a register key\n\nTool: typescript-eslint (@typescript-eslint/no-deprecated); javac -Xlint:deprecation for the JVM\n\n```js\n// eslint.config.js\nimport tseslint from 'typescript-eslint'\n\nexport default tseslint.config({\n files: ['src/**/*.ts', 'src/**/*.tsx'],\n languageOptions: { parserOptions: { projectService: true } },\n rules: { '@typescript-eslint/no-deprecated': 'error' },\n})\n// a tolerated existing call names its debt item:\n// // eslint-disable-next-line @typescript-eslint/no-deprecated -- SHOP-123, goes with the v1 sunset\n```",
1088
+ "hubWhen": {
1089
+ "DEPRECATION": [
1090
+ "sunset",
1091
+ "tolerated"
1092
+ ]
1093
+ }
951
1094
  },
952
1095
  {
953
1096
  "id": "ff-strangler-boundary",