/aqe-chaos
Run chaos testing scenarios to validate system resilience and fault tolerance
> /plugin marketplace add proffesor-for-testing/agentic-qe > /plugin install agentic-qe-fleet@agentic-qe
How it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/aqe-chaos
Context preview
What this command does when you run it.
Run chaos testing scenarios to validate system resilience and fault tolerance
Command definition
aqe-chaos.mdname: aqe-chaos
description: Run chaos testing scenarios to validate system resilience and fault tolerance
AQE Chaos Testing
Run chaos testing scenarios to validate system resilience and fault tolerance.
Usage
aqe chaos <scenario> [options]
# or
/aqe-chaos <scenario> [options]
Options
| Option | Type | Default | Description | |--------|------|---------|-------------| | `scenario` | string | **required** | Chaos scenario: latency, failure, resource-exhaustion, network-partition | | `--duration` | number | `60` | Test duration in seconds | | `--intensity` | string | `medium` | Intensity: low, medium, high, extreme | | `--target` | string | `all` | Target services/components | | `--recovery-check` | boolean | `true` | Verify system recovery after chaos | | `--baseline` | path | - | Baseline metrics for comparison | | `--abort-on-critical` | boolean | `true` | Abort if critical failure detected |
Examples
Simulate Latency
aqe chaos latency --duration 60 --intensity medium
Injects network latency for 60 seconds at medium intensity.
Test Failure Scenarios
aqe chaos failure --target api-gateway --duration 120
Simulates API gateway failures for 2 minutes.
Resource Exhaustion
aqe chaos resource-exhaustion --intensity high --recovery-check
Tests system behavior under high resource pressure with recovery validation.
Network Partition
aqe chaos network-partition --duration 180 --target database
Simulates network partition between application and database for 3 minutes.
Combined Chaos
aqe chaos latency --intensity low --target api &
aqe chaos failure --intensity low --target database &
wait
Runs multiple chaos scenarios simultaneously.
Integration with Claude Code
Spawning Chaos Testing Agent
// Use Claude Code's Task tool to spawn the chaos testing agent
Task("Execute chaos testing scenario", `
Run comprehensive chaos testing:
- Scenario: Network latency + occasional failures
- Duration: 5 minutes
- Intensity: Medium
- Monitor: Response times, error rates, recovery time
Verify system resilience and document failure modes.
Store results in memory: aqe/chaos/{chaos-id}
`, "qe-test-executor")Chaos Engineering Workflow
// Systematic chaos testing with monitoring
[Single Message]:
Task("Run chaos scenario", "Inject latency and monitor system", "qe-test-executor")
Task("Monitor performance", "Track degradation and recovery", "qe-performance-tester")
Task("Validate security", "Ensure no security issues during chaos", "qe-security-scanner")
TodoWrite({ todos: [
{content: "Inject chaos conditions", status: "in_progress", activeForm: "Injecting chaos"},
{content: "Monitor system behavior", status: "in_progress", activeForm: "Monitoring behavior"},
{content: "Validate security posture", status: "in_progress", activeForm: "Validating security"},
{content: "Verify recovery", status: "pending", activeForm: "Verifying recovery"},
{content: "Generate chaos report", status: "pending", activeForm: "Generating report"}
]})Agent Coordination
Primary Agent
- **qe-test-executor**: Main agent with chaos testing module
Supporting Agents
- **qe-performance-tester**: Monitors performance impact
- **qe-security-scanner**: Checks for security vulnerabilities during chaos
Coordination Flow
1. Pre-Chaos Hook
├─> Establish baseline metrics
├─> Verify system health
├─> Configure chaos parameters
└─> Prepare recovery procedures
2. Chaos Injection
├─> Begin chaos scenario
├─> Monitor system continuously
├─> Track performance degradation
├─> Record failure modes
└─> Detect critical failures
3. Recovery Phase
├─> Stop chaos injection
├─> Verify system recovery
├─> Measure recovery time
├─> Validate system health
└─> Compare with baseline
4. Post-Chaos Hook
├─> Store chaos results
├─> Generate failure report
├─> Document lessons learned
├─> Train neural patterns
└─> Notify fleet of findings
Memory Operations
Input Memory Keys
# Retrieve baseline metrics
npx claude-flow@alpha memory retrieve --key "aqe/chaos/baseline"
# Retrieve system configuration
npx claude-flow@alpha memory retrieve --key "aqe/system/config"
# Retrieve previous chaos results
npx claude-flow@alpha memory retrieve --key "aqe/chaos/history"
Output Memory Keys
# Store chaos results
npx claude-flow@alpha memory store \
--key "aqe/chaos/${chaos_id}" \
--value '{"scenario": "latency", "duration": 60, "failures": 3}'
# Store failure modes
npx claude-flow@alpha memory store \
--key "aqe/chaos/failure-modes" \
--value '[{"type": "timeout", "count": 12, "severity": "medium"}]'
# Store recovery metrics
npx claude-flow@alpha memory store \
--key "aqe/chaos/recovery" \
--value '{"recoveryTime": 45, "dataLoss": false, "status": "healthy"}'Hooks and Coordination
Pre-Task Hook
npx claude-flow@alpha hooks pre-task \
--description "Chaos test: ${scenario}" \
--agent "qe-test-executor"During Chaos (monitoring)
npx claude-flow@alpha hooks notify \
--message "Chaos active: ${scenario} - ${ELAPSED}s / ${DURATION}s"Post-Task Hook
npx claude-flow@alpha hooks post-task \
--task-id "${CHAOS_ID}" \
--results "${CHAOS_RESULTS}"Expected Outputs
Latency Scenario Output
💥 Running chaos test: latency
Duration: 60s
Intensity: medium
Target: all services
[00:00] ✓ Baseline established
└─> Avg latency: 45ms, P95: 120ms, P99: 250ms
[00:10] ⚡ Injecting latency (150ms)
└─> Current latency: 195ms, P95: 270ms, P99: 420ms
[00:30] ⚡ Latency active (150ms)
└─> Current latency: 198ms, P95: 285ms, P99: 445ms
⚠️ 3 timeouts detected
[00:60] ✓ Chaos stopped, monitoring recovery
└─> Current latency: 52ms, PRead more
name: aqe-chaos description: Run chaos testing scenarios to validate system resilience and fault tolerance
AQE Chaos Testing
Run chaos testing scenarios to validate system resilience and fault tolerance.
Usage
aqe chaos <scenario> [options] # or /aqe-chaos <scenario> [options]
Options
| Option | Type | Default | Description | |--------|------|---------|-------------| | `scenario` | string | **required** | Chaos scenario: latency, failure, resource-exhaustion, network-partition | | `--duration` | number | `60` | Test duration in seconds | | `--intensity` | string | `medium` | Intensity: low, medium, high, extreme | | `--target` | string | `all` | Target services/components | | `--recovery-check` | boolean | `true` | Verify system recovery after chaos | | `--baseline` | path | - | Baseline metrics for comparison | | `--abort-on-critical` | boolean | `true` | Abort if critical failure detected |
Examples
Simulate Latency
aqe chaos latency --duration 60 --intensity medium
Injects network latency for 60 seconds at medium intensity.
Test Failure Scenarios
aqe chaos failure --target api-gateway --duration 120
Simulates API gateway failures for 2 minutes.
Resource Exhaustion
aqe chaos resource-exhaustion --intensity high --recovery-check
Tests system behavior under high resource pressure with recovery validation.
Network Partition
aqe chaos network-partition --duration 180 --target database
Simulates network partition between application and database for 3 minutes.
Combined Chaos
aqe chaos latency --intensity low --target api & aqe chaos failure --intensity low --target database & wait
Runs multiple chaos scenarios simultaneously.
Integration with Claude Code
Spawning Chaos Testing Agent
// Use Claude Code's Task tool to spawn the chaos testing agent
Task("Execute chaos testing scenario", `
Run comprehensive chaos testing:
- Scenario: Network latency + occasional failures
- Duration: 5 minutes
- Intensity: Medium
- Monitor: Response times, error rates, recovery time
Verify system resilience and document failure modes.
Store results in memory: aqe/chaos/{chaos-id}
`, "qe-test-executor")Chaos Engineering Workflow
// Systematic chaos testing with monitoring
[Single Message]:
Task("Run chaos scenario", "Inject latency and monitor system", "qe-test-executor")
Task("Monitor performance", "Track degradation and recovery", "qe-performance-tester")
Task("Validate security", "Ensure no security issues during chaos", "qe-security-scanner")
TodoWrite({ todos: [
{content: "Inject chaos conditions", status: "in_progress", activeForm: "Injecting chaos"},
{content: "Monitor system behavior", status: "in_progress", activeForm: "Monitoring behavior"},
{content: "Validate security posture", status: "in_progress", activeForm: "Validating security"},
{content: "Verify recovery", status: "pending", activeForm: "Verifying recovery"},
{content: "Generate chaos report", status: "pending", activeForm: "Generating report"}
]})Agent Coordination
Primary Agent
- **qe-test-executor**: Main agent with chaos testing module
Supporting Agents
- **qe-performance-tester**: Monitors performance impact
- **qe-security-scanner**: Checks for security vulnerabilities during chaos
Coordination Flow
1. Pre-Chaos Hook ├─> Establish baseline metrics ├─> Verify system health ├─> Configure chaos parameters └─> Prepare recovery procedures 2. Chaos Injection ├─> Begin chaos scenario ├─> Monitor system continuously ├─> Track performance degradation ├─> Record failure modes └─> Detect critical failures 3. Recovery Phase ├─> Stop chaos injection ├─> Verify system recovery ├─> Measure recovery time ├─> Validate system health └─> Compare with baseline 4. Post-Chaos Hook ├─> Store chaos results ├─> Generate failure report ├─> Document lessons learned ├─> Train neural patterns └─> Notify fleet of findings
Memory Operations
Input Memory Keys
# Retrieve baseline metrics npx claude-flow@alpha memory retrieve --key "aqe/chaos/baseline" # Retrieve system configuration npx claude-flow@alpha memory retrieve --key "aqe/system/config" # Retrieve previous chaos results npx claude-flow@alpha memory retrieve --key "aqe/chaos/history"
Output Memory Keys
# Store chaos results
npx claude-flow@alpha memory store \
--key "aqe/chaos/${chaos_id}" \
--value '{"scenario": "latency", "duration": 60, "failures": 3}'
# Store failure modes
npx claude-flow@alpha memory store \
--key "aqe/chaos/failure-modes" \
--value '[{"type": "timeout", "count": 12, "severity": "medium"}]'
# Store recovery metrics
npx claude-flow@alpha memory store \
--key "aqe/chaos/recovery" \
--value '{"recoveryTime": 45, "dataLoss": false, "status": "healthy"}'Hooks and Coordination
Pre-Task Hook
npx claude-flow@alpha hooks pre-task \
--description "Chaos test: ${scenario}" \
--agent "qe-test-executor"During Chaos (monitoring)
npx claude-flow@alpha hooks notify \
--message "Chaos active: ${scenario} - ${ELAPSED}s / ${DURATION}s"Post-Task Hook
npx claude-flow@alpha hooks post-task \
--task-id "${CHAOS_ID}" \
--results "${CHAOS_RESULTS}"Expected Outputs
Latency Scenario Output
💥 Running chaos test: latency
Duration: 60s
Intensity: medium
Target: all services
[00:00] ✓ Baseline established
└─> Avg latency: 45ms, P95: 120ms, P99: 250ms
[00:10] ⚡ Injecting latency (150ms)
└─> Current latency: 195ms, P95: 270ms, P99: 420ms
[00:30] ⚡ Latency active (150ms)
└─> Current latency: 198ms, P95: 285ms, P99: 445ms
⚠️ 3 timeouts detected
[00:60] ✓ Chaos stopped, monitoring recovery
└─> Current latency: 52ms, PAI-powered quality engineering agents that generate tests, find coverage gaps, detect flaky tests, and learn your codebase patterns — across 11 coding agent platforms.
Repo: proffesor-for-testing/agentic-qe
Other commands on agentic-qe.
- /agent-capabilities
Capability matrix for all agent types
Open command - /agent-coordination
Coordination patterns for multi-agent collaboration.
Open command - /agent-spawning
Guide to spawning agents with Claude Code's Task tool.
Open command - /agent-types
Complete guide to all 87 available agent types in Claude Flow V3
Open command - /health
Show agent health and metrics
Open command - /list
List all active agents
Open command

