aboutsummaryrefslogtreecommitdiffziptar.gz
path: root/shared
diff options
context:
space:
mode:
authorgodosa <godosa@godosa.eu>2026-10-07 17:01:53 +0200
committergodosa <godosa@godosa.eu>2026-10-07 17:01:53 +0200
commitd678967fcf9489fd943bb17c7baf3c59f930d821 (patch)
tree990e5ea0445f51c3f14c5347f6b7cf38cc3a6b1b /shared
parent61a98e767d7c45fb00b17f969c6fb42d2cbaca48 (diff)
downloadworkflow-d678967fcf9489fd943bb17c7baf3c59f930d821.tar.gz
workflow-d678967fcf9489fd943bb17c7baf3c59f930d821.zip
orch: needs-owner parks task After: its human task, lane keeps picking
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JEAjUkQRrCYX5MZhWxdtj2
Diffstat (limited to 'shared')
-rw-r--r--shared/CLAUDE.md3
-rw-r--r--shared/agents/wf-worker.md7
-rw-r--r--shared/skills/wf-orchestrate/SKILL.md2
-rw-r--r--shared/skills/wf-pilot/SKILL.md2
4 files changed, 9 insertions, 5 deletions
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 <id> progress "<branch or note>"`. Decide, record in spec/rulings, report; ask only on real forks.
-3. Blocked → `wf add -s awaiting "<q>"` → `wf status <id> blocked <a-id>` → next task.
+3. Owner assumed absent: never wait. Blocked → `wf add -s awaiting "<q>"` → `wf status <id> blocked <a-id>` → next task.
+ Owner-only step (GUI/live/with owner) → `wf add -s human …` → `wf set <id> --after <h-id>` → 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 "<question>"`, `wf status <id> blocked <a-id>`, stop.
+- Owner absent, never wait or ask. Blocked on a decision → `wf add -s awaiting "<question>"`, `wf status <id> blocked <a-id>`,
+ stop, result `awaiting <a-id>`. Owner-only step (GUI, live game/device, decision made with the owner) → do the rest,
+ `wf add -s human -p <prio> -e <effort> "<step>. <why>"`, `wf set <id> --after <h-id>`, `wf status <id> clear`, `wf wip`
+ if WIP, stop, result `needs-owner <h-id>` (owner's `wf done <h-id>` makes it pickable again).
- Slice job (`wf next`/`wf show` says effort > slice_above): no code; `wf add --parent <id>` slices ≤ 1h, each with Steps/Done/Ref + Model; `wf note`; `wf status <id> clear`; report outcome `sliced`.
- Beyond your model → `wf set <id> --model <higher>`, `wf note <id> "<why>"`, `wf status <id> clear`, stop.
- Told to wrap up → one call in the worktree: `wf wip <id> -m "<state + next step>" --commit "<msg + footer>" <paths>` (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: <id>
- result: done | done+gate-red <culprit> <fix-id> | awaiting <a-id> | handback <why> | wip
+ result: done | done+gate-red <culprit> <fix-id> | awaiting <a-id> | needs-owner <h-id> | handback <why> | wip
commit: <merged sha or -> (copy `wf finish`'s last line `report: commit <sha> [books <sha>] [tool <sha>]`; never a git HEAD you looked up)
followups: <ids from wf add, or none>
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 <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. `alert: <id> <outcome> …` (awaiting/handback/post-check-red: post parked only that task, blocked or `Sessions: owner`)
+4. `alert: <id> <outcome> …` (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 <lane> --id <id> --recovery "<why>"`), 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 <rid> --timeout <same>`; 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`:
`<HH:MM> pilot batch <n> rc=<rc> done=<ids> stopped=<lanes: why> added=<ids>`. 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 (`<HH:MM> pilot batch <n> throttled`);
next batch `--mem` = 1.5 × last (cap per `wf res free`). Batch oom-killed → re-run the same N with 1.5 × `--mem`.