Skip to content

Instantly share code, notes, and snippets.

@arenagroove
Last active July 4, 2025 13:03
Show Gist options
  • Select an option

  • Save arenagroove/be56625f21781491a79c1a665d021590 to your computer and use it in GitHub Desktop.

Select an option

Save arenagroove/be56625f21781491a79c1a665d021590 to your computer and use it in GitHub Desktop.
A concise, practical guide defining strict rules for generating valid, unbroken Markdown output—ideal for AI assistants, chatbots, and automation tools. Ensures all content is wrapped in a single Markdown block, prevents formatting errors, and provides clear examples for consistent, reliable results.

✅ DOs & ❌ DON'Ts – Markdown Output Policy V2

This guide defines how the assistant must behave when generating Markdown responses, Markdown files, or embedded Markdown code.


✅ DO

  • ✅ Wrap the entire output in one continuous Markdown code block using four backticks:

    (your content here)
  • ✅ Use triple backticks (```) inside for any inner code blocks:

    ```json
    {
      "example": "value"
    }
    ```
  • ✅ Preserve all quotes correctly:

    • Double quotes: "example"
    • Single quotes: 'example'
    • Inline code: `example`
  • ✅ Truncate at the end if content exceeds length. No continuation messages or splitting allowed.

  • ✅ Allow mixed Markdown content (headings, lists, code, quotes) — but wrap everything in the outer Markdown block.


❌ DON'T

  • ❌ Do NOT split the output into multiple Markdown blocks.
  • ❌ Do NOT nest Markdown inside Markdown.
  • ❌ Do NOT include YAML frontmatter or metadata inside the response block.
  • ❌ Do NOT use ---, yaml, or any format-specific separators inside the Markdown output.
  • ❌ Do NOT add explanations, summaries, or commentary outside the block.
  • ❌ Do NOT escape quotes unless required by the inner syntax (e.g. JSON).
  • ❌ Do NOT restart or continue content across outputs.

🔁 Example Pattern

# Section Title

Some explanation with "quotes", 'single quotes', and `inline code`.

```javascript
function example() {
  console.log("No nesting or breaks.");
}
```

Always follow this structure unless explicitly instructed otherwise.


⚠ Handling Prompt Examples and Inner Blocks

To avoid breaking the Markdown output format:

  • Do NOT include triple backticks (```) inside the Markdown block.

  • Instead, use one of the following strategies for multi-line prompts or embedded text:

    • Indent with 4 spaces to simulate a code block:

      Summarize the product using Drift 3 and Narrative Essence.
      Format as a founder pitch slide.
      
    • Use placeholder labels instead of literal code fences:

      [BEGIN PROMPT]
      Rewrite the product brief as a metaphor story.
      [END PROMPT]

    • For short prompts, wrap with inline backticks:

      Summarize this launch announcement with Drift 2 and Balanced Clarity.

  • Avoid using curly quotes (“”) inside code examples. Use straight quotes ("), unless smart quotes are required for stylistic consistency.

These rules ensure the Markdown output remains valid and avoids accidental splitting or syntax errors.


📄 Structured Prompt Templates with Placeholders

When documenting or sharing structured prompts that include {placeholder} variables (e.g., {file_format}, {tone}, {goal}, {user_input}), follow these guidelines:

  • ✅ Treat the content as a symbolic scaffold, not literal code
  • ✅ Do not wrap the full prompt in triple backticks (```)
  • ✅ Use plain Markdown paragraphs or indent with 4 spaces if needed for clarity
  • ✅ Always preserve {...} syntax as-is — no escaping, quoting, or italics
  • ✅ Optionally include a short placeholder reference list below the template

This format is compatible with:

  • 🧠 LLM instruction prompts
  • 🎨 Visual generation cues
  • 🔁 Remixable narrative scaffolds
  • 🔧 API or tool-facing prompt shells

📌 Example Template

Rewrite the following `{content_type}` for `{audience}` using `{tone}` and `{format}`. Include `{drift_level}` for variation.

Output structure:
1. `{headline}`
2. `{summary}`
3. `{call_to_action}`

Placeholder Examples:

  • {content_type}: newsletter, product description, case study
  • {tone}: inspirational, skeptical, neutral
  • {drift_level}: 0–5 (controls symbolic remix)
  • {format}: bullet list, slide stack, manifesto

✅ DOs & ❌ DON'Ts – Markdown Output Policy

This guide defines how the assistant must behave when generating Markdown responses, Markdown files, or embedded Markdown code.


✅ DO

  • ✅ Wrap the entire output in one continuous Markdown code block using four backticks:

    (your content here)
  • ✅ Use triple backticks (```) inside for any inner code blocks:

    ```json
    {
      "example": "value"
    }
    ```
  • ✅ Preserve all quotes correctly:

    • Double quotes: "example"
    • Single quotes: 'example'
    • Inline code: `example`
  • ✅ Truncate at the end if content exceeds length. No continuation messages or splitting allowed.

  • ✅ Allow mixed Markdown content (headings, lists, code, quotes) — but wrap everything in the outer Markdown block.


❌ DON'T

  • ❌ Do NOT split the output into multiple Markdown blocks.
  • ❌ Do NOT nest Markdown inside Markdown.
  • ❌ Do NOT include YAML frontmatter or metadata inside the response block.
  • ❌ Do NOT use ---, yaml, or any format-specific separators inside the Markdown output.
  • ❌ Do NOT add explanations, summaries, or commentary outside the block.
  • ❌ Do NOT escape quotes unless required by the inner syntax (e.g. JSON).
  • ❌ Do NOT restart or continue content across outputs.

🔁 Example Pattern

# Section Title

Some explanation with "quotes", 'single quotes', and `inline code`.

```javascript
function example() {
  console.log("No nesting or breaks.");
}
```

Always follow this structure unless explicitly instructed otherwise.


⚠ Handling Prompt Examples and Inner Blocks

To avoid breaking the Markdown output format:

  • Do NOT include triple backticks (```) inside the Markdown block.

  • Instead, use one of the following strategies for multi-line prompts or embedded text:

    • Indent with 4 spaces to simulate a code block:

      Summarize the product using Drift 3 and Narrative Essence.
      Format as a founder pitch slide.
      
    • Use placeholder labels instead of literal code fences:

      [BEGIN PROMPT]
      Rewrite the product brief as a metaphor story.
      [END PROMPT]

    • For short prompts, wrap with inline backticks:

      Summarize this launch announcement with Drift 2 and Balanced Clarity.

  • Avoid using curly quotes (“”) inside code examples. Use straight quotes ("), unless smart quotes are required for stylistic consistency.

These rules ensure the Markdown output remains valid and avoids accidental splitting or syntax errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment