autonomous-experiments
Launch, configure, steer, and safely stop a PROJECT_BRIEF.md-driven THINK→EXECUTE→REFLECT experiment loop.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- autonomous-experiments
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Launch, configure, steer, and safely stop a PROJECT_BRIEF.md-driven THINK→EXECUTE→REFLECT experiment loop.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/cli-and-loop.md9.3 KB
- 参考文档references/troubleshooting.md6.9 KB
- 参考文档references/workflows.md8.8 KB
- 脚本scripts/check_project.py12.4 KB
03 SKILL.md 正文
Autonomous experiments
Use this sub-skill when a Researcher needs to operate the repository's long-running
experiment controller around a project containing PROJECT_BRIEF.md: validate a
project, choose local versus scheduler execution, start a bounded trial, steer a
future cycle, interpret state, or recover from a stale/repeating loop.
This is an orchestration skill, not a backend, GPU, provider, tool-protocol, or
memory-manual. Route backend transport and scheduler/job semantics to
execution-and-monitoring; route GPU selection to gpu-and-resource-operations;
route provider/tool details to agent-tools-and-providers; route ledger, journal,
state-inspection, and progress-export APIs to memory-safety-and-progress.
Non-negotiable operating rules
- Inspect the project and run the bundled read-only validator before starting.
- Keep
PROJECT_BRIEF.mdfrozen. Treat it as the stable goal, constraints, search space, and success criteria; use a directive for temporary steering. - Require
experiment.mandatory_dry_run: trueand a worker dry-run before any real training launch. A failed dry-run is a stop-and-fix event, never a launch. - Prefer a finite
--max-cyclesduring a first run or recovery. Confirm the resulting cycle count and log/state outputs before removing the cap. - Only one worker runs at a time. A worker must return the PID/job identifier, log file, expected duration, and dry-run result when it launches an experiment.
- Monitoring while training is intended to be zero-LLM-cost; do not turn a polling or status check into an extra planning cycle.
- A controller stop is not the same as stopping a child training job. After SIGINT/SIGTERM, verify the child using the selected backend before re-launching.
Project contract
Minimum layout:
project/
├── PROJECT_BRIEF.md # required, human-owned and frozen
├── config.yaml # optional; defaults apply when absent
└── workspace/ # created by the controller when it starts
├── MEMORY_LOG.md # rolling decisions and milestones
├── state.json # current observable controller/experiment state
└── HUMAN_DIRECTIVE.md # optional one-cycle steering input
The toy example is a useful shape: goal and target metric, code/data entry points,
resource and run limits, candidate variations, and explicit success criteria. Keep
the brief concise (the default context cap is 3,000 characters) and make every
worker task self-contained because workers are stateless between dispatches. The
layout above assumes the default workspace name. If project.workspace is
changed, state/directives/ledger use that configured directory, while the current
memory manager still stores MEMORY_LOG.md under the literal project
workspace/; validate this split before using a non-default workspace.
Novice workflow: bounded first run
-
Put the goal, metric/threshold, codebase location, constraints, and stop rules in
PROJECT_BRIEF.md; do not put secrets in it. -
Run
python scripts/check_project.py --project PROJECT_DIR --config config.yaml. Fix errors. A missing defaultconfig.yamlis acceptable; an explicitly named missing config is not. -
Start a short run with the exact public entry point:
python -m core.loop --project PROJECT_DIR --config config.yaml \ --gpu 0 --max-cycles 1--projectis required.--configis resolved under the project directory and defaults toconfig.yaml;--gpuis optional;--max-cyclesoverrides the YAML value for this process. Use--checkwith--projectto print the installation check and exit without entering the loop. -
Watch
autoresearcher.log,workspace/state.json, and the latest training log. Expectplanning, thenrunningorwaiting, then a terminal status and reflection fields. Do not infer success from a PID alone. -
After the bounded cycle, inspect the result and memory/ledger handoff. Extend the cap only after the dry-run, launch, monitor, and reflection are credible.
Expert workflow: operate one cycle deliberately
Prepare. Validate the project, choose execution.mode, and set a finite cycle
cap. For local, --gpu may set CUDA_VISIBLE_DEVICES; for ssh or slurm,
route transport configuration to the backend skill first. In slurm, the value
stored in state.json.pid is a scheduler job id, not a local PID, and the CLI
--gpu value is ignored.
THINK. The leader receives the brief, rolling memory, cycle number, and an
optional human directive. It should emit JSON with action (experiment,
wait, or report), worker type, task, hypothesis, success criteria, milestone,
and decision. Keep the task minimal and testable; do not dispatch multiple
workers concurrently.
EXECUTE. The selected worker explores before editing, changes only allowed files, performs the mandatory tiny dry-run, and launches only after it passes. The authoritative launch result is the structured tool result; capture its PID (or scheduler job id) and log path. The controller then monitors without LLM calls until completion or a bounded terminal outcome.
REFLECT and hand off. Reflection compares metrics with the brief and prior
results, records a milestone/decision, and chooses the next direction. Treat
completed, failed, timeout, or scheduler terminal states as evidence, not
as a generic “launched” result. Check state.json, MEMORY_LOG.md, and (when
enabled) the append-only experiment/journal records before reporting to the user.
If the leader says report, note that the current controller has a special
control-flow branch only for wait; report is not a guaranteed stop/report
primitive. Verify what the worker and reflection actually produced.
Steering and stopping
For temporary steering, write a non-empty workspace/HUMAN_DIRECTIVE.md and let
the next cycle consume it. The directive is presented as highest-priority leader
context, then renamed into workspace/directive_archive/directive_YYYYmmdd_HHMMSS.md.
A directive also bypasses repeated-plan fallback for that cycle. Keep stable rules
in PROJECT_BRIEF.md; do not edit protected state or memory files to steer.
The current parser supports only --project, --config, --max-cycles, --gpu,
and --check. Some README examples advertise --directive, but that flag is
not implemented; use the directive file instead. Send SIGINT or SIGTERM to stop
the controller. Then separately verify or cancel the child training job through
its backend before restarting; there is no universal --stop command.
Safe recovery signals
planning: a cycle has started and a directive has been consumed if present.waiting: leader chosewait(or repeated no-progress fallback); inspectsuggested_next_stepand allow cooldown rather than launching blindly.running:pid,log_file, andstarted_atidentify the active run. Under Slurm,pidis a job id and scheduler state is authoritative.- terminal status:
status,terminal_state,last_training_logs,last_metrics, andelapsed_hoursdescribe the finished/failed run. error:last_erroris the bounded failure detail; use error backoff and fix the cause before retrying..cycle_countersurvives controller restarts;max_cyclesstops when the persisted count reaches the configured cap. A stalerunningstate is a warning, not proof that training is alive.
For a stale state plus repeated identical no-progress plans: stop/refrain from a
new launch, verify the child with the selected backend, inspect the latest log,
place a clear directive if a human decision is needed, and restart with a finite
cap. The fallback changes a repeated experiment plan to wait after the
configured threshold (default 3) when there is no directive and no progress.
Bundled operating references
- Workflows: novice, expert, steering, stop, recovery, and observable handoff procedures.
- CLI and loop contract: exact flags, defaults, actions, state transitions, and scheduler caveat.
- Troubleshooting: predictable failures and safe
decisions, including stale state, archive collisions, and
reportsemantics. - Project validator: read-only brief/config checker; it never imports the controller, launches a process, writes files, or contacts a network service.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).