Validity Threats Experimental Design Lens
Philosophical Mode: Adversarial
Primary Question: "What alternative explanations survive?"
Focus: History Effects, Instrumentation Changes, Selection Effects, Co-interventions, Treatment Diffusion
When to Use
- Quasi-experimental designs without full randomization
- System experiments with environmental changes
- Longitudinal comparisons
- User invokes
/exp-lens-validity-threats or /make-experiment-diag validity
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
ALWAYS:
- Apply Campbell & Stanley's full threat taxonomy — do not skip threats just because they seem unlikely
- For every observed difference, enumerate at least 3 alternative explanations
- Assess mitigation strength honestly — "partially mitigated" is better than false confidence
- Distinguish threats that are ruled out by design from those that remain plausible
- BEFORE creating any diagram, LOAD the
/mermaid skill using the Skill tool - this is MANDATORY
Analysis Workflow
Step 1: Launch Parallel Exploration Subagents
Spawn Explore subagents to investigate:
Temporal Changes (History)
- Find whether the environment changed between conditions
- Look for: version, update, release, change, drift, before, after, time, date
Instrumentation Changes
- Find whether measurement tools or methods changed
- Look for: log, metric, instrument, measurement, format, schema, API, breaking
Selection & Filtering
- Find whether groups are compared after differential filtering
- Look for: filter, exclude, select, subsample, eligible, criteria, dropout, attrition
Co-interventions
- Find whether multiple changes occurred simultaneously
- Look for: also, simultaneously, together, combined, alongside, additionally, migration
Treatment Diffusion
- Find whether control units could access treatment
- Look for: access, share, copy, learn, adopt, contaminate, crossover, spillover
Step 2: Apply Threat Taxonomy
Apply Campbell & Stanley's threat taxonomy to the specific experiment. For each threat category:
- Is it plausible in this context?
- What design feature mitigates it?
- How strong is the mitigation?
Build the threat matrix.
Step 3: Analyze Alternative Explanations
CRITICAL — Analyze Alternative Explanations:
For every observed difference between conditions:
- List at least 3 alternative explanations besides the intended causal claim
- For each: What evidence rules it out? What evidence remains consistent with it?
Step 4: Create the Diagram
Use the mermaid skill conventions to create a threat-flow diagram with:
Direction: TB (threats flow from sources through mitigations to residual risk)
Subgraphs:
- THREAT SOURCES
- DESIGN MITIGATIONS
- RESIDUAL THREATS
Node Styling:
gap class: Active unmitigated threats
detector class: Design mitigations
stateNode class: Threat sources
handler class: Partially mitigated threats
output class: Successfully mitigated threats
Step 5: Write Output
Write the diagram to: temp/exp-lens-validity-threats/exp_diag_validity_threats_{YYYY-MM-DD_HHMMSS}.md
Output Template
# Validity Threat Analysis: {Experiment Name}
**Lens:** Validity Threats (Adversarial)
**Question:** What alternative explanations survive?
**Date:** {YYYY-MM-DD}
**Scope:** {What was analyzed}
## Threat Matrix
| Threat | Category | Plausibility | Mitigation | Residual Risk |
|--------|----------|-------------|------------|---------------|
| {threat} | {Campbell-Stanley category} | {Low/Medium/High} | {design feature} | {Low/Medium/High} |
## Alternative Explanations
| Observed Difference | Alternative Explanation | Ruling-Out Evidence | Consistent Evidence |
|--------------------|------------------------|---------------------|---------------------|
| {difference} | {explanation} | {evidence} | {evidence} |
## Threat-Flow Diagram
```mermaid
%%{init: {'flowchart': {'nodeSpacing': 50, 'rankSpacing': 60, 'curve': 'basis'}}}%%
graph TB
%% CLASS DEFINITIONS %%
classDef cli fill:#1a237e,stroke:#7986cb,stroke-width:2px,color:#fff;
classDef stateNode fill:#004d40,stroke:#4db6ac,stroke-width:2px,color:#fff;
classDef handler fill:#e65100,stroke:#ffb74d,stroke-width:2px,color:#fff;
classDef phase fill:#6a1b9a,stroke:#ba68c8,stroke-width:2px,color:#fff;
classDef newComponent fill:#2e7d32,stroke:#81c784,stroke-width:2px,color:#fff;
classDef output fill:#00695c,stroke:#4db6ac,stroke-width:2px,color:#fff;
classDef detector fill:#b71c1c,stroke:#ef5350,stroke-width:2px,color:#fff;
classDef gap fill:#ff6f00,stroke:#ffa726,stroke-width:2px,color:#000;
classDef integration fill:#c62828,stroke:#ef9a9a,stroke-width:2px,color:#fff;
subgraph Sources ["THREAT SOURCES"]
direction TB
HIST["History Effect<br/>━━━━━━━━━━<br/>Environmental change<br/>between conditions"]
INST["Instrumentation<br/>━━━━━━━━━━<br/>Measurement tool<br/>change"]
SEL["Selection Effect<br/>━━━━━━━━━━<br/>Differential filtering<br/>of units"]
end
subgraph Mitigations ["DESIGN MITIGATIONS"]
direction TB
RAND["Randomization<br/>━━━━━━━━━━<br/>Controls selection<br/>and history"]
CTRL["Control Group<br/>━━━━━━━━━━<br/>Absorbs environmental<br/>changes"]
end
subgraph Residual ["RESIDUAL THREATS"]
direction TB
DIFF["Treatment Diffusion<br/>━━━━━━━━━━<br/>Control access<br/>to treatment"]
COINT["Co-interventions<br/>━━━━━━━━━━<br/>Simultaneous<br/>changes"]
end
HIST --> CTRL
INST --> CTRL
SEL --> RAND
RAND --> CTRL
CTRL --> DIFF
CTRL --> COINT
%% CLASS ASSIGNMENTS %%
class HIST,INST,SEL stateNode;
class RAND,CTRL detector;
class DIFF,COINT gap;
Campbell-Stanley Checklist
| Threat |
Applicable? |
Assessment |
| History |
{Yes/No/Partial} |
{assessment} |
| Maturation |
{Yes/No/Partial} |
{assessment} |
| Testing |
{Yes/No/Partial} |
{assessment} |
| Instrumentation |
{Yes/No/Partial} |
{assessment} |
| Statistical Regression |
{Yes/No/Partial} |
{assessment} |
| Selection |
{Yes/No/Partial} |
{assessment} |
| Experimental Mortality |
{Yes/No/Partial} |
{assessment} |
| Selection-Maturation Interaction |
{Yes/No/Partial} |
{assessment} |
| Diffusion of Treatments |
{Yes/No/Partial} |
{assessment} |
| Co-interventions |
{Yes/No/Partial} |
{assessment} |
Key Findings
- {Description of most critical surviving alternative explanations}
---
## Pre-Diagram Checklist
Before creating the diagram, verify:
- [ ] LOADED `/mermaid` skill using the Skill tool
- [ ] Using ONLY classDef styles from the mermaid skill (no invented colors)
- [ ] Diagram will include a color legend table
---
## Related Skills
- `/make-experiment-diag` - Parent skill for lens selection
- `/mermaid` - MUST BE LOADED before creating diagram
- `/exp-lens-causal-assumptions` - For DAG-based causal structure analysis
- `/exp-lens-severity-testing` - For statistical severity and power analysis
1---2name: exp-lens-validity-threats3description: Create a validity threat matrix identifying alternative explanations and design mitigations. Adversarial lens answering "What alternative explanations survive?"4---56# Validity Threats Experimental Design Lens78**Philosophical Mode:** Adversarial9**Primary Question:** "What alternative explanations survive?"10**Focus:** History Effects, Instrumentation Changes, Selection Effects, Co-interventions, Treatment Diffusion1112## When to Use1314- Quasi-experimental designs without full randomization15- System experiments with environmental changes16- Longitudinal comparisons17- User invokes `/exp-lens-validity-threats` or `/make-experiment-diag validity`1819## Critical Constraints2021**NEVER:**22- Modify any source code files23- Do not litter the codebase with useless comments, TODO markers, or explanatory annotations — the skill output and diagram speak for themselves2425**ALWAYS:**26- Apply Campbell & Stanley's full threat taxonomy — do not skip threats just because they seem unlikely27- For every observed difference, enumerate at least 3 alternative explanations28- Assess mitigation strength honestly — "partially mitigated" is better than false confidence29- Distinguish threats that are ruled out by design from those that remain plausible30- BEFORE creating any diagram, LOAD the `/mermaid` skill using the Skill tool - this is MANDATORY3132---3334## Analysis Workflow3536### Step 1: Launch Parallel Exploration Subagents3738Spawn Explore subagents to investigate:3940**Temporal Changes (History)**41- Find whether the environment changed between conditions42- Look for: version, update, release, change, drift, before, after, time, date4344**Instrumentation Changes**45- Find whether measurement tools or methods changed46- Look for: log, metric, instrument, measurement, format, schema, API, breaking4748**Selection & Filtering**49- Find whether groups are compared after differential filtering50- Look for: filter, exclude, select, subsample, eligible, criteria, dropout, attrition5152**Co-interventions**53- Find whether multiple changes occurred simultaneously54- Look for: also, simultaneously, together, combined, alongside, additionally, migration5556**Treatment Diffusion**57- Find whether control units could access treatment58- Look for: access, share, copy, learn, adopt, contaminate, crossover, spillover5960### Step 2: Apply Threat Taxonomy6162Apply Campbell & Stanley's threat taxonomy to the specific experiment. For each threat category:631. Is it plausible in this context?642. What design feature mitigates it?653. How strong is the mitigation?6667Build the threat matrix.6869### Step 3: Analyze Alternative Explanations7071**CRITICAL — Analyze Alternative Explanations:**72For every observed difference between conditions:73- List at least 3 alternative explanations besides the intended causal claim74- For each: What evidence rules it out? What evidence remains consistent with it?7576### Step 4: Create the Diagram7778Use the mermaid skill conventions to create a threat-flow diagram with:7980**Direction:** `TB` (threats flow from sources through mitigations to residual risk)8182**Subgraphs:**83- THREAT SOURCES84- DESIGN MITIGATIONS85- RESIDUAL THREATS8687**Node Styling:**88- `gap` class: Active unmitigated threats89- `detector` class: Design mitigations90- `stateNode` class: Threat sources91- `handler` class: Partially mitigated threats92- `output` class: Successfully mitigated threats9394### Step 5: Write Output9596Write the diagram to: `temp/exp-lens-validity-threats/exp_diag_validity_threats_{YYYY-MM-DD_HHMMSS}.md`9798---99100## Output Template101102```markdown103# Validity Threat Analysis: {Experiment Name}104105**Lens:** Validity Threats (Adversarial)106**Question:** What alternative explanations survive?107**Date:** {YYYY-MM-DD}108**Scope:** {What was analyzed}109110## Threat Matrix111112| Threat | Category | Plausibility | Mitigation | Residual Risk |113|--------|----------|-------------|------------|---------------|114| {threat} | {Campbell-Stanley category} | {Low/Medium/High} | {design feature} | {Low/Medium/High} |115116## Alternative Explanations117118| Observed Difference | Alternative Explanation | Ruling-Out Evidence | Consistent Evidence |119|--------------------|------------------------|---------------------|---------------------|120| {difference} | {explanation} | {evidence} | {evidence} |121122## Threat-Flow Diagram123124```mermaid125%%{init: {'flowchart': {'nodeSpacing': 50, 'rankSpacing': 60, 'curve': 'basis'}}}%%126graph TB127 %% CLASS DEFINITIONS %%128 classDef cli fill:#1a237e,stroke:#7986cb,stroke-width:2px,color:#fff;129 classDef stateNode fill:#004d40,stroke:#4db6ac,stroke-width:2px,color:#fff;130 classDef handler fill:#e65100,stroke:#ffb74d,stroke-width:2px,color:#fff;131 classDef phase fill:#6a1b9a,stroke:#ba68c8,stroke-width:2px,color:#fff;132 classDef newComponent fill:#2e7d32,stroke:#81c784,stroke-width:2px,color:#fff;133 classDef output fill:#00695c,stroke:#4db6ac,stroke-width:2px,color:#fff;134 classDef detector fill:#b71c1c,stroke:#ef5350,stroke-width:2px,color:#fff;135 classDef gap fill:#ff6f00,stroke:#ffa726,stroke-width:2px,color:#000;136 classDef integration fill:#c62828,stroke:#ef9a9a,stroke-width:2px,color:#fff;137138 subgraph Sources ["THREAT SOURCES"]139 direction TB140 HIST["History Effect<br/>━━━━━━━━━━<br/>Environmental change<br/>between conditions"]141 INST["Instrumentation<br/>━━━━━━━━━━<br/>Measurement tool<br/>change"]142 SEL["Selection Effect<br/>━━━━━━━━━━<br/>Differential filtering<br/>of units"]143 end144145 subgraph Mitigations ["DESIGN MITIGATIONS"]146 direction TB147 RAND["Randomization<br/>━━━━━━━━━━<br/>Controls selection<br/>and history"]148 CTRL["Control Group<br/>━━━━━━━━━━<br/>Absorbs environmental<br/>changes"]149 end150151 subgraph Residual ["RESIDUAL THREATS"]152 direction TB153 DIFF["Treatment Diffusion<br/>━━━━━━━━━━<br/>Control access<br/>to treatment"]154 COINT["Co-interventions<br/>━━━━━━━━━━<br/>Simultaneous<br/>changes"]155 end156157 HIST --> CTRL158 INST --> CTRL159 SEL --> RAND160 RAND --> CTRL161 CTRL --> DIFF162 CTRL --> COINT163164 %% CLASS ASSIGNMENTS %%165 class HIST,INST,SEL stateNode;166 class RAND,CTRL detector;167 class DIFF,COINT gap;168```169170## Campbell-Stanley Checklist171172| Threat | Applicable? | Assessment |173|--------|-------------|------------|174| History | {Yes/No/Partial} | {assessment} |175| Maturation | {Yes/No/Partial} | {assessment} |176| Testing | {Yes/No/Partial} | {assessment} |177| Instrumentation | {Yes/No/Partial} | {assessment} |178| Statistical Regression | {Yes/No/Partial} | {assessment} |179| Selection | {Yes/No/Partial} | {assessment} |180| Experimental Mortality | {Yes/No/Partial} | {assessment} |181| Selection-Maturation Interaction | {Yes/No/Partial} | {assessment} |182| Diffusion of Treatments | {Yes/No/Partial} | {assessment} |183| Co-interventions | {Yes/No/Partial} | {assessment} |184185## Key Findings186187- {Description of most critical surviving alternative explanations}188```189190---191192## Pre-Diagram Checklist193194Before creating the diagram, verify:195196- [ ] LOADED `/mermaid` skill using the Skill tool197- [ ] Using ONLY classDef styles from the mermaid skill (no invented colors)198- [ ] Diagram will include a color legend table199200---201202## Related Skills203204- `/make-experiment-diag` - Parent skill for lens selection205- `/mermaid` - MUST BE LOADED before creating diagram206- `/exp-lens-causal-assumptions` - For DAG-based causal structure analysis207- `/exp-lens-severity-testing` - For statistical severity and power analysis