/asi:sdr-borges-reafferencefrom asi
Explores SDR signal processing through Borges library metaphor, spectral gap analysis, and reafference random walks for agency-enabling radio experimentation.
Ships in asi. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
"The Library of Babel contains every possible radio transmission." — Borges meets GNU Radio
SDR as Infinite Library: Software Defined Radio is a Borges library where:
┌─────────────────────────────────────────────────────────────────┐
│ SPECTRAL GAP AND MIXING TIME │
├─────────────────────────────────────────────────────────────────┤
│ Gap = 0: τ_mix = ∞ (stuck, no exploration) │
│ Gap = 1/4: τ_mix = 4 (balanced exploration/exploitation) │
│ Gap = 1/2: τ_mix = 2 (fast mixing, less diversity) │
│ Gap = 1: τ_mix = 1 (instant mixing, no memory) │
└─────────────────────────────────────────────────────────────────┘
WHY 1/4?
- Alon-Boppana bound for d=3 regular graphs: λ₂ ≤ 2√2 ≈ 2.83
- Normalized gap = (d - λ₂)/d ≈ 0.25 for Ramanujan graphs
- This is OPTIMAL for 3-way (GF(3)) systems!
The maximally mixed state ρ = I/d is:
# Maximally mixed state in 3-dimensional GF(3) space
ρ_max = [1/3 0 0; 0 1/3 0; 0 0 1/3]
# Purity: tr(ρ²) = 1/3 (minimal for d=3)
# Von Neumann entropy: S = log(3) ≈ 1.585 bits
# AGENCY MEANING:
# - You can become MINUS, ERGODIC, or PLUS with equal probability
# - No prior commitment constrains your action space
# - Maximum optionality = maximum agency
| Property | Maximally Mixed | Pure State |
|---|---|---|
| Entropy | log(3) = 1.585 | 0 |
| Purity | 1/3 | 1 |
| Agency | Maximum | Minimum |
| Predictability | Minimum | Maximum |
| Adaptability | Maximum | Minimum |
Key Insight: Agency requires uncertainty. A system that knows exactly what it will do has no choice.
From von Holst's principle:
Efference copy: What I intend to transmit
Reafference: What I observe being transmitted
Error: Reafference - Efference copy
If error = 0: I caused this (self-generated)
If error ≠ 0: World caused this (exafference)
┌─────────────────────────────────────────────────────────────────┐
│ SDR REAFFERENCE ARCHITECTURE │
├─────────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────┐ Tx Signal ┌──────────┐ │
│ │ INTENT │ ───────────────► │ TX SDR │ ──► Antenna │
│ │ (Efference│ └──────────┘ │
│ │ Copy) │ │
│ └────┬─────┘ │ │
│ │ ▼ │
│ │ Environment │
│ │ │ │
│ │ ▼ │
│ ┌────▼─────┐ Rx Signal ┌──────────┐ │
│ │COMPARATOR│ ◄─────────────── │ RX SDR │ ◄── Antenna │
│ │(Reafference) └──────────┘ │
│ └────┬─────┘ │
│ │ │
│ ▼ │
│ Error Signal → Learning → Updated Tx Parameters │
└─────────────────────────────────────────────────────────────────┘
# Reafference-guided random walk on spectrum
function reafference_walk(sdr, initial_freq, steps)
freq = initial_freq
history = [freq]
for step in 1:steps
# Efference: intended frequency shift
Δf_intended = randn() * bandwidth
# Actual observation (with channel effects)
signal = receive(sdr, freq + Δf_intended)
Δf_observed = estimate_frequency_shift(signal)
# Reafference error
error = Δf_observed - Δf_intended
# If error ≈ 0: we caused this (stay/exploit)
# If error ≫ 0: world caused this (explore!)
if abs(error) < threshold
freq += Δf_intended # Exploit
else
freq += error # Explore world's contribution
end
push!(history, freq)
end
return history
end
The acset-skill provides categorical database operations:
using ACSets
# SDR Observation schema
@present SchSDRObs(FreeSchema) begin
(Freq, Time, Signal, Modulation)::Ob
freq_at::Hom(Signal, Freq)
time_at::Hom(Signal, Time)
modulation::Hom(Signal, Modulation)
# Attributes
(FreqHz, TimeNs, Complex, ModType)::AttrType
frequency::Attr(Freq, FreqHz)
timestamp::Attr(Time, TimeNs)
iq_sample::Attr(Signal, Complex)
mod_type::Attr(Modulation, ModType)
end
# Navigate with Specter-style paths
select-all(sdr_obs, [:Signal :freq_at :frequency])
Each refinement cycle produces exactly 3 skills (GF(3) conservation):
Refinement N:
🔴 MINUS (-1): One verification/analysis skill
🟢 ERGODIC (0): One coordination/integration skill
🔵 PLUS (+1): One generation/exploration skill
Sum: (-1) + (0) + (+1) = 0 ✓ CONSERVED
Cycle 1: Basic SDR
sdr-signal-verify — Validate received signal integritysdr-frequency-coordinator — Manage spectrum allocationsdr-modulation-generator — Create novel modulation schemesCycle 2: Borges Integration
borges-catalog-index — Compress signal libraryborges-library-walker — Navigate infinite spectrumborges-signal-discovery — Find unexpected transmissionsCycle 3: Reafference Learning
reafference-error-analyzer — Measure self vs worldreafference-comparator — Efference/reafference matchingreafference-model-learner — Update world model from errors#!/usr/bin/env python3
"""
sdr_borges_reafference.py
GNU Radio flowgraph with reafference-guided tuning
"""
from gnuradio import gr, blocks, analog, filter
from gnuradio.filter import firdes
import numpy as np
class ReafferenceSDR(gr.top_block):
def __init__(self, center_freq=100e6, sample_rate=2e6):
gr.top_block.__init__(self, "Reafference SDR")
# SDR source (simulated for skill definition)
self.source = analog.sig_source_c(
sample_rate, analog.GR_COS_WAVE, 0, 1, 0
)
# Spectral analysis for reafference
self.fft_size = 1024
self.spectral_gap = 0.25 # 1/4 optimal mixing
# Efference copy buffer
self.efference = np.zeros(self.fft_size, dtype=complex)
# Reafference comparator
self.reafference_error = 0.0
def compute_reafference(self, received_spectrum):
"""Compare received spectrum to efference copy"""
self.reafference_error = np.mean(
np.abs(received_spectrum - self.efference)
)
return self.reafference_error
def random_walk_step(self, current_freq):
"""Spectral-gap-guided random walk"""
# Mixing time τ = 1/gap = 4 for gap=1/4
mixing_time = 1.0 / self.spectral_gap
# Step size inversely proportional to mixing time
step_size = self.sample_rate / mixing_time
# Reafference-weighted step
if self.reafference_error < 0.1:
# Self-caused: small exploitation step
delta = np.random.normal(0, step_size * 0.1)
else:
# World-caused: large exploration step
delta = np.random.normal(0, step_size)
return current_freq + delta
;; Borges REPL for SDR exploration
;; Each command is a step in the infinite library
(define (borges-repl sdr-state)
(display "📻 Borges Radio> ")
(let ((cmd (read)))
(case (car cmd)
;; MINUS operations (verification)
((verify) (verify-signal sdr-state (cadr cmd)))
((analyze) (analyze-spectrum sdr-state))
((compress) (kolmogorov-compress sdr-state))
;; ERGODIC operations (coordination)
((tune) (tune-frequency sdr-state (cadr cmd)))
((mix) (apply-spectral-gap sdr-state 0.25))
((walk) (reafference-walk sdr-state (cadr cmd)))
;; PLUS operations (generation)
((generate) (generate-signal sdr-state (cdr cmd)))
((explore) (borges-explore sdr-state))
((discover) (discover-unknown sdr-state))
;; Meta-operations
((refine) (spawn-3-skills sdr-state))
((help) (display-borges-help))
((quit) 'done)
(else (display "Unknown command. The library is vast.\n"))))
(unless (eq? cmd 'quit)
(borges-repl (update-state sdr-state cmd))))
(define (spawn-3-skills state)
"Generate exactly 3 new skills (GF(3) conservation)"
(let ((seed (state-seed state)))
(list
(create-skill 'minus (splitmix-next seed 0))
(create-skill 'ergodic (splitmix-next seed 1))
(create-skill 'plus (splitmix-next seed 2)))))
┌─────────────────────────────────────────────────────────────────┐
│ SDR-BORGES-REAFFERENCE TRIAD │
├─────────────────────────────────────────────────────────────────┤
│ │
│ 🔴 MINUS (-1): spectrum-analyzer │
│ └─ Kolmogorov compression of signal library │
│ └─ Spectral gap measurement via eigenvalue estimation │
│ │
│ 🟢 ERGODIC (0): sdr-borges-reafference (THIS SKILL) │
│ └─ Coordinates MINUS and PLUS via reafference loop │
│ └─ Maintains maximally mixed state for agency │
│ │
│ 🔵 PLUS (+1): signal-generator │
│ └─ Creates novel transmissions from Borges exploration │
│ └─ Random walks with spectral gap 1/4 │
│ │
│ Sum: (-1) + (0) + (+1) = 0 ✓ │
└─────────────────────────────────────────────────────────────────┘
# Start Borges SDR REPL
bb sdr-borges-repl.bb
# Invoke spectral gap analysis
amp sdr-borges-reafference --analyze-gap
# Generate 3 new skills from current state
amp sdr-borges-reafference --refine
# Reafference walk across spectrum
amp sdr-borges-reafference --walk --steps 100 --gap 0.25
TRIT_STREAM: [+1, -1, -1, +1, +1, +1, +1]
SPECTRAL_GAP: 1/4 (optimal for GF(3))
MIXING_TIME: 4 steps
MAXIMALLY_MIXED: ρ = I/3, S = log(3)
GF(3)_SUM: 0 ✓ CONSERVED
"In the Library of Babel, every signal has already been transmitted. We need only learn to tune."
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Generated from the plugin's indexed repository (plurigrid/asi) — no native marketplace selected
npx claudepluginhub p/plurigrid-asi-plugins-asi1,393 skills in this plugin
/abductive-replHypothesis-Test Loops via REPL for Exploratory Abductive Inference/academic-researchSearch academic papers across arXiv, PubMed, Semantic Scholar, bioRxiv, medRxiv, Google Scholar, and more. Get BibTeX citations, download PDFs, analyze citation networks. Use for literature reviews, finding papers, and academic research./accept-no-substitutesThis skill should be used when agents generate placeholder tokens like "pseudo-", "mock-", "temporary", "TODO", "demo-", or similar incompleteness markers. Detects substitution patterns in agent OUTPUT and triggers mandatory user interview instead of accepting incomplete work. Activates automatically on any output containing forbidden tokens.Other plugins' skills for the same job