--- name: maestro-work description: The contract every recipe shares - the brief a writer receives, the rules it writes by, the handback it returns, and the store record the holder keeps. Reuse existing checks and add tests only for concrete uncovered behavior or risk. review-date: 2027-02-28 --- # maestro-work The matched recipe (`maestro recipe show `, chosen by [Routing](~/maestro/WORKFLOW.md#routing)) owns the steps of a task. This skill owns what every recipe shares: the brief a writer receives, the rules it writes by, the handback it returns, and the record the holder keeps. A writer is a writing subagent or the main chat on a one-sentence change; it reads [references/writer.md](references/writer.md), which holds the lanes, the handback packet and the rules it writes by. This file is for the one who dispatches and keeps the record. Apply [WORKFLOW.md](~/maestro/WORKFLOW.md) for method rules; pause only the slice blocked by scope or authority. ## Dispatch When work is handed to a writer (a writing subagent), send this envelope: ```text Objective: Owned scope: Excluded scope: Mutation: Stop condition: Lane: scout | decision | delivery | challenge | shadow Evidence required: ``` A tiny task may collapse the envelope to three lines, but it never drops `Excluded scope` or `Mutation`. Name the recipe and step the work serves, and point at files rather than pasting their content: every brief points the writer at `~/maestro/skills/maestro-work/references/writer.md`. Standing orders that apply to every writer of one run go in one file every brief points at. To pick a lane, read only the Lanes section of [references/writer.md](references/writer.md#lanes); the writer reads the whole file. No-write names the file boundary only. The one that briefed a subagent reviews its diff and keeps the item. The canonical parallel shapes are delivery and challenge on the same scope, or a council of decision lanes run by `maestro-council`. ## Handback The writer returns the packet in [references/writer.md](references/writer.md). Unknown is a valid result; it is never rounded up to PASS. On `DEPENDENCY_REQUEST` the holder re-scopes the work; A never silently becomes A+B+C. ## Record The holder of a work item keeps its record; a subagent never does. - New work gets `--acceptance ""`: `maestro work add "" --acceptance "<observable result>"` creates it open, and it is worked on directly. A parentless item the agent creates carries its why in the title or acceptance; a longer why is a `maestro work note <id> "why: <one paragraph>"`. - Every open child holds its parent: with `policy-breakdown` enabled a parent closes only when every child is done or cancelled. - A pass that failed gets exactly one line, `maestro work note <id> --failed "<one line>"`; a failing `--check` writes that line itself, and `maestro work show <id>` lists them under `failed checks:`. For repeated failures, apply [Recovery and verification](~/maestro/WORKFLOW.md#recovery-and-verification) (the third failed check prints a stop line: stop and report to the owner) and record the episode in one `--failed` note carrying: ```text Attempted: <approaches tried> Invariant assumed: <belief shared by the attempts> Exact failure: <literal evidence> What changed between attempts: <delta> What did not change: <stable conditions> Smallest new information needed: <next fact that would change the approach> ``` - Keep a checkpoint on the open item when state or the next action meaningfully changes, and before any handoff: `maestro work note <id> --state "<where it stands>" --next "<concrete action>" --avoid "<what not to repeat>"`. Only those three inputs are read back: put the base and task-owned dirty paths on `--state`, and record original authorization and retained gates as the item's authority: `maestro work note <id> --authority "<text>"`. Only the latest checkpoint counts; the brief prints its `next:` line back after a compaction, and `maestro work show <id>` prints it whole. - Otherwise note only a reusable correction, decision, or failed approach; keep ordinary command output out of notes. - `maestro work done <id>` with `--check "<command>"`, or `--proof "<text>"` when no command can show it, as [Completion and delivery](~/maestro/WORKFLOW.md#completion-and-delivery) says. Report pending delivery approval separately from completion. With a topic, write the checkpoint before closing the work item: closing the last linked item closes the topic. When the scope is done and the checks are green: work without a topic closes with `maestro work done`; work with a topic's VERIFY.md routes to `maestro-verify`. ## Holder rules - A material choice outside the acceptance, the holder's own or one a writer handed back, goes through [Decisions and readiness](~/maestro/WORKFLOW.md#decisions-and-readiness). - Scope the user cuts mid-work leaves in the same turn: drop it from the red list and VERIFY.md, remove the tests and dead code written for it, and record the cut in the topic's DECISIONS.md (a work note when there is no topic; a store decision only when it binds beyond the topic). - When the failure's cause is unknown, the holder runs the bug-fix recipe's diagnosis steps (`maestro recipe show bug-fix`) first, as part of the authorized fix. - An external fact a writer looked up comes back in its handback; the holder records the finding and its link with `maestro work note <id>`. If it contradicts a locked decision, supersede the decision before the work continues. - A `COUNCIL_REQUEST` from a writer, or a hard-to-reverse fork the holder finds itself, goes to the main chat, which runs `maestro-council`. ## Coordination Isolated lanes and worktrees: `maestro recipe show worktree`. Contested files or overlapping sessions: name the contested paths, stop overlapping writes until one owner is explicit, and let that owner merge with ordinary git and rerun the affected checks.