prompts/squad/skills/loop-operator/SKILL.md
Supervise an autonomous multi-agent loop, detecting stalls, managing timeouts, and performing safe interventions when agents are blocked or slow. Monitor agent health, log decisions, and escalate issues. Use this in the Orchestrator parallel path to ensure the autonomous loop makes progress and doesn't deadlock or hang.
npx skillsauth add imabusyman/CodebrewRouter loop-operatorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
A guardian process that monitors the Orchestrator's autonomous loop for stalls, timeouts, and deadlocks. Detects problems and intervenes safely.
/agent squad gate).Periodically check:
[in_progress]?Stall detected when:
[in_progress] for > task_timeout (e.g., 1 hour).[CHECKPOINT] or progress message from agent in > 30 minutes.Deadlock detected when:
If a task stalls:
[BLOCKED] with reason.If a task fails twice:
[blocked]: Remove from queue.If total session > session_timeout (e.g., 8 hours):
When restarting an interrupted loop:
Docs/squad/runs/<ts>/reasoning.log.md.loop_operator:
task_timeout: 1h
checkpoint_interval: 30m
stall_detection_interval: 5m
max_retries: 2
session_timeout: 8h
escalation_notify: "conductor" # or "user"
heartbeat_required: true
Each agent must emit periodic heartbeats:
[CHECKPOINT] Task X, step 5/10, 50% done. ETA 20 mins.
Loop operator reads handoff artifact's progress field; if no update for 30 mins → stall detected.
## 2026-04-20T16:00:00Z — loop-operator — MEDIUM
Decision: Task 1 (Coder) timed out after 1h. Reassigned to fresh Coder.
Rationale: No heartbeat for 45 mins; task was hanging on API call.
Evidence: .worktrees/task-1/logs/coder.log shows [CHECKPOINT] stopped at t=0:15.
Action: Killed agent; reset worktree; re-dispatched with timeout=30m.
autonomous-agent-harness — task queue driver (Loop Operator monitors it).subagent-driven-development — defines agent structure that Loop Operator supervises.development
Generate a Product Requirements Document from a task description, user intent, or PRD outline. Structure the PRD with sections: Overview, Problem Statement, Goals, Scope, Features, Acceptance Criteria, Metrics. Use this when the Planner or Orchestrator needs to formalize requirements before decomposing into implementation steps.
development
Compose parallel teams of specialized agents for a multi-faceted task. Map subtasks to agent roles, balance workload, and validate team composition. Use this when breaking a task into parallel streams that require different expertise (Coder, Tester, Infra, etc.).
development
Delegate implementation work to specialized subagent instances, each inheriting a task scope and constraints from the parent. Emit structured handoffs, monitor completion signals, aggregate results. Use this in the Orchestrator parallel path when spawning independent Coder/Tester/Infra subagents from a single coordinator.
testing
Maintain the append-only reasoning log and write handoff envelopes for every squad delegation. Use this when the Conductor delegates to a specialist or when a specialist records a non-trivial decision.