# Show HN: Hypothesis-Driven Autoresearch for DL Research

> Source: <https://github.com/JonnaMat/magic-machine>
> Published: 2026-12-05 02:55:17+00:00

**Key takeaway:** magic-machine runs unattended deep-learning optimization loops by defining objectives, metrics and guards in project.toml (e.g. median GPU latency target 18.0 ms with validation accuracy >= 0.90) and persisting decisions and state to files so interrupted runs resume cleanly.

**An autonomous hypothesis-driven research system for deep learning model and system optimization.**

**magic-machine** is a research lead for empirical optimization work.

Give it an objective, for example, *reduce Vision Transformer inference latency while preserving accuracy on NVIDIA AGX Orin*, and it works through the research process:

1. Understand the objective, metrics, guards, and constraints.
2. The **research lead** forms falsifiable hypotheses; the**staff researcher** challenges them.
3. Cold **executors** run one experiment each, parallelized aggressively across free resources.
4. The **verifier** checks measurements against artifacts, provenance, comparability, and noise.
5. Results are kept, discarded, confirmed, or abandoned; findings shape the next cycle.

The system can continue working unattended for hours. You can drop in, inspect the evidence, redirect the research, or let it proceed.

The goal is not to automate a sequence of experiments. It is to automate the empirical research process.

Prerequisites: [Claude Code](https://docs.anthropic.com/en/docs/claude-code/overview), [Kiseki](https://github.com/JonnaMat/kiseki) (or adapt to any other experiment tracking tool), and Python 3 with PyYAML.

```
git clone <this repo> ~/src/magic-machine
cd ~/src/magic-machine
mkdir -p scripts && cp -n config/scripts/* scripts/ && chmod +x scripts/*
mkdir -p ~/.claude/skills ~/.claude/agents

for s in magic-machine experiment setup; do
  ln -sfn "$PWD/skills/$s" ~/.claude/skills/"$s"
done
for a in executor verifier staff-researcher; do
  ln -sf "$PWD/agents/$a.md" ~/.claude/agents/"$a.md"
done
```

Then, in an agent session:

```
Read skills/setup/SKILL.md and set this machine up.
```

Setup writes `env.toml`, `hooks.py`, and `rules.md` under `~/.config/magic-machine/` / `~/research/` and validates the installation with a smoke test.

```
cp -r templates/project ~/research/my-project
mkdir -p ~/research/my-project/{notes,state/decisions}
```

Define the research objective and evaluation criteria in `project.toml`:

```
schema = 1
name = "my-project"

objective = """
Optimize model inference performance while preserving accuracy.
"""

gates = []

constraints = [
  "Must run on the target device at batch size 1",
  "FP16 baseline must remain unchanged",
]

[[metric]]
measure = "median GPU latency in ms"
better = "lower"
target = 18.0

[[guard]]
measure = "validation accuracy"
relation = ">="
value = 0.90
```

Start from the research workspace:

```
cd ~/research
claude --dangerously-skip-permissions
```

Then:

```
/magic-machine Project: my-project. Run the pre-flight, then keep going unattended.
```

Interrupted runs resume cleanly: decisions and state live in files, not in chat.
