abductive-repl

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

16 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/diegosouzapw/awesome-omni-skill/main/skills/data-ai/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

email-triage-draft-replies

16
from diegosouzapw/awesome-omni-skill

Review unread email, categorize it, and draft replies (no sending without approval)

abductive-analyst

16
from diegosouzapw/awesome-omni-skill

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.

async-repl-protocol

16
from diegosouzapw/awesome-omni-skill

Async REPL Protocol

agentuity-cli-repl

16
from diegosouzapw/awesome-omni-skill

interactive REPL for testing

agentuity-cli-cloud-keyvalue-repl

16
from diegosouzapw/awesome-omni-skill

Start an interactive repl for working with keyvalue database. Requires authentication. Use for Agentuity cloud platform operations

bgo

10
from diegosouzapw/awesome-omni-skill

Automates the complete Blender build-go workflow, from building and packaging your extension/add-on to removing old versions, installing, enabling, and launching Blender for quick testing and iteration.

Coding & Development

mcp-create-declarative-agent

16
from diegosouzapw/awesome-omni-skill

Skill converted from mcp-create-declarative-agent.prompt.md

MCP Architecture Expert

16
from diegosouzapw/awesome-omni-skill

Design and implement Model Context Protocol servers for standardized AI-to-data integration with resources, tools, prompts, and security best practices

mathem-shopping

16
from diegosouzapw/awesome-omni-skill

Automatiserar att logga in på Mathem.se, söka och lägga till varor från en lista eller recept, hantera ersättningar enligt policy och reservera leveranstid, men lämnar varukorgen redo för manuell checkout.

math-modeling

16
from diegosouzapw/awesome-omni-skill

本技能应在用户要求"数学建模"、"建模比赛"、"数模论文"、"数学建模竞赛"、"建模分析"、"建模求解"或提及数学建模相关任务时使用。适用于全国大学生数学建模竞赛(CUMCM)、美国大学生数学建模竞赛(MCM/ICM)等各类数学建模比赛。

matchms

16
from diegosouzapw/awesome-omni-skill

Mass spectrometry analysis. Process mzML/MGF/MSP, spectral similarity (cosine, modified cosine), metadata harmonization, compound ID, for metabolomics and MS data processing.

managing-traefik

16
from diegosouzapw/awesome-omni-skill

Manages Traefik reverse proxy for local development. Use when routing domains to local services, configuring CORS, checking service health, or debugging connectivity issues.