SKILL.md
inno-experiment-dev
Canonical Summary
Creates implementation plan, writes project code with judge feedback loop, and submits final experiment run. Use after code-survey in both Idea and Plan branches.
Trigger Rules
Use this skill when the user request matches its research workflow scope. Prefer the bundled resources instead of recreating templates or reference material. Keep outputs traceable to project files, citations, scripts, or upstream evidence.
Resource Use Rules
- Read from
references/only when the current task needs the extra detail.
Execution Contract
- Resolve every relative path from this skill directory first.
- Prefer inspection before mutation when invoking bundled scripts.
- If a required runtime, CLI, credential, or API is unavailable, explain the blocker and continue with the best manual fallback instead of silently skipping the step.
- Do not write generated artifacts back into the skill directory; save them inside the active project workspace.
Upstream Instructions
Inno Experiment Dev (Planning, Implementation, and Submission)
Merges the former inno-implementation-plan, inno-ml-dev-iteration, and the submit step of inno-experiment-submit-refine. Mirrors createimplementationplan (830-858), implementanditerate (861-920), and the submit portion of submitandrefineexperiments (922-945) in runinferidea_ours.py.
Inputs
| Variable | Source | Description |
|---|---|---|
survey_res |
inno-idea-generation or user | The finalized selected idea (or refinedfordownstream) |
references |
pipeline config | Pre-formatted string of source papers |
updatedprepareres |
inno-prepare-resources | JSON with referencecodebases and referencepaths |
codesurveyres |
inno-code-survey | Comprehensive implementation report / model survey notes |
dataset_description |
from prepare step / context | Description of available datasets (not in instance.json) |
core_code |
instance.json Experiment.core_code |
Absolute path when created by Dr. Claw (e.g. <projectpath>/Experiment/corecode); use as-is or resolve with path.join(project_path, value) if relative |
code_references |
instance.json Experiment.code_references |
Absolute path when created by Dr. Claw (e.g. <projectpath>/Experiment/codereferences); use as-is or resolve if relative |
maxitertimes |
pipeline config | Max judge-iteration rounds (default 2) |
context_variables |
shared state | Mutable dict carrying state across agents |
Plan mode additionally uses ideas and survey-specific prompt variants (buildplanquerywithsurvey, builditerationqueryforplan, etc.).
Outputs
| Variable | Description |
|---|---|
plan_res |
Detailed implementation plan with dataset, model, training, and testing sections |
mldevres |
Final ML Agent implementation result |
judge_res |
Final Judge Agent feedback |
judge_messages |
Full conversation thread (preserved for inno-experiment-analysis) |
submit_res |
Experiment submission result with statistical outputs |
context_variables |
Updated with datasetplan, trainingplan, testingplan, suggestiondict, rawerrorstats |
Cache Artifacts
| File | Agent | Content |
|---|---|---|
Experiment/corecode/logs/codingplan_agent.json |
Coding Plan Agent | context_variables + messages from planning phase |
Experiment/corecode/logs/machinelearning_agent.json |
ML Agent | Initial implementation messages (+ iter{N}.json for judge iterations) |
Experiment/corecode/logs/judgeagent.json |
Judge Agent | Evaluation messages (+ iter{N}.json for iterations) |
Experiment/corecode/logs/machinelearningagentiter_submit.json |
ML Agent | Submission run messages and results |
Instructions
Phase 1: Create Implementation Plan
Mirrors createimplementation_plan.
- Optional pre-step (Idea mode only): If refining the idea for implementation clarity, call the idea refinement agent to produce
refinedfordownstreamwith tensor interfaces and forward-pass sketch.
- Build plan query:
- Idea mode: planquery = buildplanquery(surveyres, references, updatedprepareres, codesurveyres, datasetdescription) (see prompts/buildplanquery.md) - Plan mode: Use buildplanquerywithsurvey(ideas, references, prepareres, codesurveyres, dataset_description)
- Call Coding Plan Agent with
messages = [{"role": "user", "content": plan_query}].
- The agent reviews codebases using tree / cat, then creates structured plans via plandataset, plantraining, plantesting. - Calls caseresolved to merge plans. - Set planres = planmessages[-1]["content"]. - See references/codingplanagent.md for agent details.
- Verify the plan has clear sections: dataset, model, training, evaluation, file layout.
Phase 2: Implement and Iterate
Mirrors implementand_iterate.
- Initial implementation: Build
mldevquery = buildmldevquery(surveyres, prepareres, codesurveyres, planres, datasetdescription, corecode, codereferences)(seeprompts/buildmldevquery.md). Use paths frominstance.json:Experiment.corecode,Experiment.codereferences(absolute in Dr. Claw–created projects; use as-is or resolve with project path if relative). Call ML Agent withmessages = [{"role": "user", "content": mldevquery}]. Setmldevres = ml_messages[-1]["content"].
- See references/mlagentinstructions.md for agent details.
- Initial judge evaluation: Build
judgequery = buildjudgequery(surveyres, prepareres, planres, mldevres)(seeprompts/buildjudgequery.md). Call Judge Agent withinputmessages = [{"role": "user", "content": judgequery}]. Setjudgeres = judgemessages[-1]["content"].
- See references/judgeagentinstructions.md for agent details.
- Iteration loop (for i in 0..maxitertimes - 1):
a. Build iterationquery = builditerationquery(surveyres, prepareres, codesurveyres, planres, mldevres, judgeres, corecode, codereferences) (see prompts/builditerationquery.md). Use paths from instance.json (absolute in Dr. Claw–created projects; use as-is or resolve if relative). Plan mode uses builditerationqueryforplan. b. Append as user message to judgemessages. Call ML Agent with itertimes=i+1. Update mldevres. c. Build judgesimplequery = buildjudgesimplequery(surveyres, prepareres, planres, mldevres) (see prompts/buildjudgesimplequery.md). Plan mode uses buildjudgesimplequeryforplan. d. Append as user message to judgemessages. Call Judge Agent with itertimes=i+1. Update judgeres. e. If "fully_correct": true in last message, break early.
- Preserve
judge_messagesfor the submit step and for downstreaminno-experiment-analysis.
Phase 3: Submit Experiment
Mirrors the submit portion of submitandrefineexperiments.
- Build submit query:
submitquery = buildsubmitquery(surveyres, mldevres, judgeres, corecode)(seeprompts/buildsubmitquery.md). Resolvecorecodefrominstance.Experiment.corecode. Plan mode usesbuildsubmitqueryforplan.
- Append to
judgemessagesas user message. Call ML Agent withitertimes="submit".
- The agent adjusts epochs (3-10), runs runtrainingtesting.py, ensures checkpoints are saved. - Set submitres = judgemessages[-1]["content"].
- If the implementation is not runnable, ML Agent calls
casenotresolved. Otherwise,case_resolvedwith statistical results and analysis.
Tool Mappings
All custom Python tools map to Claude Code built-in capabilities:
| Original Tool | Claude Code Equivalent |
|---|---|
execute_command |
Shell tool (direct execution) |
run_python |
python <script> via Shell tool |
createfile / writefile |
Write tool |
read_file |
Read tool or cat <path> |
create_directory |
mkdir -p <path> |
list_files |
ls <path> |
gencodetree_structure |
tree -L 3 <path> |
diagnosecodeerror |
Analyze stderr output + inspect code |
rollbackandreimplement |
Re-write file with different approach |
viewerrorhistory |
Track error fingerprints in agent memory |
plandataset / plantraining / plan_testing |
Structure plan sections in agent response |
caseresolved / casenot_resolved |
Agent returns result / failure reason |
Checklist
- Optional idea refinement applied if desired (Idea mode).
- Correct
buildplanqueryvariant used for Idea vs Plan mode. - Coding Plan Agent called;
plan_reshas clear dataset/model/training/testing sections. - ML Agent initial implementation completed;
mldevresrecorded. - Judge Agent initial evaluation completed;
judge_resrecorded. - Iteration loop runs with correct prompt variants; early exit on
fully_correct. -
judge_messagespreserved across all phases. - Submit query appended to
judge_messages; ML Agent submission run completed. - Final model checkpoint saved to
Experiment/corecode/checkpoints/modelfinal.pth. - Cache artifacts saved to
Experiment/corecode/logs/:codingplanagent.json,machinelearningagent.json,judgeagent.json,machinelearningagentitersubmit.json.
References
runinferideaours.py:createimplementationplan(830-858),implementanditerate(861-920),submitandrefine_experimentssubmit step (922-945)prompttemplates.py:buildplanquery(203-233),buildmldevquery(236-381),buildjudgequery(384-417),builditerationquery(420-468),buildjudgesimplequery(471-494),buildsubmit_query(497-527)- Agent definitions:
planagent.py,mlagent.py,judgeagent.pyininno/agents/innoagent/