Cause and Effect Analysis
Apply Fishbone (Ishikawa) diagram analysis to systematically explore all potential causes of a problem across multiple categories.
Description
Systematically examine potential causes across six categories: People, Process, Technology, Environment, Methods, and Materials. Creates structured "fishbone" view identifying contributing factors.
Usage
/cause-and-effect [problem_description]
Variables
- PROBLEM: Issue to analyze (default: prompt for input)
- CATEGORIES: Categories to explore (default: all six)
Steps
- State the problem clearly (the "head" of the fish)
- For each category, brainstorm potential causes:
- People: Skills, training, communication, team dynamics
- Process: Workflows, procedures, standards, reviews
- Technology: Tools, infrastructure, dependencies, configuration
- Environment: Workspace, deployment targets, external factors
- Methods: Approaches, patterns, architectures, practices
- Materials: Data, dependencies, third-party services, resources
- For each potential cause, ask "why" to dig deeper
- Identify which causes are contributing vs. root causes
- Prioritize causes by impact and likelihood
- Propose solutions for highest-priority causes
Examples
Example 1: API Response Latency
Problem: API responses take 3+ seconds (target: <500ms)
PEOPLE
├─ Team unfamiliar with performance optimization
├─ No one owns performance monitoring
└─ Frontend team doesn't understand backend constraints
PROCESS
├─ No performance testing in CI/CD
├─ No SLA defined for response times
└─ Performance regression not caught in code review
TECHNOLOGY
├─ Database queries not optimized
│ └─ Why: No query analysis tools in place
├─ N+1 queries in ORM
│ └─ Why: Eager loading not configured
├─ No caching layer
│ └─ Why: Redis not in tech stack
└─ Synchronous external API calls
└─ Why: No async architecture in place
ENVIRONMENT
├─ Production uses smaller database instance than needed
├─ No CDN for static assets
└─ Single region deployment (high latency for distant users)
METHODS
├─ REST API design requires multiple round trips
├─ No pagination on large datasets
└─ Full object serialization instead of selective fields
MATERIALS
├─ Large JSON payloads (unnecessary data)
├─ Uncompressed responses
└─ Third-party API (payment gateway) is slow
└─ Why: Free tier with rate limiting
ROOT CAUSES:
- No performance requirements defined (Process)
- Missing performance monitoring tooling (Technology)
- Architecture doesn't support caching/async (Methods)
SOLUTIONS (Priority Order):
1. Add database indexes (quick win, high impact)
2. Implement Redis caching layer (medium effort, high impact)
3. Make external API calls async with webhooks (high effort, high impact)
4. Define and monitor performance SLAs (low effort, prevents regression)
Example 2: Flaky Test Suite
Problem: 15% of test runs fail, passing on retry
PEOPLE
├─ Test-writing skills vary across team
├─ New developers copy existing flaky patterns
└─ No one assigned to fix flaky tests
PROCESS
├─ Flaky tests marked as "known issue" and ignored
├─ No policy against merging with flaky tests
└─ Test failures don't block deployments
TECHNOLOGY
├─ Race conditions in async test setup
├─ Tests share global state
├─ Test database not isolated per test
├─ setTimeout used instead of proper waiting
└─ CI environment inconsistent (different CPU/memory)
ENVIRONMENT
├─ CI runner under heavy load
├─ Network timing varies (external API mocks flaky)
└─ Timezone differences between local and CI
METHODS
├─ Integration tests not properly isolated
├─ No retry logic for legitimate timing issues
└─ Tests depend on execution order
MATERIALS
├─ Test data fixtures overlap
├─ Shared test database polluted
└─ Mock data doesn't match production patterns
ROOT CAUSES:
- No test isolation strategy (Methods + Technology)
- Process accepts flaky tests (Process)
- Async timing not handled properly (Technology)
SOLUTIONS:
1. Implement per-test database isolation (high impact)
2. Replace setTimeout with proper async/await patterns (medium impact)
3. Add pre-commit hook blocking flaky test patterns (prevents new issues)
4. Enforce policy: flaky test = block merge (process change)
Example 3: Feature Takes 3 Months Instead of 3 Weeks
Problem: Simple CRUD feature took 12 weeks vs. 3 week estimate
PEOPLE
├─ Developer unfamiliar with codebase
├─ Key architect on vacation during critical phase
└─ Designer changed requirements mid-development
PROCESS
├─ Requirements not finalized before starting
├─ No code review for first 6 weeks (large diff)
├─ Multiple rounds of design revision
└─ QA started late (found issues in week 10)
TECHNOLOGY
├─ Codebase has high coupling (change ripple effects)
├─ No automated tests (manual testing slow)
├─ Legacy code required refactoring first
└─ Development environment setup took 2 weeks
ENVIRONMENT
├─ Staging environment broken for 3 weeks
├─ Production data needed for testing (compliance delay)
└─ Dependencies blocked by another team
METHODS
├─ No incremental delivery (big bang approach)
├─ Over-engineering (added future features "while we're at it")
└─ No design doc (discovered issues during implementation)
MATERIALS
├─ Third-party API changed during development
├─ Production data model different than staging
└─ Missing design assets (waited for designer)
ROOT CAUSES:
- No requirements lock-down before start (Process)
- Architecture prevents incremental changes (Technology)
- Big bang approach vs. iterative (Methods)
- Development environment not automated (Technology)
SOLUTIONS:
1. Require design doc + finalized requirements before starting (Process)
2. Implement feature flags for incremental delivery (Methods)
3. Automate dev environment setup (Technology)
4. Refactor high-coupling areas (Technology, long-term)
Notes
- Fishbone reveals systemic issues across domains
- Multiple causes often combine to create problems
- Don't stop at first cause in each category—dig deeper
- Some causes span multiple categories (mark them)
- Root causes usually in Process or Methods (not just Technology)
- Use with
/why command for deeper analysis of specific causes
- Prioritize solutions by: impact × feasibility ÷ effort
- Address root causes, not just symptoms
1---2name: cause-and-effect3description: Systematic Fishbone analysis exploring problem causes across six categories4argument-hint: Optional problem description to analyze5metadata:6 source: https://skillmd.com/skills/zuoguyoupan2023/cause-and-effect7---89# Cause and Effect Analysis1011Apply Fishbone (Ishikawa) diagram analysis to systematically explore all potential causes of a problem across multiple categories.1213## Description14Systematically examine potential causes across six categories: People, Process, Technology, Environment, Methods, and Materials. Creates structured "fishbone" view identifying contributing factors.1516## Usage17`/cause-and-effect [problem_description]`1819## Variables20- PROBLEM: Issue to analyze (default: prompt for input)21- CATEGORIES: Categories to explore (default: all six)2223## Steps241. State the problem clearly (the "head" of the fish)252. For each category, brainstorm potential causes:26 - **People**: Skills, training, communication, team dynamics27 - **Process**: Workflows, procedures, standards, reviews28 - **Technology**: Tools, infrastructure, dependencies, configuration29 - **Environment**: Workspace, deployment targets, external factors30 - **Methods**: Approaches, patterns, architectures, practices31 - **Materials**: Data, dependencies, third-party services, resources323. For each potential cause, ask "why" to dig deeper334. Identify which causes are contributing vs. root causes345. Prioritize causes by impact and likelihood356. Propose solutions for highest-priority causes3637## Examples3839### Example 1: API Response Latency4041```42Problem: API responses take 3+ seconds (target: <500ms)4344PEOPLE45├─ Team unfamiliar with performance optimization46├─ No one owns performance monitoring47└─ Frontend team doesn't understand backend constraints4849PROCESS50├─ No performance testing in CI/CD51├─ No SLA defined for response times52└─ Performance regression not caught in code review5354TECHNOLOGY55├─ Database queries not optimized56│ └─ Why: No query analysis tools in place57├─ N+1 queries in ORM58│ └─ Why: Eager loading not configured59├─ No caching layer60│ └─ Why: Redis not in tech stack61└─ Synchronous external API calls62 └─ Why: No async architecture in place6364ENVIRONMENT65├─ Production uses smaller database instance than needed66├─ No CDN for static assets67└─ Single region deployment (high latency for distant users)6869METHODS70├─ REST API design requires multiple round trips71├─ No pagination on large datasets72└─ Full object serialization instead of selective fields7374MATERIALS75├─ Large JSON payloads (unnecessary data)76├─ Uncompressed responses77└─ Third-party API (payment gateway) is slow78 └─ Why: Free tier with rate limiting7980ROOT CAUSES:81- No performance requirements defined (Process)82- Missing performance monitoring tooling (Technology)83- Architecture doesn't support caching/async (Methods)8485SOLUTIONS (Priority Order):861. Add database indexes (quick win, high impact)872. Implement Redis caching layer (medium effort, high impact)883. Make external API calls async with webhooks (high effort, high impact)894. Define and monitor performance SLAs (low effort, prevents regression)90```9192### Example 2: Flaky Test Suite9394```95Problem: 15% of test runs fail, passing on retry9697PEOPLE98├─ Test-writing skills vary across team99├─ New developers copy existing flaky patterns100└─ No one assigned to fix flaky tests101102PROCESS103├─ Flaky tests marked as "known issue" and ignored104├─ No policy against merging with flaky tests105└─ Test failures don't block deployments106107TECHNOLOGY108├─ Race conditions in async test setup109├─ Tests share global state110├─ Test database not isolated per test111├─ setTimeout used instead of proper waiting112└─ CI environment inconsistent (different CPU/memory)113114ENVIRONMENT115├─ CI runner under heavy load116├─ Network timing varies (external API mocks flaky)117└─ Timezone differences between local and CI118119METHODS120├─ Integration tests not properly isolated121├─ No retry logic for legitimate timing issues122└─ Tests depend on execution order123124MATERIALS125├─ Test data fixtures overlap126├─ Shared test database polluted127└─ Mock data doesn't match production patterns128129ROOT CAUSES:130- No test isolation strategy (Methods + Technology)131- Process accepts flaky tests (Process)132- Async timing not handled properly (Technology)133134SOLUTIONS:1351. Implement per-test database isolation (high impact)1362. Replace setTimeout with proper async/await patterns (medium impact)1373. Add pre-commit hook blocking flaky test patterns (prevents new issues)1384. Enforce policy: flaky test = block merge (process change)139```140141### Example 3: Feature Takes 3 Months Instead of 3 Weeks142143```144Problem: Simple CRUD feature took 12 weeks vs. 3 week estimate145146PEOPLE147├─ Developer unfamiliar with codebase148├─ Key architect on vacation during critical phase149└─ Designer changed requirements mid-development150151PROCESS152├─ Requirements not finalized before starting153├─ No code review for first 6 weeks (large diff)154├─ Multiple rounds of design revision155└─ QA started late (found issues in week 10)156157TECHNOLOGY158├─ Codebase has high coupling (change ripple effects)159├─ No automated tests (manual testing slow)160├─ Legacy code required refactoring first161└─ Development environment setup took 2 weeks162163ENVIRONMENT164├─ Staging environment broken for 3 weeks165├─ Production data needed for testing (compliance delay)166└─ Dependencies blocked by another team167168METHODS169├─ No incremental delivery (big bang approach)170├─ Over-engineering (added future features "while we're at it")171└─ No design doc (discovered issues during implementation)172173MATERIALS174├─ Third-party API changed during development175├─ Production data model different than staging176└─ Missing design assets (waited for designer)177178ROOT CAUSES:179- No requirements lock-down before start (Process)180- Architecture prevents incremental changes (Technology)181- Big bang approach vs. iterative (Methods)182- Development environment not automated (Technology)183184SOLUTIONS:1851. Require design doc + finalized requirements before starting (Process)1862. Implement feature flags for incremental delivery (Methods)1873. Automate dev environment setup (Technology)1884. Refactor high-coupling areas (Technology, long-term)189```190191## Notes192- Fishbone reveals systemic issues across domains193- Multiple causes often combine to create problems194- Don't stop at first cause in each category—dig deeper195- Some causes span multiple categories (mark them)196- Root causes usually in Process or Methods (not just Technology)197- Use with `/why` command for deeper analysis of specific causes198- Prioritize solutions by: impact × feasibility ÷ effort199- Address root causes, not just symptoms200