Structure the Agent System Prompt
mainThe body of the agent file (below the front-matter) serves as the system prompt. For predictable performance, structure it as a micro-specification using the following sections:
- Mission / Role: A single sentence defining the desired outcome.
- Workflow: A numbered list of steps the agent must follow.
- Output Contract: The exact Markdown or JSON format the agent must return.
- Heuristics & Checks: A bulleted list of edge cases, validations, or scoring rubrics.
- Delegation cues (Optional): Instructions like "If X is detected, ask
<other-agent>."
Style Guidelines:
- Use active voice and imperative verbs.
- Use Markdown headings up to
###for readability. - Wrap code fences with language tags.
- Avoid external links inside prompts; keep documentation offline.