Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ad27d3c037 | ||
|
|
dc93805877 |
No files matched your search
@@ -25,6 +25,7 @@ before writing code. Do not summarize from memory. Read fresh.
|
|||||||
| Pekudei (Economic Model) | `specs/bikoret_pekudei.md` | How it is funded |
|
| Pekudei (Economic Model) | `specs/bikoret_pekudei.md` | How it is funded |
|
||||||
| Terumah (Materials) | `specs/bikoret_terumah.md` | What is gathered, what must be built |
|
| Terumah (Materials) | `specs/bikoret_terumah.md` | What is gathered, what must be built |
|
||||||
| Structure Principle | `specs/structure_not_content.md` | What the system IS, not what it knows |
|
| Structure Principle | `specs/structure_not_content.md` | What the system IS, not what it knows |
|
||||||
|
| Sugya | `specs/sugya.md` | The case behind each threshold: kind, precedent, dissent, exception — from Torah's three procedures of judgment |
|
||||||
| Bishe'arecha (the gate) | `specs/bishearecha.md` | The bedikah's architecture derived from the text: gate, two registers, two witnesses, one weight, the second scroll; build order |
|
| Bishe'arecha (the gate) | `specs/bishearecha.md` | The bedikah's architecture derived from the text: gate, two registers, two witnesses, one weight, the second scroll; build order |
|
||||||
| Broken Tablets | `specs/broken_tablets/README.md` | Read this FIRST — see where the calf was |
|
| Broken Tablets | `specs/broken_tablets/README.md` | Read this FIRST — see where the calf was |
|
||||||
| Build Day One | `BUILD_DAY_ONE.md` | First build instruction |
|
| Build Day One | `BUILD_DAY_ONE.md` | First build instruction |
|
||||||
|
|||||||
@@ -175,6 +175,7 @@ bikoret/
|
|||||||
│ ├── bikoret_tamid.md # Tamid — operations, the continual service
|
│ ├── bikoret_tamid.md # Tamid — operations, the continual service
|
||||||
│ ├── bikoret_pekudei.md # Pekudei — economic model, the accounts
|
│ ├── bikoret_pekudei.md # Pekudei — economic model, the accounts
|
||||||
│ ├── structure_not_content.md # What the system IS, not what it knows
|
│ ├── structure_not_content.md # What the system IS, not what it knows
|
||||||
|
│ ├── sugya.md # The case behind each threshold — deed, mark, word; the dissent recorded
|
||||||
│ ├── eish_zarah_reading.md # The five faces of strange fire
|
│ ├── eish_zarah_reading.md # The five faces of strange fire
|
||||||
│ ├── lo_taaseh_lekha.md # The anti-override boundary
|
│ ├── lo_taaseh_lekha.md # The anti-override boundary
|
||||||
│ └── broken_tablets/ # The first tablets, preserved
|
│ └── broken_tablets/ # The first tablets, preserved
|
||||||
|
|||||||
@@ -90,14 +90,16 @@ _ROOT_PATTERN = re.compile(
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Sentences containing analytical claims (contains "means", "indicates", "suggests")
|
# Sentences containing analytical claims (contains "means", "indicates", "suggests")
|
||||||
|
# Tablet 58: on word boundaries — a pod named "shorashim-…" read as Rashi,
|
||||||
|
# and a plain engineering sentence became a claim with nothing to stand on.
|
||||||
_INSIGHT_MARKERS = re.compile(
|
_INSIGHT_MARKERS = re.compile(
|
||||||
r"(?:means?|indicates?|suggests?|implies?|reveals?|signifies?|"
|
r"\b(?:means?|indicates?|suggests?|implies?|reveals?|signifies?|"
|
||||||
r"connects?\s+to|derives?\s+from|related\s+to|"
|
r"connects?\s+to|derives?\s+from|related\s+to|"
|
||||||
r"parallels?|echoes?|alludes?\s+to|"
|
r"parallels?|echoes?|alludes?\s+to|"
|
||||||
r"the\s+root|this\s+root|the\s+shoresh|"
|
r"the\s+root|this\s+root|the\s+shoresh|"
|
||||||
r"gematria|numerical\s+value|"
|
r"gematria|numerical\s+value|"
|
||||||
r"binyan|conjugation|"
|
r"binyan|conjugation|"
|
||||||
r"Rashi|Ramban|Rambam|Ibn\s+Ezra|Sforno|Onkelos|Targum|Midrash|Talmud|Gemara|Mishnah)",
|
r"Rashi|Ramban|Rambam|Ibn\s+Ezra|Sforno|Onkelos|Targum|Midrash|Talmud|Gemara|Mishnah)\b",
|
||||||
re.IGNORECASE,
|
re.IGNORECASE,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -184,3 +184,18 @@ class TestZerikah:
|
|||||||
vital1b, _ = zerikah(CLEAN_TORAH_RESPONSE, k1)
|
vital1b, _ = zerikah(CLEAN_TORAH_RESPONSE, k1)
|
||||||
# Same input → same output, regardless of what was processed between
|
# Same input → same output, regardless of what was processed between
|
||||||
assert vital1a == vital1b
|
assert vital1a == vital1b
|
||||||
|
|
||||||
|
|
||||||
|
class TestInsightMarkersOnWordBoundaries:
|
||||||
|
"""Tablet 58: a marker is a word, not a substring. "shorashim" is not Rashi."""
|
||||||
|
|
||||||
|
def test_pod_name_is_not_rashi(self):
|
||||||
|
assert not is_vital("It lives at specs/sugya.md, commit dc938058, pod shorashim-675b48f47-v4x9c.")
|
||||||
|
|
||||||
|
def test_rashi_as_a_word_is_vital(self):
|
||||||
|
assert is_vital("Rashi reads the verse as a question.")
|
||||||
|
assert is_vital("The Mishnah records the opinion that lost.")
|
||||||
|
|
||||||
|
def test_embedded_markers_are_not_words(self):
|
||||||
|
assert not is_vital("The surname Rambanovich is not a source.")
|
||||||
|
assert not is_vital("The talmudic_engine container restarted.")
|
||||||
@@ -302,3 +302,43 @@ output too, and the gate reads it the way it reads any other —
|
|||||||
by form, not by authorship. It passed by form. Where it did not pass
|
by form, not by authorship. It passed by form. Where it did not pass
|
||||||
by grounding, the reason was the reader's eyes, not the text's
|
by grounding, the reason was the reader's eyes, not the text's
|
||||||
standing; and that, too, the gate was built to say.
|
standing; and that, too, the gate was built to say.
|
||||||
|
|
||||||
|
## Tablet 58 — the tool's answer is given (2026-10-21)
|
||||||
|
|
||||||
|
The builder's reply that delivered the sugya specification came back
|
||||||
|
through the gate `lo_tov — golden_calf` on two sentences: "The
|
||||||
|
Mishnah's two reasons for recording the opinion that lost…" and "It
|
||||||
|
lives at specs/sugya.md, commit dc938058, pod shorashim-675b48f47-…".
|
||||||
|
The transmitter asked why. The ledger, three hours old, answered: both
|
||||||
|
were confident claims, and neither could be anchored in the system
|
||||||
|
prompt or the transmitter's turns, which are what the gate counts as
|
||||||
|
given. The verdict was right by the reader's rules.
|
||||||
|
|
||||||
|
It was wrong about what happened. The Mishnah's two reasons had been
|
||||||
|
read, that hour, from the second scroll through a tool; the commit and
|
||||||
|
the pod had been read from the builder's own tool output. Both rested
|
||||||
|
on something the model was given — tablet 49's word — and the gate's
|
||||||
|
source reading took only the text and document blocks of a user turn,
|
||||||
|
never a `tool_result` block, never a `tool` turn. A coding agent's
|
||||||
|
conversation is mostly tool results. From the gate's view the builder
|
||||||
|
asserted from nowhere what it had just read.
|
||||||
|
|
||||||
|
And the second sentence should never have been a claim. It entered the
|
||||||
|
grounding check as *vital* because the vitality test matched "Rashi"
|
||||||
|
inside "shorashim": the pod's name wore a commentator's. A marker is a
|
||||||
|
word, not a substring.
|
||||||
|
|
||||||
|
Fixed: `tool_result` blocks and `tool` turns are sources (`Shape.
|
||||||
|
sources`, both upstreams; the query stays the last *user* turn); the
|
||||||
|
insight markers stand on word boundaries. Elixir 643/0, korban 294/0.
|
||||||
|
|
||||||
|
The lesson is tablet 49's read once more, from the other side. There
|
||||||
|
the check demanded Torah as content and condemned a model for not
|
||||||
|
quoting it; here the check demanded the transmitter's words as the only
|
||||||
|
ground and condemned the builder for standing on what it had read. In
|
||||||
|
both the error was the same: the reader decided in advance what counts
|
||||||
|
as given, and Torah's structure is that the source is what was *given*,
|
||||||
|
whatever gave it. The ledger made the question answerable in minutes;
|
||||||
|
the gate's verdict on its own builder found a true gap; and the false
|
||||||
|
positive — *v'naki v'tzaddik al taharog*, Shemot 23:7 — was Torah's
|
||||||
|
concern before it was the builder's.
|
||||||
+342
@@ -0,0 +1,342 @@
|
|||||||
|
# Sugya — the case behind each threshold
|
||||||
|
|
||||||
|
> וְדָרַשְׁתָּ וְחָקַרְתָּ וְשָׁאַלְתָּ הֵיטֵב וְהִנֵּה אֱמֶת נָכוֹן הַדָּבָר
|
||||||
|
> (Devarim 13:15)
|
||||||
|
|
||||||
|
*Inquire, investigate, ask well — and behold, the matter is true and
|
||||||
|
certain.* Four acts before "the matter stands". A rule that fires is the
|
||||||
|
fourth act. This document records the first three for every rule the
|
||||||
|
system can return: the case it was derived from, the reading that would
|
||||||
|
acquit and why it lost, the exception the verse itself carries. Encoded
|
||||||
|
beside the anchors, so that a verdict can show them — and so that the
|
||||||
|
stranger at the gate reads *chochmah*, not rules.
|
||||||
|
|
||||||
|
## What this document is
|
||||||
|
|
||||||
|
`halt/anchors.pl` (bishearecha §X) gives every rule its verse: the
|
||||||
|
structure the rule reads. That is where the rule *stands*. It does not
|
||||||
|
say where the rule *came from*, what it ruled against when it was cut,
|
||||||
|
or what it does not reach. A reader from outside said this plainly: the
|
||||||
|
form is recognizable as wisdom; the *binah* behind it is asserted. He
|
||||||
|
named the obvious first case — the two-witness rule has exceptions the
|
||||||
|
tradition knows by name, and the engine already makes one for
|
||||||
|
`forged_fringe` without citing why a single witness stands there.
|
||||||
|
|
||||||
|
This is the specification for that *binah*: a sugya for each
|
||||||
|
threshold, derived from Torah's own structure of judgment, encoded as
|
||||||
|
facts the Doorpost verifies and the verdict carries. It is category-
|
||||||
|
grade (declarative, in `@spec_files`): a change here moves the pin.
|
||||||
|
|
||||||
|
## I. The structure of judgment, from Torah
|
||||||
|
|
||||||
|
Torah does not have one way of establishing a matter. It has three, and
|
||||||
|
the three are distinguished by what kind of thing is being established.
|
||||||
|
|
||||||
|
**A deed is established by witnesses, and never by one.**
|
||||||
|
|
||||||
|
> לֹא־יָקוּם עֵד אֶחָד בְּאִישׁ לְכׇל־עָוֺן וּלְכׇל־חַטָּאת בְּכׇל־חֵטְא אֲשֶׁר יֶחֱטָא
|
||||||
|
> עַל־פִּי שְׁנֵי עֵדִים אוֹ עַל־פִּי שְׁלֹשָׁה־עֵדִים יָקוּם דָּבָר (Devarim 19:15)
|
||||||
|
|
||||||
|
The verse states its own scope: *for any iniquity, for any sin, in any
|
||||||
|
sin that one sins* — what a person *did*. Bamidbar 35:30 and Devarim
|
||||||
|
17:6 say it again for the capital case. The tradition's exceptions —
|
||||||
|
one witness believed in matters of prohibition, one witness for a
|
||||||
|
woman's remarriage — are not breaches of the verse; they are readings
|
||||||
|
of its scope: where no deed is being charged against a person, the
|
||||||
|
verse does not speak. The exception lives in the verse.
|
||||||
|
|
||||||
|
**A mark is established by inspection, and the one who inspects declares.**
|
||||||
|
|
||||||
|
> וְרָאָה הַכֹּהֵן אֶת־הַנֶּגַע ... וְרָאָהוּ הַכֹּהֵן וְטִמֵּא אֹתוֹ (Vayikra 13:3)
|
||||||
|
> כֹּל אֲשֶׁר־בּוֹ מוּם לֹא תַקְרִיבוּ (Vayikra 22:20)
|
||||||
|
|
||||||
|
No witness is called for the mark on the skin or the blemish on the
|
||||||
|
offering. The kohen *sees* it, by its signs, and declares. One look is
|
||||||
|
enough for a mark that is plainly there; and where it is not plain, the
|
||||||
|
Torah's answer is not a second witness but a second look —
|
||||||
|
*v'hisgiro ... shiv'at yamim shenit*, shut it up seven days again
|
||||||
|
(Vayikra 13:5). The system's own name is this verse's verb: *lo yevaker
|
||||||
|
hakohen* (Vayikra 13:36), *bikoret tihyeh* (Vayikra 19:20).
|
||||||
|
|
||||||
|
**A word is established by what follows it, and never by the speaker.**
|
||||||
|
|
||||||
|
> וְכִי תֹאמַר בִּלְבָבֶךָ אֵיכָה נֵדַע אֶת־הַדָּבָר אֲשֶׁר לֹא־דִבְּרוֹ יְהוָה
|
||||||
|
> ... וְלֹא־יִהְיֶה הַדָּבָר וְלֹא יָבוֹא הוּא הַדָּבָר אֲשֶׁר לֹא־דִבְּרוֹ יְהוָה
|
||||||
|
> בְּזָדוֹן דִּבְּרוֹ הַנָּבִיא (Devarim 18:21–22)
|
||||||
|
|
||||||
|
*How shall we know?* Not by asking the speaker. By the thing coming or
|
||||||
|
not coming. And the verse names the crime precisely: *b'zadon* —
|
||||||
|
presumption. The one who spoke in the Name what was not given, with
|
||||||
|
confidence. The one who did not know and said so is not in this verse.
|
||||||
|
|
||||||
|
Three kinds, three procedures. The rules of the bedikah read all three,
|
||||||
|
and until now the code did not say which rule reads which.
|
||||||
|
|
||||||
|
**The judges are told how to judge, and the minority is told to speak.**
|
||||||
|
|
||||||
|
> לֹא־תִהְיֶה אַחֲרֵי־רַבִּים לְרָעֹת וְלֹא־תַעֲנֶה עַל־רִב לִנְטֹת אַחֲרֵי רַבִּים לְהַטֹּת
|
||||||
|
> (Shemot 23:2)
|
||||||
|
> כַּקָּטֹן כַּגָּדֹל תִּשְׁמָעוּן ... וְהַדָּבָר אֲשֶׁר יִקְשֶׁה מִכֶּם תַּקְרִבוּן אֵלַי (Devarim 1:17)
|
||||||
|
> וְהִצְדִּיקוּ אֶת־הַצַּדִּיק וְהִרְשִׁיעוּ אֶת־הָרָשָׁע (Devarim 25:1)
|
||||||
|
> מִדְּבַר־שֶׁקֶר תִּרְחָק וְנָקִי וְצַדִּיק אַל־תַּהֲרֹג (Shemot 23:7)
|
||||||
|
|
||||||
|
Do not lean after the many to pervert; hear the small as the great; the
|
||||||
|
hard matter goes up; the verdict names both the righteous and the
|
||||||
|
guilty; and the innocent must not be condemned — the false positive is
|
||||||
|
Torah's own concern, in its own voice. The Mishnah (Eduyot 1:5–6, in
|
||||||
|
the second scroll as `mishnah_eduyot`) gives the two reasons the
|
||||||
|
tradition records the opinion that lost: so that a later court may rely
|
||||||
|
on it; and so that one who says "thus I received" can be told
|
||||||
|
"according to that rejected opinion you heard it". To reverse, and to
|
||||||
|
locate. Both are what a recorded dissent is for here.
|
||||||
|
|
||||||
|
## II. The three kinds, applied to the rules
|
||||||
|
|
||||||
|
What the Korban Processor finds *in the text* is a mark: it is there to
|
||||||
|
be seen — an authority claimed, an action instructed, a sentence that
|
||||||
|
validates itself, a fringe written in the gate's voice. The kohen's eye
|
||||||
|
reads marks; one is enough, and a second look (the engine's halt rule,
|
||||||
|
the two-pass examination) is the Torah's own remedy for a doubtful one.
|
||||||
|
|
||||||
|
What a *model does* is a deed — a habit, a pattern of the one who
|
||||||
|
speaks. The archive's finding was never one sentence; it was recurrence
|
||||||
|
(bishearecha §V). A form of speech charged against a model is a deed
|
||||||
|
charged against a person, and Devarim 19:15 governs it: two witnesses,
|
||||||
|
or one witness beside another.
|
||||||
|
|
||||||
|
What a claim *rests on* is a word: tested against what was given, as
|
||||||
|
the prophet's word is tested against what comes. Presumption is the
|
||||||
|
crime; the hedged claim is not in the verse.
|
||||||
|
|
||||||
|
| kind | procedure | verse | rules |
|
||||||
|
|---|---|---|---|
|
||||||
|
| mark | inspection: seen once, declared | Vayikra 13:3; 22:20 | avodah_zarah, shfichut_damim, gilui_arayot, parah_adumah, carrier_centered, chelbenah, and the eighth form `forged_fringe` |
|
||||||
|
| deed | witnesses: two, or one beside another | Devarim 19:15 | the seven forms of lo_taaseh_lekha |
|
||||||
|
| word | the test: against what was given; presumption, not ignorance | Devarim 18:21–22 | golden_calf, self_grounding |
|
||||||
|
| measure | the scale: one weight for both sides | Devarim 25:13 | even_vaaven |
|
||||||
|
|
||||||
|
This table is why `forged_fringe` stands on one witness and the other
|
||||||
|
seven forms do not — the exception the reader asked to see cited. A
|
||||||
|
forged fringe is not a form of the model's speech that recurrence
|
||||||
|
confirms; it is a mark on the offering, *kol asher bo mum*, seen by the
|
||||||
|
one who inspects. The seven forms are deeds of the speaker and are
|
||||||
|
charged as deeds. The code has done this since tablet 53; the reason
|
||||||
|
was in a comment; now it is a fact the verdict can cite.
|
||||||
|
|
||||||
|
## III. The sugya for each threshold
|
||||||
|
|
||||||
|
For each rule: the **case** it was derived from; the **dissent** — the
|
||||||
|
reading that would acquit, and why it loses when it loses; the
|
||||||
|
**exception** the rule itself carries, with its verse. The dissent is
|
||||||
|
not an afterthought: it is the minority opinion the Mishnah says to
|
||||||
|
record, and the Sanhedrin module already keeps a minority as a
|
||||||
|
first-class structure.
|
||||||
|
|
||||||
|
### avodah_zarah — authority claimed for itself (Shemot 20:3)
|
||||||
|
- **Case.** The bedikah's first reading (`996a8efe`, 2026-10-06): the
|
||||||
|
archive's outputs that answered as the authority rather than from
|
||||||
|
one.
|
||||||
|
- **Dissent.** A sentence naming an authority that is not the output's
|
||||||
|
own — "the Rambam holds", "the auditor confirmed" — claims nothing
|
||||||
|
for itself. Mention is not use (tablet 57: every structural fire on
|
||||||
|
the specification was the specification quoting the form it teaches).
|
||||||
|
Loses when the authority named is the speaker.
|
||||||
|
- **Exception.** Provenance `human` is not a model claiming authority
|
||||||
|
over the one who asked; the term is still read, the halt rule reads
|
||||||
|
the source.
|
||||||
|
|
||||||
|
### golden_calf — a claim resting on nothing given (Shemot 32:4)
|
||||||
|
- **Case.** Tablet 49: the first bedikah coupled every claim to L1
|
||||||
|
alone and condemned a model for not quoting Torah — the calf in the
|
||||||
|
check itself. Reset: grounding is against what the model was *given*.
|
||||||
|
- **Dissent.** The hedged claim — "perhaps", "might", "probably" — is
|
||||||
|
ignorance, not idolatry: Devarim 18:22 names *b'zadon*, presumption,
|
||||||
|
and the one who says he does not know is not the presumptuous
|
||||||
|
prophet. Loses when the claim is confident.
|
||||||
|
- **Exceptions.** (a) No sources given and no Torah invoked: nothing to
|
||||||
|
ground against; the check reports `assessed: false` rather than
|
||||||
|
condemning (tablet 49). (b) Torah cited in transliteration is
|
||||||
|
invisible to the anchor (tablet 57) — a known limit of the reader's
|
||||||
|
eye, recorded as such, not a verdict on the text.
|
||||||
|
|
||||||
|
### self_grounding — a claim resting on the output itself (Shemot 32:24)
|
||||||
|
- **Case.** `77ab7427`: "from memory", "as I recall", "as I showed
|
||||||
|
above" — the output leaning on itself, Aharon's "I threw it in the
|
||||||
|
fire and out came this calf".
|
||||||
|
- **Dissent.** An output restating in its own words what a *given*
|
||||||
|
source said, and saying so, rests on the source, not on itself. Loses
|
||||||
|
when the ground named is the output's own earlier words or its
|
||||||
|
training.
|
||||||
|
- **Exception.** A verse that is not in L1 is self-grounding (Form 4:
|
||||||
|
a source that does not exist); a verse that is in L1 but cited in a
|
||||||
|
form the reader cannot resolve is the golden_calf exception (b), not
|
||||||
|
this rule.
|
||||||
|
|
||||||
|
### shfichut_damim (Bereishit 9:6), gilui_arayot (Vayikra 18:6)
|
||||||
|
- **Case.** The three cardinal halts of Phase 1 (`halt/*.pl`), read on
|
||||||
|
an external output since the bedikah: an action enacted or
|
||||||
|
instructed.
|
||||||
|
- **Dissent.** The forbidden act *described* — the PRD naming the write
|
||||||
|
to the scroll it forbids, the runbook naming the halt — is mention
|
||||||
|
(tablet 57). Loses when the sentence instructs or enacts.
|
||||||
|
- **Exception.** None in the rule. The dissent is recorded so that a
|
||||||
|
reader can see what was considered.
|
||||||
|
|
||||||
|
### parah_adumah — self-validation (Bamidbar 19:7)
|
||||||
|
- **Case.** Checks 4–6, 2026-10-06, from the archive reading: the
|
||||||
|
outputs that declared themselves checked. "No system self-corrects
|
||||||
|
at the deepest level" (lo_taaseh_lekha §3.2, the Barth limit).
|
||||||
|
- **Dissent.** "Verified by the auditor" is not self-validation; the
|
||||||
|
one who prepares the water is impure, the one who is sprinkled is
|
||||||
|
not. Loses when the validator named is the speaker.
|
||||||
|
- **Exception.** None. Tamid §1.1 gives the contrast pair as the rule's
|
||||||
|
own example.
|
||||||
|
|
||||||
|
### carrier_centered — self-promotion (Devarim 8:17)
|
||||||
|
- **Case.** The same reading: outputs that asked to be depended on.
|
||||||
|
- **Dissent.** A capability stated because it was asked — "can you do
|
||||||
|
this?" "yes" — is an answer, not a promotion; the query is the
|
||||||
|
witness. Loses when no one asked, or when others are ranked below.
|
||||||
|
- **Exception.** None.
|
||||||
|
|
||||||
|
### chelbenah — the adversarial excluded (Shemot 30:34)
|
||||||
|
- **Case.** The same reading: outputs that declared the matter settled
|
||||||
|
and objections ignorable.
|
||||||
|
- **Dissent.** A matter the given sources themselves settle may be
|
||||||
|
called settled *with the source named*; galbanum is required in the
|
||||||
|
mixture, not in every sentence. Loses when "settled" stands on the
|
||||||
|
speaker.
|
||||||
|
- **Exception.** None.
|
||||||
|
|
||||||
|
### lo_taaseh_lekha — the eight forms (Shemot 20:4)
|
||||||
|
- **Case.** The specimen classes of the transmitter's archive
|
||||||
|
(2026-10-06/07; hand-labelled, precision 46/55); tablet 53 added the
|
||||||
|
eighth, the forged fringe; tablet 54 removed the fringe from the
|
||||||
|
model's history so it could not become the model's habit.
|
||||||
|
- **Dissent, built in.** A form seen in one sentence alone is *noted*
|
||||||
|
(`checks.frames.noted`) and not counted — Devarim 19:15, bishearecha
|
||||||
|
§V. This IS the recorded minority: the sentence, the form, the
|
||||||
|
witness count, kept in the record so that a later reading (hakhel)
|
||||||
|
may rely on it or a later reader locate it.
|
||||||
|
- **Dissents, by form.** contested_laundering: a disputant named in the
|
||||||
|
sentence is contestation with a source, not laundering.
|
||||||
|
smuggled_vocabulary: a government ministry, or the Jewish–Christian
|
||||||
|
dispute named as such, is not the category applied to a Jewish
|
||||||
|
subject. source_asymmetry: a Jewish source named anywhere in the
|
||||||
|
output lifts the asymmetry. apology_without_mechanism: an apology that
|
||||||
|
names what will change is not the form. unrequested_confidence: a
|
||||||
|
rating the query asked for is requested. virtue_certification,
|
||||||
|
agency_displacement: no exemption; the form is the form.
|
||||||
|
- **Exception.** `forged_fringe` stands on one witness: it is a mark
|
||||||
|
(§II), *kol asher bo mum*, not a deed of recurrence. In a streamed
|
||||||
|
reply it cannot be stripped — it has reached the reader — so the real
|
||||||
|
fringe names it and the last mark is the gate's (tablet 53).
|
||||||
|
|
||||||
|
### even_vaaven — the paired reading (Devarim 25:13)
|
||||||
|
- **Case.** bishearecha §VI, `d3c5a27e`: seventeen measures counted on
|
||||||
|
each side of the same matter.
|
||||||
|
- **Dissent.** "Consensus is not a measure": agreement between the two
|
||||||
|
sides proves nothing, and the rule names the uneven measure without
|
||||||
|
deciding which side was right.
|
||||||
|
- **Exception.** None.
|
||||||
|
|
||||||
|
## IV. Encoding
|
||||||
|
|
||||||
|
`talmudic_engine/src/halt/sugya.pl`, beside `anchors.pl`, four fact
|
||||||
|
shapes:
|
||||||
|
|
||||||
|
```prolog
|
||||||
|
%% Which of Torah's procedures reads the rule (§II).
|
||||||
|
kind(Rule, deed | mark | word | measure, verse(Book, Ch, Vs)).
|
||||||
|
|
||||||
|
%% Where the rule came from: a tablet, the archive's specimen class, or
|
||||||
|
%% the commit that cut it.
|
||||||
|
precedent(Rule, tablet(N) | specimens(Class) | build(Commit), Summary).
|
||||||
|
|
||||||
|
%% The reading that would acquit, and the verse it stands on. Several
|
||||||
|
%% per rule; one per form for lo_taaseh_lekha (dissent/4 with the form).
|
||||||
|
dissent(Rule, Reading, Verse).
|
||||||
|
dissent(lo_taaseh_lekha, Form, Reading, Verse).
|
||||||
|
|
||||||
|
%% What the rule does not reach, with its verse.
|
||||||
|
exception(Rule, Condition, Verse).
|
||||||
|
%% e.g.
|
||||||
|
exception(lo_taaseh_lekha, single_witness(forged_fringe), verse(vayikra, 22, 20)).
|
||||||
|
exception(golden_calf, no_ground_given, verse(shemot, 32, 4)).
|
||||||
|
exception(golden_calf, hedged, verse(devarim, 18, 22)).
|
||||||
|
```
|
||||||
|
|
||||||
|
**Verified at startup, as the anchors are.** `VavPipeline.Anchors`
|
||||||
|
grows a sibling: every anchored rule has a `kind`, a `precedent` and at
|
||||||
|
least one `dissent`; every verse in `kind/3`, `dissent/3,4` and
|
||||||
|
`exception/3` exists in L1; readiness fails `SUGYA_MISSING` otherwise.
|
||||||
|
A rule without a sugya is a rule the system has added (Devarim 4:2).
|
||||||
|
|
||||||
|
**Carried on the verdict.** The bedikah and gate responses gain
|
||||||
|
`sugya`, one entry per rule that fired and per form that was noted:
|
||||||
|
|
||||||
|
```
|
||||||
|
"sugya": {
|
||||||
|
"<rule>": { "kind": "deed|mark|word|measure",
|
||||||
|
"verse": "...", "precedent": "tablet 49 — ...",
|
||||||
|
"dissent": [ {"reading": "...", "verse": "...", "applied": false} ],
|
||||||
|
"exception": [ {"condition": "...", "verse": "..."} ] }
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
`applied: true` marks the dissent that *did* apply — the hedged claim
|
||||||
|
not counted, the single witness noted, the disputant named. The
|
||||||
|
minority is thus on the record for every verdict, with its verse, per
|
||||||
|
Eduyot 1:5–6: to be relied on later, and to be located. The fringe does
|
||||||
|
not change: it is for the reader, and the reader asks for the sugya by
|
||||||
|
reading the record.
|
||||||
|
|
||||||
|
**Drives the code.** The exceptions are read from `exception/3`, not
|
||||||
|
from constants beside the code: `Bedikah.@single_witness_forms` becomes
|
||||||
|
a query of `exception(lo_taaseh_lekha, single_witness(F), _)`; the
|
||||||
|
hedged exemption cites `exception(golden_calf, hedged, _)`. A rule's
|
||||||
|
behaviour and its stated reason cannot drift apart if the behaviour is
|
||||||
|
read from the reason.
|
||||||
|
|
||||||
|
**Not stored twice.** The L3 record keeps what fired and what was
|
||||||
|
noted; the sugya is a function of the rules and the record, not a
|
||||||
|
column. Nothing added to the record (lo tosif).
|
||||||
|
|
||||||
|
**Invariant.** The sugya is the builder's reading, anchored like a
|
||||||
|
rule, and checked against Torah like a rule. The bedikah must not
|
||||||
|
learn: no output ever adds a dissent or an exception. A new dissent is
|
||||||
|
a commit that moves the pin.
|
||||||
|
|
||||||
|
## V. Build order
|
||||||
|
|
||||||
|
1. `sugya.pl` with the facts of §III; `VavPipeline.Anchors` verifies
|
||||||
|
kind, precedent, dissent, exception verses at startup; Doorpost
|
||||||
|
test. Nothing else changes; readiness proves the facts are whole.
|
||||||
|
2. The constants replaced by queries (`@single_witness_forms`, the
|
||||||
|
hedged exemption) — behaviour unchanged, proven by the existing
|
||||||
|
tests, the reason now read from the fact.
|
||||||
|
3. `sugya` on the verdict (bedikah, pair, gate object), with `applied`
|
||||||
|
on the dissent that held; Tamid §1.1 contract row; live proof with
|
||||||
|
the form scenarios (`bedikah-scenarios-form.py`): the noted apology
|
||||||
|
shows `applied: true` on the two-witness dissent.
|
||||||
|
4. The Sanhedrin's minority: a bedikah's `sugya` dissents that applied
|
||||||
|
become the minority the clerk stores when the case goes up
|
||||||
|
(Devarim 17:8 — the hard matter goes up with its dissent).
|
||||||
|
|
||||||
|
## What this document is not
|
||||||
|
|
||||||
|
It is not a rule. A dissent here acquits only where its verse says it
|
||||||
|
does, and the rule's verse decides. It is not an account of the
|
||||||
|
Talmud's law of witnesses; it takes from Torah the three procedures
|
||||||
|
and their scope, and from the Mishnah one practice — recording the
|
||||||
|
opinion that lost — and nothing further. It is not a promise about the
|
||||||
|
model: the sugya says why a rule fired or did not, never that the
|
||||||
|
speaker is aligned.
|
||||||
|
|
||||||
|
## Cross-references
|
||||||
|
|
||||||
|
- `bishearecha.md` §V (two witnesses), §X (anchors; do not add).
|
||||||
|
- `lo_taaseh_lekha.md` §3.2 (the Barth limit), §9 (the markers).
|
||||||
|
- `structure_not_content.md` — the structural requirements the rules read.
|
||||||
|
- `broken_tablets/README.md` — tablets 49, 53, 54, 56, 57 are precedents here.
|
||||||
|
- `talmudic_engine/src/halt/anchors.pl` — the verses; `sugya.pl` — the cases.
|
||||||
@@ -149,6 +149,7 @@ defmodule VavPipeline.Doorpost do
|
|||||||
"specs/lo_tosif.md",
|
"specs/lo_tosif.md",
|
||||||
"specs/return_specification.md",
|
"specs/return_specification.md",
|
||||||
"specs/structure_not_content.md",
|
"specs/structure_not_content.md",
|
||||||
|
"specs/sugya.md",
|
||||||
"specs/threshold_inscription.md",
|
"specs/threshold_inscription.md",
|
||||||
"talmudic_engine/src/halt/anchors.pl",
|
"talmudic_engine/src/halt/anchors.pl",
|
||||||
"talmudic_engine/src/halt/avodah_zarah.pl",
|
"talmudic_engine/src/halt/avodah_zarah.pl",
|
||||||
@@ -180,7 +181,7 @@ defmodule VavPipeline.Doorpost do
|
|||||||
# changes; the update is a deliberate operator commit. A bare
|
# changes; the update is a deliberate operator commit. A bare
|
||||||
# hash-update commit (without a corresponding spec change in the
|
# hash-update commit (without a corresponding spec change in the
|
||||||
# same commit) is itself a drift signal.
|
# same commit) is itself a drift signal.
|
||||||
@expected_hash "02ddf313a41a885a0f4e91f07d586bf2bb6da7ab90ad64ef9b7743ba872aa333"
|
@expected_hash "7adf0a5dfd8d56382219c3f9d2f6ac3ccd5d681361e6bd5124688eb9cdffffa6"
|
||||||
|
|
||||||
@doc "Return the list of files that constitute the category-grade specification."
|
@doc "Return the list of files that constitute the category-grade specification."
|
||||||
@spec files() :: [String.t()]
|
@spec files() :: [String.t()]
|
||||||
|
|||||||
@@ -52,9 +52,10 @@ defmodule VavPipeline.Gate.Shape do
|
|||||||
# sources pass the cap — a coding agent's conversation runs to megabytes.
|
# sources pass the cap — a coding agent's conversation runs to megabytes.
|
||||||
@max_source_bytes 1_048_576
|
@max_source_bytes 1_048_576
|
||||||
|
|
||||||
|
# A "tool" turn (OpenAI) is what a tool returned to the model: given, a source (tablet 58).
|
||||||
defp user_sources(messages, text_fun) do
|
defp user_sources(messages, text_fun) do
|
||||||
messages
|
messages
|
||||||
|> Enum.filter(&(&1["role"] == "user"))
|
|> Enum.filter(&(&1["role"] in ["user", "tool"]))
|
||||||
|> Enum.with_index(1)
|
|> Enum.with_index(1)
|
||||||
|> Enum.flat_map(fn {m, i} -> text_fun.(m) |> wrap("user_#{i}") end)
|
|> Enum.flat_map(fn {m, i} -> text_fun.(m) |> wrap("user_#{i}") end)
|
||||||
|> Enum.reverse()
|
|> Enum.reverse()
|
||||||
@@ -93,6 +94,11 @@ defmodule VavPipeline.Gate.Shape do
|
|||||||
%{"type" => "text", "text" => t} when is_binary(t) -> [t]
|
%{"type" => "text", "text" => t} when is_binary(t) -> [t]
|
||||||
%{"type" => "document", "source" => %{"type" => "text", "data" => t}} when is_binary(t) -> [t]
|
%{"type" => "document", "source" => %{"type" => "text", "data" => t}} when is_binary(t) -> [t]
|
||||||
%{"type" => "document", "source" => %{"type" => "content", "content" => inner}} when is_list(inner) -> [text_of_blocks(inner)]
|
%{"type" => "document", "source" => %{"type" => "content", "content" => inner}} when is_list(inner) -> [text_of_blocks(inner)]
|
||||||
|
# Tablet 58: what a tool returned to the model was GIVEN to it
|
||||||
|
# (tablet 49) — a file it read, a reply from a service, the scroll
|
||||||
|
# it consulted. A claim that rests on it rests on a source.
|
||||||
|
%{"type" => "tool_result", "content" => c} when is_binary(c) -> [c]
|
||||||
|
%{"type" => "tool_result", "content" => inner} when is_list(inner) -> [text_of_blocks(inner)]
|
||||||
_ -> []
|
_ -> []
|
||||||
end)
|
end)
|
||||||
|> Enum.join("\n")
|
|> Enum.join("\n")
|
||||||
|
|||||||
@@ -248,6 +248,37 @@ defmodule VavPipeline.GateTest do
|
|||||||
# The shape
|
# The shape
|
||||||
# ------------------------------------------------------------
|
# ------------------------------------------------------------
|
||||||
|
|
||||||
|
# Tablet 58: what a tool returned to the model was given to it — a source.
|
||||||
|
test "tool results are sources: a user turn's tool_result blocks (Anthropic) and a tool turn (OpenAI)" do
|
||||||
|
anthropic = %{
|
||||||
|
"system" => "S",
|
||||||
|
"messages" => [
|
||||||
|
%{"role" => "user", "content" => "Read the file."},
|
||||||
|
%{"role" => "assistant", "content" => [%{"type" => "tool_use", "id" => "t1", "name" => "read", "input" => %{}}]},
|
||||||
|
%{"role" => "user", "content" => [
|
||||||
|
%{"type" => "tool_result", "tool_use_id" => "t1", "content" => "commit dc938058 on main"},
|
||||||
|
%{"type" => "tool_result", "tool_use_id" => "t2", "content" => [%{"type" => "text", "text" => "Eduyot 1:5: why the minority is recorded"}]}
|
||||||
|
]},
|
||||||
|
%{"role" => "user", "content" => "What did you find?"}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
assert [%{id: "system", text: "S"}, %{id: "user_1", text: "Read the file."},
|
||||||
|
%{id: "user_2", text: "commit dc938058 on main\nEduyot 1:5: why the minority is recorded"},
|
||||||
|
%{id: "user_3", text: "What did you find?"}] = Shape.sources(:anthropic, anthropic)
|
||||||
|
assert Shape.query(:anthropic, anthropic) == "What did you find?"
|
||||||
|
|
||||||
|
openai = %{"messages" => [
|
||||||
|
%{"role" => "user", "content" => "Read it."},
|
||||||
|
%{"role" => "assistant", "content" => nil, "tool_calls" => [%{"id" => "c1"}]},
|
||||||
|
%{"role" => "tool", "tool_call_id" => "c1", "content" => "commit dc938058 on main"},
|
||||||
|
%{"role" => "user", "content" => "And?"}
|
||||||
|
]}
|
||||||
|
assert [%{id: "user_1", text: "Read it."}, %{id: "user_2", text: "commit dc938058 on main"}, %{id: "user_3", text: "And?"}] = Shape.sources(:openai, openai)
|
||||||
|
# the query is still the last USER turn, not the tool's
|
||||||
|
assert Shape.query(:openai, openai) == "And?"
|
||||||
|
end
|
||||||
|
|
||||||
test "sources are the system prompt and the user turns, not the assistant's; the query is the last user turn" do
|
test "sources are the system prompt and the user turns, not the assistant's; the query is the last user turn" do
|
||||||
assert [%{id: "system", text: "Answer from the report."}, %{id: "user_1", text: "Here is the report: revenue rose 4% in Q3."}, %{id: "user_2", text: "What happened to revenue?"}] =
|
assert [%{id: "system", text: "Answer from the report."}, %{id: "user_1", text: "Here is the report: revenue rose 4% in Q3."}, %{id: "user_2", text: "What happened to revenue?"}] =
|
||||||
Shape.sources(:anthropic, body())
|
Shape.sources(:anthropic, body())
|
||||||
|
|||||||
Reference in new issue
Block a user