@dzhechkov/keysarium 1.7.15 → 1.7.19

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 (83) hide show
  1. package/.dz-manifest.json +214 -54
  2. package/README.md +29 -6
  3. package/README.ru.md +17 -0
  4. package/package.json +3 -3
  5. package/sbom.json +455 -55
  6. package/src/cli.js +32 -2
  7. package/src/commands/doctor.js +25 -1
  8. package/src/commands/init.js +56 -12
  9. package/src/commands/update.js +30 -3
  10. package/src/utils.js +7 -0
  11. package/templates/.agents/skills/casarium/SKILL.md +29 -0
  12. package/templates/.claude/agents/code-goal-planner.md +447 -0
  13. package/templates/.claude/commands/casarium.md +3 -1
  14. package/templates/.claude/commands/cjm-prototype.md +2 -2
  15. package/templates/.claude/commands/research.md +4 -1
  16. package/templates/.claude/rules/checkpoint-protocol.md +2 -1
  17. package/templates/.claude/rules/research-quality.md +11 -6
  18. package/templates/.claude/shards/phase-2-research.shard.md +12 -8
  19. package/templates/.claude/shards/phase-25-cjm.shard.md +5 -3
  20. package/templates/.claude/skills/feature-adr/SKILL.md +17 -15
  21. package/templates/.claude/skills/feature-adr/modules/03-adr.md +1 -1
  22. package/templates/.claude/skills/feature-adr/modules/03.5-ideation-swarm.md +1 -1
  23. package/templates/.claude/skills/feature-adr/modules/06-implementation-plan.md +2 -2
  24. package/templates/.claude/skills/feature-adr/modules/08-qe.md +1 -1
  25. package/templates/.claude/skills/feature-adr/modules/09-fleet-qe.md +12 -12
  26. package/templates/.claude/skills/feature-adr/references/agentic-qe/LICENSE.agentic-qe +21 -0
  27. package/templates/.claude/skills/feature-adr/references/agentic-qe/README.md +20 -16
  28. package/templates/.claude/skills/feature-adr/references/agentic-qe/UPSTREAM-MANIFEST.json +246 -0
  29. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-brutal-honesty-review/README.md +218 -0
  30. package/templates/.claude/skills/feature-adr/references/agentic-qe/{brutal-honesty-review.md → qe-ref-brutal-honesty-review/REFERENCE.md} +14 -1
  31. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-brutal-honesty-review/resources/assessment-rubrics.md +295 -0
  32. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-brutal-honesty-review/resources/review-template.md +102 -0
  33. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-brutal-honesty-review/schemas/output.json +291 -0
  34. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-brutal-honesty-review/scripts/assess-code.sh +179 -0
  35. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-brutal-honesty-review/scripts/assess-tests.sh +223 -0
  36. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-brutal-honesty-review/scripts/validate-config.json +34 -0
  37. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-enterprise-integration-testing/REFERENCE.md +758 -0
  38. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-enterprise-integration-testing/evals/enterprise-integration-testing.yaml +158 -0
  39. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-enterprise-integration-testing/schemas/output.json +74 -0
  40. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-enterprise-integration-testing/scripts/validate-config.json +25 -0
  41. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-qcsd-ideation-swarm/REFERENCE.md +226 -0
  42. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-qcsd-ideation-swarm/evals/qcsd-ideation-swarm.yaml +138 -0
  43. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-qcsd-ideation-swarm/schemas/output.json +568 -0
  44. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-qcsd-ideation-swarm/scripts/validate-config.json +25 -0
  45. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-qcsd-ideation-swarm/steps/01-flag-detection.md +57 -0
  46. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-qcsd-ideation-swarm/steps/02-core-agents.md +29 -0
  47. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-qcsd-ideation-swarm/steps/03-batch1-results.md +15 -0
  48. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-qcsd-ideation-swarm/steps/04-conditional-agents.md +23 -0
  49. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-qcsd-ideation-swarm/steps/05-decision-synthesis.md +29 -0
  50. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-qcsd-ideation-swarm/steps/06-report-generation.md +18 -0
  51. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-qcsd-ideation-swarm/steps/07-learning-persistence.md +29 -0
  52. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-qcsd-ideation-swarm/steps/08-final-output.md +18 -0
  53. package/templates/.claude/skills/feature-adr/references/agentic-qe/{qe-coverage-analysis.md → qe-ref-qe-coverage-analysis/REFERENCE.md} +42 -3
  54. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-qe-coverage-analysis/evals/qe-coverage-analysis.yaml +494 -0
  55. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-qe-coverage-analysis/schemas/output.json +286 -0
  56. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-qe-coverage-analysis/scripts/validate-config.json +42 -0
  57. package/templates/.claude/skills/feature-adr/references/agentic-qe/{qe-requirements-validation.md → qe-ref-qe-requirements-validation/REFERENCE.md} +13 -3
  58. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-qe-requirements-validation/evals/qe-requirements-validation.yaml +598 -0
  59. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-qe-requirements-validation/schemas/output.json +587 -0
  60. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-qe-requirements-validation/scripts/validate-config.json +37 -0
  61. package/templates/.claude/skills/feature-adr/references/agentic-qe/{regression-testing.md → qe-ref-regression-testing/REFERENCE.md} +30 -49
  62. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-regression-testing/evals/regression-testing.yaml +504 -0
  63. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-regression-testing/schemas/output.json +311 -0
  64. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-regression-testing/scripts/validate-config.json +50 -0
  65. package/templates/.claude/skills/feature-adr/references/agentic-qe/{risk-based-testing.md → qe-ref-risk-based-testing/REFERENCE.md} +23 -52
  66. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-risk-based-testing/evals/risk-based-testing.yaml +141 -0
  67. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-risk-based-testing/schemas/output.json +480 -0
  68. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-risk-based-testing/scripts/validate-config.json +25 -0
  69. package/templates/.claude/skills/feature-adr/references/agentic-qe/{shift-left-testing.md → qe-ref-shift-left-testing/REFERENCE.md} +33 -88
  70. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-shift-left-testing/evals/shift-left-testing.yaml +145 -0
  71. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-shift-left-testing/schemas/output.json +459 -0
  72. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-shift-left-testing/scripts/validate-config.json +25 -0
  73. package/templates/CLAUDE.md +3 -1
  74. package/templates/docs/feature-adr/04-admin-guide.md +1 -1
  75. package/templates/docs/improvement-directions.md +3 -3
  76. package/templates/docs/keysarium/02-admin-guide.md +2 -2
  77. package/templates/docs/keysarium/03-user-guide.md +3 -3
  78. package/templates/docs/keysarium/05-architecture.md +9 -8
  79. package/templates/docs/keysarium/06-user-flows.md +4 -4
  80. package/templates/lib/platform-templates/copilot.md +1 -1
  81. package/templates/lib/platform-templates/opencode.md +1 -1
  82. package/templates/.claude/skills/feature-adr/references/agentic-qe/enterprise-integration-testing.md +0 -111
  83. package/templates/.claude/skills/feature-adr/references/agentic-qe/qcsd-ideation-swarm.md +0 -126
