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 categories4---5
6# Cause and Effect Analysis
7
8Apply Fishbone (Ishikawa) diagram analysis to systematically explore all potential causes of a problem across multiple categories.
9
10## Description
11Systematically examine potential causes across six categories: People, Process, Technology, Environment, Methods, and Materials. Creates structured "fishbone" view identifying contributing factors.
12
13## Usage
14`/cause-and-effect [problem_description]`
15
16## Variables
17- PROBLEM: Issue to analyze (default: prompt for input)
18- CATEGORIES: Categories to explore (default: all six)
19
20## Steps
211. State the problem clearly (the "head" of the fish)
222. For each category, brainstorm potential causes:
23 - **People**: Skills, training, communication, team dynamics
24 - **Process**: Workflows, procedures, standards, reviews
25 - **Technology**: Tools, infrastructure, dependencies, configuration
26 - **Environment**: Workspace, deployment targets, external factors
27 - **Methods**: Approaches, patterns, architectures, practices
28 - **Materials**: Data, dependencies, third-party services, resources
293. For each potential cause, ask "why" to dig deeper
304. Identify which causes are contributing vs. root causes
315. Prioritize causes by impact and likelihood
326. Propose solutions for highest-priority causes
33
34## Examples
35
36### Example 1: API Response Latency
37
38```
39Problem: API responses take 3+ seconds (target: <500ms)
40
41PEOPLE
42├─ Team unfamiliar with performance optimization
43├─ No one owns performance monitoring
44└─ Frontend team doesn't understand backend constraints
45
46PROCESS
47├─ No performance testing in CI/CD
48├─ No SLA defined for response times
49└─ Performance regression not caught in code review
50
51TECHNOLOGY
52├─ Database queries not optimized
53│ └─ Why: No query analysis tools in place
54├─ N+1 queries in ORM
55│ └─ Why: Eager loading not configured
56├─ No caching layer
57│ └─ Why: Redis not in tech stack
58└─ Synchronous external API calls
59 └─ Why: No async architecture in place
60
61ENVIRONMENT
62├─ Production uses smaller database instance than needed
63├─ No CDN for static assets
64└─ Single region deployment (high latency for distant users)
65
66METHODS
67├─ REST API design requires multiple round trips
68├─ No pagination on large datasets
69└─ Full object serialization instead of selective fields
70
71MATERIALS
72├─ Large JSON payloads (unnecessary data)
73├─ Uncompressed responses
74└─ Third-party API (payment gateway) is slow
75 └─ Why: Free tier with rate limiting
76
77ROOT CAUSES:
78- No performance requirements defined (Process)
79- Missing performance monitoring tooling (Technology)
80- Architecture doesn't support caching/async (Methods)
81
82SOLUTIONS (Priority Order):
831. Add database indexes (quick win, high impact)
842. Implement Redis caching layer (medium effort, high impact)
853. Make external API calls async with webhooks (high effort, high impact)
864. Define and monitor performance SLAs (low effort, prevents regression)
87```
88
89### Example 2: Flaky Test Suite
90
91```
92Problem: 15% of test runs fail, passing on retry
93
94PEOPLE
95├─ Test-writing skills vary across team
96├─ New developers copy existing flaky patterns
97└─ No one assigned to fix flaky tests
98
99PROCESS
100├─ Flaky tests marked as "known issue" and ignored
101├─ No policy against merging with flaky tests
102└─ Test failures don't block deployments
103
104TECHNOLOGY
105├─ Race conditions in async test setup
106├─ Tests share global state
107├─ Test database not isolated per test
108├─ setTimeout used instead of proper waiting
109└─ CI environment inconsistent (different CPU/memory)
110
111ENVIRONMENT
112├─ CI runner under heavy load
113├─ Network timing varies (external API mocks flaky)
114└─ Timezone differences between local and CI
115
116METHODS
117├─ Integration tests not properly isolated
118├─ No retry logic for legitimate timing issues
119└─ Tests depend on execution order
120
121MATERIALS
122├─ Test data fixtures overlap
123├─ Shared test database polluted
124└─ Mock data doesn't match production patterns
125
126ROOT CAUSES:
127- No test isolation strategy (Methods + Technology)
128- Process accepts flaky tests (Process)
129- Async timing not handled properly (Technology)
130
131SOLUTIONS:
1321. Implement per-test database isolation (high impact)
1332. Replace setTimeout with proper async/await patterns (medium impact)
1343. Add pre-commit hook blocking flaky test patterns (prevents new issues)
1354. Enforce policy: flaky test = block merge (process change)
136```
137
138### Example 3: Feature Takes 3 Months Instead of 3 Weeks
139
140```
141Problem: Simple CRUD feature took 12 weeks vs. 3 week estimate
142
143PEOPLE
144├─ Developer unfamiliar with codebase
145├─ Key architect on vacation during critical phase
146└─ Designer changed requirements mid-development
147
148PROCESS
149├─ Requirements not finalized before starting
150├─ No code review for first 6 weeks (large diff)
151├─ Multiple rounds of design revision
152└─ QA started late (found issues in week 10)
153
154TECHNOLOGY
155├─ Codebase has high coupling (change ripple effects)
156├─ No automated tests (manual testing slow)
157├─ Legacy code required refactoring first
158└─ Development environment setup took 2 weeks
159
160ENVIRONMENT
161├─ Staging environment broken for 3 weeks
162├─ Production data needed for testing (compliance delay)
163└─ Dependencies blocked by another team
164
165METHODS
166├─ No incremental delivery (big bang approach)
167├─ Over-engineering (added future features "while we're at it")
168└─ No design doc (discovered issues during implementation)
169
170MATERIALS
171├─ Third-party API changed during development
172├─ Production data model different than staging
173└─ Missing design assets (waited for designer)
174
175ROOT CAUSES:
176- No requirements lock-down before start (Process)
177- Architecture prevents incremental changes (Technology)
178- Big bang approach vs. iterative (Methods)
179- Development environment not automated (Technology)
180
181SOLUTIONS:
1821. Require design doc + finalized requirements before starting (Process)
1832. Implement feature flags for incremental delivery (Methods)
1843. Automate dev environment setup (Technology)
1854. Refactor high-coupling areas (Technology, long-term)
186```
187
188## Notes
189- Fishbone reveals systemic issues across domains
190- Multiple causes often combine to create problems
191- Don't stop at first cause in each category—dig deeper
192- Some causes span multiple categories (mark them)
193- Root causes usually in Process or Methods (not just Technology)
194- Use with `/why` command for deeper analysis of specific causes
195- Prioritize solutions by: impact × feasibility ÷ effort
196- Address root causes, not just symptoms
197