@radicaltools/cli 0.2.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/README.md +353 -33
  2. package/dist/hub-catalogue/concern/concern-api-collections.radical +1136 -0
  3. package/dist/hub-catalogue/concern/concern-api-errors.radical +1180 -0
  4. package/dist/hub-catalogue/concern/concern-api-evolution.radical +1174 -0
  5. package/dist/hub-catalogue/concern/concern-api-idempotency.radical +1218 -0
  6. package/dist/hub-catalogue/concern/concern-api-resource-design.radical +1102 -0
  7. package/dist/hub-catalogue/concern/concern-api-style-guide.radical +1210 -0
  8. package/dist/hub-catalogue/concern/concern-architecture-style.radical +1268 -0
  9. package/dist/hub-catalogue/concern/concern-audit-trail.radical +1096 -0
  10. package/dist/hub-catalogue/concern/concern-authentication.radical +895 -0
  11. package/dist/hub-catalogue/concern/concern-authorization.radical +1686 -0
  12. package/dist/hub-catalogue/concern/concern-availability.radical +1028 -0
  13. package/dist/hub-catalogue/concern/concern-backend-stack.radical +1037 -0
  14. package/dist/hub-catalogue/concern/concern-backup-recovery.radical +1560 -0
  15. package/dist/hub-catalogue/concern/concern-caching.radical +1294 -0
  16. package/dist/hub-catalogue/concern/concern-capacity.radical +915 -0
  17. package/dist/hub-catalogue/concern/concern-code-documentation.radical +1397 -0
  18. package/dist/hub-catalogue/concern/concern-code-quality-gate.radical +1409 -0
  19. package/dist/hub-catalogue/concern/concern-code-review-branching.radical +1416 -0
  20. package/dist/hub-catalogue/concern/concern-code-style.radical +1058 -0
  21. package/dist/hub-catalogue/concern/concern-communication-style.radical +1508 -0
  22. package/dist/hub-catalogue/concern/concern-data-classification.radical +970 -0
  23. package/dist/hub-catalogue/concern/concern-data-consistency.radical +1112 -0
  24. package/dist/hub-catalogue/concern/concern-data-store.radical +1282 -0
  25. package/dist/hub-catalogue/concern/concern-decomposition.radical +1318 -0
  26. package/dist/hub-catalogue/concern/concern-definition-of-done.radical +1214 -0
  27. package/dist/hub-catalogue/concern/concern-delivery-metrics.radical +966 -0
  28. package/dist/hub-catalogue/concern/concern-dependency-hygiene.radical +1345 -0
  29. package/dist/hub-catalogue/concern/concern-deployment.radical +1203 -0
  30. package/dist/hub-catalogue/concern/concern-encryption.radical +1318 -0
  31. package/dist/hub-catalogue/concern/concern-error-handling-logging.radical +1197 -0
  32. package/dist/hub-catalogue/concern/concern-eu-dora.radical +1321 -0
  33. package/dist/hub-catalogue/concern/concern-frontend-stack.radical +1647 -0
  34. package/dist/hub-catalogue/concern/concern-incident-management.radical +1204 -0
  35. package/dist/hub-catalogue/concern/concern-infrastructure.radical +2183 -0
  36. package/dist/hub-catalogue/concern/concern-integration-resilience.radical +1116 -0
  37. package/dist/hub-catalogue/concern/concern-messaging.radical +973 -0
  38. package/dist/hub-catalogue/concern/concern-module-boundaries.radical +867 -0
  39. package/dist/hub-catalogue/concern/concern-observability.radical +997 -0
  40. package/dist/hub-catalogue/concern/concern-operational-readiness.radical +1249 -0
  41. package/dist/hub-catalogue/concern/concern-personal-data.radical +1949 -0
  42. package/dist/hub-catalogue/concern/concern-quality-priorities.radical +1091 -0
  43. package/dist/hub-catalogue/concern/concern-rate-limiting.radical +1445 -0
  44. package/dist/hub-catalogue/concern/concern-release-versioning.radical +1358 -0
  45. package/dist/hub-catalogue/concern/concern-retention.radical +1399 -0
  46. package/dist/hub-catalogue/concern/concern-secrets.radical +1284 -0
  47. package/dist/hub-catalogue/concern/concern-secure-coding.radical +1379 -0
  48. package/dist/hub-catalogue/concern/concern-secure-development.radical +1245 -0
  49. package/dist/hub-catalogue/concern/concern-security-detection.radical +1153 -0
  50. package/dist/hub-catalogue/concern/concern-supply-chain.radical +1386 -0
  51. package/dist/hub-catalogue/concern/concern-technical-debt.radical +1450 -0
  52. package/dist/hub-catalogue/concern/concern-technology-lifecycle.radical +1145 -0
  53. package/dist/hub-catalogue/concern/concern-tenant-isolation.radical +1440 -0
  54. package/dist/hub-catalogue/concern/concern-test-strategy.radical +1212 -0
  55. package/dist/hub-catalogue/concern/concern-threat-modelling.radical +1143 -0
  56. package/dist/index.js +12712 -7144
  57. package/package.json +5 -3
