@dzhechkov/keysarium 1.3.0 → 1.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 (105) hide show
  1. package/README.md +70 -10
  2. package/bin/cli.js +0 -0
  3. package/package.json +5 -3
  4. package/src/utils.js +1 -1
  5. package/templates/.claude/commands/analyst-manual.md +38 -0
  6. package/templates/.claude/commands/brain-export.md +2 -0
  7. package/templates/.claude/commands/bto-benchmark.md +302 -0
  8. package/templates/.claude/commands/casarium.md +55 -4
  9. package/templates/.claude/commands/feature-adr.md +8 -0
  10. package/templates/.claude/commands/harvest.md +28 -46
  11. package/templates/.claude/rules/trust-tiers.md +6 -0
  12. package/templates/.claude/shards/feature-adr.shard.md +64 -10
  13. package/templates/.claude/shards/phase-ai-factory.shard.md +109 -0
  14. package/templates/.claude/skills/ai-factory-mapper/README.md +90 -0
  15. package/templates/.claude/skills/ai-factory-mapper/SKILL.md +309 -0
  16. package/templates/.claude/skills/ai-factory-mapper/assets/report-template.md +123 -0
  17. package/templates/.claude/skills/ai-factory-mapper/references/catalog.md +230 -0
  18. package/templates/.claude/skills/ai-factory-mapper/references/coverage-formula.md +219 -0
  19. package/templates/.claude/skills/ai-factory-mapper/references/decomposition-checklist.md +183 -0
  20. package/templates/.claude/skills/ai-factory-mapper/references/pattern-library.md +312 -0
  21. package/templates/.claude/skills/ai-factory-mapper/scripts/build_docx_report.js +423 -0
  22. package/templates/.claude/skills/analyst-manual-full/SKILL.md +286 -0
  23. package/templates/.claude/skills/edu-site-generator/SKILL.md +254 -0
  24. package/templates/.claude/skills/edu-site-generator/examples/sample-course-structure.md +116 -0
  25. package/templates/.claude/skills/edu-site-generator/modules/00-content-analysis.md +84 -0
  26. package/templates/.claude/skills/edu-site-generator/modules/01-course-structure.md +75 -0
  27. package/templates/.claude/skills/edu-site-generator/modules/02-data-generation.md +186 -0
  28. package/templates/.claude/skills/edu-site-generator/modules/03-scaffold.md +249 -0
  29. package/templates/.claude/skills/edu-site-generator/modules/04-components.md +130 -0
  30. package/templates/.claude/skills/edu-site-generator/modules/05-gamification.md +163 -0
  31. package/templates/.claude/skills/edu-site-generator/modules/06-deploy.md +88 -0
  32. package/templates/.claude/skills/edu-site-generator/modules/07-verification.md +97 -0
  33. package/templates/.claude/skills/edu-site-generator/references/component-templates.md +436 -0
  34. package/templates/.claude/skills/edu-site-generator/references/data-schemas.md +164 -0
  35. package/templates/.claude/skills/edu-site-generator/references/exercise-catalog.md +110 -0
  36. package/templates/.claude/skills/edu-site-generator/references/tech-stack.md +69 -0
  37. package/templates/.claude/skills/feature-adr/SKILL.md +245 -59
  38. package/templates/.claude/skills/feature-adr/modules/03-adr.md +43 -0
  39. package/templates/.claude/skills/feature-adr/modules/03.5-ideation-swarm.md +180 -0
  40. package/templates/.claude/skills/feature-adr/modules/06-implementation-plan.md +56 -7
  41. package/templates/.claude/skills/feature-adr/modules/08-qe.md +87 -23
  42. package/templates/.claude/skills/feature-adr/modules/09-fleet-qe.md +305 -0
  43. package/templates/.claude/skills/feature-adr/references/agentic-qe/README.md +143 -0
  44. package/templates/.claude/skills/feature-adr/references/agentic-qe/brutal-honesty-review.md +240 -0
  45. package/templates/.claude/skills/feature-adr/references/agentic-qe/chaos-engineering-resilience.md +163 -0
  46. package/templates/.claude/skills/feature-adr/references/agentic-qe/code-goal-planner.md +446 -0
  47. package/templates/.claude/skills/feature-adr/references/agentic-qe/enterprise-integration-testing.md +111 -0
  48. package/templates/.claude/skills/feature-adr/references/agentic-qe/mutation-testing.md +236 -0
  49. package/templates/.claude/skills/feature-adr/references/agentic-qe/performance-testing.md +315 -0
  50. package/templates/.claude/skills/feature-adr/references/agentic-qe/qcsd-ideation-swarm.md +126 -0
  51. package/templates/.claude/skills/feature-adr/references/agentic-qe/qcsd-production-swarm.md +108 -0
  52. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-coverage-analysis.md +193 -0
  53. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-requirements-validation.md +254 -0
  54. package/templates/.claude/skills/feature-adr/references/agentic-qe/regression-testing.md +233 -0
  55. package/templates/.claude/skills/feature-adr/references/agentic-qe/risk-based-testing.md +212 -0
  56. package/templates/.claude/skills/feature-adr/references/agentic-qe/security-testing.md +311 -0
  57. package/templates/.claude/skills/feature-adr/references/agentic-qe/shift-left-testing.md +231 -0
  58. package/templates/.claude/skills/feature-adr/references/agentic-qe/tdd-london-chicago.md +249 -0
  59. package/templates/.claude/skills/knowledge-extractor/SKILL.md +254 -0
  60. package/templates/.claude/skills/knowledge-extractor/modules/01-extract.md +188 -0
  61. package/templates/.claude/skills/knowledge-extractor/modules/02-classify.md +99 -0
  62. package/templates/.claude/skills/knowledge-extractor/modules/03-gate.md +150 -0
  63. package/templates/.claude/skills/knowledge-extractor/modules/04-integrate.md +159 -0
  64. package/templates/.claude/skills/knowledge-extractor/references/artifact-categories.md +100 -0
  65. package/templates/.claude/skills/knowledge-extractor/references/maturity-model.md +94 -0
  66. package/templates/.claude/skills/knowledge-extractor/references/quality-gates.md +98 -0
  67. package/templates/.claude/skills/knowledge-extractor/templates/artifact-card.md +63 -0
  68. package/templates/.claude/skills/knowledge-extractor/templates/harvest-report.md +102 -0
  69. package/templates/.claude/skills/transcript-site-generator/SKILL.md +287 -0
  70. package/templates/.claude/skills/transcript-site-generator/examples/sample-text-only-site.md +123 -0
  71. package/templates/.claude/skills/transcript-site-generator/examples/sample-transcript-site.md +134 -0
  72. package/templates/.claude/skills/transcript-site-generator/modules/00-input-analysis.md +132 -0
  73. package/templates/.claude/skills/transcript-site-generator/modules/01-content-parsing.md +117 -0
  74. package/templates/.claude/skills/transcript-site-generator/modules/02-site-generation.md +293 -0
  75. package/templates/.claude/skills/transcript-site-generator/modules/03-interactivity.md +406 -0
  76. package/templates/.claude/skills/transcript-site-generator/modules/04-deploy.md +130 -0
  77. package/templates/.claude/skills/transcript-site-generator/modules/05-verification.md +155 -0
  78. package/templates/.claude/skills/transcript-site-generator/references/component-catalog.md +86 -0
  79. package/templates/.claude/skills/transcript-site-generator/references/data-schemas.md +123 -0
  80. package/templates/.claude/skills/transcript-site-generator/references/tech-stack.md +132 -0
  81. package/templates/CLAUDE.md +30 -9
  82. package/templates/docs/continuous-learning-guide.md +622 -0
  83. package/templates/docs/edu-site-generator/01-deployment-guide.md +911 -0
  84. package/templates/docs/edu-site-generator/02-admin-guide.md +901 -0
  85. package/templates/docs/edu-site-generator/03-user-guide.md +1008 -0
  86. package/templates/docs/edu-site-generator/04-infrastructure-requirements.md +489 -0
  87. package/templates/docs/edu-site-generator/05-architecture.md +902 -0
  88. package/templates/docs/edu-site-generator/06-user-flows.md +759 -0
  89. package/templates/docs/improvement-directions.md +8 -4
  90. package/templates/docs/keysarium-core/02-functionality.md +3 -1
  91. package/templates/docs/skills-bto/01-deployment-guide.md +1 -1
  92. package/templates/docs/skills-bto/02-admin-guide.md +4 -1
  93. package/templates/docs/skills-bto/03-user-guide.md +4 -3
  94. package/templates/docs/skills-bto/04-infrastructure-requirements.md +2 -1
  95. package/templates/docs/skills-bto/05-architecture.md +11 -11
  96. package/templates/docs/skills-bto/06-user-flows.md +2 -1
  97. package/templates/docs/transcript-site-generator/01-deployment-guide.md +1042 -0
  98. package/templates/docs/transcript-site-generator/02-admin-guide.md +918 -0
  99. package/templates/docs/transcript-site-generator/03-user-guide.md +925 -0
  100. package/templates/docs/transcript-site-generator/04-infrastructure-requirements.md +482 -0
  101. package/templates/docs/transcript-site-generator/05-architecture.md +1068 -0
  102. package/templates/docs/transcript-site-generator/06-user-flows.md +855 -0
  103. package/templates/lib/dream-engine.md +1 -1
  104. package/templates/lib/memory-protocol.md +6 -2
  105. package/templates/lib/reward-tracker.md +6 -3