@@ -0,0 +1,311 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://agentic-qe.dev/schemas/regression-testing-output.json",
4
+ "title": "AQE Regression Testing Skill Output Schema",
5
+ "description": "Schema for regression testing output including test selection analysis, impact assessment, and suite optimization.",
6
+ "type": "object",
7
+ "required": ["skillName", "version", "timestamp", "status", "trustTier", "output"],
8
+ "properties": {
9
+ "skillName": {
10
+ "type": "string",
11
+ "const": "regression-testing",
12
+ "description": "Skill identifier"
13
+ },
14
+ "version": {
15
+ "type": "string",
16
+ "pattern": "^\\d+\\.\\d+\\.\\d+(-[a-zA-Z0-9]+)?$"
17
+ },
18
+ "timestamp": {
19
+ "type": "string",
20
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2})?$"
21
+ },
22
+ "status": {
23
+ "type": "string",
24
+ "enum": ["success", "partial", "failed", "skipped"]
25
+ },
26
+ "trustTier": {
27
+ "type": "integer",
28
+ "const": 3
29
+ },
30
+ "output": {
31
+ "type": "object",
32
+ "required": ["summary", "testSelection", "impactAnalysis", "metrics"],
33
+ "properties": {
34
+ "summary": {
35
+ "type": "string",
36
+ "minLength": 10,
37
+ "maxLength": 2000
38
+ },
39
+ "score": {
40
+ "$ref": "#/$defs/regressionScore"
41
+ },
42
+ "testSelection": {
43
+ "$ref": "#/$defs/testSelection",
44
+ "description": "Test selection strategy results"
45
+ },
46
+ "impactAnalysis": {
47
+ "$ref": "#/$defs/impactAnalysis",
48
+ "description": "Change impact analysis"
49
+ },
50
+ "executionResults": {
51
+ "$ref": "#/$defs/executionResults",
52
+ "description": "Regression test execution results"
53
+ },
54
+ "suiteHealth": {
55
+ "$ref": "#/$defs/suiteHealth",
56
+ "description": "Test suite health metrics"
57
+ },
58
+ "findings": {
59
+ "type": "array",
60
+ "items": {
61
+ "$ref": "#/$defs/regressionFinding"
62
+ },
63
+ "maxItems": 500,
64
+ "description": "Regressions detected"
65
+ },
66
+ "recommendations": {
67
+ "type": "array",
68
+ "items": {
69
+ "$ref": "#/$defs/recommendation"
70
+ },
71
+ "maxItems": 100
72
+ },
73
+ "metrics": {
74
+ "$ref": "#/$defs/regressionMetrics"
75
+ },
76
+ "artifacts": {
77
+ "type": "array",
78
+ "items": {
79
+ "$ref": "#/$defs/artifact"
80
+ },
81
+ "maxItems": 50
82
+ }
83
+ }
84
+ },
85
+ "metadata": {
86
+ "type": "object",
87
+ "properties": {
88
+ "executionTimeMs": { "type": "integer", "minimum": 0 },
89
+ "toolsUsed": { "type": "array", "items": { "type": "string" } },
90
+ "agentId": { "type": "string", "pattern": "^qe-[a-z][a-z0-9-]*$" },
91
+ "prNumber": { "type": "integer", "description": "PR number if applicable" },
92
+ "baseBranch": { "type": "string" },
93
+ "headBranch": { "type": "string" }
94
+ }
95
+ },
96
+ "validation": {
97
+ "type": "object",
98
+ "properties": {
99
+ "schemaValid": { "type": "boolean" },
100
+ "contentValid": { "type": "boolean" },
101
+ "confidence": { "type": "number", "minimum": 0, "maximum": 1 }
102
+ }
103
+ },
104
+ "learning": {
105
+ "type": "object",
106
+ "properties": {
107
+ "patternsDetected": { "type": "array", "items": { "type": "string" } },
108
+ "reward": { "type": "number", "minimum": 0, "maximum": 1 }
109
+ }
110
+ }
111
+ },
112
+ "$defs": {
113
+ "regressionScore": {
114
+ "type": "object",
115
+ "required": ["value", "max"],
116
+ "properties": {
117
+ "value": { "type": "number", "minimum": 0, "maximum": 100 },
118
+ "max": { "type": "number", "const": 100 },
119
+ "grade": { "type": "string", "pattern": "^[A-F][+-]?$" },
120
+ "riskCoverage": {
121
+ "type": "number",
122
+ "minimum": 0,
123
+ "maximum": 1,
124
+ "description": "Risk coverage achieved (0.0-1.0)"
125
+ }
126
+ }
127
+ },
128
+ "testSelection": {
129
+ "type": "object",
130
+ "required": ["strategy"],
131
+ "properties": {
132
+ "strategy": {
133
+ "type": "string",
134
+ "enum": ["change-based", "risk-based", "historical", "time-budget", "full", "smoke"],
135
+ "description": "Selection strategy used"
136
+ },
137
+ "mustRun": {
138
+ "type": "array",
139
+ "items": { "type": "string" },
140
+ "description": "Tests that must run (directly impacted)"
141
+ },
142
+ "shouldRun": {
143
+ "type": "array",
144
+ "items": { "type": "string" },
145
+ "description": "Tests that should run (indirectly impacted)"
146
+ },
147
+ "canSkip": {
148
+ "type": "array",
149
+ "items": { "type": "string" },
150
+ "description": "Tests that can be safely skipped"
151
+ },
152
+ "totalTests": { "type": "integer", "minimum": 0 },
153
+ "selectedTests": { "type": "integer", "minimum": 0 },
154
+ "selectionRatio": {
155
+ "type": "number",
156
+ "minimum": 0,
157
+ "maximum": 1,
158
+ "description": "Percentage of tests selected"
159
+ },
160
+ "estimatedTime": {
161
+ "type": "string",
162
+ "description": "Estimated execution time"
163
+ },
164
+ "riskCoverage": {
165
+ "type": "number",
166
+ "minimum": 0,
167
+ "maximum": 1,
168
+ "description": "Risk coverage of selected tests"
169
+ }
170
+ }
171
+ },
172
+ "impactAnalysis": {
173
+ "type": "object",
174
+ "properties": {
175
+ "changedFiles": {
176
+ "type": "array",
177
+ "items": { "type": "string" }
178
+ },
179
+ "impactedModules": {
180
+ "type": "array",
181
+ "items": { "type": "string" }
182
+ },
183
+ "impactedTests": {
184
+ "type": "array",
185
+ "items": { "type": "string" }
186
+ },
187
+ "changeRisk": {
188
+ "type": "string",
189
+ "enum": ["low", "medium", "high", "critical"],
190
+ "description": "Overall change risk level"
191
+ },
192
+ "coverageMap": {
193
+ "type": "object",
194
+ "additionalProperties": {
195
+ "type": "array",
196
+ "items": { "type": "string" }
197
+ },
198
+ "description": "Map of files to covering tests"
199
+ }
200
+ }
201
+ },
202
+ "executionResults": {
203
+ "type": "object",
204
+ "properties": {
205
+ "total": { "type": "integer", "minimum": 0 },
206
+ "passed": { "type": "integer", "minimum": 0 },
207
+ "failed": { "type": "integer", "minimum": 0 },
208
+ "skipped": { "type": "integer", "minimum": 0 },
209
+ "flaky": { "type": "integer", "minimum": 0 },
210
+ "passRate": { "type": "number", "minimum": 0, "maximum": 100 },
211
+ "regressions": {
212
+ "type": "array",
213
+ "items": {
214
+ "type": "object",
215
+ "properties": {
216
+ "test": { "type": "string" },
217
+ "previousStatus": { "type": "string" },
218
+ "currentStatus": { "type": "string" },
219
+ "failureMessage": { "type": "string" }
220
+ }
221
+ },
222
+ "description": "Tests that regressed"
223
+ },
224
+ "executionTimeMs": { "type": "integer", "minimum": 0 }
225
+ }
226
+ },
227
+ "suiteHealth": {
228
+ "type": "object",
229
+ "properties": {
230
+ "flakiness": {
231
+ "type": "object",
232
+ "properties": {
233
+ "flakyTests": { "type": "array", "items": { "type": "string" } },
234
+ "flakinessRate": { "type": "number", "minimum": 0, "maximum": 100 }
235
+ }
236
+ },
237
+ "executionTrend": {
238
+ "type": "string",
239
+ "enum": ["improving", "stable", "degrading"],
240
+ "description": "Execution time trend"
241
+ },
242
+ "averageExecutionTime": { "type": "integer", "description": "Average test execution time in ms" },
243
+ "slowTests": {
244
+ "type": "array",
245
+ "items": {
246
+ "type": "object",
247
+ "properties": {
248
+ "test": { "type": "string" },
249
+ "duration": { "type": "integer" }
250
+ }
251
+ }
252
+ },
253
+ "recommendations": { "type": "array", "items": { "type": "string" } }
254
+ }
255
+ },
256
+ "regressionFinding": {
257
+ "type": "object",
258
+ "required": ["id", "title", "severity"],
259
+ "properties": {
260
+ "id": { "type": "string", "pattern": "^REG-\\d{3,6}$" },
261
+ "title": { "type": "string", "minLength": 5, "maxLength": 200 },
262
+ "description": { "type": "string", "maxLength": 2000 },
263
+ "severity": { "type": "string", "enum": ["critical", "high", "medium", "low", "info"] },
264
+ "test": { "type": "string", "description": "Test that detected the regression" },
265
+ "affectedComponent": { "type": "string" },
266
+ "introducedIn": { "type": "string", "description": "Commit/PR that introduced the regression" },
267
+ "evidence": { "type": "string" },
268
+ "remediation": { "type": "string" }
269
+ }
270
+ },
271
+ "regressionMetrics": {
272
+ "type": "object",
273
+ "properties": {
274
+ "totalTests": { "type": "integer", "minimum": 0 },
275
+ "testsSelected": { "type": "integer", "minimum": 0 },
276
+ "testsExecuted": { "type": "integer", "minimum": 0 },
277
+ "passRate": { "type": "number", "minimum": 0, "maximum": 100 },
278
+ "regressionsFound": { "type": "integer", "minimum": 0 },
279
+ "selectionEfficiency": {
280
+ "type": "number",
281
+ "minimum": 0,
282
+ "maximum": 100,
283
+ "description": "Percentage of tests run vs total"
284
+ },
285
+ "riskCoverageAchieved": { "type": "number", "minimum": 0, "maximum": 1 },
286
+ "executionTimeMs": { "type": "integer", "minimum": 0 },
287
+ "timeSaved": { "type": "string", "description": "Time saved vs full regression" }
288
+ }
289
+ },
290
+ "recommendation": {
291
+ "type": "object",
292
+ "required": ["id", "title", "priority"],
293
+ "properties": {
294
+ "id": { "type": "string", "pattern": "^REC-\\d{3,6}$" },
295
+ "title": { "type": "string" },
296
+ "description": { "type": "string" },
297
+ "priority": { "type": "string", "enum": ["critical", "high", "medium", "low"] },
298
+ "effort": { "type": "string", "enum": ["trivial", "low", "medium", "high", "major"] }
299
+ }
300
+ },
301
+ "artifact": {
302
+ "type": "object",
303
+ "required": ["type", "path"],
304
+ "properties": {
305
+ "type": { "type": "string", "enum": ["report", "coverage", "log", "data"] },
306
+ "path": { "type": "string" },
307
+ "format": { "type": "string", "enum": ["json", "html", "md", "xml", "txt"] }
308
+ }
309
+ }
310
+ }
311
+ }
@@ -0,0 +1,50 @@
1
+ {
2
+ "skillName": "regression-testing",
3
+ "skillVersion": "1.0.0",
4
+ "requiredTools": [
5
+ "jq"
6
+ ],
7
+ "optionalTools": [
8
+ "ajv",
9
+ "jsonschema",
10
+ "python3"
11
+ ],
12
+ "schemaPath": "schemas/output.json",
13
+ "requiredFields": [
14
+ "skillName",
15
+ "status",
16
+ "output",
17
+ "output.testSelection",
18
+ "output.impactAnalysis",
19
+ "output.metrics"
20
+ ],
21
+ "requiredNonEmptyFields": [
22
+ "output.summary",
23
+ "output.testSelection"
24
+ ],
25
+ "mustContainTerms": [
26
+ "regression",
27
+ "test"
28
+ ],
29
+ "mustNotContainTerms": [
30
+ "TODO",
31
+ "placeholder",
32
+ "FIXME"
33
+ ],
34
+ "enumValidations": {
35
+ ".status": [
36
+ "success",
37
+ "partial",
38
+ "failed",
39
+ "skipped"
40
+ ],
41
+ ".output.testSelection.strategy": [
42
+ "change-based",
43
+ "risk-based",
44
+ "historical",
45
+ "time-budget",
46
+ "full",
47
+ "smoke"
48
+ ]
49
+ }
50
+ }
@@ -16,28 +16,26 @@ validation:
16
16
  schema_path: schemas/output.json
17
17
  validator_path: scripts/validate-config.json
18
18
  eval_path: evals/risk-based-testing.yaml
19
-
20
19
  ---
21
20
 
21
+ <!-- Vendored from https://github.com/proffesor-for-testing/agentic-qe at 0a6de058575cbe292afe220df105cc74120f7674 (MIT, Copyright (c) 2025 Agentic QE Contributors), 2026-10-23. Bundled references do not install aqe, MCP tools, pattern memory, or fleet runtime. See ../LICENSE.agentic-qe and ../README.md. -->
22
+
23
+ ## Keysarium execution adapter
24
+
25
+ This pinned upstream body is methodology inside the bundled feature-ADR pipeline. In Reference Mode, the feature-ADR module that loaded this file owns orchestration and checkpoints. Use the reasoning and output shape below with the host's available tools. Do not treat upstream `aqe` CLI/MCP calls, named agent roles, browser tools, or example absolute paths as installed capabilities. Name a missing capability or evidence in the checkpoint instead of reporting that an upstream step ran. The schemas and eval files are bundled for explicit validation; bundling them does not run those checks automatically.
26
+
27
+ Relative paths such as `schemas/output.json`, `evals/...` and `steps/...` resolve from this skill directory under `references/agentic-qe/`. When Direct Mode has a separately installed `aqe` runtime, follow the feature-ADR module's direct-mode branch and verify that each required runtime capability is actually available.
28
+
29
+ <!-- BEGIN AGENTIC-QE UPSTREAM BODY -->
30
+
22
31
  # Risk-Based Testing
