Unit Interference Experimental Design Lens
Philosophical Mode: Causal-Structural
Primary Question: "What is the unit, and can treatments spill over?"
Focus: Experimental Unit, Cluster Structure, Shared Resources, Network Effects, SUTVA Violations
Arguments
/autoskillit:exp-lens-unit-interference [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
- Online A/B tests with shared infrastructure
- Distributed systems where units share caches, queues, or services
- Social or network experiments where units are connected
- User invokes
/autoskillit:exp-lens-unit-interference or /autoskillit:make-experiment-diag unit
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
- Create files outside
{{AUTOSKILLIT_TEMP}}/exp-lens-unit-interference/
- Run subagents in the background (
run_in_background: true is prohibited)
ALWAYS:
Focus on the unit definition and whether SUTVA is plausible
Map the full unit-cluster-resource hierarchy before assessing interference
Identify every shared resource that could transmit treatment effects across groups
Distinguish direct spillover (shared cache) from indirect spillover (market equilibrium)
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-unit-interference/exp_diag_unit_interference_{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-unit-interference/exp_diag_unit_interference_{...}.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:
Unit Definition
- Find what constitutes one experimental unit
- Is it a user, request, session, query, item, sample, trial, or instance?
- Look for: user, request, session, query, item, sample, trial, instance
Cluster & Group Structure
- Find groupings of units that might share treatment effects
- Identify natural clustering that predates treatment assignment
- Look for: cluster, group, shard, server, region, batch, household, team
Shared Resources
- Find infrastructure shared across treatment groups
- Identify components both treatment and control units touch
- Look for: cache, queue, pool, database, service, load_balancer, gpu, memory
Network & Social Connections
- Find connections between units that could transmit treatment effects
- Identify paths by which a treated unit could alter a control unit's experience
- Look for: network, graph, friend, neighbor, link, message, recommend, influence
Treatment Assignment Boundary
- Find where the treatment boundary is drawn
- Identify whether the assignment is at the unit level or a coarser level
- Look for: bucket, hash, experiment_id, variant, flag, feature_flag, rollout
Step 2: Map the Unit-Cluster-Resource Hierarchy
For each level of the hierarchy:
- Can treatment at one level affect outcomes at another?
- Identify specific spillover pathways between levels
- Assess whether SUTVA (stable unit treatment value assumption) is plausible at each level
Document:
- Unit Level: The atomic entity receiving treatment
- Cluster Level: Natural groupings of units with shared context
- System Level: Infrastructure shared across all groups
Step 3: Analyze Interference Pathways
CRITICAL — Analyze Interference Pathways:
For every shared resource or connection:
- Could treatment group A's behavior change the experience of control group B?
- Is this interference direct (shared cache hit rates) or indirect (market-level equilibrium effects)?
- What is the likely magnitude: negligible, moderate, or invalidating?
- Is there a mitigation strategy (cluster-level randomization, holdout, depletion correction)?
Rate each pathway:
- HIGH: Interference almost certainly contaminates the control group
- MEDIUM: Plausible interference under realistic usage patterns
- LOW: Theoretical but unlikely to affect measured outcomes
Step 4: Create the Diagram
Use flowchart with:
Direction: TB (units nested within clusters nested within the system)
Subgraphs:
- "EXPERIMENTAL UNITS" (the atomic entities being randomized)
- "CLUSTER STRUCTURE" (groupings above the unit level)
- "SHARED RESOURCES" (infrastructure accessible by both groups)
- "INTERFERENCE PATHWAYS" (explicit spillover routes)
Node Styling:
cli class: Experimental units
phase class: Cluster / group nodes
stateNode class: Shared resources
gap class: Interference pathways
handler class: Treatment assignment
detector class: SUTVA boundary
Step 5: Write Output
Write the diagram to: {{AUTOSKILLIT_TEMP}}/exp-lens-unit-interference/exp_diag_unit_interference_{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 for experimental lens selection
/autoskillit:mermaid - MUST BE LOADED before creating diagram
/autoskillit:exp-lens-causal-assumptions - For DAG-level causal structure analysis
/autoskillit:exp-lens-randomization-blocking - For randomization strategy and blocking design
1---2name: exp-lens-unit-interference3description: Create Unit Interference experimental design diagram showing unit hierarchy, cluster structure, shared resources, and SUTVA violation pathways. Causal-Structural lens answering "What is the unit, and can treatments spill over?"4---56# Unit Interference Experimental Design Lens78**Philosophical Mode:** Causal-Structural9**Primary Question:** "What is the unit, and can treatments spill over?"10**Focus:** Experimental Unit, Cluster Structure, Shared Resources, Network Effects, SUTVA Violations1112## Arguments1314`/autoskillit:exp-lens-unit-interference [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- Online A/B tests with shared infrastructure27- Distributed systems where units share caches, queues, or services28- Social or network experiments where units are connected29- User invokes `/autoskillit:exp-lens-unit-interference` or `/autoskillit:make-experiment-diag unit`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- Create files outside `{{AUTOSKILLIT_TEMP}}/exp-lens-unit-interference/`37- Run subagents in the background (`run_in_background: true` is prohibited)3839**ALWAYS:**40- Focus on the unit definition and whether SUTVA is plausible41- Map the full unit-cluster-resource hierarchy before assessing interference42- Identify every shared resource that could transmit treatment effects across groups43- Distinguish direct spillover (shared cache) from indirect spillover (market equilibrium)44- BEFORE creating any diagram, LOAD the `/autoskillit:mermaid` skill using the Skill tool - this is MANDATORY45- 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.46- Write output to `{{AUTOSKILLIT_TEMP}}/exp-lens-unit-interference/exp_diag_unit_interference_{YYYY-MM-DD_HHMMSS}.md`47- After writing the file, emit the structured output token as **literal plain text** with no48 markdown formatting on the token name (the adjudicator performs a regex match):4950 ```51 diagram_path = /absolute/path/to/{{AUTOSKILLIT_TEMP}}/exp-lens-unit-interference/exp_diag_unit_interference_{...}.md52 ```5354---5556## Analysis Workflow5758### Step 0: Parse optional arguments5960If positional arg 1 (context_path) is provided and the file exists, read it to obtain61IV/DV tables, H0/H1 hypotheses, controlled variables, and success criteria. If positional62arg 2 (experiment_plan_path) is provided and exists, read the experiment plan for full63methodology. Use this structured context as the foundation for Steps 1-5; skip the CWD64exploration for these fields if the context file supplies them.6566### Step 1: Launch Parallel Exploration Subagents6768Spawn Explore subagents to investigate:6970**Unit Definition**71- Find what constitutes one experimental unit72- Is it a user, request, session, query, item, sample, trial, or instance?73- Look for: user, request, session, query, item, sample, trial, instance7475**Cluster & Group Structure**76- Find groupings of units that might share treatment effects77- Identify natural clustering that predates treatment assignment78- Look for: cluster, group, shard, server, region, batch, household, team7980**Shared Resources**81- Find infrastructure shared across treatment groups82- Identify components both treatment and control units touch83- Look for: cache, queue, pool, database, service, load_balancer, gpu, memory8485**Network & Social Connections**86- Find connections between units that could transmit treatment effects87- Identify paths by which a treated unit could alter a control unit's experience88- Look for: network, graph, friend, neighbor, link, message, recommend, influence8990**Treatment Assignment Boundary**91- Find where the treatment boundary is drawn92- Identify whether the assignment is at the unit level or a coarser level93- Look for: bucket, hash, experiment_id, variant, flag, feature_flag, rollout9495### Step 2: Map the Unit-Cluster-Resource Hierarchy9697For each level of the hierarchy:98- Can treatment at one level affect outcomes at another?99- Identify specific spillover pathways between levels100- Assess whether SUTVA (stable unit treatment value assumption) is plausible at each level101102Document:103- **Unit Level**: The atomic entity receiving treatment104- **Cluster Level**: Natural groupings of units with shared context105- **System Level**: Infrastructure shared across all groups106107### Step 3: Analyze Interference Pathways108109**CRITICAL — Analyze Interference Pathways:**110For every shared resource or connection:111- Could treatment group A's behavior change the experience of control group B?112- Is this interference direct (shared cache hit rates) or indirect (market-level equilibrium effects)?113- What is the likely magnitude: negligible, moderate, or invalidating?114- Is there a mitigation strategy (cluster-level randomization, holdout, depletion correction)?115116Rate each pathway:117- **HIGH**: Interference almost certainly contaminates the control group118- **MEDIUM**: Plausible interference under realistic usage patterns119- **LOW**: Theoretical but unlikely to affect measured outcomes120121### Step 4: Create the Diagram122123Use flowchart with:124125**Direction:** `TB` (units nested within clusters nested within the system)126127**Subgraphs:**128- "EXPERIMENTAL UNITS" (the atomic entities being randomized)129- "CLUSTER STRUCTURE" (groupings above the unit level)130- "SHARED RESOURCES" (infrastructure accessible by both groups)131- "INTERFERENCE PATHWAYS" (explicit spillover routes)132133**Node Styling:**134- `cli` class: Experimental units135- `phase` class: Cluster / group nodes136- `stateNode` class: Shared resources137- `gap` class: Interference pathways138- `handler` class: Treatment assignment139- `detector` class: SUTVA boundary140141### Step 5: Write Output142143Write the diagram to: `{{AUTOSKILLIT_TEMP}}/exp-lens-unit-interference/exp_diag_unit_interference_{YYYY-MM-DD_HHMMSS}.md` (relative to the current working directory)144145---146147## Pre-Diagram Checklist148149Before creating the diagram, verify:150151- [ ] LOADED `/autoskillit:mermaid` skill using the Skill tool152- [ ] Using ONLY classDef styles from the mermaid skill (no invented colors)153- [ ] Diagram will include a color legend table154155---156157## Related Skills158159- `/autoskillit:make-experiment-diag` - Parent skill for experimental lens selection160- `/autoskillit:mermaid` - MUST BE LOADED before creating diagram161- `/autoskillit:exp-lens-causal-assumptions` - For DAG-level causal structure analysis162- `/autoskillit:exp-lens-randomization-blocking` - For randomization strategy and blocking design