name: strop-init
description: Bootstrap a NEW Strop task from a short brief. Infers everything inferable first (the brief text, any data samples already under tasks//data/, whether ./.env is configured, the shipped news-labeling task as a structural precedent) — a complete brief needs ZERO questions. For genuine gaps, asks ONE decision at a time via AskUserQuestion (recommended option listed FIRST, suffixed "(Recommended)") in dependency order: goal → data source → output schema → correctness standard/rubric weights → student model/.env → split policy. Then scaffolds tasks//, runs strop-init-agent to draft θ₀ (skill.seed.md), a rubric DRAFT, and task.md's ## Forward / ## Output schema / smoke-safe contract blocks, and writes the interview's decision record to tasks//design.md. Use when the user types /strop-init or asks to "新建一个 task / bootstrap a task / 起一个新任务". Arguments: task name (required), the brief (free text), headNum=N (default 0).
You are bootstrapping a new Strop task — θ₀ + contract, per design §7.5 "convention over
configuration": the user writes a small brief; the harness infers what it can, asks only genuine
decisions, then drafts the rest.
Parse arguments
taskName — REQUIRED (kebab-case, becomes tasks/<taskName>/). Missing → ask.
- the brief — the rest of the user's free text (task description, output fields, example
labels — partial is fine and expected).
headNum=N — default 0 (single-instruction mainline).
Step 1 — infer before you ask
Gather every free signal BEFORE asking anything:
- the brief itself — goal, maybe output fields, maybe example labels, maybe exact rubric weights;
tasks/<taskName>/data/{train,dev,heldout}/ if it already has real rows (not just .gitkeep) —
sample a few to infer schema, vocabulary, and DATA LANGUAGE;
- whether
./.env defines STROP_BASE_URL / STROP_API_KEY / STROP_MODEL (grep NAMES only,
never values);
tasks/news-labeling/ (the shipped reference task) — read it as a STRUCTURAL precedent only
(what a closed task's task.md/rubric.md/design.md-shaped decisions look like), never as content
to copy into an unrelated task.
Only a genuine decision — something only the user can answer — becomes a question. Whatever
step 1 already answers, state as an inference and move on. Target: a complete brief needs ZERO
questions.
Step 2 — the interview (only for what step 1 left open)
Ask one question at a time, via AskUserQuestion, in this dependency order — stop asking
further down the tree the moment you hit the hard blocker in #2:
- Goal — usually clear from the brief; ask only if genuinely ambiguous.
- Data source — the most load-bearing question: the ONE thing the harness can never invent
(standing order: the harness never invents data). Real rows already under
tasks/<taskName>/data/{train,dev,heldout}/ → infer the path, state it, no question. Otherwise
ask where data will come from. If the answer amounts to "no data, and none planned" → STOP
THE WHOLE INTERVIEW right here: tell the user plainly that data must land under
tasks/<taskName>/data/{train,dev,heldout}/ (entity-split) before there is anything to draft a
schema/rubric around, and do not proceed to scaffold the contract or run the init agent. If the
user instead names a real (even if not-yet-placed) data source, continue the tree — the
standing next-steps note at the end still reminds them to place it before /strop-gold.
- Output schema — infer field names/types from data samples if step 1 found any (ask ONE
confirm-style question, recommended = your inferred schema); no samples → ask for the fields
directly (recommended = a schema you propose from the brief's wording).
- Correctness standard / rubric weights — the real decision questions: there is no
"obviously correct" answer the harness can infer (e.g. "miss one field entirely — how much does
that cost the score?", "do near-synonym values count as a match?"). Ask one at a time; always
propose a recommended weighting/rule FIRST — never leave the user facing a blank slate.
- Student model /
.env — check ./.env for STROP_BASE_URL / STROP_API_KEY /
STROP_MODEL (names only). Already configured → skip silently. Missing → ask which
student/provider, recommending the default shape in .env.example (one OpenAI-compatible key,
e.g. via OpenRouter).
- Split policy — default entity-split (train/dev disjoint by entity; heldout the least
train-like slice), matching every existing task's convention. One confirm-only question, not an
open menu.
Every AskUserQuestion call: the recommended option is listed FIRST and suffixed
"(Recommended)"; options are your best inferred guess plus real alternatives — never a bare
yes/no when a concrete recommendation is possible.
⚠️ Architecture constraint: interaction can only happen HERE, in this main conversation
(skill layer) — strop-init-agent is a subagent and cannot ask the user anything. That is why
this interview collects ALL decisions before spawning it (see "Compose the completed brief" below).
Language mirroring
- Human-facing text — interview questions,
design.md, rubric prose, your own replies to the
user — mirrors the user's language (answer in whatever language the brief/user is using).
- Machine-facing text — the
## Forward command template, the ## Output schema JSON, field
names, controlled-vocabulary tokens — always English, regardless of conversation language
(the judge / optimizer / forward-runner key off literal English field names).
- θ's language (the skill/instruction prose the optimizer will later edit) follows the task
DATA's language, inferred from the data samples read in Step 1 — never asked, and NOT the
conversation language by default (Chinese-language news data → θ is written in Chinese even if
the interview itself happened in English).
Scaffold (you, with Bash — the init agent has no Bash)
If tasks/<taskName>/ does not exist:
mkdir -p tasks/<taskName>/data/{train,dev,heldout}
- Copy ONLY the reference forward from the template:
cp tasks/_template/infer.py tasks/<taskName>/
— do NOT copy the template's task.md / skill.seed.md / rubric.md: they contain <尖括号>
placeholders, and the init agent is no-clobber — pre-existing files would be skipped, leaving
placeholders as "θ₀". (The full-template copy is the separate MANUAL entry path, cp -r then
hand-fill.)
- Write the COMPLETED brief (the user's original text + everything resolved in Steps 1–2) into
tasks/<taskName>/task.md as plain prose — not the raw partial brief; the interview already
resolved what it can, so the init agent should not have to re-guess an open question.
If the dir already exists, skip scaffolding and let the agent fill only what's missing.
Compose the completed brief
Fold the brief + every inferred/decided answer from Steps 1–2 into ONE completed brief text (goal,
data path, output schema, correctness rules, student model, split policy) — this is what step 3 of
Scaffold writes into task.md, and what you hand to strop-init-agent below.
Run the init agent
Spawn strop-init-agent (Agent tool, run synchronously) with: the taskDir, head_num, and the
completed brief verbatim. It drafts skill.seed.md (named sections), a rubric.md DRAFT, and
ensures task.md's ## Forward / ## Output schema / smoke-safe contract blocks — all
no-clobber. (Its rubric output is, as always, a DRAFT pending separate human sign-off — answering
the interview's correctness-standard question is NOT the same act as signing the rubric; see
"Report + next steps" below.)
Write the decision record (tasks/<taskName>/design.md)
This is a committed, durable artifact — unlike contexts/ (gitignored, private local scratch),
design.md lives in the repo so a second person, or a future gold-disagreement post-mortem, can
read WHY the contract looks the way it does. No-clobber across runs: if design.md already exists,
append a new dated section for this invocation's decisions rather than overwriting prior
history.
Write it in the human's language, one entry per tree node (§ Step 2), each recording:
- what was asked, what was recommended, what the user chose (or "inferred, not asked" + the
evidence), and why;
- any STOP you hit (e.g. missing data) — record it too; it is a decision to revisit next time, not
a failure to hide.
Then, only if tasks/<taskName>/README.md already exists, add ONE link line pointing at
design.md (no-clobber — skip if a link is already present). Do not otherwise touch the README,
and do not create one from scratch (this skill never has).
Report + next steps
Relay what the agent created vs found existing, then the standing order of operations:
- You (human): put data into
data/{train,dev,heldout}/ (entity-split; heldout most unlike
train) — the harness never invents data. (Skip this line if Step 2 already confirmed real data
is in place.)
/strop-gold — draft the frozen yardstick (then human sign-off of rubric + flagged items, then
merge/freeze). Prefer /strop-auto instead if you'd rather the harness run gold → check →
train unattended from here.
/strop-check-loop — audit the loop is closed.
/strop-train smoke → /strop-train.
Also restate: the rubric is a DRAFT pending human sign-off — it cannot freeze itself, and
answering the interview's correctness-standard question is a recommendation you accepted, not yet
a signature.