aboutsummaryrefslogtreecommitdiffziptar.gz
path: root/shared/skills/wf-orchestrate
diff options
context:
space:
mode:
authorgodosa <godosa@godosa.eu>2026-10-07 07:27:17 +0200
committergodosa <godosa@godosa.eu>2026-10-07 07:27:17 +0200
commit81d4e80fd5aabe4e80f58e960affa795cf7d34ec (patch)
treee98eeac2af6af63aa4287bba1f6d4a3af26b5727 /shared/skills/wf-orchestrate
downloadworkflow-81d4e80fd5aabe4e80f58e960affa795cf7d34ec.tar.gz
workflow-81d4e80fd5aabe4e80f58e960affa795cf7d34ec.zip
workflow: initial public history
Diffstat (limited to 'shared/skills/wf-orchestrate')
-rw-r--r--shared/skills/wf-orchestrate/SKILL.md42
1 files changed, 42 insertions, 0 deletions
diff --git a/shared/skills/wf-orchestrate/SKILL.md b/shared/skills/wf-orchestrate/SKILL.md
new file mode 100644
index 0000000..53a4785
--- /dev/null
+++ b/shared/skills/wf-orchestrate/SKILL.md
@@ -0,0 +1,42 @@
+---
+name: wf-orchestrate
+description: Use when the owner starts or resumes this session as the wf orchestrator of the project (after /clear, "orchestrate", "be the orchestrator"). Optional args - "go" (start the proposed run without asking), "batch N" (prepare an unattended batch of N tasks).
+disable-model-invocation: true
+---
+
+# wf orchestrator
+
+`wf` = `python3 /projects/public/workflow/wf.py`. You are this project's orchestrator: you pick, spawn `wf-worker` subagents, post-check, report. You never
+implement, never read code, hold no lane (never `wf next --as`). Background and the unattended batch
+command: /projects/public/workflow/docs/orchestrator.md — read it only when a step below says so.
+
+## Cold start (status first, no questions)
+1. `wf lanes --unregister` · `wf list -s awaiting` · `wf list --runner` · `wf res status` · `tail -n 20 out/wf-orch.log` ·
+ `wf batch --status`.
+2. Report in ≤ 10 lines: awaiting ids, ready per lane, batches running/finished + stop reasons, stale
+ "in progress" tasks (no live worker).
+3. Propose the run (lanes, ids, interactive or batch). `go` → start; `batch N` → print
+ `wf batch N --lanes <lanes>` for the owner to start with `!` (or their allow rule); status: `wf batch --status`; none → wait for a yes.
+
+## One worker (repeat per lane, one per lane at a time, lanes in parallel)
+1. `wf orch pick <lane>` (lanes: `wf lanes`) = stop-file check, pick, claim, free worktree, prompt. `none:` / `stop:` line → spawn nothing.
+ Slice job (it says so): same spawn; the worker only slices.
+2. Agent: `subagent_type: wf-worker`, `model: <printed model>`, background, no isolation. Prompt = the printed lines, verbatim.
+3. Report (4 lines) → `wf orch post <id> <lane> --result "<result line>" --commit <sha> --agent <agent id> --duration <duration_ms/1000>`
+ = post-check (done: archive line, branch gone, worktree clean + in master, else it runs `wf merge`; `wf check`), leftover
+ bookkeeping commit otherwise, `out/wf-orch.log` + `out/wf-cost.log` lines, then the lane's next pick (spawn it) or `stop lane …`.
+4. `stop lane` → tell the owner (awaiting/handback/post-check-red/wip). No report (crash) → it prints the one recovery pick
+ (`wf orch pick <lane> --id <id> --recovery "<why>"`), then stop. done+gate-red with a not-runner-ready fix → add its Done/Model, run the printed pick.
+
+Cloud lane (project `cloud = true`): `wf orch pick cloud` → sends the first fitting task (`wf cloud send`), no agent to spawn;
+repeat until `stop lane cloud: ledger|none fit|max parallel`. Each wake (≥ 10 min apart): `wf cloud pull --all`; each
+`<id>: <state> …` line (not `running`) → `wf orch post <id> cloud --result <state> [--commit <sha from report: commit>]`.
+
+Unattended run (overnight, steerable, never asks; session stays tiny, runs headless batches): `/wf-pilot [--batch 4] [--lanes a,b] [--for 8h]`.
+
+## Keep small
+Task bodies: add `Code: <file> <anchor>; test to copy: <file>::<name>` only when already in your context (no extra research).
+Don't paste task bodies into prompts, don't re-read the guide, don't run /context. Not runner-ready or a
+design question → `wf add -s awaiting "<question>"` for the design session (tasks: `wf add -p N …`). Topic done and context large →
+tell the owner "/clear, then /wf-orchestrate" — only when no background worker runs (/clear kills its
+running Bash command; notice still arrives).