qe-chaos-resilience
Injects controlled faults (network partition, latency, process kill, disk pressure) into distributed systems and validates recovery behavior. Use when testing circuit breakers, failover paths, retry logic, or building confidence in system resilience through chaos engineering.
What this skill does
# QE Chaos Resilience
## Purpose
Guide the use of v3's chaos engineering capabilities including controlled fault injection, load/stress testing, resilience validation, and disaster recovery testing.
## Activation
- When testing system resilience
- When performing chaos experiments
- When load/stress testing
- When validating disaster recovery
- When testing circuit breakers
## Quick Start
```bash
# Run chaos experiment
aqe chaos run --experiment network-latency --target api-service
# Load test
aqe chaos load --scenario peak-traffic --duration 30m
# Stress test to breaking point
aqe chaos stress --endpoint /api/users --max-users 10000
# Test circuit breaker
aqe chaos circuit-breaker --service payment-service
```
## Agent Workflow
```typescript
// Chaos experiment
Task("Run chaos experiment", `
Execute controlled chaos on api-service:
- Inject 500ms network latency
- Monitor service health metrics
- Verify circuit breaker activation
- Measure recovery time
- Document findings
`, "qe-chaos-engineer")
// Load testing
Task("Performance load test", `
Run load test simulating Black Friday traffic:
- Ramp up to 10,000 concurrent users
- Maintain load for 30 minutes
- Monitor response times and error rates
- Identify bottlenecks
- Compare against SLAs
`, "qe-load-tester")
```
## Chaos Experiments
### 1. Fault Injection
```typescript
await chaosEngineer.injectFault({
target: 'api-service',
fault: {
type: 'latency',
parameters: {
delay: '500ms',
jitter: '100ms',
percentage: 50
}
},
duration: '5m',
monitoring: {
metrics: ['response_time', 'error_rate', 'throughput'],
alerts: true
},
rollback: {
automatic: true,
trigger: 'error_rate > 10%'
}
});
```
### 2. Load Testing
```typescript
await loadTester.execute({
scenario: 'peak-traffic',
profile: {
rampUp: '5m',
steadyState: '30m',
rampDown: '5m'
},
users: {
initial: 100,
target: 5000,
pattern: 'linear'
},
assertions: {
p95_latency: '<500ms',
error_rate: '<1%',
throughput: '>1000rps'
}
});
```
### 3. Stress Testing
```typescript
await loadTester.stressTest({
endpoint: '/api/checkout',
strategy: 'step-increase',
steps: [100, 500, 1000, 2000, 5000],
stepDuration: '5m',
findBreakingPoint: true,
monitoring: {
resourceUtilization: true,
databaseConnections: true,
memoryUsage: true
}
});
```
### 4. Resilience Validation
```typescript
await resilienceTester.validate({
scenarios: [
'database-failover',
'cache-failure',
'external-service-timeout',
'pod-termination'
],
expectations: {
gracefulDegradation: true,
automaticRecovery: true,
dataIntegrity: true,
recoveryTime: '<30s'
}
});
```
## Fault Types
| Fault | Description | Use Case |
|-------|-------------|----------|
| Latency | Add network delay | Test timeouts |
| Packet Loss | Drop network packets | Test retry logic |
| CPU Stress | Consume CPU | Test resource limits |
| Memory Pressure | Consume memory | Test OOM handling |
| Disk Full | Fill disk space | Test disk errors |
| Process Kill | Terminate process | Test recovery |
## Chaos Report
```typescript
interface ChaosReport {
experiment: {
name: string;
target: string;
fault: FaultConfig;
duration: number;
};
results: {
hypothesis: string;
validated: boolean;
metrics: {
before: MetricSnapshot;
during: MetricSnapshot;
after: MetricSnapshot;
};
events: ChaosEvent[];
recovery: {
detected: boolean;
time: number;
automatic: boolean;
};
};
findings: {
severity: 'critical' | 'high' | 'medium' | 'low';
description: string;
recommendation: string;
}[];
artifacts: {
logs: string;
metrics: string;
traces: string;
};
}
```
## Safety Controls
```yaml
safety:
blast_radius:
max_affected_pods: 1
max_affected_percentage: 10
abort_conditions:
- error_rate > 50%
- p99_latency > 10s
- service_unavailable
excluded_environments:
- production-critical
required_approvals:
production: 2
staging: 0
```
## SLA Validation
```typescript
await resilienceTester.validateSLA({
slas: {
availability: 99.9,
p95_latency: 500,
error_rate: 0.1
},
period: '30d',
report: {
breaches: true,
trends: true,
projections: true
}
});
```
## Coordination
**Primary Agents**: qe-chaos-engineer, qe-load-tester, qe-resilience-tester
**Coordinator**: qe-chaos-coordinator
**Related Skills**: qe-performance, security-testing
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.