Estimand Clarity Experimental Design Lens
Philosophical Mode: Evidential
Primary Question: "What exactly is the claim?"
Focus: Effect Definition, Target Population, Outcome Specification, Comparator, Aggregation Level, Complication Handling
When to Use
- Experiment has unclear or shifting hypotheses
- Multiple stakeholders interpret results differently
- Claims mix causal and predictive language
- User invokes
/exp-lens-estimand-clarity or /make-experiment-diag estimand
Critical Constraints
NEVER:
- Modify any source code or experiment files
- Do not litter the codebase with useless comments, TODO markers, or explanatory annotations — the skill output and diagram speak for themselves
ALWAYS:
- Decompose every stated claim into formal contrast notation (Treatment A vs Treatment B on Outcome Y in Population Z)
- Flag every mismatch between prose claims and code implementation
- Identify the aggregation level (unit, group, time) explicitly
- Document how complications (missing data, failures, exclusions) are handled
- 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:
Stated Claims & Hypotheses
- Find hypothesis statements, research questions, README claims
- Look for: hypothesis, claim, goal, objective, question, we show, we demonstrate, improves, outperforms
Treatment Definition
- Find what intervention or manipulation is applied
- Look for: treatment, intervention, method, approach, condition, configuration, ablation
Outcome Definition
- Find what is measured as the result
- Look for: outcome, metric, measure, endpoint, target, response, dependent
Population & Scope
- Find what units, datasets, or contexts the claim covers
- Look for: dataset, population, sample, domain, task, benchmark, scenario, setting
Complication Handling
- Find how missing data, failures, timeouts, or exclusions are handled
- Look for: missing, exclude, timeout, fail, drop, impute, censor, incomplete
Step 2: Extract the Implicit Estimand
Answer each question from the code (not the docs):
- What is the treatment?
- What is the comparator?
- What is the outcome?
- What is the population?
- What is the time horizon?
- How are complications handled?
Step 3: Compare Claims to Implementation
Compare the explicit claims (from docs/papers) to the implicit estimand (from code). Flag mismatches between what the prose asserts and what the implementation actually measures.
CRITICAL — Analyze Claim Precision:
For every stated claim:
- Can you write it as a formal contrast (Treatment A vs Treatment B on Outcome Y in Population Z)? If not, what is ambiguous?
- Does the code measure what the prose claims?
Step 4: Create the Optional Claim-Flow Diagram
If a diagram adds value, create a simplified flowchart. This is OPTIONAL for this hybrid lens — the tables are the primary output.
Direction: TB (claim flows from intervention through measurement to conclusion)
Small diagram: 4-6 nodes showing Treatment → Mechanism → Outcome → Claim
Node Styling:
cli class: treatment/intervention nodes
handler class: mechanism/pipeline nodes
output class: measured outcome nodes
phase class: stated claim nodes
gap class: ambiguity or mismatch between claim and measurement
Step 5: Write Output
Write the analysis to: temp/exp-lens-estimand-clarity/exp_diag_estimand_clarity_{YYYY-MM-DD_HHMMSS}.md
Output Template
# Estimand Clarity Analysis: {Experiment Name}
**Lens:** Estimand Clarity (Evidential)
**Question:** What exactly is the claim?
**Date:** {YYYY-MM-DD}
**Scope:** {What was analyzed}
## Estimand Decomposition
| Component | Stated | Implemented | Match? |
|-----------|--------|-------------|--------|
| Treatment | {from prose} | {from code} | Yes / No / Partial |
| Comparator | {from prose} | {from code} | Yes / No / Partial |
| Outcome | {from prose} | {from code} | Yes / No / Partial |
| Population | {from prose} | {from code} | Yes / No / Partial |
| Time Horizon | {from prose} | {from code} | Yes / No / Partial |
| Complication Handling | {from prose} | {from code} | Yes / No / Partial |
## Claim Precision Assessment
| Claim | Formal Contrast | Ambiguities |
|-------|----------------|-------------|
| "{stated claim}" | Treatment A vs B on Y in Z | {list ambiguities} |
## Claim-Flow Diagram (Optional)
```mermaid
%%{init: {'flowchart': {'nodeSpacing': 50, 'rankSpacing': 60, 'curve': 'basis'}}}%%
flowchart 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;
TREATMENT["Treatment<br/>━━━━━━━━━━<br/>{intervention name}"]
MECHANISM["Mechanism<br/>━━━━━━━━━━<br/>{pipeline step}"]
OUTCOME["Measured Outcome<br/>━━━━━━━━━━<br/>{metric}"]
CLAIM["Stated Claim<br/>━━━━━━━━━━<br/>{claim text}"]
MISMATCH["Mismatch<br/>━━━━━━━━━━<br/>{ambiguity description}"]
TREATMENT --> MECHANISM
MECHANISM --> OUTCOME
OUTCOME --> CLAIM
OUTCOME -.->|"diverges"| MISMATCH
class TREATMENT cli;
class MECHANISM handler;
class OUTCOME output;
class CLAIM phase;
class MISMATCH gap;
Color Legend:
| Color |
Category |
Description |
| Dark Blue |
Treatment |
Intervention applied |
| Orange |
Mechanism |
Pipeline processing |
| Dark Teal |
Outcome |
Measured result |
| Purple |
Claim |
Stated conclusion |
| Yellow |
Mismatch |
Ambiguity or claim-code divergence |
Ambiguity Register
| # |
Ambiguity |
Location |
Severity |
Resolution Needed |
| 1 |
{description} |
{file/section} |
High / Medium / Low |
{what to clarify} |
Recommendations
- {Specific action to resolve most critical ambiguity}
- {Rewrite suggestion for vague claim}
- {Code change to align implementation with stated estimand}
---
## 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 causal structure of the stated claim
- `/exp-lens-measurement-validity` - For whether the outcome metric is valid
1---2name: exp-lens-estimand-clarity3description: Create Estimand Clarity experimental design analysis decomposing the implicit estimand from code vs. explicit claims from prose. Evidential lens answering "What exactly is the claim?"4---56# Estimand Clarity Experimental Design Lens78**Philosophical Mode:** Evidential9**Primary Question:** "What exactly is the claim?"10**Focus:** Effect Definition, Target Population, Outcome Specification, Comparator, Aggregation Level, Complication Handling1112## When to Use1314- Experiment has unclear or shifting hypotheses15- Multiple stakeholders interpret results differently16- Claims mix causal and predictive language17- User invokes `/exp-lens-estimand-clarity` or `/make-experiment-diag estimand`1819## Critical Constraints2021**NEVER:**22- Modify any source code or experiment files23- Do not litter the codebase with useless comments, TODO markers, or explanatory annotations — the skill output and diagram speak for themselves2425**ALWAYS:**26- Decompose every stated claim into formal contrast notation (Treatment A vs Treatment B on Outcome Y in Population Z)27- Flag every mismatch between prose claims and code implementation28- Identify the aggregation level (unit, group, time) explicitly29- Document how complications (missing data, failures, exclusions) are handled30- 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**Stated Claims & Hypotheses**41- Find hypothesis statements, research questions, README claims42- Look for: hypothesis, claim, goal, objective, question, we show, we demonstrate, improves, outperforms4344**Treatment Definition**45- Find what intervention or manipulation is applied46- Look for: treatment, intervention, method, approach, condition, configuration, ablation4748**Outcome Definition**49- Find what is measured as the result50- Look for: outcome, metric, measure, endpoint, target, response, dependent5152**Population & Scope**53- Find what units, datasets, or contexts the claim covers54- Look for: dataset, population, sample, domain, task, benchmark, scenario, setting5556**Complication Handling**57- Find how missing data, failures, timeouts, or exclusions are handled58- Look for: missing, exclude, timeout, fail, drop, impute, censor, incomplete5960### Step 2: Extract the Implicit Estimand6162Answer each question from the code (not the docs):631. What is the treatment?642. What is the comparator?653. What is the outcome?664. What is the population?675. What is the time horizon?686. How are complications handled?6970### Step 3: Compare Claims to Implementation7172Compare the explicit claims (from docs/papers) to the implicit estimand (from code). Flag mismatches between what the prose asserts and what the implementation actually measures.7374**CRITICAL — Analyze Claim Precision:**75For every stated claim:76- Can you write it as a formal contrast (Treatment A vs Treatment B on Outcome Y in Population Z)? If not, what is ambiguous?77- Does the code measure what the prose claims?7879### Step 4: Create the Optional Claim-Flow Diagram8081If a diagram adds value, create a simplified flowchart. This is OPTIONAL for this hybrid lens — the tables are the primary output.8283**Direction:** `TB` (claim flows from intervention through measurement to conclusion)8485**Small diagram: 4-6 nodes showing Treatment → Mechanism → Outcome → Claim**8687**Node Styling:**88- `cli` class: treatment/intervention nodes89- `handler` class: mechanism/pipeline nodes90- `output` class: measured outcome nodes91- `phase` class: stated claim nodes92- `gap` class: ambiguity or mismatch between claim and measurement9394### Step 5: Write Output9596Write the analysis to: `temp/exp-lens-estimand-clarity/exp_diag_estimand_clarity_{YYYY-MM-DD_HHMMSS}.md`9798---99100## Output Template101102```markdown103# Estimand Clarity Analysis: {Experiment Name}104105**Lens:** Estimand Clarity (Evidential)106**Question:** What exactly is the claim?107**Date:** {YYYY-MM-DD}108**Scope:** {What was analyzed}109110## Estimand Decomposition111112| Component | Stated | Implemented | Match? |113|-----------|--------|-------------|--------|114| Treatment | {from prose} | {from code} | Yes / No / Partial |115| Comparator | {from prose} | {from code} | Yes / No / Partial |116| Outcome | {from prose} | {from code} | Yes / No / Partial |117| Population | {from prose} | {from code} | Yes / No / Partial |118| Time Horizon | {from prose} | {from code} | Yes / No / Partial |119| Complication Handling | {from prose} | {from code} | Yes / No / Partial |120121## Claim Precision Assessment122123| Claim | Formal Contrast | Ambiguities |124|-------|----------------|-------------|125| "{stated claim}" | Treatment A vs B on Y in Z | {list ambiguities} |126127## Claim-Flow Diagram (Optional)128129```mermaid130%%{init: {'flowchart': {'nodeSpacing': 50, 'rankSpacing': 60, 'curve': 'basis'}}}%%131flowchart TB132 %% CLASS DEFINITIONS %%133 classDef cli fill:#1a237e,stroke:#7986cb,stroke-width:2px,color:#fff;134 classDef stateNode fill:#004d40,stroke:#4db6ac,stroke-width:2px,color:#fff;135 classDef handler fill:#e65100,stroke:#ffb74d,stroke-width:2px,color:#fff;136 classDef phase fill:#6a1b9a,stroke:#ba68c8,stroke-width:2px,color:#fff;137 classDef newComponent fill:#2e7d32,stroke:#81c784,stroke-width:2px,color:#fff;138 classDef output fill:#00695c,stroke:#4db6ac,stroke-width:2px,color:#fff;139 classDef detector fill:#b71c1c,stroke:#ef5350,stroke-width:2px,color:#fff;140 classDef gap fill:#ff6f00,stroke:#ffa726,stroke-width:2px,color:#000;141 classDef integration fill:#c62828,stroke:#ef9a9a,stroke-width:2px,color:#fff;142143 TREATMENT["Treatment<br/>━━━━━━━━━━<br/>{intervention name}"]144 MECHANISM["Mechanism<br/>━━━━━━━━━━<br/>{pipeline step}"]145 OUTCOME["Measured Outcome<br/>━━━━━━━━━━<br/>{metric}"]146 CLAIM["Stated Claim<br/>━━━━━━━━━━<br/>{claim text}"]147 MISMATCH["Mismatch<br/>━━━━━━━━━━<br/>{ambiguity description}"]148149 TREATMENT --> MECHANISM150 MECHANISM --> OUTCOME151 OUTCOME --> CLAIM152 OUTCOME -.->|"diverges"| MISMATCH153154 class TREATMENT cli;155 class MECHANISM handler;156 class OUTCOME output;157 class CLAIM phase;158 class MISMATCH gap;159```160161**Color Legend:**162| Color | Category | Description |163|-------|----------|-------------|164| Dark Blue | Treatment | Intervention applied |165| Orange | Mechanism | Pipeline processing |166| Dark Teal | Outcome | Measured result |167| Purple | Claim | Stated conclusion |168| Yellow | Mismatch | Ambiguity or claim-code divergence |169170## Ambiguity Register171172| # | Ambiguity | Location | Severity | Resolution Needed |173|---|-----------|----------|----------|-------------------|174| 1 | {description} | {file/section} | High / Medium / Low | {what to clarify} |175176## Recommendations1771781. {Specific action to resolve most critical ambiguity}1792. {Rewrite suggestion for vague claim}1803. {Code change to align implementation with stated estimand}181```182183---184185## Pre-Diagram Checklist186187Before creating the diagram, verify:188189- [ ] LOADED `/mermaid` skill using the Skill tool190- [ ] Using ONLY classDef styles from the mermaid skill (no invented colors)191- [ ] Diagram will include a color legend table192193---194195## Related Skills196197- `/make-experiment-diag` - Parent skill for lens selection198- `/mermaid` - MUST BE LOADED before creating diagram199- `/exp-lens-causal-assumptions` - For causal structure of the stated claim200- `/exp-lens-measurement-validity` - For whether the outcome metric is valid