---
name: writing-instructions-for-agents
description: Writes prompts, skills, rules, and agent instructions as compact current conduct rather than historical explanation. Use when creating or editing text that another agent will follow.
license: MIT
metadata:
  layer: application
---

# Writing instructions for agents

Apply `writing-for-the-reader`. Here, the reader is an agent choosing and performing
behavior from finite context.

## Contract

1. **State the task and trigger.** Make the required behavior and the conditions for using
   it discoverable in the description and opening lines.
2. **Specify observable conduct.** Describe the action to take, the relevant inputs, and
   the result or stopping condition.
3. **Keep only behavior-changing context.** Include a pipeline fact when the agent must
   act differently because of it. Express that difference as direct conduct.
4. **Order by execution.** Put prerequisites before actions, actions before verification,
   and exceptions beside the step they alter.
5. **Use progressive disclosure.** Keep the governing path compact and point to references
   for detail that is needed only sometimes.
6. **Preserve signal strength.** Use ordinary declarative language. Let ordering and
   specificity carry priority.

## Maintenance tests

- **Contribution:** compare behavior with and without the instruction. Keep it when behavior
  changes usefully.
- **Environment:** prefer a query or tool over prose that can become stale.
- **Duplication:** give each instruction one canonical home and use a pointer elsewhere.
- **Generalization:** state the underlying behavior rather than the session that revealed
  it.
- **Control boundary:** compare the reader's inputs, action, validation, and output with
  each context sentence. Keep sentences that change at least one field.

Instructions describe what the next agent does now. The review record carries instruction
history.
