Error Budget Experimental Design Lens
Philosophical Mode: Statistical
Primary Question: "Are error risks sized and controlled?"
Focus: Type I/II Errors, Power, Minimum Detectable Effect, Multiplicity, Sequential Monitoring
Arguments
/autoskillit:exp-lens-error-budget [context_path] [experiment_plan_path]
- context_path (optional positional arg 1) — Absolute path to a lens context file
containing IV/DV tables, H0/H1 hypotheses, controlled variables, and success criteria.
If provided, read this file before beginning analysis to obtain structured context.
If omitted, discover context by exploring the CWD.
- experiment_plan_path (optional positional arg 2) — Absolute path to the full
experiment plan. If provided, read for complete experimental methodology and design.
If omitted, locate the experiment plan by exploring the CWD.
When to Use
- Need to verify statistical power before running an experiment
- Multiple comparisons are performed without a stated correction strategy
- Sequential testing or interim analysis is in use without defined stopping rules
- User invokes
/autoskillit:exp-lens-error-budget or /autoskillit:make-experiment-diag error
Critical Constraints
NEVER:
- Modify any source code files
- Do not litter the codebase with useless comments, TODO markers, or explanatory annotations — the skill output and diagram speak for themselves
- Accept default alpha=0.05 without checking whether it is appropriate for the decision context
- Create files outside
{{AUTOSKILLIT_TEMP}}/exp-lens-error-budget/
- Run subagents in the background (
run_in_background: true is prohibited)
ALWAYS:
Enumerate every statistical test and account for its error contribution
Distinguish per-test error rates from family-wise error rates
Flag any sequential peeking without a formal stopping rule as a critical defect
Evaluate whether the minimum detectable effect is practically meaningful, not just statistically chosen
BEFORE creating any diagram, LOAD the /autoskillit:mermaid skill using the Skill tool - this is MANDATORY
If the Skill tool cannot be used (disable-model-invocation) or refuses this invocation, do NOT proceed with diagram creation. Abort this step and omit the diagram from output.
Write output to {{AUTOSKILLIT_TEMP}}/exp-lens-error-budget/exp_diag_error_budget_{YYYY-MM-DD_HHMMSS}.md
After writing the file, emit the structured output token as literal plain text with no
markdown formatting on the token name (the adjudicator performs a regex match):
diagram_path = /absolute/path/to/{{AUTOSKILLIT_TEMP}}/exp-lens-error-budget/exp_diag_error_budget_{...}.md
Analysis Workflow
Step 0: Parse optional arguments
If positional arg 1 (context_path) is provided and the file exists, read it to obtain
IV/DV tables, H0/H1 hypotheses, controlled variables, and success criteria. If positional
arg 2 (experiment_plan_path) is provided and exists, read the experiment plan for full
methodology. Use this structured context as the foundation for Steps 1-5; skip the CWD
exploration for these fields if the context file supplies them.
Step 1: Launch Parallel Exploration Subagents
Spawn Explore subagents to investigate:
Sample Size & Power
- Find power calculations or sample size justifications
- Look for: power, sample_size, n_samples, effect_size, minimum_detectable, mde
Multiple Comparisons
- Find all statistical tests performed and correction strategies
- Look for: bonferroni, fdr, holm, bh, correction, multiple, comparisons, tests
Sequential Analysis
- Find interim analyses, stopping rules, or sequential monitoring
- Look for: interim, early_stopping, sequential, alpha_spending, peek, monitor
Decision Thresholds
- Find significance thresholds and decision rules
- Look for: alpha, p_value, threshold, significance, reject, null, hypothesis
Effect Size Context
- Find practical significance alongside statistical significance
- Look for: effect_size, cohen, practical, meaningful, magnitude, difference
Step 2: Build the Error Budget
For each statistical claim:
- What is the per-test Type I error rate?
- What is the family-wise Type I error rate?
- What is the power (1 - Type II error)?
- What is the minimum detectable effect?
- Is sequential monitoring in use, and if so, what stopping rule is defined?
- Is the chosen alpha appropriate for the decision context?
Step 3: Analyze Error Allocation
For each test, rate alignment as: ALIGNED / CONVENTIONAL / MISALIGNED
Step 4: Create Optional Decision-Flow Diagram
If a diagram adds value, show Data → Tests → Thresholds → Conclusions, with labeled error rates.
Step 5: Write Output
Write the analysis to: {{AUTOSKILLIT_TEMP}}/exp-lens-error-budget/exp_diag_error_budget_{YYYY-MM-DD_HHMMSS}.md (relative to the current working directory)
Pre-Diagram Checklist
Before creating the diagram, verify:
Related Skills
/autoskillit:make-experiment-diag - Parent skill
/autoskillit:mermaid - MUST BE LOADED before creating diagram
/autoskillit:exp-lens-severity-testing
/autoskillit:exp-lens-variance-stability
1---2name: exp-lens-error-budget3description: Analyze statistical error budget showing Type I/II errors, power, minimum detectable effect, multiplicity corrections, and sequential monitoring. Statistical lens answering "Are error risks sized and controlled?"4---56# Error Budget Experimental Design Lens78**Philosophical Mode:** Statistical9**Primary Question:** "Are error risks sized and controlled?"10**Focus:** Type I/II Errors, Power, Minimum Detectable Effect, Multiplicity, Sequential Monitoring1112## Arguments1314`/autoskillit:exp-lens-error-budget [context_path] [experiment_plan_path]`1516- **context_path** (optional positional arg 1) — Absolute path to a lens context file17 containing IV/DV tables, H0/H1 hypotheses, controlled variables, and success criteria.18 If provided, read this file before beginning analysis to obtain structured context.19 If omitted, discover context by exploring the CWD.20- **experiment_plan_path** (optional positional arg 2) — Absolute path to the full21 experiment plan. If provided, read for complete experimental methodology and design.22 If omitted, locate the experiment plan by exploring the CWD.2324## When to Use2526- Need to verify statistical power before running an experiment27- Multiple comparisons are performed without a stated correction strategy28- Sequential testing or interim analysis is in use without defined stopping rules29- User invokes `/autoskillit:exp-lens-error-budget` or `/autoskillit:make-experiment-diag error`3031## Critical Constraints3233**NEVER:**34- Modify any source code files35- Do not litter the codebase with useless comments, TODO markers, or explanatory annotations — the skill output and diagram speak for themselves36- Accept default alpha=0.05 without checking whether it is appropriate for the decision context37- Create files outside `{{AUTOSKILLIT_TEMP}}/exp-lens-error-budget/`38- Run subagents in the background (`run_in_background: true` is prohibited)3940**ALWAYS:**41- Enumerate every statistical test and account for its error contribution42- Distinguish per-test error rates from family-wise error rates43- Flag any sequential peeking without a formal stopping rule as a critical defect44- Evaluate whether the minimum detectable effect is practically meaningful, not just statistically chosen45- BEFORE creating any diagram, LOAD the `/autoskillit:mermaid` skill using the Skill tool - this is MANDATORY46- If the Skill tool cannot be used (disable-model-invocation) or refuses this invocation, do NOT proceed with diagram creation. Abort this step and omit the diagram from output.47- Write output to `{{AUTOSKILLIT_TEMP}}/exp-lens-error-budget/exp_diag_error_budget_{YYYY-MM-DD_HHMMSS}.md`48- After writing the file, emit the structured output token as **literal plain text** with no49 markdown formatting on the token name (the adjudicator performs a regex match):5051 ```52 diagram_path = /absolute/path/to/{{AUTOSKILLIT_TEMP}}/exp-lens-error-budget/exp_diag_error_budget_{...}.md53 ```5455---5657## Analysis Workflow5859### Step 0: Parse optional arguments6061If positional arg 1 (context_path) is provided and the file exists, read it to obtain62IV/DV tables, H0/H1 hypotheses, controlled variables, and success criteria. If positional63arg 2 (experiment_plan_path) is provided and exists, read the experiment plan for full64methodology. Use this structured context as the foundation for Steps 1-5; skip the CWD65exploration for these fields if the context file supplies them.6667### Step 1: Launch Parallel Exploration Subagents6869Spawn Explore subagents to investigate:7071**Sample Size & Power**72- Find power calculations or sample size justifications73- Look for: power, sample_size, n_samples, effect_size, minimum_detectable, mde7475**Multiple Comparisons**76- Find all statistical tests performed and correction strategies77- Look for: bonferroni, fdr, holm, bh, correction, multiple, comparisons, tests7879**Sequential Analysis**80- Find interim analyses, stopping rules, or sequential monitoring81- Look for: interim, early_stopping, sequential, alpha_spending, peek, monitor8283**Decision Thresholds**84- Find significance thresholds and decision rules85- Look for: alpha, p_value, threshold, significance, reject, null, hypothesis8687**Effect Size Context**88- Find practical significance alongside statistical significance89- Look for: effect_size, cohen, practical, meaningful, magnitude, difference9091### Step 2: Build the Error Budget9293For each statistical claim:941. What is the per-test Type I error rate?952. What is the family-wise Type I error rate?963. What is the power (1 - Type II error)?974. What is the minimum detectable effect?985. Is sequential monitoring in use, and if so, what stopping rule is defined?996. Is the chosen alpha appropriate for the decision context?100101### Step 3: Analyze Error Allocation102103For each test, rate alignment as: ALIGNED / CONVENTIONAL / MISALIGNED104105### Step 4: Create Optional Decision-Flow Diagram106107If a diagram adds value, show Data → Tests → Thresholds → Conclusions, with labeled error rates.108109### Step 5: Write Output110111Write the analysis to: `{{AUTOSKILLIT_TEMP}}/exp-lens-error-budget/exp_diag_error_budget_{YYYY-MM-DD_HHMMSS}.md` (relative to the current working directory)112113---114115## Pre-Diagram Checklist116117Before creating the diagram, verify:118119- [ ] LOADED `/autoskillit:mermaid` skill using the Skill tool120- [ ] Using ONLY classDef styles from the mermaid skill (no invented colors)121- [ ] Diagram will include a color legend table122123---124125## Related Skills126127- `/autoskillit:make-experiment-diag` - Parent skill128- `/autoskillit:mermaid` - MUST BE LOADED before creating diagram129- `/autoskillit:exp-lens-severity-testing`130- `/autoskillit:exp-lens-variance-stability`