From 141f6e138b21d0cb98da607ad3bdbc45cf39d0d5 Mon Sep 17 00:00:00 2001 From: sladro Date: Thu, 2 Apr 2026 13:52:05 +0800 Subject: [PATCH] docs: add artifact loop engine usage --- README.md | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1868a96..46a232c 100644 --- a/README.md +++ b/README.md @@ -15,11 +15,11 @@ Engine concepts: - **`scorer`** — evaluates each iteration and records the outcome. - **`policy`** — decides what to keep, discard, or try next. -The task spec schema also includes a `mutation` section, but mutation-budget enforcement is reserved for a future baseline-aware orchestration layer and is not yet applied by the current CLI loop. +The task schema and validator include a `mutation` section, but the current CLI loop does not enforce mutation budgets yet because enforcement requires a baseline-aware orchestration layer. ## How it works -The repo is deliberately kept small and only really has three files that matter: +The repo is deliberately kept small. The original training workflow centers on three main files, while the Artifact Loop Engine adds a separate task runner path for editable text artifacts: - **`prepare.py`** — fixed constants, one-time data prep (downloads training data, trains a BPE tokenizer), and runtime utilities (dataloader, evaluation). Not modified. - **`train.py`** — the single file the agent edits. Contains the full GPT model, optimizer (Muon + AdamW), and training loop. Everything is fair game: architecture, hyperparameters, optimizer, batch size, etc. **This file is edited and iterated on by the agent**. @@ -47,12 +47,20 @@ uv run prepare.py # 4. Manually run a single training experiment (~5 min) uv run train.py -# 5. Run the Artifact Loop Engine task runner -uv run python scripts/run_task.py --task tasks/skill-quality/task.yaml ``` If the above commands all work ok, your setup is working and you can go into autonomous research mode. +## Artifact Loop Engine + +This repository also includes a generic optimization engine for editable text artifacts such as prompts, skills, config files, and small code paths. It uses the same iterate-evaluate-repeat loop as the training workflow, but applies it to task-defined artifacts instead of model code. + +Optional sample task command: + +```bash +uv run python scripts/run_task.py --task tasks/skill-quality/task.yaml +``` + The task runner writes structured iteration results to `work/results.jsonl`. ## Running the agent