agentic-qe 1.9.1 → 1.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/.claude/helpers/checkpoint-manager.sh +251 -0
  2. package/.claude/helpers/github-safe.js +106 -0
  3. package/.claude/helpers/github-setup.sh +28 -0
  4. package/.claude/helpers/quick-start.sh +19 -0
  5. package/.claude/helpers/setup-mcp.sh +18 -0
  6. package/.claude/helpers/standard-checkpoint-hooks.sh +179 -0
  7. package/CHANGELOG.md +36 -0
  8. package/README.md +33 -1
  9. package/dist/core/memory/SwarmMemoryManager.d.ts.map +1 -1
  10. package/dist/core/memory/SwarmMemoryManager.js +45 -5
  11. package/dist/core/memory/SwarmMemoryManager.js.map +1 -1
  12. package/dist/mcp/handlers/memory/memory-store.d.ts +6 -2
  13. package/dist/mcp/handlers/memory/memory-store.d.ts.map +1 -1
  14. package/dist/mcp/handlers/memory/memory-store.js +26 -4
  15. package/dist/mcp/handlers/memory/memory-store.js.map +1 -1
  16. package/dist/mcp/server.d.ts.map +1 -1
  17. package/dist/mcp/server.js +2 -1
  18. package/dist/mcp/server.js.map +1 -1
  19. package/docs/README.md +839 -0
  20. package/docs/reference/agents.md +412 -0
  21. package/docs/reference/skills.md +796 -0
  22. package/docs/reference/usage.md +512 -0
  23. package/package.json +4 -1
  24. package/templates/agent-code-execution-template.md +619 -0
  25. package/templates/aqe.sh +20 -0
  26. package/.claude/commands/github/code-review-swarm.md +0 -514
  27. package/.claude/commands/github/github-modes.md +0 -147
  28. package/.claude/commands/github/issue-tracker.md +0 -292
  29. package/.claude/commands/github/multi-repo-swarm.md +0 -519
  30. package/.claude/commands/github/pr-manager.md +0 -170
  31. package/.claude/commands/github/project-board-sync.md +0 -471
  32. package/.claude/commands/github/release-manager.md +0 -338
  33. package/.claude/commands/github/release-swarm.md +0 -544
  34. package/.claude/commands/github/repo-architect.md +0 -367
  35. package/.claude/commands/github/swarm-issue.md +0 -482
  36. package/.claude/commands/github/swarm-pr.md +0 -285
  37. package/.claude/commands/github/sync-coordinator.md +0 -301
  38. package/.claude/commands/github/workflow-automation.md +0 -442
  39. package/.claude/commands/hooks/overview.md +0 -132
  40. package/.claude/commands/pair/commands.md +0 -546
  41. package/.claude/commands/pair/config.md +0 -510
  42. package/.claude/commands/pair/examples.md +0 -512
  43. package/.claude/commands/pair/modes.md +0 -348
  44. package/.claude/commands/pair/session.md +0 -407
  45. package/.claude/commands/pair/start.md +0 -209
  46. package/.claude/commands/sparc/orchestrator.md +0 -132
  47. package/.claude/commands/sparc/sparc-modes.md +0 -174
  48. package/.claude/commands/stream-chain/pipeline.md +0 -121
  49. package/.claude/commands/stream-chain/run.md +0 -70
  50. package/.claude/commands/swarm/analysis.md +0 -95
  51. package/.claude/commands/swarm/development.md +0 -96
  52. package/.claude/commands/swarm/examples.md +0 -168
  53. package/.claude/commands/swarm/maintenance.md +0 -102
  54. package/.claude/commands/swarm/optimization.md +0 -117
  55. package/.claude/commands/swarm/research.md +0 -136
  56. package/.claude/commands/swarm/testing.md +0 -131
  57. package/.claude/commands/truth/start.md +0 -143
  58. package/.claude/commands/verify/check.md +0 -50
  59. package/.claude/commands/verify/start.md +0 -128
