abductive-repl

Hypothesis-Test Loops via REPL for Exploratory Abductive Inference with Gay.jl colors

181 stars

Best use case

abductive-repl is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Hypothesis-Test Loops via REPL for Exploratory Abductive Inference with Gay.jl colors

Teams using abductive-repl should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/abductive-repl/SKILL.md --create-dirs "https://raw.githubusercontent.com/majiayu000/claude-skill-registry/main/skills/data/abductive-repl/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/abductive-repl/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How abductive-repl Compares

Feature / Agentabductive-replStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Hypothesis-Test Loops via REPL for Exploratory Abductive Inference with Gay.jl colors

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# abductive-repl

> Hypothesis-Test Loops via REPL for Exploratory Abductive Inference

**Version**: 1.1.0 (music-topos enhanced)
**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.
```

## Enhanced Integration: Interpreters

### Julia (Gay.jl) - Primary

```julia
# Start abductive REPL with Gay.jl
julia --project=Gay.jl -e 'using Gay; Gay.repl()'

# In REPL:
gay> !abduce 216 125 157
# Searches invader space for color match
```

### Hy (HyJAX) - Secondary

```hy
;; thread_relational_hyjax.hy integration
(import lib.thread_relational_hyjax :as tra)

(defn abduce-from-color [r g b]
  "Abduce invader ID from observed RGB"
  (let [target [r g b]
        analyzer (tra.ThreadRelationalAnalyzer)]
    ;; Search hypothesis space
    (lfor id (range 1 10000)
          :if (color-match? id target 0.05)
          {:hypothesis id :confidence (- 1.0 (color-distance id target))})))
