A house style for Mishnah text — clear punctuation, elegant layout, and structural formatting that makes the rhetoric visible on the page.
This repo contains:
- Formatted masechot — one HTML file per masechet, all 63 tractates, verified clean against Sefaria
- Documentation:
- Editorial style guide — the authoritative formatting rules
- HTML format spec — HTML structure, anchors, CSS conventions
- How verification works — normalization pipeline and comparison logic
- Verification report — error categories found and lessons learned
- Entities knowledge base — design spec for an accumulating store of people, places, and plants in the Mishnah (v0, foundational)
- Entities display & UX — how entities are rendered: the in-text color overlay and the derived entity/map/gallery views (v0, foundational)
- Scripts — full pipeline for downloading, formatting, verifying, fixing, and merging:
scripts/download.py— fetch raw JSON from Sefaria APIscripts/format.py— format JSON using Ollama, Anthropic API, or Claude Codescripts/verify.py— cross-check HTML against Sefaria sourcescripts/fix.py— programmatic fixes + LLM regen for errorsscripts/merge.py— apply JSON corrections into HTML filesscripts/update-readme.py— regenerate masechot table from meta tags
- Entities knowledge base (
entities/) — an accumulating store of people, places, and plants in the Mishnah (KB spec, display spec). YAML is the source of truth (runpip install -r entities/requirements.txtfirst):scripts/kb-validate.py— validateentities/data/against the JSON schemas + semantic cross-checksscripts/kb-build.py— compile the YAML into the derivedentities/knowledge.dbscripts/kb-render.py— render the static entity/index/map/gallery site intoentities/site/(display phase 2)scripts/kb-enrich.py— weave the entity overlay (CSS-only per-type toggle + links) into copies of the masechot underentities/site/read/(display phase 3); canonical masechot are never modifiedscripts/kb-import-wikidata.py,scripts/kb-import-pleiades.py— enrich entities from external sources (additive, idempotent;--inputruns offline againstentities/fixtures/)scripts/kb-detect.py+scripts/kb-promote.py— populate the KB from the corpus: detect entities mishna-by-mishna (--mode boldoffline,--mode llmon your machine), review inentities/review/index.html, promote into stubs / rejections / rules (detection spec)scripts/kb-selftest.py— quick offline smoke of the §8 merge-rule invariantstests/— full suite, one module per deliverable:python3 -m unittest discover -s tests -t tests
- A Claude skill (
.claude/skills/mishnah/) for interactive formatting in Claude Code
The formatting approach treats each mishna as a rhetorical document. Line breaks, em-dashes, colons, and bold attributions work together to make the structure — case vs. ruling, opinion vs. counter-opinion, parallels and kal vachomer — visible at a glance.
Key conventions:
- Bold rabbinic names and collective bodies (not verbs)
- Em-dashes bind case to ruling, with structural line breaks
- Colons introduce direct statements and enumerations
- ~8 Hebrew words per line, broken at natural syntactic joints
- Deep-linking anchors on every perek and mishna
All scripts accept masechet <name>, seder <name>, or shas as scope. Use --ref to target a chapter (3) or mishna (3:5).
download.py → sefaria/*.json (raw source from Sefaria)
format.py → output/*.json (LLM-formatted mishnayot)
verify.py → output/*.json/html (verification report)
fix.py → output/*.json (corrections)
merge.py → masechot/*.html (applies JSON into HTML files)
python3 scripts/download.py masechet Berakhot
python3 scripts/download.py seder Zeraim
python3 scripts/download.py shaspython3 scripts/format.py masechet Berakhot --backend anthropic
python3 scripts/format.py masechet Berakhot --ref 3:5 --backend ollama
python3 scripts/format.py seder Zeraim --backend claude-code
python3 scripts/format.py shas --backend anthropicBackends: ollama (local), anthropic (API, needs ANTHROPIC_API_KEY), claude-code (headless CLI).
python3 scripts/verify.py masechet Berakhot
python3 scripts/verify.py masechet Berakhot --ref 3
python3 scripts/verify.py seder Zeraim
python3 scripts/verify.py shas --report output/reportWith --report PATH, writes PATH.json (for fix.py) and PATH.html (human-readable).
python3 scripts/fix.py --report output/report.json # programmatic only
python3 scripts/fix.py --report output/report.json --backend anthropic # + LLM regen
python3 scripts/fix.py --report output/report.json --dry-run # previewpython3 scripts/merge.py output/keilim-fixes.json
python3 scripts/merge.py output/keilim-formatted.json
python3 scripts/merge.py output/*.jsonOnly merge.py writes to masechot/. Handles both patching existing mishnayot and inserting missing ones.
git clone https://github.com/mig2/mishnah-style.git
cd mishnah-style
claude # the skill is available automaticallyAll 63 masechot formatted. Last updated: 44bdd8d (2026-05-24).
| Seder | Masechot |
|---|---|
| Zeraim | Brachot, Peah, Demai, Kilayim, Sheviit, Terumot, Maaserot, Maaser Sheni, Challah, Orlah, Bikkurim |
| Moed | Shabbat, Eruvin, Pesachim, Shekalim, Yoma, Sukkah, Beitzah, Rosh Hashanah, Taanit, Megillah, Moed Katan, Chagigah |
| Nashim | Yevamot, Ketubot, Nedarim, Nazir, Sotah, Gittin, Kiddushin |
| Nezikin | Bava Kamma, Bava Metzia, Bava Batra, Sanhedrin, Makkot, Shevuot, Eduyot, Avodah Zarah, Avot, Horayot |
| Kodashim | Zevachim, Menachot, Chullin, Bekhorot, Arakhin, Temurah, Keritot, Meilah, Tamid, Middot, Kinnim |
| Taharot | Kelim, Ohalot, Negaim, Parah, Taharot, Mikvaot, Niddah, Makhshirin, Zavim, Tevul Yom, Yadayim, Uktzin |
The Mishnah text is in the public domain. The formatting, style guide, and skill are available under MIT.