Phase 1-2 build: Steps 5-6, 8-13

Shoresh Engine (Haskell, Step 5)
- 12 modules: Types, Lexicon, Binyanim, Teamim, Gematria, Graph,
  KetivQere, Smikhut, Havdalah, Kriah, KiTov, Firmware
- 33 EUnit tests, 0 failures
- Firmware module verifies L1 SHA-256 hash at startup

Talmudic Engine (SWI-Prolog, Step 6)
- 15 modules: halt, reasoning, specification, interface
- 57 PlUnit tests, 0 failures
- Three cardinal halt conditions: avodah_zarah, shfichut_damim, gilui_arayot

Vav Pipeline (Elixir, Steps 8-11)
- 14 modules: BereishitCycle, Shema, Cloud, Manna, L1Reader,
  Specification, HaltConditions, ShabbatTimer, CycleLog, Chatzotzrot,
  ShoreshEngineClient, TalmudicEngineClient, Application
- 46 ExUnit tests, 0 failures
- Nishma-first architecture: hears before it speaks

Sanhedrin Framework (Erlang/OTP, Step 12)
- 8 modules: sanhedrin_app, sanhedrin_sup, escalation, panel_sup,
  panel, judge, clerk, halt_monitor
- 46 EUnit tests, 0 failures (includes fix: rejected outcome now reachable)
- Panel sizes: 1/3/23/71 — unanimous capital guilty → acquit (Sanhedrin 17a)
- Minority opinions append-only, never deleted

Korban Processor (Python, Step 13)
- 6 modules: korban, shechitah, semichah, zerikah, haktarah, router

Builder tooling: AGENTS.md, opencode.json, memory/, src/tools/

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Scott KarpandClaude Sonnet 4.6 committed 2026-02-26 14:02:34 -05:00
1 parent 622e814c9e
commit 80ec364da6
86 files changed
+9646

No files matched your search

+86
View File
@@ -0,0 +1,86 @@
%% reasoning_test.pl — Tests for the dialectical reasoning engine.
:- use_module(library(plunit)).
:- use_module('../src/reasoning/interpret').
:- use_module('../src/reasoning/challenge').
:- use_module('../src/reasoning/resolve').
:- use_module('../src/reasoning/teiku').
:- use_module('../src/specification/mitzvot').
:- use_module('../src/specification/torah_text').
:- begin_tests(interpret).
%% Can interpret a case about creation
test(interpret_creation, [nondet]) :-
Case = case(test_creation, creation, [bet_resh_aleph], 'What is creation?'),
interpret(Case, Interpretation),
Interpretation = interpretation(test_creation, _, _, _, _).
%% Interpretation finds relevant verses
test(interpret_finds_verses, [nondet]) :-
Case = case(test_verses, creation, [bet_resh_aleph], 'Find creation verses'),
interpret(Case, interpretation(_, _, Verses, _, _)),
Verses \= [].
%% Interpretation finds relevant mitzvot
test(interpret_finds_mitzvot, [nondet]) :-
Case = case(test_mitzvot, judgment, [shin_pe_tet], 'How to judge?'),
interpret(Case, interpretation(_, Mitzvot, _, _, _)),
Mitzvot \= [].
%% High confidence when both mitzvot and verses found
test(interpret_high_confidence, [nondet]) :-
Case = case(test_conf, holiness, [qof_dalet_shin], 'What is holiness?'),
interpret(Case, interpretation(_, _, _, _, high)).
:- end_tests(interpret).
:- begin_tests(challenge).
%% Can challenge an interpretation about judgment (justice vs mercy tension)
test(challenge_judgment, [nondet]) :-
Case = case(test_judgment, judgment, [shin_pe_tet, tzade_dalet_qof],
'How to judge righteously?'),
interpret(Case, Interpretation),
challenge(Interpretation, Kushya),
Kushya = kushya(_, _, _).
%% Challenge has a strength
test(challenge_has_strength, [nondet]) :-
Case = case(test_str, judgment, [shin_pe_tet], 'Test strength'),
interpret(Case, Interpretation),
challenge(Interpretation, kushya(_, _, Strength)),
member(Strength, [strong, moderate, weak]).
:- end_tests(challenge).
:- begin_tests(resolve).
%% Can resolve a simple case (no challenge)
test(resolve_simple, [nondet]) :-
Case = case(test_simple, creation, [bet_resh_aleph], 'What is creation?'),
resolve(Case, Resolution),
( Resolution = accepted(_)
; Resolution = challenged(_, _)
; Resolution = synthesized(_, _, _)
; Resolution = teiku(_)
).
%% Resolution produces some result
test(resolve_produces_result, [nondet]) :-
Case = case(test_result, holiness, [qof_dalet_shin], 'What is holiness?'),
resolve(Case, _Resolution).
:- end_tests(resolve).
:- begin_tests(teiku_module).
%% Teiku count starts at zero (or is a number)
test(teiku_count_works) :-
teiku_count(Count),
integer(Count).
:- end_tests(teiku_module).