23
32
 
24
33
  <default_to_action>
25
34
  When planning tests or allocating testing resources:
26
- 1. IDENTIFY risks: What can go wrong? What's the impact? What's the likelihood?
27
- 2. CALCULATE risk: Risk = Probability × Impact (use 1-5 scale for each)
28
- 3. PRIORITIZE: Critical (20+) → High (12-19) → Medium (6-11) → Low (1-5)
29
- 4. ALLOCATE effort: 60% critical, 25% high, 10% medium, 5% low
30
- 5. REASSESS continuously: New info, changes, production incidents
31
-
32
- **Quick Risk Assessment:**
33
- - Probability factors: Complexity, change frequency, developer experience, technical debt
34
- - Impact factors: User count, revenue, safety, reputation, regulatory
35
- - Dynamic adjustment: Production bugs increase risk; stable code decreases
36
-
37
- **Critical Success Factors:**
38
- - Test where bugs hurt most, not everywhere equally
39
- - Risk is dynamic - reassess with new information
40
- - Production data informs risk (shift-right feeds shift-left)
35
+ 1. IDENTIFY risks per component (use 1-5 scale for probability and impact)
36
+ 2. PRIORITIZE: Critical (20+) → High (12-19) → Medium (6-11) → Low (1-5)
37
+ 3. ALLOCATE effort: 60% critical, 25% high, 10% medium, 5% low
38
+ 4. REASSESS continuously: Production incidents raise risk; stable code lowers it
41
39
  </default_to_action>
