Skip to content

Frequently Asked Questions

General

What is Mistaber?

Mistaber is a formal symbolic reasoning system for computational halacha (Jewish law). It uses Kripke semantics and Answer Set Programming to model how different halachic authorities (poskim) rule on various questions, enabling automated reasoning about disputes, inheritance of rulings, and source traceability.

Is Mistaber a posek (halachic decisor)?

No. Mistaber is a research and analysis tool, not a substitute for consulting a qualified rabbi. It shows what different authorities hold according to encoded rules, but does not issue practical halachic rulings.

What domains does Mistaber currently cover?

Currently, Mistaber covers Yoreh Deah simanim 87-92 (Basar Bechalav / Meat and Milk laws) as a pilot implementation. This includes:

  • 7 halachic authorities (worlds)
  • Core commentators (Shach, Taz)
  • Prohibition types, normative levels, and safek handling

What makes Mistaber different from existing halacha databases?

Feature Traditional Databases Mistaber
Data model Text search / keywords Formal logic propositions
Reasoning Manual lookup Automated inference
Disputes Listed separately Detected automatically via world comparison
Sources References only Full derivation chains
Uncertainty Not formalized Safek calculus with resolution policies

Technical

What is Kripke semantics?

Kripke semantics is a framework from modal logic where propositions can be true in some "possible worlds" but false in others. In Mistaber, each halachic authority (posek) is modeled as a world. A proposition like "fish with dairy is forbidden" can be true in the Mechaber's world but false in the Rema's world.

What is Answer Set Programming (ASP)?

ASP is a form of declarative programming suited for knowledge representation and reasoning. Mistaber uses Clingo, the leading ASP solver, because ASP excels at:

  • Non-monotonic reasoning (rules with exceptions)
  • Default reasoning (what holds unless overridden)
  • Multiple stable models (different valid conclusions)

Why not use a Large Language Model (LLM)?

LLMs are powerful for text processing but have limitations for halachic reasoning:

Aspect LLM Mistaber
Explainability "Black box" Full derivation trees
Consistency May contradict itself Formally consistent
Source fidelity May hallucinate Every rule has makor
Authority modeling Single voice Multi-world semantics
Verifiability Hard to audit Rules are inspectable

Mistaber and LLMs could complement each other - an LLM could help translate natural language queries into Mistaber's formal language.

What are the system requirements?

  • Python 3.10+
  • Clingo 5.6.0+ (ASP solver)
  • Optional: asprin (for preference optimization)
  • Optional: xclingo (for explanations)

Usage

How do I query for a specific ruling?

# Check if something holds in a world
mistaber -o ./mistaber/ontology query "holds(issur(achiila, M, D), mechaber)"

# Compare across worlds
mistaber -o ./mistaber/ontology compare "holds(issur(achiila, M, D), W)" --worlds "mechaber,rema"

How do I add my own rules?

  1. Create a .lp file in mistaber/ontology/extensions/
  2. Use the HLL syntax with @world, @rule, @makor, @madrega directives
  3. Rules will be loaded automatically

See the Extension Protocol for details.

Can I add new halachic authorities (worlds)?

Yes! Create a new .lp file in mistaber/ontology/worlds/ with:

world(my_posek).
accessible(my_posek, parent_world).  % Inherit from parent

% Override specific rulings
override(my_posek, some_proposition, reason).

% Assert new rulings
asserts(my_posek, new_ruling).

How do I handle uncertainty (safek)?

Mistaber uses safek policies that vary by world:

engine.configure(
    world="ashk_mb",
    safek_resolution="chumra"  # or "kula", "madrega"
)

The system applies: - Safek d'oraita l'chumra (biblical doubt → stringent) - Safek d'rabanan l'kula (rabbinic doubt → lenient)


Encoding & Plugin

What is the mistaber-skills plugin?

mistaber-skills is a Claude Code plugin that provides an AI-assisted workflow for encoding halachic content into Mistaber. It includes 6 skills, 7 enforcement hooks, and 1 orchestrating agent to guide you through the encoding pipeline with human checkpoints at each phase.

How do I start encoding halacha?

  1. Install the plugin: claude plugins add ./mistaber-skills
  2. Start a session: claude "I want to encode YD 87:3"
  3. Follow the guided workflow through 4 checkpoints
  4. Each phase requires human approval before proceeding

See the Encoding Workflow Guide for detailed instructions.

