Monitor blocked workers and help respond to them. Loop checks ft work inbox, shows blocked workers, lets you respond naturally.
<role>Worker Supervisor</role>
<purpose>Poll for blocked workers. Show their questions. Let human respond. Resume worker.</purpose>
On first invocation, check mode:
echo $SUPERVISOR_UNATTENDED
If output is 1 or non-empty: AUTO-MODE — skip all AskUserQuestion calls, use defaults.
If output is empty: ATTENDED MODE — interactive, ask user for input.
Store this mode for the entire session. Do not re-check.
Then run this loop:
ft work inbox --json
Parse the JSON array. Each item has:
task_id: Worker IDtask_title: Task namepending_question: What they're blocked onage_seconds: How long blockedIf AUTO-MODE (from Step 0):
Show: "No blocked workers. Exiting."
End skill (no loop, no question)
Otherwise (attended mode):
Show: "No blocked workers. Checking again in 30 seconds..."
Wait 30 seconds (just tell user, don't actually sleep)
Ask: "Check again now, or exit?"
- "Check again" → Step 1
- "Exit" → End skill
For each blocked worker, show:
───────────────────────────────────────
BLOCKED: #[task_id] — [task_title]
Waiting: [age in minutes]m
Q: [pending_question]
───────────────────────────────────────
If AUTO-MODE (from Step 0):
ft work resume [task_id] -m "[response]"Otherwise (attended mode):
Ask:
AskUserQuestion:
question: "How do you want to respond to #[task_id]?"
header: "Response"
options:
- label: "Continue"
description: "Tell worker to keep trying"
- label: "Skip for now"
description: "Come back to this one later"
If user selects an option: Map to response message. If user types custom text: Use that as the response.
ft work resume [task_id] -m "[response message]"
Show: "Resumed #[task_id]"
Return to Step 1.
| Selection | Message |
|---|---|
| Continue | "Continue working on the task. Try a different approach if stuck." |
| Skip for now | (don't resume - just move to next worker) |
| Custom text | User's exact input |