```

### Babashka (bb) - Scripting

```clojure
;; abductive_repl.bb
(require '[babashka.process :refer [shell]])

(defn abduce [observed-color]
  (let [result (shell {:out :string} 
                      "julia" "--project=Gay.jl" "-e"
                      (format "using Gay; Gay.abduce(RGB(%s))" 
                              (clojure.string/join "," observed-color)))]
    (parse-hypotheses (:out result))))
```

## REPL Commands Enhanced

| Command | Description | Interpreter |
|---------|-------------|-------------|
| `!teleport <id>` | Jump to invader's world state | Julia |
| `!abduce r g b` | Infer invader from observed RGB | Julia/Hy |
| `!test [n]` | Run n abductive roundtrip tests | Julia |
| `!hy-analyze` | Run HyJAX relational analysis | Hy |
| `!bb-export` | Export hypotheses via Babashka | Babashka |

## Properties (Testable Predicates)

```ruby
# world_broadcast.rb integration
module AbductiveProperties
  def self.spi_determinism(id, seed)
    # Same input always produces same output
    c1 = WorldBroadcast::CondensedAnima.liquid_norm([id], r: 0.5)
    c2 = WorldBroadcast::CondensedAnima.liquid_norm([id], r: 0.5)
    c1 == c2
  end
  
  def self.abductive_roundtrip(id, seed)
    # Forward → Abduce → Verify
    forward = CondensedAnima.analytic_stack([id])
    cellular = CondensedAnima.to_cellular_sheaf(forward)
    cellular[:vertices].include?(id)
  end
end
```

## GF(3) Triad Integration

| Trit | Skill | Role |
|------|-------|------|
| -1 | slime-lisp | Validates REPL expressions |
| 0 | **abductive-repl** | Coordinates inference |
| +1 | cider-clojure | Generates evaluations |

**Conservation**: (-1) + (0) + (+1) = 0 ✓

## Justfile Recipes

```makefile
# Start abductive REPL
abduce-repl:
    julia --project=Gay.jl -e 'using Gay; Gay.repl()'

# Run via Hy
abduce-hy:
    uv run hy -c '(import lib.thread_relational_hyjax) (print "HyJAX ready")'

# Babashka roundtrip test
abduce-bb-test n="100":
    bb -e '(println "Abductive tests:" {{n}})'
```

## Related Skills

- `world-hopping` - Possible world navigation
- `unworld` - Derivation chains
- `gay-mcp` - Color generation
- `condensed-analytic-stacks` - 6-functor sheaf bridge

Related Skills

abductive-analyst

181
from majiayu000/claude-skill-registry

Abductive analysis for qualitative interview data following Timmermans & Tavory. Guides you through theory-first analysis that recognizes anomalies and generates novel theoretical insights through systematic puzzle exploration.

replicates-incorporation

181
from majiayu000/claude-skill-registry

This skill manages experimental reproducibility, pooling, and consensus strategies. This skill operates in two distinct modes based on the input state. (1) Pre-Peak Calling (BAM Mode): It merges all BAMs, generate the merge BAM file to prepare for track generation and (if provided with >3 biological replicates) splits them into 2 balanced "pseudo-replicates" to prepare for peak calling. (2) Post-Peak Calling (Peak Mode): If provided with peak files (only support two replicates, derived from either 2 true replicates or 2 pseudo-replicates), it performs IDR (Irreproducible Discovery Rate) analysis, filters non-reproducible peaks, and generates a final "conservative" or "optimal" consensus peak set. Trigger this skill when you need to handle more than two replicates (creating pseudo-reps) OR when you need to merge peak lists.

ontopo

159
from majiayu000/claude-skill-registry

An AI agent skill to search for Israeli restaurants, check table availability, view menus, and retrieve booking links via the Ontopo platform, acting as an unofficial interface to its data.

General Utilities

grail-miner

159
from majiayu000/claude-skill-registry

This skill assists in setting up, managing, and optimizing Grail miners on Bittensor Subnet 81, handling tasks like environment configuration, R2 storage, model checkpoint management, and performance tuning.

DevOps & Infrastructure

astro

159
from majiayu000/claude-skill-registry

This skill provides essential Astro framework patterns, focusing on server-side rendering (SSR), static site generation (SSG), middleware, and TypeScript best practices. It helps AI agents implement secure authentication, manage API routes, and debug rendering behaviors within Astro projects.

Coding & Development

modal-deployment

159
from majiayu000/claude-skill-registry

Run Python code in the cloud with serverless containers, GPUs, and autoscaling using Modal. This skill enables agents to generate code for deploying ML models, running batch jobs, serving APIs, and scaling compute-intensive workloads.

DevOps & Infrastructure

chrome-debug

159
from majiayu000/claude-skill-registry

This skill empowers AI agents to debug web applications and inspect browser behavior using the Chrome DevTools Protocol (CDP), offering both collaborative (headful) and automated (headless) modes.

Coding & DevelopmentClaude

lets-go-rss

159
from majiayu000/claude-skill-registry

A lightweight, full-platform RSS subscription manager that aggregates content from YouTube, Vimeo, Behance, Twitter/X, and Chinese platforms like Bilibili, Weibo, and Douyin, featuring deduplication and AI smart classification.

Content & Documentation

thor-skills

159
from majiayu000/claude-skill-registry

An entry point and router for AI agents to manage various THOR-related cybersecurity tasks, including running scans, analyzing logs, troubleshooting, and maintenance.

SecurityClaude

whisper-transcribe

159
from majiayu000/claude-skill-registry

Transcribes audio and video files to text using OpenAI's Whisper CLI, enhanced with contextual grounding from local markdown files for improved accuracy.

Media Processing

ux

159
from majiayu000/claude-skill-registry

This AI agent skill provides comprehensive guidance for creating professional and insightful User Experience (UX) designs, covering user research, information architecture, interaction design, visual guidance, and usability evaluation. It aims to produce actionable, user-centered solutions that avoid generic AI aesthetics.

UX Design & StrategyClaude

vly-money

159
from majiayu000/claude-skill-registry

Generate crypto payment links for supported tokens and networks, manage access to X402 payment-protected content, and provide direct access to the vly.money wallet interface.

Fintech & CryptoClaude