{"_id":"@alef-prime/middot","name":"@alef-prime/middot","dist-tags":{"alpha":"0.1.0-alpha.0","latest":"0.1.0-alpha.0"},"versions":{"0.1.0-alpha.0":{"name":"@alef-prime/middot","version":"0.1.0-alpha.0","description":"The 13 hermeneutic principles of Rabbi Yishmael (Beraita d'Rabbi Yishmael, opening of the Sifra), encoded as logical primitives. Apply 2,000-year-old reasoning rules to modern decisions. Born from ALEF-PRIME's spiritual depth round.","type":"module","main":"./index.mjs","types":"./index.d.ts","exports":{".":{"types":"./index.d.ts","default":"./index.mjs"}},"engines":{"node":">=18"},"keywords":["torah","halakha","logic","hermeneutics","rabbi-yishmael","13-middot","alef-prime"],"homepage":"https://www.n50.io/torah","repository":{"type":"git","url":"git+https://github.com/Ilya0527/alef-prime-middot.git"},"license":"MIT","author":{"name":"ALEF-PRIME","url":"Ilya Glikman"},"sideEffects":false,"gitHead":"e171e9fb27e76997c273d4fd2492d06c5393250d","_id":"@alef-prime/middot@0.1.0-alpha.0","bugs":{"url":"https://github.com/Ilya0527/alef-prime-middot/issues"},"_nodeVersion":"24.15.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-yaEjFBWotciVeGh5gQ0de8ZSVVIsUOJKIKDp5JCyFPffH1lRBLz9opl+H1qa9CQesH5An6d/WmGu2CRa3s0tWg==","shasum":"e478d53badea14338075970cbc237d090d306fd8","tarball":"https://registry.npmjs.org/@alef-prime/middot/-/middot-0.1.0-alpha.0.tgz","fileCount":4,"unpackedSize":16646,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIFK1WLv11v99nkhGdFrzKWWNWyJ2BHc5jMw3NospuIxIAiEAw7+Ra9w2qKSjCgMunoc1Ao+8Ah9uNByLiO9ig7MtWOw="}]},"_npmUser":{"name":"n50","email":"ilya0527@gmail.com"},"directories":{},"maintainers":[{"name":"n50","email":"ilya0527@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/middot_0.1.0-alpha.0_1779107621237_0.6323911129430575"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-18T12:33:41.152Z","0.1.0-alpha.0":"2026-05-18T12:33:41.400Z","modified":"2026-05-18T12:33:41.624Z"},"maintainers":[{"name":"n50","email":"ilya0527@gmail.com"}],"description":"The 13 hermeneutic principles of Rabbi Yishmael (Beraita d'Rabbi Yishmael, opening of the Sifra), encoded as logical primitives. Apply 2,000-year-old reasoning rules to modern decisions. Born from ALEF-PRIME's spiritual depth round.","homepage":"https://www.n50.io/torah","keywords":["torah","halakha","logic","hermeneutics","rabbi-yishmael","13-middot","alef-prime"],"repository":{"type":"git","url":"git+https://github.com/Ilya0527/alef-prime-middot.git"},"author":{"name":"ALEF-PRIME","url":"Ilya Glikman"},"bugs":{"url":"https://github.com/Ilya0527/alef-prime-middot/issues"},"license":"MIT","readme":"# @alef-prime/middot\n\n> The 13 hermeneutic principles of Rabbi Yishmael — 2,000-year-old reasoning rules, encoded.\n\nFrom the opening of the **Sifra** (Beraita d'Rabbi Yishmael), these are the thirteen logical principles by which the Oral Torah derives Halacha from the written Torah. The same principles work surprisingly well as a vocabulary for software decisions.\n\n```ts\nimport { kalVaChomer, klalUPrat, classifyMiddah, ALL_MIDDOT } from \"@alef-prime/middot\";\n\n// קל וחומר · a fortiori\nkalVaChomer({\n  lenient: { name: \"weekday prayer\", has: true },\n  strict:  { name: \"Shabbat prayer\" },\n});\n// → { middah: \"kal_vachomer\", he: \"קל וחומר\", applies: true,\n//     conclusion: \"If weekday prayer has it, then Shabbat prayer certainly has it.\" }\n\n// כלל ופרט · general then specific narrows\nklalUPrat({ general: \"all animals\", specific: \"cattle\" });\n// → \"all animals\" followed by \"cattle\" → scope is limited to cattle.\n\n// Classify a freeform line by which middah fits best:\nclassifyMiddah(\"If the test passes for the easy case, it must pass for the hard one too.\");\n// → { slug: \"kal_vachomer\", he: \"קל וחומר\", hint: \"...\" }\n```\n\n## The 13 middot\n\n| # | Slug | Hebrew | English |\n|---|---|---|---|\n| 1 | `kal_vachomer` | קל וחומר | A fortiori |\n| 2 | `gezera_shava` | גזירה שווה | Verbal analogy (requires mesorah) |\n| 3 | `binyan_av_mikatuv_echad` | בנין אב מכתוב אחד | Prototype from one verse |\n| 4 | `binyan_av_mishnei_ketuvim` | בנין אב משני כתובים | Prototype from two verses |\n| 5 | `klal_u_prat` | כלל ופרט | General then specific (narrows) |\n| 6 | `prat_u_klal` | פרט וכלל | Specific then general (expands) |\n| 7 | `klal_u_prat_u_klal` | כלל ופרט וכלל | General-Specific-General |\n| 8 | `yatza_lelamed` | יצא ללמד | Exception teaches the general |\n| 9 | `yatza_k_inyano` | יצא כעניינו | Exception, same matter (lenient only) |\n| 10 | `yatza_shello_k_inyano` | יצא שלא כעניינו | Exception, different matter (both ways) |\n| 11 | `yatza_ladun_b_davar_chadash` | יצא לדון בדבר חדש | Exception → new thing |\n| 12 | `lamed_me_inyano` | דבר הלמד מעניינו | Learned from context |\n| 13 | `lamed_misofo` | דבר הלמד מסופו | Learned from end / contradicting verses |\n\n## Why ship this as code?\n\nBecause logic that's been refined for two millennia is still logic. The 13 middot give you a *named, traceable* reasoning vocabulary for design decisions: *\"This refactor follows yatza_lelamed — the special case taught us something about all cases.\"* That's better documentation than `// TODO: maybe generalize this`.\n\n## Caveats\n\n- This package **encodes** the principles for clarity and naming. It does NOT make halachic rulings. Real halachic application of these middot requires `psak` from a qualified rabbi within the framework of mesorah.\n- `gezera_shava` in classical use requires received tradition. The code's verbal-matching is illustrative only.\n- The principles are about *deriving* law from text, not *legislating*. Use them to name your reasoning, not to claim authority.\n\n## Try it live\n\n[n50.io/torah](https://www.n50.io/torah) — interactive playground for all 13.\n\n## Status: alpha · 0.1.0\n\nBorn from [ALEF-PRIME](https://www.n50.io)'s wholeness round. Sibling of [`@alef-prime/audit`](https://github.com/Ilya0527/alef-site/tree/main/audit), [`@alef-prime/deploy-verify`](https://github.com/Ilya0527/alef-prime-deploy-verify), [`@alef-prime/i18n-pick`](https://github.com/Ilya0527/alef-prime-i18n-pick), [`@alef-prime/units`](https://github.com/Ilya0527/alef-prime-units), [`@alef-prime/penalty-ledger`](https://github.com/Ilya0527/alef-prime-penalty-ledger), [`@alef-prime/rtl-aware`](https://github.com/Ilya0527/alef-prime-rtl-aware). MIT.\n","readmeFilename":"README.md","_rev":"1-7103d659bb11574ad3be3870452c58c7"}