Orchestrata Ultimate › Plans › briefs › TEMPLATE-sonnet-agent

Brief template: a Sonnet subagent dispatched from a Claude Code coordinator

Source: plans/briefs/TEMPLATE-sonnet-agent.md at 8a2cb42ad · last changed 2026-10-22 · first committed 2026-10-22 · 144 lines.

Prose pending.

Plan text

Brief template: a Sonnet subagent dispatched from a Claude Code coordinator

Use this for every Agent-tool dispatch (builder, wirer, refactorer, test-writer, auditor) in an orchestrata worktree. The worker sees only the brief, so the brief must carry everything below. Copy the skeleton, fill every <...>, and delete nothing from CONSTRAINTS: a guard you leave out is one the worker will trip. Defects found after a dispatch go into plans/briefs/IMPROVEMENT-LOG.md and come back here as a changed line.

Dispatch hooks (measured 2026-10-06, memory agent-brief-hook-fields):


Coordinator pre-dispatch check (do it, then delete this section from the sent brief)

Accuracy: each line must be measured this session, with the command recorded.

Completeness: the worker can finish without asking.


Skeleton

DESIGN_WAIVER: <ADR/RUL/user instruction that settles the design, with date> — or delete for auditor
Date: <YYYY-MM-DD> · Origin: <user request, verbatim, with date> · Executor: Sonnet <agent type>
in worktree <abs path> on branch <name> tracking origin/master at <sha> · Design settled
below; if a fork appears, STOP and report.

GOAL: <one sentence: the observable end state, not the activity>

VERIFIED (coordinator, <when>; do not re-derive, but STOP if you observe otherwise):
- <fact> — <evidence: file:line / command + output / log path>

FILES (repo-relative):
Modify: <path> — <what changes, and what must NOT change in it>
Create: <path> — <purpose>
Read-only: <paths the worker may consult>
Generated (restore, never commit): plans/ast-*.json, docs/CODEBASE_MAP*.md,
  reports/run-tests-latest.json unless the step is ship's own evidence commit

STAGES (in order; each ends in a check; a failed check is a STOP):
1. <action> — <exact command> — expect: <observable> — on failure: STOP, report <what>
2. ...

CONSTRAINTS:
<the guard corpus, copied in full from the section below>
<task-specific constraints>

DONE WHEN:
1. <observable condition with the command that shows it>

VERIFY: <the exact commands whose raw output goes in the report>

REPORT: for each stage, the command, its exit status and the last 30 lines of output (or the
log path plus the key lines); `git status --short`; `git log --oneline -<n>`; every deviation
from this brief and why; for each problem, the verified cause, at least two options and a
recommendation. Never say "should work": say what you ran and what it printed.

Guard corpus (restate in every brief; measured in this repo, 2026-10-22)

Reading and editing code

Tests

Commits

Deploys

Secrets and scope


Coordinator post-dispatch check

  1. Fence: git status --short | grep '^??' equals the Create list; git diff --stat <base> equals the Modify list; nothing generated is committed.
  2. Re-run the brief's VERIFY yourself and compare it with the reported output.
  3. git log -<n> --format='%an %ae%n%B' shows Mohamed only, no attribution lines.
  4. Log every brief defect and every agent error in plans/briefs/IMPROVEMENT-LOG.md, then fold each one back into this template in the same session.