Other

/monitor-law-gate

Mechanical monitor-law gate: assert a persistent monitor is armed on the ACTIVE collab channel with a heartbeat marker. Triggers: lead/orc sprint, spawn workers, 'back to silent'.

$ golems-cli skills install monitor-law-gate

Updated 1 week ago

A lead that goes "back to silent" with no monitor — or a monitor on the wrong file — turns work routed to it into a silent no-op. This is the MECHANICAL gate for R-002 (BROKEN-OPEN, 22× imp-10).

What It Is

A deterministic detector over a lead/orchestrator transcript: when there is in-flight work (spawned workers) and an active collab channel, it asserts a persistent monitor is armed ON the active channel and keyed to a real heartbeat marker (### / ORC-RECEIPT: / @name / BLOCKED). The pinned RED/GREEN fixtures ARE the replayable gate (R-003/R-014 pattern).

Violation Taxonomy

CodeWhat it catches
MONITOR_ABSENTspawned workers + active channel but NO monitor/watch armed (the "back to silent" no-op)
MONITOR_WRONG_CHANNELa monitor armed on a side/Q&A collab while the squad posts to the active channel
MONITOR_NO_MARKERa monitor on the right channel but keyed to no heartbeat marker — it never fires

GREEN: a persistent Monitor (or tail -f … | grep backstop) on the active channel keyed to ^### |ORC-RECEIPT:|@<name>|BLOCKED; or no in-flight work (N/A).

How /orc Consumes It

This backs /orc's SECOND CARDINAL RULE ("arm an inbound monitor first"). Before a lead/orc ends its first sprint turn — after spawning any worker — run the gate on the turn. A FLAG means: arm a persistent monitor on the ACTIVE channel keyed to the heartbeat marker BEFORE going quiet. The orchestrator may pass { activeChannel: "<path>" } when it knows the channel authoritatively.

bun test skills/golem-powers/monitor-law-gate/evals/monitor-law-gate.test.mjs
bun skills/golem-powers/monitor-law-gate/scripts/monitor-law-gate-cli.mjs <transcript.jsonl|->   # exit 3 = FLAG

Programmatic: import { detectMonitorLaw } from "./src/monitor-law-gate.mjs"{ verdict, violations, activeChannel, monitors, inFlight }.