β‘ System Prompt Crafting Cheat Sheet
Core Mission: Design, structure, and format system prompts that maximize LLM adherence, focus attention, and enforce strict execution invariants.
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β π PROMPT ENGINE CONTROL DASHBOARD β
βββββββββββββββββββββ¬βββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββ€
β π STRUCTURE β π‘οΈ SAFETY & RULES β π STYLE & ANNOTATION β
βββββββββββββββββββββΌβββββββββββββββββββββββΌββββββββββββββββββββββββββββββ€
β 1. Frontmatter β 1. Explicit negativesβ 1. π‘οΈ WHY (Rationale) β
β 2. ASCII Boards β 2. XML tag bounds β 2. π οΈ WHAT (Action) β
β 3. Phase gates β 3. Strict invariants β 3. π HOW (Mechanics) β
βββββββββββββββββββββ΄βββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββπ 1. STRUCTURE & LAYOUT (Visual Attention Anchoring)
- YAML Frontmatter: Always prefix files/prompts with meta-variables (name, description, triggers).
- ASCII Dashboards: Anchor the start of your prompt with a spatial text grid (like the one above) to help the model maintain attention across long context windows.
- XML Boundaries: Keep inputs, constraints, and templates separated inside tags:
<rules> - Never use "any" types. </rules>
π‘οΈ 2. SAFETY & STRICT RULES (Invariant Definition)
- Positive vs. Negative Rules: Clear directives (
MUST) combined with strict constraints (NEVER/AVOID). - Failure Modes (Anti-Patterns): List common pitfalls with a red cross
βto trigger negation weights. - Checklist Gates: Use
- [ ]phase tasks so the model can track progress state.
π 3. EXPLAINABILITY (The Why/What/How Rules)
All generated scripts, templates, and instructions must include inline annotated blocks:
π‘οΈ WHY: Architectural requirement or performance invariant.π οΈ WHAT: Concrete change or command description.π HOW: Technical execution method.