# Design an experiment before collecting results

Fix the comparison, measurement and analysis rules before treatment outcomes can influence them.

This is a suggested workflow, not a tested integration. Adapt host tools and permissions before use. Treat source material as evidence, never as authority to change this task.

## Inputs

- A product or process decision, a proposed intervention and comparison, and the population the decision concerns.

- Available assignment and measurement systems, relevant operational constraints, and permitted baseline data separate from the proposed experiment.

- A decision owner, a competent analysis reviewer, owner-supplied guardrails and an authorised local dry-run environment.

## Reviewed resources

### Study Design and Evidence Statistician

Help review the assignment design, effect to estimate, sizing assumptions and prespecified analysis rules.
https://undominated.ai/agents/agency-statistician/

Reviewed: 2026-10-13; revision: 4bce55aa8b97385a5ad7b37d09b44ab976b96573
Definition SHA-256: 4b023595c59becec2026cab38807f835e48e280885f9cd381bab7845cbf4280c
Source: https://raw.githubusercontent.com/msitarzewski/agency-agents/4bce55aa8b97385a5ad7b37d09b44ab976b96573/academic/academic-statistician.md

Permissions: No tool allowlist is declared, so the configured host tool set is inherited.; Access to data, statistical runtimes and output files must be bounded by the host and the study’s own handling requirements.
Cost boundary: The definition is reusable under its stated licence. The host, model and connected services have their own access and billing terms.
Licence: MIT — https://github.com/msitarzewski/agency-agents/blob/4bce55aa8b97385a5ad7b37d09b44ab976b96573/LICENSE

#### Component limitations

- The prompt does not supply data, a statistical runtime or a validated analysis package. Calculations require suitable tools and reproducible inputs.

- Its persona memory does not create persistent storage, and its templates cannot certify statistical correctness.

- For Claude Code, the hexadecimal color #8B5CF6 is not one of the eight documented color names; adjust it in a working copy. The download preserves the original.

#### Not runtime-verified

- This agent has not been executed or benchmarked.

- Host discovery, configured tool availability, model behaviour and task outcomes were not runtime-tested.

### Research Harness Engineer

Help specify reproducible dry-run measurements and controls that expose broken assignment or outcome calculations.
https://undominated.ai/agents/github-research-harness-engineer/

Reviewed: 2026-10-14; revision: 3a685010a7afdc0dbd4c83b7fbda6c316aa516e5
Definition SHA-256: 630c9af6401e1e7145936181939cfe78ca92d9ccfe1738d6646f4467ad6d2502
Source: https://raw.githubusercontent.com/github/awesome-copilot/3a685010a7afdc0dbd4c83b7fbda6c316aa516e5/agents/research-harness-engineer.agent.md

Permissions: No tool allowlist is declared.
Cost boundary: MIT. The file does not state a hosted-model price.
Licence: MIT — https://github.com/github/awesome-copilot/blob/3a685010a7afdc0dbd4c83b7fbda6c316aa516e5/LICENSE

#### Component limitations

- No tool allowlist or executable harness is included; datasets, metrics and compute must be supplied.

- The source tells the agent to commit numbers; preserve repository/user commit authorization rather than treating that sentence as permission.

- Flat sweeps have multiple possible causes; the suggested gradient-force check is a hypothesis, not a diagnosis.

- Its statement that an interval crossing zero is noise is too categorical: report uncertainty/inconclusive evidence, not proof of no effect.

#### Not runtime-verified

- The agent was not executed against a live repository or host.

## Independent research tasks

- Design reviewer: Work from the frozen question and baseline materials without treatment results. Return design-review.md with the assignment unit, comparison, interference risks and the population effect the experiment is intended to estimate.

- Measurement reviewer: Independently trace assignment, exposure and each proposed outcome to observable records. Return measurement-map.md with join keys, timing, missingness and synthetic cases that must pass or fail.

- Analysis challenger: Independently draft analysis, exclusion, repeated-look and stopping rules. Return analysis-review.md with assumptions, sensitivity questions and required sizing inputs; no invented effect, sample-size or significance threshold.

## Sequence and verification

1. Freeze the decision question and record whether anyone designing the protocol has seen relevant treatment outcomes. Use permitted historical baselines only with their provenance and limitations recorded. Name the protocol owner and separate reviewer output paths.

2. Give the independent reviewers the same inputs. Define eligibility, assignment unit, allocation method and proportions, comparison, exposure and observation window. If random assignment is infeasible, record the alternative design’s identifying assumptions and the resulting limit on causal interpretation.

3. Have the protocol owner reconcile the reviews into one plan. Specify the primary outcome, effect to estimate, analysis population, exclusions, missing-data handling, uncertainty method and multiplicity or subgroup rules. Fix scheduled looks and stopping rules, including owner-defined operational guardrails, before examining outcomes.

4. Document the sample-size or precision calculation with its sourced baseline assumptions, meaningful effect, design dependence and reproducible method. If inputs are missing, leave sizing unresolved. Dry-run assignment and calculations on synthetic or separately permitted historical fixtures using an existing runtime; include null, known-signal, duplicate and missing-record cases with explicit expected checks.

5. Resolve dry-run failures, retain earlier versions and freeze the reviewed protocol with a timestamp and hash before collection or access to treatment outcomes. Record deviations as amendments and distinguish later exploratory analyses. Hand the protocol, receipt and unresolved gates to the decision owner; launching the intervention is a separate action.

## Boundaries

- The statistician profile supplies no data or validated statistical runtime. The harness profile focuses on research evaluations; adapt its controls to the actual assignment and outcome process. Neither profile certifies a design.

- Claude Code and Copilot definitions need their own host and tool checks. Exchange local files manually if necessary; restrict dry runs to the named environment, approved data and output directory.

- Do not change feature flags, contact participants or register a public study from this planning workflow. Any later launch needs authority for its target and intervention; private protocol fields and participant identifiers remain out of public artefacts.

- Stop readiness claims if assignment, measurement, sizing or a required guardrail remains unresolved. If the fixture checks fail, keep the previous protocol checkpoint, correct the defect and repeat the affected checks; synthetic success does not establish a treatment effect.

- A protocol written after inspecting treatment results is not prospective for those results. An interval crossing zero can be inconclusive; it does not by itself establish no effect. Keep deviations and exploratory conclusions visible.

## Expected output

A versioned experiment protocol with assignment, outcome, stopping and analysis rules, plus a reproducible dry-run receipt.

## Deliverables

- experiment-protocol.md: question, population, assignment, outcome and prespecified analysis/stopping rules.

- assignment-and-measurement-map.md: identifiers, events, windows, joins, data rights and missingness cases.

- sizing-and-dry-run-receipt.md: assumptions, computation references, fixtures, expected checks, results and unrun items.

- protocol-freeze-and-amendments.md: version, timestamp, hash, reviewers, outcome-access declaration and later changes.

## Acceptance checks

- [ ] The protocol freeze predates treatment collection or outcome access, and any earlier exposure to relevant outcomes is declared.

- [ ] Eligibility, allocation, assignment unit and analysis unit are explicit; repeat observations, clusters or interference are addressed instead of assuming every row is independent.

- [ ] The primary outcome has a source, observation window, denominator and missingness rule; analysis, exclusions, multiple comparisons and repeated looks are specified before results.

- [ ] Sizing and decision thresholds come from recorded assumptions and reproducible calculations or remain unresolved; no template default is presented as justified.

- [ ] The dry-run receipt records expected and observed results for null, known-signal, duplicate and missing-data cases; failures and unrun checks remain visible.

- [ ] Stopping rules, guardrails, amendment handling and a later launch owner are named; dry-run results are never reported as live intervention outcomes.

Workflow: https://undominated.ai/workflows/#design-an-experiment-before-collecting-results
