home / skills / plurigrid / asi / julia-gay

julia-gay skill

/skills/julia-gay

This skill generates deterministic colors from a seed and index using Gay.jl, enabling stable palettes, trit classification, and SPI-compliant fingerprints.

npx playbooks add skill plurigrid/asi --skill julia-gay

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
1.6 KB
---
name: julia-gay
description: "Gay.jl integration for deterministic color generation. SplitMix64 RNG, GF(3) trits, and SPI-compliant fingerprints in Julia."
metadata:
  trit: +1
  version: "1.0.0"
  bundle: core
---

# Julia Gay Skill

**Trit**: +1 (PLUS - generative color computation)  
**Foundation**: Gay.jl + SplitMix64 + SPI  

## Core Concept

Gay.jl provides:
- Deterministic color from seed + index
- GF(3) trit classification
- SPI-compliant parallel fingerprints
- Wide-gamut color space support

## API

```julia
using Gay

# Color at index
color = color_at(seed, index)
# => (r=0.65, g=0.32, b=0.88)

# Palette generation
palette = Gay.palette(seed, 5)

# Trit classification
trit = Gay.trit(color)  # => -1, 0, or +1

# XOR fingerprint
fp = Gay.fingerprint(colors)
```

## SPI Guarantees

```julia
# Strong Parallelism Invariance
@assert fingerprint(colors_thread1) ⊻ fingerprint(colors_thread2) == 
        fingerprint(vcat(colors_thread1, colors_thread2))
```

## Ergodic Bridge

```julia
using Gay: ErgodicBridge

# Create time-color bridge
bridge = create_bridge(seed, n_colors)

# Verify bidirectionally
verify_bridge(bridge)

# Detect obstructions
obstructions = detect_obstructions(seed, n_samples)
```

## Canonical Triads

```
bisimulation-game (-1) ⊗ acsets (0) ⊗ julia-gay (+1) = 0 ✓
sheaf-cohomology (-1) ⊗ bumpus-narratives (0) ⊗ julia-gay (+1) = 0 ✓
spi-parallel-verify (-1) ⊗ triad-interleave (0) ⊗ julia-gay (+1) = 0 ✓
```

## See Also

- `gay-mcp` - MCP server for color generation
- `triad-interleave` - 3-stream scheduling
- `world-hopping` - Badiou possible world navigation

Overview

This skill integrates Gay.jl for deterministic color generation, providing reproducible palettes, GF(3) trit classification, and SPI-compliant fingerprints. It uses a SplitMix64 RNG to produce wide-gamut colors from a seed and index. The implementation supports parallel-safe fingerprinting and tools to build time-color bridges for sequence verification.

How this skill works

Given a numeric seed and an index, the SplitMix64-based generator produces a deterministic color in RGB space. Colors can be classified into GF(3) trits (-1, 0, +1) for algebraic grouping and canonical triad operations. A fingerprint operation XORs color-derived values to produce an SPI-compliant, parallel-invariant summary. The Ergodic Bridge utilities create and verify bidirectional time-color sequences and detect obstructions in sampling.

When to use it

  • Generate repeatable color tokens for visualizations or procedural art.
  • Create deterministic palettes for testing, UI theming, or design systems.
  • Classify colors into ternary groups using GF(3) trits for combinatorial workflows.
  • Produce parallel-safe fingerprints for distributed color streams or caches.
  • Verify time-sequence consistency with ergodic bridge and obstruction detection.

Best practices

  • Seed explicitly for reproducibility; avoid using time-based seeds in production tests.
  • Use palette(seed, n) to batch-generate colors rather than repeated single calls for performance.
  • Leverage fingerprint(colors) to compare or merge parallel color streams safely.
  • Use trit(color) when you need ternary classification for grouping or scheduling.
  • Run verify_bridge on generated bridges to ensure bidirectional consistency before deployment.

Example use cases

  • Procedural art: generate deterministic palettes for animated frames keyed to a seed and index.
  • Distributed rendering: merge color streams from parallel workers using SPI fingerprints without ordering concerns.
  • Design systems: supply reproducible brand palettes and verify them across builds and platforms.
  • Testing: create stable color fixtures for snapshot tests and visual regression checks.
  • Scheduling: use trit classification to map colors into three-stream interleaving or other GF(3) based schedulers.

FAQ

How do fingerprints handle parallel inputs?

Fingerprints use XOR aggregation to provide Strong Parallelism Invariance: the fingerprint of concatenated streams equals the XOR of individual fingerprints.

What does trit(color) return and why use it?

trit(color) returns -1, 0, or +1 to classify colors in GF(3). This ternary value is useful for canonical triads, scheduling, and algebraic grouping of color sets.