@@ -0,0 +1,512 @@
1
+ # Agentic QE Fleet - Usage Guide
2
+
3
+ Complete guide for using the Agentic QE Fleet in your projects.
4
+
5
+ ## Quick Start
6
+
7
+ ### Installation
8
+
9
+ ```bash
10
+ npm install agentic-qe-cf --save-dev
11
+ ```
12
+
13
+ ### Initialization
14
+
15
+ ```bash
16
+ # Initialize AQE in your project
17
+ npx aqe init
18
+
19
+ # This creates:
20
+ # - .claude/agents/ (18 QE agents)
21
+ # - .claude/skills/ (37 QE skills)
22
+ # - .claude/commands/ (8 slash commands)
23
+ # - .agentic-qe/config/ (fleet configuration)
24
+ # - .agentic-qe/db/ (learning databases)
25
+ # - CLAUDE.md (project configuration)
26
+ ```
27
+
28
+ ---
29
+
30
+ ## Using Agents via Claude Code Task Tool
31
+
32
+ **Recommended Method:** Use Claude Code's Task tool for spawning agents.
33
+
34
+ ### Single Agent Execution
35
+
36
+ ```javascript
37
+ Task("Generate tests", "Create comprehensive test suite for UserService", "qe-test-generator")
38
+ ```
39
+
40
+ ### Parallel Agent Execution
41
+
42
+ ```javascript
43
+ // Execute multiple agents concurrently
44
+ Task("Test Generation", "Generate unit tests", "qe-test-generator")
45
+ Task("Coverage Analysis", "Analyze current coverage", "qe-coverage-analyzer")
46
+ Task("Security Scan", "Run security checks", "qe-security-scanner")
47
+ Task("Performance Test", "Load test critical paths", "qe-performance-tester")
48
+ ```
49
+
50
+ ### Agent Coordination Example
51
+
52
+ ```javascript
53
+ // Step 1: Test generator stores results
54
+ Task("Generate tests", "Create tests and store in memory at aqe/test-plan/generated", "qe-test-generator")
55
+
56
+ // Step 2: Test executor reads from memory
57
+ Task("Execute tests", "Read test plan from aqe/test-plan/generated and execute", "qe-test-executor")
58
+
59
+ // Step 3: Coverage analyzer processes results
60
+ Task("Analyze coverage", "Check coverage from aqe/coverage/results", "qe-coverage-analyzer")
61
+ ```
62
+
63
+ ---
64
+
65
+ ## Using MCP Tools
66
+
67
+ ### Check MCP Connection
68
+
69
+ ```bash
70
+ claude mcp list
71
+ # Should show: agentic-qe: npm run mcp:start - ✓ Connected
72
+ ```
73
+
74
+ ### Using MCP Tools in Claude Code
75
+
76
+ ```javascript
77
+ // Test generation
78
+ mcp__agentic_qe__test_generate({ type: "unit", framework: "jest" })
79
+
80
+ // Test execution
81
+ mcp__agentic_qe__test_execute({ parallel: true, coverage: true })
82
+
83
+ // Quality analysis
84
+ mcp__agentic_qe__quality_analyze({ scope: "full" })
85
+ ```
86
+
87
+ ---
88
+
89
+ ## Using CLI Commands
90
+
91
+ ### Quick Commands
92
+
93
+ ```bash
94
+ # Generate tests
95
+ aqe test <module-name>
96
+
97
+ # Analyze coverage
98
+ aqe coverage
99
+
100
+ # Run quality gate
101
+ aqe quality
102
+
103
+ # Check fleet status
104
+ aqe status
105
+ ```
106
+
107
+ ### Learning System Commands
108
+
109
+ ```bash
110
+ # Check learning status
111
+ aqe learn status --agent test-gen
112
+
113
+ # View learned patterns
114
+ aqe learn history --agent test-gen --limit 50
115
+
116
+ # Export learning data
117
+ aqe learn export --agent test-gen --output learning.json
118
+ ```
119
+
120
+ ### Pattern Management
121
+
122
+ ```bash
123
+ # List test patterns
124
+ aqe patterns list --framework jest
125
+
126
+ # Search patterns
127
+ aqe patterns search "api validation"
128
+
129
+ # Extract patterns from tests
130
+ aqe patterns extract ./tests --framework jest
131
+ ```
132
+
133
+ ### Improvement Loop
134
+
135
+ ```bash
136
+ # Start continuous improvement
137
+ aqe improve start
138
+
139
+ # Check improvement status
140
+ aqe improve status
141
+
142
+ # Run single improvement cycle
143
+ aqe improve cycle
144
+ ```
145
+
146
+ ---
147
+
148
+ ## Using Slash Commands
149
+
150
+ ### Available Commands
151
+
152
+ - `/aqe-execute` - Execute test suites with parallel orchestration
153
+ - `/aqe-generate` - Generate comprehensive test suites
154
+ - `/aqe-coverage` - Analyze test coverage
155
+ - `/aqe-quality` - Run quality gate validation
156
+ - `/aqe-optimize` - Optimize test suites using sublinear algorithms
157
+ - `/aqe-report` - Generate quality engineering reports
158
+ - `/aqe-analyze` - Analyze coverage gaps
159
+ - `/aqe-fleet-status` - Display fleet health and metrics
160
+
161
+ ### Example Usage
162
+
163
+ ```bash
164
+ # In Claude Code chat
165
+ /aqe-generate
166
+ /aqe-execute
167
+ /aqe-coverage
168
+ ```
169
+
170
+ ---
171
+
172
+ ## Using Skills
173
+
174
+ ### Via CLI
175
+
176
+ ```bash
177
+ # List all available skills
178
+ aqe skills list
179
+
180
+ # Search for specific skills
181
+ aqe skills search "testing"
182
+
183
+ # Show skill details
184
+ aqe skills show agentic-quality-engineering
185
+
186
+ # Show skill statistics
187
+ aqe skills stats
188
+ ```
189
+
190
+ ### Via Skill Tool in Claude Code
191
+
192
+ ```javascript
193
+ // Execute a skill
194
+ Skill("agentic-quality-engineering")
195
+ Skill("tdd-london-chicago")
196
+ Skill("api-testing-patterns")
197
+ ```
198
+
199
+ ---
200
+
201
+ ## Agent Coordination
202
+
203
+ All agents coordinate through **AQE hooks** (zero external dependencies, 100-500x faster than shell hooks).
204
+
205
+ ### Automatic Lifecycle Hooks
206
+
207
+ Agents extend `BaseAgent` and override lifecycle methods:
208
+
209
+ ```typescript
210
+ protected async onPreTask(data: { assignment: TaskAssignment }): Promise<void> {
211
+ // Load context before task execution
212
+ const context = await this.memoryStore.retrieve('aqe/context', {
213
+ partition: 'coordination'
214
+ });
215
+
216
+ this.logger.info('Pre-task hook complete');
217
+ }
218
+
219
+ protected async onPostTask(data: { assignment: TaskAssignment; result: any }): Promise<void> {
220
+ // Store results after task completion
221
+ await this.memoryStore.store('aqe/' + this.agentId.type + '/results', data.result, {
222
+ partition: 'agent_results',
223
+ ttl: 86400 // 24 hours
224
+ });
225
+
226
+ // Emit completion event
227
+ this.eventBus.emit('task:completed', {
228
+ agentId: this.agentId,
229
+ result: data.result
230
+ });
231
+
232
+ this.logger.info('Post-task hook complete');
233
+ }
234
+
235
+ protected async onTaskError(data: { assignment: TaskAssignment; error: Error }): Promise<void> {
236
+ // Handle task errors
237
+ await this.memoryStore.store('aqe/errors/' + data.assignment.id, {
238
+ error: data.error.message,
239
+ stack: data.error.stack,
240
+ timestamp: Date.now()
241
+ }, {
242
+ partition: 'errors',
243
+ ttl: 604800 // 7 days
244
+ });
245
+
246
+ this.logger.error('Task failed', { error: data.error });
247
+ }
248
+ ```
249
+
250
+ ### Performance Comparison
251
+
252
+ | Feature | AQE Hooks | External Hooks |
253
+ |---------|-----------|----------------|
254
+ | **Speed** | <1ms | 100-500ms |
255
+ | **Dependencies** | Zero | External package |
256
+ | **Type Safety** | Full TypeScript | Shell strings |
257
+ | **Integration** | Direct API | Shell commands |
258
+ | **Performance** | 100-500x faster | Baseline |
259
+
260
+ ---
261
+
262
+ ## Memory Namespace
263
+
264
+ Agents share state through the **`aqe/*` memory namespace**:
265
+
266
+ - `aqe/test-plan/*` - Test planning and requirements
267
+ - `aqe/coverage/*` - Coverage analysis and gaps
268
+ - `aqe/quality/*` - Quality metrics and gates
269
+ - `aqe/performance/*` - Performance test results
270
+ - `aqe/security/*` - Security scan findings
271
+ - `aqe/swarm/coordination` - Cross-agent coordination
272
+
273
+ ---
274
+
275
+ ## Fleet Configuration
276
+
277
+ Configuration is stored in `.agentic-qe/config/fleet.json`:
278
+
279
+ ```json
280
+ {
281
+ "topology": "hierarchical",
282
+ "maxAgents": 10,
283
+ "testingFocus": ["unit", "integration"],
284
+ "environments": ["development"],
285
+ "frameworks": ["jest"]
286
+ }
287
+ ```
288
+
289
+ ### Topology Options
290
+
291
+ - **hierarchical** - Queen-led coordination with specialized workers
292
+ - **mesh** - Peer-to-peer with distributed decision making
293
+ - **ring** - Circular coordination pattern
294
+ - **star** - Centralized hub-and-spoke
295
+
296
+ ---
297
+
298
+ ## Multi-Model Router
299
+
300
+ **Status:** Disabled by default (opt-in)
301
+
302
+ Provides **70-81% cost savings** by intelligently selecting AI models based on task complexity.
303
+
304
+ ### Enabling Routing
305
+
306
+ **Option 1: Via Configuration**
307
+ ```json
308
+ // .agentic-qe/config/routing.json
309
+ {
310
+ "multiModelRouter": {
311
+ "enabled": true
312
+ }
313
+ }
314
+ ```
315
+
316
+ **Option 2: Via Environment Variable**
317
+ ```bash
318
+ export AQE_ROUTING_ENABLED=true
319
+ ```
320
+
321
+ ### Model Selection Rules
322
+
323
+ | Task Complexity | Model | Est. Cost | Use Case |
324
+ |----------------|-------|-----------|----------|
325
+ | **Simple** | GPT-3.5 | $0.0004 | Unit tests, basic validation |
326
+ | **Moderate** | GPT-3.5 | $0.0008 | Integration tests, mocks |
327
+ | **Complex** | GPT-4 | $0.0048 | Property-based, edge cases |
328
+ | **Critical** | Claude Sonnet 4.5 | $0.0065 | Security, architecture review |
329
+
330
+ ### Monitoring Costs
331
+
332
+ ```bash
333
+ # View cost dashboard
334
+ aqe routing dashboard
335
+
336
+ # Export cost report
337
+ aqe routing report --format json
338
+
339
+ # Check savings
340
+ aqe routing stats
341
+ ```
342
+
343
+ ---
344
+
345
+ ## Streaming Progress
346
+
347
+ **Status:** Enabled by default
348
+
349
+ Real-time progress updates for long-running operations using AsyncGenerator pattern.
350
+
351
+ ### Example Usage
352
+
353
+ ```javascript
354
+ // Using streaming MCP tool
355
+ const handler = new TestExecuteStreamHandler();
356
+
357
+ for await (const event of handler.execute(params)) {
358
+ if (event.type === 'progress') {
359
+ console.log(`Progress: ${event.percent}% - ${event.message}`);
360
+ } else if (event.type === 'result') {
361
+ console.log('Completed:', event.data);
362
+ }
363
+ }
364
+ ```
365
+
366
+ ### Supported Operations
367
+
368
+ - ✅ Test execution (test-by-test progress)
369
+ - ✅ Coverage analysis (incremental gap detection)
370
+ - ⚠️ Test generation (coming soon)
371
+ - ⚠️ Security scanning (coming soon)
372
+
373
+ ---
374
+
375
+ ## Q-Learning Integration
376
+
377
+ All agents automatically learn from task execution through Q-learning.
378
+
379
+ ### Observability
380
+
381
+ ```bash
382
+ # Check learning status
383
+ aqe learn status --agent test-gen
384
+
385
+ # View learned patterns
386
+ aqe learn history --agent test-gen --limit 50
387
+
388
+ # Export learning data
389
+ aqe learn export --agent test-gen --output learning.json
390
+ ```
391
+
392
+ ### Pattern Management
393
+
394
+ ```bash
395
+ # List test patterns
396
+ aqe patterns list --framework jest
397
+
398
+ # Search patterns
399
+ aqe patterns search "api validation"
400
+
401
+ # Extract patterns from tests
402
+ aqe patterns extract ./tests --framework jest
403
+ ```
404
+
405
+ ### Improvement Loop
406
+
407
+ ```bash
408
+ # Start continuous improvement
409
+ aqe improve start
410
+
411
+ # Check improvement status
412
+ aqe improve status
413
+
414
+ # Run single improvement cycle
415
+ aqe improve cycle
416
+ ```
417
+
418
+ ---
419
+
420
+ ## Best Practices
421
+
422
+ 1. **Use Task Tool**: Claude Code's Task tool is the primary way to spawn agents
423
+ 2. **Batch Operations**: Always spawn multiple related agents in a single message
424
+ 3. **Memory Keys**: Use the `aqe/*` namespace for agent coordination
425
+ 4. **AQE Hooks**: Agents automatically use native AQE hooks for coordination (100-500x faster)
426
+ 5. **Parallel Execution**: Leverage concurrent agent execution for speed
427
+
428
+ ---
429
+
430
+ ## Troubleshooting
431
+
432
+ ### Check MCP Connection
433
+
434
+ ```bash
435
+ claude mcp list
436
+ # Should show: agentic-qe: npm run mcp:start - ✓ Connected
437
+ ```
438
+
439
+ ### View Agent Definitions
440
+
441
+ ```bash
442
+ ls -la .claude/agents/
443
+ # Should show 18 agent markdown files
444
+ ```
445
+
446
+ ### Check Fleet Status
447
+
448
+ ```bash
449
+ aqe status --verbose
450
+ ```
451
+
452
+ ### View Logs
453
+
454
+ ```bash
455
+ tail -f .agentic-qe/logs/fleet.log
456
+ ```
457
+
458
+ ### Verify Databases
459
+
460
+ ```bash
461
+ # Check database files exist
462
+ ls -la .agentic-qe/db/
463
+
464
+ # Query database
465
+ node -e "const db = require('better-sqlite3')('.agentic-qe/db/memory.db'); console.log('Tables:', db.prepare('SELECT name FROM sqlite_master WHERE type=\"table\"').all()); db.close();"
466
+ ```
467
+
468
+ ---
469
+
470
+ ## Common Workflows
471
+
472
+ ### Full Test Generation and Execution
473
+
474
+ ```javascript
475
+ // 1. Generate tests
476
+ Task("Generate tests", "Create comprehensive test suite for UserService", "qe-test-generator")
477
+
478
+ // 2. Execute tests
479
+ Task("Execute tests", "Run generated tests with coverage", "qe-test-executor")
480
+
481
+ // 3. Analyze coverage
482
+ Task("Analyze coverage", "Find coverage gaps", "qe-coverage-analyzer")
483
+
484
+ // 4. Run quality gate
485
+ Task("Quality check", "Validate against quality thresholds", "qe-quality-gate")
486
+ ```
487
+
488
+ ### Security and Performance Validation
489
+
490
+ ```javascript
491
+ // Run in parallel
492
+ Task("Security scan", "SAST/DAST security checks", "qe-security-scanner")
493
+ Task("Performance test", "Load test with 1000 users", "qe-performance-tester")
494
+ Task("API contract check", "Validate API contracts", "qe-api-contract-validator")
495
+ ```
496
+
497
+ ### Flaky Test Detection and Stabilization
498
+
499
+ ```javascript
500
+ Task("Hunt flaky tests", "Detect and stabilize flaky tests with ML", "qe-flaky-test-hunter")
501
+ ```
502
+
503
+ ---
504
+
505
+ **Related Documentation:**
506
+ - [Agent Reference](agents.md) - All 18 QE agents
507
+ - [Skills Reference](skills.md) - All 37 QE skills
508
+
509
+ **Related Policies:**
510
+ - [Release Verification Policy](../policies/release-verification.md)
511
+ - [Test Execution Policy](../policies/test-execution.md)
512
+ - [Git Operations Policy](../policies/git-operations.md)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentic-qe",
3
- "version": "1.9.1",
3
+ "version": "1.9.3",
4
4
  "description": "Agentic Quality Engineering Fleet System - AI-driven quality management platform with 38 QE skills, learning, pattern reuse, ML-based flaky detection, Multi-Model Router (70-81% cost savings), streaming progress updates, 102 MCP tools, and native TypeScript hooks",
5
5
  "main": "dist/cli/index.js",
6
6
  "types": "dist/cli/index.d.ts",
@@ -228,6 +228,9 @@
228
228
  ".claude/agents",
229
229
  ".claude/skills",
230
230
  ".claude/commands",
231
+ ".claude/helpers",
232
+ "templates",
233
+ "docs/reference",
231
234
  "config",
232
235
  "LICENSE",
233
236
  "README.md",