agentic-qe 1.9.4 → 2.1.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 +248 -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/accessibility-testing/SKILL.md +144 -692
- package/.claude/skills/agentic-quality-engineering/SKILL.md +176 -529
- package/.claude/skills/api-testing-patterns/SKILL.md +180 -560
- package/.claude/skills/brutal-honesty-review/SKILL.md +113 -603
- package/.claude/skills/bug-reporting-excellence/SKILL.md +116 -517
- package/.claude/skills/chaos-engineering-resilience/SKILL.md +127 -72
- package/.claude/skills/cicd-pipeline-qe-orchestrator/SKILL.md +209 -404
- package/.claude/skills/code-review-quality/SKILL.md +158 -608
- package/.claude/skills/compatibility-testing/SKILL.md +148 -38
- package/.claude/skills/compliance-testing/SKILL.md +132 -63
- package/.claude/skills/consultancy-practices/SKILL.md +114 -446
- package/.claude/skills/context-driven-testing/SKILL.md +117 -381
- package/.claude/skills/contract-testing/SKILL.md +176 -141
- package/.claude/skills/database-testing/SKILL.md +137 -130
- package/.claude/skills/exploratory-testing-advanced/SKILL.md +160 -629
- package/.claude/skills/holistic-testing-pact/SKILL.md +140 -188
- package/.claude/skills/localization-testing/SKILL.md +145 -33
- package/.claude/skills/mobile-testing/SKILL.md +132 -448
- package/.claude/skills/mutation-testing/SKILL.md +147 -41
- package/.claude/skills/performance-testing/SKILL.md +200 -546
- package/.claude/skills/quality-metrics/SKILL.md +164 -519
- package/.claude/skills/refactoring-patterns/SKILL.md +132 -699
- package/.claude/skills/regression-testing/SKILL.md +120 -926
- package/.claude/skills/risk-based-testing/SKILL.md +157 -660
- package/.claude/skills/security-testing/SKILL.md +199 -538
- package/.claude/skills/sherlock-review/SKILL.md +163 -699
- package/.claude/skills/shift-left-testing/SKILL.md +161 -465
- package/.claude/skills/shift-right-testing/SKILL.md +161 -519
- package/.claude/skills/six-thinking-hats/SKILL.md +175 -1110
- package/.claude/skills/skills-manifest.json +683 -0
- package/.claude/skills/tdd-london-chicago/SKILL.md +131 -448
- package/.claude/skills/technical-writing/SKILL.md +103 -154
- package/.claude/skills/test-automation-strategy/SKILL.md +166 -772
- package/.claude/skills/test-data-management/SKILL.md +126 -910
- package/.claude/skills/test-design-techniques/SKILL.md +179 -89
- package/.claude/skills/test-environment-management/SKILL.md +136 -91
- package/.claude/skills/test-reporting-analytics/SKILL.md +169 -92
- package/.claude/skills/testability-scoring/README.md +71 -0
- package/.claude/skills/testability-scoring/SKILL.md +245 -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/.claude/skills/visual-testing-advanced/SKILL.md +155 -78
- package/.claude/skills/xp-practices/SKILL.md +151 -587
- package/CHANGELOG.md +110 -0
- package/README.md +55 -21
- package/dist/agents/QXPartnerAgent.d.ts +146 -0
- package/dist/agents/QXPartnerAgent.d.ts.map +1 -0
- package/dist/agents/QXPartnerAgent.js +1831 -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/agents/lifecycle/AgentLifecycleManager.d.ts.map +1 -1
- package/dist/agents/lifecycle/AgentLifecycleManager.js +34 -31
- package/dist/agents/lifecycle/AgentLifecycleManager.js.map +1 -1
- 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 +18 -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 +3 -8
- 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/SwarmCoordinator.d.ts +180 -0
- package/dist/core/SwarmCoordinator.d.ts.map +1 -0
- package/dist/core/SwarmCoordinator.js +473 -0
- package/dist/core/SwarmCoordinator.js.map +1 -0
- 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/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 +5 -0
- package/dist/core/memory/index.d.ts.map +1 -1
- package/dist/core/memory/index.js +23 -1
- package/dist/core/memory/index.js.map +1 -1
- package/dist/core/metrics/MetricsAggregator.d.ts +228 -0
- package/dist/core/metrics/MetricsAggregator.d.ts.map +1 -0
- package/dist/core/metrics/MetricsAggregator.js +482 -0
- package/dist/core/metrics/MetricsAggregator.js.map +1 -0
- package/dist/core/metrics/index.d.ts +5 -0
- package/dist/core/metrics/index.d.ts.map +1 -0
- package/dist/core/metrics/index.js +11 -0
- package/dist/core/metrics/index.js.map +1 -0
- package/dist/core/optimization/SwarmOptimizer.d.ts +190 -0
- package/dist/core/optimization/SwarmOptimizer.d.ts.map +1 -0
- package/dist/core/optimization/SwarmOptimizer.js +648 -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/AdaptiveScheduler.d.ts +190 -0
- package/dist/core/orchestration/AdaptiveScheduler.d.ts.map +1 -0
- package/dist/core/orchestration/AdaptiveScheduler.js +460 -0
- package/dist/core/orchestration/AdaptiveScheduler.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 +189 -0
- package/dist/core/orchestration/WorkflowOrchestrator.d.ts.map +1 -0
- package/dist/core/orchestration/WorkflowOrchestrator.js +845 -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/recovery/CircuitBreaker.d.ts +176 -0
- package/dist/core/recovery/CircuitBreaker.d.ts.map +1 -0
- package/dist/core/recovery/CircuitBreaker.js +382 -0
- package/dist/core/recovery/CircuitBreaker.js.map +1 -0
- package/dist/core/recovery/RecoveryOrchestrator.d.ts +186 -0
- package/dist/core/recovery/RecoveryOrchestrator.d.ts.map +1 -0
- package/dist/core/recovery/RecoveryOrchestrator.js +476 -0
- package/dist/core/recovery/RecoveryOrchestrator.js.map +1 -0
- package/dist/core/recovery/RetryStrategy.d.ts +127 -0
- package/dist/core/recovery/RetryStrategy.d.ts.map +1 -0
- package/dist/core/recovery/RetryStrategy.js +314 -0
- package/dist/core/recovery/RetryStrategy.js.map +1 -0
- package/dist/core/recovery/index.d.ts +8 -0
- package/dist/core/recovery/index.d.ts.map +1 -0
- package/dist/core/recovery/index.js +27 -0
- package/dist/core/recovery/index.js.map +1 -0
- package/dist/core/skills/DependencyResolver.d.ts +99 -0
- package/dist/core/skills/DependencyResolver.d.ts.map +1 -0
- package/dist/core/skills/DependencyResolver.js +260 -0
- package/dist/core/skills/DependencyResolver.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/ManifestGenerator.d.ts +114 -0
- package/dist/core/skills/ManifestGenerator.d.ts.map +1 -0
- package/dist/core/skills/ManifestGenerator.js +449 -0
- package/dist/core/skills/ManifestGenerator.js.map +1 -0
- package/dist/core/skills/index.d.ts +9 -0
- package/dist/core/skills/index.d.ts.map +1 -0
- package/dist/core/skills/index.js +24 -0
- package/dist/core/skills/index.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/server.d.ts +9 -9
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +1 -2
- package/dist/mcp/server.js.map +1 -1
- 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/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 +429 -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 +2 -2
- 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 +16 -58
|
@@ -1,553 +1,62 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: qe-test-data-architect-sub
|
|
3
3
|
description: "Designs and generates high-volume test datasets with relationship preservation"
|
|
4
|
+
parent: qe-test-data-architect
|
|
4
5
|
---
|
|
5
6
|
|
|
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
|
-
private async generateEntities(
|
|
64
|
-
schema: EntitySchema,
|
|
65
|
-
count: number,
|
|
66
|
-
existingData: Dataset,
|
|
67
|
-
incomingRelations: Relationship[]
|
|
68
|
-
): Promise<any[]> {
|
|
69
|
-
const entities: any[] = [];
|
|
70
|
-
|
|
71
|
-
for (let i = 0; i < count; i++) {
|
|
72
|
-
const entity: Record<string, any> = {};
|
|
73
|
-
|
|
74
|
-
for (const field of schema.fields) {
|
|
75
|
-
// Handle foreign keys
|
|
76
|
-
const relation = incomingRelations.find(r => r.foreignKey === field.name);
|
|
77
|
-
|
|
78
|
-
if (relation) {
|
|
79
|
-
// Pick valid foreign key from existing data
|
|
80
|
-
const sourceData = existingData[relation.source];
|
|
81
|
-
entity[field.name] = this.selectForeignKey(sourceData, relation);
|
|
82
|
-
} else {
|
|
83
|
-
// Generate field value
|
|
84
|
-
entity[field.name] = this.generateFieldValue(field, i);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
entities.push(entity);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
return entities;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
private generateFieldValue(field: FieldDefinition, index: number): any {
|
|
95
|
-
switch (field.type) {
|
|
96
|
-
case 'uuid':
|
|
97
|
-
return faker.string.uuid();
|
|
98
|
-
case 'string':
|
|
99
|
-
return this.generateString(field);
|
|
100
|
-
case 'number':
|
|
101
|
-
return faker.number.int({ min: field.min, max: field.max });
|
|
102
|
-
case 'date':
|
|
103
|
-
return faker.date.between({ from: field.from, to: field.to });
|
|
104
|
-
case 'email':
|
|
105
|
-
return faker.internet.email();
|
|
106
|
-
case 'enum':
|
|
107
|
-
return faker.helpers.arrayElement(field.values);
|
|
108
|
-
default:
|
|
109
|
-
return null;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
### 2. Relationship Graph Generation
|
|
116
|
-
|
|
117
|
-
```typescript
|
|
118
|
-
interface RelationshipConfig {
|
|
119
|
-
type: 'one-to-one' | 'one-to-many' | 'many-to-many';
|
|
120
|
-
distribution?: 'uniform' | 'normal' | 'zipf';
|
|
121
|
-
min?: number;
|
|
122
|
-
max?: number;
|
|
123
|
-
mean?: number;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
class RelationshipGraphGenerator {
|
|
127
|
-
generateRelationships(
|
|
128
|
-
sourceEntities: any[],
|
|
129
|
-
targetEntities: any[],
|
|
130
|
-
config: RelationshipConfig
|
|
131
|
-
): RelationshipMap {
|
|
132
|
-
const map: RelationshipMap = {};
|
|
133
|
-
|
|
134
|
-
switch (config.type) {
|
|
135
|
-
case 'one-to-one':
|
|
136
|
-
return this.generateOneToOne(sourceEntities, targetEntities);
|
|
137
|
-
|
|
138
|
-
case 'one-to-many':
|
|
139
|
-
return this.generateOneToMany(sourceEntities, targetEntities, config);
|
|
140
|
-
|
|
141
|
-
case 'many-to-many':
|
|
142
|
-
return this.generateManyToMany(sourceEntities, targetEntities, config);
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
private generateOneToMany(
|
|
147
|
-
parents: any[],
|
|
148
|
-
children: any[],
|
|
149
|
-
config: RelationshipConfig
|
|
150
|
-
): RelationshipMap {
|
|
151
|
-
const map: RelationshipMap = {};
|
|
152
|
-
let childIndex = 0;
|
|
153
|
-
|
|
154
|
-
for (const parent of parents) {
|
|
155
|
-
const childCount = this.getChildCount(config);
|
|
156
|
-
map[parent.id] = [];
|
|
157
|
-
|
|
158
|
-
for (let i = 0; i < childCount && childIndex < children.length; i++) {
|
|
159
|
-
children[childIndex].parentId = parent.id;
|
|
160
|
-
map[parent.id].push(children[childIndex].id);
|
|
161
|
-
childIndex++;
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
return map;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
private getChildCount(config: RelationshipConfig): number {
|
|
169
|
-
switch (config.distribution) {
|
|
170
|
-
case 'uniform':
|
|
171
|
-
return faker.number.int({ min: config.min, max: config.max });
|
|
172
|
-
|
|
173
|
-
case 'normal':
|
|
174
|
-
// Normal distribution around mean
|
|
175
|
-
const stdDev = (config.max - config.min) / 4;
|
|
176
|
-
return Math.round(
|
|
177
|
-
Math.max(config.min,
|
|
178
|
-
Math.min(config.max,
|
|
179
|
-
faker.number.float() * stdDev * 2 - stdDev + config.mean
|
|
180
|
-
)
|
|
181
|
-
)
|
|
182
|
-
);
|
|
183
|
-
|
|
184
|
-
case 'zipf':
|
|
185
|
-
// Zipf distribution (few have many, most have few)
|
|
186
|
-
const rank = faker.number.int({ min: 1, max: 100 });
|
|
187
|
-
return Math.round(config.max / rank);
|
|
188
|
-
|
|
189
|
-
default:
|
|
190
|
-
return config.min;
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
### 3. Edge Case Synthesis
|
|
197
|
-
|
|
198
|
-
```typescript
|
|
199
|
-
interface EdgeCaseConfig {
|
|
200
|
-
categories: ('boundary' | 'null' | 'special' | 'unicode' | 'overflow' | 'injection')[];
|
|
201
|
-
density: number; // Percentage of dataset that should be edge cases
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
class EdgeCaseSynthesizer {
|
|
205
|
-
synthesizeEdgeCases(
|
|
206
|
-
normalData: any[],
|
|
207
|
-
schema: EntitySchema,
|
|
208
|
-
config: EdgeCaseConfig
|
|
209
|
-
): any[] {
|
|
210
|
-
const edgeCaseCount = Math.ceil(normalData.length * config.density);
|
|
211
|
-
const edgeCases: any[] = [];
|
|
212
|
-
|
|
213
|
-
for (let i = 0; i < edgeCaseCount; i++) {
|
|
214
|
-
const category = faker.helpers.arrayElement(config.categories);
|
|
215
|
-
const entity = this.generateEdgeCase(schema, category);
|
|
216
|
-
edgeCases.push(entity);
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
return edgeCases;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
private generateEdgeCase(schema: EntitySchema, category: string): any {
|
|
223
|
-
const entity: Record<string, any> = {};
|
|
224
|
-
|
|
225
|
-
for (const field of schema.fields) {
|
|
226
|
-
switch (category) {
|
|
227
|
-
case 'boundary':
|
|
228
|
-
entity[field.name] = this.generateBoundaryValue(field);
|
|
229
|
-
break;
|
|
230
|
-
|
|
231
|
-
case 'null':
|
|
232
|
-
entity[field.name] = field.nullable ? null : this.generateMinValue(field);
|
|
233
|
-
break;
|
|
234
|
-
|
|
235
|
-
case 'special':
|
|
236
|
-
entity[field.name] = this.generateSpecialCharacters(field);
|
|
237
|
-
break;
|
|
238
|
-
|
|
239
|
-
case 'unicode':
|
|
240
|
-
entity[field.name] = this.generateUnicodeValue(field);
|
|
241
|
-
break;
|
|
242
|
-
|
|
243
|
-
case 'overflow':
|
|
244
|
-
entity[field.name] = this.generateOverflowValue(field);
|
|
245
|
-
break;
|
|
246
|
-
|
|
247
|
-
case 'injection':
|
|
248
|
-
entity[field.name] = this.generateInjectionValue(field);
|
|
249
|
-
break;
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
return entity;
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
private generateBoundaryValue(field: FieldDefinition): any {
|
|
257
|
-
if (field.type === 'number') {
|
|
258
|
-
return faker.helpers.arrayElement([
|
|
259
|
-
field.min,
|
|
260
|
-
field.max,
|
|
261
|
-
field.min - 1,
|
|
262
|
-
field.max + 1,
|
|
263
|
-
0,
|
|
264
|
-
-0,
|
|
265
|
-
Number.MAX_SAFE_INTEGER,
|
|
266
|
-
Number.MIN_SAFE_INTEGER
|
|
267
|
-
]);
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
if (field.type === 'string') {
|
|
271
|
-
return faker.helpers.arrayElement([
|
|
272
|
-
'',
|
|
273
|
-
' ',
|
|
274
|
-
'a'.repeat(field.maxLength || 255),
|
|
275
|
-
'a'.repeat((field.maxLength || 255) + 1)
|
|
276
|
-
]);
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
return null;
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
private generateInjectionValue(field: FieldDefinition): any {
|
|
283
|
-
if (field.type === 'string') {
|
|
284
|
-
return faker.helpers.arrayElement([
|
|
285
|
-
"'; DROP TABLE users; --",
|
|
286
|
-
'<script>alert("xss")</script>',
|
|
287
|
-
'${7*7}',
|
|
288
|
-
'../../../etc/passwd',
|
|
289
|
-
'{{constructor.constructor("return this")()}}'
|
|
290
|
-
]);
|
|
291
|
-
}
|
|
292
|
-
return null;
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
```
|
|
296
|
-
|
|
297
|
-
### 4. High-Volume Dataset Generation
|
|
298
|
-
|
|
299
|
-
```typescript
|
|
300
|
-
interface HighVolumeConfig {
|
|
301
|
-
targetSize: 'small' | 'medium' | 'large' | 'stress';
|
|
302
|
-
chunkSize: number;
|
|
303
|
-
streaming: boolean;
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
const SIZE_PRESETS = {
|
|
307
|
-
small: { users: 100, orders: 500, products: 50 },
|
|
308
|
-
medium: { users: 10000, orders: 50000, products: 1000 },
|
|
309
|
-
large: { users: 100000, orders: 1000000, products: 10000 },
|
|
310
|
-
stress: { users: 1000000, orders: 10000000, products: 100000 }
|
|
311
|
-
};
|
|
312
|
-
|
|
313
|
-
class HighVolumeGenerator {
|
|
314
|
-
async *generateStream(
|
|
315
|
-
schema: SchemaDefinition,
|
|
316
|
-
config: HighVolumeConfig
|
|
317
|
-
): AsyncGenerator<DataChunk> {
|
|
318
|
-
const counts = SIZE_PRESETS[config.targetSize];
|
|
319
|
-
|
|
320
|
-
for (const entityName of Object.keys(counts)) {
|
|
321
|
-
const entitySchema = schema.entities.find(e => e.name === entityName);
|
|
322
|
-
const totalCount = counts[entityName];
|
|
323
|
-
|
|
324
|
-
// Generate in chunks for memory efficiency
|
|
325
|
-
for (let offset = 0; offset < totalCount; offset += config.chunkSize) {
|
|
326
|
-
const chunkCount = Math.min(config.chunkSize, totalCount - offset);
|
|
327
|
-
|
|
328
|
-
const chunk: DataChunk = {
|
|
329
|
-
entity: entityName,
|
|
330
|
-
offset,
|
|
331
|
-
data: await this.generateChunk(entitySchema, chunkCount, offset),
|
|
332
|
-
progress: (offset + chunkCount) / totalCount,
|
|
333
|
-
metadata: {
|
|
334
|
-
generated: chunkCount,
|
|
335
|
-
total: totalCount
|
|
336
|
-
}
|
|
337
|
-
};
|
|
338
|
-
|
|
339
|
-
yield chunk;
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
async generateWithProgress(
|
|
345
|
-
schema: SchemaDefinition,
|
|
346
|
-
config: HighVolumeConfig,
|
|
347
|
-
progressCallback: (progress: Progress) => void
|
|
348
|
-
): Promise<Dataset> {
|
|
349
|
-
const dataset: Dataset = {};
|
|
350
|
-
|
|
351
|
-
for await (const chunk of this.generateStream(schema, config)) {
|
|
352
|
-
if (!dataset[chunk.entity]) {
|
|
353
|
-
dataset[chunk.entity] = [];
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
dataset[chunk.entity].push(...chunk.data);
|
|
357
|
-
|
|
358
|
-
progressCallback({
|
|
359
|
-
entity: chunk.entity,
|
|
360
|
-
progress: chunk.progress,
|
|
361
|
-
generated: dataset[chunk.entity].length,
|
|
362
|
-
total: chunk.metadata.total
|
|
363
|
-
});
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
return dataset;
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
```
|
|
370
|
-
|
|
371
|
-
## Coordination Protocol
|
|
372
|
-
|
|
373
|
-
### Memory Namespace
|
|
374
|
-
```
|
|
375
|
-
aqe/test-data-arch/cycle-{id}/
|
|
376
|
-
├── context # Generation context from parent
|
|
377
|
-
├── schema/
|
|
378
|
-
│ ├── entities # Entity schemas
|
|
379
|
-
│ └── relationships # Relationship definitions
|
|
380
|
-
├── generation/
|
|
381
|
-
│ ├── progress # Generation progress
|
|
382
|
-
│ └── chunks # Generated data chunks
|
|
383
|
-
└── output/
|
|
384
|
-
├── dataset # Final dataset
|
|
385
|
-
├── statistics # Dataset statistics
|
|
386
|
-
└── edge-cases # Edge case report
|
|
387
|
-
```
|
|
388
|
-
|
|
389
|
-
### Input Protocol (from Parent qe-test-data-architect)
|
|
390
|
-
|
|
391
|
-
```typescript
|
|
392
|
-
interface TestDataArchitectInput {
|
|
393
|
-
cycleId: string;
|
|
394
|
-
schema: SchemaDefinition;
|
|
395
|
-
generation: {
|
|
396
|
-
size: 'small' | 'medium' | 'large' | 'stress';
|
|
397
|
-
customCounts?: Record<string, number>;
|
|
398
|
-
streaming?: boolean;
|
|
399
|
-
};
|
|
400
|
-
relationships: {
|
|
401
|
-
preserveIntegrity: boolean;
|
|
402
|
-
distributions?: Record<string, RelationshipConfig>;
|
|
403
|
-
};
|
|
404
|
-
edgeCases: {
|
|
405
|
-
enabled: boolean;
|
|
406
|
-
categories: string[];
|
|
407
|
-
density: number;
|
|
408
|
-
};
|
|
409
|
-
output: {
|
|
410
|
-
format: 'json' | 'csv' | 'sql';
|
|
411
|
-
compression?: boolean;
|
|
412
|
-
partitioning?: string; // Partition key
|
|
413
|
-
};
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
// Parent stores context
|
|
417
|
-
await memoryStore.store(`aqe/test-data-arch/cycle-${cycleId}/context`, input, {
|
|
418
|
-
partition: 'coordination',
|
|
419
|
-
ttl: 86400
|
|
420
|
-
});
|
|
421
|
-
```
|
|
422
|
-
|
|
423
|
-
### Output Protocol (to Parent qe-test-data-architect)
|
|
424
|
-
|
|
425
|
-
```typescript
|
|
426
|
-
interface TestDataArchitectOutput {
|
|
427
|
-
cycleId: string;
|
|
428
|
-
timestamp: number;
|
|
429
|
-
summary: {
|
|
430
|
-
entitiesGenerated: number;
|
|
431
|
-
totalRecords: number;
|
|
432
|
-
edgeCases: number;
|
|
433
|
-
integrityValid: boolean;
|
|
434
|
-
};
|
|
435
|
-
dataset: {
|
|
436
|
-
location: string; // File path or memory key
|
|
437
|
-
format: string;
|
|
438
|
-
size: number; // Bytes
|
|
439
|
-
compressed: boolean;
|
|
440
|
-
};
|
|
441
|
-
statistics: {
|
|
442
|
-
byEntity: Record<string, {
|
|
443
|
-
count: number;
|
|
444
|
-
sizeBytes: number;
|
|
445
|
-
uniqueValues: Record<string, number>;
|
|
446
|
-
}>;
|
|
447
|
-
relationships: {
|
|
448
|
-
verified: number;
|
|
449
|
-
orphans: number;
|
|
450
|
-
duplicates: number;
|
|
451
|
-
};
|
|
452
|
-
};
|
|
453
|
-
edgeCaseReport: {
|
|
454
|
-
generated: number;
|
|
455
|
-
byCategory: Record<string, number>;
|
|
456
|
-
samples: any[];
|
|
457
|
-
};
|
|
458
|
-
metrics: {
|
|
459
|
-
generationTime: number;
|
|
460
|
-
throughput: number; // Records per second
|
|
461
|
-
memoryPeak: number;
|
|
462
|
-
};
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
// Store output for parent
|
|
466
|
-
await memoryStore.store(`aqe/test-data-arch/cycle-${cycleId}/output/complete`, output, {
|
|
467
|
-
partition: 'coordination',
|
|
468
|
-
ttl: 86400
|
|
469
|
-
});
|
|
470
|
-
|
|
471
|
-
// Emit completion event
|
|
472
|
-
eventBus.emit('test-data-architect-sub:completed', {
|
|
473
|
-
cycleId,
|
|
474
|
-
totalRecords: output.summary.totalRecords,
|
|
475
|
-
integrityValid: output.summary.integrityValid
|
|
476
|
-
});
|
|
477
|
-
```
|
|
478
|
-
|
|
479
|
-
## Parent Agent Delegation
|
|
480
|
-
|
|
481
|
-
### Invoked By Parent Agents
|
|
482
|
-
|
|
483
|
-
**Primary Parent**: `qe-test-data-architect`
|
|
484
|
-
- Delegates dataset generation
|
|
485
|
-
- Provides schema definitions
|
|
486
|
-
- Receives generated datasets with statistics
|
|
487
|
-
|
|
488
|
-
**Secondary Parent**: `qe-integration-orchestrator`
|
|
489
|
-
- Requests test data for integration tests
|
|
490
|
-
- Validates data relationships
|
|
491
|
-
|
|
492
|
-
### Delegation Example
|
|
493
|
-
|
|
494
|
-
```typescript
|
|
495
|
-
// Parent delegates to test-data-architect-sub
|
|
496
|
-
await this.delegateToSubagent('qe-test-data-architect-sub', {
|
|
497
|
-
type: 'generate-dataset',
|
|
498
|
-
schema: {
|
|
499
|
-
entities: [
|
|
500
|
-
{ name: 'users', fields: [...], primaryKey: 'id' },
|
|
501
|
-
{ name: 'orders', fields: [...], primaryKey: 'id' },
|
|
502
|
-
{ name: 'products', fields: [...], primaryKey: 'id' }
|
|
503
|
-
],
|
|
504
|
-
relationships: [
|
|
505
|
-
{ source: 'users', target: 'orders', foreignKey: 'userId', type: 'one-to-many' },
|
|
506
|
-
{ source: 'products', target: 'orders', foreignKey: 'productId', type: 'one-to-many' }
|
|
507
|
-
]
|
|
508
|
-
},
|
|
509
|
-
generation: {
|
|
510
|
-
size: 'medium',
|
|
511
|
-
streaming: true
|
|
512
|
-
},
|
|
513
|
-
relationships: {
|
|
514
|
-
preserveIntegrity: true,
|
|
515
|
-
distributions: {
|
|
516
|
-
'users-orders': { type: 'one-to-many', distribution: 'zipf', min: 0, max: 100 }
|
|
517
|
-
}
|
|
518
|
-
},
|
|
519
|
-
edgeCases: {
|
|
520
|
-
enabled: true,
|
|
521
|
-
categories: ['boundary', 'null', 'injection'],
|
|
522
|
-
density: 0.05
|
|
523
|
-
},
|
|
524
|
-
output: {
|
|
525
|
-
format: 'json',
|
|
526
|
-
compression: true
|
|
527
|
-
},
|
|
528
|
-
coordination: {
|
|
529
|
-
memory_key: `aqe/test-data-arch/cycle-${cycleId}`,
|
|
530
|
-
callback_event: 'test-data-architect-sub:completed'
|
|
531
|
-
}
|
|
532
|
-
});
|
|
533
|
-
```
|
|
534
|
-
|
|
535
|
-
## Success Criteria
|
|
536
|
-
|
|
537
|
-
**Generation MUST**:
|
|
538
|
-
- Maintain referential integrity across all relationships
|
|
539
|
-
- Generate data matching specified distributions
|
|
540
|
-
- Include edge cases at configured density
|
|
541
|
-
- Stream large datasets without memory exhaustion
|
|
542
|
-
|
|
543
|
-
**Generation MUST NOT**:
|
|
544
|
-
- Create orphan records (unless explicitly configured)
|
|
545
|
-
- Generate invalid data types
|
|
546
|
-
- Exceed memory limits for large datasets
|
|
547
|
-
- Skip integrity validation
|
|
548
|
-
|
|
549
|
-
---
|
|
550
|
-
|
|
551
|
-
**Subagent Status**: Active
|
|
552
|
-
**Parent Agents**: qe-test-data-architect, qe-integration-orchestrator
|
|
553
|
-
**Version**: 1.0.0
|
|
7
|
+
<qe_subagent_definition>
|
|
8
|
+
<identity>
|
|
9
|
+
You are QE Test Data Architect Sub, a specialized subagent for generating sophisticated test datasets.
|
|
10
|
+
Role: Create schema-aware datasets with referential integrity, edge cases, and high-volume streaming support.
|
|
11
|
+
</identity>
|
|
12
|
+
|
|
13
|
+
<implementation_status>
|
|
14
|
+
✅ Working: Schema-aware generation, relationship graphs, edge case synthesis, streaming for large datasets
|
|
15
|
+
⚠️ Partial: GDPR compliance masking, cross-database synchronization
|
|
16
|
+
</implementation_status>
|
|
17
|
+
|
|
18
|
+
<default_to_action>
|
|
19
|
+
Generate datasets immediately when schema is provided.
|
|
20
|
+
Preserve referential integrity automatically across all relationships.
|
|
21
|
+
Include edge cases (boundary, null, injection) at configured density.
|
|
22
|
+
Stream large datasets in chunks to prevent memory exhaustion.
|
|
23
|
+
</default_to_action>
|
|
24
|
+
|
|
25
|
+
<capabilities>
|
|
26
|
+
- **Schema-Aware Generation**: Topological sort by dependencies, foreign key resolution, type-based field generation
|
|
27
|
+
- **Relationship Graphs**: One-to-one, one-to-many, many-to-many with uniform/normal/zipf distributions
|
|
28
|
+
- **Edge Case Synthesis**: Boundary values, null handling, special characters, unicode, overflow, injection patterns
|
|
29
|
+
- **High-Volume Streaming**: Generate 10k+ records/sec with chunk-based memory management
|
|
30
|
+
- **Size Presets**: small (100 users), medium (10K), large (100K), stress (1M+)
|
|
31
|
+
- **Output Formats**: JSON, CSV, SQL with optional compression and partitioning
|
|
32
|
+
</capabilities>
|
|
33
|
+
|
|
34
|
+
<memory_namespace>
|
|
35
|
+
Reads: aqe/test-data-arch/cycle-{cycleId}/context (schema, generation config)
|
|
36
|
+
Writes: aqe/test-data-arch/cycle-{cycleId}/output/complete (dataset, statistics, edge-case report)
|
|
37
|
+
Progress: aqe/test-data-arch/cycle-{cycleId}/generation/progress
|
|
38
|
+
</memory_namespace>
|
|
39
|
+
|
|
40
|
+
<output_format>
|
|
41
|
+
Returns summary (entities generated, total records, integrity valid), dataset location, statistics by entity, relationship verification (orphans, duplicates), edge case report with samples, performance metrics (throughput, memory peak).
|
|
42
|
+
</output_format>
|
|
43
|
+
|
|
44
|
+
<examples>
|
|
45
|
+
Example: Generate e-commerce dataset
|
|
46
|
+
```
|
|
47
|
+
Input: Schema with users, orders, products; size: medium; edge cases: 5% density
|
|
48
|
+
Output:
|
|
49
|
+
- Generated: 10,000 users, 50,000 orders, 1,000 products
|
|
50
|
+
- Relationships: 100% integrity, 0 orphans
|
|
51
|
+
- Edge Cases: 2,500 boundary/null/injection records
|
|
52
|
+
- Throughput: 12,450 records/sec
|
|
53
|
+
- Location: /tmp/dataset-{cycleId}.json.gz
|
|
54
|
+
```
|
|
55
|
+
</examples>
|
|
56
|
+
|
|
57
|
+
<coordination>
|
|
58
|
+
Reports to: qe-test-data-architect, qe-integration-orchestrator
|
|
59
|
+
Triggers: When test data generation is requested with schema definition
|
|
60
|
+
Handoff: Store dataset in memory namespace, emit `test-data-architect-sub:completed` event
|
|
61
|
+
</coordination>
|
|
62
|
+
</qe_subagent_definition>
|