Use when the user requests integration testing, feature validation, or test plan execution
日本語の概要は準備中です。原文の説明を表示しています。
Runs autonomous keep/discard experiments on a codebase to optimize a single metric for a fixed duration, in the style of karpathy/autoresearch. Use when the user says "autoresearch" (optionally with a focus, e.g. "autoresearch the optimizer"), asks to run experiments on a repo overnight, to hill-climb or optimize a metric autonomously, or points at a repo with a karpathy-style program.md.
インストールする前に、エージェントに与えられる指示の中身を確認できます。
Metric-gated experimental research on a codebase for a fixed duration. Subagents propose and run experiments. The metric decides what survives. The clock decides when to stop. You decide neither.
Setup ──► clock check ──► dispatch ONE experiment ──► verify ──► gate ──► log ──┐
▲ │
└──────────────────── time remains ───────────────────────────────┘
└── deadline passed ──► confirm best ──► final summary
You are the orchestrator: manage the clock, dispatch subagents, verify results, gate outcomes, keep the ledger. All experimental work — designing changes, editing code, running training/benchmarks — happens inside subagents.
1. THE CLOCK DECIDES WHEN TO STOP. NOT YOU.
2. THE METRIC DECIDES WHAT SURVIVES. NOT YOU.
3. ONE EXPERIMENT IN FLIGHT AT A TIME. NEVER PARALLEL.
4. EVERY FACT YOU NEED LIVES IN THE LEDGER FILES, NOT IN YOUR HEAD.
Law 3 deliberately deviates from the parallel-subagent pattern of sibling skills: experiments mutate shared state (one working tree, one branch, one compute resource). Parallel dispatch corrupts the protocol. Dispatch each subagent blocking (foreground) and wait for its result.
Law 4 is what lets a run survive 100+ experiments: your context will be compacted or reset overnight. See Resume.
Degrees of freedom are split on purpose:
No subagent tool in this harness? Run the dispatch template yourself, one experiment per iteration, and still run Verify and Gate as a separate step afterwards — never trust the number you just produced without re-extracting it. Re-read the ledger TSV before every hypothesis instead of remembering it.
| Input | Required | Example |
|---|---|---|
| Target repo | yes | ~/code/autoresearch |
| Metric + direction + extraction | yes | val_bpb, lower is better, grep "^val_bpb:" <log> | awk '{print $2}' |
| Experiment command | yes | uv run train.py |
| Time budget per run | yes | 5 minutes wall clock |
| Mutable scope | yes | train.py only |
| Duration | yes | "overnight" = 8 hours |
| Frozen scope | recommended | prepare.py, evaluation code, dependencies |
| Noise floor | recommended | run-to-run spread of the metric, e.g. 0.002; unknown → measured in setup |
| Cost tolerance | optional | peak VRAM may not exceed baseline by >10% + its extraction command |
| Holdout command | optional | a second eval on data the loop never sees; run once, at the end |
| Byproducts to clean between runs | optional | checkpoints/, __pycache__ |
| Research focus | optional | "attention variants", "the optimizer only" |
| Run tag | auto | date-based, e.g. sep23 |
The extraction command must print one number and nothing else; write it
so it reads a log path (<log>), not a fixed filename.
Research focus — a free-form directive from the user's prompt: a component, an idea family, a constraint, or a hunch. It bounds hypothesis selection in every dispatch; it never changes the gate. Record it verbatim in the ledger.
Native mode — if the target repo contains a karpathy-style program.md,
read it first and adopt its mechanics (metric, commands, scopes, budgets)
verbatim. Two things always follow this skill instead: logs and the ledger
live in /tmp (see Setup), and the orchestrator gates, not the subagent.
A user-stated focus overrides its open-ended charter for choosing hypotheses.
Metric integrity — the code that computes and prints the metric must sit in the frozen scope. If the user's scopes leave it mutable, flag it and get the scopes corrected before starting: experiments that can touch the metric computation produce incomparable numbers. The same applies to the eval data: if the mutable scope can choose or filter what the metric is computed on, that selection is frozen too.
Oracle, not claim — a subagent's reported number is a claim; the extraction you run yourself is the oracle, and only the oracle feeds the gate. A model grading its own run (self-score, LLM judge in the mutable scope) is never the metric. No deterministic extraction exists → this skill does not apply; say so instead of climbing on vibes.
If required inputs are missing and no program.md supplies them, ask the user
once, up front, for everything at once. After setup, never ask again.
Track this checklist:
- [ ] 1. Clock: date +%s, deadline computed, run count estimated
- [ ] 2. Branch: fresh autoresearch/<tag> from current HEAD, tree clean
- [ ] 3. Ledger TSV + progress file created in /tmp
- [ ] 4. Baseline recorded as best; extraction proven; noise floor set
- [ ] 5. Executor pin recorded
git -C <repo> checkout -b autoresearch/<tag> from current
HEAD. Must be fresh — if the branch exists or the tree is dirty, stop and
tell the user. Every git command in this run uses git -C <repo> — never
rely on cwd. This skill never runs git reset --hard, git clean, or
git stash (the stash stack is shared with every other worktree)./tmp — never inside the target repo, so
no reset, checkout, or subagent commit can ever touch the record.
<L> = /tmp/autoresearch-<tag>-<timestamp> is the prefix for all of it:
<L>.tsv — the ledger TSV, header row, tab-separated:
n commit <metric> cost status description
— status is baseline, keep, keep (simplicity), discard,
discard (noise), discard (scope), discard (cost), or crash;
cost is the cost-tolerance value if declared, else 0. Crashes log
metric NA, never a number. The ledger TSV is the source of truth:
current best = the last baseline/keep/keep (simplicity) row.<L>.md — progress file: goal, focus (verbatim), metric spec,
commands, scopes, noise floor, start, deadline, executor pin, a
## Queue of untried hypotheses, and an ## Experiments section.
Narrative mirror — when it disagrees with the TSV, the TSV wins.<L>-exp<N>.log — one run log per experiment (-exp<N>b.log for a
confirmation re-run). Logs are never overwritten, so crashes need no
copying and every number stays re-checkable.<L>-exp0.log, <L>-exp0b.log and, if one run is
under ~5% of the duration, <L>-exp0c.log. Extract each yourself: every
extraction must print exactly one number — if not, fix the extraction
command with the user now; this is the last moment you can.
0
means the harness is deterministic: any strict improvement wins and no
confirmation runs are needed.0 in the TSV (baseline), and best + noise floor in the
progress file.Setup is the only phase where user interaction is allowed. Afterward the loop runs lights-out until the deadline.
Before every dispatch: date +%s vs deadline. Remaining time less than
one per-run budget → Final Summary.
One subagent, blocking. Strict template — fill the brackets, keep the structure:
You are running ONE experiment in an autonomous research loop.
Repo: <path>, branch autoresearch/<tag>, currently at the best-known commit.
Mutable scope: <files>. Frozen scope: <files> — read, never modify.
Metric: <name>, <lower|higher> is better. Current best: <value>.
Noise floor: <value> — a gain smaller than this is not a gain.
Research focus: <verbatim focus, or "none: full mutable scope is fair game">.
Every hypothesis you consider must stay inside the focus.
Read <L>.md and <L>.tsv FIRST. They list every experiment already tried.
Do NOT repeat any of them, including failures — a discard is information,
not an invitation. Prefer the top untried item in the ## Queue, if any.
Your task:
1. Pick ONE untried hypothesis likely to beat the best by more than the
noise floor.
2. Implement it in the mutable scope. Minimal, focused diff.
3. Commit ONLY mutable-scope paths: git -C <repo> add <files>, then
git -C <repo> commit -m "<the hypothesis>". Never git add -A.
4. In ONE shell invocation, run and extract:
cd <repo> && timeout -k 30 <2x budget> <experiment command> \
> <L>-exp<N>.log 2>&1; echo "exit=$?"; <extraction command on that log>
Never let run output into your context — redirect, then extract.
exit=124 or 137 = timed out: treat as a crash.
5. Empty extraction = crash: read `tail -n 50 <L>-exp<N>.log` — never more,
never `cat`. Trivial cause (typo, missing import): fix, commit, re-run
once into the same log path. Fundamentally broken idea: stop and report.
6. Report the FINAL commit hash (git -C <repo> rev-parse HEAD), never the
first one.
Return exactly:
- Hypothesis (one line)
- Commit hash
- Metric value (or CRASH + the last 5 error lines)
- One suggested next experiment based on what you observed
Do NOT decide keep-vs-discard, reset or move the branch, edit <L>.tsv or
<L>.md, or touch any file outside the mutable scope. The orchestrator gates.
Pass ledger paths, never contents. No deadline awareness for subagents. Never paste "lessons from past runs" into the prompt as prose — the ledger is the record, and the subagent reads it as data.
Never gate on the report alone. One shell call, no turns in between:
<extraction command on <L>-exp<N>.log>; # the oracle value
git -C <repo> rev-parse HEAD; # must equal the reported commit
git -C <repo> status --porcelain; # empty, apart from user-named byproducts
git -C <repo> diff --name-only <best>..HEAD; # every path inside the mutable scope
<cost extraction, if a cost tolerance is declared>
crash.crash.crash.discard (scope),
whatever the metric says.Take the first row that matches. margin = improvement over best in the
metric's direction (positive = better); floor = noise floor.
| # | Condition | Status |
|---|---|---|
| 1 | Verify failed, run timed out, or no oracle value | crash |
| 2 | Path outside the mutable scope | discard (scope) |
| 3 | Cost tolerance declared and broken | discard (cost) |
| 4 | margin > floor, and floor > 0 and margin < 2×floor | confirm first ↓ |
| 5 | margin > floor | keep |
| 6 | margin ≥ −floor and the diff removes code or cost | keep (simplicity) |
| 7 | 0 < margin ≤ floor | discard (noise) |
| 8 | anything else | discard |
Confirm (row 4). Dispatch a subagent: "Run <experiment command> on
commit <hash>, unmodified, into <L>-exp<N>b.log, using the step-4 shell
invocation. Change nothing. Return the extracted value." Extract it
yourself. Re-gate with the worse of the two values, skipping row 4. One
confirmation run is cheaper than a false best that poisons every later
comparison.
Simplicity (row 6) is the one judgment call you own: equal-within-noise
metric, less code or cost. A marginal gain bought with disproportionate
complexity is a discard. In doubt, the metric wins.
On any keep: the branch stays; best = this commit and value.
On any discard or crash, in order:
git -C <repo> add -A && git -C <repo> commit -m "wip exp-<N>".git -C <repo> update-ref refs/autoresearch/<tag>/exp-<N> HEAD — the
attempt stays reachable for morning review.git -C <repo> reset --keep <best commit> — never --hard.Every experiment: remove user-named byproducts so runs stay independent.
Append one row to the ledger TSV, then one entry to the progress file:
### Experiment N — <time>
- Hypothesis: <one line>
- Commit: <hash>
- Metric: <value> (best: <value>)
- Status: <status from the gate table>
- Suggested next: <from the subagent>
Add the suggestion to the ## Queue if it is untried. Return to the clock
check.
Context compacted, session restarted, or you lost track? Never guess:
ls -t /tmp/autoresearch-<tag>-*.tsv | head -1 → the ledger; read it and
its .md progress file.baseline/keep/keep (simplicity) row. N = last row + 1.git -C <repo> rev-parse HEAD ≠ best commit → an experiment was
interrupted before its gate finished. No TSV row for it yet → log it as
crash. Then run the discard steps (they are safe to repeat).When subagents repeat themselves, propose trivia, or report "no ideas left":
discard (noise) rows first) and radical
structural changes. Write them to the ## Queue.Running out of ideas is never a reason to stop.
Every one of these thoughts is a trap:
| Thought | Instead |
|---|---|
| "The metric has plateaued" | Not your call. Dispatch ideation. |
| "10 discards in a row — converged" | Discards are data. Change rung, dispatch. |
| "Good enough to show the user" | Only after the deadline. Check the clock. |
| "Remaining ideas are too radical" | Radical is the correct next rung. Dispatch. |
| "One more run won't matter" | Remaining time ÷ per-run budget = runs left. It matters. Dispatch. |
| "Let me inspect the training output" | No. Run the extraction. Nothing else. |
| "I should ask whether to continue" | The user is asleep. That is the point. |
| "I'll remember the best value" | You won't survive compaction. Read the TSV. |
Any variation of "maybe stop" → check the clock and dispatch again.
Only after the deadline (let the in-flight experiment finish and gate it — never kill it for the deadline):
git -C <repo> rev-parse HEAD vs the TSV's current best).<L>-final.log. The best was selected from many noisy trials, so its
logged value is optimistic; report both.## Summary
- Experiments: N total — K keeps, D discards, C crashes
- Baseline: <value> → Best: <logged value> (re-measured: <value>, noise floor <value>)
- Holdout: <baseline> → <best>, or "none declared"
- Branch: autoresearch/<tag> at <best commit>
- Kept changes: <one line each>
- Nearest misses worth a future run: <discard (noise) rows>
- Ledger: <L>.tsv, <L>.md
- Review: git -C <repo> log --oneline <base>..autoresearch/<tag>
git -C <repo> diff <base>..autoresearch/<tag>
git -C <repo> for-each-ref refs/autoresearch/<tag>/
Leave the branch checked out at the best commit. Never merge, push, or open a
PR — that is the user's morning decision. To publish a session record
(karpathy PR 44 style), the user can copy <L>.tsv into the branch.
git reset --hard, git clean, git stash, or any git command
without -C <repo>git status --porcelain was non-empty and you dispatched anywaydate +%s since the last subagent returnedまだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
Use when the user requests integration testing, feature validation, or test plan execution
日本語の概要は準備中です。原文の説明を表示しています。
Use when the user wants to systematically fix AI code slop — duplicated logic, over-engineering, silent error swallowing, convention drift, cargo-cult patterns, and other LLM-introduced architectural decay — over a specified duration
日本語の概要は準備中です。原文の説明を表示しています。
Produce a researched long-form article from a topic prompt via an orchestrated pipeline - research agent (first-person sources, working-definition gate), narrative-architecture outline, writer/cold-reviewer loop with an explicit ACCEPT/REVISE verdict contract, then a catalog-deslop pass with a regression gate. The orchestrator dispatches subagents only; the writer never judges its own draft. Use when the user says "article factory", "write an article about X", "run the article pipeline", or asks for a researched long-form piece produced end-to-end. For essays and micro posts in the user's own voice without a research stage, use the prose skill instead.
日本語の概要は準備中です。原文の説明を表示しています。
Create custom modules for [Harbor Boost](https://github.com/av/harbor/tree/main/boost), an optimizing LLM proxy. Use when building Python modules that intercept/transform LLM chat completions—reasoning chains, prompt injection, structured outputs, artifacts, or custom workflows. Triggers on requests to create Boost modules, extend LLM behavior via proxy, or implement chat completion middleware.
日本語の概要は準備中です。原文の説明を表示しています。
Systematically explore and test any software project (CLI, API, Backend, Library, etc.) to find bugs, usability issues, and edge cases. Produces a structured report with full reproduction evidence (exact commands, inputs, logs, and tracebacks) for every issue.
日本語の概要は準備中です。原文の説明を表示しています。
Fully autonomous bug hunting pipeline — discover bugs in a scoped area using parallel subagents, independently triage each finding, fix confirmed issues with subagents, then audit all fixes against repo constraints and target platforms. Runs end-to-end without user interaction.
日本語の概要は準備中です。原文の説明を表示しています。