| name | setup |
| description | Configure harness optimize-subsystem hardware targets — Apple Silicon (MLX), NVIDIA server (CUDA), or RunPod cloud GPU. One-time setup stored persistently. Use when user mentions hardware setup, SSH targets, GPU configuration, or says 'configure optimization targets'. |
| user-invocable | true |
Harness: Optimize Setup
Guide the user through configuring hardware targets for the optimization loop. This is the ONE interactive entry point for the optimize subsystem — everything else is headless.
Config persists across sessions at ${CLAUDE_PLUGIN_DATA}/config.json (fallback: ~/.harness/config.json).
Step 1: Check existing config
cat "${CLAUDE_PLUGIN_DATA:-${HOME}/.harness}/config.json" 2>/dev/null || echo "NO_CONFIG"
If config exists, show current targets and ask if the user wants to update or start fresh.
Step 2: Auto-detect local hardware
bash "${CLAUDE_PLUGIN_ROOT}/scripts/detect-hardware.sh"
This detects Apple Silicon (MLX), NVIDIA GPU (CUDA), or CPU-only.
Step 3: Configure targets
Local
If Apple Silicon or NVIDIA GPU detected, ask for the path to an experiment repo (or any project to optimize). Validate:
[ -d "<path>" ] && echo "VALID" || echo "INVALID"
For ML training repos, also check:
[ -f "<path>/program.md" ] && [ -f "<path>/train.py" ] && echo "ML_REPO" || echo "GENERIC"
Remote NVIDIA Server
Ask if they have an SSH-accessible NVIDIA GPU server. If yes:
bash "${CLAUDE_PLUGIN_ROOT}/scripts/test-ssh.sh" "<ssh_host>"
Collect:
- SSH hostname (e.g.,
ml-server, user@192.168.1.50)
- Remote working directory
Identify the installed fork:
ssh -o ConnectTimeout=3 "<ssh_host>" "cd <path> && git remote get-url origin 2>/dev/null && head -5 train.py" 2>/dev/null
Repo recommendations:
RunPod (Cloud GPU)
Ask if the user wants RunPod cloud GPU access. If yes:
Step 4: Clone experiment target (optional)
If the user doesn't have an experiment repo yet, offer to clone one:
bash "${CLAUDE_PLUGIN_ROOT}/scripts/clone-target.sh" "<hardware>" "<destination>"
This clones the appropriate autoresearch fork based on hardware.
Step 5: Write config
cat << 'CONFIGEOF' | bash "${CLAUDE_PLUGIN_ROOT}/scripts/write-config.sh"
{
"version": 1,
"targets": {
"local": {
"enabled": true/false,
"path": "<path>",
"backend": "mlx" | "cuda" | "cpu",
"description": "<auto-detected hardware>"
},
"server": {
"enabled": true/false,
"ssh_host": "<hostname>",
"path": "<remote path>",
"backend": "cuda",
"gpu_type": "<detected GPU>",
"repo": "<git remote URL>",
"description": "<GPU name + fork>"
},
"runpod": {
"enabled": true/false,
"api_key": "<key>",
"gpu_type": "NVIDIA RTX 4090",
"description": "RunPod cloud GPU"
}
}
}
CONFIGEOF
Step 6: Verify
Read back and summarize:
cat "${CLAUDE_PLUGIN_DATA:-${HOME}/.harness}/config.json"
Then explain next steps:
- The orchestrator can now use
loop phases in workflows
- Direct agent spawn: the optimizer agent reads this config for server targets
- The advisor agent can analyze projects against these targets