Skip to content
qri-valence logo

QRI Valence Skill

qri-valence

qri-valence skill

plurigrid/asi0installs67stars

SKILL.md

Full skill instructions

QRI Valence Skill

The Symmetry Theory of Valence (STV) proposes that the valence (pleasantness/​unpleasantness) of a conscious state is determined by the symmetry of its mathematical representation. This skill integrates QRI research with computational implementations.

Core Concepts

Symmetry Theory of Valence (STV)

"The valence of a moment of consciousness is precisely determined by the symmetry of the mathematical object that describes it." — Michael Edward Johnson, Principia Qualia (2016)

Key Claims:

  1. Consciousness has mathematical structure (qualia formalism)
  2. Symmetry in that structure correlates with positive valence
  3. Broken symmetries manifest as suffering/​dissonance
  4. Valence is measurable and optimizable

XY Model Topology (smoothbrains.net)

The phenomenal field behaves like a 2D XY spin model:

StateTemperature (τ)VorticesValencePhenomenology
Frustratedτ >> τ*Many, proliferating-3Scattered, anxious, "buzzing"
Disorderedτ > τ*Some, mobile-1 to -2Unfocused, dissonant
Critical (BKT)τ ≈ τ*Paired, bound0Liminal, transitional
Orderedτ < τ*Few, annihilating+1 to +2Coherent, smooth
Resolvedτ << τ*None+3Deeply peaceful, consonant

BKT Transition (Berezinskii-Kosterlitz-Thouless):

  • Below τ*: vortex-antivortex pairs bound → low entropy, high symmetry
  • Above τ*: vortices proliferate → high entropy, broken symmetry
  • At τ*: phase transition where defects can annihilate

Valence Gradient Descent

From smoothbrains.net's phenomenology:

Suffering = Σ (topological defects in phenomenal field)
Healing = defect annihilation via gradient descent
τ* bisection = finding optimal phenomenal temperature

