Master prompt
The master prompt (prompts/master_prompt.md) contains the core translation rules that apply to all texts:
- Script lock: Forbids Arabic script in output (except ﷺ)
- Transliteration standards: ALA-LC with diacritics (ā ī ū ḥ ṣ ḍ ṭ ẓ ʿ ʾ)
- ID integrity: Preserves segment markers exactly
- Output format: Plain text only (no Markdown)
- Term definitions: Technical terms must follow
translit (English)pattern
The master prompt acts as the “grounding” layer. Every specialized addon is stacked on top of it.
Core constraints
The master prompt enforces eight critical negations:- NO SANITIZATION - Preserve polemical terms literally
- NO META-TALK - Output translation only
- NO MARKDOWN - Plain text format
- NO EMENDATION - Don’t fix typos in source
- NO INFERENCE - Don’t guess missing text
- NO RESTRUCTURING - Preserve source structure
- NO OPAQUE TRANSLITERATION - Translate phrases
- NO INVENTED SEGMENTS - Never create new IDs
Arabic leak prevention
The master prompt’s highest-priority rule is preventing Arabic script from appearing in output:Locked formulae
Certain Islamic phrases are “locked” and must appear in transliteration without translation:| Arabic | Locked output | Forbidden |
|---|---|---|
| السلام عليكم | al-salāmu ʿalaykum | ”peace be upon you” |
| إن شاء الله | in shāʾ Allah | ”God willing” |
| سبحان الله | subḥān Allah | ”glory be to God” |
| الحمد لله | al-ḥamdu li-Allah | ”praise be to God” |
| الله أكبر | Allahu akbar | ”Allah is Greatest” |
Addon prompts
Addons are specialized rule sets for different genres of Islamic texts. Each addon is stacked on top of the master prompt.Available addons
Wobble-bibble includes addons for:- hadith.md - Ḥadīth narration chains (isnād)
- fiqh.md - Legal rulings and jurisprudence
- tafsir.md - Qurʾānic commentary
- fatawa.md - Legal verdicts and Q&A
- encyclopedia_mixed.md - Mixed-genre encyclopedic works
- jarh_wa_tadil.md - Narrator criticism and praise
- usul_al_fiqh.md - Legal theory and principles
Example: Hadith addon
The hadith addon (prompts/hadith.md) adds transmission-specific rules:
Example: Fiqh addon
The fiqh addon (prompts/fiqh.md) adds legal terminology rules:
Accessing prompts
The library provides a typed API for accessing stacked prompts:Prompt metadata
Each prompt includes metadata:How stacking works
Prompts are stacked at runtime using a simple concatenation:The master prompt always comes first, followed by the addon. This ensures base rules are loaded before specialized overrides.
Prompt generation
Prompts are bundled at build time:- Prompt files are stored as Markdown in
prompts/ bun run generatereads all.mdfiles- Generates TypeScript definitions in
.generated/prompts.ts - The generated file is git-ignored
This keeps the source tree clean and separates content from code. The
.generated/ directory is created during npm run build.Next steps
Validation
Learn how output is validated against rules
Stacking
Understand how master and addon rules interact