/asi:cybernetic-immunefrom asi
Implements self/non-self discrimination via reafference, GF(3) trit encoding, and information geometry for immune-inspired anomaly detection.
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 immune system is a cognitive system: it learns, remembers, and discriminates self from non-self." — Francisco Varela, Principles of Biological Autonomy (1979)
"Autopoietic Ergodicity combines the principles of autopoiesis and ergodicity. Autopoiesis refers to the self-maintenance of a system, where the system is capable of reproducing and maintaining itself." — vibes.lol gist
"Active Inference in String Diagrams: A Categorical Account of Predictive Processing and Free Energy" — ACT 2023, Tull, Kleiner, Smithe
Categorical Cybernetics Connection: The immune system's self/non-self discrimination maps directly to:
Key Papers (from bmorphism's Plurigrid references):
Related to bmorphism's work on:
Self/Non-Self Discrimination via reafference vs exafference:
GF(3) Trit Encoding:
| Trit | Classification | Immune Role | Action |
|---|---|---|---|
| -1 | SELF | T_reg (regulatory) | Suppress, tolerate |
| 0 | UNKNOWN | MHC presentation | Inspect, process |
| +1 | NON-SELF | Effector cells | Attack, respond |
Autoimmune = GF(3) Conservation Violation: Σ(trits) ≢ 0 mod 3
The immune state manifold is a probability simplex with Fisher-Rao metric:
// Fisher information: I(θ) = E[(∂log p/∂θ)²]
computeFisherInformation() {
const probs = Array.from(this.stateDistribution.values());
// For categorical: I_ij = δ_ij/p_i - 1
return probs.map((p, i) => 1 / Math.max(p, 0.001));
}
// Fisher-Rao geodesic distance: d(p,q)² = 4 Σ (√p_i - √q_i)²
fisherRaoDistance(dist1, dist2) {
let sum = 0;
for (const k of keys) {
const p = dist1.get(k) || 0;
const q = dist2.get(k) || 0;
sum += (Math.sqrt(p) - Math.sqrt(q)) ** 2;
}
return 2 * Math.sqrt(sum); // = 2 × Hellinger distance
}
Natural Gradient: F⁻¹ · ∇L for efficient belief updating in curved space.
Parallel Transport: Cytokine signals transported along geodesics preserve information content.
const IMMUNE_STATES = {
NAIVE: 'naive', // Not yet encountered antigen
TOLERANT: 'tolerant', // Self-recognized, suppress response (-1)
ACTIVATED: 'activated', // Response engaged (+1)
MEMORY: 'memory', // Prior encounter, fast recall
ANERGIC: 'anergic' // Exhausted, non-responsive (0)
};
// Recognition via color signature (antigenic epitope)
colorSignature(color) {
const hueBin = Math.floor(color.H / 30); // 12 bins
return `H${hueBin}T${color.trit}`;
}
// Response classification
recognize(antigenColor) {
const signature = this.colorSignature(antigenColor);
// Self-tolerance check
if (this.toleranceList.has(signature)) {
return { classification: 'self', trit: -1, action: 'tolerate' };
}
// Adaptive memory
if (this.memory.has(signature)) {
const mem = this.memory.get(signature);
return { trit: mem.trit, action: mem.hostile ? 'attack' : 'tolerate' };
}
// Novel: inspect via Markov blanket
return { classification: 'novel', trit: 0, action: 'inspect' };
}
System-level immune coordination:
class CognitiveFirewall {
constructor(immuneAgents) {
this.agents = immuneAgents;
this.threatLevel = 0;
this.autoimmuneCrisis = false;
}
// Coordinated response
coordinatedResponse() {
if (this.autoimmuneCrisis) {
// Emergency T_reg activation
return { action: 'tolerance_induction' };
}
if (this.threatLevel > 0.5) {
// Germinal center reaction
return { action: 'coordinated_attack' };
}
return { action: 'homeostasis' };
}
}
parallelProcess(allTiles) {
// Partition agents by trit for parallel streams
const partitions = {
minus: agents.filter(a => a.trit === -1), // Validators
ergodic: agents.filter(a => a.trit === 0), // Coordinators
plus: agents.filter(a => a.trit === 1) // Generators
};
// Process each partition independently
for (const [trit, batch] of Object.entries(partitions)) {
for (const agent of batch) {
// Collision detection and response
}
}
// Synchronize: ensure GF(3) conservation
const tritBalance = results.minus.length * -1 + results.plus.length * 1;
return { conserved: tritBalance % 3 === 0 };
}
Signals propagate along Fisher-Rao geodesics:
parallelTransport(signal, fromAgent, toAgent) {
const geodesicDist = this.fisherRaoDistance(
new Map([[fromAgent.state, 1]]),
new Map([[toAgent.state, 1]])
);
// Decay proportional to geodesic distance
const transported = signal.level * Math.exp(-geodesicDist * 0.5);
return { level: transported, geodesicLoss: signal.level - transported };
}
# Core Immune Triads
three-match (-1) ⊗ cybernetic-immune (0) ⊗ gay-mcp (+1) = 0 ✓ [Self/Non-Self]
temporal-coalgebra (-1) ⊗ cybernetic-immune (0) ⊗ agent-o-rama (+1) = 0 ✓ [Immune Response]
sheaf-cohomology (-1) ⊗ cybernetic-immune (0) ⊗ koopman-generator (+1) = 0 ✓ [Cytokine Cascade]
shadow-goblin (-1) ⊗ cybernetic-immune (0) ⊗ gay-mcp (+1) = 0 ✓ [T_reg Surveillance]
polyglot-spi (-1) ⊗ cybernetic-immune (0) ⊗ gay-mcp (+1) = 0 ✓ [Cross-Species]
getDiagnostics() {
return {
entropy: H(stateDistribution), // Uncertainty
curvature: trace(FisherMatrix) / n, // Manifold curvature
threatLevel: activatedCount / total,
autoimmune: tritSum % 3 !== 0
};
}
autopoiesis — Self-production and operational closuregay-mcp — Deterministic color generationshadow-goblin — Observer agent tracingkoopman-generator — Dynamics from observablesThis skill connects to the K-Dense-AI/claude-scientific-skills ecosystem:
game-theory: 21 citations in bib.duckdbThis 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
The skill participates in triads satisfying:
(-1) + (0) + (+1) ≡ 0 (mod 3)
This ensures compositional coherence in the Cat# equipment structure.
What SKILL.md sets; muted values are Claude Code's defaults
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