install
source · Clone the upstream repo
git clone https://github.com/plurigrid/asi
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/plurigrid/asi "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/repeng-gay" ~/.claude/skills/plurigrid-asi-repeng-gay && rm -rf "$T"
manifest:
skills/repeng-gay/SKILL.mdsource content
repeng Gay Skill
Representation engineering with Gay.jl deterministic coloring for control vectors.
Source
Repository: https://github.com/vgel/repeng
Author: Theia Vogel
Port: 8849 (color #152961)
Trigger Conditions
- Training control vectors for LLMs
- Representation engineering, activation steering
- Behavioral control of language models
- Visualizing layer activations with colors
Quick Start
from repeng import GayControlVector, visualize_control, make_gay_dataset # Train with color tracking vector = GayControlVector.train( model, tokenizer, dataset, seed=137508 # Deterministic colors ) # Visualize layer activations visualize_control(vector) # Get resurrection port print(vector.resurrection_port()) # 8849
Server
# Start on resurrected port python -m repeng.server # Custom seed = different port python -m repeng.server --seed 42 # Override port python -m repeng.server --port 8080
Endpoints
| Endpoint | Method | Description |
|---|---|---|
| GET | Service info |
| GET | Health check |
| GET | List loaded vectors |
| GET | Vector details with colors |
| GET | Generate n colors |
| POST | Load vector from GGUF |
| GET | SSE stream of port events |
| GET | Last 100 events |
| GET | List tenants/parallel worlds |
GayControlVector API
vector = GayControlVector.train(model, tokenizer, dataset, seed=137508) # Layer colors vector.layer_colors # {-5: '#223857', -6: '#90EDC7', ...} # Get color for specific layer vector.layer_color(-5) # '#223857' # Resurrection port vector.resurrection_port() # 8849 # GF(3) trit for triadic coordination vector.trit() # -1, 0, or 1 # Visualize print(vector.visualize()) # Convert back to base ControlVector base = vector.to_control_vector()
Dataset with Colors
from repeng import make_gay_dataset dataset, colors = make_gay_dataset( template="Act as if you're extremely {persona}.", positive_personas=["happy", "creative", "confident"], negative_personas=["sad", "dull", "insecure"], suffixes=["I think", "In my opinion"], seed=137508 ) # Each dataset entry has a deterministic color for entry, color in zip(dataset, colors): print(f"{color}: {entry.positive[:50]}...")
Port Resurrection
# Check repeng port python3 /Users/bob/ies/port_resurrect.py -s repeng # Service: repeng # Port: 8849 # Color: #152961 # All service ports python3 /Users/bob/ies/port_resurrect.py
Integration with Gay.jl
using Gay # Get repeng color (service index 16) color = Gay.color_at(16, 137508) # → #152961 port = 8000 + (parse(Int, color[2:end], base=16) % 2000) # → 8849
Control Vector Arithmetic with Colors
# Vectors preserve color tracking happy = GayControlVector.train(model, tokenizer, happy_dataset, seed=137508) creative = GayControlVector.train(model, tokenizer, creative_dataset, seed=137509) # Arithmetic (converts to base, loses color tracking) combined = happy.to_control_vector() + creative.to_control_vector()
GF(3) Conservation
| Component | Trit |
|---|---|
| GayControlVector | seed % 3 - 1 |
| repeng server | 0 (ERGODIC) |
| port_resurrect | 0 (ERGODIC) |
CLI (No Torch Required)
# Generate palette python -m repeng.cli palette 10 # Check service status python -m repeng.cli services --check # Get specific port python -m repeng.cli port repeng # → 8849 # Get color at index python -m repeng.cli color 5 # Export shell vars eval $(python -m repeng.cli export) # JSON output python -m repeng.cli services --json # Subscribe to events (SSE) python -m repeng.cli subscribe # List tenants/worlds python -m repeng.cli tenants # Emit test event python -m repeng.cli emit port_assigned -m "test"
MCP Bridge
from repeng.mcp_bridge import RepengMCPBridge, check_services # Sync check for svc in check_services(): print(f"{svc['name']}: {svc['port']} {'✓' if svc['connected'] else '✗'}") # Async bridge async with RepengMCPBridge(seed=137508) as bridge: palette = await bridge.get_palette(10) functions = await bridge.analyze_binary_functions("/path/to/binary")
Subscriptions
from repeng.subscriptions import PortSubscriptionHub, EventType hub = PortSubscriptionHub(seed=137508) # Subscribe to port assignments async for event in hub.subscribe([EventType.PORT_ASSIGNED]): print(f"{event.color} {event.data['service']} → {event.data['port']}") # Spawn 27 parallel worlds (GF(3) 3×3×3 matrix) events = await hub.spawn_3x3x3_matrix() # Add tenant await hub.add_tenant(271828, "eve") # Check XOR fixed points fixed_points = await hub.check_xor_fixed_points(137508)
Event Types
| Event | Description |
|---|---|
| Service port assignment |
| New tenant registered |
| Tenant removed |
| Service came online |
| Service went offline |
| Parallel world created |
| XOR fixed point discovered |
NATS Transport (Optional)
from repeng.subscriptions import NATSTransport transport = NATSTransport(hub) await transport.connect() # Uses resurrected NATS port await transport.publish(event)
Files
- Gay integration/Users/bob/ies/repeng-src/repeng/gay.py
- Standalone CLI/Users/bob/ies/repeng-src/repeng/cli.py
- HTTP server/Users/bob/ies/repeng-src/repeng/server.py
- Pub/sub system/Users/bob/ies/repeng-src/repeng/subscriptions.py
- MCP integration/Users/bob/ies/repeng-src/repeng/mcp_bridge.py
- Port resurrection/Users/bob/ies/port_resurrect.py
Related Skills
- Deterministic port assignmentport-resurrection
- Color generation MCPgay-mcp
- Run LLMs locallymlx-apple-silicon
- Category theory for MLcats-for-ai
Autopoietic Marginalia
The interaction IS the skill improving itself.
Every use of this skill is an opportunity for worlding:
- MEMORY (-1): Record what was learned
- REMEMBERING (0): Connect patterns to other skills
- WORLDING (+1): Evolve the skill based on use
Add Interaction Exemplars here as the skill is used.