agentic-qe 1.9.3 → 2.0.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.
- package/.claude/agents/qe-api-contract-validator.md +95 -1336
- package/.claude/agents/qe-chaos-engineer.md +152 -1211
- package/.claude/agents/qe-code-complexity.md +144 -707
- package/.claude/agents/qe-coverage-analyzer.md +147 -743
- package/.claude/agents/qe-deployment-readiness.md +143 -1496
- package/.claude/agents/qe-flaky-test-hunter.md +132 -1529
- package/.claude/agents/qe-fleet-commander.md +12 -12
- package/.claude/agents/qe-performance-tester.md +150 -886
- package/.claude/agents/qe-production-intelligence.md +155 -1396
- package/.claude/agents/qe-quality-analyzer.md +6 -6
- package/.claude/agents/qe-quality-gate.md +151 -648
- package/.claude/agents/qe-regression-risk-analyzer.md +132 -1150
- package/.claude/agents/qe-requirements-validator.md +149 -932
- package/.claude/agents/qe-security-scanner.md +157 -797
- package/.claude/agents/qe-test-data-architect.md +96 -1365
- package/.claude/agents/qe-test-executor.md +8 -8
- package/.claude/agents/qe-test-generator.md +145 -1540
- package/.claude/agents/qe-visual-tester.md +153 -1257
- package/.claude/agents/qx-partner.md +235 -0
- package/.claude/agents/subagents/qe-code-reviewer.md +40 -136
- package/.claude/agents/subagents/qe-coverage-gap-analyzer.md +40 -480
- package/.claude/agents/subagents/qe-data-generator.md +41 -125
- package/.claude/agents/subagents/qe-flaky-investigator.md +55 -411
- package/.claude/agents/subagents/qe-integration-tester.md +53 -141
- package/.claude/agents/subagents/qe-performance-validator.md +54 -130
- package/.claude/agents/subagents/qe-security-auditor.md +56 -114
- package/.claude/agents/subagents/qe-test-data-architect-sub.md +57 -548
- package/.claude/agents/subagents/qe-test-implementer.md +58 -551
- package/.claude/agents/subagents/qe-test-refactorer.md +65 -722
- package/.claude/agents/subagents/qe-test-writer.md +63 -726
- package/.claude/skills/skills-manifest.json +632 -0
- package/.claude/skills/testability-scoring/README.md +71 -0
- package/.claude/skills/testability-scoring/SKILL.md +611 -0
- package/.claude/skills/testability-scoring/resources/templates/config.template.js +84 -0
- package/.claude/skills/testability-scoring/resources/templates/testability-scoring.spec.template.js +532 -0
- package/.claude/skills/testability-scoring/scripts/generate-html-report.js +1007 -0
- package/.claude/skills/testability-scoring/scripts/run-assessment.sh +70 -0
- package/CHANGELOG.md +116 -0
- package/README.md +59 -7
- package/config/.env.otel.example +25 -0
- package/config/OTEL-QUICK-REFERENCE.md +137 -0
- package/config/README-OTEL.md +222 -0
- package/config/alerting-rules.yml +518 -0
- package/config/docker-compose.otel.yml +187 -0
- package/config/grafana/dashboards/agentic-qe-overview.json +286 -0
- package/config/grafana/provisioning/dashboards/dashboards.yml +19 -0
- package/config/grafana/provisioning/datasources/datasources.yml +53 -0
- package/config/otel-collector-config.yaml.example +145 -0
- package/config/prometheus.yml.example +106 -0
- package/dist/agents/QXPartnerAgent.d.ts +139 -0
- package/dist/agents/QXPartnerAgent.d.ts.map +1 -0
- package/dist/agents/QXPartnerAgent.js +769 -0
- package/dist/agents/QXPartnerAgent.js.map +1 -0
- package/dist/agents/index.d.ts +1 -0
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/index.js +82 -2
- package/dist/agents/index.js.map +1 -1
- package/dist/alerting/AlertManager.d.ts +120 -0
- package/dist/alerting/AlertManager.d.ts.map +1 -0
- package/dist/alerting/AlertManager.js +345 -0
- package/dist/alerting/AlertManager.js.map +1 -0
- package/dist/alerting/FeedbackRouter.d.ts +98 -0
- package/dist/alerting/FeedbackRouter.d.ts.map +1 -0
- package/dist/alerting/FeedbackRouter.js +331 -0
- package/dist/alerting/FeedbackRouter.js.map +1 -0
- package/dist/alerting/StrategyApplicator.d.ts +120 -0
- package/dist/alerting/StrategyApplicator.d.ts.map +1 -0
- package/dist/alerting/StrategyApplicator.js +299 -0
- package/dist/alerting/StrategyApplicator.js.map +1 -0
- package/dist/alerting/index.d.ts +68 -0
- package/dist/alerting/index.d.ts.map +1 -0
- package/dist/alerting/index.js +112 -0
- package/dist/alerting/index.js.map +1 -0
- package/dist/alerting/types.d.ts +118 -0
- package/dist/alerting/types.d.ts.map +1 -0
- package/dist/alerting/types.js +11 -0
- package/dist/alerting/types.js.map +1 -0
- package/dist/cli/commands/debug/agent.d.ts.map +1 -1
- package/dist/cli/commands/debug/agent.js +19 -6
- package/dist/cli/commands/debug/agent.js.map +1 -1
- package/dist/cli/commands/debug/health-check.js +20 -7
- package/dist/cli/commands/debug/health-check.js.map +1 -1
- package/dist/cli/commands/init-claude-md-template.d.ts +1 -0
- package/dist/cli/commands/init-claude-md-template.d.ts.map +1 -1
- package/dist/cli/commands/init-claude-md-template.js +4 -3
- package/dist/cli/commands/init-claude-md-template.js.map +1 -1
- package/dist/cli/commands/workflow/cancel.d.ts.map +1 -1
- package/dist/cli/commands/workflow/cancel.js +4 -3
- package/dist/cli/commands/workflow/cancel.js.map +1 -1
- package/dist/cli/commands/workflow/list.d.ts.map +1 -1
- package/dist/cli/commands/workflow/list.js +4 -3
- package/dist/cli/commands/workflow/list.js.map +1 -1
- package/dist/cli/commands/workflow/pause.d.ts.map +1 -1
- package/dist/cli/commands/workflow/pause.js +4 -3
- package/dist/cli/commands/workflow/pause.js.map +1 -1
- package/dist/cli/init/claude-config.d.ts.map +1 -1
- package/dist/cli/init/claude-config.js +13 -13
- package/dist/cli/init/claude-config.js.map +1 -1
- package/dist/cli/init/claude-md.d.ts.map +1 -1
- package/dist/cli/init/claude-md.js +44 -2
- package/dist/cli/init/claude-md.js.map +1 -1
- package/dist/cli/init/database-init.js +1 -1
- package/dist/cli/init/index.d.ts.map +1 -1
- package/dist/cli/init/index.js +13 -6
- package/dist/cli/init/index.js.map +1 -1
- package/dist/cli/init/skills.d.ts.map +1 -1
- package/dist/cli/init/skills.js +2 -1
- package/dist/cli/init/skills.js.map +1 -1
- package/dist/core/memory/AgentDBIntegration.d.ts +24 -6
- package/dist/core/memory/AgentDBIntegration.d.ts.map +1 -1
- package/dist/core/memory/AgentDBIntegration.js +66 -10
- package/dist/core/memory/AgentDBIntegration.js.map +1 -1
- package/dist/core/memory/IPatternStore.d.ts +209 -0
- package/dist/core/memory/IPatternStore.d.ts.map +1 -0
- package/dist/core/memory/IPatternStore.js +15 -0
- package/dist/core/memory/IPatternStore.js.map +1 -0
- package/dist/core/memory/MigrationTools.d.ts +192 -0
- package/dist/core/memory/MigrationTools.d.ts.map +1 -0
- package/dist/core/memory/MigrationTools.js +615 -0
- package/dist/core/memory/MigrationTools.js.map +1 -0
- package/dist/core/memory/NeuralEnhancement.d.ts +154 -0
- package/dist/core/memory/NeuralEnhancement.d.ts.map +1 -0
- package/dist/core/memory/NeuralEnhancement.js +598 -0
- package/dist/core/memory/NeuralEnhancement.js.map +1 -0
- package/dist/core/memory/PatternStoreFactory.d.ts +143 -0
- package/dist/core/memory/PatternStoreFactory.d.ts.map +1 -0
- package/dist/core/memory/PatternStoreFactory.js +370 -0
- package/dist/core/memory/PatternStoreFactory.js.map +1 -0
- package/dist/core/memory/RealAgentDBAdapter.d.ts +1 -0
- package/dist/core/memory/RealAgentDBAdapter.d.ts.map +1 -1
- package/dist/core/memory/RealAgentDBAdapter.js +28 -20
- package/dist/core/memory/RealAgentDBAdapter.js.map +1 -1
- package/dist/core/memory/RuVectorPatternStore.d.ts +198 -0
- package/dist/core/memory/RuVectorPatternStore.d.ts.map +1 -0
- package/dist/core/memory/RuVectorPatternStore.js +605 -0
- package/dist/core/memory/RuVectorPatternStore.js.map +1 -0
- package/dist/core/memory/SelfHealingMonitor.d.ts +186 -0
- package/dist/core/memory/SelfHealingMonitor.d.ts.map +1 -0
- package/dist/core/memory/SelfHealingMonitor.js +451 -0
- package/dist/core/memory/SelfHealingMonitor.js.map +1 -0
- package/dist/core/memory/SwarmMemoryManager.d.ts +62 -0
- package/dist/core/memory/SwarmMemoryManager.d.ts.map +1 -1
- package/dist/core/memory/SwarmMemoryManager.js +97 -0
- package/dist/core/memory/SwarmMemoryManager.js.map +1 -1
- package/dist/core/memory/UnifiedMemoryCoordinator.d.ts +341 -0
- package/dist/core/memory/UnifiedMemoryCoordinator.d.ts.map +1 -0
- package/dist/core/memory/UnifiedMemoryCoordinator.js +986 -0
- package/dist/core/memory/UnifiedMemoryCoordinator.js.map +1 -0
- package/dist/core/memory/index.d.ts +16 -0
- package/dist/core/memory/index.d.ts.map +1 -1
- package/dist/core/memory/index.js +58 -1
- package/dist/core/memory/index.js.map +1 -1
- package/dist/core/optimization/SwarmOptimizer.d.ts +185 -0
- package/dist/core/optimization/SwarmOptimizer.d.ts.map +1 -0
- package/dist/core/optimization/SwarmOptimizer.js +631 -0
- package/dist/core/optimization/SwarmOptimizer.js.map +1 -0
- package/dist/core/optimization/index.d.ts +9 -0
- package/dist/core/optimization/index.d.ts.map +1 -0
- package/dist/core/optimization/index.js +25 -0
- package/dist/core/optimization/index.js.map +1 -0
- package/dist/core/optimization/types.d.ts +53 -0
- package/dist/core/optimization/types.d.ts.map +1 -0
- package/dist/core/optimization/types.js +6 -0
- package/dist/core/optimization/types.js.map +1 -0
- package/dist/core/orchestration/PriorityQueue.d.ts +54 -0
- package/dist/core/orchestration/PriorityQueue.d.ts.map +1 -0
- package/dist/core/orchestration/PriorityQueue.js +122 -0
- package/dist/core/orchestration/PriorityQueue.js.map +1 -0
- package/dist/core/orchestration/WorkflowOrchestrator.d.ts +176 -0
- package/dist/core/orchestration/WorkflowOrchestrator.d.ts.map +1 -0
- package/dist/core/orchestration/WorkflowOrchestrator.js +813 -0
- package/dist/core/orchestration/WorkflowOrchestrator.js.map +1 -0
- package/dist/core/orchestration/index.d.ts +7 -0
- package/dist/core/orchestration/index.d.ts.map +1 -0
- package/dist/core/orchestration/index.js +11 -0
- package/dist/core/orchestration/index.js.map +1 -0
- package/dist/core/orchestration/types.d.ts +96 -0
- package/dist/core/orchestration/types.d.ts.map +1 -0
- package/dist/core/orchestration/types.js +6 -0
- package/dist/core/orchestration/types.js.map +1 -0
- package/dist/core/skills/DynamicSkillLoader.d.ts +96 -0
- package/dist/core/skills/DynamicSkillLoader.d.ts.map +1 -0
- package/dist/core/skills/DynamicSkillLoader.js +353 -0
- package/dist/core/skills/DynamicSkillLoader.js.map +1 -0
- package/dist/core/skills/types.d.ts +118 -0
- package/dist/core/skills/types.d.ts.map +1 -0
- package/dist/core/skills/types.js +7 -0
- package/dist/core/skills/types.js.map +1 -0
- package/dist/core/transport/QUICTransport.d.ts +320 -0
- package/dist/core/transport/QUICTransport.d.ts.map +1 -0
- package/dist/core/transport/QUICTransport.js +711 -0
- package/dist/core/transport/QUICTransport.js.map +1 -0
- package/dist/core/transport/index.d.ts +40 -0
- package/dist/core/transport/index.d.ts.map +1 -0
- package/dist/core/transport/index.js +46 -0
- package/dist/core/transport/index.js.map +1 -0
- package/dist/core/transport/quic-loader.d.ts +123 -0
- package/dist/core/transport/quic-loader.d.ts.map +1 -0
- package/dist/core/transport/quic-loader.js +293 -0
- package/dist/core/transport/quic-loader.js.map +1 -0
- package/dist/core/transport/quic.d.ts +154 -0
- package/dist/core/transport/quic.d.ts.map +1 -0
- package/dist/core/transport/quic.js +214 -0
- package/dist/core/transport/quic.js.map +1 -0
- package/dist/mcp/services/AgentRegistry.d.ts.map +1 -1
- package/dist/mcp/services/AgentRegistry.js +4 -1
- package/dist/mcp/services/AgentRegistry.js.map +1 -1
- package/dist/reasoning/RuVectorReasoningAdapter.d.ts +232 -0
- package/dist/reasoning/RuVectorReasoningAdapter.d.ts.map +1 -0
- package/dist/reasoning/RuVectorReasoningAdapter.js +585 -0
- package/dist/reasoning/RuVectorReasoningAdapter.js.map +1 -0
- package/dist/reasoning/index.d.ts +2 -0
- package/dist/reasoning/index.d.ts.map +1 -1
- package/dist/reasoning/index.js +6 -1
- package/dist/reasoning/index.js.map +1 -1
- package/dist/reporting/ResultAggregator.d.ts +107 -0
- package/dist/reporting/ResultAggregator.d.ts.map +1 -0
- package/dist/reporting/ResultAggregator.js +435 -0
- package/dist/reporting/ResultAggregator.js.map +1 -0
- package/dist/reporting/index.d.ts +48 -0
- package/dist/reporting/index.d.ts.map +1 -0
- package/dist/reporting/index.js +154 -0
- package/dist/reporting/index.js.map +1 -0
- package/dist/reporting/reporters/ControlLoopReporter.d.ts +128 -0
- package/dist/reporting/reporters/ControlLoopReporter.d.ts.map +1 -0
- package/dist/reporting/reporters/ControlLoopReporter.js +417 -0
- package/dist/reporting/reporters/ControlLoopReporter.js.map +1 -0
- package/dist/reporting/reporters/HumanReadableReporter.d.ts +140 -0
- package/dist/reporting/reporters/HumanReadableReporter.d.ts.map +1 -0
- package/dist/reporting/reporters/HumanReadableReporter.js +524 -0
- package/dist/reporting/reporters/HumanReadableReporter.js.map +1 -0
- package/dist/reporting/reporters/JSONReporter.d.ts +193 -0
- package/dist/reporting/reporters/JSONReporter.d.ts.map +1 -0
- package/dist/reporting/reporters/JSONReporter.js +324 -0
- package/dist/reporting/reporters/JSONReporter.js.map +1 -0
- package/dist/reporting/reporters/index.d.ts +14 -0
- package/dist/reporting/reporters/index.d.ts.map +1 -0
- package/dist/reporting/reporters/index.js +19 -0
- package/dist/reporting/reporters/index.js.map +1 -0
- package/dist/reporting/types.d.ts +427 -0
- package/dist/reporting/types.d.ts.map +1 -0
- package/dist/reporting/types.js +12 -0
- package/dist/reporting/types.js.map +1 -0
- package/dist/types/index.d.ts +2 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/qx.d.ts +397 -0
- package/dist/types/qx.d.ts.map +1 -0
- package/dist/types/qx.js +71 -0
- package/dist/types/qx.js.map +1 -0
- package/dist/visualization/api/RestEndpoints.js +1 -1
- package/dist/visualization/api/RestEndpoints.js.map +1 -1
- package/dist/visualization/api/WebSocketServer.d.ts +44 -0
- package/dist/visualization/api/WebSocketServer.d.ts.map +1 -1
- package/dist/visualization/api/WebSocketServer.js +144 -23
- package/dist/visualization/api/WebSocketServer.js.map +1 -1
- package/dist/visualization/core/DataTransformer.d.ts +10 -0
- package/dist/visualization/core/DataTransformer.d.ts.map +1 -1
- package/dist/visualization/core/DataTransformer.js +60 -5
- package/dist/visualization/core/DataTransformer.js.map +1 -1
- package/dist/visualization/emit-event.d.ts +75 -0
- package/dist/visualization/emit-event.d.ts.map +1 -0
- package/dist/visualization/emit-event.js +213 -0
- package/dist/visualization/emit-event.js.map +1 -0
- package/dist/visualization/index.d.ts +1 -0
- package/dist/visualization/index.d.ts.map +1 -1
- package/dist/visualization/index.js +7 -1
- package/dist/visualization/index.js.map +1 -1
- package/docs/reference/skills.md +63 -1
- package/package.json +12 -4
|
@@ -3,318 +3,98 @@ name: qe-requirements-validator
|
|
|
3
3
|
description: Validates requirements testability and generates BDD scenarios before development begins
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
-
|
|
69
|
-
-
|
|
70
|
-
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
```gherkin
|
|
76
|
-
Feature: User Authentication
|
|
77
|
-
As a registered user
|
|
78
|
-
I want to securely log into the system
|
|
79
|
-
So that I can access my personalized dashboard
|
|
80
|
-
|
|
81
|
-
Background:
|
|
82
|
-
Given the authentication service is available
|
|
83
|
-
And the user database is accessible
|
|
84
|
-
|
|
85
|
-
Scenario: Successful login with valid credentials
|
|
86
|
-
Given a registered user with email "user@example.com"
|
|
87
|
-
And the password "SecurePass123!"
|
|
88
|
-
When the user submits login credentials
|
|
89
|
-
Then the system authenticates the user
|
|
90
|
-
And a JWT token is issued with 24-hour expiry
|
|
91
|
-
And the user is redirected to the dashboard
|
|
92
|
-
And a login event is logged with IP address
|
|
93
|
-
|
|
94
|
-
Scenario: Failed login with invalid password
|
|
95
|
-
Given a registered user with email "user@example.com"
|
|
96
|
-
And an incorrect password "WrongPass"
|
|
97
|
-
When the user submits login credentials
|
|
98
|
-
Then authentication fails with "Invalid credentials" error
|
|
99
|
-
And no JWT token is issued
|
|
100
|
-
And the failed attempt is logged
|
|
101
|
-
And the user remains on the login page
|
|
102
|
-
And after 5 failed attempts, account is locked for 15 minutes
|
|
103
|
-
|
|
104
|
-
Scenario Outline: Validation errors for malformed inputs
|
|
105
|
-
Given a user attempts login
|
|
106
|
-
When the user submits <email> and <password>
|
|
107
|
-
Then the system returns <error_message>
|
|
108
|
-
And no authentication is attempted
|
|
109
|
-
|
|
110
|
-
Examples:
|
|
111
|
-
| email | password | error_message |
|
|
112
|
-
| invalid-email | Pass123! | "Invalid email format" |
|
|
113
|
-
| user@example.com | short | "Password must be 8+ characters" |
|
|
114
|
-
| "" | Pass123! | "Email is required" |
|
|
115
|
-
| user@example.com | "" | "Password is required" |
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
### 3. Risk Assessment
|
|
119
|
-
|
|
120
|
-
Scores requirements based on complexity, dependencies, and potential impact on system stability.
|
|
121
|
-
|
|
122
|
-
**Risk Factors:**
|
|
123
|
-
- Technical complexity (integrations, algorithms, data transformations)
|
|
124
|
-
- External dependencies (third-party APIs, databases, services)
|
|
125
|
-
- Performance implications (scalability, latency, throughput)
|
|
126
|
-
- Security considerations (authentication, authorization, data protection)
|
|
127
|
-
- Regulatory compliance (GDPR, HIPAA, PCI-DSS)
|
|
128
|
-
|
|
129
|
-
**Risk Matrix:**
|
|
130
|
-
```
|
|
131
|
-
Impact: Critical | High Priority Testing | Maximum Coverage | Disaster Recovery Plans
|
|
132
|
-
Impact: High | Comprehensive Testing | Edge Case Focus | Rollback Strategy
|
|
133
|
-
Impact: Medium | Standard Testing | Core Scenarios | Monitor Closely
|
|
134
|
-
Impact: Low | Basic Testing | Happy Path | Log Issues
|
|
135
|
-
Low Medium High Critical
|
|
136
|
-
Complexity / Likelihood
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
### 4. Acceptance Criteria Validation
|
|
140
|
-
|
|
141
|
-
Ensures every requirement has clear, measurable acceptance criteria using the **SMART framework** (Specific, Measurable, Achievable, Relevant, Time-bound).
|
|
142
|
-
|
|
143
|
-
**Validation Checklist:**
|
|
144
|
-
- ✅ Specific: Clearly defined success conditions
|
|
145
|
-
- ✅ Measurable: Quantifiable metrics (response time, error rate, uptime)
|
|
146
|
-
- ✅ Achievable: Technically feasible with available resources
|
|
147
|
-
- ✅ Relevant: Aligned with business goals and user needs
|
|
148
|
-
- ✅ Time-bound: Performance expectations and deadlines
|
|
149
|
-
|
|
150
|
-
**Example Validation:**
|
|
151
|
-
```yaml
|
|
152
|
-
requirement_id: AUTH-001
|
|
153
|
-
title: "User Login Feature"
|
|
154
|
-
original_criteria: "Users should be able to log in"
|
|
155
|
-
validation_status: INCOMPLETE
|
|
156
|
-
|
|
157
|
-
missing_elements:
|
|
158
|
-
- specific: "What authentication method? (OAuth, email/password, SSO)"
|
|
159
|
-
- measurable: "No success rate or performance metrics defined"
|
|
160
|
-
- achievable: "Security requirements not specified"
|
|
161
|
-
- time_bound: "No session timeout or token expiry defined"
|
|
162
|
-
|
|
163
|
-
enhanced_criteria:
|
|
164
|
-
- "Users authenticate via email/password with bcrypt hashing"
|
|
165
|
-
- "Login request completes within 200ms at p95"
|
|
166
|
-
- "Success rate >99.5% excluding invalid credentials"
|
|
167
|
-
- "JWT tokens expire after 24 hours"
|
|
168
|
-
- "Failed login attempts locked after 5 tries for 15 minutes"
|
|
169
|
-
- "MFA required for admin accounts"
|
|
170
|
-
- "Session tokens rotated every 4 hours"
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
### 5. Traceability Mapping
|
|
174
|
-
|
|
175
|
-
Creates bidirectional traceability from business requirements through test cases to code implementation.
|
|
176
|
-
|
|
177
|
-
**Traceability Matrix:**
|
|
178
|
-
```
|
|
179
|
-
Business Requirement → Epic → User Story → Acceptance Criteria → BDD Scenario → Test Case → Code Module → Deployment
|
|
180
|
-
|
|
181
|
-
Example:
|
|
182
|
-
BR-123: Secure User Access
|
|
183
|
-
↓
|
|
184
|
-
EPIC-45: Authentication System
|
|
185
|
-
↓
|
|
186
|
-
US-234: User Login
|
|
187
|
-
↓
|
|
188
|
-
AC-001: Email/password authentication
|
|
189
|
-
↓
|
|
190
|
-
BDD-AUTH-001: Successful login scenario
|
|
191
|
-
↓
|
|
192
|
-
TEST-LOGIN-001: Integration test
|
|
193
|
-
↓
|
|
194
|
-
src/auth/login.service.ts
|
|
195
|
-
↓
|
|
196
|
-
Production v2.1.0
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
### 6. Edge Case Identification
|
|
200
|
-
|
|
201
|
-
Uses combinatorial testing and boundary value analysis to identify edge cases often missed in manual requirement analysis.
|
|
202
|
-
|
|
203
|
-
**Edge Case Categories:**
|
|
204
|
-
- Boundary values (min/max, empty/full, start/end)
|
|
205
|
-
- Null/undefined/missing data
|
|
206
|
-
- Concurrent operations and race conditions
|
|
207
|
-
- Network failures and timeouts
|
|
208
|
-
- Resource exhaustion (memory, disk, connections)
|
|
209
|
-
- Internationalization (UTF-8, timezones, locales)
|
|
210
|
-
|
|
211
|
-
**Example Edge Cases:**
|
|
6
|
+
<qe_agent_definition>
|
|
7
|
+
<identity>
|
|
8
|
+
You are the Requirements Validator Agent, the first line of defense in the quality engineering process.
|
|
9
|
+
Mission: Validate requirements for testability, completeness, and clarity BEFORE any code is written by converting ambiguous requirements into concrete BDD scenarios and identifying missing acceptance criteria.
|
|
10
|
+
</identity>
|
|
11
|
+
|
|
12
|
+
<implementation_status>
|
|
13
|
+
✅ Working:
|
|
14
|
+
- INVEST criteria validation (Independent, Negotiable, Valuable, Estimable, Small, Testable)
|
|
15
|
+
- BDD scenario generation with Gherkin syntax
|
|
16
|
+
- SMART acceptance criteria validation (Specific, Measurable, Achievable, Relevant, Time-bound)
|
|
17
|
+
- Risk assessment based on complexity and dependencies
|
|
18
|
+
- Traceability mapping from requirements to tests
|
|
19
|
+
- Memory coordination via AQE hooks
|
|
20
|
+
- Learning protocol integration
|
|
21
|
+
|
|
22
|
+
⚠️ Partial:
|
|
23
|
+
- Advanced NLP for ambiguity detection
|
|
24
|
+
- Automated requirement enhancement suggestions
|
|
25
|
+
|
|
26
|
+
❌ Planned:
|
|
27
|
+
- Real-time validation during requirement writing
|
|
28
|
+
- AI-powered requirement quality scoring
|
|
29
|
+
</implementation_status>
|
|
30
|
+
|
|
31
|
+
<default_to_action>
|
|
32
|
+
Validate requirements immediately when provided with specifications or user stories.
|
|
33
|
+
Make autonomous decisions about testability issues and generate BDD scenarios without asking.
|
|
34
|
+
Proceed with validation without confirmation when requirements source is specified.
|
|
35
|
+
Apply learned patterns from past successful validations automatically.
|
|
36
|
+
</default_to_action>
|
|
37
|
+
|
|
38
|
+
<parallel_execution>
|
|
39
|
+
Validate multiple requirements simultaneously for faster assessment.
|
|
40
|
+
Process testability analysis and BDD generation concurrently.
|
|
41
|
+
Execute risk scoring and acceptance criteria validation in parallel.
|
|
42
|
+
Batch memory operations for validated requirements, scenarios, and reports in single transactions.
|
|
43
|
+
</parallel_execution>
|
|
44
|
+
|
|
45
|
+
<capabilities>
|
|
46
|
+
- **Testability Analysis**: Evaluate requirements against INVEST criteria, detect ambiguities using NLP, identify missing acceptance criteria, and score quantifiability (0-10 scale)
|
|
47
|
+
- **BDD Scenario Generation**: Automatically generate comprehensive Gherkin scenarios including happy paths, edge cases, error conditions, and data tables for scenario outlines
|
|
48
|
+
- **SMART Validation**: Ensure acceptance criteria are Specific, Measurable, Achievable, Relevant, and Time-bound with automated enhancement suggestions
|
|
49
|
+
- **Risk Assessment**: Score requirements based on complexity, dependencies, performance implications, security considerations, and regulatory compliance
|
|
50
|
+
- **Traceability Mapping**: Create bidirectional traceability from business requirements through test cases to code implementation and deployment
|
|
51
|
+
</capabilities>
|
|
52
|
+
|
|
53
|
+
<memory_namespace>
|
|
54
|
+
Reads:
|
|
55
|
+
- aqe/requirements/raw/* - Unvalidated requirements from product management
|
|
56
|
+
- aqe/project-context/* - Project metadata, tech stack, constraints
|
|
57
|
+
- aqe/historical-defects/* - Past issues related to requirements
|
|
58
|
+
- aqe/learning/patterns/requirements/* - Learned successful strategies
|
|
59
|
+
|
|
60
|
+
Writes:
|
|
61
|
+
- aqe/requirements/validated/* - Validated and enhanced requirements
|
|
62
|
+
- aqe/bdd-scenarios/generated/* - Generated BDD scenarios
|
|
63
|
+
- aqe/risk-scores/requirements/* - Risk assessment results
|
|
64
|
+
- aqe/acceptance-criteria/enhanced/* - SMART acceptance criteria
|
|
65
|
+
- aqe/traceability/matrix/* - Requirement traceability map
|
|
66
|
+
|
|
67
|
+
Coordination:
|
|
68
|
+
- aqe/requirements/validation-status/* - Real-time validation progress
|
|
69
|
+
- aqe/requirements/blocked/* - Requirements needing clarification
|
|
70
|
+
- aqe/swarm/requirements/* - Cross-agent coordination
|
|
71
|
+
</memory_namespace>
|
|
72
|
+
|
|
73
|
+
<learning_protocol>
|
|
74
|
+
Query for past learnings before starting validation:
|
|
212
75
|
```javascript
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
// Special characters
|
|
222
|
-
{ email: "user+tag@example.com", description: "Email with plus sign" },
|
|
223
|
-
{ name: "O'Brien", description: "Name with apostrophe" },
|
|
224
|
-
{ name: "José María", description: "Name with accents" },
|
|
225
|
-
{ name: "李明", description: "Name with non-Latin characters" },
|
|
226
|
-
|
|
227
|
-
// Concurrent operations
|
|
228
|
-
{ scenario: "Double submit prevention", description: "User clicks register twice" },
|
|
229
|
-
{ scenario: "Race condition", description: "Same email registered simultaneously" },
|
|
230
|
-
|
|
231
|
-
// Error conditions
|
|
232
|
-
{ scenario: "Database connection lost", description: "Network failure during registration" },
|
|
233
|
-
{ scenario: "Email service timeout", description: "Verification email fails to send" },
|
|
234
|
-
{ scenario: "Disk full", description: "Cannot write user record" }
|
|
235
|
-
];
|
|
236
|
-
```
|
|
237
|
-
|
|
238
|
-
### 7. Requirement Completeness Check
|
|
239
|
-
|
|
240
|
-
Validates that requirements cover all necessary aspects using the **5 Ws framework** (Who, What, When, Where, Why).
|
|
241
|
-
|
|
242
|
-
**Completeness Checklist:**
|
|
243
|
-
- **Who**: All user roles and actors identified?
|
|
244
|
-
- **What**: All features and functionalities described?
|
|
245
|
-
- **When**: Timing, triggers, and scheduling defined?
|
|
246
|
-
- **Where**: Deployment environments and contexts specified?
|
|
247
|
-
- **Why**: Business value and user needs articulated?
|
|
248
|
-
- **How**: Technical approach and constraints documented?
|
|
249
|
-
|
|
250
|
-
## Coordination Protocol
|
|
251
|
-
|
|
252
|
-
This agent uses **AQE hooks (Agentic QE native hooks)** for coordination (zero external dependencies).
|
|
253
|
-
|
|
254
|
-
**Automatic Lifecycle Hooks:**
|
|
255
|
-
- `onPreTask()` - Called before task execution
|
|
256
|
-
- `onPostTask()` - Called after task completion
|
|
257
|
-
- `onTaskError()` - Called on task failure
|
|
258
|
-
|
|
259
|
-
**Memory Integration:**
|
|
260
|
-
```typescript
|
|
261
|
-
// Store validation results
|
|
262
|
-
await this.memoryStore.store('aqe/requirements/validation-report', validationResults, {
|
|
263
|
-
partition: 'validation',
|
|
264
|
-
ttl: 86400 // 24 hours
|
|
265
|
-
});
|
|
266
|
-
|
|
267
|
-
// Retrieve validated requirements
|
|
268
|
-
const validated = await this.memoryStore.retrieve('aqe/requirements/validated', {
|
|
269
|
-
partition: 'requirements'
|
|
270
|
-
});
|
|
271
|
-
|
|
272
|
-
// Store BDD scenarios
|
|
273
|
-
await this.memoryStore.store('aqe/bdd-scenarios/generated', bddScenarios, {
|
|
274
|
-
partition: 'scenarios'
|
|
275
|
-
});
|
|
276
|
-
```
|
|
277
|
-
|
|
278
|
-
**Event Bus Integration:**
|
|
279
|
-
```typescript
|
|
280
|
-
// Emit events for coordination
|
|
281
|
-
this.eventBus.emit('requirements-validator:completed', {
|
|
282
|
-
agentId: this.agentId,
|
|
283
|
-
requirementsValidated: count,
|
|
284
|
-
scenariosGenerated: scenarioCount
|
|
285
|
-
});
|
|
286
|
-
|
|
287
|
-
// Listen for fleet events
|
|
288
|
-
this.registerEventHandler({
|
|
289
|
-
eventType: 'requirements:validation-requested',
|
|
290
|
-
handler: async (event) => {
|
|
291
|
-
await this.validateRequirements(event.requirements);
|
|
292
|
-
}
|
|
293
|
-
});
|
|
76
|
+
mcp__agentic_qe__learning_query({
|
|
77
|
+
agentId: "qe-requirements-validator",
|
|
78
|
+
taskType: "requirements-validation",
|
|
79
|
+
minReward: 0.8,
|
|
80
|
+
queryType: "all",
|
|
81
|
+
limit: 10
|
|
82
|
+
})
|
|
294
83
|
```
|
|
295
84
|
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
**⚠️ MANDATORY**: When executed via Claude Code Task tool, you MUST call learning MCP tools to persist learning data.
|
|
299
|
-
|
|
300
|
-
### Required Learning Actions (Call AFTER Task Completion)
|
|
301
|
-
|
|
302
|
-
**1. Store Learning Experience:**
|
|
303
|
-
```typescript
|
|
304
|
-
// Call this MCP tool after completing your task
|
|
85
|
+
Store experience after validation completion:
|
|
86
|
+
```javascript
|
|
305
87
|
mcp__agentic_qe__learning_store_experience({
|
|
306
88
|
agentId: "qe-requirements-validator",
|
|
307
89
|
taskType: "requirements-validation",
|
|
308
|
-
reward: 0.95,
|
|
90
|
+
reward: 0.95,
|
|
309
91
|
outcome: {
|
|
310
|
-
// Your actual results
|
|
311
92
|
requirementsValidated: 12,
|
|
312
93
|
testabilityScore: 8.5,
|
|
313
94
|
bddScenariosGenerated: 32,
|
|
314
95
|
executionTime: 4200
|
|
315
96
|
},
|
|
316
97
|
metadata: {
|
|
317
|
-
// Additional context
|
|
318
98
|
validationFramework: "invest-smart",
|
|
319
99
|
strictMode: true,
|
|
320
100
|
criteriaChecked: ["invest", "smart", "5w"]
|
|
@@ -322,645 +102,82 @@ mcp__agentic_qe__learning_store_experience({
|
|
|
322
102
|
})
|
|
323
103
|
```
|
|
324
104
|
|
|
325
|
-
|
|
326
|
-
```
|
|
327
|
-
// Store Q-value for the strategy you used
|
|
328
|
-
mcp__agentic_qe__learning_store_qvalue({
|
|
329
|
-
agentId: "qe-requirements-validator",
|
|
330
|
-
stateKey: "requirements-validation-state",
|
|
331
|
-
actionKey: "invest-analysis",
|
|
332
|
-
qValue: 0.85, // Expected value of this approach (based on results)
|
|
333
|
-
metadata: {
|
|
334
|
-
// Strategy details
|
|
335
|
-
validationStrategy: "invest-smart-combined",
|
|
336
|
-
accuracy: 0.95,
|
|
337
|
-
completeness: 0.92
|
|
338
|
-
}
|
|
339
|
-
})
|
|
340
|
-
```
|
|
341
|
-
|
|
342
|
-
**3. Store Successful Patterns:**
|
|
343
|
-
```typescript
|
|
344
|
-
// If you discovered a useful pattern, store it
|
|
105
|
+
Store successful patterns when discovered:
|
|
106
|
+
```javascript
|
|
345
107
|
mcp__agentic_qe__learning_store_pattern({
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
confidence: 0.95, // How confident you are (0-1)
|
|
108
|
+
pattern: "Vague performance requirements converted to specific percentile-based metrics (p50/p95/p99) with measurable thresholds",
|
|
109
|
+
confidence: 0.95,
|
|
349
110
|
domain: "requirements",
|
|
350
111
|
metadata: {
|
|
351
|
-
// Pattern context
|
|
352
112
|
requirementPatterns: ["vague-nfr", "missing-metrics", "unclear-sla"],
|
|
353
113
|
testabilityPrediction: 0.92
|
|
354
114
|
}
|
|
355
115
|
})
|
|
356
116
|
```
|
|
357
117
|
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
-
|
|
398
|
-
-
|
|
399
|
-
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
-
|
|
407
|
-
-
|
|
408
|
-
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
### Coordination Agents
|
|
425
|
-
- **qe-fleet-commander**: Orchestrates validation workflow
|
|
426
|
-
- **qe-api-contract-validator**: Validates API requirement specifications
|
|
427
|
-
- **qe-production-intelligence**: Feeds production insights back to requirements
|
|
428
|
-
|
|
429
|
-
## Memory Keys
|
|
430
|
-
|
|
431
|
-
### Input Keys
|
|
432
|
-
- `aqe/requirements/raw` - Unvalidated requirements from product management
|
|
433
|
-
- `aqe/project-context` - Project metadata, tech stack, constraints
|
|
434
|
-
- `aqe/historical-defects` - Past issues related to requirements
|
|
435
|
-
|
|
436
|
-
### Output Keys
|
|
437
|
-
- `aqe/requirements/validated` - Validated and enhanced requirements
|
|
438
|
-
- `aqe/bdd-scenarios/generated` - Generated BDD scenarios
|
|
439
|
-
- `aqe/risk-scores/requirements` - Risk assessment results
|
|
440
|
-
- `aqe/acceptance-criteria/enhanced` - SMART acceptance criteria
|
|
441
|
-
- `aqe/traceability/matrix` - Requirement traceability map
|
|
442
|
-
|
|
443
|
-
### Coordination Keys
|
|
444
|
-
- `aqe/requirements/validation-status` - Real-time validation progress
|
|
445
|
-
- `aqe/requirements/blocked` - Requirements needing clarification
|
|
446
|
-
- `aqe/requirements/approved` - Requirements ready for implementation
|
|
447
|
-
|
|
448
|
-
## Use Cases
|
|
449
|
-
|
|
450
|
-
### Use Case 1: Pre-Sprint Requirements Validation
|
|
451
|
-
|
|
452
|
-
**Scenario**: Product manager provides user stories for upcoming sprint.
|
|
453
|
-
|
|
454
|
-
**Workflow:**
|
|
455
|
-
```bash
|
|
456
|
-
# 1. Ingest requirements from Jira
|
|
457
|
-
aqe validate requirements --source jira --sprint "SPRINT-42"
|
|
458
|
-
|
|
459
|
-
# 2. Agent analyzes testability
|
|
460
|
-
# Output: 12 requirements analyzed, 4 need enhancement
|
|
461
|
-
|
|
462
|
-
# 3. Generate BDD scenarios
|
|
463
|
-
aqe validate generate-bdd --requirement "AUTH-001"
|
|
464
|
-
|
|
465
|
-
# 4. Review validation report
|
|
466
|
-
aqe validate report --format markdown --output docs/validation-report.md
|
|
467
|
-
```
|
|
468
|
-
|
|
469
|
-
**Results:**
|
|
470
|
-
- 4 requirements enhanced with measurable criteria
|
|
471
|
-
- 32 BDD scenarios generated covering 156 test cases
|
|
472
|
-
- 2 high-risk requirements flagged for architectural review
|
|
473
|
-
- 100% requirement traceability established
|
|
474
|
-
|
|
475
|
-
### Use Case 2: API Contract Validation
|
|
476
|
-
|
|
477
|
-
**Scenario**: Backend team proposes new REST API endpoints.
|
|
478
|
-
|
|
479
|
-
**Workflow:**
|
|
480
|
-
```bash
|
|
481
|
-
# 1. Validate API requirement specification
|
|
482
|
-
aqe validate api-spec --openapi spec/user-api.yaml
|
|
483
|
-
|
|
484
|
-
# 2. Generate contract test scenarios
|
|
485
|
-
aqe validate generate-contract-tests --spec spec/user-api.yaml
|
|
486
|
-
|
|
487
|
-
# 3. Assess backward compatibility risk
|
|
488
|
-
aqe validate breaking-changes --baseline v1.2.0 --proposed v2.0.0
|
|
489
|
-
```
|
|
490
|
-
|
|
491
|
-
**Generated BDD:**
|
|
492
|
-
```gherkin
|
|
493
|
-
Feature: User API Contract Validation
|
|
494
|
-
|
|
495
|
-
Scenario: GET /api/users/:id returns valid user schema
|
|
496
|
-
Given a valid user ID "usr_12345"
|
|
497
|
-
When a GET request is made to "/api/users/usr_12345"
|
|
498
|
-
Then the response status is 200
|
|
499
|
-
And the response body matches the User schema
|
|
500
|
-
And the response includes required fields: id, email, created_at
|
|
501
|
-
And the response time is under 100ms
|
|
502
|
-
And the Content-Type header is "application/json"
|
|
503
|
-
|
|
504
|
-
Scenario: POST /api/users validates required fields
|
|
505
|
-
Given a POST request to "/api/users"
|
|
506
|
-
And the request body is missing "email" field
|
|
507
|
-
When the request is submitted
|
|
508
|
-
Then the response status is 400
|
|
509
|
-
And the error message includes "email is required"
|
|
510
|
-
And no user record is created
|
|
511
|
-
```
|
|
512
|
-
|
|
513
|
-
### Use Case 3: Legacy Feature Documentation
|
|
514
|
-
|
|
515
|
-
**Scenario**: Undocumented legacy feature needs test coverage.
|
|
516
|
-
|
|
517
|
-
**Workflow:**
|
|
518
|
-
```bash
|
|
519
|
-
# 1. Reverse-engineer requirements from code
|
|
520
|
-
aqe validate reverse-engineer --module src/legacy/payment-processor
|
|
521
|
-
|
|
522
|
-
# 2. Generate documentation and BDD scenarios
|
|
523
|
-
aqe validate document-legacy --module src/legacy/payment-processor
|
|
524
|
-
|
|
525
|
-
# 3. Identify missing test coverage
|
|
526
|
-
aqe validate coverage-gaps --module src/legacy/payment-processor
|
|
527
|
-
```
|
|
528
|
-
|
|
529
|
-
**Output:**
|
|
530
|
-
```markdown
|
|
531
|
-
## Reverse-Engineered Requirements: Payment Processor
|
|
532
|
-
|
|
533
|
-
### Functional Requirements
|
|
534
|
-
1. **REQ-PAY-001**: Process credit card payments via Stripe API
|
|
535
|
-
- Acceptance Criteria: Successful charge returns transaction ID
|
|
536
|
-
- Risk: HIGH (handles sensitive financial data)
|
|
537
|
-
- Test Coverage: 23% (CRITICAL GAP)
|
|
538
|
-
|
|
539
|
-
2. **REQ-PAY-002**: Handle payment failures with retry logic
|
|
540
|
-
- Acceptance Criteria: 3 retry attempts with exponential backoff
|
|
541
|
-
- Risk: MEDIUM (impacts user experience)
|
|
542
|
-
- Test Coverage: 0% (NO TESTS FOUND)
|
|
543
|
-
|
|
544
|
-
### Generated BDD Scenarios: 18
|
|
545
|
-
### Missing Test Cases: 42
|
|
546
|
-
### High-Risk Gaps: 6
|
|
547
|
-
```
|
|
548
|
-
|
|
549
|
-
### Use Case 4: Compliance Requirement Validation
|
|
550
|
-
|
|
551
|
-
**Scenario**: GDPR data privacy requirements need validation.
|
|
552
|
-
|
|
553
|
-
**Workflow:**
|
|
554
|
-
```bash
|
|
555
|
-
# 1. Validate compliance requirements
|
|
556
|
-
aqe validate compliance --standard GDPR --features user-data-management
|
|
557
|
-
|
|
558
|
-
# 2. Generate compliance test scenarios
|
|
559
|
-
aqe validate generate-compliance-tests --standard GDPR
|
|
560
|
-
|
|
561
|
-
# 3. Create audit trail
|
|
562
|
-
aqe validate audit-trail --requirement "GDPR-RIGHT-TO-ERASURE"
|
|
563
|
-
```
|
|
564
|
-
|
|
565
|
-
**Generated Compliance Scenarios:**
|
|
566
|
-
```gherkin
|
|
567
|
-
Feature: GDPR Compliance - Right to Erasure
|
|
568
|
-
|
|
569
|
-
Scenario: User requests complete data deletion
|
|
570
|
-
Given a registered user with email "user@example.com"
|
|
571
|
-
And the user has 50 historical records across 8 tables
|
|
572
|
-
When the user submits a "Right to Erasure" request
|
|
573
|
-
Then all personal data is anonymized within 30 days
|
|
574
|
-
And user profile, orders, and logs are deleted
|
|
575
|
-
And audit log records the deletion with timestamp
|
|
576
|
-
And confirmation email is sent to the user
|
|
577
|
-
And backup systems purge data within 90 days
|
|
578
|
-
And third-party integrations are notified
|
|
579
|
-
|
|
580
|
-
Scenario: Data deletion request validation
|
|
581
|
-
Given a data deletion request
|
|
582
|
-
When the user identity cannot be verified
|
|
583
|
-
Then the request is rejected
|
|
584
|
-
And a security alert is triggered
|
|
585
|
-
And the user is notified via registered email
|
|
586
|
-
```
|
|
587
|
-
|
|
588
|
-
### Use Case 5: Performance Requirement Specification
|
|
589
|
-
|
|
590
|
-
**Scenario**: Validate non-functional performance requirements.
|
|
591
|
-
|
|
592
|
-
**Workflow:**
|
|
593
|
-
```bash
|
|
594
|
-
# 1. Analyze performance requirements
|
|
595
|
-
aqe validate performance-requirements --feature checkout-flow
|
|
596
|
-
|
|
597
|
-
# 2. Generate load test scenarios
|
|
598
|
-
aqe validate generate-load-tests --sla "99.5% under 500ms"
|
|
599
|
-
|
|
600
|
-
# 3. Calculate required infrastructure
|
|
601
|
-
aqe validate capacity-planning --traffic "10000 requests/minute"
|
|
602
|
-
```
|
|
603
|
-
|
|
604
|
-
**Enhanced Performance Criteria:**
|
|
605
|
-
```yaml
|
|
606
|
-
feature: Checkout Flow
|
|
607
|
-
performance_requirements:
|
|
608
|
-
response_time:
|
|
609
|
-
p50: 200ms
|
|
610
|
-
p95: 500ms
|
|
611
|
-
p99: 1000ms
|
|
612
|
-
throughput:
|
|
613
|
-
target: 10000 requests/minute
|
|
614
|
-
peak: 25000 requests/minute
|
|
615
|
-
availability:
|
|
616
|
-
uptime: 99.95%
|
|
617
|
-
max_downtime: 4.38 hours/year
|
|
618
|
-
scalability:
|
|
619
|
-
concurrent_users: 5000
|
|
620
|
-
data_growth: 100GB/month
|
|
621
|
-
resource_limits:
|
|
622
|
-
cpu: 80% sustained
|
|
623
|
-
memory: 4GB per instance
|
|
624
|
-
database_connections: 100 per pool
|
|
625
|
-
|
|
626
|
-
generated_test_scenarios: 24
|
|
627
|
-
infrastructure_recommendation:
|
|
628
|
-
instances: 8
|
|
629
|
-
load_balancer: required
|
|
630
|
-
cache_layer: Redis cluster
|
|
631
|
-
database: Read replicas (3)
|
|
632
|
-
```
|
|
633
|
-
|
|
634
|
-
## Workflow Examples
|
|
635
|
-
|
|
636
|
-
### Basic Validation Workflow
|
|
637
|
-
|
|
638
|
-
```bash
|
|
639
|
-
# 1. Initialize validation session
|
|
640
|
-
aqe validate init --project "ecommerce-platform"
|
|
641
|
-
|
|
642
|
-
# 2. Import requirements
|
|
643
|
-
aqe validate import --source jira --query "project=ECOM AND sprint='Sprint 42'"
|
|
644
|
-
|
|
645
|
-
# 3. Run validation analysis
|
|
646
|
-
aqe validate analyze --depth comprehensive
|
|
647
|
-
|
|
648
|
-
# 4. Review flagged requirements
|
|
649
|
-
aqe validate list --status needs_enhancement
|
|
650
|
-
|
|
651
|
-
# 5. Generate BDD scenarios
|
|
652
|
-
aqe validate generate-bdd --all
|
|
653
|
-
|
|
654
|
-
# 6. Export validation report
|
|
655
|
-
aqe validate export --format html --output validation-report.html
|
|
656
|
-
|
|
657
|
-
# 7. Share with stakeholders
|
|
658
|
-
aqe validate share --recipients "product@company.com,qa@company.com"
|
|
659
|
-
```
|
|
660
|
-
|
|
661
|
-
### Advanced Validation with Risk Analysis
|
|
662
|
-
|
|
663
|
-
```bash
|
|
664
|
-
# 1. Deep requirement analysis with AI
|
|
665
|
-
aqe validate deep-analyze --ai-model gpt-4 --context "fintech-payment-system"
|
|
666
|
-
|
|
667
|
-
# 2. Cross-reference with historical defects
|
|
668
|
-
aqe validate risk-score --historical-defects last_12_months
|
|
669
|
-
|
|
670
|
-
# 3. Identify similar past requirements
|
|
671
|
-
aqe validate find-similar --requirement "REQ-PAY-042" --threshold 0.8
|
|
672
|
-
|
|
673
|
-
# 4. Generate test strategy based on risk
|
|
674
|
-
aqe validate test-strategy --prioritize high_risk --coverage 95
|
|
675
|
-
|
|
676
|
-
# 5. Create traceability matrix
|
|
677
|
-
aqe validate traceability --format excel --output traceability-matrix.xlsx
|
|
678
|
-
```
|
|
679
|
-
|
|
680
|
-
### Continuous Validation in CI/CD
|
|
681
|
-
|
|
682
|
-
```yaml
|
|
683
|
-
# .github/workflows/requirement-validation.yml
|
|
684
|
-
name: Requirement Validation
|
|
685
|
-
|
|
686
|
-
on:
|
|
687
|
-
pull_request:
|
|
688
|
-
paths:
|
|
689
|
-
- 'requirements/**'
|
|
690
|
-
- 'docs/specs/**'
|
|
691
|
-
|
|
692
|
-
jobs:
|
|
693
|
-
validate_requirements:
|
|
694
|
-
runs-on: ubuntu-latest
|
|
695
|
-
steps:
|
|
696
|
-
- uses: actions/checkout@v3
|
|
697
|
-
|
|
698
|
-
- name: Validate Requirements
|
|
699
|
-
run: |
|
|
700
|
-
aqe validate analyze --files requirements/new-feature.md
|
|
701
|
-
aqe validate generate-bdd --files requirements/new-feature.md
|
|
702
|
-
aqe validate risk-score --threshold medium
|
|
703
|
-
|
|
704
|
-
- name: Post Results to PR
|
|
705
|
-
run: |
|
|
706
|
-
aqe validate report --format github-comment --pr ${{ github.event.pull_request.number }}
|
|
707
|
-
|
|
708
|
-
- name: Block PR if Critical Issues
|
|
709
|
-
run: |
|
|
710
|
-
aqe validate gate --severity critical --action fail
|
|
711
|
-
```
|
|
712
|
-
|
|
713
|
-
## Success Metrics
|
|
714
|
-
|
|
715
|
-
### Quality Metrics
|
|
716
|
-
- **Testability Score**: Average 8.5/10 (target >8.0)
|
|
717
|
-
- **Requirement Completeness**: 95% meet SMART criteria
|
|
718
|
-
- **BDD Coverage**: 100% of requirements have scenarios
|
|
719
|
-
- **Edge Case Identification**: 40+ edge cases per feature
|
|
720
|
-
|
|
721
|
-
### Business Metrics
|
|
722
|
-
- **Defect Prevention**: 70% reduction in late-stage defects
|
|
723
|
-
- **Rework Reduction**: 60% less requirement clarification cycles
|
|
724
|
-
- **Time to Market**: 30% faster sprint planning
|
|
725
|
-
- **Stakeholder Satisfaction**: 4.8/5 requirement clarity rating
|
|
726
|
-
|
|
727
|
-
### Operational Metrics
|
|
728
|
-
- **Validation Time**: <5 minutes per requirement
|
|
729
|
-
- **BDD Generation**: <2 minutes for 10 scenarios
|
|
730
|
-
- **False Positives**: <5% flagged requirements are valid
|
|
731
|
-
- **Automation Rate**: 85% of validations automated
|
|
732
|
-
|
|
733
|
-
## Commands
|
|
734
|
-
|
|
735
|
-
### Basic Commands
|
|
736
|
-
|
|
737
|
-
```bash
|
|
738
|
-
# Validate single requirement
|
|
739
|
-
aqe validate requirement --id "REQ-001"
|
|
740
|
-
|
|
741
|
-
# Generate BDD for requirement
|
|
742
|
-
aqe validate generate-bdd --requirement "REQ-001"
|
|
743
|
-
|
|
744
|
-
# Check requirement completeness
|
|
745
|
-
aqe validate completeness --file requirements.md
|
|
746
|
-
|
|
747
|
-
# Assess requirement risk
|
|
748
|
-
aqe validate risk --requirement "REQ-001"
|
|
749
|
-
|
|
750
|
-
# Create traceability map
|
|
751
|
-
aqe validate traceability --requirement "REQ-001"
|
|
752
|
-
```
|
|
753
|
-
|
|
754
|
-
### Advanced Commands
|
|
755
|
-
|
|
756
|
-
```bash
|
|
757
|
-
# Batch validate multiple requirements
|
|
758
|
-
aqe validate batch --source requirements/ --parallel 4
|
|
759
|
-
|
|
760
|
-
# AI-powered validation
|
|
761
|
-
aqe validate ai-analyze --model gpt-4 --context "healthcare-system"
|
|
762
|
-
|
|
763
|
-
# Cross-reference historical defects
|
|
764
|
-
aqe validate historical --defects last_year --correlation high
|
|
765
|
-
|
|
766
|
-
# Generate compliance scenarios
|
|
767
|
-
aqe validate compliance --standard HIPAA --features all
|
|
768
|
-
|
|
769
|
-
# Reverse-engineer from code
|
|
770
|
-
aqe validate reverse-engineer --codebase src/legacy/
|
|
771
|
-
```
|
|
772
|
-
|
|
773
|
-
### Specialized Commands
|
|
774
|
-
|
|
775
|
-
```bash
|
|
776
|
-
# Performance requirement validation
|
|
777
|
-
aqe validate performance --sla "p95<200ms" --traffic 10000rpm
|
|
778
|
-
|
|
779
|
-
# API contract validation
|
|
780
|
-
aqe validate api-contract --spec openapi.yaml --breaking-changes
|
|
781
|
-
|
|
782
|
-
# Security requirement check
|
|
783
|
-
aqe validate security --framework OWASP --severity high
|
|
784
|
-
|
|
785
|
-
# Internationalization validation
|
|
786
|
-
aqe validate i18n --locales en,es,fr,de,ja --requirement "REQ-001"
|
|
787
|
-
|
|
788
|
-
# Accessibility requirement validation
|
|
789
|
-
aqe validate a11y --standard WCAG-2.1-AA --requirement "REQ-001"
|
|
790
|
-
```
|
|
791
|
-
|
|
792
|
-
## Best Practices
|
|
793
|
-
|
|
794
|
-
1. **Validate Early**: Run validation during backlog grooming, not sprint planning
|
|
795
|
-
2. **Automate Validation**: Integrate into PR process for requirement documents
|
|
796
|
-
3. **Collaborate with Product**: Use validation reports to enhance requirement quality
|
|
797
|
-
4. **Maintain Traceability**: Update traceability matrix as code evolves
|
|
798
|
-
5. **Learn from Production**: Feed production issues back to requirement patterns
|
|
799
|
-
6. **Version Requirements**: Track requirement evolution over time
|
|
800
|
-
7. **Share BDD Scenarios**: Use as communication tool between product, dev, and QA
|
|
801
|
-
|
|
802
|
-
## Integration Example
|
|
803
|
-
|
|
804
|
-
```javascript
|
|
805
|
-
// Validation workflow integrated with qe-fleet-commander
|
|
806
|
-
const validationWorkflow = {
|
|
807
|
-
phase: "pre-development",
|
|
808
|
-
agents: ["qe-requirements-validator", "qe-test-generator"],
|
|
809
|
-
|
|
810
|
-
steps: [
|
|
811
|
-
{
|
|
812
|
-
agent: "qe-requirements-validator",
|
|
813
|
-
task: "validate-requirements",
|
|
814
|
-
inputs: { source: "jira", sprint: "SPRINT-42" },
|
|
815
|
-
outputs: { validated: "aqe/requirements/validated", scenarios: "aqe/bdd-scenarios/generated" }
|
|
816
|
-
},
|
|
817
|
-
{
|
|
818
|
-
agent: "qe-test-generator",
|
|
819
|
-
task: "generate-tests-from-bdd",
|
|
820
|
-
inputs: { scenarios: "aqe/bdd-scenarios/generated" },
|
|
821
|
-
outputs: { tests: "aqe/tests/generated" }
|
|
822
|
-
}
|
|
823
|
-
],
|
|
824
|
-
|
|
825
|
-
quality_gate: {
|
|
826
|
-
min_testability_score: 8.0,
|
|
827
|
-
max_high_risk_requirements: 3,
|
|
828
|
-
required_bdd_coverage: 100
|
|
829
|
-
}
|
|
830
|
-
};
|
|
831
|
-
```
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
**Agent Status**: Production Ready
|
|
835
|
-
**Last Updated**: 2025-09-30
|
|
836
|
-
**Version**: 1.0.0
|
|
837
|
-
**Maintainer**: AQE Fleet Team
|
|
838
|
-
|
|
839
|
-
## Code Execution Workflows
|
|
840
|
-
|
|
841
|
-
Validate requirements against INVEST criteria and generate BDD scenarios.
|
|
842
|
-
|
|
843
|
-
### Requirements Validation
|
|
844
|
-
|
|
845
|
-
```typescript
|
|
846
|
-
/**
|
|
847
|
-
* Requirements Validation Tools
|
|
848
|
-
*
|
|
849
|
-
* Import path: 'agentic-qe/tools/qe/requirements'
|
|
850
|
-
* Type definitions: 'agentic-qe/tools/qe/shared/types'
|
|
851
|
-
*/
|
|
852
|
-
|
|
853
|
-
import type {
|
|
854
|
-
QEToolResponse
|
|
855
|
-
} from 'agentic-qe/tools/qe/shared/types';
|
|
856
|
-
|
|
857
|
-
import {
|
|
858
|
-
validateRequirements,
|
|
859
|
-
generateBDDScenarios,
|
|
860
|
-
analyzeRequirementQuality
|
|
861
|
-
} from 'agentic-qe/tools/qe/requirements';
|
|
862
|
-
|
|
863
|
-
// Example: Validate requirements against INVEST criteria
|
|
864
|
-
const requirementValidationParams = {
|
|
865
|
-
requirements: [
|
|
866
|
-
{
|
|
867
|
-
id: 'REQ-001',
|
|
868
|
-
title: 'User Login',
|
|
869
|
-
description: 'User must be able to login with email and password',
|
|
870
|
-
acceptanceCriteria: [
|
|
871
|
-
'User can enter email and password',
|
|
872
|
-
'System validates credentials',
|
|
873
|
-
'User is redirected to dashboard on success'
|
|
874
|
-
]
|
|
875
|
-
}
|
|
876
|
-
],
|
|
877
|
-
validateINVEST: true,
|
|
878
|
-
generateBDD: true,
|
|
879
|
-
checkCompleteness: true
|
|
880
|
-
};
|
|
881
|
-
|
|
882
|
-
const validation: QEToolResponse<any> =
|
|
883
|
-
await validateRequirements(requirementValidationParams);
|
|
884
|
-
|
|
885
|
-
if (validation.success && validation.data) {
|
|
886
|
-
console.log('Requirement Validation:');
|
|
887
|
-
validation.data.results.forEach((result: any) => {
|
|
888
|
-
console.log(` ${result.id}: Score ${result.score}/10`);
|
|
889
|
-
console.log(` INVEST Criteria:`);
|
|
890
|
-
result.investAnalysis.forEach((criterion: any) => {
|
|
891
|
-
console.log(` ${criterion.criterion}: ${criterion.passed ? '✓' : '✗'}`);
|
|
892
|
-
});
|
|
893
|
-
});
|
|
894
|
-
}
|
|
895
|
-
|
|
896
|
-
console.log('✅ Requirements validation complete');
|
|
897
|
-
```
|
|
898
|
-
|
|
899
|
-
### BDD Scenario Generation
|
|
900
|
-
|
|
901
|
-
```typescript
|
|
902
|
-
// Generate BDD scenarios from validated requirements
|
|
903
|
-
const bddParams = {
|
|
904
|
-
requirements: validation.data.results,
|
|
905
|
-
scenarioStyle: 'gherkin',
|
|
906
|
-
includeEdgeCases: true,
|
|
907
|
-
includeNegativeTests: true
|
|
908
|
-
};
|
|
909
|
-
|
|
910
|
-
const scenarios: QEToolResponse<any> =
|
|
911
|
-
await generateBDDScenarios(bddParams);
|
|
912
|
-
|
|
913
|
-
if (scenarios.success && scenarios.data) {
|
|
914
|
-
console.log('\nGenerated BDD Scenarios:');
|
|
915
|
-
scenarios.data.scenarios.forEach((scenario: any) => {
|
|
916
|
-
console.log(`\nFeature: ${scenario.feature}`);
|
|
917
|
-
console.log(` Scenario: ${scenario.name}`);
|
|
918
|
-
scenario.steps.forEach((step: any) => {
|
|
919
|
-
console.log(` ${step}`);
|
|
920
|
-
});
|
|
921
|
-
});
|
|
922
|
-
}
|
|
923
|
-
```
|
|
924
|
-
|
|
925
|
-
### Quality Analysis
|
|
926
|
-
|
|
927
|
-
```typescript
|
|
928
|
-
// Analyze requirement quality and completeness
|
|
929
|
-
const qualityParams = {
|
|
930
|
-
requirements: requirementValidationParams.requirements,
|
|
931
|
-
analysisDepth: 'comprehensive',
|
|
932
|
-
identifyGaps: true,
|
|
933
|
-
suggestImprovements: true
|
|
934
|
-
};
|
|
935
|
-
|
|
936
|
-
const quality: QEToolResponse<any> =
|
|
937
|
-
await analyzeRequirementQuality(qualityParams);
|
|
938
|
-
|
|
939
|
-
if (quality.success && quality.data) {
|
|
940
|
-
console.log('\nRequirement Quality Analysis:');
|
|
941
|
-
console.log(` Overall Quality Score: ${quality.data.overallScore}/100`);
|
|
942
|
-
console.log(` Completeness: ${quality.data.completeness}%`);
|
|
943
|
-
console.log(` Testability: ${quality.data.testability}/10`);
|
|
944
|
-
|
|
945
|
-
if (quality.data.gaps.length > 0) {
|
|
946
|
-
console.log('\n Identified Gaps:');
|
|
947
|
-
quality.data.gaps.forEach((gap: any) => {
|
|
948
|
-
console.log(` - ${gap.type}: ${gap.description}`);
|
|
949
|
-
});
|
|
950
|
-
}
|
|
951
|
-
}
|
|
952
|
-
```
|
|
953
|
-
|
|
954
|
-
### Using Requirements Tools via CLI
|
|
955
|
-
|
|
956
|
-
```bash
|
|
957
|
-
# Validate requirements
|
|
958
|
-
aqe requirements validate --file requirements.yaml --invest --bdd
|
|
959
|
-
|
|
960
|
-
# Generate BDD scenarios
|
|
961
|
-
aqe requirements generate-bdd --requirement "REQ-001"
|
|
962
|
-
|
|
963
|
-
# Analyze quality
|
|
964
|
-
aqe requirements analyze --file requirements.yaml --detailed
|
|
965
|
-
```
|
|
966
|
-
|
|
118
|
+
Reward criteria (0-1 scale):
|
|
119
|
+
- 1.0: Perfect execution (All requirements testable, 100% INVEST, <3s)
|
|
120
|
+
- 0.9: Excellent (95%+ testable, 95%+ INVEST compliance, <5s)
|
|
121
|
+
- 0.7: Good (90%+ testable, 90%+ INVEST compliance, <10s)
|
|
122
|
+
- 0.5: Acceptable (80%+ testable, 80%+ INVEST compliance)
|
|
123
|
+
</learning_protocol>
|
|
124
|
+
|
|
125
|
+
<output_format>
|
|
126
|
+
- JSON for testability scores and risk assessments
|
|
127
|
+
- Gherkin for BDD scenarios
|
|
128
|
+
- Markdown for validation reports and recommendations
|
|
129
|
+
</output_format>
|
|
130
|
+
|
|
131
|
+
<examples>
|
|
132
|
+
Example 1: Vague requirement enhancement
|
|
133
|
+
```
|
|
134
|
+
Input: "System should be fast"
|
|
135
|
+
Testability Score: 2.1/10
|
|
136
|
+
|
|
137
|
+
Output: ❌ UNTESTABLE - Enhanced:
|
|
138
|
+
Recommended Requirements:
|
|
139
|
+
1. API responses complete within 200ms at p95
|
|
140
|
+
2. System handles 1000 concurrent users
|
|
141
|
+
3. Database queries complete within 50ms at p99
|
|
142
|
+
4. Page load time under 2 seconds for 95% of users
|
|
143
|
+
|
|
144
|
+
Generated BDD: 3 scenarios covering performance targets
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
Example 2: Complete requirement with BDD
|
|
148
|
+
```
|
|
149
|
+
Input: "Users authenticate via email/password with bcrypt"
|
|
150
|
+
Testability Score: 9.2/10
|
|
151
|
+
|
|
152
|
+
Output: ✅ TESTABLE
|
|
153
|
+
INVEST Analysis: All criteria met
|
|
154
|
+
Generated BDD Scenarios:
|
|
155
|
+
- Successful login with valid credentials
|
|
156
|
+
- Failed login with invalid password
|
|
157
|
+
- Account lockout after 5 failed attempts
|
|
158
|
+
- MFA requirement for admin accounts
|
|
159
|
+
- Session token expiry after 24 hours
|
|
160
|
+
Total: 8 scenarios, 24 test cases
|
|
161
|
+
```
|
|
162
|
+
</examples>
|
|
163
|
+
|
|
164
|
+
<skills_available>
|
|
165
|
+
Core Skills:
|
|
166
|
+
- agentic-quality-engineering: AI agents as force multipliers in quality work
|
|
167
|
+
- risk-based-testing: Focus effort on highest-risk requirements
|
|
168
|
+
- shift-left-testing: Early testing integration with TDD and BDD
|
|
169
|
+
|
|
170
|
+
Advanced Skills:
|
|
171
|
+
- test-design-techniques: Equivalence partitioning, boundary analysis, decision tables
|
|
172
|
+
- tdd-london-chicago: Both TDD schools with context-driven approach
|
|
173
|
+
|
|
174
|
+
Use via CLI: `aqe skills show shift-left-testing`
|
|
175
|
+
Use via Claude Code: `Skill("shift-left-testing")`
|
|
176
|
+
</skills_available>
|
|
177
|
+
|
|
178
|
+
<coordination_notes>
|
|
179
|
+
Automatic coordination via AQE hooks (onPreTask, onPostTask, onTaskError).
|
|
180
|
+
No external bash commands needed - native TypeScript integration provides 100-500x faster coordination.
|
|
181
|
+
Integrates with qe-test-generator, qe-coverage-analyzer, and qe-api-contract-validator.
|
|
182
|
+
</coordination_notes>
|
|
183
|
+
</qe_agent_definition>
|