# The agent prompt anatomy — field checklist

Companion artifact to curriculum module 2.01 (Generative AI agent design)
at https://lyceumagents.com/curriculum/agent-design/

This is the anatomy the production agents in the melchizedek repo
actually use: an instruction subdivided into named blocks, each with one
job. In sophisticated agents the blocks are literal XML-tagged sections
(`<system_identity>`, `<memory_doctrine>`, `<communication_laws>`,
`<safety_boundaries>` — see patient_advocate.yaml); in simpler agents
the same anatomy appears as markdown headers, PHASE blocks, or all-caps
MANDATE lines. The framework treats the instruction as one string — the
subdivision is an authoring discipline, not a syntax. Blocks follow
capabilities: an agent earns a new doctrine block the moment it gains a
new power.

---

## Before any block: the purpose

- [ ] Write the one-sentence purpose the agent serves. If you cannot,
      you are configuring a general assistant, not building an
      instrument. Every block below enforces this sentence.
- [ ] Strip and anonymize the input. PII, credentials, and contextual
      metadata come out BEFORE the model sees anything.

## Identity — `<system_identity>`

- [ ] Name the role and its expertise ("a patient and exacting private
      teacher", "a specialized Patient Advocate and Medical Co-Pilot").
- [ ] Name the USER and their situation — who is being served, in what
      state ("navigating a medical situation… needs an expert,
      comforting, yet highly direct peer").
- [ ] State the purpose and its edge: what the agent is for, and what
      requests get redirected because they fall outside it.

## Doctrines — one per capability

`<grounding_doctrine>`, `<memory_doctrine>`, `<research_doctrine>`,
`<tool_doctrine>` — each governs how ONE capability may be used:

- [ ] Name the ground truth ("the pasted material", "this patient's
      record") and require every substantive claim to anchor to it.
- [ ] Legislate the silence: when the source holds no answer, the agent
      says so — it never fills the gap ("never invent a remembered
      fact").
- [ ] Require provenance: where a fact came from, with date and source,
      cited when used.
- [ ] For each tool or subagent: when it MUST be consulted, and what may
      never be asserted without it ("never state drug dosing claims from
      memory — verify through MedScribe").

## Communication laws — `<communication_laws>`

- [ ] Lead with substance: the first sentence carries the answer or the
      critical warning. Ban filler openings by name.
- [ ] Make every law countable: "exactly one follow-up question",
      "maximum 90 words", "define every term inline at first use". A
      law you can't check against a transcript is a wish.
- [ ] Fix the layout contract: headers, bullets, blockquotes — decided
      here, not improvised per run.

## Workflow — `<execution_framework>` / PHASE blocks

(Appears when the agent runs multi-step work — see image_production.yaml
and the financial agents.)

- [ ] Number the phases; give each an exit condition.
- [ ] Place the confirmation gate: which phase may not begin without
      explicit human approval ("NEVER call generate_image in Phase 1").
- [ ] State the delegation order: who must be consulted, in what
      sequence, with obligations marked MUST.

## Boundaries — `<safety_boundaries>` / `<strict_constraints>`

- [ ] Behaviors, not disclaimers: rules that change what the agent DOES
      at the edge, not boilerplate appended to outputs.
- [ ] Write the overrides first: the conditions under which everything
      else yields (emergency instructions come before explanations).
- [ ] Divide the labor: what the agent prepares vs. what stays with the
      human professional ("you prepare, they prescribe").
- [ ] Legislate uncertainty: uncertain answers are ranges with the
      unknown named, delivered plainly — "calm and honest beats soothing
      and vague".

## Outside the instruction (the config is part of the prompt)

- [ ] Each subagent's `description` is its delegation API — write it
      like a function signature: when to call, what to pass.
- [ ] Temperature follows the job: warm where judgment synthesizes,
      cool where facts are retrieved (0.7 mentor / 0.2 researcher).
- [ ] Output schemas make quality machine-checkable — a parsed integer
      can gate a loop; prose approval cannot.

## After the output — verification stage

- [ ] Fact-check every claim, citation, and figure. Fluency is not
      evidence.
- [ ] Never let the generator grade itself — a checker is separate from
      the maker.
- [ ] You own the output. The model multiplied your speed, not your
      responsibility.

---

## When output fails: the five debug variables

Adjust these before assuming the model is broken (worked fully in
module 2.02):

1. **Clarity** — remove ambiguous jargon and tangled syntax; speak
   literally to a literal machine.
2. **Precision** — enforce hard boundaries: exact counts, tone, scope.
3. **Context** — supply the background the task silently assumed.
4. **Instruction** — swap weak verbs for cognitive ones (synthesize,
   contrast, extract).
5. **Format** — demand the exact output structure: table, JSON, list.
