OpenCode Workflow
OpenCode is the canonical control plane for this repo.
The benchmark surface is unchanged:
train.pyis the experiment fileprepare.pyis read-only- Hugging Face Jobs is the only remote execution path
- Trackio is the only remote observability path
research/results.tsvis the append-only local run ledgertrain_orig.pyplusresearch/live/define the current promoted local master
Repo Surface
opencode.jsonRepo-local OpenCode config, including disabled-by-default MCP entries for Hugging Face and Trackio..opencode/agent/The checked-in OpenCode agents:autolab,planner,experiment-worker,reviewer,memory-keeper,researcher, andreporter..agents/skills/Shared repo-local skills that OpenCode can load on demand.research/templates/Canonical campaign, experiment, and do-not-repeat templates.scripts/opencode_worker.pyCreates isolated worktrees and launchesexperiment-workerruns.scripts/print_opencode_kickoff.pyPrints a standard parent-session kickoff prompt.
Setup
- Install dependencies:
bash
uv sync- Create a local operator env file:
bash
mkdir -p ~/.autolab
cp .autolab.credentials.example ~/.autolab/credentials
$EDITOR ~/.autolab/credentials
. ~/.autolab/credentials- Authenticate Hugging Face:
bash
hf auth login- Authenticate OpenCode and select a model.
Default provider path:
bash
opencode auth login
opencode
# inside OpenCode:
/modelsChoose Hugging Face and then select an open model through Hugging Face Inference Providers. Do not pin a single model in repo config.
- Validate the environment:
bash
bash scripts/bootstrap_public.sh- Warm the shared HF cache once:
bash
uv run scripts/hf_job.py launch --mode prepareParent Session Workflow
- Refresh current local benchmark truth:
bash
uv run scripts/refresh_master.py --fetch-dag- Review the current notebook:
research/notes.mdresearch/do-not-repeat.mdresearch/campaigns/research/experiments/research/results.tsvresearch/live/master.jsonresearch/live/dag.json
- Print a kickoff prompt if you want one:
bash
uv run scripts/print_opencode_kickoff.py --gpu-slots 1- Start OpenCode in the pre-training project root:
bash
opencode- Use the
autolabprimary agent. Delegate to:
plannerfor fresh experiment queuesreviewerfor rule and comparability checksresearcherfor paper-derived ideasreporterfor Trackio and HF Jobs statusmemory-keeperafter each worker finishes
Isolated Worker Workflow
Create one isolated worktree per experiment:
bash
uv run scripts/opencode_worker.py create exp-warmdown-20 \
--campaign "schedule: shorter cooldowns" \
--hypothesis "Shorten warmdown to test whether the long cooldown tail is wasting the fixed budget." \
--worker-id worker-0This creates: