npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

wobble-bibble

v1.2.0

Published

TypeScript library for Islamic text translation prompts with LLM output validation and prompt stacking utilities.

Readme

wobble-bibble 🕌

npm version codecov Size License: MIT Bun TypeScript Linter: Biome Status Version Focus Standard wakatime

TypeScript library for Islamic text translation prompts with LLM output validation and prompt stacking utilities.

Installation

npm install wobble-bibble
# or
bun add wobble-bibble

Features

  • Bundled Prompts: 8 optimized translation prompts (Hadith, Fiqh, Tafsir, etc.) with strongly-typed access
  • Translation Validation: Catch LLM hallucinations like malformed segment IDs, Arabic leaks, forbidden terms
  • Prompt Stacking: Master + specialized prompts combined automatically
  • Gold Standards: High-fidelity reference dataset for benchmarking

Quick Start

Get Translation Prompts

import { getPrompt, getPrompts, getPromptIds } from 'wobble-bibble';

// Get a specific stacked prompt (strongly typed)
const hadithPrompt = getPrompt('hadith');
console.log(hadithPrompt.content); // Master + Hadith addon combined

// Get all available prompts
const allPrompts = getPrompts();

// Get list of prompt IDs for dropdowns
const ids = getPromptIds(); // ['master_prompt', 'hadith', 'fiqh', ...]

Validate LLM Output

import { validateTranslationResponse } from 'wobble-bibble';

const segments = [
    { id: 'P1234', text: '... Arabic source for P1234 ...' },
    { id: 'P1235', text: '... Arabic source for P1235 ...' },
];

const llmOutput = `P1234 - Translation of first segment
P1235 - Translation of second segment`;

const result = validateTranslationResponse(segments, llmOutput);
if (result.errors.length > 0) console.error(result.errors);

API Reference

Prompts

| Function | Description | |----------|-------------| | getPrompt(id) | Get a specific stacked prompt by ID (strongly typed) | | getPrompts() | Get all available stacked prompts | | getStackedPrompt(id) | Get just the prompt content string | | getMasterPrompt() | Get raw master prompt (for custom addons) | | getPromptIds() | Get list of available prompt IDs | | stackPrompts(master, addon) | Manually combine prompts |

Validation

| Function | Description | |----------|-------------| | validateTranslationResponse(segments, response) | Unified validator for LLM translation responses (IDs, Arabic leak, invented IDs, gaps, speaker-label drift, etc.) | | VALIDATION_ERROR_TYPE_INFO | Human-readable descriptions for each ValidationErrorType (for UI/logging) |

Utilities

| Function | Description | |----------|-------------| | formatExcerptsForPrompt(segments, prompt) | Format segments for LLM input | | normalizeTranslationText(text) | Normalize newlines and split merged markers onto separate lines | | extractTranslationIds(text) | Extract all segment IDs from "ID - ..." markers |

Available Prompts

| ID | Name | Use Case | |----|------|----------| | master_prompt | Master Prompt | Universal grounding rules | | hadith | Hadith | Isnad-heavy texts, Sharh | | fiqh | Fiqh | Legal terminology | | tafsir | Tafsir | Quranic exegesis | | fatawa | Fatawa | Q&A format | | encyclopedia_mixed | Encyclopedia Mixed | Polymath works | | jarh_wa_tadil | Jarh Wa Tadil | Narrator criticism | | usul_al_fiqh | Usul Al Fiqh | Legal methodology |

Prompt Development

See docs/refinement-guide.md for the methodology used to develop and test these prompts. See AI_REVIEW_PROMPT.md for the peer-review prompt template used when sending round packets to external agents.

License

MIT