From d678967fcf9489fd943bb17c7baf3c59f930d821 Mon Sep 17 00:00:00 2001 From: godosa Date: Wed, 7 Oct 2026 17:01:53 +0200 Subject: orch: needs-owner parks task After: its human task, lane keeps picking Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01JEAjUkQRrCYX5MZhWxdtj2 --- shared/CLAUDE.md | 3 ++- shared/agents/wf-worker.md | 7 +++++-- shared/skills/wf-orchestrate/SKILL.md | 2 +- shared/skills/wf-pilot/SKILL.md | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) (limited to 'shared') diff --git a/shared/CLAUDE.md b/shared/CLAUDE.md index 66b12f4..6a5b18f 100644 --- a/shared/CLAUDE.md +++ b/shared/CLAUDE.md @@ -30,7 +30,8 @@ Orchestrator: `/wf-orchestrate` (never `wf next --as`, never implement). `wf-wor → branch → wait for the merge call. Test runs: one call per red/green; on red print all failures in that call (`… 2>&1 | grep -A15 '^FAIL\|^ERROR' | head -80`), never run then grep. 2. Start: `wf status progress ""`. Decide, record in spec/rulings, report; ask only on real forks. -3. Blocked → `wf add -s awaiting ""` → `wf status blocked ` → next task. +3. Owner assumed absent: never wait. Blocked → `wf add -s awaiting ""` → `wf status blocked ` → next task. + Owner-only step (GUI/live/with owner) → `wf add -s human …` → `wf set --after ` → status clear → next task. 4. Tests must fail when broken; oracle = hand-derived or real data, never the code under test. ## Done → one commit, don't ask diff --git a/shared/agents/wf-worker.md b/shared/agents/wf-worker.md index 82c8f14..898e10b 100644 --- a/shared/agents/wf-worker.md +++ b/shared/agents/wf-worker.md @@ -24,7 +24,10 @@ it prints the task, its refs and relations. `wf` = `python3 /projects/public/wor (`unittest … 2>&1 | grep -A15 '^FAIL\|^ERROR' | head -80`), never run then grep in two calls. - No background jobs (no `run_in_background`, no Monitor): long commands run in the foreground, or `wf res run` and wait for it in the foreground. The end of your turn is the end of your work. -- Blocked on a decision → `wf add -s awaiting ""`, `wf status blocked `, stop. +- Owner absent, never wait or ask. Blocked on a decision → `wf add -s awaiting ""`, `wf status blocked `, + stop, result `awaiting `. Owner-only step (GUI, live game/device, decision made with the owner) → do the rest, + `wf add -s human -p -e ". "`, `wf set --after `, `wf status clear`, `wf wip` + if WIP, stop, result `needs-owner ` (owner's `wf done ` makes it pickable again). - Slice job (`wf next`/`wf show` says effort > slice_above): no code; `wf add --parent ` slices ≤ 1h, each with Steps/Done/Ref + Model; `wf note`; `wf status clear`; report outcome `sliced`. - Beyond your model → `wf set --model `, `wf note ""`, `wf status clear`, stop. - Told to wrap up → one call in the worktree: `wf wip -m "" --commit "" ` (commits WIP, notes, status clear), stop. @@ -48,6 +51,6 @@ Your final message is exactly these 4 lines, no text before or after (details be entry, `wf note` or new tasks — the orchestrator never reads prose): id: - result: done | done+gate-red | awaiting | handback | wip + result: done | done+gate-red | awaiting | needs-owner | handback | wip commit: (copy `wf finish`'s last line `report: commit [books ] [tool ]`; never a git HEAD you looked up) followups: diff --git a/shared/skills/wf-orchestrate/SKILL.md b/shared/skills/wf-orchestrate/SKILL.md index c5b3d86..63eb470 100644 --- a/shared/skills/wf-orchestrate/SKILL.md +++ b/shared/skills/wf-orchestrate/SKILL.md @@ -25,7 +25,7 @@ command: /projects/public/workflow/docs/orchestrator.md — read it only when a 3. Report (4 lines) → `wf orch post --result "" --commit --agent --duration ` = 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. `alert: …` (awaiting/handback/post-check-red: post parked only that task, blocked or `Sessions: owner`) +4. `alert: …` (awaiting/needs-owner/handback/post-check-red: post parked only that task, blocked / After: h-task / `Sessions: owner`) → tell the owner, keep spawning the lane's next pick; never wait on the owner while tasks are pickable. `stop lane` (none/stop file/push-failed/wip) → tell the owner. No report (crash) → it prints the one recovery pick (`wf orch pick --id --recovery ""`), then stop. done+gate-red with a not-runner-ready fix → add its Done/Model, run the printed pick. diff --git a/shared/skills/wf-pilot/SKILL.md b/shared/skills/wf-pilot/SKILL.md index 86a207b..8b228f6 100644 --- a/shared/skills/wf-pilot/SKILL.md +++ b/shared/skills/wf-pilot/SKILL.md @@ -21,7 +21,7 @@ K = `--batch` (4); deadline = now + `--for` (8h); lanes = `--lanes` or all. `wf `wf res wait --timeout `; end the turn. `fit: 0 of K …; nothing started` → stop (step 6, why: deadline). Exit 3 (busy) → background Bash `sleep 600`, then retry. 2. Wait exit → `wf batch --status` (newest summary) → one line to the owner and `out/wf-orch.log`: ` pilot batch rc= done= stopped= added=`. No task bodies, no logs. - A handback/awaiting blocks only its task (parked by `wf orch post`, alert); its lane stays in the next batch while it has pickable tasks. Never wait on the owner while tasks are pickable. + A handback/awaiting/needs-owner blocks only its task (parked by `wf orch post`, alert); its lane stays in the next batch while it has pickable tasks. Never wait on the owner while tasks are pickable. 3. Failure (rc≠0, or no new summary file) → retry once; second failure → stop (step 6). Memory: `wf res` throttled warning on a running batch → never kill it (workers mid-task); log it (` pilot batch throttled`); next batch `--mem` = 1.5 × last (cap per `wf res free`). Batch oom-killed → re-run the same N with 1.5 × `--mem`. -- cgit