Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Um comando direto ignora o prompt de revisão. Verifique a origem antes de executá-lo.
{"task":"skill-dispersal","objective":"Propagate skill updates to all agents","constraints":{"gf3_conservation":true,"bisimulation_equivalence":true,"max_divergence":0.1},"steps":[{"action":"fork","trit":-1},{"action":"propagate","trit":0},{"action":"verify","trit": +1}]}
Firecrawl Integration
{"task":"skill-discovery","objective":"Discover new skills from web resources","tools":["firecrawl","exa"],"sources":["https://github.com/topics/ai-agent-skills","https://modelcontextprotocol.io/","https://agentclientprotocol.com/"],"output":{"format":"skill-yaml","destination":".ruler/skills/"}}
Resilience Patterns
Redundant Storage
~/.codex/skills/ ← Primary (Codex)
~/.claude/skills/ ← Mirror 1 (Claude)
~/.cursor/skills/ ← Mirror 2 (Cursor)
.ruler/skills/ ← Source of truth
Conflict Resolution
Dimension 0: Value conflict → Use source of truth
Dimension 1: Diff conflict → Merge via LCA
Dimension 2: Meta conflict → Arbiter decides
Xenomodern Stance
The bisimulation game embodies xenomodernity by:
Ironic distance: We know perfect equivalence is unattainable, yet we play the game
Sincere engagement: The game produces real, useful synchronization
Playful synergy: Attacker/Defender/Arbiter dance together
Conservation laws: GF(3) as the invariant that holds everything together
Integration with LocalSend-MCP for Skill Dispersal
Use LocalSend peer discovery for resilient skill propagation:
# localsend_bisim.pyimport asyncio
from localsend_mcp import LocalSendClient
classBisimulationDispersalProtocol:
"""Disperse skills via LocalSend with bisimulation verification."""def__init__(self, skill_path, seed=1069):
self.skill_path = skill_path
self.client = LocalSendClient()
self.rng = SplitMixTernary(seed)
self.game_log = []
asyncdefdiscover_peers(self):
"""Find all agents on local network."""
peers = awaitself.client.list_peers(source="all")
return [p for p in peers if p.get("capabilities", []).count("skill-sync")]
asyncdefdisperse_with_bisim(self, skill_file):
"""Disperse skill to all peers with bisimulation verification."""
peers = awaitself.discover_peers()
for i, peer inenumerate(peers):
trit = (i % 3) - 1# Assign trits: -1, 0, +1, -1, ...# Negotiate transfer session
session = awaitself.client.negotiate(
peer_id=peer["id"],
preferred_transport="tailscale"# Or localsend, nats
)
# Send skill (Attacker move)self.game_log.append({
"round": len(self.game_log),
"role": "attacker",
"action": f"send:{skill_file}",
"peer": peer["id"],
"trit": trit
})
result = awaitself.client.send(
session_id=session["sessionId"],
file_path=skill_file
)
# Verify receipt (Defender move)
defender_trit = awaitself.verify_peer_receipt(peer, skill_file)
self.game_log.append({
"round": len(self.game_log),
"role": "defender",
"action": f"ack:{result['status']}",
"peer": peer["id"],
"trit": defender_trit
})
# Arbiter verifies GF(3) conservationreturnself.verify_gf3_conservation()
defverify_gf3_conservation(self):
"""Check that sum of trits ≡ 0 (mod 3)."""
total = sum(entry["trit"] for entry inself.game_log)
conserved = (total % 3) == 0self.game_log.append({
"round": len(self.game_log),
"role": "arbiter",
"conserved": conserved,
"total_trit": total,
"trit": 0
})
return conserved
Temporal vs Derivational Learning Comparison (NEW)
NEW: Compare Agent-o-rama vs Unworld Patterns
game = BisimulationGame(
player1_type="temporal_learning", # agent-o-rama
player2_type="derivational_learning", # unworld
domain="pattern_extraction"
)
# Adversary tries to distinguish them
distinguishable = game.play()
ifnot distinguishable:
print("✓ Patterns are behaviorally equivalent")
print("✓ Can safely switch from temporal to derivational")
# Migration report
migration_report = {
"original_cost": benchmark(agent_o_rama),
"migrated_cost": benchmark(unworld),
"speedup": original_cost / migrated_cost,
"equivalence_verified": game.play()
}
Concrete Attacker/Defender Example
╔══════════════════════════════════════════════════════════════════════╗
║ BISIMULATION GAME TRANSCRIPT ║
╠══════════════════════════════════════════════════════════════════════╣
║ Systems: S₁ = Codex skill state, S₂ = Claude skill state ║
║ Goal: Prove skills are bisimilar (observationally equivalent) ║
╠══════════════════════════════════════════════════════════════════════╣
ROUND 1:
┌─ ATTACKER (Blue, trit=-1) ─────────────────────────────────────────┐
│ "I choose S₁ and execute: load_skill('gay-mcp')" │
│ Transition: s₁ →^load s₁' where s₁'.has_skill('gay-mcp') = true │
└────────────────────────────────────────────────────────────────────┘
┌─ DEFENDER (Red, trit=+1) ──────────────────────────────────────────┐
│ "I match in S₂: load_skill('gay-mcp')" │
│ Transition: s₂ →^load s₂' where s₂'.has_skill('gay-mcp') = true │
│ Response: MATCHED ✓ │
└────────────────────────────────────────────────────────────────────┘
┌─ ARBITER (Green, trit=0) ──────────────────────────────────────────┐
│ GF(3) check: (-1) + (+1) + (0) = 0 ≡ 0 (mod 3) ✓ │
│ ROUND 1: VALID │
└────────────────────────────────────────────────────────────────────┘
ROUND 2:
┌─ ATTACKER ─────────────────────────────────────────────────────────┐
│ "I choose S₂ and execute: generate_color(seed=0x42)" │
│ Transition: s₂' →^gen s₂'' where s₂''.color = #FF6B6B │
└────────────────────────────────────────────────────────────────────┘
┌─ DEFENDER ─────────────────────────────────────────────────────────┐
│ "I match in S₁: generate_color(seed=0x42)" │
│ Transition: s₁' →^gen s₁'' where s₁''.color = #FF6B6B │
│ Response: MATCHED ✓ (deterministic - same seed = same color) │
└────────────────────────────────────────────────────────────────────┘
┌─ ARBITER ──────────────────────────────────────────────────────────┐
│ GF(3) check: (-1) + (+1) + (0) = 0 ≡ 0 (mod 3) ✓ │
│ ROUND 2: VALID │
└────────────────────────────────────────────────────────────────────┘
ROUND 3:
┌─ ATTACKER ─────────────────────────────────────────────────────────┐
│ "I choose S₁ and execute: self_modify(patch='add_feature')" │
│ Transition: s₁'' →^mod s₁''' (skill version incremented) │
└────────────────────────────────────────────────────────────────────┘
┌─ DEFENDER ─────────────────────────────────────────────────────────┐
│ "I match in S₂ via observational bridge type:" │
│ Bridge: (s₁''.version, s₂''.version) →₁ (s₁'''.version, s₂'''.v) │
│ Transition: s₂'' →^mod s₂''' using same patch │
│ Response: MATCHED ✓ (bridge type ensures coherence) │
└────────────────────────────────────────────────────────────────────┘
┌─ ARBITER ──────────────────────────────────────────────────────────┐
│ GF(3) check: (-1) + (+1) + (0) = 0 ≡ 0 (mod 3) ✓ │
│ ROUND 3: VALID │
│ │
│ After 3 rounds: Defender has matched all Attacker moves │
│ Verdict: S₁ ∼ S₂ (bisimilar to depth 3) │
└────────────────────────────────────────────────────────────────────┘
╠══════════════════════════════════════════════════════════════════════╣
║ RESULT: BISIMULATION ESTABLISHED ║
║ - All transitions matched ║
║ - GF(3) conserved across all rounds ║
║ - Skills are observationally equivalent ║
╚══════════════════════════════════════════════════════════════════════╝
Verification Output Format
{"verification":{"timestamp":"2024-12-22T10:30:00Z","systems":["codex","claude"],"rounds_played":3,"result":"BISIMILAR","gf3_conservation":{"total_trit_sum":0,"mod_3":0,"conserved":true},"game_log":[{"round":1,"attacker":"load_skill","defender":"matched","arbiter":"valid"},{"round":2,"attacker":"generate_color","defender":"matched","arbiter":"valid"},{"round":3,"attacker":"self_modify","defender":"bridge_matched","arbiter":"valid"}],"bridge_types_used":[{"dim":1,"source":"v1.2.0","target":"v1.2.1"}],"confidence":0.99,"max_distinguishing_depth":"∞ (no distinguisher found)"}}
Commands
just bisim-init # Initialize bisimulation game
just bisim-round # Play one round
just bisim-disperse # Disperse skills to all agents
just bisim-verify # Verify GF(3) conservation
just bisim-reconcile # Reconcile divergent states
just bisim-localsend # Disperse via LocalSend peers
just bisim-transcript # Show attacker/defender transcript
just bisim-json # Output verification as JSON