From maestro-economics
SOP for managing online research experiments through mecon exp. Use when the user asks to initialize, create, edit, inspect, preview, publish, pause, close, export, or delete an experiment; asks about participant sessions, experiment status, live URL, preview URL, dashboard, response export, or experiment lifecycle operations.
How this skill is triggered — by the user, by Claude, or both
Slash command
/maestro-economics:ra-experimentsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Use this skill for experiment lifecycle operations. Keep preview, production,
Use this skill for experiment lifecycle operations. Keep preview, production, session state, and exports tied to server truth.
mecon exp init <slug> — scaffold local source project.mecon exp push <dir> — upload → remote compile → create preview.mecon exp publish <slug> — preview → live.mecon exp status <slug>.mecon exp export <slug>.mecon exp pause <slug> or mecon exp close <slug> when done.mecon exp init <slug>: scaffold a local experiment source project.mecon exp push <dir>: upload source files → server compile → preview. Use --publish to also go live.mecon exp pull <slug> -o <dir>: download source files for an existing experiment.mecon exp list: list experiments.mecon exp status <slug>: show status, session counts, live URL, preview URL, dashboard URL.mecon exp publish <slug>: make the experiment live.mecon exp pause <slug>: stop accepting new sessions temporarily.mecon exp close <slug>: close collection.mecon exp sessions <slug>: list participant sessions.mecon exp export <slug> --format wide --scope completed -o responses.csv: export completed responses.mecon exp export <slug> --format long --scope all -o responses-long.csv: export event-like long data.mecon exp open <slug>: open the experiment dashboard.mecon exp delete <slug> --yes: delete experiment and all sessions.Use --json for machine-readable status/list/session output.
An experiment is defined by JSON source files in a directory:
experiments/<slug>/
experiment.json # project metadata + session config
apps/<appId>/app.json # app config + player fields
apps/<appId>/pages/<pageId>.json # one file per page
stimuli.json # optional: stimulus data
{
"schema": "experiment-project/1",
"slug": "my-experiment",
"title": "My Experiment",
"locale": "en",
"session": {
"app_sequence": ["main"]
},
"treatments": {
"factors": { "group": { "levels": ["control", "treatment"] } },
"assignment": "between_subjects",
"method": "hash"
}
}
{
"schema": "experiment-app/1",
"id": "main",
"player": {
"choice": { "type": "string", "label": "Choice" },
"score": { "type": "int", "label": "Score", "min": 0, "max": 100 }
}
}
Player fields define what data is collected. All fields are required by default unless "required": false is set.
{
"schema": "experiment-page/1",
"id": "welcome",
"type": "display",
"title": "Welcome",
"content": "Markdown content here."
}
Page types: display (read-only), form (collects data).
Form pages use components:
{
"schema": "experiment-page/1",
"id": "q1",
"type": "form",
"title": "Question 1",
"components": [
{ "component": "ChoiceButtons", "field": "choice", "props": { "choices": [["A", "Option A"], ["B", "Option B"]] } },
{ "component": "Slider", "field": "score", "props": { "min": 0, "max": 100, "step": 1 } }
]
}
| Component | Use for | Key props |
|---|---|---|
| Instruction | Display text | content (markdown) |
| ChoiceButtons | Discrete choice | choices: [value, label][] |
| Slider | Continuous scale | min, max, step, label |
| TextInput | Free text | placeholder |
| LikertScale | Rating scale | min, max, labels |
| PriceList | MPL / multiple price list | mode, rows, optionA, optionB |
| BudgetLine | Budget constraint | budgetX, budgetY, labelX, labelY |
| MatrixQuestion | Grid questions | rows, columns |
| RankingTask | Rank items | items |
| LotteryBox | Lottery visualization | probabilities, outcomes |
| ExperimentTimer | Timed pages | seconds |
The server compiler (compileExperimentSourceProject) validates:
experiment.json must have schema: "experiment-project/1", slug, title, session.app_sequenceschema: "experiment-app/1" and id matching the directory nameschema: "experiment-page/1", id, typefield names must match player field definitionschoices arrays must have [value, label] tuples{{...}} are validated at compile timeCompilation errors block push. Warnings are informational.
# New experiment
mecon exp init my-experiment
# edit files...
mecon exp push experiments/my-experiment
# open preview URL, verify
mecon exp publish my-experiment
# Edit existing experiment
mecon exp pull my-experiment -o experiments/my-experiment
# edit files...
mecon exp push experiments/my-experiment
# verify preview
mecon exp publish my-experiment
# One-shot edit + publish
mecon exp push experiments/my-experiment --publish
Before publish, verify:
session.app_sequence matches the intended flowDo not patch preview-only behavior if production uses the same renderer/runtime. Fix the shared protocol or runtime contract.
When reporting status, include live URL, preview URL if present, dashboard URL, session count, completed count, and active count.
For analysis-ready output:
mecon exp status <slug>.mecon exp sessions <slug> if completion state is unclear.mecon exp export <slug> --format wide --scope completed -o responses.csv.Do not treat browser-visible preview state as data truth. Exports must come from server-side experiment responses.
Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub maestro-ai-stack/maestro-economics --plugin maestro-economics