Exp design

From Lambenthan/empiricalwiki · View interactive version

Exp design is an AI agent skill from the GitHub repository Lambenthan/empiricalwiki. Claim-driven experiment design — scope target claims → design experiment blocks (baseline/validation/ablation/robustness) → build run order → optional Review LLM review → write to wiki

How to use this skill

Skill file

/exp-design

Given an idea (or a free-text hypothesis), design a complete experiment plan.

Claims are the core: scope the claims to validate across three dimensions — Target, Decomposition, and Threats.

Design four types of experiment blocks: baseline (reproduce baseline), validation (core verification), ablation (factor isolation), and robustness (stress testing).

Experiments are ordered by dependency with decision gates between stages (sanity fail → early stop).

Optional Review LLM review checks experiment plan completeness. All experiments are written to wiki/experiments/ with graph edges.

Inputs

Outputs

Wiki Interaction

Reads

Writes

Graph edges created

Workflow

Precondition: confirm working directory is the wiki project root (directory containing wiki/, raw/, tools/).

Step 1: Load Context

  1. Parse idea input:
  1. Load relevant wiki context:
  1. If idea has no origin_gaps: extract implied claims from the hypothesis description; search wiki/claims/ or flag as needing new claim creation

Step 2: Scope Claims

Scope the claims for this experiment plan across three dimensions. For each dimension, search wiki/claims/ for existing claims first; if none exist, create a new claim (status: proposed, confidence: 0.3).

  1. Target (what to validate):
  1. Decomposition (what to decompose):
  1. Threats (what could falsify us):

Output: scoped claims list (slug list + dimension annotation + current status/confidence for each claim)

Step 3: Design Experiment Blocks

Design experiment blocks for each scoped claim. Four types:

A. Baseline experiments (reproduce baseline):

B. Validation experiments (validate Target claim):

C. Ablation experiments (validate Decomposition claims):

D. Robustness experiments (rule out Threats):

Each experiment block includes:

Step 4: Build Run Order

Sort experiments by dependency and set decision gates:

Stage 0: Sanity check
  └── Small-scale run (1 epoch / 100 steps) to verify no code bugs, data loads, GPU available, loss decreasing
  └── Gate: sanity fails → stop, fix code

Stage 1: Baseline (reproduce baseline)
  └── Reproduce baseline results
  └── Gate: baseline deviation > 5% → stop, check implementation (same threshold as Step 3 success criterion)

Stage 2: Validation (core verification)
  └── Validate core method on top of baseline
  └── Gate: no improvement → stop, analyze reason (idea may not hold)

Stage 3: Ablation (factor isolation)
  └── Multiple ablations can run in parallel
  └── Gate: if a factor ablation shows no effect → record it, but continue other ablations

Stage 4: Robustness (robustness verification)
  └── Only execute after Stage 2 succeeds
  └── Scope determined by remaining --budget

Output:

Step 5: Optional Review LLM Review (--review)

If --review is specified:

