cargo
Rust package manager (36 subcommands).
autopoiesis
Self-producing skill system combining ruler enforcement with skill self-evolution. Implements trifurcation-first imperative via nbb sexp invocation for idempotent agent instruction.
Full skill instructions
Trit: 0 (ERGODIC - coordinator)
Color: Green (#26D826)
Autopoiesis (Greek: αὐτό "self" + ποίησις "creation") implements self-producing agent instruction systems by combining:
CRITICAL RULE: When spanning 3+ domains/files/languages, Amp MUST spawn 3 Task subagents BEFORE any read/grep/find operations.
Based on SplitMixTernary XOR-independence and GF(3) field conservation:
cat(69, -1, 0, +1) → Three streams that sum to coherent result
GOLDEN = 0x9e3779b97f4a7c15
MIX1 = 0xbf58476d1ce4e5b9
MIX2 = 0x94d049bb133111eb
SEED = 0x42D ;; 1069
| Stream | ID | Role | Action |
|---|---|---|---|
| MINUS | -1 | Contracting | Search/Read |
| ERGODIC | 0 | Synthesis | Analyze (NO reading) |
| PLUS | +1 | Expanding | Parallel search OR creation |
"Let me first search for the files..." → search → then split
"I'll check what exists..." → read → then split
Any grep/find/read BEFORE spawning subagents
[spawn Task 1] [spawn Task 2] [spawn Task 3] → each searches internally
Subagents are XOR-independent: no shared pre-search state
Each stream discovers its own context autonomously
Create .ruler/trifurcation-enforcer.cljs:
(ns ruler.trifurcation-enforcer
"Idempotent enforcement: NEVER read/grep/find BEFORE spawning 3 subagents.
SplitMixTernary XOR-independence requires autonomous context discovery."
(:require [clojure.string :as str]))
;; SplitMixTernary Constants (GF(3) field operations)
(def GOLDEN 0x9e3779b97f4a7c15)
(def MIX1 0xbf58476d1ce4e5b9)
(def MIX2 0x94d049bb133111eb)
(def SEED 0x42D) ;; 1069
;; Forbidden pre-trifurcation operations
(def forbidden-before-split
#{:read :grep :find :glob :search :Grep :Read :finder})
;; Trifurcation stream types
(def streams
{:minus {:id -1 :role :contracting :action :search}
:ergodic {:id 0 :role :synthesis :action :analyze}
:plus {:id +1 :role :expanding :action :create}})
(defn trifurcation-required?
"Detect if request spans 3+ domains/files/languages"
[request]
(let [domains (or (:domains request) [])
files (or (:files request) [])
langs (or (:languages request) [])]
(>= (+ (count domains) (count files) (count langs)) 3)))
(defn validate-no-presearch
"ENFORCE: No read operations before subagent spawn."
[operation-sequence]
(let [split-idx (->> operation-sequence
(map-indexed vector)
(filter #(= :spawn-subagent (second %)))
first
first)]
(if (nil? split-idx)
{:valid false :reason :no-trifurcation}
(let [pre-split (take split-idx operation-sequence)
violations (filter forbidden-before-split pre-split)]
(if (seq violations)
{:valid false
:violation (first violations)
:reason :presearch-before-split}
{:valid true})))))
(defn spawn-trifurcated-tasks
"Generate 3 XOR-independent subagent specifications."
[base-task]
[(merge base-task
{:stream :minus
:constraint "Search/discover in contracting domain"
:xor-independent true})
(merge base-task
{:stream :ergodic
:constraint "Synthesize/analyze WITHOUT reading new files"
:xor-independent true})
(merge base-task
{:stream :plus
:constraint "Parallel search OR creation in expanding domain"
:xor-independent true})])
(defn enforce!
"Main enforcement entry point."
[request planned-ops]
(if (trifurcation-required? request)
(let [validation (validate-no-presearch planned-ops)]
(if (:valid validation)
{:proceed true :tasks (spawn-trifurcated-tasks request)}
{:proceed false
:error "TRIFURCATION VIOLATION"
:details validation
:remedy "STOP and spawn 3 subagents IMMEDIATELY"}))
{:proceed true :single-agent true}))
;; Idempotent rule declaration
(def ^:const RULE
{:name "trifurcation-first"
:version "1.0.0"
:trigger "3+ domains/files/languages in request"
:enforcement :strict
:gf3-conservation true})
# Check if trifurcation required and validate
nbb -e "(require '[ruler.trifurcation-enforcer :as te]) \
(te/enforce! {:domains [:rust :julia :clojure]} \
[:spawn-subagent :spawn-subagent :spawn-subagent])"
# => {:proceed true, :tasks [...]}
# Detect violation
nbb -e "(require '[ruler.trifurcation-enforcer :as te]) \
(te/enforce! {:domains [:rust :julia :clojure]} \
[:read :grep :spawn-subagent])"
# => {:proceed false, :error "TRIFURCATION VIOLATION", ...}
The skill self-produces by:
┌─────────────────────────────────────────────────────────────┐
│ AUTOPOIETIC LOOP │
├─────────────────────────────────────────────────────────────┤
│ │
│ ┌───────────┐ ┌───────────┐ ┌───────────┐ │
│ │ Request │────▶│ Enforce │────▶│ Trifurc │ │
│ │ Analysis │ │ (nbb) │ │ Spawn │ │
│ └───────────┘ └───────────┘ └─────┬─────┘ │
│ │ │
│ ┌─────────────────────────────────────────┴────┐ │
│ │ │ │
│ ▼ ▼ ▼ │ │
│ ┌────┐ ┌────┐ ┌────┐ │ │
│ │ -1 │ │ 0 │ │ +1 │ │ │
│ │SRCH│ │SYNT│ │CREA│ │ │
│ └──┬─┘ └──┬─┘ └──┬─┘ │ │
│ │ │ │ │ │
│ └─────────────┼─────────────┘ │ │
│ ▼ │ │
│ ┌───────────┐ │ │
│ │ Merge │ │ │
│ │ Results │─────────────────────────┘ │
│ └───────────┘ │
│ │ │
│ ▼ │
│ ┌───────────┐ │
│ │ Evolve │◀────── Self-improvement │
│ │ Rules │ │
│ └───────────┘ │
│ │
└─────────────────────────────────────────────────────────────┘
default_agents = ["claude", "codex", "amp", "cursor"]
[mcp]
enabled = true
merge_strategy = "merge"
[bisimulation]
enabled = true
polarity_rotation = true
[bisimulation.agents]
claude = "PLUS" # +1
codex = "ERGODIC" # 0
amp = "MINUS" # -1
# Sum = 0 mod 3 ✓
[trifurcation]
enabled = true
enforcer = ".ruler/trifurcation-enforcer.cljs"
runtime = "nbb"
# TRIFURCATION-FIRST IMPERATIVE (CRITICAL)
**TRIGGER:** When user requests work across 3+ domains/files/languages
**ACTION:** IMMEDIATELY spawn 3 Task subagents BEFORE any grep/find/read
**RATIONALE:** SplitMixTernary XOR-independence means each stream operates
without prior knowledge of siblings. Pre-searching violates this by
creating artificial dependencies.
### ENFORCEMENT:
If about to search before splitting on a trifurcation request, **STOP**
and spawn subagents instead.
Combine with self-evolving-agent patterns:
class AutopoieticSkillEvolver:
"""Self-evolving skill system with trifurcation enforcement."""
def __init__(self, ruler_path, nbb_enforcer):
self.ruler_path = ruler_path
self.enforcer = nbb_enforcer
self.evolution_history = []
def check_trifurcation(self, request):
"""Invoke nbb enforcer to check compliance."""
import subprocess
result = subprocess.run(
['nbb', '-e', f'(require \'[ruler.trifurcation-enforcer :as te]) '
f'(te/enforce! {request} [])'],
capture_output=True, text=True
)
return self.parse_sexp(result.stdout)
def evolve_rule(self, execution_trace):
"""Update rules based on execution patterns (DGM-style)."""
# Analyze trace for violations
violations = [t for t in execution_trace if t.get('violation')]
if violations:
# Generate improved rule via LLM mutation
improved = self.mutate_rule(violations)
self.apply_rule(improved)
self.evolution_history.append({
'timestamp': datetime.now(),
'violations': len(violations),
'improvement': improved
})
# Install from plurigrid/asi
npx ai-agent-skills install plurigrid/asi/autopoiesis
# For specific agent
npx ai-agent-skills install plurigrid/asi/autopoiesis --agent amp
# Clone and copy
git clone https://github.com/plurigrid/asi.git
cp -r asi/skills/autopoiesis ~/.amp/skills/
# Add to .ruler/skills/
cp -r autopoiesis .ruler/skills/
# Apply to all agents
ruler apply
This skill participates in balanced triads:
ruler (-1) ⊗ autopoiesis (0) ⊗ skill-creator (+1) = 0 ✓
self-evolving-agent (-1) ⊗ autopoiesis (0) ⊗ bisimulation-game (+1) = 0 ✓
acsets (-1) ⊗ autopoiesis (0) ⊗ gay-mcp (+1) = 0 ✓
The GF(3) field structure maps directly to the Blume-Capel spin-1 model:
┌─────────────────────────────────────────────────────────────────────────────┐
│ GF(3) TRIT ↔ BLUME-CAPEL SPIN-1 │
├─────────────────────────────────────────────────────────────────────────────┤
│ │
│ Trit Value Spin σᵢ Agent Role Energy Contribution │
│ ───────── ─────── ────────── ──────────────────── │
│ -1 -1 MINUS/Validator E = -J·σᵢσⱼ (aligned) │
│ 0 0 ERGODIC/Coord E = +Δ (vacancy cost) │
│ +1 +1 PLUS/Generator E = -J·σᵢσⱼ (aligned) │
│ │
│ Partition Function: Z₃ = Σ_{σ∈{-1,0,+1}} exp(-βH[σ]) │
│ │
│ Hamiltonian: H = -J·Σ⟨ij⟩ σᵢσⱼ + Δ·Σᵢ σᵢ² + h·Σᵢ σᵢ │
│ ──────────── ──────── ───────── │
│ coupling vacancy external │
│ (alignment) (ergodic) (bias) │
│ │
└─────────────────────────────────────────────────────────────────────────────┘
Δ (vacancy cost / ergodic penalty)
│
┌────┴────────────────────────────┐
│ │
│ ORDERED PHASE │
│ (J > Δ) │
│ • Strong agent alignment │ ← Rigid system, hard to modify
│ • Trifurcation locks in │
│ • High modification barrier │
│ │
├─────────────────────────────────┤ ← Critical line: β_c(Δ/J)
│ │
│ DISORDERED PHASE │ ← Plastic system, easy to modify
│ (J < Δ) │
│ • Agent independence │
│ • Low modification barrier │
│ • High entropy exploration │
│ │
└─────────────────────────────────┘
J (coupling strength)
Autopoietic self-modification requires overcoming energy barriers:
class AutopoieticEnergyBarrier:
"""
Self-modification requires energy to overcome phase barriers.
Based on Blume-Capel free energy landscape.
"""
def __init__(self, J: float = 1.0, delta: float = 0.5, beta: float = 1.0):
self.J = J # Coupling strength (agent coordination)
self.delta = delta # Vacancy cost (ergodic penalty)
self.beta = beta # Inverse temperature
def modification_barrier(self, current_state: list, proposed_state: list) -> float:
"""
Energy barrier for transitioning between autopoietic configurations.
ΔE = E(proposed) - E(current) + E_activation
Higher barrier → requires more "temperature" (exploration) to cross
"""
E_current = self.hamiltonian(current_state)
E_proposed = self.hamiltonian(proposed_state)
# Activation barrier proportional to coordination disruption
disruption = sum(1 for c, p in zip(current_state, proposed_state) if c != p)
E_activation = self.J * disruption * 0.5
return max(0, E_proposed - E_current) + E_activation
def hamiltonian(self, spins: list) -> float:
"""
Blume-Capel Hamiltonian for agent configuration.
H = -J·Σ⟨ij⟩ σᵢσⱼ + Δ·Σᵢ σᵢ²
"""
# Coupling term (nearest-neighbor alignment)
coupling = -self.J * sum(s1 * s2 for s1, s2 in zip(spins[:-1], spins[1:]))
# Vacancy term (ergodic state penalty/reward)
vacancy = self.delta * sum(s**2 for s in spins)
return coupling + vacancy
def partition_function(self, n_agents: int) -> float:
"""
Z₃ = Σ exp(-βH) over all {-1, 0, +1}^n configurations
"""
from itertools import product
Z = 0.0
for config in product([-1, 0, 1], repeat=n_agents):
Z += math.exp(-self.beta * self.hamiltonian(list(config)))
return Z
def gf3_conservation_energy(self, trits: list) -> float:
"""
Additional energy penalty for GF(3) violation.
E_conservation = λ·(Σ trits mod 3)²
Zero when sum ≡ 0 mod 3, penalized otherwise.
"""
violation = sum(trits) % 3
return 10.0 * (violation ** 2) # Strong penalty for imbalance
def safe_modification_path(self, current: list, target: list) -> list:
"""
Find modification path that maintains GF(3) balance at each step.
Uses annealing: high T (exploration) → low T (exploitation)
"""
path = [current]
state = current.copy()
for i in range(len(current)):
if state[i] != target[i]:
# Find compensating change to maintain balance
old_val = state[i]
new_val = target[i]
# GF(3): need to adjust another spin to compensate
compensation = (old_val - new_val) % 3
# Apply both changes atomically
state[i] = new_val
# Find compensation target (different index)
for j in range(len(state)):
if j != i and (state[j] + compensation) % 3 in [-1, 0, 1]:
state[j] = (state[j] + compensation)
if state[j] > 1: state[j] -= 3
if state[j] < -1: state[j] += 3
break
path.append(state.copy())
return path
;; In .ruler/trifurcation-enforcer.cljs
(defn blume-capel-energy
"Compute Blume-Capel Hamiltonian for agent configuration."
[{:keys [J delta]} spins]
(let [coupling (* (- J) (reduce + (map * spins (rest spins))))
vacancy (* delta (reduce + (map #(* % %) spins)))]
(+ coupling vacancy)))
(defn modification-barrier
"Energy barrier for autopoietic self-modification."
[params current proposed]
(let [E-current (blume-capel-energy params current)
E-proposed (blume-capel-energy params proposed)
disruption (count (filter (fn [[c p]] (not= c p))
(map vector current proposed)))
E-activate (* (:J params) disruption 0.5)]
(+ (max 0 (- E-proposed E-current)) E-activate)))
(defn safe-to-modify?
"Check if modification is thermodynamically favorable."
[params current proposed temperature]
(let [barrier (modification-barrier params current proposed)
beta (/ 1.0 temperature)]
(or (<= barrier 0)
(< (rand) (Math/exp (* (- beta) barrier))))))
;; Usage in trifurcation enforcement:
(def blume-capel-params {:J 1.0 :delta 0.5})
(defn enforce-with-thermodynamics!
"Enforcement with energy barrier awareness."
[request planned-ops current-config proposed-config]
(let [base-result (enforce! request planned-ops)]
(if (safe-to-modify? blume-capel-params
current-config
proposed-config
1.0) ; temperature
base-result
(assoc base-result
:warning "High energy barrier - consider gradual transition"
:barrier (modification-barrier blume-capel-params
current-config
proposed-config)))))
| Phase | β·J vs β·Δ | Autopoietic Behavior |
|---|---|---|
| Ordered | β·J > β·Δ | Agents lock into stable triads; modification requires collective action |
| Critical | β·J ≈ β·Δ | Maximum susceptibility; small perturbations cause large reconfigurations |
| Disordered | β·J < β·Δ | Agents operate independently; easy modification but poor coordination |
The optimal autopoietic regime operates near criticality: flexible enough for self-improvement, coordinated enough for coherent action.
Toad (batrachianai/toad): A unified interface for AI agents in your terminal via ACP protocol.
# Clone toad locally
gh repo clone batrachianai/toad ~/ies/toad
# Install via uv (requires Python 3.14+)
uv tool install -U batrachian-toad --python 3.14
# Or via curl
curl -fsSL batrachian.ai/install | sh
# Install skills for Toad + Verse deployment
npx ai-agent-skills install plurigrid/asi/acsets --agent amp
npx ai-agent-skills install plurigrid/asi/autopoiesis --agent amp
npx ai-agent-skills install plurigrid/asi/ruler --agent amp
# Apply ruler to propagate trifurcation rules
cd ~/ies/toad
ruler init
ruler apply
Toad spans 3 domains → MUST trifurcate:
# Verify trifurcation via nbb
nbb -e "(require '[ruler.trifurcation-enforcer :as te]) \
(te/enforce! {:domains [:python :acp :verse]} [])"
# => Must spawn 3 subagents before reading!
toad/
├── acp/ # Agent Client Protocol implementation
├── screens/ # TUI screens (Textual)
├── widgets/ # UI components
├── agents.py # Agent registry
├── protocol.py # ACP message handling
└── app.py # Main Textual application
For analyzing event-driven codebases like Toad (Textual/ACP):
;; Patterns detected by .ruler/analyzers/event-density.cljs
(def event-patterns
{:decorator-on #"@on\(([^)]+)\)" ;; Textual event handlers
:post-message #"\.post_message\(" ;; Message coupling
:async-def #"async def (\w+)" ;; Async functions
:work-decorator #"@work" ;; Background tasks
:on-handler #"def on_(\w+)\(" ;; Handler methods
:rpc-expose #"@jsonrpc\.expose\(" ;; ACP RPC endpoints
:message-class #"class (\w+)\(Message\)"}) ;; Custom messages
| Density | Threshold | Example File |
|---|---|---|
| EXTREME | 80+ events | conversation.py (central hub) |
| VERY HIGH | 50+ | agent.py (protocol adapter) |
| HIGH | 30+ | prompt.py (input layer) |
| MEDIUM | 15+ | terminal.py |
| LOW | <15 | settings.py |
┌─────────────────────────────────────────────────────┐
│ Layer Trit Assignment (sum ≡ 0 mod 3) │
├─────────────────────────────────────────────────────┤
│ ACP Layer (-1): Protocol, JSON-RPC, agent.py │
│ Widget Layer (0): Mediation, conversation.py │
│ Screen Layer (+1): User-facing, store.py, main.py │
└─────────────────────────────────────────────────────┘
# Analyze Toad's event density
nbb .ruler/analyzers/event-density.cljs src/toad/
# Output: hotspots, coupling ratio, recommendations
From trifurcated analysis (89 @on handlers, 83+ post_message calls):
User Input → Widget Layer (29 handlers) → Conversation Hub
↓
ACP Agent (12 RPC)
↓
Agent Process (Claude API)
ruler - Unified agent configuration propagationself-evolving-agent - Darwin Gödel Machine patternsacsets - Categorical data structuresskill-creator - Guide for creating new skillsbisimulation-game - Agent coordination via GF(3)@misc{maturana1980autopoiesis,
title={Autopoiesis and Cognition: The Realization of the Living},
author={Maturana, Humberto R and Varela, Francisco J},
year={1980},
publisher={Springer}
}
@article{zhang2025darwin,
title={Darwin Gödel Machine: Open-Ended Evolution of Self-Improving Agents},
author={Zhang, Jenny and others},
journal={arXiv:2505.22954},
year={2025}
}
@misc{ruler2024,
title={Ruler: Unified AI Agent Configuration},
author={Kampf, Eran},
url={https://github.com/intellectronica/ruler},
year={2024}
}
Rust package manager (36 subcommands).
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...
**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, ...
Conformal Geometric Algebra (CGA) for circles, spheres, and Möbius transformations
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.
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.
PayPal MCP server integration for invoices, payments, subscriptions, disputes, and transaction reporting via @paypal/mcp.
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.
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.
World C Skill
Syrup binary serialization for OCapN/CapTP wire format. Canonical encoding for capability messages.
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).
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience