| name | research-harness-plan |
| description | RES: Generate an executable empirical analysis plan from study_spec.md, audit report, and cleaned data structure. Produces analysis_plan.md. Trigger: create analysis plan, plan analysis, generate analysis plan. Do NOT load for: cleaning, execution, review, release, setup. |
| description-en | RES: Generate an executable empirical analysis plan from study_spec.md, audit report, and cleaned data structure. Produces analysis_plan.md. Trigger: create analysis plan, plan analysis, generate analysis plan. Do NOT load for: cleaning, execution, review, release, setup. |
| kind | workflow |
| purpose | Generate an executable, evidence-backed analysis plan from the approved study specification |
| trigger | create analysis plan, plan analysis, generate analysis plan, /research-harness-plan |
| shape | workflow |
| role | generator |
| pair | research-harness-work |
| owner | research-harness-core |
| since | 2026-05-29 |
| allowed-tools | ["Read","Write","Edit","Glob"] |
| argument-hint | [--update] [--add STAGE] |
| user-invocable | true |
| effort | medium |
Research Harness Plan
Generate an executable empirical analysis plan based on the approved study specification, audit findings, and cleaned data structure.
This skill runs after /research-harness-clean and before /research-harness-work. The output — analysis_plan.md — requires human approval before any analysis script is run.
Quick Reference
| Input | Action |
|---|
/research-harness-plan | Generate a fresh analysis_plan.md from study_spec.md + reports |
/research-harness-plan --update | Update an existing analysis_plan.md with new tasks or revised scope |
/research-harness-plan --add robustness | Add a robustness-check stage to an existing plan |
Pre-flight Checks
Before writing any plan content:
- Read
study_spec.md. If it does not exist or is substantially empty, stop and tell the user to run /research-harness-setup first.
- Read
reports/data_audit_report.md. If it does not exist, stop and tell the user to run /research-harness-audit first.
- Read
reports/data_cleaning_report.md. If it does not exist, stop and tell the user to run /research-harness-clean first.
- Identify the analysis-ready dataset path from the cleaning report.
- Check that the analysis-ready dataset file exists.
If any check fails: report which check failed and stop. Do not generate a plan for data that does not exist.
Procedure
Step 1 — Synthesize inputs
Read and synthesize:
study_spec.md: research question, identification strategy, outcome, treatment, covariates, sample restrictions, expected outputs
reports/data_audit_report.md: available variables, sample sizes, ID structure, missingness, feasibility assessment
reports/data_cleaning_report.md: final row count, variable names in the analysis-ready dataset, any unresolved issues
Identify:
- Which variables in the study spec are confirmed to exist in the cleaned data
- Which variables in the study spec are missing or ambiguous — list them as in the plan