@@ -0,0 +1,126 @@
1
+ ---
2
+ name: qcsd-ideation-swarm
3
+ description: "QCSD Ideation phase swarm for Quality Criteria sessions using HTSM v6.3, Risk Storming, and Testability analysis before development begins."
4
+ source: https://github.com/proffesor-for-testing/agentic-qe/tree/main/assets/skills/qcsd-ideation-swarm
5
+ version: 7.5.1
6
+ trust_tier: 3
7
+ agents:
8
+ core: [qe-quality-criteria-recommender, qe-risk-assessor, qe-requirements-validator]
9
+ conditional: [qe-accessibility-auditor, qe-security-auditor, qe-qx-partner]
10
+ ---
11
+
12
+ # QCSD Ideation Swarm (Adapted for Feature-ADR)
13
+
14
+ Shift-left quality engineering swarm applied to feature ADR and requirements analysis.
15
+
16
+ ---
17
+
18
+ ## Phase 1: Flag Detection
19
+
20
+ Scan feature requirements/ADR and SET these flags:
21
+
22
+ ```
23
+ □ HAS_UI = FALSE
24
+ Set TRUE if feature contains: UI, frontend, visual, component, screen, page, form, button,
25
+ modal, dialog, dashboard, widget, interface, display, view, layout, CSS, styling
26
+
27
+ □ HAS_SECURITY = FALSE
28
+ Set TRUE if feature contains: auth, security, credential, token, encrypt, PII, compliance,
29
+ password, login, session, OAuth, JWT, permission, role, access control, RBAC, sensitive
30
+
31
+ □ HAS_UX = FALSE
32
+ Set TRUE if feature contains: user experience, UX, journey, usability, user flow, persona,
33
+ friction, delight, onboarding, retention, engagement
34
+ ```
35
+
36
+ ## Phase 2: Spawn Core Agents (3 parallel)
37
+
38
+ ALL THREE core agents MUST be spawned in a single message:
39
+
40
+ ### Agent 1: Quality Criteria Recommender (HTSM v6.3)
41
+ Analyze ALL 10 HTSM categories with weight and testability score:
42
+ 1. Capability — does it do what's required?
43
+ 2. Reliability — under stress, load, edge cases
44
+ 3. Usability — learnability, accessibility, efficiency
45
+ 4. Charisma — visual design, responsiveness
46
+ 5. Security — authentication, authorization, data protection
47
+ 6. Scalability — growth handling, resource limits
48
+ 7. Compatibility — browsers, devices, APIs, integrations
49
+ 8. Performance — speed, throughput, resource usage
50
+ 9. Installability — deployment, configuration, migration
51
+ 10. Development — testability, maintainability, portability
52
+
53
+ ### Agent 2: Risk Assessor (SFDIPOT)
54
+ Apply SFDIPOT framework:
55
+ - **S**tructure: Code architecture, component dependencies
56
+ - **F**unction: Business logic, calculations, workflows
57
+ - **D**ata: Data integrity, migrations, edge values
58
+ - **I**nterfaces: API contracts, integration points, UI interactions
59
+ - **P**latform: OS, browser, infrastructure dependencies
60
+ - **O**perations: Deployment, monitoring, maintenance
61
+ - **T**ime: Scheduling, concurrency, timeouts, caching
62
+
63
+ Identify minimum 10 risks with probability (1-5), impact (1-5), and risk score.
64
+
65
+ ### Agent 3: Requirements Validator (Testability)
66
+ Apply 10 Principles of Testability, score each 0-100:
67
+ 1. Observability — can we see what the system does?
68
+ 2. Controllability — can we put it in the state we need?
69
+ 3. Decomposability — can we test parts independently?
70
+ 4. Simplicity — is it only as complex as needed?
71
+ 5. Stability — does it change predictably?
72
+ 6. Information — do we have what we need to test?
73
+ 7. Communication — do we know what to test?
74
+ 8. Relation to prior work — can we leverage past tests?
75
+ 9. Time — do we have enough time to test?
76
+ 10. Accountability — who owns quality?
77
+
78
+ ## Phase 3: Conditional Agents (based on flags)
79
+
80
+ | Flag | Agent | Analysis |
81
+ |------|-------|----------|
82
+ | HAS_UI | qe-accessibility-auditor | WCAG 2.2 AA compliance assessment |
83
+ | HAS_SECURITY | qe-security-auditor | STRIDE threat modeling |
84
+ | HAS_UX | qe-qx-partner | User journey and experience quality analysis |
85
+
86
+ ## Phase 4: GO/NO-GO Decision
87
+
88
+ | Metric | NO-GO | CONDITIONAL | GO |
89
+ |--------|-------|-------------|-----|
90
+ | Testability Score | < 40 | 40-79 | ≥ 80 |
91
+ | HTSM Coverage | < 6/10 | 6-7/10 | ≥ 8/10 |
92
+ | AC Completeness | < 50% | 50-89% | ≥ 90% |
93
+ | Critical Risks | > 2 | 1-2 | 0 |
94
+
95
+ **NO-GO**: Stop. Requirements need rework before development.
96
+ **CONDITIONAL**: Proceed with advisory warnings. Include findings in judge context.
97
+ **GO**: Full confidence. Proceed to implementation planning.
98
+
99
+ ## Phase 5: Synthesis Report
100
+
101
+ Generate consolidated report with:
102
+ 1. Executive summary (GO/CONDITIONAL/NO-GO verdict)
103
+ 2. Quality criteria scores (10 HTSM categories)
104
+ 3. Risk matrix (top 10 risks by score)
105
+ 4. Testability assessment (10 principles)
106
+ 5. Test ideas (categorized by type: unit/integration/E2E)
107
+ 6. Recommendations (prioritized by risk × impact)
108
+
109
+ ## Integration with Feature-ADR
110
+
111
+ This swarm runs as Step 3.5 in the feature-adr pipeline:
112
+ - **Input**: Refined ADR from Step 3 + Requirements from Step 1
113
+ - **Output**: Quality assessment report in `features/<slug>/03.5_ideation_report.md`
114
+ - **Gate**: NO-GO blocks progression to Step 6 (Implementation Plan)
115
+ - **CONDITIONAL**: Warnings are passed to Steps 6-8 as context
116
+
117
+ ## Enforcement Rules
118
+
119
+ | Rule | Requirement |
120
+ |------|------------|
121
+ | E1 | ALL THREE core agents must be spawned. No exceptions. |
122
+ | E2 | All parallel agents in a SINGLE message. |
123
+ | E3 | STOP and WAIT after each batch. No proceeding early. |
124
+ | E4 | Conditional agents MUST be spawned if flags are TRUE. |
125
+ | E5 | GO/CONDITIONAL/NO-GO logic applied exactly as specified. |
126
+ | E6 | Full report structure generated. No abbreviated versions. |
@@ -0,0 +1,108 @@
1
+ # QCSD Production Swarm (Condensed for Feature ADR)
2
+
3
+ > Source: agentic-qe `qcsd-production-swarm` skill (Tier 3)
4
+ > Condensed from 2781 lines — SAP/middleware-specific agents removed, universal patterns retained.
5
+
6
+ ## Purpose
7
+
8
+ Post-release production health assessment and QCSD feedback loop closure.
9
+ The only QCSD phase with dual responsibility: assessing current health AND
10
+ closing the feedback loop back to earlier phases.
11
+
12
+ ## QCSD Phase Positioning
13
+
14
+ | Phase | Swarm | Question | Decision |
15
+ |-------|-------|----------|----------|
16
+ | Ideation | qcsd-ideation-swarm | Should we build this? | GO / CONDITIONAL / NO-GO |
17
+ | Refinement | qcsd-refinement-swarm | How should we test this? | READY / CONDITIONAL / NOT-READY |
18
+ | Development | qcsd-development-swarm | Is code quality sufficient? | SHIP / CONDITIONAL / HOLD |
19
+ | Verification | qcsd-cicd-swarm | Is this change safe to release? | RELEASE / REMEDIATE / BLOCK |
20
+ | **Production** | **qcsd-production-swarm** | **Is release healthy?** | **HEALTHY / DEGRADED / CRITICAL** |
21
+
22
+ ## Core Agents (always run)
23
+
24
+ | Agent | Domain | Role |
25
+ |-------|--------|------|
26
+ | qe-metrics-optimizer | learning-optimization | DORA metrics + SLA compliance |
27
+ | qe-defect-predictor | defect-intelligence | Defect trend + density prediction |
28
+ | qe-root-cause-analyzer | defect-intelligence | Incident RCA + severity assessment |
29
+
30
+ ## Conditional Agents (flag-based)
31
+
32
+ | Flag | Agent | When to activate |
33
+ |------|-------|------------------|
34
+ | HAS_INFRASTRUCTURE_CHANGE | qe-chaos-engineer | Infra changes in release |
35
+ | HAS_PERFORMANCE_SLA | qe-performance-tester | Performance SLAs defined |
36
+ | HAS_REGRESSION_RISK | qe-regression-analyzer | Known regression risk areas |
37
+ | HAS_RECURRING_INCIDENTS | qe-pattern-learner | Repeated incident patterns |
38
+
39
+ ## Feedback Agents (always run, SEQUENTIAL)
40
+
41
+ | Order | Agent | Role |
42
+ |-------|-------|------|
43
+ | 1st | qe-learning-coordinator | Synthesize production findings |
44
+ | 2nd | qe-transfer-specialist | Transfer learnings to Ideation + Refinement |
45
+
46
+ ## Decision Logic
47
+
48
+ ```
49
+ CRITICAL (any condition):
50
+ - Active P0/P1 incidents
51
+ - DORA score < 0.4
52
+ - SLA compliance < 95%
53
+ - Accelerating defect trend (increasing + density > 5.0/KLOC)
54
+
55
+ HEALTHY (all conditions):
56
+ - DORA score >= 0.7
57
+ - SLA compliance >= 99%
58
+ - No P0/P1/P2 incidents
59
+ - RCA completeness >= 80%
60
+ - Defect trend declining or stable
61
+ - Defect density <= 2.0/KLOC
62
+
63
+ DEGRADED:
64
+ - Everything else (default)
65
+ ```
66
+
67
+ ## Execution Pattern (3 batches)
68
+
69
+ ```
70
+ Batch 1 (parallel): Core agents [3]
71
+ → WAIT for all to complete
72
+ Batch 2 (parallel): Conditional agents [0-4, based on flags]
73
+ → WAIT for all to complete
74
+ Batch 3 (sequential): Feedback agents [2, strictly ordered]
75
+ → Learning coordinator THEN transfer specialist
76
+ ```
77
+
78
+ ## Enforcement Rules
79
+
80
+ 1. ALL THREE core agents MUST be spawned — no exceptions
81
+ 2. All parallel agents in a SINGLE message
82
+ 3. STOP and WAIT after each batch
83
+ 4. Conditional agents MUST spawn if flags are TRUE
84
+ 5. Decision logic applied EXACTLY as specified
85
+ 6. Both feedback agents MUST run SEQUENTIALLY
86
+ 7. Learning persistence MUST happen BEFORE feedback agents
87
+
88
+ ## Feedback Loop Closure
89
+
90
+ Production swarm closes the QCSD loop by feeding findings back:
91
+
92
+ ```
93
+ Production findings
94
+ → qe-learning-coordinator (synthesize)
95
+ → qe-transfer-specialist (distribute)
96
+ → Ideation phase (future GO/NO-GO informed by production data)
97
+ → Refinement phase (test strategy informed by production failures)
98
+ ```
99
+
100
+ This is the key differentiator: no other QCSD phase feeds back to earlier phases.
101
+
102
+ ## Integration with Feature ADR
103
+
104
+ When used in Direct Mode (full agentic-qe installed):
105
+ - After Step 9 Fleet QE detects issues, production swarm feedback patterns
106
+ inform future `/feature-adr` runs via memory system
107
+ - Historical production health data feeds Step 3.5 QCSD Ideation quality risks
108
+ - Defect patterns from production inform Step 2 Research phase
@@ -0,0 +1,193 @@
1
+ ---
2
+ name: "QE Coverage Analysis"
3
+ description: "O(log n) sublinear coverage gap detection with risk-weighted analysis and intelligent test prioritization."
4
+ trust_tier: 3
5
+ validation:
6
+ schema_path: schemas/output.json
7
+ validator_path: scripts/validate-config.json
8
+ eval_path: evals/qe-coverage-analysis.yaml
9
+
10
+ ---
11
+
12
+ # QE Coverage Analysis
13
+
14
+ ## Purpose
15
+
16
+ Guide the use of v3's advanced coverage analysis capabilities including sublinear gap detection algorithms, risk-weighted coverage scoring, and intelligent test prioritization based on code criticality.
17
+
18
+ ## Activation
19
+
20
+ - When analyzing test coverage
21
+ - When identifying coverage gaps
22
+ - When prioritizing testing effort
23
+ - When setting coverage targets
24
+ - When assessing code risk
25
+
26
+ ## Quick Start
27
+
28
+ ```bash
29
+ # Analyze coverage with gap detection
30
+ aqe coverage analyze --source src/ --tests tests/
31
+
32
+ # Find high-risk uncovered code
33
+ aqe coverage gaps --risk-weighted --threshold 80
34
+
35
+ # Generate coverage report
36
+ aqe coverage report --format html --output coverage-report/
37
+
38
+ # Compare coverage between branches
39
+ aqe coverage diff --base main --head feature-branch
40
+ ```
41
+
42
+ ## Agent Workflow
43
+
44
+ ```typescript
45
+ // Comprehensive coverage analysis
46
+ Task("Analyze coverage gaps", `
47
+ Perform O(log n) coverage analysis on src/:
48
+ - Calculate statement, branch, function coverage
49
+ - Identify uncovered critical paths
50
+ - Risk-weight gaps by code complexity and change frequency
51
+ - Recommend tests to write for maximum coverage impact
52
+ `, "qe-coverage-specialist")
53
+
54
+ // Risk-based prioritization
55
+ Task("Prioritize coverage effort", `
56
+ Analyze coverage gaps and prioritize by:
57
+ - Business criticality (payment, auth, data)
58
+ - Code complexity (cyclomatic > 10)
59
+ - Recent bug history
60
+ - Change frequency
61
+ Output prioritized list of files needing tests.
62
+ `, "qe-coverage-analyzer")
63
+ ```
64
+
65
+ ## Analysis Strategies
66
+
67
+ ### 1. Sublinear Gap Detection
68
+
69
+ ```typescript
70
+ await coverageAnalyzer.detectGaps({
71
+ algorithm: 'sublinear', // O(log n) complexity
72
+ source: 'src/**/*.ts',
73
+ metrics: ['statement', 'branch', 'function'],
74
+ sampling: {
75
+ enabled: true,
76
+ confidence: 0.95,
77
+ maxSamples: 1000
78
+ }
79
+ });
80
+ ```
81
+
82
+ ### 2. Risk-Weighted Coverage
83
+
84
+ ```typescript
85
+ await coverageAnalyzer.riskWeightedAnalysis({
86
+ coverage: coverageReport,
87
+ riskFactors: {
88
+ complexity: { weight: 0.3, threshold: 10 },
89
+ changeFrequency: { weight: 0.25, window: '90d' },
90
+ bugHistory: { weight: 0.25, window: '180d' },
91
+ criticality: { weight: 0.2, tags: ['payment', 'auth'] }
92
+ },
93
+ output: {
94
+ riskScore: true,
95
+ prioritizedGaps: true
96
+ }
97
+ });
98
+ ```
99
+
100
+ ### 3. Differential Coverage
101
+
102
+ ```typescript
103
+ await coverageAnalyzer.diffCoverage({
104
+ base: 'main',
105
+ head: 'feature-branch',
106
+ requirements: {
107
+ newCode: 80, // New code must have 80% coverage
108
+ modifiedCode: 'maintain', // Don't decrease existing
109
+ deletedCode: 'ignore'
110
+ }
111
+ });
112
+ ```
113
+
114
+ ## Coverage Thresholds
115
+
116
+ ```yaml
117
+ thresholds:
118
+ global:
119
+ statements: 80
120
+ branches: 75
121
+ functions: 85
122
+ lines: 80
123
+
124
+ per_file:
125
+ min_statements: 70
126
+ critical_paths: 90
127
+
128
+ new_code:
129
+ statements: 85
130
+ branches: 80
131
+
132
+ exceptions:
133
+ - path: "src/migrations/**"
134
+ reason: "Database migrations"
135
+ - path: "src/generated/**"
136
+ reason: "Auto-generated code"
137
+ ```
138
+
139
+ ## Coverage Report
140
+
141
+ ```typescript
142
+ interface CoverageAnalysis {
143
+ summary: {
144
+ statements: { covered: number; total: number; percentage: number };
145
+ branches: { covered: number; total: number; percentage: number };
146
+ functions: { covered: number; total: number; percentage: number };
147
+ };
148
+ gaps: {
149
+ file: string;
150
+ uncoveredLines: number[];
151
+ uncoveredBranches: BranchInfo[];
152
+ riskScore: number;
153
+ suggestedTests: string[];
154
+ }[];
155
+ trends: {
156
+ period: string;
157
+ coverageChange: number;
158
+ newGaps: number;
159
+ closedGaps: number;
160
+ };
161
+ recommendations: {
162
+ priority: 'critical' | 'high' | 'medium' | 'low';
163
+ file: string;
164
+ action: string;
165
+ expectedImpact: number;
166
+ }[];
167
+ }
168
+ ```
169
+
170
+ ## Quality Gates
171
+
172
+ ```yaml
173
+ quality_gates:
174
+ coverage:
175
+ block_merge:
176
+ - new_code_coverage < 80
177
+ - coverage_regression > 5
178
+ - critical_path_uncovered
179
+
180
+ warn:
181
+ - overall_coverage < 75
182
+ - branch_coverage < 70
183
+
184
+ metrics:
185
+ - track_trends: true
186
+ - alert_on_decline: 3 # consecutive PRs
187
+ ```
188
+
189
+ ## Coordination
190
+
191
+ **Primary Agents**: qe-coverage-specialist, qe-coverage-analyzer, qe-gap-detector
192
+ **Coordinator**: qe-coverage-coordinator
193
+ **Related Skills**: qe-test-generation, qe-quality-assessment
@@ -0,0 +1,254 @@
1
+ ---
2
+ name: "QE Requirements Validation"
3
+ description: "Requirements traceability, acceptance criteria validation, and BDD scenario management for complete requirements coverage."
4
+ trust_tier: 3
5
+ validation:
6
+ schema_path: schemas/output.json
7
+ validator_path: scripts/validate-config.json
8
+ eval_path: evals/qe-requirements-validation.yaml
9
+
10
+ ---
11
+
12
+ # QE Requirements Validation
13
+
14
+ ## Purpose
15
+
16
+ Guide the use of v3's requirements validation capabilities including acceptance criteria parsing, requirements traceability, BDD scenario generation, and coverage gap identification.
17
+
18
+ ## Activation
19
+
20
+ - When validating requirements
21
+ - When tracing requirements to tests
22
+ - When generating BDD scenarios
23
+ - When assessing requirements coverage
24
+ - When reviewing acceptance criteria
25
+
26
+ ## Quick Start
27
+
28
+ ```bash
29
+ # Parse acceptance criteria
30
+ aqe requirements parse --source jira --project MYAPP
31
+
32
+ # Build traceability matrix
33
+ aqe requirements trace --requirements reqs/ --tests tests/
34
+
35
+ # Generate BDD scenarios
36
+ aqe requirements bdd --story US-123 --output features/
37
+
38
+ # Check requirements coverage
39
+ aqe requirements coverage --sprint current
40
+ ```
41
+
42
+ ## Agent Workflow
43
+
44
+ ```typescript
45
+ // Requirements validation
46
+ Task("Validate acceptance criteria", `
47
+ Review acceptance criteria for sprint stories:
48
+ - Check SMART criteria (Specific, Measurable, Achievable, Relevant, Testable)
49
+ - Identify ambiguous requirements
50
+ - Flag missing edge cases
51
+ - Suggest improvements
52
+ `, "qe-acceptance-criteria")
53
+
54
+ // Traceability matrix
55
+ Task("Build traceability", `
56
+ Create requirements traceability matrix:
57
+ - Map user stories to test cases
58
+ - Identify untested requirements
59
+ - Find orphan tests (no linked requirement)
60
+ - Calculate coverage metrics
61
+ `, "qe-traceability-builder")
62
+ ```
63
+
64
+ ## Requirements Operations
65
+
66
+ ### 1. Acceptance Criteria Validation
67
+
68
+ ```typescript
69
+ await acceptanceCriteria.validate({
70
+ source: {
71
+ type: 'jira',
72
+ project: 'MYAPP',
73
+ stories: 'sprint=current'
74
+ },
75
+ validation: {
76
+ specific: true,
77
+ measurable: true,
78
+ achievable: true,
79
+ relevant: true,
80
+ testable: true
81
+ },
82
+ output: {
83
+ score: true,
84
+ issues: true,
85
+ suggestions: true
86
+ }
87
+ });
88
+ ```
89
+
90
+ ### 2. Traceability Matrix
91
+
92
+ ```typescript
93
+ await traceabilityBuilder.build({
94
+ requirements: {
95
+ source: 'jira',
96
+ types: ['story', 'task', 'bug']
97
+ },
98
+ artifacts: {
99
+ tests: 'tests/**/*.test.ts',
100
+ code: 'src/**/*.ts',
101
+ documentation: 'docs/**/*.md'
102
+ },
103
+ output: {
104
+ matrix: true,
105
+ coverage: true,
106
+ gaps: true,
107
+ orphans: true
108
+ }
109
+ });
110
+ ```
111
+
112
+ ### 3. BDD Scenario Generation
113
+
114
+ ```typescript
115
+ await bddGenerator.generate({
116
+ requirements: userStory,
117
+ format: 'gherkin',
118
+ scenarios: {
119
+ happyPath: true,
120
+ edgeCases: true,
121
+ errorCases: true,
122
+ dataVariations: true
123
+ },
124
+ output: {
125
+ featureFile: true,
126
+ stepDefinitions: 'skeleton'
127
+ }
128
+ });
129
+ ```
130
+
131
+ ### 4. Coverage Analysis
132
+
133
+ ```typescript
134
+ await requirementsCoverage.analyze({
135
+ scope: 'sprint-23',
136
+ metrics: {
137
+ requirementsCovered: true,
138
+ testCasesCoverage: true,
139
+ automationCoverage: true,
140
+ riskAssessment: true
141
+ },
142
+ report: {
143
+ summary: true,
144
+ details: true,
145
+ recommendations: true
146
+ }
147
+ });
148
+ ```
149
+
150
+ ## Traceability Matrix
151
+
152
+ ```typescript
153
+ interface TraceabilityMatrix {
154
+ requirements: {
155
+ id: string;
156
+ title: string;
157
+ type: string;
158
+ priority: string;
159
+ status: string;
160
+ linkedTests: string[];
161
+ linkedCode: string[];
162
+ coverage: 'full' | 'partial' | 'none';
163
+ }[];
164
+ tests: {
165
+ id: string;
166
+ name: string;
167
+ type: 'unit' | 'integration' | 'e2e';
168
+ linkedRequirements: string[];
169
+ automated: boolean;
170
+ }[];
171
+ coverage: {
172
+ requirementsCovered: number;
173
+ requirementsPartial: number;
174
+ requirementsUncovered: number;
175
+ orphanTests: number;
176
+ };
177
+ gaps: {
178
+ requirement: string;
179
+ missingCoverage: string[];
180
+ risk: 'high' | 'medium' | 'low';
181
+ }[];
182
+ }
183
+ ```
184
+
185
+ ## BDD Integration
186
+
187
+ ```gherkin
188
+ # Generated feature file
189
+ Feature: User Registration
190
+ As a new user
191
+ I want to create an account
192
+ So that I can access the platform
193
+
194
+ @happy-path
195
+ Scenario: Successful registration with valid details
196
+ Given I am on the registration page
197
+ When I enter valid email "user@example.com"
198
+ And I enter valid password "SecurePass123!"
199
+ And I click the register button
200
+ Then I should see a success message
201
+ And I should receive a confirmation email
202
+
203
+ @edge-case
204
+ Scenario: Registration with existing email
205
+ Given a user exists with email "existing@example.com"
206
+ When I try to register with email "existing@example.com"
207
+ Then I should see an error "Email already registered"
208
+ ```
209
+
210
+ ## Requirements Quality
211
+
212
+ ```yaml
213
+ quality_checks:
214
+ acceptance_criteria:
215
+ has_given_when_then: preferred
216
+ is_testable: required
217
+ is_measurable: required
218
+ no_ambiguity: required
219
+
220
+ user_story:
221
+ follows_template: "As a <role>, I want <feature>, so that <benefit>"
222
+ has_acceptance_criteria: required
223
+ estimated: preferred
224
+
225
+ completeness:
226
+ edge_cases_identified: required
227
+ error_scenarios_covered: required
228
+ non_functional_considered: preferred
229
+ ```
230
+
231
+ ## Sprint Integration
232
+
233
+ ```typescript
234
+ await requirementsValidator.sprintReview({
235
+ sprint: 'current',
236
+ checks: {
237
+ storiesComplete: true,
238
+ criteriaValidated: true,
239
+ testsLinked: true,
240
+ coverageAdequate: true
241
+ },
242
+ gates: {
243
+ minCoverage: 80,
244
+ maxUntested: 2,
245
+ requireDemo: true
246
+ }
247
+ });
248
+ ```
249
+
250
+ ## Coordination
251
+
252
+ **Primary Agents**: qe-acceptance-criteria, qe-traceability-builder, qe-bdd-specialist
253
+ **Coordinator**: qe-requirements-coordinator
254
+ **Related Skills**: qe-test-generation, qe-quality-assessment