Asi semilattice-discovery
Compositional skill discovery via join-semilattice fiber (color × trit × hash)
install
source · Clone the upstream repo
git clone https://github.com/plurigrid/asi
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/plurigrid/asi "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/semilattice-discovery" ~/.claude/skills/plurigrid-asi-semilattice-discovery && rm -rf "$T"
manifest:
skills/semilattice-discovery/SKILL.mdsource content
semilattice-discovery
Find, compose, and verify skills using the free commutative idempotent semigroup.
Trit: 0 (Ergodic - coordinator)
Bundle: core
The Algebra
Every skill has a SemilatticeFiber:
{color, trit, hash}.
- hash:
— deterministic, O(1)SplitMix64(name) - trit:
∈ {-1, 0, +1} — GF(3) conservationhash mod 3 - 1 - color:
— perceptual similarity metrichash → RGB → OKLAB
Two skills compose via fiber join:
fiberJoin(a, b) = { color: OKLAB midpoint (idempotent, commutative) trit: findBalancer(a.trit, b.trit) — conserves GF(3) hash: mix64(a.hash + b.hash) }
Commands
# Compute fiber for a skill bb skill-semilattice.bb fiber bisimulation-game # Join two skills — shows conservation bb skill-semilattice.bb join bisimulation-game sheaf-cohomology # Find the best third skill to complete a conserved triad bb skill-semilattice.bb triad bisimulation-game sheaf-cohomology # Discover skills by fiber proximity to a query bb skill-semilattice.bb discover "color theory oklab" # Verify global GF(3) conservation across all 1425 skills bb skill-semilattice.bb conserved? # Show skill clusters by trit and color proximity bb skill-semilattice.bb cluster 5
Semilattice Laws (verified)
| Law | Substrate | Braid | Color |
|---|---|---|---|
| a ⊔ a = a | trit balancer idempotent | merge(v,v) = v | blend(c,c,0.5) = c |
| a ⊔ b = b ⊔ a | + is commutative | merge commutes | blend commutes |
| (a⊔b)⊔c = a⊔(b⊔c) | + is associative | merge associative | blend ≈ associative |
Origin
Three independent discoveries of the same algebra:
- Flavors (Symbolics, 1979): mixin merge
- CRDTs (Kleppmann, 2011): state merge
- OKLAB (Ottosson, 2020): perceptual blend
Jaffer's SLIB contains the three pieces (
colorspace.scm, modular.scm, random.scm) never composed.
Gay.jl and nanoclj-zig/src/semilattice.zig are the first known compositions.
Implementation
- Zig:
(211 lines, 9 tests)nanoclj-zig/src/semilattice.zig - Babashka:
(walks all 1425 skills)asi/skill-semilattice.bb
Results (2026-04-05)
Skills: 1425 Trit distribution: +1=478 0=481 -1=466 Trit sum: 12 GF(3) balanced: YES ✓ (sum mod 3 = 0)
Related Skills
— the abstract algebrajoin-semilattice
— GF(3) triadic task routingskill-dispatch
— conservation verificationgf3-conservation-oracle
— behavioral equivalencebisimulation-game
— stigmergic merge (distance 0.0000 from "semilattice crdt merge")implicit-coordination