⚑ 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.