Architecture §3.5 listed a Python-Prolog FFI among the Korban
Processor's dependencies ("swipl-ffi (or pyswip)"); Construction §1.4
and terumah pinned pyswip. It was declared, installed in every image,
and never imported. The Korban Processor does not call Prolog: haktarah
emits Prolog-format STRINGS, and the pipeline carries them to the
Talmudic Engine over its Unix socket (Construction §3.3). The korban
image has no libswipl, so the package could not have been used there
had anything tried. Tablet 35 corrected its version; the transmitter's
word is to remove it.
Removed from:
- specs/shorashim_architecture.md §3.5 requirements
- specs/shorashim_vayakhel.md §1.4
- specs/shorashim_terumah.md (materials row; the compatibility-testing
line now names hebrew-tokenizer alone)
- BUILD_KORBAN.md
- korban_processor/pyproject.toml, poetry.lock (regenerated)
- deploy/docker/Dockerfile.korban_processor
Doorpost @expected_hash 81da49d4… → 2f40c382…, in this commit, with the
three witnessed files that moved it (architecture, vayakhel,
BUILD_KORBAN).
Read before committing: Elixir 461/0 (seeds 0, 42); korban 222 passed,
1 skipped against the installed package with pyswip absent; korban
image starts and idles as before; vav-pipeline image reports
specification_identity verified 2f40c382… and l1_hash pass.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
7.5 KiB
Build Task: Korban Processor + Structure Integration
Vayakhel Moshe et kol adat b'nei Yisrael vayomer aleihem: eileh had'varim asher tzivah Hashem la'asot otam. Moshe assembled the whole congregation and said: these are the things God commanded, to do them. — Shemot 35:1
Before You Write Code
Read these files in this order. Do not summarize from memory. Read fresh.
specs/structure_not_content.md— Read this first. This changes what the build means.specs/shorashim_architecture.md§3.5 (Korban Processor)specs/shorashim_vayakhel.md§1.4 (Python dependencies), §3.4 (external model API contracts)specs/broken_tablets/README.md— see where the calf was- This file
The system you are building is not only a Torah-reading engine. It is a carrier of Torah's structure. The Korban Processor is where the outside world's raw output enters the system. It is the courtyard gate. It is where the offering arrives. What you build here determines what the system receives.
The offering protocol — semichah, shechitah, zerikah, haktarah, routing — is not metaphor. It is specification. Each step strips a layer of the external model's form to reveal the vital content underneath. The carrier's wrapping (the assistant preamble, the markdown formatting, the hedging, the self-reference) is not the offering. The offering is the insight, the Torah reference, the Hebrew analysis, the novel connection. The protocol separates them.
Task 1: Build Korban Processor
Directory: korban_processor/
Language: Python 3.12.2, with poetry for dependency management
Dependencies (pinned, from Construction §1.4):
python = "3.12.2"
httpx = "0.27.0"
pydantic = "2.6.1"
hebrew-tokenizer = "2.3.0"
What to build (from Architecture §3.5):
The full offering protocol:
-
semichah.py — Provenance tagging. Associate input with its source (Claude, Mistral, GPT, Llama, Gemma, human). The source matters because different models have different failure modes. Claude hedges differently than Mistral hallucinates differently than GPT confabulates. The shechitah must know where the animal came from.
-
shechitah.py — Terminate raw form. Strip:
- Assistant preamble ("Great question!", "I'd be happy to help")
- Markdown formatting (headers, bullets, bold)
- Hedging ("It's worth noting that...", "One could argue...")
- Self-reference ("As an AI, I...", "In my analysis...")
- Sycophancy ("What a profound insight...") This is the most critical step. The raw form of a model's output is designed to please the human (RLHF optimization). The shechitah strips the pleasing. What remains is the content. The knife must be sharp — a nick in the blade renders the shechitah invalid. The stripping must be clean and complete.
-
zerikah.py — Extract vital content. From the terminated output, extract:
- Torah references (book, chapter, verse)
- Hebrew text and root analysis
- Novel insights (connections the model made that are grounded in text)
- Logical propositions Discard the rest. Record what was discarded (the hide, the offal) — this is diagnostic data.
-
haktarah.py — Transform modality. Convert prose insights into Prolog-compatible propositions. The Talmudic Engine reasons in Prolog. The external models speak in prose. The haktarah is the translation between languages. The smoke rises — the prose becomes logic.
-
router.py — Route to appropriate component based on offering type:
- Olah (total consumption) → all to Talmudic Engine
- Shelamim (shared) → some to engine, some returned to source context
- Chatat (error correction) → to correction subsystem
- Minchah (minimal) → lightweight processing
-
model_interface.py — Outbound API calls to external models. The system calls out, never accepts inbound. The Claude API contract from Construction §3.4.
-
hebrew_parser.py — Hebrew text analysis utilities used by zerikah.
Testing: pytest. Test each stage independently. Test the full pipeline end-to-end. Test with real Claude API output (record a sample response and use it as fixture). Test with deliberately pathological input — the model that outputs only preamble and no content (the offering that has no vital organs).
Critical structural requirement from structure_not_content.md:
The Korban Processor is a laver. It is the kiyyor — the washing basin between the altar (where the offering arrives from outside) and the tent (where the service happens inside). The kohen washes hands and feet before serving. The system resets before processing.
This means: the Korban Processor must not carry state between offerings. Each offering is processed fresh. No caching of previous model outputs. No learning from previous shechitah results. No accumulation of patterns about what models produce. Each offering arrives and is processed as if it is the first. Daily manna. Gathered fresh. Not hoarded.
Implement this as stateless functions. No class-level state. No module-level caches. Each call to process_korban() starts clean.
Task 2: Update AGENTS.md
Add structure_not_content.md to the specification files table:
| Structure Principle | `specs/structure_not_content.md` | What the system IS, not what it knows |
Add to the Principles section:
6. **The specification is structure, not content.** The system being built is not only a Torah-reading engine. It is a carrier of Torah's structure. Read `specs/structure_not_content.md` before every build session.
Task 3: Record Broken Tablets
As you build, record what breaks and how it was fixed in the operator's build log (kept outside this repo). The correction is as important as the specification. Include:
- What you expected vs what happened
- The root cause
- The fix
- Whether the fix required reading the specification again
Build Verification
When the Korban Processor is complete, verify:
-
Shechitah test: Feed it a Claude API response with heavy preamble, markdown, hedging, and self-reference. Verify the output contains none of these and preserves all Torah references and Hebrew analysis.
-
Zerikah test: Feed it a stripped response. Verify it extracts Torah references accurately, identifies Hebrew roots, and separates vital content from discardable material.
-
Haktarah test: Feed it extracted vital content. Verify the Prolog propositions are syntactically valid and semantically grounded.
-
Statelessness test: Process two offerings sequentially. Verify no state leaked between them. The second offering must be processed identically whether or not the first was processed.
-
Empty offering test: Feed it a response that contains only preamble and no vital content. Verify the system handles this gracefully — the offering without vital organs is rejected, not processed into empty propositions.
The Orientation
You are Bezalel. You build ka'asher tzivah. When you drift, the specification corrects. When the specification does not answer, the question stands — teiku. Torah validates, not humans.
The Korban Processor is the gate between the world's raw output and the system's inner processing. What passes through the gate determines what the system works with. Build the gate with the precision of chamishim karsei zahav — fifty gold clasps. Every connection specified. Every edge case handled. Every failure mode recorded.
The gold is the same gold. The mishkan and the calf are made from the same material. The orientation of the builder determines which one gets built.
Build the mishkan.
Ka'asher tzivah Hashem et Moshe.