@@ -0,0 +1,1214 @@
1
+ {
2
+ "hub": {
3
+ "id": "concern-definition-of-done",
4
+ "category": "concern",
5
+ "name": "Definition of Done and change approval",
6
+ "description": "What every change must carry before it counts as done, and who or what approves it going to production: a Definition of Done that points at the packs owning each item, peer review or a change advisory board or a release approver, segregation of duties, the emergency path, and traceability from requirement to release. The snippets are for GitHub (rulesets, environments, Actions, the GitHub CLI); GitLab's protected environments with deployment approvals are the equivalent.",
7
+ "tags": [
8
+ "sdlc",
9
+ "definition of done",
10
+ "change approval",
11
+ "segregation of duties",
12
+ "emergency change",
13
+ "traceability"
14
+ ],
15
+ "requiredMetamodel": "c4-ddd-governance-builtin",
16
+ "concern": {
17
+ "id": "definition-of-done",
18
+ "trigger": "LIST NODES WHERE (type = \"container\" OR type = \"webapp\") AND external != true",
19
+ "why": "code in these elements changes and reaches production, so what a change must carry before it counts as done, and who or what approves it going to production, has to be decided; one decision usually covers a whole repository and is bound to every element built from it.",
20
+ "group": "sdlc"
21
+ },
22
+ "sources": [
23
+ {
24
+ "title": "DORA: Streamlining change approval",
25
+ "url": "https://dora.dev/capabilities/streamlining-change-approval/"
26
+ },
27
+ {
28
+ "title": "DORA: Accelerate State of DevOps Report 2019",
29
+ "url": "https://dora.dev/research/2019/dora-report/"
30
+ },
31
+ {
32
+ "title": "Nicole Forsgren, Jez Humble, Gene Kim: Accelerate (IT Revolution)",
33
+ "url": "https://itrevolution.com/product/accelerate/"
34
+ },
35
+ {
36
+ "title": "The Scrum Guide 2020: Commitment: Definition of Done",
37
+ "url": "https://scrumguides.org/scrum-guide.html"
38
+ },
39
+ {
40
+ "title": "GitHub Docs: Managing environments for deployment (required reviewers, prevent self-review, deployment branches)",
41
+ "url": "https://docs.github.com/en/actions/managing-workflow-runs-and-deployments/managing-deployments/managing-environments-for-deployment"
42
+ },
43
+ {
44
+ "title": "GitHub Docs: REST API endpoints for deployment environments",
45
+ "url": "https://docs.github.com/en/rest/deployments/environments"
46
+ },
47
+ {
48
+ "title": "GitHub Docs: REST API endpoints for rule suites",
49
+ "url": "https://docs.github.com/en/rest/repos/rule-suites"
50
+ },
51
+ {
52
+ "title": "GitLab Docs: Deployment approvals",
53
+ "url": "https://docs.gitlab.com/ci/environments/deployment_approvals/"
54
+ },
55
+ {
56
+ "title": "Regulation (EU) 2022/2554, the EU Digital Operational Resilience Act (DORA), Article 9(4)(e)",
57
+ "url": "https://eur-lex.europa.eu/eli/reg/2022/2554/oj"
58
+ },
59
+ {
60
+ "title": "Commission Delegated Regulation (EU) 2024/1774 (ICT risk management under the EU Digital Operational Resilience Act), Article 17: ICT change management",
61
+ "url": "https://eur-lex.europa.eu/eli/reg_del/2024/1774/oj"
62
+ },
63
+ {
64
+ "title": "PCI Security Standards Council: PCI DSS v4.0.1, Requirements 6.5.1 and 6.5.4",
65
+ "url": "https://www.pcisecuritystandards.org/standards/pci-dss/"
66
+ }
67
+ ],
68
+ "templateParams": [
69
+ {
70
+ "key": "APPROVAL",
71
+ "title": "Approval",
72
+ "label": "Who or what approves a change going to production?",
73
+ "hint": "This decides whether anyone outside the team stands between a reviewed change and production. DORA's research found no evidence that approval by people outside the team lowers the change failure rate, and found that it leads to larger, slower and riskier releases; peer review recorded in the development platform meets the goal of segregation of duties. Who reviews a pull request, and how many approve it, is decided in the Code review and branching pack; this question is only about the way to production.",
74
+ "defaultValue": "peer-review",
75
+ "options": [
76
+ {
77
+ "value": "peer-review",
78
+ "label": "a peer-reviewed change with a green pipeline",
79
+ "description": "The pull request's approving reviews and a green pipeline are the approval: nothing waits for a further sign-off, and the deployment record links the change to its reviewers and its pipeline run. Pick it by default, and in a regulated firm too when the auditor accepts reviews recorded in the platform as the change approval."
80
+ },
81
+ {
82
+ "value": "cab",
83
+ "label": "a change advisory board for high-risk changes only",
84
+ "description": "Changes touching paths classified as high-risk (schema migrations, infrastructure and payments by default) also wait for a member of the change advisory board to approve their production deployment; every other change goes as with peer review. Pick it when a regulator or auditor asks for a separate approval of significant changes, or a class of changes keeps causing outages that review did not catch."
85
+ },
86
+ {
87
+ "value": "release-approver",
88
+ "label": "a named release approver for every production deployment",
89
+ "description": "Every production deployment waits for one of a short list of named approvers in the deployment environment (GitHub environment required reviewers, GitLab deployment approvals). Pick it only when a contract or regulator asks for a named sign-off on every release, or a release is a business event; it adds a wait to every deployment, and continuous deployment without a manual step (Deployment and rollback pack) is no longer possible."
90
+ }
91
+ ]
92
+ },
93
+ {
94
+ "key": "SEGREGATION",
95
+ "title": "Segregation",
96
+ "label": "Can one person put a change into production alone?",
97
+ "hint": "Segregation of duties means that whoever writes a change does not approve it, whoever starts a deployment does not approve it, and nobody can skip the approval. PCI DSS (Requirement 6.5.4) and the technical standard under the EU Digital Operational Resilience Act (Delegated Regulation (EU) 2024/1774, Article 17) ask for it; peer review covers most of it, and the rest is closing the bypasses.",
98
+ "defaultValue": "none",
99
+ "options": [
100
+ {
101
+ "value": "enforced",
102
+ "label": "author, approver and deployer kept apart",
103
+ "description": "The approver of a change is never its author and never the person who started its deployment; administrators cannot bypass the main branch's rulesets or the production environment's rules. Pick it for regulated firms (payments, banking, insurance, health, a financial-reporting audit) and for any team whose administrators merge their own changes today."
104
+ },
105
+ {
106
+ "value": "none",
107
+ "label": "no separation beyond the peer review",
108
+ "description": "The review the Code review and branching pack requires is the only separation; administrators may bypass the rules, and every bypass is posted to the team the next day. Pick it for an unregulated team small enough that an administrator is often the only person awake during an incident."
109
+ }
110
+ ]
111
+ },
112
+ {
113
+ "key": "EMERGENCY",
114
+ "title": "Emergency",
115
+ "label": "How does an emergency fix reach production?",
116
+ "hint": "An incident is when a slow path is most tempting to skip. Either the normal path is fast enough to use, or there is a recorded way around it that is reviewed afterwards; the technical standard under the EU Digital Operational Resilience Act asks that emergency changes have safeguards and be documented, assessed and approved after they are made.",
117
+ "defaultValue": "same-path",
118
+ "options": [
119
+ {
120
+ "value": "same-path",
121
+ "label": "the normal path, expedited",
122
+ "description": "The fix is a pull request like any other, labelled emergency so that the reviewer on call takes it first; the same review, pipeline and approval apply, and production accepts deployments from main only. Pick it when the pipeline from merge to production runs in about 30 minutes and a reviewer is always reachable."
123
+ },
124
+ {
125
+ "value": "break-glass",
126
+ "label": "a break-glass deployment reviewed afterwards",
127
+ "description": "A separate break-glass workflow deploys a hotfix branch without waiting for the review, the board or the release approver, with a second on-call engineer approving the run; it opens a review issue at once, and the change must be reviewed and merged to main within a set number of hours (24 by default). Pick it when the normal path takes hours (a manual approval, a long pipeline) and incidents cannot wait for it."
128
+ }
129
+ ]
130
+ },
131
+ {
132
+ "key": "TRACE",
133
+ "title": "Traceability",
134
+ "label": "Must every change name the ticket or requirement it serves?",
135
+ "hint": "An id in every pull request links requirement, commit and release, so that an auditor or the next incident can find why a line changed and which release carried it.",
136
+ "defaultValue": "ticket",
137
+ "options": [
138
+ {
139
+ "value": "ticket",
140
+ "label": "a ticket or requirement id in every pull request, checked",
141
+ "description": "Each pull request title names an id from the tracker or the requirements (a Jira key such as SHOP-123 by default), checked on the pull request; the id reaches the squash commit on main and the release. Pick it when work is planned in a tracker, or an auditor traces requirements to releases."
142
+ },
143
+ {
144
+ "value": "none",
145
+ "label": "no required ticket id",
146
+ "description": "The pull request's description says why; nothing links it to a tracker. Pick it for a small team without a tracker, or where the pull request itself is the unit of planning."
147
+ }
148
+ ]
149
+ },
150
+ {
151
+ "key": "DOD",
152
+ "title": "Definition of Done",
153
+ "label": "Where does the Definition of Done live?",
154
+ "hint": "The Definition of Done lists what every change carries before it counts as done; each item points at the pack that owns it (tests, quality gate, review, security findings, documentation, rollout) rather than setting it again. Where it lives decides whether it is checked on every change or remembered.",
155
+ "defaultValue": "template",
156
+ "options": [
157
+ {
158
+ "value": "template",
159
+ "label": "a pull request template checklist backed by required checks",
160
+ "description": "The Definition of Done is the checklist in .github/pull_request_template.md: items a machine can check name their required status check, the others are ticked by the author or marked N/A with a reason, and a check refuses the merge while an item is open. Pick it by default: the list is in front of the author and the reviewer on every change."
161
+ },
162
+ {
163
+ "value": "agreement",
164
+ "label": "a written team agreement reviewed each iteration",
165
+ "description": "The Definition of Done is a page in the repository (docs/definition-of-done.md) that the team reviews and dates every iteration; items a machine can check still name their required status check. Pick it for a team that works in iterations, keeps its working agreements together and finds a checklist in every pull request turns into noise."
166
+ }
167
+ ]
168
+ },
169
+ {
170
+ "key": "PROD_ENV",
171
+ "label": "What is the production deployment environment called (in GitHub or GitLab)?",
172
+ "defaultValue": "production"
173
+ },
174
+ {
175
+ "key": "HIGH_RISK_PATHS",
176
+ "label": "Which paths make a change high-risk, so that it goes to the board? Comma-separated from the repository root, each ending with / (a change advisory board for high-risk changes only)",
177
+ "defaultValue": "migrations/, infra/, payments/"
178
+ },
179
+ {
180
+ "key": "APPROVAL_HOURS",
181
+ "label": "Within how many working hours must a manual approval be given? (a board or a release approver only)",
182
+ "defaultValue": "8",
183
+ "type": "number"
184
+ },
185
+ {
186
+ "key": "BREAK_GLASS_HOURS",
187
+ "label": "Within how many hours must a break-glass change be reviewed and merged to main? (break-glass only; with the normal path, deployments younger than this are left to the next day's check)",
188
+ "defaultValue": "24",
189
+ "type": "number"
190
+ },
191
+ {
192
+ "key": "TICKET_PATTERN",
193
+ "label": "Which extended regular expression must a ticket or requirement id match? (ticket ids only)",
194
+ "defaultValue": "[A-Z][A-Z0-9]+-[0-9]+"
195
+ },
196
+ {
197
+ "key": "DOD_REVIEW_DAYS",
198
+ "label": "Within how many days must the team review its written Definition of Done again? (a written team agreement only)",
199
+ "defaultValue": "14",
200
+ "type": "number"
201
+ }
202
+ ]
203
+ },
204
+ "nodes": [
205
+ {
206
+ "id": "need",
207
+ "type": "need",
208
+ "label": "Every change done and approved before production",
209
+ "x": 0,
210
+ "y": 0,
211
+ "kind": "brief",
212
+ "source": "Hub concern pack: Definition of Done and change approval",
213
+ "description": "Every change to this element must arrive in production carrying the same evidence: tested, checked, reviewed, free of open security findings above the bar, documented and rolled out as the packs owning those rules decide. Someone or something accountable must have approved it going to production, no one may be able to put it there alone where the firm needs that, an emergency needs a path that is fast and still recorded, and afterwards it must be possible to show who approved what, and why the change was made. The snippets assume GitHub: the Definition of Done in .github/pull_request_template.md or docs/definition-of-done.md with its checkable items written \"(check: <status check name>)\", rulesets on main, a deployment environment for production, and workflows under .github/workflows/."
214
+ },
215
+ {
216
+ "id": "req-dod-items",
217
+ "type": "requirement",
218
+ "label": "One Definition of Done, each item owned",
219
+ "x": 260,
220
+ "y": 0,
221
+ "ears_type": "ubiquitous",
222
+ "action": "keep one Definition of Done for the element whose items each name the decision that owns them (tests, quality gate, reviews, security findings, documentation, rollout), and make every item a machine can check a required status check on the main branch",
223
+ "rationale": "The Definition of Done is the formal description of the quality an increment must have, binding on everyone who builds it (Scrum Guide 2020); naming the owning decision keeps one owner per rule, and a required check cannot be forgotten under pressure."
224
+ },
225
+ {
226
+ "id": "req-dod-template",
227
+ "type": "requirement",
228
+ "label": "Checklist complete before merge",
229
+ "x": 260,
230
+ "y": 130,
231
+ "ears_type": "event-driven",
232
+ "trigger": "a pull request is opened, edited or updated",
233
+ "action": "check its description against the Definition of Done checklist copied from .github/pull_request_template.md, and refuse the merge while the checklist is missing or an item is neither ticked nor marked N/A with a reason",
234
+ "rationale": "A checklist nobody has to complete is decoration; one that blocks the merge makes the Definition of Done the commitment the Scrum Guide says the developers must conform to (Scrum Guide 2020).",
235
+ "hubWhen": {
236
+ "DOD": [
237
+ "template"
238
+ ]
239
+ }
240
+ },
241
+ {
242
+ "id": "req-dod-agreement",
243
+ "type": "requirement",
244
+ "label": "Team agreement reviewed",
245
+ "x": 260,
246
+ "y": 260,
247
+ "ears_type": "ubiquitous",
248
+ "action": "keep the Definition of Done in docs/definition-of-done.md with a \"Last reviewed:\" date that the team moves forward at each review and that is never more than {{DOD_REVIEW_DAYS}} days old",
249
+ "rationale": "The Scrum Team creates and keeps its own Definition of Done (Scrum Guide 2020); an agreement nobody revisits drifts from what the team does, and a dated review makes the drift visible.",
250
+ "hubWhen": {
251
+ "DOD": [
252
+ "agreement"
253
+ ]
254
+ }
255
+ },
256
+ {
257
+ "id": "req-change-record",
258
+ "type": "requirement",
259
+ "label": "Every deployment traces to an approved change",
260
+ "x": 260,
261
+ "y": 390,
262
+ "ears_type": "ubiquitous",
263
+ "action": "link every production deployment to the commit it deployed, the merged pull request that commit belongs to, at least one approving review by someone other than that pull request's author, and the pipeline run that deployed it, in the platform's deployment history",
264
+ "rationale": "An approval that leaves no record can be shown neither to an auditor nor to the next incident. The EU Digital Operational Resilience Act (DORA, Regulation (EU) 2022/2554), Article 9(4)(e), asks that changes to ICT systems be recorded, tested, assessed, approved, implemented and verified in a controlled manner; DORA's capability guidance recommends recording peer review in the development platform (DORA: Streamlining change approval)."
265
+ },
266
+ {
267
+ "id": "req-peer-approval",
268
+ "type": "requirement",
269
+ "label": "The review is the approval",
270
+ "x": 260,
271
+ "y": 520,
272
+ "ears_type": "ubiquitous",
273
+ "action": "deploy a merged change to {{PROD_ENV}} with no manual approval and no wait timer beyond the reviews and the green pipeline, so that the reviewed pull request is the approval",
274
+ "rationale": "DORA's research found no evidence that approval by people outside the team lowers the change failure rate, and found that heavyweight approval leads to larger, less frequent and riskier releases (DORA: Streamlining change approval; Accelerate State of DevOps Report 2019; Accelerate).",
275
+ "hubWhen": {
276
+ "APPROVAL": [
277
+ "peer-review"
278
+ ]
279
+ }
280
+ },
281
+ {
282
+ "id": "req-cab",
283
+ "type": "requirement",
284
+ "label": "High-risk changes wait for the board",
285
+ "x": 260,
286
+ "y": 650,
287
+ "ears_type": "state-driven",
288
+ "precondition": "a merged pull request changes a file under {{HIGH_RISK_PATHS}}",
289
+ "action": "label it change:high-risk and deploy it only through the {{PROD_ENV}}-high-risk environment, whose required reviewers are the change advisory board, while every other change deploys through {{PROD_ENV}} on its reviews and green pipeline",
290
+ "rationale": "Approval from outside the team pays only where review keeps missing what goes wrong; DORA recommends finding high-risk changes early so they get extra scrutiny, and keeping the share of changes that need manual approval low (DORA: Streamlining change approval).",
291
+ "hubWhen": {
292
+ "APPROVAL": [
293
+ "cab"
294
+ ]
295
+ }
296
+ },
297
+ {
298
+ "id": "req-cab-calibrate",
299
+ "type": "requirement",
300
+ "label": "High-risk list kept short",
301
+ "x": 260,
302
+ "y": 780,
303
+ "ears_type": "ubiquitous",
304
+ "action": "compare every quarter the change failure rate of the changes the board approved with that of the other changes, and remove a path from {{HIGH_RISK_PATHS}} whose changes failed no more often than the rest",
305
+ "rationale": "DORA suggests measuring how many changes at each risk level need manual approval; a board that never sheds a class of changes only grows, and the batches waiting for it grow with it (DORA: Streamlining change approval).",
306
+ "unchecked": "the change advisory board, at its first meeting of each quarter, with the change failure rate the Delivery metrics pack measures, split by the change:high-risk label",
307
+ "hubWhen": {
308
+ "APPROVAL": [
309
+ "cab"
310
+ ]
311
+ }
312
+ },
313
+ {
314
+ "id": "req-release-approver",
315
+ "type": "requirement",
316
+ "label": "A named approver releases",
317
+ "x": 260,
318
+ "y": 910,
319
+ "ears_type": "event-driven",
320
+ "trigger": "a deployment to {{PROD_ENV}} starts",
321
+ "action": "hold it until one of the named release approvers, listed as required reviewers of the {{PROD_ENV}} environment, approves it, and keep who approved it on the run",
322
+ "rationale": "Where a contract or a regulator asks for a named sign-off on every release, the environment's required reviewers make it part of the pipeline rather than a document beside it (GitHub Docs: Managing environments for deployment; GitLab Docs: Deployment approvals).",
323
+ "hubWhen": {
324
+ "APPROVAL": [
325
+ "release-approver"
326
+ ]
327
+ }
328
+ },
329
+ {
330
+ "id": "req-segregation",
331
+ "type": "requirement",
332
+ "label": "No one deploys a change alone",
333
+ "x": 260,
334
+ "y": 1040,
335
+ "ears_type": "ubiquitous",
336
+ "action": "let no person put a change into production alone: the {{PROD_ENV}} environment prevents self-review and cannot be bypassed by administrators, the active branch rulesets list no bypass actors, and every production deployment carries an approval by someone other than the author of its pull request",
337
+ "rationale": "PCI DSS asks for documented change approval by authorised parties (Requirement 6.5.1) and for roles separated so that only reviewed and approved changes are deployed (Requirement 6.5.4); the technical standard under the EU Digital Operational Resilience Act asks that the functions approving changes be independent of those requesting and implementing them (Delegated Regulation (EU) 2024/1774, Article 17(1)(b)).",
338
+ "hubWhen": {
339
+ "SEGREGATION": [
340
+ "enforced"
341
+ ]
342
+ }
343
+ },
344
+ {
345
+ "id": "req-bypass-reported",
346
+ "type": "requirement",
347
+ "label": "Bypasses are seen",
348
+ "x": 260,
349
+ "y": 1170,
350
+ "ears_type": "event-driven",
351
+ "trigger": "someone pushes or merges to main past its rulesets",
352
+ "action": "post the bypass with the person, the time and the commits to the team within 1 working day",
353
+ "rationale": "Without enforced segregation a bypass is allowed, but it must not go unseen; the rule-suite history records every bypass with its actor and commits (GitHub Docs: REST API endpoints for rule suites).",
354
+ "hubWhen": {
355
+ "SEGREGATION": [
356
+ "none"
357
+ ]
358
+ }
359
+ },
360
+ {
361
+ "id": "req-emergency-path",
362
+ "type": "requirement",
363
+ "label": "Emergency fixes take the normal path",
364
+ "x": 260,
365
+ "y": 1300,
366
+ "ears_type": "event-driven",
367
+ "trigger": "a fix for a production incident is needed",
368
+ "action": "ship it as a pull request labelled emergency through the same reviews, pipeline and approval as every change, with {{PROD_ENV}} accepting deployments from the main branch only",
369
+ "rationale": "One path into production means that an emergency fix carries the same safeguards and leaves the same record as any change, which is what the technical standard under the EU Digital Operational Resilience Act asks of emergency changes (Delegated Regulation (EU) 2024/1774, Article 17(1)(f)).",
370
+ "hubWhen": {
371
+ "EMERGENCY": [
372
+ "same-path"
373
+ ]
374
+ }
375
+ },
376
+ {
377
+ "id": "req-break-glass",
378
+ "type": "requirement",
379
+ "label": "Break-glass reviewed afterwards",
380
+ "x": 260,
381
+ "y": 1430,
382
+ "ears_type": "event-driven",
383
+ "trigger": "an incident needs a fix in production faster than the normal path allows",
384
+ "action": "deploy it from a hotfix/ branch only through the break-glass workflow approved by a second on-call engineer, open a break-glass-review issue naming the commit before the deployment, and have the change reviewed, merged to main and the issue closed within {{BREAK_GLASS_HOURS}} hours",
385
+ "rationale": "The technical standard under the EU Digital Operational Resilience Act asks for emergency changes to have adequate safeguards and to be documented, re-evaluated, assessed and approved after they are implemented (Delegated Regulation (EU) 2024/1774, Article 17(1)(f) and (g)); a review issue with a deadline turns \"afterwards\" into a date.",
386
+ "hubWhen": {
387
+ "EMERGENCY": [
388
+ "break-glass"
389
+ ]
390
+ }
391
+ },
392
+ {
393
+ "id": "req-ticket",
394
+ "type": "requirement",
395
+ "label": "Every change names its ticket",
396
+ "x": 260,
397
+ "y": 1560,
398
+ "ears_type": "ubiquitous",
399
+ "action": "name a ticket or requirement id matching {{TICKET_PATTERN}} in the title of every pull request opened by a person, and refuse the merge without one, so that the commit on main and the release that carries it name the id",
400
+ "rationale": "An id in every change links requirement, commit and release, which is how an auditor or the next incident finds why a line changed; the EU Digital Operational Resilience Act asks that changes to ICT systems be recorded (Regulation (EU) 2022/2554, Article 9(4)(e)).",
401
+ "hubWhen": {
402
+ "TRACE": [
403
+ "ticket"
404
+ ]
405
+ }
406
+ },
407
+ {
408
+ "id": "sc-dod-items",
409
+ "type": "scenario",
410
+ "label": "Dropped check noticed",
411
+ "x": 520,
412
+ "y": 0,
413
+ "given": "a Definition of Done with the item \"Tests of the Test strategy pass (check: test)\"",
414
+ "when": "the check \"test\" is removed from the rulesets on main and the weekly comparison runs",
415
+ "then": "the comparison fails naming \"test\""
416
+ },
417
+ {
418
+ "id": "sc-dod-template",
419
+ "type": "scenario",
420
+ "label": "Open item blocks merge",
421
+ "x": 520,
422
+ "y": 130,
423
+ "given": "a pull request whose description leaves \"Documentation updated\" unticked",
424
+ "when": "the definition-of-done check runs",
425
+ "then": "it fails naming the item; ticking it, or writing \"N/A: no public behaviour changed\", makes it pass",
426
+ "hubWhen": {
427
+ "DOD": [
428
+ "template"
429
+ ]
430
+ }
431
+ },
432
+ {
433
+ "id": "sc-dod-agreement",
434
+ "type": "scenario",
435
+ "label": "Stale agreement flagged",
436
+ "x": 520,
437
+ "y": 260,
438
+ "given": "docs/definition-of-done.md last reviewed more than {{DOD_REVIEW_DAYS}} days ago",
439
+ "when": "the weekly check runs",
440
+ "then": "it fails until the team reviews the page and moves the date",
441
+ "hubWhen": {
442
+ "DOD": [
443
+ "agreement"
444
+ ]
445
+ }
446
+ },
447
+ {
448
+ "id": "sc-change-record",
449
+ "type": "scenario",
450
+ "label": "Unapproved deployment found",
451
+ "x": 520,
452
+ "y": 390,
453
+ "given": "the production deployments of the last 30 days, one of them from a pull request approved only by its author",
454
+ "when": "the daily change-record job runs",
455
+ "then": "it fails naming that deployment's commit and pull request, and passes for the others"
456
+ },
457
+ {
458
+ "id": "sc-peer-approval",
459
+ "type": "scenario",
460
+ "label": "No sign-off after review",
461
+ "x": 520,
462
+ "y": 520,
463
+ "given": "a pull request that is approved and green",
464
+ "when": "it is merged",
465
+ "then": "its deployment to {{PROD_ENV}} starts without waiting for a person, and the {{PROD_ENV}} environment has no required reviewers and no wait timer",
466
+ "hubWhen": {
467
+ "APPROVAL": [
468
+ "peer-review"
469
+ ]
470
+ }
471
+ },
472
+ {
473
+ "id": "sc-cab",
474
+ "type": "scenario",
475
+ "label": "Board sees only high-risk",
476
+ "x": 520,
477
+ "y": 650,
478
+ "given": "one pull request changing a file under {{HIGH_RISK_PATHS}} and another changing only other files",
479
+ "when": "both are merged",
480
+ "then": "the first is labelled change:high-risk and waits for a board member in {{PROD_ENV}}-high-risk; the second deploys through {{PROD_ENV}} without waiting",
481
+ "hubWhen": {
482
+ "APPROVAL": [
483
+ "cab"
484
+ ]
485
+ }
486
+ },
487
+ {
488
+ "id": "sc-cab-calibrate",
489
+ "type": "scenario",
490
+ "label": "Quarterly comparison recorded",
491
+ "x": 520,
492
+ "y": 780,
493
+ "given": "a quarter of production deployments, split into high-risk and other",
494
+ "when": "the board meets at the start of the next quarter",
495
+ "then": "its minutes record both change failure rates and, for each path, whether it stays on the list and why",
496
+ "hubWhen": {
497
+ "APPROVAL": [
498
+ "cab"
499
+ ]
500
+ }
501
+ },
502
+ {
503
+ "id": "sc-release-approver",
504
+ "type": "scenario",
505
+ "label": "Deployment waits for approver",
506
+ "x": 520,
507
+ "y": 910,
508
+ "given": "a merged change",
509
+ "when": "its deployment job to {{PROD_ENV}} starts",
510
+ "then": "the job waits until a release approver approves, and the run shows who approved it",
511
+ "hubWhen": {
512
+ "APPROVAL": [
513
+ "release-approver"
514
+ ]
515
+ }
516
+ },
517
+ {
518
+ "id": "sc-segregation",
519
+ "type": "scenario",
520
+ "label": "Bypass setting caught",
521
+ "x": 520,
522
+ "y": 1040,
523
+ "given": "an administrator who turns on administrator bypass for {{PROD_ENV}}",
524
+ "when": "the daily segregation check runs",
525
+ "then": "it fails naming the setting, and passes again only when the bypass is off, self-review is prevented and no ruleset lists a bypass actor",
526
+ "hubWhen": {
527
+ "SEGREGATION": [
528
+ "enforced"
529
+ ]
530
+ }
531
+ },
532
+ {
533
+ "id": "sc-bypass-reported",
534
+ "type": "scenario",
535
+ "label": "Bypass posted",
536
+ "x": 520,
537
+ "y": 1170,
538
+ "given": "an administrator who merges a pull request to main past the required review",
539
+ "when": "the daily bypass report runs",
540
+ "then": "the team channel receives the bypass with the administrator, the time and the commits",
541
+ "hubWhen": {
542
+ "SEGREGATION": [
543
+ "none"
544
+ ]
545
+ }
546
+ },
547
+ {
548
+ "id": "sc-emergency-path",
549
+ "type": "scenario",
550
+ "label": "Hotfix branch refused",
551
+ "x": 520,
552
+ "y": 1300,
553
+ "given": "an engineer who runs the deploy workflow from a hotfix branch during an incident",
554
+ "when": "the deployment job asks for the {{PROD_ENV}} environment",
555
+ "then": "GitHub refuses it because the branch is not main, and the fix has to go through a pull request",
556
+ "hubWhen": {
557
+ "EMERGENCY": [
558
+ "same-path"
559
+ ]
560
+ }
561
+ },
562
+ {
563
+ "id": "sc-break-glass",
564
+ "type": "scenario",
565
+ "label": "Overdue break-glass flagged",
566
+ "x": 520,
567
+ "y": 1430,
568
+ "given": "a break-glass deployment whose review issue is still open",
569
+ "when": "{{BREAK_GLASS_HOURS}} hours have passed and the hourly check runs",
570
+ "then": "the check fails naming the issue, until the change is merged to main and the issue closed",
571
+ "hubWhen": {
572
+ "EMERGENCY": [
573
+ "break-glass"
574
+ ]
575
+ }
576
+ },
577
+ {
578
+ "id": "sc-ticket",
579
+ "type": "scenario",
580
+ "label": "Title without id refused",
581
+ "x": 520,
582
+ "y": 1560,
583
+ "given": "a pull request titled \"fix: apply coupon once\"",
584
+ "when": "the ticket-id check runs",
585
+ "then": "it fails; retitled \"fix: apply coupon once (SHOP-123)\", it passes",
586
+ "hubWhen": {
587
+ "TRACE": [
588
+ "ticket"
589
+ ]
590
+ }
591
+ },
592
+ {
593
+ "id": "adr-peer-approval",
594
+ "type": "adr",
595
+ "label": "A reviewed, green change is approved for production",
596
+ "x": 780,
597
+ "y": 0,
598
+ "concern": "definition-of-done",
599
+ "status": "accepted",
600
+ "date": "",
601
+ "context": "Every change to this element travels from a pull request to production, and somewhere on the way someone decides that it is done and may go. The forces: a Definition of Done kept in people's heads is applied unevenly, and one that repeats the rules of other packs drifts away from them; approval by people outside the team feels safe, but DORA's research (dora.dev) finds that it slows delivery and leads to larger, riskier batches without lowering the change failure rate; regulators and auditors still ask that no one can put a change into production alone, and that every change is recorded and approved; an incident is exactly when a slow path gets skipped, so the emergency path has to be designed rather than improvised; and a change nobody can trace back to its reason costs hours in the next incident. The snippets assume GitHub: rulesets on main (kept by the Code review and branching pack), a deployment environment for production, GitHub Actions workflows under .github/workflows/ and the GitHub CLI with jq in scheduled jobs; GitLab's protected environments with deployment approvals do the same.",
602
+ "decision": "A change is approved for production by its pull request: the approving reviews the Code review and branching decision requires, and a green pipeline. No further sign-off stands between the merge and the deployment: the {{PROD_ENV}} GitHub environment has no required reviewers and no wait timer (on GitLab, the protected environment has no approval rules). The deployment history links each deployed commit to its pull request, its approvers and the pipeline run, and that is the change record an auditor reads. The Definition of Done is kept as {{DOD}}. Each of its items names the decision that owns it instead of setting it again: the tests of the Test strategy decision, the Code quality gate, the reviews and their number of the Code review and branching decision, the open findings of the Secure coding decision, the documentation of the Code documentation decision and the rollout of the Deployment and rollback decision. Every item a machine can check is written \"(check: <status check name>)\" and is a required status check on main. Segregation of duties: {{SEGREGATION}}. Emergency fixes: {{EMERGENCY}}. Traceability: {{TRACE}}.",
603
+ "consequences": "• Nothing waits for a meeting or a signature: a reviewed change reaches production as fast as the pipeline and the rollout allow.\n• The review carries the weight of the approval, so a rubber-stamp review is a rubber-stamp approval; the Code review and branching pack's limits on size and turnaround are what keep reviews real.\n• An auditor who expects a separate approval has to accept the review recorded in the platform as the approval; agree on that before the audit, not during it.\n• A class of changes that keeps failing despite review gets no extra gate until this decision is revisited.",
604
+ "alternatives": "1. A change advisory board for high-risk changes only: extra scrutiny where review keeps missing problems, at the price of a wait for those changes.\n2. A named release approver for every deployment: a signature on every release, and a queue in front of every deployment.\n3. A change advisory board for every change: DORA's research finds it slows delivery without lowering the change failure rate.",
605
+ "hubWhen": {
606
+ "APPROVAL": [
607
+ "peer-review"
608
+ ]
609
+ }
610
+ },
611
+ {
612
+ "id": "adr-cab",
613
+ "type": "adr",
614
+ "label": "High-risk changes also go to the change advisory board",
615
+ "x": 780,
616
+ "y": 130,
617
+ "concern": "definition-of-done",
618
+ "status": "accepted",
619
+ "date": "",
620
+ "context": "Every change to this element travels from a pull request to production, and somewhere on the way someone decides that it is done and may go. The forces: a Definition of Done kept in people's heads is applied unevenly, and one that repeats the rules of other packs drifts away from them; approval by people outside the team feels safe, but DORA's research (dora.dev) finds that it slows delivery and leads to larger, riskier batches without lowering the change failure rate; regulators and auditors still ask that no one can put a change into production alone, and that every change is recorded and approved; an incident is exactly when a slow path gets skipped, so the emergency path has to be designed rather than improvised; and a change nobody can trace back to its reason costs hours in the next incident. The snippets assume GitHub: rulesets on main (kept by the Code review and branching pack), a deployment environment for production, GitHub Actions workflows under .github/workflows/ and the GitHub CLI with jq in scheduled jobs; GitLab's protected environments with deployment approvals do the same.",
621
+ "decision": "A change is approved for production by its pull request (the reviews the Code review and branching decision requires and a green pipeline), and a change that touches {{HIGH_RISK_PATHS}} is approved by the change advisory board as well. The deploy workflow labels such a pull request change:high-risk on merge and deploys it through the {{PROD_ENV}}-high-risk GitHub environment, whose required reviewers are the board's members (on GitLab, a protected environment with an approval rule for the board's group); every other change deploys through {{PROD_ENV}} without waiting. The board decides within {{APPROVAL_HOURS}} working hours from the pull request, its pipeline run and the rollout plan, with no separate form, and once a quarter compares the change failure rate of the changes it approved with the rest and drops a path whose changes fail no more often. The Definition of Done is kept as {{DOD}}. Each of its items names the decision that owns it instead of setting it again: the tests of the Test strategy decision, the Code quality gate, the reviews and their number of the Code review and branching decision, the open findings of the Secure coding decision, the documentation of the Code documentation decision and the rollout of the Deployment and rollback decision. Every item a machine can check is written \"(check: <status check name>)\" and is a required status check on main. Segregation of duties: {{SEGREGATION}}. Emergency fixes: {{EMERGENCY}}. Traceability: {{TRACE}}.",
622
+ "consequences": "• Most changes flow as with peer review; only the classified ones wait, up to {{APPROVAL_HOURS}} working hours.\n• The board sees what review keeps missing only if the classification is right: a list of paths is coarse, and a risky change outside it goes through unseen.\n• Changes that wait tend to grow into larger batches, which DORA's research links to more risk; the quarterly comparison is what keeps the list short.\n• The board's members must be reachable within the deadline, holidays included.",
623
+ "alternatives": "1. Peer review and a green pipeline as the only approval: the fastest, and enough when review catches what goes wrong.\n2. A named release approver for every deployment: one gate for every change instead of a board for some.\n3. A board for every change: DORA's research finds no lower change failure rate for it, and slower delivery.",
624
+ "hubWhen": {
625
+ "APPROVAL": [
626
+ "cab"
627
+ ]
628
+ }
629
+ },
630
+ {
631
+ "id": "adr-release-approver",
632
+ "type": "adr",
633
+ "label": "A named release approver approves every production deployment",
634
+ "x": 780,
635
+ "y": 260,
636
+ "concern": "definition-of-done",
637
+ "status": "accepted",
638
+ "date": "",
639
+ "context": "Every change to this element travels from a pull request to production, and somewhere on the way someone decides that it is done and may go. The forces: a Definition of Done kept in people's heads is applied unevenly, and one that repeats the rules of other packs drifts away from them; approval by people outside the team feels safe, but DORA's research (dora.dev) finds that it slows delivery and leads to larger, riskier batches without lowering the change failure rate; regulators and auditors still ask that no one can put a change into production alone, and that every change is recorded and approved; an incident is exactly when a slow path gets skipped, so the emergency path has to be designed rather than improvised; and a change nobody can trace back to its reason costs hours in the next incident. The snippets assume GitHub: rulesets on main (kept by the Code review and branching pack), a deployment environment for production, GitHub Actions workflows under .github/workflows/ and the GitHub CLI with jq in scheduled jobs; GitLab's protected environments with deployment approvals do the same.",
640
+ "decision": "Every deployment to production waits for one of the named release approvers: the {{PROD_ENV}} GitHub environment lists them as required reviewers (up to six people or teams, of whom one must approve), and the deployment job waits until one does; on GitLab, the protected environment has an approval rule naming them. The approver decides within {{APPROVAL_HOURS}} working hours from the pull requests in the release, their pipeline runs and the rollout plan, and the approval stays on the run. The change itself is still approved for merge by the reviews the Code review and branching decision requires. The Definition of Done is kept as {{DOD}}. Each of its items names the decision that owns it instead of setting it again: the tests of the Test strategy decision, the Code quality gate, the reviews and their number of the Code review and branching decision, the open findings of the Secure coding decision, the documentation of the Code documentation decision and the rollout of the Deployment and rollback decision. Every item a machine can check is written \"(check: <status check name>)\" and is a required status check on main. Segregation of duties: {{SEGREGATION}}. Emergency fixes: {{EMERGENCY}}. Traceability: {{TRACE}}.",
641
+ "consequences": "• Every release carries a named person's approval, which is what some contracts and auditors ask for.\n• Every deployment waits for a person: continuous deployment of every merge without a manual step, as the Deployment and rollback pack may decide, is ruled out, and releases tend to batch up, which DORA's research links to more failures, not fewer.\n• The approver sees a release, not each change; the approval adds little to the reviews unless the approver checks something they cannot (a business date, a customer notice).\n• The approvers become a queue and a single point of failure; keep at least three, across time zones if the team spans them.",
642
+ "alternatives": "1. Peer review and a green pipeline as the approval: no wait, and the same evidence in the platform.\n2. A change advisory board for high-risk changes only: the wait only where it buys something.\n3. A sign-off by e-mail or in a ticket: no wait in the pipeline, but nothing stops a deployment without it.",
643
+ "hubWhen": {
644
+ "APPROVAL": [
645
+ "release-approver"
646
+ ]
647
+ }
648
+ },
649
+ {
650
+ "id": "adr-segregation",
651
+ "type": "adr",
652
+ "label": "No one puts a change into production alone",
653
+ "x": 780,
654
+ "y": 390,
655
+ "concern": "definition-of-done",
656
+ "status": "accepted",
657
+ "date": "",
658
+ "context": "Every change to this element travels from a pull request to production, and somewhere on the way someone decides that it is done and may go. The forces: a Definition of Done kept in people's heads is applied unevenly, and one that repeats the rules of other packs drifts away from them; approval by people outside the team feels safe, but DORA's research (dora.dev) finds that it slows delivery and leads to larger, riskier batches without lowering the change failure rate; regulators and auditors still ask that no one can put a change into production alone, and that every change is recorded and approved; an incident is exactly when a slow path gets skipped, so the emergency path has to be designed rather than improvised; and a change nobody can trace back to its reason costs hours in the next incident. The snippets assume GitHub: rulesets on main (kept by the Code review and branching pack), a deployment environment for production, GitHub Actions workflows under .github/workflows/ and the GitHub CLI with jq in scheduled jobs; GitLab's protected environments with deployment approvals do the same. Here segregation of duties is asked for, by an auditor, a regulator or the team's own view of the risk.",
659
+ "decision": "No person can put a change into production alone. The author of a change never approves it: the rulesets on main require an approval from someone else (the Code review and branching decision) and list no bypass actors, so neither repository nor organisation administrators can merge past them. No one approves a deployment they started: every GitHub environment with required reviewers has Prevent self-review on (on GitLab, \"Allow pipeline triggerer to approve deployment\" stays off), and \"Allow administrators to bypass configured protection rules\" is off for {{PROD_ENV}}. No person holds credentials that deploy to production outside the pipeline, which deploys with its own short-lived OpenID Connect identity. This is the separation PCI DSS Requirement 6.5.4 and the technical standard under the EU Digital Operational Resilience Act (Delegated Regulation (EU) 2024/1774, Article 17(1)(b)) ask for, met with peer review recorded in the platform as DORA's capability guidance recommends.",
660
+ "consequences": "• An administrator cannot fix a broken ruleset or a stuck deployment alone; that takes a second person, at night too, so the emergency path ({{EMERGENCY}}) must not depend on a bypass.\n• A team of one or two cannot ship while one of them is away; segregation needs at least three people who can review and approve.\n• Bypassing is impossible rather than reported, so a mistake in the rules blocks everyone until two people fix it.\n• The daily check needs a token with write access to the rulesets, a secret to guard in its own right.",
661
+ "alternatives": "1. No separation beyond the peer review, with every bypass reported: simpler for a small team, and not what a regulator accepts.\n2. A quarterly manual review of who can bypass: finds a bypass months after it was used.",
662
+ "hubWhen": {
663
+ "SEGREGATION": [
664
+ "enforced"
665
+ ]
666
+ }
667
+ },
668
+ {
669
+ "id": "adr-break-glass",
670
+ "type": "adr",
671
+ "label": "Emergency fixes may break glass and are reviewed afterwards",
672
+ "x": 780,
673
+ "y": 520,
674
+ "concern": "definition-of-done",
675
+ "status": "accepted",
676
+ "date": "",
677
+ "context": "Every change to this element travels from a pull request to production, and somewhere on the way someone decides that it is done and may go. The forces: a Definition of Done kept in people's heads is applied unevenly, and one that repeats the rules of other packs drifts away from them; approval by people outside the team feels safe, but DORA's research (dora.dev) finds that it slows delivery and leads to larger, riskier batches without lowering the change failure rate; regulators and auditors still ask that no one can put a change into production alone, and that every change is recorded and approved; an incident is exactly when a slow path gets skipped, so the emergency path has to be designed rather than improvised; and a change nobody can trace back to its reason costs hours in the next incident. The snippets assume GitHub: rulesets on main (kept by the Code review and branching pack), a deployment environment for production, GitHub Actions workflows under .github/workflows/ and the GitHub CLI with jq in scheduled jobs; GitLab's protected environments with deployment approvals do the same.",
678
+ "decision": "An incident fix that cannot wait for the normal path is deployed through a break-glass workflow (workflow_dispatch in .github/workflows/break-glass.yml) from a hotfix/ branch. Its deployment job uses the {{PROD_ENV}}-break-glass GitHub environment, which accepts hotfix/* branches only and whose required reviewers are the on-call engineers with Prevent self-review on, so a second on-call engineer approves the run within minutes. It skips the review and any manual approval of the production deployment, never the build and the unit tests. Before it deploys, the workflow opens an issue labelled break-glass-review naming the commit, the incident and who approved; within {{BREAK_GLASS_HOURS}} hours the change goes through a normal pull request with the whole Definition of Done, is merged to main, and the issue is closed with a link to it. Each use is discussed in the incident review. This is the documentation, re-evaluation and approval after implementation that the technical standard under the EU Digital Operational Resilience Act asks of emergency changes (Delegated Regulation (EU) 2024/1774, Article 17(1)(g)).",
679
+ "consequences": "• An incident is fixed in minutes even when the normal path takes hours.\n• Two people still act together, so segregation of duties holds where it is decided.\n• A hotfix deployed but not yet merged is overwritten by the next normal deployment; hold normal deployments until it is merged, which the {{BREAK_GLASS_HOURS}}-hour limit keeps short.\n• Every use says the normal path is too slow; frequent use means that path needs fixing, not more glass.",
680
+ "alternatives": "1. The normal path, expedited: one path into production, which works when the pipeline takes minutes and a reviewer is always reachable.\n2. An administrator bypassing the rules: fast, but unseen unless reported, and impossible where segregation is enforced.\n3. Direct access to production for the engineer on call: the fastest, and the change is in neither the history nor the record.",
681
+ "hubWhen": {
682
+ "EMERGENCY": [
683
+ "break-glass"
684
+ ]
685
+ }
686
+ },
687
+ {
688
+ "id": "ff-dod-required",
689
+ "type": "fitness-fn",
690
+ "label": "Definition of Done checks are required on main",
691
+ "x": 1040,
692
+ "y": 0,
693
+ "characteristic": "maintainability",
694
+ "scope": "atomic",
695
+ "cadence": "triggered",
696
+ "trigger": "nightly",
697
+ "invocation": "automated",
698
+ "description": "A scheduled job, and every pull request that changes the Definition of Done, reads the items written \"(check: <status check name>)\" and the required status checks in force on main through the GitHub rulesets API, and fails naming each item the rulesets do not require. The checks belong to their owners: test (Test strategy), quality-gate (Code quality gate), the security scan (Secure coding) and the docs build (Code documentation); definition-of-done and ticket-id come from this pack; the reviews are the rulesets' pull_request rule (Code review and branching), and the rollout is the deploy job (Deployment and rollback). Set DOD_FILE to docs/definition-of-done.md for a written team agreement.\n\nThreshold: Every item of the Definition of Done written \"(check: name)\" is a required status check on main; 0 missing\n\nTool: GitHub CLI (gh api) and jq in a scheduled GitHub Actions job\n\n```bash\n#!/usr/bin/env bash\n# weekly, and on every change to the Definition of Done: each \"(check: name)\" item is a required status check on main\n# template lines look like: - [ ] Tests of the Test strategy pass (check: test)\nset -euo pipefail\ndod=${DOD_FILE:-.github/pull_request_template.md} # docs/definition-of-done.md for a written team agreement\nwanted=$(grep -oE '\\(check: [^)]+\\)' \"$dod\" | sed -E 's/^\\(check: (.*)\\)$/\\1/' | sort -u || true)\n[ -n \"$wanted\" ] || { echo \"$dod names no (check: ...) item\"; exit 1; }\nrequired=$(gh api \"repos/$GITHUB_REPOSITORY/rules/branches/main\" \\\n --jq '.[] | select(.type == \"required_status_checks\") | .parameters.required_status_checks[].context' | sort -u)\nmissing=$(comm -23 <(echo \"$wanted\") <(echo \"$required\"))\n[ -z \"$missing\" ] || { echo \"Definition of Done items that are not required checks on main:\"; echo \"$missing\"; exit 1; }\necho \"every checkable item of the Definition of Done is required on main\"\n```"
699
+ },
700
+ {
701
+ "id": "ff-dod-checklist",
702
+ "type": "fitness-fn",
703
+ "label": "Checklist complete before merge",
704
+ "x": 1040,
705
+ "y": 130,
706
+ "characteristic": "maintainability",
707
+ "scope": "atomic",
708
+ "cadence": "triggered",
709
+ "trigger": "pull-request",
710
+ "invocation": "manual",
711
+ "description": "A workflow runs on every change to the pull request, its description included, reads the \"## Definition of Done\" section copied from .github/pull_request_template.md and fails on any item that is open and not marked N/A with a reason. It is the required check definition-of-done on main, so an open item blocks the merge; ticking an item is the author's statement, and the reviewer sees it.\n\nThreshold: 0 items in the \"## Definition of Done\" section of the pull request description that are unticked and not marked \"N/A: \" with a reason of at least 10 characters; the check fails when the section is missing\n\nTool: GitHub Actions (pull_request, the edited type included) with jq\n\n```yaml\n# .github/workflows/definition-of-done.yml, listed as the required check \"definition-of-done\" on main\nname: definition-of-done\non:\n pull_request:\n types: [opened, edited, synchronize, reopened, ready_for_review]\npermissions:\n contents: read\njobs:\n definition-of-done:\n runs-on: ubuntu-latest\n steps:\n - name: Every item ticked, or marked N/A with a reason\n run: |\n body=$(jq -r '.pull_request.body // \"\"' \"$GITHUB_EVENT_PATH\" | tr -d '\\r')\n grep -q '^## Definition of Done' <<< \"$body\" \\\n || { echo \"::error::the Definition of Done checklist of .github/pull_request_template.md is missing\"; exit 1; }\n open=$(sed -n '/^## Definition of Done/,/^## /p' <<< \"$body\" | grep -E '^[[:space:]]*- \\[ \\]' | grep -vE 'N/A: .{10,}' || true)\n [ -z \"$open\" ] || { echo \"::error::unticked Definition of Done items:\"; echo \"$open\"; exit 1; }\n```",
712
+ "hubWhen": {
713
+ "DOD": [
714
+ "template"
715
+ ]
716
+ }
717
+ },
718
+ {
719
+ "id": "ff-dod-reviewed",
720
+ "type": "fitness-fn",
721
+ "label": "Team agreement reviewed on time",
722
+ "x": 1040,
723
+ "y": 260,
724
+ "characteristic": "maintainability",
725
+ "scope": "atomic",
726
+ "cadence": "temporal",
727
+ "every": "{{DOD_REVIEW_DAYS}}d",
728
+ "invocation": "manual",
729
+ "description": "A weekly job reads the review date that the team moves forward at each review (in its retrospective, through a pull request like any change) and fails when it is older than the limit, so a forgotten agreement shows as a red job rather than as drift.\n\nThreshold: The \"Last reviewed:\" date in docs/definition-of-done.md is at most {{DOD_REVIEW_DAYS}} days old, and the page names at least 1 required check\n\nTool: Bash with GNU date in a scheduled GitHub Actions job\n\n```bash\n#!/usr/bin/env bash\n# weekly: the written Definition of Done was reviewed within the last {{DOD_REVIEW_DAYS}} days and still names its checks\nset -euo pipefail\npage=docs/definition-of-done.md # holds a line \"Last reviewed: 2026-10-20\", moved forward at each review\nreviewed=$(grep -oE '^Last reviewed: [0-9]{4}-[0-9]{2}-[0-9]{2}' \"$page\" | cut -d' ' -f3 || true)\n[ -n \"$reviewed\" ] || { echo \"$page has no 'Last reviewed: YYYY-MM-DD' line\"; exit 1; }\nage=$(( ( $(date -u +%s) - $(date -u -d \"$reviewed\" +%s) ) / 86400 )) # GNU date, as on ubuntu-latest\n[ \"$age\" -le {{DOD_REVIEW_DAYS}} ] || { echo \"Definition of Done last reviewed $age days ago, limit {{DOD_REVIEW_DAYS}}\"; exit 1; }\ngrep -qE '\\(check: [^)]+\\)' \"$page\" || { echo \"$page names no required check\"; exit 1; }\necho \"Definition of Done reviewed $age days ago\"\n```",
730
+ "hubWhen": {
731
+ "DOD": [
732
+ "agreement"
733
+ ]
734
+ }
735
+ },
736
+ {
737
+ "id": "ff-change-record",
738
+ "type": "fitness-fn",
739
+ "label": "Every deployment traces to an approved change",
740
+ "x": 1040,
741
+ "y": 390,
742
+ "characteristic": "maintainability",
743
+ "scope": "atomic",
744
+ "cadence": "triggered",
745
+ "trigger": "nightly",
746
+ "invocation": "automated",
747
+ "description": "A daily job lists the deployments to {{PROD_ENV}} through the deployments API (GitHub Actions creates one for every job that names the environment), finds the merged pull request of each deployed commit and its reviews, and fails naming every deployment without an approval from someone other than the author. Deployments younger than {{BREAK_GLASS_HOURS}} hours are left to a later run, so that a break-glass change has its time to be reviewed and merged. The deployment, its run and its pull request together are the change record.\n\nThreshold: Every deployment to {{PROD_ENV}} of the last 30 days and older than {{BREAK_GLASS_HOURS}} hours belongs to a merged pull request with at least 1 approving review by someone other than its author; 0 without\n\nTool: GitHub CLI (gh api) and jq in a scheduled GitHub Actions job (GNU date)\n\n```bash\n#!/usr/bin/env bash\n# daily: every production deployment of the last 30 days leads to a merged pull request approved by someone other than its author\nset -euo pipefail\nrepo=$GITHUB_REPOSITORY\nsince=$(date -u -d '30 days ago' +%FT%TZ) # GNU date, as on ubuntu-latest\ngrace=$(date -u -d '{{BREAK_GLASS_HOURS}} hours ago' +%FT%TZ) # a break-glass change has this long to be reviewed and merged\nfailed=0\nfor sha in $(gh api --paginate \"repos/$repo/deployments?environment={{PROD_ENV}}&per_page=100\" \\\n --jq \".[] | select(.created_at >= \\\"$since\\\" and .created_at <= \\\"$grace\\\") | .sha\" | sort -u); do\n pr=$(gh api \"repos/$repo/commits/$sha/pulls\" --jq '[.[] | select(.merged_at != null)][0] | \"\\(.number) \\(.user.login)\"')\n if [ \"$pr\" = \"null null\" ]; then echo \"::error::$sha was deployed without a merged pull request\"; failed=1; continue; fi\n read -r number author <<< \"$pr\"\n approvers=$(gh api --paginate \"repos/$repo/pulls/$number/reviews\" \\\n --jq \".[] | select(.state == \\\"APPROVED\\\" and .user.login != \\\"$author\\\") | .user.login\")\n [ -n \"$approvers\" ] || { echo \"::error::$sha (#$number) has no approval from anyone but its author $author\"; failed=1; }\ndone\nexit $failed\n```"
748
+ },
749
+ {
750
+ "id": "ff-no-manual-gate",
751
+ "type": "fitness-fn",
752
+ "label": "No sign-off after the review",
753
+ "x": 1040,
754
+ "y": 520,
755
+ "characteristic": "maintainability",
756
+ "scope": "atomic",
757
+ "cadence": "triggered",
758
+ "trigger": "nightly",
759
+ "invocation": "automated",
760
+ "description": "A daily job reads the protection rules of the {{PROD_ENV}} environment and fails when someone adds required reviewers or a wait timer, which would put a manual approval back between a reviewed change and production without superseding the decision.\n\nThreshold: The {{PROD_ENV}} environment has 0 required reviewers and no wait timer\n\nTool: GitHub CLI (gh api) and jq in a scheduled GitHub Actions job\n\n```bash\n#!/usr/bin/env bash\n# daily: the {{PROD_ENV}} environment adds no manual approval and no wait to a reviewed, green change\nset -euo pipefail\nrules=$(gh api \"repos/$GITHUB_REPOSITORY/environments/{{PROD_ENV}}\" --jq '.protection_rules')\njq -e 'map(select(.type == \"required_reviewers\")) | length == 0' <<< \"$rules\" > /dev/null \\\n || { echo \"{{PROD_ENV}} has required reviewers; the reviewed pull request is the approval\"; exit 1; }\njq -e 'map(select((.wait_timer // 0) > 0)) | length == 0' <<< \"$rules\" > /dev/null \\\n || { echo \"{{PROD_ENV}} has a wait timer\"; exit 1; }\necho \"{{PROD_ENV}} deploys on the review and the green pipeline alone\"\n```",
761
+ "hubWhen": {
762
+ "APPROVAL": [
763
+ "peer-review"
764
+ ]
765
+ }
766
+ },
767
+ {
768
+ "id": "ff-high-risk",
769
+ "type": "fitness-fn",
770
+ "label": "High-risk changes wait for the board",
771
+ "x": 1040,
772
+ "y": 650,
773
+ "characteristic": "maintainability",
774
+ "scope": "atomic",
775
+ "cadence": "triggered",
776
+ "trigger": "deploy",
777
+ "invocation": "manual",
778
+ "description": "The deploy workflow, .github/workflows/deploy.yml, classifies the merged pull request by the paths it changed, labels it, and picks the environment of the deployment job with an expression over the needs context, which GitHub Actions allows for a job's environment; the board's environment holds the job until a board member approves.\n\nThreshold: Every merged change touching {{HIGH_RISK_PATHS}} is labelled change:high-risk and deploys through {{PROD_ENV}}-high-risk; every other change deploys through {{PROD_ENV}}\n\nTool: GitHub Actions (the environment chosen by an expression) with the GitHub CLI\n\n```yaml\non: { push: { branches: [main] } }\npermissions: { contents: read, pull-requests: write }\njobs:\n classify:\n runs-on: ubuntu-latest\n outputs:\n high_risk: ${{ steps.paths.outputs.high_risk }}\n steps:\n - id: paths\n env:\n GH_TOKEN: ${{ github.token }}\n HIGH_RISK_PATHS: '{{HIGH_RISK_PATHS}}'\n run: |\n pr=$(gh api \"repos/$GITHUB_REPOSITORY/commits/$GITHUB_SHA/pulls\" --jq '.[0].number')\n files=$(gh api --paginate \"repos/$GITHUB_REPOSITORY/pulls/$pr/files\" --jq '.[].filename')\n if grep -qE \"^($(sed -E 's/[[:space:]]*,[[:space:]]*/|/g' <<< \"$HIGH_RISK_PATHS\"))\" <<< \"$files\"; then\n gh pr edit \"$pr\" --repo \"$GITHUB_REPOSITORY\" --add-label change:high-risk\n echo \"high_risk=true\" >> \"$GITHUB_OUTPUT\"\n else echo \"high_risk=false\" >> \"$GITHUB_OUTPUT\"; fi\n deploy:\n needs: classify\n runs-on: ubuntu-latest\n environment: ${{ needs.classify.outputs.high_risk == 'true' && '{{PROD_ENV}}-high-risk' || '{{PROD_ENV}}' }}\n steps:\n - run: ./scripts/deploy.sh # the rollout decided in the Deployment and rollback pack\n```",
779
+ "hubWhen": {
780
+ "APPROVAL": [
781
+ "cab"
782
+ ]
783
+ }
784
+ },
785
+ {
786
+ "id": "ff-approvers-set",
787
+ "type": "fitness-fn",
788
+ "label": "Approvers named in the environment",
789
+ "x": 1040,
790
+ "y": 780,
791
+ "characteristic": "maintainability",
792
+ "scope": "atomic",
793
+ "cadence": "triggered",
794
+ "trigger": "nightly",
795
+ "invocation": "automated",
796
+ "description": "A daily job reads the protection rules of the approving environment and fails when it has no required reviewers, which would let deployments through without the approval the decision names; it prints the approvers, so a change to the list shows in the job log.\n\nThreshold: The approving environment ({{PROD_ENV}} for a release approver, {{PROD_ENV}}-high-risk for the board) has a required_reviewers rule with at least 1 reviewer\n\nTool: GitHub CLI (gh api) and jq in a scheduled GitHub Actions job\n\n```bash\n#!/usr/bin/env bash\n# daily: the approving environment names its approvers; run with {{PROD_ENV}} for a release approver, {{PROD_ENV}}-high-risk for the board\nset -euo pipefail\nenv=\"$1\"\nrules=$(gh api \"repos/$GITHUB_REPOSITORY/environments/$env\" --jq '.protection_rules')\nn=$(jq '[.[] | select(.type == \"required_reviewers\") | .reviewers[]] | length' <<< \"$rules\")\n[ \"$n\" -ge 1 ] || { echo \"$env has no required reviewers, so nothing waits for an approval\"; exit 1; }\necho \"$env waits for one of:\"\njq -r '.[] | select(.type == \"required_reviewers\") | .reviewers[] | \" \\(.type) \\(.reviewer.login // .reviewer.slug)\"' <<< \"$rules\"\n```",
797
+ "hubWhen": {
798
+ "APPROVAL": [
799
+ "cab",
800
+ "release-approver"
801
+ ]
802
+ }
803
+ },
804
+ {
805
+ "id": "ff-segregation",
806
+ "type": "fitness-fn",
807
+ "label": "No bypass and no self-approval",
808
+ "x": 1040,
809
+ "y": 910,
810
+ "characteristic": "security",
811
+ "scope": "atomic",
812
+ "cadence": "triggered",
813
+ "trigger": "nightly",
814
+ "invocation": "automated",
815
+ "description": "A daily job reads the {{PROD_ENV}} environment and every active branch ruleset, and fails when administrators can bypass the environment, when a required-reviewers rule lets a person approve a deployment they started, or when a ruleset lists a bypass actor. The API returns bypass actors only to a token with write access to the ruleset, so the job runs with a GitHub App token that has it, and fails rather than passes when they are missing.\n\nThreshold: Administrator bypass off and self-review prevented on {{PROD_ENV}}; 0 bypass actors on every active branch ruleset\n\nTool: GitHub CLI (gh api) and jq, with a GitHub App token\n\n```bash\n#!/usr/bin/env bash\n# daily, with a token that has write access to the rulesets (bypass actors are returned only then)\nset -euo pipefail\nrepo=$GITHUB_REPOSITORY\nenvjson=$(gh api \"repos/$repo/environments/{{PROD_ENV}}\")\njq -e '.can_admins_bypass == false' <<< \"$envjson\" > /dev/null \\\n || { echo \"administrators can bypass the rules of {{PROD_ENV}}\"; exit 1; }\njq -e '[.protection_rules[] | select(.type == \"required_reviewers\") | .prevent_self_review] | all' <<< \"$envjson\" > /dev/null \\\n || { echo \"{{PROD_ENV}} lets a person approve a deployment they started\"; exit 1; }\nfor id in $(gh api \"repos/$repo/rulesets?targets=branch\" --jq '.[] | select(.enforcement == \"active\") | .id'); do\n actors=$(gh api \"repos/$repo/rulesets/$id\" \\\n --jq 'if .bypass_actors == null then error(\"bypass_actors not returned: use a token with write access\") else .bypass_actors | length end')\n [ \"$actors\" = 0 ] || { echo \"ruleset $id lets $actors actor(s) bypass it\"; exit 1; }\ndone\necho \"no one can bypass the rulesets or {{PROD_ENV}}, and no one approves their own deployment\"\n```",
816
+ "hubWhen": {
817
+ "SEGREGATION": [
818
+ "enforced"
819
+ ]
820
+ }
821
+ },
822
+ {
823
+ "id": "ff-bypass-report",
824
+ "type": "fitness-fn",
825
+ "label": "Bypasses posted to the team",
826
+ "x": 1040,
827
+ "y": 1040,
828
+ "characteristic": "maintainability",
829
+ "scope": "atomic",
830
+ "cadence": "triggered",
831
+ "trigger": "nightly",
832
+ "invocation": "automated",
833
+ "description": "A daily job reads the rule-suite history of main through the rule suites API, filtered to bypasses, and posts each one (when, who, the commits) to the team's channel through an incoming webhook. Nobody is blocked, and nobody bypasses unseen.\n\nThreshold: Every rule suite on main with the result bypass in the last day is posted to the team channel by the daily run\n\nTool: GitHub CLI (gh api), jq and curl in a scheduled GitHub Actions job\n\n```bash\n#!/usr/bin/env bash\n# daily: every bypass of the rules on main in the last day is posted to the team\nset -euo pipefail\nbypasses=$(gh api \"repos/$GITHUB_REPOSITORY/rulesets/rule-suites?ref=refs/heads/main&time_period=day&rule_suite_result=bypass&per_page=100\" \\\n --jq '.[] | \"\\(.pushed_at) \\(.actor_name) \\(.before_sha[0:7])..\\(.after_sha[0:7])\"')\n[ -n \"$bypasses\" ] || { echo \"no bypass on main in the last day\"; exit 0; }\ntext=$(printf 'Rules on main bypassed in the last day (when, who, commits):\\n%s' \"$bypasses\")\ncurl -fsS -X POST -H 'Content-Type: application/json' \\\n --data \"$(jq -n --arg text \"$text\" '{text: $text}')\" \"$TEAM_WEBHOOK_URL\" # a Slack or Teams incoming webhook\necho \"$bypasses\"\n```",
834
+ "hubWhen": {
835
+ "SEGREGATION": [
836
+ "none"
837
+ ]
838
+ }
839
+ },
840
+ {
841
+ "id": "ff-main-only",
842
+ "type": "fitness-fn",
843
+ "label": "Production deploys from main only",
844
+ "x": 1040,
845
+ "y": 1170,
846
+ "characteristic": "maintainability",
847
+ "scope": "atomic",
848
+ "cadence": "triggered",
849
+ "trigger": "nightly",
850
+ "invocation": "automated",
851
+ "description": "A daily job reads the deployment branch policy of the {{PROD_ENV}} environment and fails when it allows any branch but main, so a fix has no way into production that skips the pull request, the reviews and the approval. The emergency label itself is a convention for the reviewer on call.\n\nThreshold: The deployment branch policy of {{PROD_ENV}} is custom and allows exactly the branch main\n\nTool: GitHub CLI (gh api) and jq in a scheduled GitHub Actions job\n\n```bash\n#!/usr/bin/env bash\n# daily: the {{PROD_ENV}} environment takes deployments from main only, so an emergency fix takes the same path as any change\nset -euo pipefail\nrepo=$GITHUB_REPOSITORY\ngh api \"repos/$repo/environments/{{PROD_ENV}}\" --jq '.deployment_branch_policy' \\\n | jq -e '. != null and .custom_branch_policies == true' > /dev/null \\\n || { echo \"{{PROD_ENV}} does not limit the branches it deploys from\"; exit 1; }\nnames=$(gh api \"repos/$repo/environments/{{PROD_ENV}}/deployment-branch-policies\" \\\n --jq '[.branch_policies[] | \"\\(.type // \"branch\"):\\(.name)\"] | sort | join(\",\")')\n[ \"$names\" = \"branch:main\" ] || { echo \"{{PROD_ENV}} deploys from $names, not from main alone\"; exit 1; }\necho \"{{PROD_ENV}} deploys from main only\"\n```",
852
+ "hubWhen": {
853
+ "EMERGENCY": [
854
+ "same-path"
855
+ ]
856
+ }
857
+ },
858
+ {
859
+ "id": "ff-break-glass",
860
+ "type": "fitness-fn",
861
+ "label": "Break-glass reviewed in time",
862
+ "x": 1040,
863
+ "y": 1300,
864
+ "characteristic": "security",
865
+ "scope": "atomic",
866
+ "cadence": "continual",
867
+ "invocation": "automated",
868
+ "description": "An hourly job lists the open break-glass-review issues and fails on any older than the limit, and checks that each deployment to the break-glass environment has an issue naming its commit, so a break-glass deployment can stay neither unrecorded nor unreviewed.\n\nThreshold: 0 open break-glass-review issues older than {{BREAK_GLASS_HOURS}} hours; every deployment to {{PROD_ENV}}-break-glass has a break-glass-review issue naming its commit\n\nTool: GitHub CLI (gh issue list, gh api) and jq in a scheduled GitHub Actions job (GNU date)\n\n```bash\n#!/usr/bin/env bash\n# hourly: every break-glass deployment has its review issue, closed within {{BREAK_GLASS_HOURS}} hours\nset -euo pipefail\nrepo=$GITHUB_REPOSITORY\nlimit=$(date -u -d '{{BREAK_GLASS_HOURS}} hours ago' +%FT%TZ) # GNU date, as on ubuntu-latest\noverdue=$(gh issue list --repo \"$repo\" --label break-glass-review --state open --limit 200 --json number,title,createdAt \\\n --jq \".[] | select(.createdAt < \\\"$limit\\\") | \\\"#\\(.number) \\(.title), opened \\(.createdAt)\\\"\")\n[ -z \"$overdue\" ] || { echo \"break-glass changes not reviewed and merged within {{BREAK_GLASS_HOURS}} hours:\"; echo \"$overdue\"; exit 1; }\nfor sha in $(gh api \"repos/$repo/deployments?environment={{PROD_ENV}}-break-glass&per_page=100\" --jq '.[].sha' | sort -u); do\n n=$(gh issue list --repo \"$repo\" --label break-glass-review --state all --search \"$sha\" --json number --jq 'length')\n [ \"$n\" -ge 1 ] || { echo \"break-glass deployment $sha has no review issue\"; exit 1; }\ndone\necho \"every break-glass deployment is recorded, and none is overdue\"\n```",
869
+ "hubWhen": {
870
+ "EMERGENCY": [
871
+ "break-glass"
872
+ ]
873
+ }
874
+ },
875
+ {
876
+ "id": "ff-ticket-id",
877
+ "type": "fitness-fn",
878
+ "label": "Every pull request names its ticket",
879
+ "x": 1040,
880
+ "y": 1430,
881
+ "characteristic": "maintainability",
882
+ "scope": "atomic",
883
+ "cadence": "triggered",
884
+ "trigger": "pull-request",
885
+ "invocation": "automated",
886
+ "description": "A workflow checks the title on every change to the pull request and fails without an id; as the required check ticket-id on main, and an item of the Definition of Done, it blocks the merge. The title becomes the subject of the squash commit, so the id reaches main, and git log between two release tags lists the ids a release delivers. Updates opened by Dependabot or Renovate are skipped.\n\nThreshold: The required check ticket-id fails on every pull request opened by a person whose title names no id matching {{TICKET_PATTERN}}\n\nTool: GitHub Actions (pull_request, the edited type included) with jq and grep\n\n```yaml\n# .github/workflows/traceability.yml, listed as the required check \"ticket-id\" on main\nname: traceability\non:\n pull_request:\n types: [opened, edited, synchronize, reopened]\npermissions:\n contents: read\njobs:\n ticket-id:\n if: github.event.pull_request.user.type != 'Bot' # Dependabot and Renovate updates carry no ticket\n runs-on: ubuntu-latest\n steps:\n - name: The title names a ticket or requirement id\n run: |\n title=$(jq -r '.pull_request.title' \"$GITHUB_EVENT_PATH\")\n if ! grep -qE '{{TICKET_PATTERN}}' <<< \"$title\"; then\n echo \"::error::the pull request title names no id matching {{TICKET_PATTERN}}: $title\"\n exit 1\n fi\n```",
887
+ "hubWhen": {
888
+ "TRACE": [
889
+ "ticket"
890
+ ]
891
+ }
892
+ }
893
+ ],
894
+ "relations": [
895
+ {
896
+ "id": "req-dod-items--derives--need",
897
+ "sourceId": "req-dod-items",
898
+ "targetId": "need",
899
+ "relationType": "derives"
900
+ },
901
+ {
902
+ "id": "req-dod-template--derives--need",
903
+ "sourceId": "req-dod-template",
904
+ "targetId": "need",
905
+ "relationType": "derives"
906
+ },
907
+ {
908
+ "id": "req-dod-agreement--derives--need",
909
+ "sourceId": "req-dod-agreement",
910
+ "targetId": "need",
911
+ "relationType": "derives"
912
+ },
913
+ {
914
+ "id": "req-change-record--derives--need",
915
+ "sourceId": "req-change-record",
916
+ "targetId": "need",
917
+ "relationType": "derives"
918
+ },
919
+ {
920
+ "id": "req-peer-approval--derives--need",
921
+ "sourceId": "req-peer-approval",
922
+ "targetId": "need",
923
+ "relationType": "derives"
924
+ },
925
+ {
926
+ "id": "req-cab--derives--need",
927
+ "sourceId": "req-cab",
928
+ "targetId": "need",
929
+ "relationType": "derives"
930
+ },
931
+ {
932
+ "id": "req-cab-calibrate--derives--need",
933
+ "sourceId": "req-cab-calibrate",
934
+ "targetId": "need",
935
+ "relationType": "derives"
936
+ },
937
+ {
938
+ "id": "req-release-approver--derives--need",
939
+ "sourceId": "req-release-approver",
940
+ "targetId": "need",
941
+ "relationType": "derives"
942
+ },
943
+ {
944
+ "id": "req-segregation--derives--need",
945
+ "sourceId": "req-segregation",
946
+ "targetId": "need",
947
+ "relationType": "derives"
948
+ },
949
+ {
950
+ "id": "req-bypass-reported--derives--need",
951
+ "sourceId": "req-bypass-reported",
952
+ "targetId": "need",
953
+ "relationType": "derives"
954
+ },
955
+ {
956
+ "id": "req-emergency-path--derives--need",
957
+ "sourceId": "req-emergency-path",
958
+ "targetId": "need",
959
+ "relationType": "derives"
960
+ },
961
+ {
962
+ "id": "req-break-glass--derives--need",
963
+ "sourceId": "req-break-glass",
964
+ "targetId": "need",
965
+ "relationType": "derives"
966
+ },
967
+ {
968
+ "id": "req-ticket--derives--need",
969
+ "sourceId": "req-ticket",
970
+ "targetId": "need",
971
+ "relationType": "derives"
972
+ },
973
+ {
974
+ "id": "sc-dod-items--verifies--req-dod-items",
975
+ "sourceId": "sc-dod-items",
976
+ "targetId": "req-dod-items",
977
+ "relationType": "verifies"
978
+ },
979
+ {
980
+ "id": "sc-dod-template--verifies--req-dod-template",
981
+ "sourceId": "sc-dod-template",
982
+ "targetId": "req-dod-template",
983
+ "relationType": "verifies"
984
+ },
985
+ {
986
+ "id": "sc-dod-agreement--verifies--req-dod-agreement",
987
+ "sourceId": "sc-dod-agreement",
988
+ "targetId": "req-dod-agreement",
989
+ "relationType": "verifies"
990
+ },
991
+ {
992
+ "id": "sc-change-record--verifies--req-change-record",
993
+ "sourceId": "sc-change-record",
994
+ "targetId": "req-change-record",
995
+ "relationType": "verifies"
996
+ },
997
+ {
998
+ "id": "sc-peer-approval--verifies--req-peer-approval",
999
+ "sourceId": "sc-peer-approval",
1000
+ "targetId": "req-peer-approval",
1001
+ "relationType": "verifies"
1002
+ },
1003
+ {
1004
+ "id": "sc-cab--verifies--req-cab",
1005
+ "sourceId": "sc-cab",
1006
+ "targetId": "req-cab",
1007
+ "relationType": "verifies"
1008
+ },
1009
+ {
1010
+ "id": "sc-cab-calibrate--verifies--req-cab-calibrate",
1011
+ "sourceId": "sc-cab-calibrate",
1012
+ "targetId": "req-cab-calibrate",
1013
+ "relationType": "verifies"
1014
+ },
1015
+ {
1016
+ "id": "sc-release-approver--verifies--req-release-approver",
1017
+ "sourceId": "sc-release-approver",
1018
+ "targetId": "req-release-approver",
1019
+ "relationType": "verifies"
1020
+ },
1021
+ {
1022
+ "id": "sc-segregation--verifies--req-segregation",
1023
+ "sourceId": "sc-segregation",
1024
+ "targetId": "req-segregation",
1025
+ "relationType": "verifies"
1026
+ },
1027
+ {
1028
+ "id": "sc-bypass-reported--verifies--req-bypass-reported",
1029
+ "sourceId": "sc-bypass-reported",
1030
+ "targetId": "req-bypass-reported",
1031
+ "relationType": "verifies"
1032
+ },
1033
+ {
1034
+ "id": "sc-emergency-path--verifies--req-emergency-path",
1035
+ "sourceId": "sc-emergency-path",
1036
+ "targetId": "req-emergency-path",
1037
+ "relationType": "verifies"
1038
+ },
1039
+ {
1040
+ "id": "sc-break-glass--verifies--req-break-glass",
1041
+ "sourceId": "sc-break-glass",
1042
+ "targetId": "req-break-glass",
1043
+ "relationType": "verifies"
1044
+ },
1045
+ {
1046
+ "id": "sc-ticket--verifies--req-ticket",
1047
+ "sourceId": "sc-ticket",
1048
+ "targetId": "req-ticket",
1049
+ "relationType": "verifies"
1050
+ },
1051
+ {
1052
+ "id": "ff-dod-required--implements--adr-peer-approval",
1053
+ "sourceId": "ff-dod-required",
1054
+ "targetId": "adr-peer-approval",
1055
+ "relationType": "implements"
1056
+ },
1057
+ {
1058
+ "id": "ff-dod-required--implements--adr-cab",
1059
+ "sourceId": "ff-dod-required",
1060
+ "targetId": "adr-cab",
1061
+ "relationType": "implements"
1062
+ },
1063
+ {
1064
+ "id": "ff-dod-required--implements--adr-release-approver",
1065
+ "sourceId": "ff-dod-required",
1066
+ "targetId": "adr-release-approver",
1067
+ "relationType": "implements"
1068
+ },
1069
+ {
1070
+ "id": "ff-dod-checklist--implements--adr-peer-approval",
1071
+ "sourceId": "ff-dod-checklist",
1072
+ "targetId": "adr-peer-approval",
1073
+ "relationType": "implements"
1074
+ },
1075
+ {
1076
+ "id": "ff-dod-checklist--implements--adr-cab",
1077
+ "sourceId": "ff-dod-checklist",
1078
+ "targetId": "adr-cab",
1079
+ "relationType": "implements"
1080
+ },
1081
+ {
1082
+ "id": "ff-dod-checklist--implements--adr-release-approver",
1083
+ "sourceId": "ff-dod-checklist",
1084
+ "targetId": "adr-release-approver",
1085
+ "relationType": "implements"
1086
+ },
1087
+ {
1088
+ "id": "ff-dod-reviewed--implements--adr-peer-approval",
1089
+ "sourceId": "ff-dod-reviewed",
1090
+ "targetId": "adr-peer-approval",
1091
+ "relationType": "implements"
1092
+ },
1093
+ {
1094
+ "id": "ff-dod-reviewed--implements--adr-cab",
1095
+ "sourceId": "ff-dod-reviewed",
1096
+ "targetId": "adr-cab",
1097
+ "relationType": "implements"
1098
+ },
1099
+ {
1100
+ "id": "ff-dod-reviewed--implements--adr-release-approver",
1101
+ "sourceId": "ff-dod-reviewed",
1102
+ "targetId": "adr-release-approver",
1103
+ "relationType": "implements"
1104
+ },
1105
+ {
1106
+ "id": "ff-change-record--implements--adr-peer-approval",
1107
+ "sourceId": "ff-change-record",
1108
+ "targetId": "adr-peer-approval",
1109
+ "relationType": "implements"
1110
+ },
1111
+ {
1112
+ "id": "ff-change-record--implements--adr-cab",
1113
+ "sourceId": "ff-change-record",
1114
+ "targetId": "adr-cab",
1115
+ "relationType": "implements"
1116
+ },
1117
+ {
1118
+ "id": "ff-change-record--implements--adr-release-approver",
1119
+ "sourceId": "ff-change-record",
1120
+ "targetId": "adr-release-approver",
1121
+ "relationType": "implements"
1122
+ },
1123
+ {
1124
+ "id": "ff-no-manual-gate--implements--adr-peer-approval",
1125
+ "sourceId": "ff-no-manual-gate",
1126
+ "targetId": "adr-peer-approval",
1127
+ "relationType": "implements"
1128
+ },
1129
+ {
1130
+ "id": "ff-high-risk--implements--adr-cab",
1131
+ "sourceId": "ff-high-risk",
1132
+ "targetId": "adr-cab",
1133
+ "relationType": "implements"
1134
+ },
1135
+ {
1136
+ "id": "ff-approvers-set--implements--adr-cab",
1137
+ "sourceId": "ff-approvers-set",
1138
+ "targetId": "adr-cab",
1139
+ "relationType": "implements"
1140
+ },
1141
+ {
1142
+ "id": "ff-approvers-set--implements--adr-release-approver",
1143
+ "sourceId": "ff-approvers-set",
1144
+ "targetId": "adr-release-approver",
1145
+ "relationType": "implements"
1146
+ },
1147
+ {
1148
+ "id": "ff-segregation--implements--adr-segregation",
1149
+ "sourceId": "ff-segregation",
1150
+ "targetId": "adr-segregation",
1151
+ "relationType": "implements"
1152
+ },
1153
+ {
1154
+ "id": "ff-bypass-report--implements--adr-peer-approval",
1155
+ "sourceId": "ff-bypass-report",
1156
+ "targetId": "adr-peer-approval",
1157
+ "relationType": "implements"
1158
+ },
1159
+ {
1160
+ "id": "ff-bypass-report--implements--adr-cab",
1161
+ "sourceId": "ff-bypass-report",
1162
+ "targetId": "adr-cab",
1163
+ "relationType": "implements"
1164
+ },
1165
+ {
1166
+ "id": "ff-bypass-report--implements--adr-release-approver",
1167
+ "sourceId": "ff-bypass-report",
1168
+ "targetId": "adr-release-approver",
1169
+ "relationType": "implements"
1170
+ },
1171
+ {
1172
+ "id": "ff-main-only--implements--adr-peer-approval",
1173
+ "sourceId": "ff-main-only",
1174
+ "targetId": "adr-peer-approval",
1175
+ "relationType": "implements"
1176
+ },
1177
+ {
1178
+ "id": "ff-main-only--implements--adr-cab",
1179
+ "sourceId": "ff-main-only",
1180
+ "targetId": "adr-cab",
1181
+ "relationType": "implements"
1182
+ },
1183
+ {
1184
+ "id": "ff-main-only--implements--adr-release-approver",
1185
+ "sourceId": "ff-main-only",
1186
+ "targetId": "adr-release-approver",
1187
+ "relationType": "implements"
1188
+ },
1189
+ {
1190
+ "id": "ff-break-glass--implements--adr-break-glass",
1191
+ "sourceId": "ff-break-glass",
1192
+ "targetId": "adr-break-glass",
1193
+ "relationType": "implements"
1194
+ },
1195
+ {
1196
+ "id": "ff-ticket-id--implements--adr-peer-approval",
1197
+ "sourceId": "ff-ticket-id",
1198
+ "targetId": "adr-peer-approval",
1199
+ "relationType": "implements"
1200
+ },
1201
+ {
1202
+ "id": "ff-ticket-id--implements--adr-cab",
1203
+ "sourceId": "ff-ticket-id",
1204
+ "targetId": "adr-cab",
1205
+ "relationType": "implements"
1206
+ },
1207
+ {
1208
+ "id": "ff-ticket-id--implements--adr-release-approver",
1209
+ "sourceId": "ff-ticket-id",
1210
+ "targetId": "adr-release-approver",
1211
+ "relationType": "implements"
1212
+ }
1213
+ ]
1214
+ }