Role, context, rules, tools, format, fallbacks and examples. A section-by-section guide to writing system prompts that behave predictably at scale.