skills/golem-powers/monitor-loop/SKILL.md
Use when running or reviewing any recurring monitor loop for merge queues, worker queues, collab tails, or agent completion. Enforces drive-to-completion ticks: every tick must query live state with `!`, classify whether real progress happened, and then dispatch, verify-and-decrement, or escalate-park. Triggers on: monitor loop, /loop, recurring tick, keep monitoring, silent autonomous, merge gate, blocked review, no-progress loop.
npx skillsauth add etanhey/golems monitor-loopInstall 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 monitor tick is not a diary entry. It must drive the queue forward or stop itself.
/loop, cron tick, or recurring monitor promptThis skill composes directly on /cron-payload-discipline.
"The
!syntax runs shell commands before the skill content is sent to Claude."
Every tick must use that primitive. The loop never reasons from a hardcoded state string like BLOCKED REVIEW_REQUIRED; it reasons from rendered live query output.
Required tick skeleton:
Tick frame:
- now: $(date -Iseconds)
- cycle: <N>
- last-genuine-dispatch-time: <ISO-8601>
- consecutive-no-change-ticks: <N>
- consecutive-no-push-ticks: <N>
- park-threshold: <N>
Step 1: live queries with `!`
!gh pr view <repo> <pr> --json mergeable,mergeStateStatus,reviewDecision
!find <collab-dir> -newer <last-genuine-dispatch-time>
!list_surfaces
Step 2: classify the delta from rendered output
Step 3: choose exactly one outcome:
- dispatch
- verify-and-decrement
- escalate-park
Track these fields on every tick:
consecutive_no_change_ticksconsecutive_no_push_tickslast_genuine_dispatch_timepark_thresholdReset counters only on real queue-decrement.
Real queue-decrement means one of:
Not real progress:
If a claimed change came from partial telemetry, stop and verify. /never-fabricate applies here: frozen or quiet surfaces are not evidence of steady state.
Every tick must produce exactly one of these outcomes:
Choose this when the live query shows a specific unblock or next action:
Action:
last_genuine_dispatch_timeconsecutive_no_change_ticksconsecutive_no_push_ticks only if the dispatch consumes real new stateChoose this when progress is claimed or implied, but not yet proven:
TASK_DONEAction:
Choose this when the loop is repeating without real progress:
Action:
Increment consecutive_no_change_ticks when:
Increment consecutive_no_push_ticks when:
Do not increment either counter after a verified queue decrement.
The threshold is explicit, not guessed.
8 for hot-loop protection.8, 12, and 16 against real fixtures before standardizing.When consecutive_no_change_ticks >= park_threshold, the loop must park. It cannot keep emitting "monitoring" chatter.
Every tick starts with ! live queries. This is inherited from /cron-payload-discipline and is mandatory here.
Forbidden:
SILENT autonomous with no decision contextAllowed outcomes are only:
Do not reset counters because:
Reset only after verifying real queue-decrement.
If a worker looks frozen or idle, do not assume steady state from parsed-only snippets. Read the full source that can prove the side-effect:
!gh pr view!find plus a full file readA tick may gather multiple signals, but it must resolve to one primary action. Mixed "maybe dispatch, maybe monitor" output recreates the original failure mode.
When a loop violates this skill:
now, cycle, last-genuine-dispatch-time, both counters, park-threshold.! queries to step 1.| Anti-pattern | Why it fails | Fix |
|---|---|---|
| 12 identical BLOCKED REVIEW_REQUIRED ticks | Prompt-state is mistaken for reality | Use !gh pr view first, then branch |
| Resetting because a worker answered "looking" | Reply is not queue-decrement | Keep counting until side-effect is verified |
| Parsed-only surface says idle | Telemetry is not proof | Full read or artifact verification |
| "I'm monitoring" every cycle | No drive-to-completion action | Dispatch, verify-and-decrement, or park |
| Infinite silent loop with no threshold | Burned tokens, no escalation | Track counters and park explicitly |
| Skill | How it composes |
|---|---|
| /cron-payload-discipline | Supplies the mandatory ! live-query-first frame discipline |
| /never-fabricate | Prevents treating telemetry, claims, or parsed-only reads as verified progress |
| /freeze-detect | Distinguishes repeated telemetry from genuinely active long-running work |
tools
The human-eval UX contract for Phoenix views: turn-by-turn scrollable replay (not a scorecard), hide-but-copyable IDs, collapsed thinking, identity chips, tool filters, tiny frozen starter datasets, mark-wrong-in-thread, mobile-first. Use when: building or reviewing ANY Phoenix/eval view, annotation UI, session replay, or human-grading surface. Triggers: phoenix view, eval UI, annotation view, session replay, human eval UX, grading interface. NOT for: Phoenix data pipelines/ingest (capture scripts have their own specs).
tools
macOS systems specialist — AppKit NSPanel architecture, launchd services, socket activation, MCP bridge resilience, syspolicyd, and high-frequency SwiftUI dashboards. Use when building menu-bar apps, LaunchAgents, debugging syspolicyd/Gatekeeper/TCC, resilient UDS/MCP bridges, or SwiftUI dashboards at 10Hz+.
development
Bulk LLM-judging protocol for fleet-dispatched verdict runs (KG cluster, eval harness). Use when: dispatching or running judge workers (J1/J2/RT), planning bulk-apply from verdict JSONL, or triaging evidence_degraded outputs. Triggers: judge fleet, bulk judge, R3 verdicts, kg-judge, RT gate, evidence_degraded. NOT for: single-item code review, Phoenix view UX (use phoenix-human-view), or non-judge eval pipelines.
development
Quiet-down protocol for sprint close: when the fleet wraps, delete ALL polling crons and monitors, send ONE final dashboard + ONE message, then go SILENT. Use when: fleet wraps, all workers done, overnight queue exhausted, sprint close, Etan asleep/away with nothing approved left. Triggers: fleet wrap, wrap the fleet, stand down, going quiet, sprint close. NOT for: mid-sprint monitoring (keep your loops), spawning a successor (use /session-handoff first).