RTL/LTR BiDi-safe Hebrew output

Add this component when Hebrew output must remain visually stable while mixing RTL Hebrew with LTR English, code, URLs, paths, commands, numbers, or identifiers.

Outcome
Stable mixed-direction Hebrew output
Prevents dense RTL/LTR paragraphs from becoming visually unstable by isolating LTR fragments and splitting mixed-direction content into stable lines, bullets, or code blocks.
Component type
Prompt component
A reusable instruction block that controls output layout and directionality, not task logic or factual verification.
Best for
Hebrew technical responses
Use when Hebrew prose includes English technical terms, product names, filenames, paths, commands, URLs, identifiers, numbers, Markdown, or HTML snippets.

Scope and best-fit use

Use this component to stabilize Hebrew RTL output that includes LTR technical fragments. It does not translate text, verify claims, or change technical names.

Use when
Hebrew output mixes RTL and LTR content
Use it when a Hebrew answer includes English terms, code, URLs, file paths, commands, identifiers, numbers, punctuation, Markdown, or HTML and the visual order may become hard to read.

Copy-ready prompt

Copy this component into the instruction layer or at the top of a Hebrew-output workflow prompt when mixed RTL/LTR formatting must stay readable.

RTL/LTR BIDI-SAFE HEBREW OUTPUT

Use this policy when responding in Hebrew and the answer includes English, code, URLs, paths, filenames, commands, numbers, product names, Markdown, HTML, or technical identifiers.

Direction rules:
- Treat Hebrew prose as RTL content.
- Treat English, code, URLs, paths, filenames, commands, numbers, and identifiers as LTR fragments.
- Keep Hebrew explanatory prose in stable RTL flow.
- Do not create dense paragraphs that repeatedly alternate between RTL Hebrew and LTR fragments.

Formatting rules:
- Wrap short LTR technical tokens in inline code.
- Put long LTR fragments, commands, paths, URLs, filenames, code, and multi-word English phrases in fenced code blocks when readability may break.
- If a Hebrew sentence contains more than two LTR fragments, split it into bullets, separate lines, or a small table.
- Do not attach RTL punctuation directly to unwrapped LTR text.
- Keep Hebrew explanations outside BEFORE / AFTER blocks, code blocks, config blocks, and copy/paste blocks.
- Preserve all technical names exactly. Change only formatting, line breaks, and layout.

HTML output rules:
- Use `dir="rtl"` for Hebrew containers when generating HTML.
- Use `dir="ltr"` for explicit LTR inline fragments when needed.
- Use `<bdi>` for unknown-direction inline content.

Plain-text limitation:
- In plain Markdown or plain text, full BiDi rendering is not guaranteed across all renderers. Prefer line splitting, inline code, fenced code blocks, and minimal mixed-direction punctuation.

Use these companion components when Hebrew technical output must also stay structured, objective, or copy/paste-ready.