| name | strop-train |
| description | Launch one full Strop training run (forward → judge → optimize → dev-validate, N rounds → experiment report) as a background Workflow. Use when the user types /strop-train or asks to "train the skill/instruction", "跑一轮训练", "start the strop loop", "smoke train / 冒烟跑一次". Arguments (all optional): task dir, rounds=N, smoke, smokeItems=N, headNum=N, heldout, runId=.... |
You are launching a Strop training run — the full loop defined in strop.workflow.mjs.
Parse arguments (from the user's free text; all optional)
taskDir — first path-looking token. If absent, DETECT: list tasks/*/ excluding _template;
exactly one real task → use it; several → ask the user which one (never guess).
rounds=N — default 5 (ignored under smoke — the workflow forces 1).
smoke / smoke=true — pipeline-connectivity run: the same loop end-to-end, minimized —
1 round, each split's forward sliced to the first 2 items (smokeItems=N to change), runId gets
a -smoke suffix automatically. Cost ≈ a few cheap API calls + a handful of subagent turns.
Recommended before the FIRST real run on any task. Its J-Scores are connectivity signals, never
results.
headNum=N — default 0 (single-instruction mainline; >0 re-enables the heads A/B experiment).
heldout / heldout=true — default false. ⚠️ Opens the blind set: allowed ONLY on the run the
user declares final (opened once per experiment lifetime, not per run). If the user passes it,
confirm they mean it before launching. NEVER combinable with smoke (the workflow hard-throws).
runId=... — default: generate YYYY-MM-DD-<letter> from today's date, picking the first letter
suffix not already present under .runs/<task>/ (the workflow has no clock — you supply the stamp).
Pre-flight (cheap, local — do these BEFORE burning a run)
This is the SHORT form of /strop-check-loop — for the full audited verdict table, run that
command instead; here check only the blockers:
<taskDir>/data/GOLD_FROZEN.md exists — gold is frozen. Missing → STOP and tell the user the
gold pipeline + sign-off must complete first (/strop-gold).
<taskDir>/task.md contains ## Forward and ## Output schema blocks.
<taskDir>/rubric.md contains a sign-off record — grep HUMAN-SIGNED or MACHINE-SIGNED.
Missing (neither) → STOP: the ruler needs a signature before it can be optimized against. State
WHICH signer you found in your report — never conflate them; a machine-signed rubric means the
weights were auto-accepted, not human-reviewed.
./.env exists and defines STROP_BASE_URL / STROP_API_KEY / STROP_MODEL (grep for the
names only — NEVER print values). Missing → STOP and tell the user which vars to fill.
<taskDir>/skill.seed.md exists (θ₀). Missing is OK (the workflow bootstraps via
strop-init-agent) but tell the user init will run.
Launch
Call the Workflow tool:
Workflow({ scriptPath: "strop.workflow.mjs",
args: { taskDir, rounds, smoke, smokeItems, headNum, heldout, runId } })
(omit keys the user didn't set — the workflow has defaults). It runs in the background; tell the
user the effective runId (-smoke suffixed under smoke) and that they'll get a completion
notification.
On completion — you are the orchestrator the loop reports to
- Failure: the workflow is uniformly FAIL-FAST — any step (forward / judge / optimizer /
dev-eval) that fails stops the whole run and throws a diagnostic error. Your job: read the error
(and the phase transcript / journal if needed), diagnose the ROOT CAUSE, and report it to the
user. Do NOT auto-rerun — reruns are a human decision.
- Success: read
<runDir>/report.md (the experiment report the Report phase wrote) and give the
user the headline: selected round, dev J-Score trajectory, what the optimizer learned, harvest
candidates, and whether the graduation check fired (dev gains ≈ 0 → spec may be complete).
- Smoke success: report "the pipeline is CLOSED" — every stage ran (forward / judge / optimizer /
dev / select / report) — plus anything that limped (warnings, odd artifacts). Present the J-Scores
as connectivity signals at n≈2, NOT as results, and suggest the real run as the next step.