ronce-racine 0.5.0

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 (179) hide show
  1. package/AGENTS.md +90 -0
  2. package/LICENSE +21 -0
  3. package/README.md +281 -0
  4. package/agents/code-reviewer.md +33 -0
  5. package/agents/qa-tester.md +28 -0
  6. package/dist/hooks/README.md +182 -0
  7. package/dist/hooks/bash-npm-silent.mjs +81 -0
  8. package/dist/hooks/session-inject.mjs +53 -0
  9. package/dist/hooks/session-precompact.mjs +36 -0
  10. package/dist/hooks/session-writer.mjs +142 -0
  11. package/dist/hooks/skill-reminder.mjs +89 -0
  12. package/dist/hooks/truncate-bash-output.mjs +46 -0
  13. package/dist/hooks/truncate-output.mjs +88 -0
  14. package/dist/hooks/worktree-env-setup.mjs +123 -0
  15. package/dist/install.js +962 -0
  16. package/docs/adopting-a-repo.md +80 -0
  17. package/docs/architecture.md +76 -0
  18. package/docs/decisions.md +72 -0
  19. package/docs/developing.md +143 -0
  20. package/docs/evaluating-skills.md +41 -0
  21. package/docs/git-worktrees.md +62 -0
  22. package/docs/rules/clean-architecture-deps.md +66 -0
  23. package/docs/rules/commits.md +59 -0
  24. package/docs/rules/detection-gap-protocol.md +55 -0
  25. package/docs/rules/error-handling-discipline.md +62 -0
  26. package/docs/rules/minimal-code.md +58 -0
  27. package/docs/rules/no-raw-sql-interpolation.md +57 -0
  28. package/docs/rules/pre-commit-secret-detection.md +54 -0
  29. package/docs/rules/secure-logging.md +53 -0
  30. package/docs/rules/sql-migrations-discipline.md +58 -0
  31. package/docs/rules/subscription-cleanup.md +63 -0
  32. package/docs/rules/test-discipline.md +66 -0
  33. package/docs/rules/ui-states-complete.md +52 -0
  34. package/docs/templates/SKILL.template.md +66 -0
  35. package/docs/templates/rule.template.md +16 -0
  36. package/docs/writing-a-rule.md +43 -0
  37. package/docs/writing-a-skill.md +118 -0
  38. package/package.json +45 -0
  39. package/rules/clean-architecture-deps.md +20 -0
  40. package/rules/commits.md +16 -0
  41. package/rules/detection-gap-protocol.md +35 -0
  42. package/rules/error-handling-discipline.md +23 -0
  43. package/rules/minimal-code.md +32 -0
  44. package/rules/no-raw-sql-interpolation.md +20 -0
  45. package/rules/pre-commit-secret-detection.md +14 -0
  46. package/rules/secure-logging.md +16 -0
  47. package/rules/sql-migrations-discipline.md +18 -0
  48. package/rules/subscription-cleanup.md +22 -0
  49. package/rules/test-discipline.md +20 -0
  50. package/rules/ui-states-complete.md +23 -0
  51. package/scripts/subscription-leak-scan.ts +53 -0
  52. package/skills/adversarial-feature-challenge/README.md +65 -0
  53. package/skills/adversarial-feature-challenge/SKILL.md +96 -0
  54. package/skills/adversarial-feature-challenge/assets/fuzz-payloads.txt +60 -0
  55. package/skills/adversarial-feature-challenge/templates/challenge-report.md +42 -0
  56. package/skills/api-contract-versioning/README.md +62 -0
  57. package/skills/api-contract-versioning/SKILL.md +76 -0
  58. package/skills/api-contract-versioning/templates/consumer-inventory.md +29 -0
  59. package/skills/audit-architecture/README.md +56 -0
  60. package/skills/audit-architecture/SKILL.md +97 -0
  61. package/skills/audit-architecture/reference/ar-architecture.md +275 -0
  62. package/skills/audit-architecture/reference/di-disponibilite.md +252 -0
  63. package/skills/audit-architecture/reference/im-incidents.md +217 -0
  64. package/skills/audit-architecture/reference/pa-pannes.md +362 -0
  65. package/skills/audit-architecture/reference/re-recuperation.md +300 -0
  66. package/skills/audit-architecture/reference/sc-scalabilite.md +173 -0
  67. package/skills/audit-architecture/reference/su-support.md +180 -0
  68. package/skills/audit-ci-cd/README.md +54 -0
  69. package/skills/audit-ci-cd/SKILL.md +124 -0
  70. package/skills/audit-ci-cd/reference/artefacts.md +39 -0
  71. package/skills/audit-ci-cd/reference/deploiement.md +100 -0
  72. package/skills/audit-ci-cd/reference/dora.md +94 -0
  73. package/skills/audit-ci-cd/reference/iac.md +40 -0
  74. package/skills/audit-ci-cd/reference/pipeline-ci.md +36 -0
  75. package/skills/audit-ci-cd/reference/supply-chain.md +44 -0
  76. package/skills/audit-compliance/README.md +69 -0
  77. package/skills/audit-compliance/SKILL.md +176 -0
  78. package/skills/audit-compliance/reference/conformite-rgpd.md +295 -0
  79. package/skills/audit-compliance/reference/finops.md +318 -0
  80. package/skills/audit-compliance/reference/gouvernance-donnees.md +238 -0
  81. package/skills/audit-industrialisation/README.md +53 -0
  82. package/skills/audit-industrialisation/SKILL.md +251 -0
  83. package/skills/audit-observability/README.md +64 -0
  84. package/skills/audit-observability/SKILL.md +134 -0
  85. package/skills/audit-observability/reference/alerting.md +214 -0
  86. package/skills/audit-observability/reference/logging.md +114 -0
  87. package/skills/audit-observability/reference/metriques.md +166 -0
  88. package/skills/audit-observability/reference/traces-dashboards.md +90 -0
  89. package/skills/audit-performance-frontend/README.md +91 -0
  90. package/skills/audit-performance-frontend/SKILL.md +194 -0
  91. package/skills/audit-performance-frontend/reference/assets-cache-network.md +129 -0
  92. package/skills/audit-performance-frontend/reference/css-rendering-pipeline.md +154 -0
  93. package/skills/audit-performance-frontend/reference/html-critical-path.md +128 -0
  94. package/skills/audit-performance-frontend/reference/js-engine-runtime.md +280 -0
  95. package/skills/audit-performance-frontend/reference/memory-gc.md +126 -0
  96. package/skills/audit-performance-frontend/reference/profiling-tooling.md +98 -0
  97. package/skills/audit-quality/README.md +85 -0
  98. package/skills/audit-quality/SKILL.md +126 -0
  99. package/skills/audit-quality/reference/qa-devops.md +539 -0
  100. package/skills/audit-quality/reference/qu-qualite-donnees.md +402 -0
  101. package/skills/audit-report/README.md +72 -0
  102. package/skills/audit-report/SKILL.md +241 -0
  103. package/skills/audit-report/reference/scoring-model.md +45 -0
  104. package/skills/audit-security/README.md +72 -0
  105. package/skills/audit-security/SKILL.md +140 -0
  106. package/skills/audit-security/reference/auth-identite.md +98 -0
  107. package/skills/audit-security/reference/autorisation.md +66 -0
  108. package/skills/audit-security/reference/chiffrement-tls.md +97 -0
  109. package/skills/audit-security/reference/detection-patching.md +67 -0
  110. package/skills/audit-security/reference/incident-response.md +98 -0
  111. package/skills/audit-security/reference/reseau-conteneurs.md +72 -0
  112. package/skills/audit-security/reference/secrets.md +36 -0
  113. package/skills/audit-testing/README.md +82 -0
  114. package/skills/audit-testing/SKILL.md +131 -0
  115. package/skills/audit-testing/reference/golden-dataset.md +65 -0
  116. package/skills/audit-testing/reference/resilience-chaos.md +93 -0
  117. package/skills/audit-testing/reference/tests-contractuels.md +65 -0
  118. package/skills/audit-testing/reference/tests-e2e-flaky.md +67 -0
  119. package/skills/audit-testing/reference/tests-unit-integ-ci.md +125 -0
  120. package/skills/bug-ticket-root-cause/README.md +67 -0
  121. package/skills/bug-ticket-root-cause/SKILL.md +86 -0
  122. package/skills/bug-ticket-root-cause/templates/bug-ticket.md +43 -0
  123. package/skills/bug-triage-structured/README.md +63 -0
  124. package/skills/bug-triage-structured/SKILL.md +104 -0
  125. package/skills/bug-triage-structured/templates/bug-triage.md +38 -0
  126. package/skills/ci-pipeline-orchestration/README.md +55 -0
  127. package/skills/ci-pipeline-orchestration/SKILL.md +110 -0
  128. package/skills/commit-readiness-review/README.md +66 -0
  129. package/skills/commit-readiness-review/SKILL.md +82 -0
  130. package/skills/commit-readiness-review/scripts/precommit-scan.ts +81 -0
  131. package/skills/comprehensive-test-strategy/README.md +64 -0
  132. package/skills/comprehensive-test-strategy/SKILL.md +108 -0
  133. package/skills/comprehensive-test-strategy/reference/testing-advanced.md +85 -0
  134. package/skills/daily-workflow-optimization/README.md +56 -0
  135. package/skills/daily-workflow-optimization/SKILL.md +80 -0
  136. package/skills/database-schema-evolution/README.md +54 -0
  137. package/skills/database-schema-evolution/SKILL.md +107 -0
  138. package/skills/ddd-backend-implementation/README.md +63 -0
  139. package/skills/ddd-backend-implementation/SKILL.md +95 -0
  140. package/skills/design-system-component-lifecycle/README.md +56 -0
  141. package/skills/design-system-component-lifecycle/SKILL.md +97 -0
  142. package/skills/design-system-component-lifecycle/templates/component-contract.md +43 -0
  143. package/skills/detection-sweep/README.md +58 -0
  144. package/skills/detection-sweep/SKILL.md +93 -0
  145. package/skills/detection-sweep/scripts/sweep.ts +80 -0
  146. package/skills/domain-modeling-design/README.md +57 -0
  147. package/skills/domain-modeling-design/SKILL.md +83 -0
  148. package/skills/frontend-fullstack-implementation/README.md +60 -0
  149. package/skills/frontend-fullstack-implementation/SKILL.md +133 -0
  150. package/skills/frontend-spec-call-site-audit/README.md +66 -0
  151. package/skills/frontend-spec-call-site-audit/SKILL.md +82 -0
  152. package/skills/frontend-spec-call-site-audit/scripts/audit-entry-points.ts +79 -0
  153. package/skills/frontend-spec-call-site-audit/templates/ticket-frontend.md +32 -0
  154. package/skills/merge-request-review/README.md +60 -0
  155. package/skills/merge-request-review/SKILL.md +77 -0
  156. package/skills/merge-request-review/templates/mr-review-report.md +29 -0
  157. package/skills/production-incident-diagnostic/README.md +63 -0
  158. package/skills/production-incident-diagnostic/SKILL.md +103 -0
  159. package/skills/production-incident-diagnostic/templates/incident-report.md +33 -0
  160. package/skills/qa-session-intake/README.md +56 -0
  161. package/skills/qa-session-intake/SKILL.md +78 -0
  162. package/skills/recording-decisions/README.md +91 -0
  163. package/skills/recording-decisions/SKILL.md +84 -0
  164. package/skills/recurring-bug-root-cause/README.md +64 -0
  165. package/skills/recurring-bug-root-cause/SKILL.md +93 -0
  166. package/skills/recurring-bug-root-cause/scripts/detect-recurring-fixes.ts +46 -0
  167. package/skills/recurring-bug-root-cause/templates/postmortem-recidive.md +37 -0
  168. package/skills/refactoring-shared-component-api/README.md +50 -0
  169. package/skills/refactoring-shared-component-api/SKILL.md +84 -0
  170. package/skills/refactoring-shared-component-api/scripts/sweep-call-sites.ts +85 -0
  171. package/skills/refactoring-shared-component-api/templates/migration-checklist.md +19 -0
  172. package/skills/validating-features-end-to-end/README.md +50 -0
  173. package/skills/validating-features-end-to-end/SKILL.md +90 -0
  174. package/skills/visual-regression-check/README.md +51 -0
  175. package/skills/visual-regression-check/SKILL.md +89 -0
  176. package/skills/writing-robust-tests/README.md +53 -0
  177. package/skills/writing-robust-tests/SKILL.md +88 -0
  178. package/templates/.adopted.example +8 -0
  179. package/templates/anti-drift.gitlab-ci.yml +23 -0
@@ -0,0 +1,217 @@
1
+ # Section IM - Incident management (9 questions)
2
+
3
+ ## Questions
4
+
5
+ - IM-01 - Incident classification and severity (P1-P4) (MUST)
6
+ - IM-02 - On-call organization and rotations (SHOULD)
7
+ - IM-03 - Incident detection (MTTD) (MUST)
8
+ - IM-04 - Incident resolution and MTTR (MUST)
9
+ - IM-05 - Communication during an incident (SHOULD)
10
+ - IM-06 - Incident Commander and War Room coordination (SHOULD)
11
+ - IM-07 - Blameless post-mortem and incident review (MUST)
12
+ - IM-08 - Metrics and continuous improvement (SHOULD)
13
+ - IM-09 - Incident response automation (SHOULD)
14
+
15
+ ---
16
+
17
+ ### IM-01 - Incident classification and severity (P1-P4) · Criticality: **MUST**
18
+
19
+ **Analyze:** Severity matrix, SLA per level, impact criteria, reclassification
20
+
21
+ **Verification commands:**
22
+ ```bash
23
+ grep -ri "severity\|sévérité\|P1\|P2\|priority.*incident\|incident.*classif" . --include="*.md" --include="*.yml" 2>/dev/null | head -10
24
+ grep -ri "servicenow\|jira.*service\|freshservice" . --include="*.yml" --include="*.yaml" 2>/dev/null | head -5
25
+ ```
26
+
27
+ **Check:** Documented P1-P4 matrix, response/resolution SLA, objective criteria, reclassification
28
+
29
+ **Levels:**
30
+ | Level | Criteria |
31
+ |-------|----------|
32
+ | 0 | No classification. All handled the same way. No SLA. |
33
+ | 1 | Informal classification (critical/non-critical). Vague SLAs, not measured. |
34
+ | 2 | Documented P1-P4 matrix with SLAs. Impact criteria defined but inconsistently applied. |
35
+ | 3 | Systematic classification with objective criteria. SLAs met and measured. Reclassification in place. |
36
+ | 4 | ML-assisted automatic classification. Dynamic SLAs. Automatic correlation with business KPIs. |
37
+
38
+ ---
39
+
40
+ ### IM-02 - On-call organization and rotations · Criticality: **SHOULD**
41
+
42
+ **Analyze:** Fair rotation, redundant coverage, compensation, burnout prevention
43
+
44
+ **Verification commands:**
45
+ ```bash
46
+ grep -ri "on.call\|astreinte\|pagerduty\|opsgenie\|grafana.*oncall" . --include="*.yml" --include="*.yaml" --include="*.md" 2>/dev/null | head -5
47
+ ```
48
+
49
+ **Check:** Rotation schedule, primary/secondary, compensation, structured handoff, load metrics
50
+
51
+ **Levels:**
52
+ | Level | Criteria |
53
+ |-------|----------|
54
+ | 0 | No formalized on-call. Ad-hoc response. Night incidents not handled. |
55
+ | 1 | Informal on-call. A few key people. No rotation. No compensation. |
56
+ | 2 | Documented on-call schedule with rotation. Primary on-call defined. Basic compensation. |
57
+ | 3 | Fair rotation with primary/secondary. Formalized compensation. Structured handoff. Load tracking. |
58
+ | 4 | Automated management (PagerDuty/OpsGenie). Fatigue metrics. Auto-adjustment. Labor-law compliance. |
59
+
60
+ ---
61
+
62
+ ### IM-03 - Incident detection (MTTD) · Criticality: **MUST**
63
+
64
+ **Analyze:** Synthetic monitoring, RUM, anomaly detection, automatic correlation
65
+
66
+ **Verification commands:**
67
+ ```bash
68
+ grep -ri "mttd\|mean.time.to.detect\|synthetic.*monitor\|rum\|anomaly.detect" . --include="*.md" --include="*.yml" 2>/dev/null | head -5
69
+ grep -ri "checkly\|datadog.*synthetic\|pingdom\|new.relic\|dynatrace" . --include="*.yml" --include="*.yaml" --include="*.tf" 2>/dev/null | head -5
70
+ ```
71
+
72
+ **Check:** MTTD measured, proactive monitoring (synthetic + RUM), anomaly detection, cross-service correlation
73
+
74
+ **Levels:**
75
+ | Level | Criteria |
76
+ |-------|----------|
77
+ | 0 | Detection by users. No proactive monitoring. MTTD unknown. |
78
+ | 1 | Basic monitoring. Poorly configured alerts. MTTD > 30 min. |
79
+ | 2 | Monitoring of critical services. Threshold alerts. MTTD 10-30 min. Basic synthetic monitoring. |
80
+ | 3 | Complete monitoring (infra, application, business). MTTD < 10 min for P1. Synthetic + RUM. |
81
+ | 4 | ML anomaly detection. MTTD < 5 min for P1. Cross-service correlation. Predictive detection. |
82
+
83
+ ---
84
+
85
+ ### IM-04 - Incident resolution and MTTR · Criticality: **MUST**
86
+
87
+ **Analyze:** Escalation procedures, runbooks, diagnostic tooling, fast rollback
88
+
89
+ **Verification commands:**
90
+ ```bash
91
+ grep -ri "mttr\|mean.time.to.recover\|mean.time.to.resolve" . --include="*.md" --include="*.yml" 2>/dev/null | head -5
92
+ ```
93
+
94
+ **Check:** MTTR measured, automatic escalation, up-to-date runbooks, rollback < 15 min
95
+
96
+ **Levels:**
97
+ | Level | Criteria |
98
+ |-------|----------|
99
+ | 0 | Improvised resolution. No MTTR measurement. Chaotic escalation. |
100
+ | 1 | Informal escalation. MTTR estimated at several hours. A few runbooks. |
101
+ | 2 | Documented escalation (L1/L2/L3). MTTR measured (2-4h for P1). Rollback possible but manual. |
102
+ | 3 | Automatic escalation. MTTR < 1h for P1. Complete runbooks. Rollback < 15 min. Centralized diagnostics. |
103
+ | 4 | MTTR < 30 min for P1. Auto-remediation of known incidents. AI-assisted diagnostics. Automatic rollback. |
104
+
105
+ ---
106
+
107
+ ### IM-05 - Communication during an incident · Criticality: **SHOULD**
108
+
109
+ **Analyze:** Status page, templates, cadenced communication, dedicated channels, NIS2/GDPR
110
+
111
+ **Verification commands:**
112
+ ```bash
113
+ grep -ri "status.page\|incident.*communic\|war.room\|incident.*template" . --include="*.md" --include="*.yml" 2>/dev/null | head -5
114
+ ```
115
+
116
+ **Check:** Status page, templates per severity/phase, cadenced updates (15-30 min for P1), dedicated channels
117
+
118
+ **Levels:**
119
+ | Level | Criteria |
120
+ |-------|----------|
121
+ | 0 | No structured communication. Customers find out on their own. |
122
+ | 1 | Ad-hoc communication by email/Slack. No templates. Customers informed late. |
123
+ | 2 | Status page in place. Basic templates. Internal communication via a dedicated channel. |
124
+ | 3 | Cadenced communication (15-30 min for P1). Templates per severity. Proactive customer notification. |
125
+ | 4 | Automated multi-channel communication. Dynamic templates. Regulatory compliance (NIS2, GDPR). |
126
+
127
+ ---
128
+
129
+ ### IM-06 - Incident Commander and War Room coordination · Criticality: **SHOULD**
130
+
131
+ **Analyze:** Roles (IC, Tech Lead, Communication Lead, Scribe), war room, rotation, training
132
+
133
+ **Verification commands:**
134
+ ```bash
135
+ grep -ri "incident.commander\|war.room\|incident.*role\|game.day" . --include="*.md" --include="*.yml" 2>/dev/null | head -5
136
+ ```
137
+
138
+ **Check:** IC role defined, automated war room, IC rotation on long incidents, game days
139
+
140
+ **Levels:**
141
+ | Level | Criteria |
142
+ |-------|----------|
143
+ | 0 | No defined role. Disorganized response. Delayed decisions. |
144
+ | 1 | Informal "lead". No separation between coordination and resolution. |
145
+ | 2 | IC role defined and documented. War Room for P1. Basic IC checklist. |
146
+ | 3 | Trained IC with rotation. Complementary roles (Tech Lead, Comms, Scribe). Quarterly game days. |
147
+ | 4 | Mature IC program with certification. Automatic rotation. Coordination metrics. Monthly simulations. |
148
+
149
+ ---
150
+
151
+ ### IM-07 - Blameless post-mortem and incident review · Criticality: **MUST**
152
+
153
+ **Analyze:** Structured template, blameless culture, collective review, action tracking, knowledge base
154
+
155
+ **Verification commands:**
156
+ ```bash
157
+ find docs/ -name "*postmortem*" -o -name "*post-mortem*" -o -name "*post_mortem*" -o -name "*incident-review*" 2>/dev/null
158
+ grep -ri "blameless\|post.mortem\|root.cause\|5.why\|retrospective.*incident" . --include="*.md" 2>/dev/null | head -5
159
+ ```
160
+
161
+ **Check:** Standardized template, blameless culture, actions with owner/deadline, knowledge base
162
+
163
+ **Levels:**
164
+ | Level | Criteria |
165
+ |-------|----------|
166
+ | 0 | No post-mortem. Incidents forgotten. Frequent recurrence. |
167
+ | 1 | Occasional post-mortem. Free-form. Actions rarely followed up. Tendency to blame. |
168
+ | 2 | Standardized template. Systematic for P1/P2. Actions with an owner. Blameless culture declared. |
169
+ | 3 | Systematic blameless for P1/P2/P3. Collective review. Actions in the backlog. Knowledge base. 5 Whys. |
170
+ | 4 | Blameless culture ingrained. Cross-team sharing. Recurrence metrics. Root-cause trend analysis. |
171
+
172
+ ---
173
+
174
+ ### IM-08 - Metrics and continuous improvement · Criticality: **SHOULD**
175
+
176
+ **Analyze:** DORA metrics, MTTD/MTTR/MTBF, recurrence, dashboards, objectives
177
+
178
+ **Verification commands:**
179
+ ```bash
180
+ grep -ri "dora\|mtbf\|mttd\|mttr\|change.failure.rate\|incident.*metric" . --include="*.md" --include="*.yml" 2>/dev/null | head -5
181
+ ```
182
+
183
+ **Check:** Metrics collected (MTTD, MTTR, MTBF, recurrence), real-time dashboard, objectives, benchmarking
184
+
185
+ **Levels:**
186
+ | Level | Criteria |
187
+ |-------|----------|
188
+ | 0 | No metrics collected. Improvement based on impressions. |
189
+ | 1 | Basic counting. No MTTD/MTTR. Manual reporting. |
190
+ | 2 | MTTD and MTTR measured for P1/P2. Basic dashboard. Monthly report. |
191
+ | 3 | Complete metrics. Real-time dashboards. Objectives per metric. Trend analysis. |
192
+ | 4 | DORA metrics integrated. Incident/deployment correlation. Predictive detection. External benchmarking. |
193
+
194
+ ---
195
+
196
+ ### IM-09 - Incident response automation · Criticality: **SHOULD**
197
+
198
+ **Analyze:** Auto-remediation, automated runbooks, ChatOps, self-healing, guardrails
199
+
200
+ **Verification commands:**
201
+ ```bash
202
+ grep -ri "auto.remediat\|self.healing\|chatops\|rundeck\|stackstorm\|shoreline" . --include="*.yml" --include="*.yaml" --include="*.ts" --include="*.md" 2>/dev/null | head -5
203
+ grep -ri "livenessProbe\|readinessProbe\|auto.*restart\|auto.*scale" . --include="*.yml" --include="*.yaml" 2>/dev/null | head -5
204
+ ```
205
+
206
+ **Check:** Auto-remediation of known incidents, automated runbooks, ChatOps, self-healing, guardrails
207
+
208
+ **Levels:**
209
+ | Level | Criteria |
210
+ |-------|----------|
211
+ | 0 | Everything manual. Each incident = SSH + manual commands. |
212
+ | 1 | A few remediation scripts. Manual execution. No guardrails. |
213
+ | 2 | Semi-automated runbooks for recurring P1s. Basic Kubernetes probes. Limited ChatOps. |
214
+ | 3 | Auto-remediation of known incidents. Automated runbooks for >50% of recurring ones. ChatOps. Audit trail. |
215
+ | 4 | Self-healing infrastructure. Auto-remediation of >80% of recurring ones. Smart orchestration. On-call load reduced >60%. |
216
+
217
+ ---
@@ -0,0 +1,362 @@
1
+ # Section PA - Fault and interruption tolerance (15 questions)
2
+
3
+ ## Questions
4
+
5
+ - PA-01 - API error handling (API unreachable) (MUST)
6
+ - PA-02 - Documentation of expected behaviors (SHOULD)
7
+ - PA-03 - Configurable retry policy (MUST)
8
+ - PA-04 - Circuit breaker to avoid saturation (MUST)
9
+ - PA-05 - Centralized processing pause (SHOULD)
10
+ - PA-06 - Safe shutdown mode (MUST)
11
+ - PA-07 - Controlled recovery after restart (MUST)
12
+ - PA-08 - Connector/API isolation mechanism (SHOULD)
13
+ - PA-09 - Connector notification strategy (SHOULD)
14
+ - PA-12 - Degraded mode (cache, replication, fallback) (MUST)
15
+ - PA-13 - Watch on external API changelog/versioning (SHOULD)
16
+ - PA-18 - DB migration tests (MUST)
17
+ - PA-19 - DB backup plan (MUST)
18
+ - PA-20 - DB rollback playbook (SHOULD)
19
+ - PA-21 - DB rollback tests (SHOULD)
20
+
21
+ ---
22
+
23
+ ### PA-01 - API error handling (API unreachable) · Criticality: **MUST**
24
+
25
+ **Analyze:** Retry, circuit breaker, fallback, dead letter queue, error handling
26
+
27
+ **Verification commands:**
28
+ ```bash
29
+ grep -ri "circuit.breaker\|retry\|backoff\|timeout\|fallback" . --include="*.ts" --include="*.js" --include="*.php" 2>/dev/null | head -10
30
+ grep -ri "resilience4j\|polly\|opossum\|hystrix" . 2>/dev/null | head -5
31
+ ```
32
+
33
+ **Check:** Timeouts configured, retry with backoff, circuit breaker, graceful degradation, DLQ
34
+
35
+ **Levels:**
36
+ | Level | Criteria |
37
+ |-------|----------|
38
+ | 0 | No error handling. The app crashes or returns unhandled errors. |
39
+ | 1 | Basic handling (generic try/catch). Technical error messages exposed. No retry. |
40
+ | 2 | Simple retry with a fixed delay. Timeout configured. Errors logged but not analyzed. |
41
+ | 3 | Documented strategy per error type (4xx vs 5xx). Fallback defined. Retry with exponential backoff. |
42
+ | 4 | Circuit breaker + bulkhead patterns. Automatic graceful degradation. Error metrics with alerts. |
43
+
44
+ ---
45
+
46
+ ### PA-02 - Documentation of expected behaviors · Criticality: **SHOULD**
47
+
48
+ **Analyze:** ADR, runbooks, living documentation (Swagger, AsyncAPI), chaos engineering reports
49
+
50
+ **Verification commands:**
51
+ ```bash
52
+ find docs/ -name "*runbook*" -o -name "*error*" -o -name "*behavior*" 2>/dev/null
53
+ grep -ri "error.handling\|failure.mode\|degraded" . --include="*.md" 2>/dev/null | head -5
54
+ ```
55
+
56
+ **Check:** Documentation of failure scenarios, degraded-mode behavior, per-error runbooks
57
+
58
+ **Levels:**
59
+ | Level | Criteria |
60
+ |-------|----------|
61
+ | 0 | No documentation. Behaviors discovered in production during incidents. |
62
+ | 1 | A few informal notes in the code (comments). No accessible docs. |
63
+ | 2 | README or wiki with the main cases. Not always up to date. Missing edge cases. |
64
+ | 3 | Structured documentation (ADR, runbooks) covering all error scenarios. Regular review. |
65
+ | 4 | Living documentation generated from the code. Tests as documentation. Automated consistency validation. |
66
+
67
+ ---
68
+
69
+ ### PA-03 - Configurable retry policy · Criticality: **MUST**
70
+
71
+ **Analyze:** Exponential backoff, jitter, retry budget, bulkhead isolation
72
+
73
+ **Verification commands:**
74
+ ```bash
75
+ grep -ri "exponential\|backoff\|jitter\|retry.budget\|max.retries\|retryPolicy" . --include="*.ts" --include="*.js" --include="*.php" --include="*.yml" 2>/dev/null | head -10
76
+ ```
77
+
78
+ **Check:** Exponential backoff with jitter, per-endpoint configuration, non-retriable errors identified (4xx)
79
+
80
+ **Levels:**
81
+ | Level | Criteria |
82
+ |-------|----------|
83
+ | 0 | No retry. One error = definitive failure. |
84
+ | 1 | Retry with a fixed number of attempts. No backoff. Thundering herd risk. |
85
+ | 2 | Retry with linear backoff. Global configuration. No distinction per error type. |
86
+ | 3 | Exponential backoff with jitter. Per-endpoint configuration. Non-retriable errors identified (4xx). |
87
+ | 4 | Adaptive retry based on the error rate. Circuit breaker integration. Retry metrics exposed. |
88
+
89
+ ---
90
+
91
+ ### PA-04 - Circuit breaker to avoid saturation · Criticality: **MUST**
92
+
93
+ **Analyze:** Circuit states (closed/open/half-open), thresholds, fallback, metrics
94
+
95
+ **Verification commands:**
96
+ ```bash
97
+ grep -ri "circuit.breaker\|circuitbreaker\|half.open\|resilience4j\|opossum" . --include="*.ts" --include="*.js" --include="*.php" --include="*.yml" 2>/dev/null | head -10
98
+ ```
99
+
100
+ **Check:** Circuit breaker per service, thresholds configured, fallback defined, circuit dashboard
101
+
102
+ **Levels:**
103
+ | Level | Criteria |
104
+ |-------|----------|
105
+ | 0 | No circuit breaker. Cascading failures possible. |
106
+ | 1 | Global timeout but no circuit breaker. Saturation possible. |
107
+ | 2 | Basic circuit breaker with default thresholds. No monitoring. |
108
+ | 3 | Circuit breaker configured per service with tuned thresholds. Circuit state dashboard. Alerts. |
109
+ | 4 | Smart circuit breaker with automatic half-open testing. Metrics correlated with SLOs. Auto-tuning. |
110
+
111
+ ---
112
+
113
+ ### PA-05 - Centralized processing pause · Criticality: **SHOULD**
114
+
115
+ **Analyze:** Feature flags for pause, admin API, graceful shutdown hooks, traffic draining
116
+
117
+ **Verification commands:**
118
+ ```bash
119
+ grep -ri "maintenance.mode\|pause\|drain\|graceful" . --include="*.ts" --include="*.js" --include="*.php" --include="*.yml" 2>/dev/null | head -5
120
+ grep -ri "preStop\|terminationGracePeriod" . --include="*.yml" --include="*.yaml" 2>/dev/null | head -5
121
+ ```
122
+
123
+ **Check:** Centralized pause mechanism, drain of in-flight processing, audit trail of pauses
124
+
125
+ **Levels:**
126
+ | Level | Criteria |
127
+ |-------|----------|
128
+ | 0 | Impossible to pause without restarting the app. |
129
+ | 1 | Pause possible by killing the process. Risk of losing in-flight data. |
130
+ | 2 | Feature flag or config to stop new processing. Manual, not centralized. |
131
+ | 3 | Centralized pause API/UI. Drain of in-flight processing. Audit trail of pauses. |
132
+ | 4 | Automatic orchestration of pauses (maintenance windows). CI/CD integration for safe deploys. |
133
+
134
+ ---
135
+
136
+ ### PA-06 - Safe shutdown mode · Criticality: **MUST**
137
+
138
+ **Analyze:** Signal handling (SIGTERM), drain period, health check update, checkpoint
139
+
140
+ **Verification commands:**
141
+ ```bash
142
+ grep -ri "SIGTERM\|graceful.shutdown\|shutdown.hook\|server.shutdown" . --include="*.ts" --include="*.js" --include="*.php" --include="*.yml" 2>/dev/null | head -10
143
+ grep -ri "terminationGracePeriodSeconds\|preStop" . --include="*.yml" --include="*.yaml" 2>/dev/null | head -5
144
+ ```
145
+
146
+ **Check:** SIGTERM caught, request draining, transaction commit/rollback, orderly connection close
147
+
148
+ **Levels:**
149
+ | Level | Criteria |
150
+ |-------|----------|
151
+ | 0 | Kill -9 only. In-flight transactions lost. |
152
+ | 1 | SIGTERM caught but no graceful shutdown. Timeout before forced kill. |
153
+ | 2 | Basic graceful shutdown. Waits for in-flight HTTP requests. Workers not handled. |
154
+ | 3 | Orchestrated shutdown: stop consumers, drain queues, commit transactions. Configurable timeout. |
155
+ | 4 | Coordinated multi-instance shutdown. Health check integrated. Automatic rollback if shutdown fails. |
156
+
157
+ ---
158
+
159
+ ### PA-07 - Controlled recovery after restart · Criticality: **MUST**
160
+
161
+ **Analyze:** Readiness probes, dependency checks, startup ordering, canary startup
162
+
163
+ **Verification commands:**
164
+ ```bash
165
+ grep -ri "readinessProbe\|livenessProbe\|startupProbe\|health.check\|depends_on.*healthy" . --include="*.yml" --include="*.yaml" 2>/dev/null | head -10
166
+ grep -ri "wait.for.it\|dockerize\|init.container" . --include="*.yml" --include="*.yaml" 2>/dev/null | head -5
167
+ ```
168
+
169
+ **Check:** Readiness probes, dependency checks, startup ordering, canary startup
170
+
171
+ **Levels:**
172
+ | Level | Criteria |
173
+ |-------|----------|
174
+ | 0 | All-or-nothing startup. No control over the recovery order. |
175
+ | 1 | Manual sequential startup. Manual checks between steps. |
176
+ | 2 | Startup script with health checks. Defined order but no auto-rollback. |
177
+ | 3 | Orchestrated startup with dependencies. Readiness probes. Rollback if startup fails. |
178
+ | 4 | Canary startup. Progressive recovery with metric validation. Self-healing. |
179
+
180
+ ---
181
+
182
+ ### PA-08 - Connector/API isolation mechanism · Criticality: **SHOULD**
183
+
184
+ **Analyze:** Per-connector feature flags, per-API circuit breaker, tenant isolation, bulkhead
185
+
186
+ **Verification commands:**
187
+ ```bash
188
+ grep -ri "bulkhead\|isolat\|feature.flag.*api\|circuit.*per.*service" . --include="*.ts" --include="*.js" --include="*.php" 2>/dev/null | head -10
189
+ ```
190
+
191
+ **Check:** Per-connector isolation (feature flags, dedicated circuit breaker), tenant isolation, health-based routing
192
+
193
+ **Levels:**
194
+ | Level | Criteria |
195
+ |-------|----------|
196
+ | 0 | Impossible to isolate a connector. All or nothing. |
197
+ | 1 | Disabling possible but requires redeployment. |
198
+ | 2 | Feature flag per connector. Enable/disable live via config. |
199
+ | 3 | Admin UI to isolate/re-enable. Change logs. Per-tenant isolation possible. |
200
+ | 4 | Automatic isolation based on health. Self-healing. Proactive notifications. |
201
+
202
+ ---
203
+
204
+ ### PA-09 - Connector notification strategy · Criticality: **SHOULD**
205
+
206
+ **Analyze:** Multi-channel, smart routing, graded severity, enriched context
207
+
208
+ **Verification commands:**
209
+ ```bash
210
+ grep -ri "pagerduty\|opsgenie\|alert\|notification\|escalat" . --include="*.yml" --include="*.yaml" --include="*.ts" --include="*.php" 2>/dev/null | head -10
211
+ ```
212
+
213
+ **Check:** Multi-channel (Slack/PagerDuty/email), routing to the responsible team, graded severity, enriched context
214
+
215
+ **Levels:**
216
+ | Level | Criteria |
217
+ |-------|----------|
218
+ | 0 | No notification. Problems discovered by users. |
219
+ | 1 | Basic email notification. No distinction by severity. Alert fatigue. |
220
+ | 2 | Slack/Teams + email. Severity defined. No smart routing. |
221
+ | 3 | Multi-channel with escalation. Automatic customer notification. Runbook attached. |
222
+ | 4 | Contextual notification with preliminary diagnosis. Incident management integration (PagerDuty, OpsGenie). |
223
+
224
+ ---
225
+
226
+ ### PA-12 - Degraded mode (cache, replication, fallback) · Criticality: **MUST**
227
+
228
+ **Analyze:** Stale cache, static fallback, feature degradation, read replicas
229
+
230
+ **Verification commands:**
231
+ ```bash
232
+ grep -ri "stale.while.revalidate\|fallback\|degraded\|read.only\|cache.*fallback" . --include="*.ts" --include="*.js" --include="*.php" --include="*.yml" 2>/dev/null | head -10
233
+ ```
234
+
235
+ **Check:** Stale cache configured, static fallback, progressive feature degradation, read replica fallback
236
+
237
+ **Levels:**
238
+ | Level | Criteria |
239
+ |-------|----------|
240
+ | 0 | No degraded mode. All or nothing. |
241
+ | 1 | Manual fallback (human intervention to switch over). |
242
+ | 2 | Backup cache for some data. Not automatic. |
243
+ | 3 | Automatic degraded mode documented. Stale data acceptable for some use cases. UI indicates the mode. |
244
+ | 4 | Progressive graceful degradation. Automatic feature prioritization. Degradation metrics. |
245
+
246
+ ---
247
+
248
+ ### PA-13 - Watch on external API changelog/versioning · Criticality: **SHOULD**
249
+
250
+ **Analyze:** Dependabot, Renovate, deprecation calendar, contract testing of external APIs
251
+
252
+ **Verification commands:**
253
+ ```bash
254
+ find . -name "dependabot.yml" -o -name "renovate.json*" -o -name ".renovaterc*" 2>/dev/null
255
+ grep -ri "pact\|contract.test\|api.*version.*pin" . --include="*.ts" --include="*.yml" 2>/dev/null | head -5
256
+ ```
257
+
258
+ **Check:** Automated changelog monitoring, deprecation calendar, contract testing, version pinning
259
+
260
+ **Levels:**
261
+ | Level | Criteria |
262
+ |-------|----------|
263
+ | 0 | No watch. Breaking changes discovered in production. |
264
+ | 1 | Occasional manual watch. No defined process. |
265
+ | 2 | Subscribed to changelogs. Review before deploying new versions to prod. |
266
+ | 3 | Structured watch with a deprecation calendar. Automated compatibility tests. |
267
+ | 4 | Contract testing against external APIs. Preventive alert on breaking changes. Planned migration. |
268
+
269
+ ---
270
+
271
+ ### PA-18 - DB migration tests · Criticality: **MUST**
272
+
273
+ **Analyze:** Expand-contract pattern, shadow writes, data validation, dry-run migrations
274
+
275
+ **Verification commands:**
276
+ ```bash
277
+ find . -path "*/migrations/*" -o -path "*/database/migrations/*" 2>/dev/null | head -10
278
+ grep -ri "flyway\|liquibase\|knex.*migrate\|artisan.*migrate\|alembic" . --include="*.yml" --include="*.yaml" --include="*.json" 2>/dev/null | head -5
279
+ grep -ri "expand.contract\|zero.downtime.*migration" . --include="*.md" 2>/dev/null | head -5
280
+ ```
281
+
282
+ **Check:** Migrations tested on realistic data, expand-contract, post-migration data validation, dry-run
283
+
284
+ **Levels:**
285
+ | Level | Criteria |
286
+ |-------|----------|
287
+ | 0 | DB migrations tested only in production. Major risk. |
288
+ | 1 | Manual test on a dev environment. No realistic data. |
289
+ | 2 | Migration on staging with a subset of data. Manual validation. |
290
+ | 3 | Migration pipeline with anonymized prod data. Automated tests. Rollback tested. |
291
+ | 4 | Blue-green database migrations. Zero-downtime migrations. Backward compatible schemas. |
292
+
293
+ ---
294
+
295
+ ### PA-19 - DB backup plan · Criticality: **MUST**
296
+
297
+ **Analyze:** 3-2-1 rule, PITR, incremental backups, immutable backups
298
+
299
+ **Verification commands:**
300
+ ```bash
301
+ grep -ri "backup\|snapshot\|restore\|pgbackrest\|xtrabackup\|pg_dump" . --include="*.yml" --include="*.yaml" --include="*.sh" --include="*.tf" 2>/dev/null | head -10
302
+ grep -ri "rpo\|rto\|point.in.time\|pitr" . --include="*.md" --include="*.yml" 2>/dev/null | head -5
303
+ ```
304
+
305
+ **Check:** Automatic backup, 3-2-1 rule, PITR, encryption, restore tests, RPO/RTO aligned
306
+
307
+ **Levels:**
308
+ | Level | Criteria |
309
+ |-------|----------|
310
+ | 0 | No backup, or backup never tested. |
311
+ | 1 | Daily backup. No restore test. Storage in the same zone. |
312
+ | 2 | Multi-zone backup. PITR available. Annual test. |
313
+ | 3 | Encrypted, multi-region backup. RTO/RPO defined and tested quarterly. Backup monitoring. |
314
+ | 4 | Continuous backup with real-time replication. Automated disaster recovery. Compliance audit. |
315
+
316
+ ---
317
+
318
+ ### PA-20 - DB rollback playbook · Criticality: **SHOULD**
319
+
320
+ **Analyze:** Runbook automation, decision trees, communication templates, post-rollback validation
321
+
322
+ **Verification commands:**
323
+ ```bash
324
+ find docs/ -name "*rollback*" -o -name "*playbook*" -o -name "*runbook*" 2>/dev/null
325
+ grep -ri "rollback.*db\|database.*rollback\|migration.*rollback" . --include="*.md" 2>/dev/null | head -5
326
+ ```
327
+
328
+ **Check:** Documented playbook, exact commands, points of no return, post-rollback checklist
329
+
330
+ **Levels:**
331
+ | Level | Criteria |
332
+ |-------|----------|
333
+ | 0 | No rollback plan. Improvisation when a problem hits. |
334
+ | 1 | Informal procedure known to a few people. |
335
+ | 2 | Documented playbook. Not regularly tested. |
336
+ | 3 | Playbook with detailed steps, owners, and communication. Tested twice a year. |
337
+ | 4 | Automatable rollback. Regular dry-run. Rollback-time metrics. |
338
+
339
+ ---
340
+
341
+ ### PA-21 - DB rollback tests · Criticality: **SHOULD**
342
+
343
+ **Analyze:** Game days, chaos engineering, RTO measurement, DR drills
344
+
345
+ **Verification commands:**
346
+ ```bash
347
+ grep -ri "game.day\|chaos.monkey\|chaos.engineering\|dr.drill\|disaster.recovery.*test" . --include="*.md" --include="*.yml" 2>/dev/null | head -5
348
+ grep -ri "gremlin\|litmus\|chaos.toolkit\|fault.injection" . 2>/dev/null | head -5
349
+ ```
350
+
351
+ **Check:** Planned game days, chaos engineering, measured RTO vs target, regular DR drills
352
+
353
+ **Levels:**
354
+ | Level | Criteria |
355
+ |-------|----------|
356
+ | 0 | Rollback never tested. First test = a real incident. |
357
+ | 1 | Tested at setup time. Not tested since. |
358
+ | 2 | Annual drill. Non-prod environment. Documented results. |
359
+ | 3 | Quarterly drill on a prod-like environment. Metrics collected. Occasional chaos engineering. |
360
+ | 4 | Continuous chaos engineering. Regular game days. Validated RTO. Continuous improvement. |
361
+
362
+ ---