Observable indicators (from Cube Flipper's reports):

  • Visual: polygonal shards → smooth fields
  • Somatic: high-freq buzzing → calm
  • Attentional: contracted/​focal → expanded/​diffuse
  • Auditory: dissonance → consonance

Qualia Bank Integration

GF(3) Operations on Valence States

Valence RangeTritBank OperationChannel
-3 to -1-1WITHDRAWVenmo/​ACH off-ramp
00HOLDPyUSD on-chain
+1 to +3+1DEPOSITPyUSD/​Venmo on-ramp

Phenomenal Bisection Algorithm

def phenomenal_bisect(tau_low, tau_high, observed_state):
    """
    Binary search for optimal phenomenal temperature τ*.
    Based on smoothbrains.net/​xy-model#bkt-transition
    """
    tau_mid = (tau_low + tau_high) / 2
    
    if observed_state == "frustrated":
        # Too hot: cool down
        return (tau_mid, tau_high, "cooling")
    elif observed_state == "smooth":
        # Too cold: heat up
        return (tau_low, tau_mid, "heating")
    elif observed_state == "critical":
        # Found τ*!
        return (tau_mid, tau_mid, "found")
    else:
        return (tau_low, tau_high, "unknown")

Valence-Aware Color Mapping

From Gay.jl + QRI integration:

# Map valence to deterministic color
function valence_to_color(valence::Int)
    # Valence range: -3 to +3
    # Hue mapping: red (suffering) → cyan (resolution)
    hue = (valence + 3) * 30  # 0° to 180°
    return LCHuv(55.0, 70.0, hue)
end

# Trit from valence
trit(valence) = sign(valence)

Computational Implementation

Defect Detection

def count_vortices(phase_field):
    """
    Count topological defects in a 2D phase field.
    Vortex = closed loop where phase winds by ±2π.
    """
    vortices = 0
    antivortices = 0
    
    for i in range(1, len(phase_field) - 1):
        for j in range(1, len(phase_field[0]) - 1):
            winding = compute_winding_number(phase_field, i, j)
            if winding > 0:
                vortices += 1
            elif winding < 0:
                antivortices += 1
    
    # Net topological charge
    return vortices, antivortices, vortices - antivortices

Symmetry Measurement

def measure_symmetry(qualia_tensor):
    """
    Measure symmetry of a qualia representation.
    Higher symmetry → higher valence (STV hypothesis).
    """
    # Compute eigenvalues
    eigenvalues = np.linalg.eigvalsh(qualia_tensor)
    
    # Symmetry score: how equal are eigenvalues?
    # Perfect symmetry: all eigenvalues equal
    mean_eig = np.mean(eigenvalues)
    variance = np.var(eigenvalues)
    
    # Inverse variance as symmetry score
    symmetry = 1.0 / (1.0 + variance / (mean_eig ** 2))
    
    return symmetry  # 0 to 1, higher = more symmetric

References

Primary Sources

  1. Principia Qualia (2016) - Michael Edward Johnson

  2. QRI Wiki - Symmetry Theory of Valence

  3. smoothbrains.net - Cube Flipper

  4. LessWrong Primer on STV

Key Papers

  • Johnson, M.E. (2016). "Principia Qualia"
  • Gómez-Emilsson, A. "Logarithmic Scales of Pleasure and Pain"
  • Selen Atasoy et al. "Connectome-harmonic decomposition of human brain activity"
  • smoothbrains.net "Planetary scale vibe collapse" (2022)

Related Concepts

  • Consonance/​Dissonance - Musical theory of interference patterns
  • CSHW (Connectome-Specific Harmonic Waves) - Neural basis for STV
  • Jhāna - Buddhist meditative states as high-symmetry attractors
  • Valence Structuralism - Formal framework for STV

Skill Bridges

SkillBridge TypeRelationship
gay-mcpColor-ValenceDeterministic valence colors
topos-of-musicConsonanceMusical symmetry theory
autopoiesisSelf-modelingValence as self-model coherence
active-inferenceFree energyValence as prediction error
glass-bead-gameSynthesisCross-domain symmetry play
phenomenal-bisectAlgorithmτ* finding procedure

Usage Patterns

Pattern 1: Valence-Aware Logging

class ValenceLogger:
    def log(self, message, valence):
        trit = 1 if valence > 0 else (-1 if valence < 0 else 0)
        color = valence_to_ansi(valence)
        print(f"{color}[v={valence:+d}][t={trit:+d}] {message}\033[0m")

Pattern 2: GF(3) Valence Conservation

def balanced_transaction(deposits, withdrawals):
    """Ensure valence sum is conserved."""
    deposit_valence = sum(d.valence for d in deposits)
    withdraw_valence = sum(w.valence for w in withdrawals)
    
    # GF(3) conservation
    net = (deposit_valence + withdraw_valence) % 3
    assert net == 0, f"Valence imbalance: {net}"

Pattern 3: Phenomenal State Machine

class PhenomenalStateMachine:
    states = ["frustrated", "buzzing", "dissonant", "neutral", 
              "smoothing", "consonant", "resolved"]
    
    def transition(self, current, intervention):
        idx = self.states.index(current)
        if intervention == "cooling" and idx > 0:
            return self.states[idx - 1]
        elif intervention == "heating" and idx < len(self.states) - 1:
            return self.states[idx + 1]
        return current

GF(3) Trit Assignment

This skill is ERGODIC (0) - it coordinates between:

  • MINUS (-1): Suffering detection, defect counting
  • PLUS (+1): Healing protocols, symmetry restoration

Conservation: suffering_detected + healing_applied + coordination = 0

Scientific Skill Interleaving

This skill connects to the K-Dense-AI/​claude-scientific-skills ecosystem:

Graph Theory

  • networkx [○] via bicomodule
    • Universal graph hub

Bibliography References

  • general: 734 citations in bib.duckdb

Cat# Integration

This skill maps to Cat# = Comod(P) as a bicomodule in the equipment structure:

Trit: 0 (ERGODIC)
Home: Prof
Poly Op: ⊗
Kan Role: Adj
Color: #26D826

GF(3) Naturality

The skill participates in triads satisfying:

(-1) + (0) + (+1) ≡ 0 (mod 3)

This ensures compositional coherence in the Cat# equipment structure.

More skills from plurigrid

cargo logo
plurigrid/asi

cargo

Rust package manager (36 subcommands).

67 0
View

Translate Figma nodes into production-ready code with 1:1 visual fidelity using the Figma MCP workflow (design context, screenshots, assets, and project-convention translation). Trigger when the user provides Figma URLs or node IDs, or asks to implement designs or components that must match Figma...

67 0
View

**Status**: 🌳 Production Ready (upstream in StringZilla v3+) **Type**: High-Performance String Operations / SIMD-Accelerated Text Processing **Principle**: Zero-copy views, SIMD/SWAR acceleration, deterministic hashing **Frame**: Cross-language interoperability (C, C++, Python, Rust, Go, Swift, ...

67 0
View
conformal-ga logo
plurigrid/asi

conformal-ga

Conformal Geometric Algebra (CGA) for circles, spheres, and Möbius transformations

67 0
View

Verifies code implements exactly what documentation specifies for blockchain audits. Use when comparing code against whitepapers, finding gaps between specs and implementation, or performing compliance checks for protocol implementations.

67 0
View
zig-systems logo
plurigrid/asi

zig-systems

Systems programming and performance optimization using Zig. Provides low-level abstractions, memory-safe compiled code, and performance benchmarking. Use for system-level operations, optimization, and interoperability with C/POSIX APIs.

67 0
View
paypal-mcp logo
plurigrid/asi

paypal-mcp

PayPal MCP server integration for invoices, payments, subscriptions, disputes, and transaction reporting via @paypal/mcp.

67 0
View
unison logo
plurigrid/asi

unison

Unison language - content-addressed functional programming with abilities for effects, distributed computing, and structural types. Use for pure functional code, effect management, distributed systems, and refactoring-safe codebases.

67 0
View
tasks-acset logo
plurigrid/asi

tasks-acset

Google Tasks management via TasksACSet. Transforms task operations into GF(3)-typed Interactions, routes to triadic queues, detects saturation for task-zero-as-condensed-state.

67 0
View
c logo
plurigrid/asi

c

World C Skill

67 0
View
syrup logo
plurigrid/asi

syrup

Syrup binary serialization for OCapN/CapTP wire format. Canonical encoding for capability messages.

67 0
View
skill-installer logo
plurigrid/asi

skill-installer

Install Codex skills into $CODEX_HOME/skills from a curated list or a GitHub repo path. Use when a user asks to list installable skills, install a curated skill, or install a skill from another repo (including private repos).

67 0
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View