Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions docs/GRAND-QUILT.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. |
Expand Down
36 changes: 36 additions & 0 deletions tests/test_quilt_provenance.py
Original file line number Diff line number Diff line change
@@ -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"
)
Loading