abductive-repl
БесплатноБез исполняемых скриптовНе проверенHypothesis-Test Loops via REPL for Exploratory Abductive Inference
от plurigrid★ 73 звезды на GitHubОб этом скилле
abductive-repl
Hypothesis-Test Loops via REPL for Exploratory Abductive Inference
Version: 1.0.0
Trit: 0 (Ergodic - coordinates inference)
Bundle: repl
Overview
Abductive-REPL enables exploratory abductive reasoning through an interactive REPL. Given observed outcomes, it generates hypotheses, tests them, and refines understanding through iterative loops.
Core Concept
Observation → Generate Hypotheses → Test → Refine → Repeat
Abduction: Given effect E and rule "A implies E",
hypothesize A as possible cause.
Capabilities
1. abduce-from-observation
Generate hypotheses from observed behavior.
from abductive_repl import AbductiveEngine
engine = AbductiveEngine(seed=0xf061ebbc2ca74d78)
# Observed: A specific color was generated
observed_color = RGB(216, 125, 157)
hypotheses = engine.abduce(
observation=observed_color,
search_space="invader_ids",
search_range=range(1, 10000),
top_k=5
)
# Returns ranked hypotheses:
# [
# {hypothesis: "invader_id=42069", confidence: 0.98, distance: 0.02},
# {hypothesis: "invader_id=42070", confidence: 0.45, distance: 0.55},
# ...
# ]
2. repl-commands
Interactive REPL mode for exploration.
gay> !teleport 42069
Teleporting to invader 42069...
Source color: RGB(180, 90, 120)
Derangement: cyclic_1
World color: RGB(216, 125, 157)
Tropical t: 0.69
gay> !abduce 216 125 157
Generating hypotheses for RGB(216, 125, 157)...
[1] invader_id=42069 (confidence: 0.98)
[2] invader_id=42070 (confidence: 0.45)
[3] invader_id=41999 (confidence: 0.23)
gay> !jump 1
Jumping to hypothesis 1 (invader_id=42069)...
✓ Hypothesis confirmed!
gay> !neighbors 5
Finding 5 neighbors of invader 42069...
42068: RGB(214, 123, 155) distance=0.02
42070: RGB(218, 127, 159) distance=0.02
42067: RGB(212, 121, 153) distance=0.04
...
gay> !test 100
Running abductive roundtrip tests (n=100)...
✓ 100/100 passed (100% accuracy)
Average inference time: 2.3ms
3. forward-simulate
Simulate forward from hypothesis to predict observations.
simulation = engine.forward_simulate(
hypothesis="invader_id=42069",
seed=0xf061ebbc2ca74d78
)
# Returns:
# {
# id: 42069,
# source: RGB(180, 90, 120),
# derangement_idx: 1,
# tropical_t: 0.69,
# world: RGB(216, 125, 157),
# properties: {
# spi_determinism: True,
# derangement_bijectivity: True,
# tropical_idempotence: True,
# spin_consistency: True
# }
# }
4. roundtrip-test
Verify abductive inference accuracy.
def abductive_roundtrip_test(id: int, seed: int) -> bool:
"""
Forward simulate → Abduce back → Check if recovered
"""
# Forward
sim = forward_simulate(id, seed)
# Abduce
hypotheses = abduce(
observation=sim.world,
search_range=range(id - 100, id + 100),
top_k=1
)
# Verify
return hypotheses[0].hypothesis == f"invader_id={id}"
# Run batch
results = [abductive_roundtrip_test(i, SEED) for i in range(1, 1001)]
accuracy = sum(results) / len(results)
assert accuracy > 0.99
5. hypothesis-refinement
Iteratively refine hypotheses based on feedback.
# Initial hypothesis
hypothesis = engine.initial_hypothesis(observation)
for iteration in range(max_iterations):
# Test hypothesis
prediction = engine.predict(hypothesis)
error = distance(prediction, observation)
if error < threshold:
break
# Refine based on error
hypothesis = engine.refine(hypothesis, error, observation)
print(f"Converged after {iteration} iterations")
REPL Command Reference
| Command | Description |
|---|---|
!teleport <id> |
Jump to invader's world state |
!world |
Show current world state |
!back |
Return to previous world |
!abduce r g b |
Infer invader from observed RGB |
!jump <n> |
Jump to nth hypothesis |
!neighbors [r] |
Explore nearby invaders (radius r) |
!test [n] |
Run n abductive roundtrip tests |
!property <name> |
Test specific property |
!history |
Show teleportation history |
!seed [s] |
Get/set RNG seed |
Properties (Testable Predicates)
class SPIDeterminism:
"""Same input always produces same output."""
class DerangementBijectivity:
"""Derangement is reversible."""
class TropicalIdempotence:
"""tropical_blend(x, x, t) = x for all t."""
class SpinConsistency:
"""Spin direction preserved through transformations."""
def test_all_properties(id: int, seed: int) -> dict:
return {
"spi_determinism": test_property(SPIDeterminism(), id, seed),
"derangement_bijectivity": test_property(DerangementBijectivity(), id, seed),
"tropical_idempotence": test_property(TropicalIdempotence(), id, seed),
"spin_consistency": test_property(SpinConsistency(), id, seed)
}
GF(3) Triad Integration
| Trit | Skill | Role | |-----
Установить abductive-repl в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл abductive-repl?
Hypothesis-Test Loops via REPL for Exploratory Abductive Inference
Как установить скилл abductive-repl?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл abductive-repl запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic