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,402 @@
1
+ # Audit grid - QU Data Quality section
2
+
3
+ 12 questions. Schema validation, null handling, business consistency, anomaly correction, traceability, data lifetime.
4
+
5
+ ## Table of contents
6
+
7
+ - [QU-01 - Input schema validation (JSON Schema, OpenAPI)](#qu-01--input-schema-validation-json-schema-openapi--criticality-must)
8
+ - [QU-01a - Validation error handling](#qu-01a--validation-error-handling--criticality-should)
9
+ - [QU-02 - Null/incomplete value handling](#qu-02--nullincomplete-value-handling--criticality-should)
10
+ - [QU-03 - Business consistency verification](#qu-03--business-consistency-verification--criticality-must)
11
+ - [QU-03a - Data anomaly detection](#qu-03a--data-anomaly-detection--criticality-could)
12
+ - [QU-04 - Manual anomaly correction possible](#qu-04--manual-anomaly-correction-possible--criticality-should)
13
+ - [QU-05 - Automatic anomaly correction suggestions](#qu-05--automatic-anomaly-correction-suggestions--criticality-could)
14
+ - [QU-06 - Unique correlation ID (traceId)](#qu-06--unique-correlation-id-traceid--criticality-should)
15
+ - [QU-07 - Technical logs / business events separation](#qu-07--technical-logs--business-events-separation--criticality-should)
16
+ - [QU-08 - Data lifetime policy](#qu-08--data-lifetime-policy--criticality-must)
17
+ - [QU-09 - Automatic purges of end-of-life data](#qu-09--automatic-purges-of-end-of-life-data--criticality-should)
18
+ - [QU-09a - Purge verification](#qu-09a--purge-verification--criticality-could)
19
+
20
+ ---
21
+
22
+ ### QU-01 - Input schema validation (JSON Schema, OpenAPI) - Criticality: **must**
23
+
24
+ **Analyze:** Validation schemas (Zod, Joi, JSON Schema, class-validator, OpenAPI), validation middleware
25
+
26
+ **Check:**
27
+ - Systematic input validation (API, forms)
28
+ - Formal schema defined (JSON Schema, OpenAPI, Zod)
29
+ - Server-side validation (not only client-side)
30
+ - Contract-first design (API-first)
31
+ - Schema registry for versioning
32
+
33
+ **Commands:**
34
+ ```bash
35
+ # Validation schemas
36
+ grep -ri "zod\|joi\|class-validator\|yup\|json.schema\|openapi" package.json composer.json 2>/dev/null
37
+ grep -r "\.parse\|\.safeParse\|\.validate" --include="*.ts" --include="*.php" | grep -v node_modules | wc -l
38
+ # OpenAPI
39
+ ls openapi.yaml openapi.json swagger.json api-docs/ 2>/dev/null
40
+ # Form Request (Laravel)
41
+ find . -name "*Request.php" -path "*/Http/Requests/*" 2>/dev/null | head -10
42
+ ```
43
+
44
+ **Levels:**
45
+ | Level | Criteria |
46
+ |-------|----------|
47
+ | 0 | No validation. Data accepted as-is. |
48
+ | 1 | Basic validation (primitive types). Silent errors. |
49
+ | 2 | JSON Schema/OpenAPI for the main APIs. Server-side validation. |
50
+ | 3 | Complete validation with clear error messages. Contract-first design. |
51
+ | 4 | Schema registry. Schema versioning. Backward compatibility checks. Client SDK generation. |
52
+
53
+ ---
54
+
55
+ ### QU-01a - Validation error handling - Criticality: **should**
56
+
57
+ **Analyze:** Validation-error format, RFC 7807/9457, error messages, i18n
58
+
59
+ **Check:**
60
+ - Structured errors with a path to the invalid field
61
+ - Consistent format (RFC 7807 Problem Details or equivalent)
62
+ - Clear, actionable error messages
63
+ - No sensitive information leaked in the errors
64
+ - Dry-run mode for validation preview
65
+
66
+ **Commands:**
67
+ ```bash
68
+ # Error format
69
+ grep -ri "problem.details\|rfc.7807\|rfc.9457\|validation.error" --include="*.ts" --include="*.php" 2>/dev/null | head -10
70
+ # Structured error messages
71
+ grep -ri "error.*message\|error.*field\|error.*path" --include="*.ts" --include="*.php" 2>/dev/null | head -10
72
+ # Error i18n
73
+ grep -ri "validation\.\|trans(" --include="*.php" 2>/dev/null | head -5
74
+ ```
75
+
76
+ **Levels:**
77
+ | Level | Criteria |
78
+ |-------|----------|
79
+ | 0 | Generic 500 error. No detail. |
80
+ | 1 | Basic error message. No localization of the error. |
81
+ | 2 | Structured errors with a path to the invalid field. |
82
+ | 3 | i18n errors. Correction suggestions. Constraint documentation. |
83
+ | 4 | Validation preview. Dry-run mode. Generated client-side validation. |
84
+
85
+ ---
86
+
87
+ ### QU-02 - Null/incomplete value handling - Criticality: **should**
88
+
89
+ **Analyze:** Null/undefined strategy, strictNullChecks, Optional types, fail-fast
90
+
91
+ **Check:**
92
+ - `strictNullChecks` enabled (TypeScript) or `strict_types` (PHP)
93
+ - Explicit null/undefined handling (no `!` non-null assertion)
94
+ - Documented default values
95
+ - Fail-fast strategy for critical data
96
+ - Nullable annotations / static analysis
97
+
98
+ **Commands:**
99
+ ```bash
100
+ # TypeScript strict
101
+ grep "strictNullChecks\|\"strict\"" tsconfig.json 2>/dev/null
102
+ # Non-null assertions
103
+ grep -r "!\." --include="*.ts" | grep -v node_modules | grep -v ".test." | wc -l
104
+ # PHP strict types
105
+ grep -r "declare(strict_types" --include="*.php" | grep -v vendor | wc -l
106
+ # Nullable fields
107
+ grep -r "nullable\|Optional\|Maybe" --include="*.ts" --include="*.php" | grep -v node_modules | grep -v vendor | wc -l
108
+ ```
109
+
110
+ **Levels:**
111
+ | Level | Criteria |
112
+ |-------|----------|
113
+ | 0 | No handling. NullPointerException in prod. |
114
+ | 1 | Generic try/catch. Error logs without context. |
115
+ | 2 | Default values defined. Optional/Maybe patterns used. |
116
+ | 3 | Explicit strategy (fail-fast vs default). Nullable annotations. Static analysis. |
117
+ | 4 | Non-nullable types by default. Exhaustive null checks. Property-based testing. |
118
+
119
+ ---
120
+
121
+ ### QU-03 - Business consistency verification - Criticality: **must**
122
+
123
+ **Analyze:** Business rules (DDD invariants, business rules), semantic validation, cross-field validation
124
+
125
+ **Check:**
126
+ - Business rules documented and centralized
127
+ - Validation beyond format (semantics, consistency)
128
+ - Cross-field validation (end date > start date, consistent totals)
129
+ - Domain-Driven Design (invariants in the aggregates)
130
+ - Business rules engine if complexity is significant
131
+
132
+ **Commands:**
133
+ ```bash
134
+ # Business rules
135
+ find . -name "*Rule*" -o -name "*Validator*" -o -name "*Specification*" 2>/dev/null | grep -v node_modules | grep -v vendor | head -10
136
+ # DDD patterns
137
+ find . -name "*Aggregate*" -o -name "*ValueObject*" -o -name "*DomainEvent*" 2>/dev/null | grep -v vendor | head -10
138
+ # Cross-field validation
139
+ grep -ri "refine\|superRefine\|after\|before\|cross.valid" --include="*.ts" --include="*.php" 2>/dev/null | head -10
140
+ ```
141
+
142
+ **Levels:**
143
+ | Level | Criteria |
144
+ |-------|----------|
145
+ | 0 | No business verification. Inconsistent data accepted. |
146
+ | 1 | Ad-hoc checks in the code. No centralized rules. |
147
+ | 2 | Documented business rules. Validation implemented for critical cases. |
148
+ | 3 | Business rules engine. Validation on input and in batch. Alerts on anomalies. |
149
+ | 4 | Domain-Driven Design. Invariants enforced. Event sourcing with validation. ML for anomaly detection. |
150
+
151
+ ---
152
+
153
+ ### QU-03a - Data anomaly detection - Criticality: **could**
154
+
155
+ **Analyze:** Outlier detection, data-quality monitoring, data observability
156
+
157
+ **Check:**
158
+ - Periodic verification jobs
159
+ - Alerts on statistical deviations
160
+ - Data observability (Great Expectations, dbt tests)
161
+ - ML anomaly detection (Isolation Forest, etc.)
162
+ - Auto-remediation for simple cases
163
+
164
+ **Commands:**
165
+ ```bash
166
+ # Data quality jobs
167
+ find . -name "*anomal*" -o -name "*outlier*" -o -name "*data.quality*" 2>/dev/null | head -10
168
+ grep -ri "great.expectations\|dbt.test\|monte.carlo" package.json 2>/dev/null
169
+ # Scheduled data checks
170
+ grep -ri "schedule\|cron\|data.check" .github/ app/Console/Kernel.php 2>/dev/null | head -10
171
+ ```
172
+
173
+ **Levels:**
174
+ | Level | Criteria |
175
+ |-------|----------|
176
+ | 0 | No detection. Discovered by users. |
177
+ | 1 | Occasional manual SQL queries. |
178
+ | 2 | Periodic verification jobs. Anomaly reports. |
179
+ | 3 | Real-time monitoring. Alerts on statistical deviation. |
180
+ | 4 | ML anomaly detection. Auto-remediation for simple cases. Data observability platform. |
181
+
182
+ ---
183
+
184
+ ### QU-04 - Manual anomaly correction possible - Criticality: **should**
185
+
186
+ **Analyze:** Admin interface, audit trail, approval workflow
187
+
188
+ **Check:**
189
+ - Correction interface for authorized users
190
+ - Complete audit trail (who, when, what, why)
191
+ - Business validation on corrections
192
+ - Preview before saving
193
+ - Approval workflow for sensitive data
194
+
195
+ **Commands:**
196
+ ```bash
197
+ # Admin panel
198
+ find . -name "*admin*" -o -name "*backoffice*" 2>/dev/null | grep -v node_modules | grep -v vendor | head -10
199
+ # Audit trail
200
+ grep -ri "auditable\|audit.log\|activity.log\|paper.trail" --include="*.php" --include="*.ts" 2>/dev/null | head -10
201
+ find . -name "*Audit*" -o -name "*Activity*" 2>/dev/null | grep -v vendor | head -10
202
+ ```
203
+
204
+ **Levels:**
205
+ | Level | Criteria |
206
+ |-------|----------|
207
+ | 0 | No correction UI. Direct SQL queries. |
208
+ | 1 | Basic admin panel. No audit of the modifications. |
209
+ | 2 | Correction interface with history. Basic validation. |
210
+ | 3 | Correction workflow with approval. Complete audit trail. Preview before saving. |
211
+ | 4 | Self-service data correction. Undo/redo. Batch corrections. Data lineage visible. |
212
+
213
+ ---
214
+
215
+ ### QU-05 - Automatic anomaly correction suggestions - Criticality: **could**
216
+
217
+ **Analyze:** Correction suggestions, fuzzy matching, ML suggestions, bulk operations
218
+
219
+ **Check:**
220
+ - Automatic correction suggestions
221
+ - Fuzzy matching for typo correction
222
+ - Confidence score on the suggestions
223
+ - Bulk apply with human validation
224
+ - Learning from past corrections
225
+
226
+ **Commands:**
227
+ ```bash
228
+ # Auto-correction / suggestions
229
+ grep -ri "suggest\|fuzzy\|autocorrect\|levenshtein" --include="*.ts" --include="*.php" 2>/dev/null | head -10
230
+ grep -ri "fuzzywuzzy\|string.similarity" package.json 2>/dev/null
231
+ ```
232
+
233
+ **Levels:**
234
+ | Level | Criteria |
235
+ |-------|----------|
236
+ | 0 | No automatic suggestion. |
237
+ | 1 | Basic suggestions (e.g. trim whitespace). |
238
+ | 2 | Defined correction rules. Contextual suggestions. |
239
+ | 3 | ML for suggestions. Confidence score. Bulk apply with validation. |
240
+ | 4 | Auto-correction for certain rules. Human-in-the-loop for uncertain ones. Learning from corrections. |
241
+
242
+ ---
243
+
244
+ ### QU-06 - Unique correlation ID (traceId) - Criticality: **should**
245
+
246
+ **Analyze:** traceId/correlationId, OpenTelemetry, W3C Trace Context, distributed tracing
247
+
248
+ **Check:**
249
+ - Unique identifier per request (traceId, correlationId)
250
+ - Propagation of the traceId across services/layers
251
+ - traceId included in logs and error responses
252
+ - OpenTelemetry integrated
253
+ - Log/metric/trace correlation
254
+
255
+ **Commands:**
256
+ ```bash
257
+ # TraceId / correlation
258
+ grep -ri "traceId\|correlationId\|requestId\|trace.context\|traceparent" . --include="*.ts" --include="*.php" 2>/dev/null | head -10
259
+ # OpenTelemetry
260
+ grep -ri "opentelemetry\|otel\|jaeger\|zipkin" package.json composer.json .env* 2>/dev/null
261
+ # Tracing middleware
262
+ grep -ri "middleware.*trace\|trace.*middleware" --include="*.ts" --include="*.php" 2>/dev/null | head -5
263
+ ```
264
+
265
+ **Levels:**
266
+ | Level | Criteria |
267
+ |-------|----------|
268
+ | 0 | No traceId. Impossible to correlate logs. |
269
+ | 1 | TraceId generated but not propagated across services. |
270
+ | 2 | TraceId propagated via headers. Visible in all logs of a request. |
271
+ | 3 | OpenTelemetry integrated. Spans and traces. Correlation with metrics and logs. |
272
+ | 4 | Complete distributed tracing. Intelligent trace sampling. Business transaction correlation. |
273
+
274
+ ---
275
+
276
+ ### QU-07 - Technical logs / business events separation - Criticality: **should**
277
+
278
+ **Analyze:** Event sourcing, event bus, store separation, event schema
279
+
280
+ **Check:**
281
+ - Technical logs and business events separated
282
+ - Structured business events (documented schema)
283
+ - Event bus for business events (Kafka, RabbitMQ, EventBridge)
284
+ - Differentiated retention (7d technical logs, 10 years accounting events)
285
+ - Business audit trail usable by non-technical people
286
+
287
+ **Commands:**
288
+ ```bash
289
+ # Event sourcing / events
290
+ find . -name "*Event*" -o -name "*event*" 2>/dev/null | grep -v node_modules | grep -v vendor | head -10
291
+ grep -ri "event.sourcing\|event.store\|domain.event" --include="*.ts" --include="*.php" 2>/dev/null | head -10
292
+ # Message broker
293
+ grep -ri "kafka\|rabbitmq\|eventbridge\|pub.sub" package.json composer.json .env* docker-compose*.yml 2>/dev/null
294
+ # Log separation
295
+ grep -ri "business.log\|audit.log\|activity.log" --include="*.ts" --include="*.php" 2>/dev/null | head -10
296
+ ```
297
+
298
+ **Levels:**
299
+ | Level | Criteria |
300
+ |-------|----------|
301
+ | 0 | Everything mixed in the same logs. |
302
+ | 1 | Technical and business logs in separate files. |
303
+ | 2 | Event bus for business events. Technical logs in ELK. |
304
+ | 3 | Event sourcing for the business audit. Documented event schema. |
305
+ | 4 | CQRS with an event store. Business analytics on events. Automated compliance reporting. |
306
+
307
+ ---
308
+
309
+ ### QU-08 - Data lifetime policy - Criticality: **must**
310
+
311
+ **Analyze:** Retention policy, data classification, TTL, tiered storage
312
+
313
+ **Check:**
314
+ - Retention policy documented per data type
315
+ - Data classification (public, internal, confidential, restricted)
316
+ - Retention periods aligned with legal obligations (GDPR, accounting)
317
+ - Automatic TTL in the databases
318
+ - Data lifecycle management
319
+
320
+ **Commands:**
321
+ ```bash
322
+ # Retention policy
323
+ find . -name "*retention*" -o -name "*lifecycle*" -o -name "*data.policy*" 2>/dev/null | head -5
324
+ # TTL in the configs
325
+ grep -ri "ttl\|expire\|retention" --include="*.yml" --include="*.yaml" --include="*.php" 2>/dev/null | head -10
326
+ # Time-based partitioning
327
+ grep -ri "partition\|archiv" --include="*.sql" --include="*.php" 2>/dev/null | head -10
328
+ ```
329
+
330
+ **Levels:**
331
+ | Level | Criteria |
332
+ |-------|----------|
333
+ | 0 | No policy. Data kept indefinitely. |
334
+ | 1 | Informal policy. Occasional manual purges. |
335
+ | 2 | Policy documented per data type. Retention defined. |
336
+ | 3 | Data classification. Automatic TTL. Verifiable GDPR compliance. |
337
+ | 4 | Automated data lifecycle management. Right to be forgotten integrated. Deletion audit trail. |
338
+
339
+ ---
340
+
341
+ ### QU-09 - Automatic purges of end-of-life data - Criticality: **should**
342
+
343
+ **Analyze:** Purge jobs, soft delete, cascading delete, dry-run
344
+
345
+ **Check:**
346
+ - Automatic purge jobs (cron, scheduled jobs)
347
+ - Prior dry-run before deletion
348
+ - Soft delete with a grace period
349
+ - Deletion cascade (dependent data)
350
+ - Notification before deletion
351
+ - Deletion logs
352
+
353
+ **Commands:**
354
+ ```bash
355
+ # Purge jobs
356
+ grep -ri "purge\|prune\|cleanup\|delete.old\|model:prune" app/Console/ .github/ 2>/dev/null | head -10
357
+ # Soft delete
358
+ grep -ri "SoftDelete\|soft.delete\|deleted_at" --include="*.php" --include="*.ts" 2>/dev/null | head -10
359
+ # Scheduled tasks
360
+ cat app/Console/Kernel.php 2>/dev/null | head -30
361
+ ```
362
+
363
+ **Levels:**
364
+ | Level | Criteria |
365
+ |-------|----------|
366
+ | 0 | No automatic purge. Storage grows indefinitely. |
367
+ | 1 | Manual purge scripts. Occasional execution. |
368
+ | 2 | Scheduled purge jobs. Deletion logs. |
369
+ | 3 | Automatic purge with prior dry-run. Notification before deletion. Soft delete. |
370
+ | 4 | Tiered storage with archiving. Purge propagated to third-party systems. Compliance proof. |
371
+
372
+ ---
373
+
374
+ ### QU-09a - Purge verification - Criticality: **could**
375
+
376
+ **Analyze:** Post-purge audit, volume monitoring, deletion certificates, verification across all systems
377
+
378
+ **Check:**
379
+ - Automated post-purge verification
380
+ - Volume metrics before/after purge
381
+ - Alerts on anomalies (abnormal purge volume)
382
+ - Deletion certification for compliance
383
+ - Verification in secondary systems (caches, replicas, backups)
384
+
385
+ **Commands:**
386
+ ```bash
387
+ # Post-purge verification
388
+ grep -ri "verify.*purge\|audit.*delete\|post.purge" --include="*.php" --include="*.ts" 2>/dev/null | head -10
389
+ # Volume monitoring
390
+ grep -ri "count.*before\|count.*after\|volume.*check" --include="*.php" --include="*.ts" 2>/dev/null | head -10
391
+ ```
392
+
393
+ **Levels:**
394
+ | Level | Criteria |
395
+ |-------|----------|
396
+ | 0 | No verification. Blind trust. |
397
+ | 1 | Manual verification on a sample. |
398
+ | 2 | Volume metrics before/after. Alerts on anomalies. |
399
+ | 3 | Automated post-purge audit. Verification across all systems. |
400
+ | 4 | Deletion certification. Third-party audit. Cryptographic proof. |
401
+
402
+ ---
@@ -0,0 +1,72 @@
1
+ # `audit-report`
2
+
3
+ > The scoring rules and report template for a consolidated industrialization audit - usable standalone to reformat existing findings, or as the reference the orchestrator applies in its consolidation phase.
4
+
5
+ | | |
6
+ |---|---|
7
+ | **Type** | Skill (reference + reformatting workflow) |
8
+ | **Category** | `audit` |
9
+ | **Artifact** | [`SKILL.md`](SKILL.md) |
10
+ | **Tooling** | None (documentary reference; inline template) |
11
+
12
+ ## What it is
13
+
14
+ `audit-report` is the **scoring and formatting layer** of the audit system. It defines how domain results turn into a single report: how to average a domain, how to weight the global score, how to classify maturity, how to handle N/A and low-confidence questions, and the exact Markdown structure of the deliverable.
15
+
16
+ It is deliberately **stateless about orchestration** - it does not run audits or collect results. It takes results that already exist and shapes them, or it lends its rules to `audit-industrialisation`.
17
+
18
+ ## Why it exists
19
+
20
+ The scoring rules must be **one source of truth**. If the weight table or the maturity thresholds lived only inside the orchestrator, a standalone reformat would drift from a full audit. Splitting them out means:
21
+
22
+ - **Standalone reuse** - `/audit-report` reformats findings someone already produced (even by hand) into the canonical report.
23
+ - **Shared reference** - `audit-industrialisation` Phase 3 applies these exact rules, so both paths yield identical scores.
24
+ - **A single template** - everyone gets the same sections: executive summary, maturity radar, per-domain detail, cross-domain inconsistencies, prioritized action plan, non-auditable items, appendices.
25
+
26
+ > The weight table and classification are **duplicated** in `audit-industrialisation` (Phase 3) on purpose (so each can run alone). Any change must be mirrored in both files.
27
+
28
+ ## When it triggers
29
+
30
+ Invoke it when you have **already-produced** audit results and want them consolidated or reformatted - "audit report", "consolidate audit", "reformat audit findings".
31
+
32
+ - Use **`audit-industrialisation`** instead when the audit must be produced end to end (profiling, running the domains, then consolidating).
33
+ - Use a single **`audit-<domain>`** to evaluate one domain, not to build the global report.
34
+
35
+ ## How it works
36
+
37
+ The sub-sections below give the shape of the scoring model and processing rules; the authoritative weight table, classification thresholds and full Markdown template live in [`SKILL.md`](SKILL.md).
38
+
39
+ ### Scoring
40
+
41
+ - **Domain score** = arithmetic mean of the domain's question levels, **N/A excluded** from the denominator. Example: scores `[2, 3, N/A, 1, 2, 2, N/A, 3]` → `(2+3+1+2+2+3)/6 = 2.17/4`.
42
+ - **Global score** = weighted average - Security ×1.5, Testing ×1.2, CI/CD / Observability / Architecture / Quality / Compliance ×1.0, Frontend Perf ×0.8. Non-audited domains are dropped (weight ignored).
43
+ - **Classification**: Initial (0.0–0.9) → Managed → Defined → Controlled → Optimized (3.6–4.0).
44
+
45
+ ### Processing rules
46
+
47
+ - **N/A** questions are excluded from averages and listed under "Non-auditable items" with a reason.
48
+ - **Low-confidence warning**: if >50% of a domain's questions are low-confidence, a visible warning is added; same at the executive-summary level if >50% globally.
49
+ - **Critical items**: any MUST question at level 0 is tagged `[CRITICAL]` and listed first, before the quick wins.
50
+ - **Cross-domain consistency**: the same file scored contradictorily across domains (e.g. "well structured" in quality, "insecure" in security) is flagged in a dedicated section.
51
+
52
+ ### Prioritization
53
+
54
+ MUST covers e.g. security score 0-1, hard-coded secrets (immediate MUST), no tests in CI, no tested backup, no production monitoring, GDPR score 0-1. SHOULD covers e.g. coverage < 50%, no ADR, no input validation, CI pipeline > 15 min. COULD covers e.g. no chaos testing, no DORA metrics, no data catalog, no FinOps.
55
+
56
+ ### Template
57
+
58
+ The SKILL.md carries the full Markdown template - executive summary (+ confidence warning), maturity radar, scores-per-domain table, per-domain detail tables, cross-domain inconsistencies, action plan (Critical → Quick wins → Short → Medium → Long), non-auditable items, and appendices (validation methods, reference model, confidence levels).
59
+
60
+ ## Worked example
61
+
62
+ > You are handed raw notes from a partial audit of `beta-app` covering only Security and Testing.
63
+
64
+ 1. You compute each domain mean (N/A excluded): Security 1.8, Testing 2.5.
65
+ 2. Global = `(1.8×1.5 + 2.5×1.2) / (1.5 + 1.2) = 2.11/4` → **Defined**; the other six weights are ignored (not audited).
66
+ 3. A MUST security question sits at level 0 → it becomes a `[CRITICAL]` item at the top of the action plan.
67
+ 4. You emit the report with only the two audited domains in the radar and the scores table, and list every untouched area under "Non-auditable items".
68
+
69
+ ## Related artifacts
70
+
71
+ - [`audit-industrialisation`](../audit-industrialisation/) - the orchestrator that produces the audit end to end and applies these rules in Phase 3.
72
+ - The eight `audit-*` domain skills (e.g. [`audit-security`](../audit-security/), [`audit-testing`](../audit-testing/)) - the source of the questions being scored.