subagentlegal

.com legal coworker
hard invariant #2

The queue contract: no direct outbound actions

The second hard invariant: "NEVER sends external legal correspondence (letters, NDA counters, signature requests) directly -- all outbound queued as status=queued for human operator approval." This applies specifically to three skills:

skillwhat it produceswhat it never does
legal:legal-responseDraft formal response (status=queued)Never sends the letter directly
legal:signature-requestSignature request envelope (status=queued)Never triggers DocuSign/e-sign directly
legal:triage-ndaClassification + triage reportNever sends a counter-NDA directly

Queue state machine

Every task the legal-coworker handles follows a strict FSM:

statemeaning
pendingTask is in the queue, not yet claimed
claimCoworker has atomically claimed the task
in_progressCoworker is executing the skill
completeSkill execution done, outcome being written
completedAgentOutcome envelope written, task closed

Also possible: block (needs human input), fail (unrecoverable error), retry (transient error, will reattempt).

One task per session tick

The coworker claims exactly one task per tick, completes it atomically, and stops. This prevents partial-state bugs where two tasks are in-progress simultaneously and one's outcome overwrites the other's queue entry.

queue: cowork/data/queues/legal.jsonl