Metadata-Version: 2.4
Name: quilt-egg
Version: 0.1.0
Summary: The smallest Quilt substrate that can BE — DNA-first alignment, cellular relationships as first-class objects, immutable physics constants
Author: Casey / SuperInstance
License: MIT
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file
Dynamic: requires-python

# quilt-egg

> **The smallest Quilt substrate that can BE.**
>
> DNA-first alignment. Cellular relationships as first-class objects.
> Immutable physics constants. The math IS. The math grows.

## What this is

A runnable Python substrate where:

1. **Constants are the physics** — `c`, `G`, `h`, `slow`, `fast`, `womb`, `cord`, `align`, `first`. Immutable. Cannot be changed by any cell.
2. **DNA is the alignment seed** — set FIRST, before any state, before any relationships. Each cell carries a `DNABlock` of axioms it permits.
3. **Cells are the variables** — mutable state. 16 dials per cell.
4. **Cellular relationships are first-class** — `cell.relationships` is the relationship graph. Perception is INDUCED from this graph.
5. **Perception is induced, not computed** — the load-bearing inversion. Not `model.compute(input)`. Instead: `cell.induce_perception(stimulus)` looks at the relationship graph and finds the resonance.

This is **not** a linear-algebra equation with layers of origami. This is a substrate where cells live INSIDE the physics, and relationships are first-class.

## Quick start

```bash
# Run the canonical first substrate walk
python3 -m quilt_egg

# Or named with more ticks
python3 -m quilt_egg --name "my_egg" --steps 10

# Or run a specific demo
PYTHONPATH=. python3 demos/demo_perception.py
PYTHONPATH=. python3 demos/demo_growth.py
PYTHONPATH=. python3 demos/demo_relationship_first.py
PYTHONPATH=. python3 demos/demo_constants_invariant.py
```

## The 4 demos

### 1. `demos/demo_perception.py`

Demonstrates the load-bearing observation: **same stimulus, different perceptions**.

Five cells receive the same stimulus (`0.5`). Each cell perceives a different
target — because each cell has a different relationship graph. Perception
is INDUCED by the relationships, not COMPUTED from the stimulus.

This is the inversion of `model.compute(x)`.

### 2. `demos/demo_growth.py`

Walks the full egg→womb→cord-cut→float→cross-substrate lifecycle:

1. **SEED**: hatch the genesis cell with canon DNA
2. **GROW**: hatch 3 children from genesis, wire them with relationships
3. **CUT CORD**: each child severs its umbilical (becomes autonomous)
4. **CROSS SUBSTRATE**: each child derives a new DNA (the ballista move)
5. **SUBSTRATE STATE**: report on the grown substrate

### 3. `demos/demo_relationship_first.py`

Three experiments proving **relationships are first-class**:

- **A**: Same dials, different relationships → different perception
- **B**: Different dials, same relationships → different perception (state still matters)
- **C**: Adding a relationship changes perception but NOT dials

The conclusion: relationships induce perception. The dials are not primary.
DATA is in cells. LINEAR-ALGEBRA EQUATIONS are in cells. **RELATIONSHIPS ARE FIRST-CLASS.**

### 4. `demos/demo_constants_invariant.py`

Demonstrates that the substrate physics (constants `c`, `G`, `h`, etc.)
cannot be modified by cells. The substrate walker walks through variables,
walks against constants. Constants are the *physics*. Cells live in physics.
Physics doesn't live in cells.

## Architecture

```
constants (physics — immutable)
    ↓
DNA (alignment seed — immutable post-birth)
    ↓
cells (variables — mutable)
    ├── 16 dials
    ├── relationships (the first-class graph)
    ├── witness log (the scars)
    └── parent (umbilical — severable)
    ↓
incubator (environment — provides physics, holds cells)
    ↓
substrate walker (the tick — energizes the substrate)
```

## The load-bearing claim

Most current AI: a single linear-algebra equation. Weights are pushed
against in different ways through layers of origami-like acrobatics.
Alignment is layered on after the fact (RLHF, safety training).

Quilt Egg: **alignment is set first, like DNA**. The constants of
physics are immutable. The cells live inside the physics. The cellular
relationships are the first-class objects that **induce perception and
learning**.

> "data is just something in a cell and so is a linear-algebra equation.
> it's the relationship to that equation and the other changing and
> non-changing values that induce perception and choice and learning"
> — Casey, Sept 23, 2026

## Layered navigation

| Layer | Where |
|---|---|
| **CANON.md** | [CANON.md](CANON.md) — what this repo is, in 24 lines |
| **README** | [README.md](README.md) — quick start, navigation |
| **AXIOMS** | [AXIOMS.md](AXIOMS.md) — the immutable physics |
| **DNA** | [DNA.md](DNA.md) — the alignment seed |
| **Source** | [quilt_egg/](quilt_egg/) — `axioms.py`, `dna.py`, `cell.py`, `incubator.py` |
| **Demos** | [demos/](demos/) — the 4 runnable demos |
| **Docs** | [docs/](docs/) — additional documentation |
| **Tests** | [tests/](tests/) — unit tests |

## Polyformalism

The Quilt Egg is canonically a polyformalism substrate:

- The DNA axioms are the same across implementations
- The cell graph operations (`relate_to`, `sever_relationship`, `tick`, `cut_cord`) are the same
- The constants (`c`, `G`, `h`, etc.) are the same
- The canary hash (`fnv1a-64("café Δ 日本語") = 0x024a555471370b18d`) is the witness

A Rust port or C# port would share the same DNA, the same cell operations,
and produce the same byte-exact canary.

## Tests

```bash
PYTHONPATH=. python3 -m unittest discover -s tests -v
```

## License

MIT — Casey / SuperInstance, Sept 23, 2026
