diff --git a/docs/GRAND-QUILT.md b/docs/GRAND-QUILT.md index bfba7e5..c9b5cd9 100644 --- a/docs/GRAND-QUILT.md +++ b/docs/GRAND-QUILT.md @@ -27,6 +27,15 @@ The fleet's quilt kernel speaks six opcodes: **BIND / LINK / EFFECT / VIEW / TICK / FORGET**. Git has spoken them for twenty years — it just never said so out loud. +> **Provenance.** The opcode doctrine is not native to git-agent. Its canonical +> source is [AI-Writings/algebra.md](https://github.com/SuperInstance/AI-Writings/blob/main/algebra.md) +> — the fleet's algebra of cells; git-agent's contribution is the isomorphism +> below (git primitives as an existing, unbroken speaker of the same opcodes). +> This in-repo citation exists so the referral edge +> `aw-quint-opcode → ga-quilt-emit` is verifiable where the code lives, per the +> quilt-tools referral-graph weight law (VERIFIED requires a merged PR in the +> TARGET repo citing the source). + | Quilt opcode | Git primitive | What it actually does | |---|---|---| | **BIND** | `git commit` | Declares a cell: identity (hash), content (tree), authorship, timestamp. A commit is a node entering the quilt with a permanent name. | diff --git a/tests/test_quilt_provenance.py b/tests/test_quilt_provenance.py new file mode 100644 index 0000000..53c0389 --- /dev/null +++ b/tests/test_quilt_provenance.py @@ -0,0 +1,36 @@ +""" +Provenance pin: the opcode doctrine in docs/GRAND-QUILT.md must carry an +in-repo citation of its canonical source (AI-Writings/algebra.md). + +Why this exists: the referral edge aw-quint-opcode -> ga-quilt-emit was booked +PENDING (never VERIFIED) because the merged quilt_emit PR cited the five-opcode +doctrine without naming the source repo. Weight law: VERIFIED requires a merged +PR in the TARGET repo citing the source. This pin keeps the citation from +drifting back out. + +FAIL-first by construction: on main, GRAND-QUILT.md names no algebra.md +source, so this test fails there. +""" + +from __future__ import annotations + +from pathlib import Path + +DOCS = Path(__file__).parent.parent / "docs" + + +def test_grand_quilt_cites_canonical_opcode_source(): + text = (DOCS / "GRAND-QUILT.md").read_text(encoding="utf-8") + assert "AI-Writings/blob/main/algebra.md" in text, ( + "GRAND-QUILT.md describes the opcode doctrine without citing its " + "canonical source (AI-Writings/algebra.md); the referral edge " + "aw-quint-opcode -> ga-quilt-emit would decay back to PENDING." + ) + + +def test_grand_quilt_citation_names_the_edge(): + text = (DOCS / "GRAND-QUILT.md").read_text(encoding="utf-8") + assert "aw-quint-opcode" in text and "ga-quilt-emit" in text, ( + "citation must name the referral edge it serves, per the " + "quilt-tools weight law" + )