Skip to content
Testing
Command

/aqe-chaos

Run chaos testing scenarios to validate system resilience and fault tolerance

From plugin
agentic-qe
534149 skills169 agents149 commands1 MCP
> /plugin marketplace add proffesor-for-testing/agentic-qe
> /plugin install agentic-qe-fleet@agentic-qe

Command definition

aqe-chaos.md
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 ruflo@3.76.0 memory retrieve --key "aqe/chaos/baseline"

# Retrieve system configuration
npx ruflo@3.76.0 memory retrieve --key "aqe/system/config"

# Retrieve previous chaos results
npx ruflo@3.76.0 memory retrieve --key "aqe/chaos/history"

Output Memory Keys

# Store chaos results
npx ruflo@3.76.0 memory store \
  --key "aqe/chaos/${chaos_id}" \
  --value '{"scenario": "latency", "duration": 60, "failures": 3}'

# Store failure modes
npx ruflo@3.76.0 memory store \
  --key "aqe/chaos/failure-modes" \
  --value '[{"type": "timeout", "count": 12, "severity": "medium"}]'

# Store recovery metrics
npx ruflo@3.76.0 memory store \
  --key "aqe/chaos/recovery" \
  --value '{"recoveryTime": 45, "dataLoss": false, "status": "healthy"}'

Hooks and Coordination

Pre-Task Hook

# One id per run; post-task below records the outcome against it
CHAOS_ID="aqe-chaos-$(date +%s)"
npx ruflo@3.76.0 hooks pre-task \
  --task-id "${CHAOS_ID}" \
  --description "Chaos test: ${scenario}"

During Chaos (monitoring)

npx ruflo@3.76.0 hooks notify \
  --message "Chaos active: ${scenario} - ${ELAPSED}s / ${DURATION}s"

Post-Task Hook

# Set TASK_SUCCEEDED to true or false from the actual result; results go to `memory store` above
npx ruflo@3.76.0 hooks post-task \
  --task-id "${CHAOS_ID:?run the pre-task block first, in the same shell}" \
  --success "${TASK_SUCCEEDED:?set to true or false}" \
  --agent "qe-chaos-engineer" \
  --task "Chaos test: ${scenario}"

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] ⚡ Inje
Read more
@proffesor-for-testing
Ships withagentic-qe

Quality engineering tools for your coding agent. Generate tests, investigate coverage gaps, analyze flaky behavior and coordinate quality checks across the software lifecycle. Keep the findings close to the code and use them to make a better quality decision.

534119 skills169 agents1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
534
Star history of proffesor-for-testing/agentic-qe on GitHub, a chart by star-history.com

Other commands on agentic-qe.

More commands from other plugins.

bkit

bkit

Command

bkit plugin help - Show all available bkit functions. Workaround for skills autocomplete issue. Use "/bkit" or just type "bkit…

bkit4d605
@popup-studio-ai@popup-studio-aiInstall Command
review

review

Command

Open the Canary session viewer and triage a recorded session.

canary4w500
@0xnyn@0xnynInstall Command