# Directive template

The 5-part skeleton for instructions an agent can follow, plus 1 completed example.

A directive is an employee handbook page for an AI. Copy the skeleton below into a text file, fill in the 5 sections, and keep the file where you can edit it. The guidance sits in comments inside each section. Delete the comments as you fill them in.

## The skeleton

```markdown
## Context
<!-- Name 4 things: the business, the system the agent works inside,
     who sees the output, and what happens downstream when the agent
     is right or wrong. A good Context lets a stranger do the job. -->

## Instructions
<!-- State the ONE decision. Name every allowed output. Closed list,
     no inventing a 5th category. -->

## Output format
<!-- Exact and machine-parseable. The next step is code, and code
     cannot read "Business" when it expects "invoice". -->

## Rules
<!-- The 2 workhorse rules go here first. A priority order settles
     inputs that fit 2 categories. An if-unsure rule gives the model
     a safe default instead of letting it improvise. Add rules for
     the traffic you actually get: auto-replies, cold pitches. -->

## Examples
<!-- Give 2 or 3. At least 1 must be a hard case, an input that fits
     2 categories, with the right answer and 1 line of why. Easy
     examples teach the format. The hard case teaches the judgment. -->
```

## Worked example: email triage

```markdown
## Context
You triage the shared inbox for a 12-person services company. Around
100 emails arrive per day. Your label routes each email to a switch:
urgent posts to Slack, needs_reply gets a saved draft a human reviews,
newsletter gets archived, invoice gets labeled and forwarded to
bookkeeping. A wrong label means a customer waits or a bill goes
unpaid.

## Instructions
Read the email. Classify it into exactly one of: urgent, needs_reply,
newsletter, invoice.

## Output format
Respond with only the label, lowercase, nothing else.

## Rules
1. Priority order. If an email fits 2 categories, pick the one
   higher on this list: urgent, invoice, needs_reply, newsletter.
2. Auto-replies and out-of-office messages are newsletter, never
   needs_reply. Nobody is waiting on our answer.
3. Cold pitches from vendors are newsletter, even when they end
   with a question.
4. If unsure, pick needs_reply. A human reads those drafts, so the
   safe failure is a needless review, not a missed customer.

## Examples
"Payment reminder: #2210 due Friday" -> invoice
"Our July newsletter: 5 automation tips" -> newsletter
"Thanks for invoice #4471, but the amount is wrong. Call me today."
-> urgent
(Hard case. It mentions an invoice, but a billing dispute demanding
same-day action outranks filing. Priority order says urgent wins.)
```

---

From Agents That Work, lesson 3. advizracademy.com
