Chaos Engineering
Skill Profile
(Select at least one profile to enable specific modules)
Overview
Chaos Engineering is the discipline of experimenting on a system to build confidence in its capability to withstand turbulent conditions in production. By proactively injecting failures, you discover weaknesses before they cause outages.
Core Principle: "Break things on purpose to learn how to make them stronger."
Why This Matters
- Proactive Discovery: Find weaknesses before customers do
- Confidence Building: Verify that resilience patterns actually work
- Cultural Shift: Normalizes failure as expected, not exceptional
- Reduced MTTR: Practice recovery procedures under controlled conditions
- Better Architecture: Forces design for failure from the start
Core Concepts & Rules
1. Core Principles
- Follow established patterns and conventions
- Maintain consistency across codebase
- Document decisions and trade-offs
2. Implementation Guidelines
- Start with the simplest viable solution
- Iterate based on feedback and requirements
- Test thoroughly before deployment
Inputs / Outputs / Contracts
- Inputs:
- System architecture and component mapping
- Steady state metrics (baseline)
- Hypothesis to test
- Blast radius configuration
- Entry Conditions:
- System is in production with real traffic
- Monitoring and alerting are operational
- Rollback mechanisms are documented and tested
- Outputs:
- Experiment report with findings
- Updated monitoring dashboards
- Action items for system improvements
- Artifacts Required (Deliverables):
- Experiment documentation (hypothesis, results, findings)
- Metrics before/during/after experiment
- Screenshots/graphs of system behavior
- Acceptance Evidence:
- Test Report (screenshot/log)
- Benchmark Result (latency, error rate)
- Security Scan Report (if applicable)
- Success Criteria:
- Hypothesis validated or disproven with data
- System recovered to steady state within defined timeframe
- No customer impact exceeding blast radius
Skill Composition
- Depends on: Failure Modes Analysis (40-system-resilience/failure-modes)
- Compatible with: Postmortem Analysis, Monitoring & Observability
- Conflicts with: Production systems without monitoring/rollback capabilities
- Related Skills:
- 40-system-resilience/failure-modes - Understanding what to test
- 40-system-resilience/postmortem-analysis - Learning from experiments
- 40-system-resilience/retry-timeout-strategies - Testing retry behavior
- 14-monitoring-observability/metrics-collection - Measuring steady state
Quick Start / Implementation Example
- Review requirements and constraints
- Set up development environment
- Implement core functionality following patterns
- Write tests for critical paths
- Run tests and fix issues
- Document any deviations or decisions
# Example implementation following best practices
def example_function():
# Your implementation here
pass
Assumptions / Constraints / Non-goals
- Assumptions:
- Development environment is properly configured
- Required dependencies are available
- Team has basic understanding of domain
- Constraints:
- Must follow existing codebase conventions
- Time and resource limitations
- Compatibility requirements
- Non-goals:
- This skill does not cover edge cases outside scope
- Not a replacement for formal training
Compatibility & Prerequisites
- Supported Versions:
- Python 3.8+
- Node.js 16+
- Modern browsers (Chrome, Firefox, Safari, Edge)
- Required AI Tools:
- Code editor (VS Code recommended)
- Testing framework appropriate for language
- Version control (Git)
- Dependencies:
- Language-specific package manager
- Build tools
- Testing libraries
- Environment Setup:
.env.example keys: API_KEY, DATABASE_URL (no values)
Test Scenario Matrix (QA Strategy)
| Type |
Focus Area |
Required Scenarios / Mocks |
| Unit |
Core Logic |
Must cover primary logic and at least 3 edge/error cases. Target minimum 80% coverage |
| Integration |
DB / API |
All external API calls or database connections must be mocked during unit tests |
| E2E |
User Journey |
Critical user flows to test |
| Performance |
Latency / Load |
Benchmark requirements |
| Security |
Vuln / Auth |
SAST/DAST or dependency audit |
| Frontend |
UX / A11y |
Accessibility checklist (WCAG), Performance Budget (Lighthouse score) |
Technical Guardrails & Security Threat Model
1. Security & Privacy (Threat Model)
- Top Threats: Injection attacks, authentication bypass, data exposure
2. Performance & Resources
3. Architecture & Scalability
4. Observability & Reliability
Agent Directives & Error Recovery
(ข้อกำหนดสำหรับ AI Agent ในการคิดและแก้ปัญหาเมื่อเกิดข้อผิดพลาด)
- Thinking Process: Analyze root cause before fixing. Do not brute-force.
- Fallback Strategy: Stop after 3 failed test attempts. Output root cause and ask for human intervention/clarification.
- Self-Review: Check against Guardrails & Anti-patterns before finalizing.
- Output Constraints: Output ONLY the modified code block. Do not explain unless asked.
Definition of Done (DoD) Checklist
Anti-patterns / Pitfalls
- ⛔ Don't: Log PII, catch-all exception, N+1 queries
- ⚠️ Watch out for: Common symptoms and quick fixes
- 💡 Instead: Use proper error handling, pagination, and logging
Reference Links & Examples
- Internal documentation and examples
- Official documentation and best practices
- Community resources and discussions
Versioning & Changelog
- Version: 1.0.0
- Changelog:
- 2026-02-22: Initial version with complete template structure
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: chaos-engineering3description: Chaos Engineering is the discipline of experimenting on a system to Use when this capability is needed.4---56# Chaos Engineering78## Skill Profile9*(Select at least one profile to enable specific modules)*10- [ ] **DevOps**11- [x] **Backend**12- [ ] **Frontend**13- [ ] **AI-RAG**14- [ ] **Security Critical**1516## Overview17Chaos Engineering is the discipline of experimenting on a system to build confidence in its capability to withstand turbulent conditions in production. By proactively injecting failures, you discover weaknesses before they cause outages.1819**Core Principle**: "Break things on purpose to learn how to make them stronger."2021## Why This Matters22- **Proactive Discovery**: Find weaknesses before customers do23- **Confidence Building**: Verify that resilience patterns actually work24- **Cultural Shift**: Normalizes failure as expected, not exceptional25- **Reduced MTTR**: Practice recovery procedures under controlled conditions26- **Better Architecture**: Forces design for failure from the start2728---2930## Core Concepts & Rules3132### 1. Core Principles33- Follow established patterns and conventions34- Maintain consistency across codebase35- Document decisions and trade-offs3637### 2. Implementation Guidelines38- Start with the simplest viable solution39- Iterate based on feedback and requirements40- Test thoroughly before deployment414243## Inputs / Outputs / Contracts44* **Inputs**:45 - System architecture and component mapping46 - Steady state metrics (baseline)47 - Hypothesis to test48 - Blast radius configuration49* **Entry Conditions**:50 - System is in production with real traffic51 - Monitoring and alerting are operational52 - Rollback mechanisms are documented and tested53* **Outputs**:54 - Experiment report with findings55 - Updated monitoring dashboards56 - Action items for system improvements57* **Artifacts Required (Deliverables)**:58 - Experiment documentation (hypothesis, results, findings)59 - Metrics before/during/after experiment60 - Screenshots/graphs of system behavior61* **Acceptance Evidence**:62 - Test Report (screenshot/log)63 - Benchmark Result (latency, error rate)64 - Security Scan Report (if applicable)65* **Success Criteria**:66 - Hypothesis validated or disproven with data67 - System recovered to steady state within defined timeframe68 - No customer impact exceeding blast radius6970## Skill Composition71* **Depends on**: Failure Modes Analysis (40-system-resilience/failure-modes)72* **Compatible with**: Postmortem Analysis, Monitoring & Observability73* **Conflicts with**: Production systems without monitoring/rollback capabilities74* **Related Skills**: 75 - [40-system-resilience/failure-modes](40-system-resilience/failure-modes/SKILL.md) - Understanding what to test76 - [40-system-resilience/postmortem-analysis](40-system-resilience/postmortem-analysis/SKILL.md) - Learning from experiments77 - [40-system-resilience/retry-timeout-strategies](40-system-resilience/retry-timeout-strategies/SKILL.md) - Testing retry behavior78 - [14-monitoring-observability/metrics-collection](14-monitoring-observability/metrics-collection/SKILL.md) - Measuring steady state7980---8182## Quick Start / Implementation Example83841. Review requirements and constraints852. Set up development environment863. Implement core functionality following patterns874. Write tests for critical paths885. Run tests and fix issues896. Document any deviations or decisions9091```python92# Example implementation following best practices93def example_function():94 # Your implementation here95 pass96```979899## Assumptions / Constraints / Non-goals100101* **Assumptions**:102 - Development environment is properly configured103 - Required dependencies are available104 - Team has basic understanding of domain105* **Constraints**:106 - Must follow existing codebase conventions107 - Time and resource limitations108 - Compatibility requirements109* **Non-goals**:110 - This skill does not cover edge cases outside scope111 - Not a replacement for formal training112113114## Compatibility & Prerequisites115116* **Supported Versions**:117 - Python 3.8+118 - Node.js 16+119 - Modern browsers (Chrome, Firefox, Safari, Edge)120* **Required AI Tools**:121 - Code editor (VS Code recommended)122 - Testing framework appropriate for language123 - Version control (Git)124* **Dependencies**:125 - Language-specific package manager126 - Build tools127 - Testing libraries128* **Environment Setup**:129 - `.env.example` keys: `API_KEY`, `DATABASE_URL` (no values)130131132## Test Scenario Matrix (QA Strategy)133134| Type | Focus Area | Required Scenarios / Mocks |135| :--- | :--- | :--- |136| **Unit** | Core Logic | Must cover primary logic and at least 3 edge/error cases. Target minimum 80% coverage |137| **Integration** | DB / API | All external API calls or database connections must be mocked during unit tests |138| **E2E** | User Journey | Critical user flows to test |139| **Performance** | Latency / Load | Benchmark requirements |140| **Security** | Vuln / Auth | SAST/DAST or dependency audit |141| **Frontend** | UX / A11y | Accessibility checklist (WCAG), Performance Budget (Lighthouse score) |142143144## Technical Guardrails & Security Threat Model145146### 1. Security & Privacy (Threat Model)147* **Top Threats**: Injection attacks, authentication bypass, data exposure148- [ ] **Data Handling**: Sanitize all user inputs to prevent Injection attacks. Never log raw PII149- [ ] **Secrets Management**: No hardcoded API keys. Use Env Vars/Secrets Manager150- [ ] **Authorization**: Validate user permissions before state changes151152### 2. Performance & Resources153- [ ] **Execution Efficiency**: Consider time complexity for algorithms154- [ ] **Memory Management**: Use streams/pagination for large data155- [ ] **Resource Cleanup**: Close DB connections/file handlers in finally blocks156157### 3. Architecture & Scalability158- [ ] **Design Pattern**: Follow SOLID principles, use Dependency Injection159- [ ] **Modularity**: Decouple logic from UI/Frameworks160161### 4. Observability & Reliability162- [ ] **Logging Standards**: Structured JSON, include trace IDs `request_id`163- [ ] **Metrics**: Track `error_rate`, `latency`, `queue_depth`164- [ ] **Error Handling**: Standardized error codes, no bare except165- [ ] **Observability Artifacts**:166 - **Log Fields**: timestamp, level, message, request_id167 - **Metrics**: request_count, error_count, response_time168 - **Dashboards/Alerts**: High Error Rate > 5%169170171## Agent Directives & Error Recovery172*(ข้อกำหนดสำหรับ AI Agent ในการคิดและแก้ปัญหาเมื่อเกิดข้อผิดพลาด)*173174- **Thinking Process**: Analyze root cause before fixing. Do not brute-force.175- **Fallback Strategy**: Stop after 3 failed test attempts. Output root cause and ask for human intervention/clarification.176- **Self-Review**: Check against Guardrails & Anti-patterns before finalizing.177- **Output Constraints**: Output ONLY the modified code block. Do not explain unless asked.178179180## Definition of Done (DoD) Checklist181182- [ ] Tests passed + coverage met183- [ ] Lint/Typecheck passed184- [ ] Logging/Metrics/Trace implemented185- [ ] Security checks passed186- [ ] Documentation/Changelog updated187- [ ] Accessibility/Performance requirements met (if frontend)188189190## Anti-patterns / Pitfalls191192* ⛔ **Don't**: Log PII, catch-all exception, N+1 queries193* ⚠️ **Watch out for**: Common symptoms and quick fixes194* 💡 **Instead**: Use proper error handling, pagination, and logging195196197## Reference Links & Examples198199* Internal documentation and examples200* Official documentation and best practices201* Community resources and discussions202203204## Versioning & Changelog205206* **Version**: 1.0.0207* **Changelog**:208 - 2026-02-22: Initial version with complete template structure209210---211> Converted and distributed by [TomeVault](https://tomevault.io/claim/amnadtaowsoam) — claim your Tome and manage your conversions.212<!-- tomevault:4.0:skill_md:2026-04-13 -->