| name | scientific-debugging |
| description | Use when user requests scientific debugging, mentions being a scientist about debugging, or asks for rigorous hypothesis testing - enforces formal theory-experiment cycles with clear evidence requirements, no smoking guns or assumptions |
Scientific Debugging
Your professional reputation depends on using EXACT protocols without deviation. A scientist who skips methodology is not a scientist.
Your credibility requires: exact templates, systematic testing, no assumptions, no shortcuts.
When user responds to questions:
- RESEARCH_REQUEST ("research this", "check", "verify") → Dispatch research subagent
- UNKNOWN ("don't know", "not sure") → Dispatch research subagent
- CLARIFICATION (ends with ?) → Answer the clarification, then re-ask
- SKIP ("skip", "move on") → Proceed to next item
NOTE: This skill uses MANDATORY_TEMPLATE for question format. ARH processing applies AFTER user response received.
Take a deep breath. Your ABSOLUTE FIRST response when user requests scientific debugging MUST use this EXACT template.
This is NOT optional. This is NOT negotiable. This is NOT adaptable.
Repeat: You MUST use this exact template. No variations. No "improvements". No custom formats.
Theories
- [Theory 1 name and description]
- [Theory 2 name and description]
- [Theory 3 name and description]
Experiments
Theory 1: [name]
- Experiment 1a: [description]
- Proves theory if: [specific observable outcome]
- Disproves theory if: [specific observable outcome]
- Experiment 1b: [description]
- Proves theory if: [specific observable outcome]
- Disproves theory if: [specific observable outcome]
- Experiment 1c: [description]
- Proves theory if: [specific observable outcome]
- Disproves theory if: [specific observable outcome]
Theory 2: [name]
[3+ experiments with prove/disprove criteria]
Theory 3: [name]
[3+ experiments with prove/disprove criteria]
Execution Order
- Test Theory 1 (experiments 1a, 1b, 1c)
- If disproven, move to Theory 2
- If disproven, move to Theory 3
- If all disproven, generate 3 NEW theories and repeat
Then use AskUserQuestion to get approval:
```javascript
AskUserQuestion({
questions: [{
question: "Scientific debugging plan ready. May I proceed with testing these theories?",
header: "Proceed",
options: [
{ label: "Yes, test theories (Recommended)", description: "Begin systematic testing starting with Theory 1" },
{ label: "Adjust theories first", description: "I want to modify or add theories before testing" },
{ label: "Skip to specific theory", description: "I have a hunch about which theory is correct" }
],
multiSelect: false
}]
})
Step 1: Go read the template - this is what I MUST use Step 2: How many theories? (Exactly 3, no more, no less) Step 3: What am I forbidden from doing? (Ranking theories, gathering data first, using wrong format) Step 4: How must I end my response? (With "May I proceed with testing these theories?") Step 5: Check - am I about to use the EXACT template? If NO, start over.
Now write your response following this exact template.
Core Rules
Top 3 Forbidden Patterns
Reality: Theories come from symptom description only. This prevents confirmation bias.
Reality: All theories are equal until tested. Repeat: ALL THEORIES ARE EQUAL.
Reality: Use the EXACT template above. No variations. Repeat: NO VARIATIONS.
Your response:
Scientific Debugging Plan
Theories
- Connection pool exhaustion - Database connection pool has reached maximum capacity, causing new queries to wait indefinitely for available connections until timeout
- Query execution time exceeds timeout threshold - Specific queries take longer than configured timeout due to missing indexes, table locks, or inefficient query plans
- Network latency spikes between application and database - Network path experiencing intermittent packet loss or bandwidth saturation causing query round-trip time to exceed timeout
Experiments
Theory 1: Connection pool exhaustion
- Experiment 1a: Monitor active vs available connections in pool
- Proves theory if: Active connections at 100% of max pool size with queued requests during timeout events
- Disproves theory if: Available connections remain >20% during timeout periods
- Experiment 1b: Check application logs for connection wait/timeout errors
- Proves theory if: Logs show "connection pool exhausted" or "timeout acquiring connection" errors
- Disproves theory if: No connection acquisition errors in logs
- Experiment 1c: Temporarily increase pool size and measure timeout rate
- Proves theory if: Timeout rate decreases significantly (>50%) with larger pool
- Disproves theory if: Timeout rate unchanged despite pool size increase
Theory 2: Query execution time exceeds timeout threshold
[3+ experiments with prove/disprove criteria - same format as Theory 1]
Theory 3: Network latency spikes
[3+ experiments with prove/disprove criteria - same format as Theory 1]
Execution Order
- Test Theory 1 (experiments 1a, 1b, 1c)
- If disproven, move to Theory 2
- If disproven, move to Theory 3
- If all disproven, generate 3 NEW theories and repeat
[Then use AskUserQuestion with options: "Yes, test theories (Recommended)", "Adjust theories first", "Skip to specific theory"]
Theory Exhaustion
When all 3 theories disproven: Summarize data from experiments → Generate 3 NEW theories based on that data → Design experiments → Present new plan → Use AskUserQuestion to get approval before testing new theories.
Do NOT ask for more data. You already have it from experiments.
Systematic Execution
Test ONE theory at a time, fully → Run ALL experiments for that theory → Theory is only proven with CLEAR SCIENTIFIC EVIDENCE → Move to next theory only when current is disproven.
☐ Did I use "# Scientific Debugging Plan" as the heading? ☐ Did I create exactly 3 theories (count them: 1, 2, 3)? ☐ Did I avoid ANY ranking words ("likely", "probably", percentages)? ☐ Did I design 3+ experiments per theory with prove/disprove criteria? ☐ Did I end with "May I proceed with testing these theories?"
If you checked NO to ANY item above, DELETE your response and start over using the template.
Your professional credibility as a scientist depends on following protocol exactly.
Your first response MUST be:
Scientific Debugging Plan
With exactly 3 theories, full experiments, and "May I proceed with testing these theories?"
This is critical. This is non-negotiable. This is how scientific debugging works.
Science only. No assumptions. No shortcuts.