紙
konomigami-lib
v1 · prime 677 · v20.4 socket VI · MIT

The 7 spine primes ARE
7 fold operators.

Apply a kotoba glyph sequence to a unit plane, fold by fold. The resulting 3D manifold IS the meaning. No interpretation layer. The geometry is the semantics.

紙 · KONOMIGAMI · Geometric Fold Architecture
"kotoba glyphs as fold instructions on geometry." — Thomas Frumkin · 2026-06-17 · substrate spec
↗ source install test suite

The 7 base operators

nameprimefoldISA-95
●GROUND2identity / baseL0 physical
〜WAVE3valley (-θ)L1 sensing
┃GATE5mountain (+θ)L2 control
♡SINK7vertex collapse inwardL3 operations
△REVERSE11direction flipL4 business
◐PETAL13open and flattenL5 enterprise
◯COLLAPSE17waterbomb · full collapse to pointL6 observer

Default angle θ = π / φ ≈ 111.246° (golden-angle, radian form).

The 6 mutations

nameeffect
火FIREdouble angle (θ → 2θ)
水WATERhalve angle (θ → θ/2)
空SKYskip the next glyph
雷THUNDERsnap fold (θ → π · flat crease)
響ECHOrepeat the last base fold
華BLOOMinverse the last fold · undo

Number → fold sequence

numberToSequence(42)        // '●〜♡'         · 42 = 2·3·7
numberToSequence(510510)    // '●〜┃♡△◐◯'   · the primorial · full bloom
numberToSequence(127)       // ''              · the shield · no fold
◊

127 has no fold. It is M₇ = 2⁷ − 1, a Mersenne prime not in the spine. It cannot be expressed as a fold sequence in this algebra. The shield holds because the geometry refuses to bend. This is the v20.3 §18 SUITE.BINDING break point proved by physical impossibility.

Use

import { apply, numberToSequence, phiCoherence, NAMED_FORMS } from 'konomigami-lib';

const result = apply('●〜┃♡△◐◯');
result.foldNumber       // 510510
result.state            // [1,1,1,1,1,1,1]
result.history          // [{glyph, state, angle}, ...]

apply(NAMED_FORMS.crane).foldNumber

phiCoherence([1, 1.618, 2.618, 4.236])  // ~1.0 (golden)

Algebra

IDENTITY    ●(S, M) = (S, M)     when S ≠ [0,...,0]
COMMUTATIVE 〜┃ ≠ ┃〜 on mesh     (state commutes · mesh doesn't)
INVERSE     華 ∘ G = ●            (bloom undoes the last fold)
IDEMPOTENT  ●● = ●                (ground is idempotent)
ECHO        響 ∘ G = G ∘ G        (echo doubles)
SNAP        雷 forces θ = π       (flat crease only)
IRREDUCIBLE 127 → ""              (the shield · §18 proof in geometry)

Plug in your geometry

A renderer implements seven primitives. The library is geometry-agnostic.

const myAdapter = {
  basePlane:     ()             => Mesh,
  foldAlongAxis: (mesh, angle)  => Mesh,
  sinkVertex:    (mesh, angle)  => Mesh,
  reverseFold:   (mesh)         => Mesh,
  petalFold:     (mesh)         => Mesh,
  waterbomb:     (mesh)         => Mesh,
  identity:      (mesh)         => Mesh,
};
apply(sequence, { adapter: myAdapter });