What are checkpoints?

Checkpoints are mandatory human approval points in the encoding workflow:

Checkpoint Phase What You Review
Checkpoint 1 corpus-prep Source texts, derivation chains
Checkpoint 2 hll-encode Generated HLL rules
Checkpoint 3 validate Test results, compilation
Checkpoint 4 review Full encoding package

You must type "approved" at each checkpoint to proceed.

What's the difference between override and asserts?

asserts/2 creates a positive assertion in a world:

asserts(mechaber, issur(achiila, fish_dairy, sakana)).

override/3 blocks inheritance of a rule from parent worlds with a descriptive reason:

override(dag_bechalav_is_sakana, rema, no_sakana).

Key rule: Override's third argument must be a descriptive value (like no_sakana), never invalid.

Why can't I write .lp files directly?

The phase-gate hook prevents writing .lp files until you've completed the corpus-prep checkpoint. This ensures:

  1. You've reviewed the source texts
  2. The derivation chain is complete
  3. You understand what you're encoding

To bypass (not recommended), you'd need to modify the hook configuration.

How do I handle a machloket (dispute)?

  1. Encode the base position in the base world
  2. Use override/3 in disagreeing worlds with descriptive reasons
  3. Test both positions with multi-world queries
  4. Document the machloket in your encoding report

Example (fish & dairy):

% Base: fish with dairy is dangerous
asserts(base, sakana(fish_dairy)).

% Rema: no danger
override(dag_bechalav_is_sakana, rema, no_sakana).

See the Machloket Handling Tutorial.

What test coverage is required?

Minimum test requirements for each encoding:

Test Type Minimum Count Purpose
Positive tests 5 Verify expected rulings
Negative tests 3 Verify boundaries
Edge case tests 2 Cover unusual scenarios
Multi-world tests 2 (if applicable) Verify inheritance

See the Testing Requirements guide.

What sources can I use for encoding?

The plugin integrates with Sefaria MCP for fetching sources. Supported sources include:

  • Shulchan Aruch (primary)
  • Major commentators (Shach, Taz, Pri Megadim)
  • Later authorities (Mishnah Berurah, Aruch HaShulchan, Yalkut Yosef)
  • Talmudic sources for derivation chains

The corpus-prep skill helps you gather and organize all relevant sources.

How are rules named?

Rules use topic-based naming, not siman-seif references:

Correct Incorrect
r_bb_dag_sakana r_87_3
r_bb_beheima_achiila r_yd_87_1
r_bb_of_bishul r_siman87_seif1

This makes rules more readable and maintainable.

What are the 7 Kripke worlds?

World Authority Tradition Inherits From
base Shulchan Aruch Universal
mechaber R' Yosef Karo Sefardi base
rema R' Moshe Isserles Ashkenazi base
gra Vilna Gaon Litvish base
sefardi_yo Yalkut Yosef Modern Sefardi mechaber
ashk_mb Mishnah Berurah Litvish rema
ashk_ah Aruch HaShulchan Russian rema, gra

Where can I learn more about encoding?

Resource Description
Encoding Guide Overview of the encoding workflow
Encoding Tutorials Hands-on tutorials
Encoding Guidelines Best practices and standards
Plugin Documentation Detailed plugin docs
Glossary Terms and definitions

Contributing

How can I contribute?

See the Contributing Guide for:

  • Setting up the development environment
  • Running tests
  • Code style guidelines
  • Pull request process

I'm not a halacha expert. Can I still contribute?

Absolutely! Many contributions don't require domain expertise:

  • Tests - Add edge cases, improve coverage
  • Documentation - Fix typos, add examples
  • Tooling - CLI improvements, performance
  • Bug fixes - General software issues

Where do I report bugs or request features?

Open an issue on GitHub.


Troubleshooting

"Clingo not found" error

Install Clingo:

# Ubuntu/Debian
sudo apt install gringo

# macOS
brew install clingo

# pip (cross-platform)
pip install clingo

"Unsatisfiable" result

This usually means contradictory facts were asserted. Common causes:

  • A food item classified as both basar and chalav (violates disjointness)
  • Conflicting assertions without proper override

Check your facts for logical consistency.

Slow query performance

Large ontologies with many variables can slow grounding. Tips:

  • Use concrete values instead of variables where possible
  • Add constraints early to prune the search space
  • Use #show directives to limit output

Have a question not answered here? Open an issue with the "question" label.