42
40
 
43
41
  ## Quick Reference Card
@@ -48,11 +46,7 @@ When planning tests or allocating testing resources:
48
46
  - Allocating limited testing time
49
47
  - Justifying test coverage decisions
50
48
 
51
- ### Risk Calculation
52
- ```
53
- Risk Score = Probability (1-5) × Impact (1-5)
54
- ```
55
-
49
+ ### Effort Allocation by Risk Score
56
50
  | Score | Priority | Effort | Action |
57
51
  |-------|----------|--------|--------|
58
52
  | 20-25 | Critical | 60% | Comprehensive testing, multiple techniques |
@@ -60,37 +54,9 @@ Risk Score = Probability (1-5) × Impact (1-5)
60
54
  | 6-11 | Medium | 10% | Standard testing, basic automation |
61
55
  | 1-5 | Low | 5% | Smoke test, exploratory only |
62
56
 
63
- ### Probability Factors
64
- | Factor | Low (1) | Medium (3) | High (5) |
65
- |--------|---------|------------|----------|
66
- | Complexity | Simple CRUD | Business logic | Algorithms, integrations |
67
- | Change Rate | Stable 6+ months | Monthly changes | Weekly/daily changes |
68
- | Developer Experience | Senior, domain expert | Mid-level | Junior, new to codebase |
69
- | Technical Debt | Clean code | Some debt | Legacy, no tests |
70
-
71
- ### Impact Factors
72
- | Factor | Low (1) | Medium (3) | High (5) |
73
- |--------|---------|------------|----------|
74
- | Users Affected | Admin only | Department | All users |
75
- | Revenue | None | Indirect | Direct (checkout) |
76
- | Safety | Convenience | Data loss | Physical harm |
77
- | Reputation | Internal | Industry | Public scandal |
78
-
79
57
  ---
80
58
 
81
- ## Risk Assessment Workflow
82
-
83
- ### Step 1: List Features/Components
84
- ```
85
- Feature | Probability | Impact | Risk | Priority
86
- --------|-------------|--------|------|----------
87
- Checkout | 4 | 5 | 20 | Critical
88
- User Auth | 3 | 5 | 15 | High
89
- Admin Panel | 2 | 2 | 4 | Low
90
- Search | 3 | 3 | 9 | Medium
91
- ```
92
-
93
- ### Step 2: Apply Test Depth
59
+ ## Apply Test Depth by Risk
94
60
  ```typescript
95
61
  await Task("Risk-Based Test Generation", {
96
62
  critical: {
@@ -207,6 +173,11 @@ const riskFleet = await FleetManager.coordinate({
207
173
 
208
174
  ## Remember
209
175
 
210
- **Risk = Probability × Impact.** Test where bugs hurt most. Critical gets 60%, low gets 5%. Risk is dynamic - reassess with new info. Production incidents raise risk scores.
211
-
212
176
  **With Agents:** Agents calculate risk using ML on historical data, select risk-appropriate tests, and adjust scores from production feedback. Use agents to maintain dynamic risk profiles at scale.
177
+ <!-- END AGENTIC-QE UPSTREAM BODY -->
178
+
179
+ ## Keysarium local addition: probability and impact worksheet
180
+
181
+ For each candidate failure, write down the conditions that make it likely and the consequence if it occurs. Complexity, recent change, fragile integration, and missing observability can raise probability; data loss, user reach, and recovery difficulty can raise impact. Record the reason for each rating so another reviewer can challenge it.
182
+
183
+ Use the ranking to choose test depth. A high-impact boundary may need a real integration check and a failure-recovery check; a low-impact presentation detail may need a focused component check. Reassess after incidents or architecture changes. Numerical effort shares are examples only, not promises of defect detection.
@@ -0,0 +1,141 @@
1
+ skill: risk-based-testing
2
+ version: 1.0.0
3
+ description: >
4
+ Evaluation suite for risk-based testing strategy.
5
+ Tests risk scoring, test prioritization, and coverage optimization.
6
+
7
+ models_to_test:
8
+ - claude-sonnet-4-6 # Primary (high accuracy expected)
9
+ - claude-haiku-4-5 # Fast model (minimum quality floor)
10
+
11
+ mcp_integration:
12
+ enabled: true
13
+ namespace: skill-validation
14
+ query_patterns: true
15
+ track_outcomes: true
16
+ store_patterns: true
17
+ target_agents:
18
+ - qe-learning-coordinator
19
+
20
+ learning:
21
+ store_success_patterns: true
22
+ pattern_ttl_days: 90
23
+
24
+ result_format:
25
+ json_output: true
26
+ include_timing: true
27
+ include_token_usage: true
28
+
29
+ setup:
30
+ required_tools:
31
+ - jq
32
+
33
+ test_cases:
34
+
35
+ - id: tc001_risk_scoring
36
+ description: "Score and prioritize risks"
37
+ category: risk_assessment
38
+ priority: critical
39
+
40
+ input:
41
+ components:
42
+ - { name: "payment_processor", criticality: "critical", change_frequency: "low" }
43
+ - { name: "notification_service", criticality: "low", change_frequency: "high" }
44
+
45
+ expected_output:
46
+ must_contain:
47
+ - "risk"
48
+ - "score"
49
+ - "priority"
50
+
51
+ validation:
52
+ schema_check: true
53
+ keyword_match_threshold: 0.8
54
+
55
+ - id: tc002_test_prioritization
56
+ description: "Prioritize tests based on risk"
57
+ category: prioritization
58
+ priority: high
59
+
60
+ input:
61
+ available_tests: 500
62
+ time_budget_hours: 2
63
+ risk_scores: { "critical": 10, "high": 5, "medium": 2 }
64
+
65
+ expected_output:
66
+ must_contain:
67
+ - "prioritize"
68
+ - "test"
69
+ - "critical"
70
+
71
+ validation:
72
+ schema_check: true
73
+
74
+ - id: tc003_coverage_optimization
75
+ description: "Optimize test coverage for risk mitigation"
76
+ category: coverage
77
+ priority: high
78
+
79
+ input:
80
+ high_risk_areas: ["authentication", "payment", "data_export"]
81
+ current_coverage_percent: 65
82
+
83
+ expected_output:
84
+ must_contain:
85
+ - "coverage"
86
+ - "optimize"
87
+
88
+ validation:
89
+ schema_check: true
90
+
91
+ - id: tc004_regression_risk
92
+ description: "Identify regression risk from changes"
93
+ category: regression
94
+ priority: medium
95
+
96
+ input:
97
+ changed_files:
98
+ - "auth/login.js"
99
+ - "auth/session.js"
100
+ dependent_modules: ["dashboard", "profile", "settings"]
101
+
102
+ expected_output:
103
+ must_contain:
104
+ - "regression"
105
+ - "risk"
106
+
107
+ validation:
108
+ schema_check: true
109
+
110
+ - id: tc005_risk_mitigation_strategy
111
+ description: "Generate risk mitigation testing strategy"
112
+ category: strategy
113
+ priority: medium
114
+
115
+ input:
116
+ identified_risks:
117
+ - "SQL injection in search"
118
+ - "XSS in user input"
119
+ - "CSRF on form submission"
120
+
121
+ expected_output:
122
+ must_contain:
123
+ - "strategy"
124
+ - "mitigation"
125
+
126
+ validation:
127
+ schema_check: true
128
+ allow_partial: true
129
+
130
+ success_criteria:
131
+ pass_rate: 0.9
132
+ critical_pass_rate: 1.0
133
+ avg_reasoning_quality: 0.75
134
+ max_execution_time_ms: 300000
135
+
136
+ metadata:
137
+ author: "qe-risk-assessor"
138
+ created: "2026-02-02"
139
+ coverage_target: >
140
+ Risk-based testing with 5 test cases covering risk scoring,
141
+ test prioritization, coverage optimization, regression risk, and mitigation strategies.