mcp__llm-review__chat:
  system: "You are a senior ML researcher reviewing an experiment plan.
           Focus on: missing baselines, missing ablations, unfair comparisons,
           statistical rigor (enough seeds?), and dataset selection.
           For every issue found, suggest a concrete fix."
  message: |
    ## Experiment Plan
    {complete experiment plan: claims, blocks, run order, budgets}

    ## Context
    {target claims with current status, related papers' experiment setups}

    ## Review Questions
    1. Are any critical experiments missing?
    2. Are the baselines fair and comprehensive?
    3. Is the ablation design sufficient to isolate each contribution?
    4. Are the success criteria well-defined and reasonable?
    5. Any statistical concerns (sample size, variance, seeds)?

Revise the experiment plan based on Review LLM feedback (add missing experiments, correct unreasonable criteria).

Step 6: Write to Wiki

  1. Create experiment pages:

For each experiment block:

```bash

python3 tools/research_wiki.py slug "<experiment-title>"

```

Create wiki/experiments/{slug}.md:

Create wiki/experiments/{slug}.md following the CLAUDE.md experiments template exactly — every field below must be present even if empty, because /exp-run later uses tools/research_wiki.py set-meta to update them, and set-meta refuses to create fields that don't already exist in the frontmatter (it only updates existing keys):

```yaml


title: ""

slug: ""

status: planned

target_claim: "" # claim slug

hypothesis: ""

tags: []

domain: ""

setup:

model: ""

dataset: ""

hardware: ""

framework: ""

metrics: []

baseline: ""

outcome: "" # empty until /exp-run Phase 4 — succeeded | failed | inconclusive

key_result: "" # empty until /exp-run Phase 4

linked_idea: "{idea-slug}" # MANDATORY: the source idea slug (reverse link to wiki/ideas/{idea-slug}.md linked_experiments)

date_planned: YYYY-MM-DD

date_completed: "" # empty until /exp-run Phase 4

run_log: "" # empty until /exp-run Phase 2

started: "" # empty until /exp-run Phase 2 (ISO timestamp, set via set-meta)

estimated_hours: 0 # 0 until /exp-run Phase 2 (set via set-meta)

remote: # full block must exist so /exp-run --env remote can populate sub-fields via Edit

server: ""

gpu: ""

session: ""

started: ""

completed: ""


## Objective

{what this experiment proves}

## Setup

{detailed setup: model, dataset, hardware, hyperparameters}

## Procedure

{step-by-step execution plan}

## Results

(to be filled after /exp-run)

## Analysis

(to be filled after /exp-run)

## Claim updates

(to be filled after /exp-eval)

## Follow-up

{contingency plans: what to do if success / failure}

```

  1. Create new claims (if missing claims were identified in Step 2):

```bash

python3 tools/research_wiki.py slug "<claim-title>"

```

Create wiki/claims/{slug}.md (status: proposed, confidence: 0.3)

  1. Add graph edges:

```bash

# For each experiment → target claim

python3 tools/research_wiki.py add-edge wiki/ \

--from "claims/{target-claim}" --to "experiments/{slug}" \

--type tested_by --evidence "Designed by /exp-design"

```

  1. Update idea page (if idea came from wiki):
  1. Update index.md: append entries under the experiments and claims (if new) categories
  1. Rebuild derived data:

```bash

python3 tools/research_wiki.py rebuild-context-brief wiki/

python3 tools/research_wiki.py rebuild-open-questions wiki/

```

  1. Append log:

```bash

python3 tools/research_wiki.py log wiki/ \

"exp-design | {N} experiments designed for idea {slug} | claims: {claim-list}"

```

  1. Print EXPERIMENT_PLAN_REPORT to terminal:

```markdown

# Experiment Plan Report

## Target Idea

## Scoped Claims

| Claim | Current status | Confidence | Dimension |

|-------|---------------|------------|-----------|

| [[claim-slug]] | proposed | 0.3 | target |

| [[claim-slug]] | weakly_supported | 0.5 | decomposition |

## Experiment Blocks

| # | Experiment | Type | Claim | GPU-hrs | Stage |

|---|-----------|------|-------|---------|-------|

| 1 | [[baseline-slug]] | baseline | — | 2 | 1 |

| 2 | [[validation-slug]] | validation | target | 8 | 2 |

| 3 | [[ablation-1-slug]] | ablation | decomposition-1 | 8 | 3 |

| 4 | [[robustness-slug]] | robustness | target | 16 | 4 |

## Run Order

Stage 0: Sanity → Stage 1: Baseline → Stage 2: Validation → Stage 3: Ablation → Stage 4: Robustness

Decision gates at each stage boundary.

## Budget

## Next Steps

```

Constraints

Error Handling

Dependencies

Tools(via Bash)

MCP Servers

Claude Code Native

Shared References

Called by

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.