Skip to content
ducklake-walk logo

DuckLake Random Walk

ducklake-walk

Ergodic random walks over DuckLake lakehouses with GF(3) triadic concurrent walkers. Society-of-mind coordination for schema exploration.

SKILL.md

Full skill instructions

DuckLake Random Walk

Ergodic random walk exploration of DuckDB/​DuckLake schemas with concurrent Society-of-Mind walkers. Implements PageRank-style teleportation for irreducibility and GF(3)-balanced walker coordination.

Triadic Structure

StreamTritRoleImplementation
MINUS (-1)ValidatorConstraint verification, DuckLake semanticsduckdb-validator.sql
ERGODIC (0)CoordinatorRandom walk orchestrationducklake-walk.clj
PLUS (+1)GeneratorConcurrent walker executionmensi_walker.py

Conservation: Σ trits = -1 + 0 + 1 = 0 (mod 3) ✓

Lojban Gismu Mapping

GismuMeaningComponent
pensithinkPensiWalker - individual cognition
jimpeunderstandJimpe - shared understanding
djunoknowDjuno - knowledge units
mensisiblingWalker siblings in society
gunmagroupGunmaSociety - collective

Algorithm: Ergodic Random Walk

The walk follows a Markov chain with teleportation (PageRank-style):

P(teleport) = 0.15  # Random restart for ergodicity
P(follow_edge) = 0.85 × (has_neighbors ? 1 : 0)
P(forced_teleport) = 1 - P(teleport) - P(follow_edge)

Guarantees:

  • Irreducibility: All tables reachable via teleportation
  • Aperiodicity: Random restarts break cycles
  • Ergodicity: Unique stationary distribution exists

Usage

Babashka Ergodic Walker (ERGODIC stream)

# Demo mode with in-memory schema
bb ducklake-walk.clj

# With existing DuckDB file
bb ducklake-walk.clj /​path/​to/​lakehouse.duckdb

Python Society-of-Mind (PLUS stream)

# Run concurrent walkers
python mensi_walker.py

# Interactive REPL
python jimpe_repl.py

DuckLake Validation (MINUS stream)

LOAD ducklake;
ATTACH 'ducklake:metadata.duckdb' AS lake (DATA_PATH './​data');

-- Create walk history table
CREATE TABLE lake.main.walk_history (
    step_id INTEGER,
    from_state VARCHAR,
    to_state VARCHAR,
    trit INTEGER,
    walk_time TIMESTAMPTZ
);

-- Verify GF(3) conservation
SELECT SUM(trit) % 3 AS conservation FROM lake.main.walk_history;
-- Should return 0

Output Metrics

MetricTargetDescription
Coverage>80%Unique tables visited / total tables
Entropy~ln(N)Shannon entropy of visit distribution
Edge ratio~38%FK-following vs teleportation
GF(3) sum0 mod 3Conservation across all trits

Integration Points

  • duckdb-timetravel: Snapshot versioning for walk history
  • random-walk-fusion: Seed chaining for deterministic walks
  • gay-mcp: Color assignment for walker visualization
  • acsets: Algebraic database schema navigation

Files

skills/​ducklake-walk/
├── SKILL.md                 # This file
├── ducklake-walk.clj        # Babashka ergodic walker
├── mensi_walker.py          # Python concurrent walkers
├── jimpe_repl.py            # Interactive REPL
└── demo_interleaving.py     # Thread visualization

Example Output

=== DuckLake Random Walk ===
GF(3) Color: ERGODIC (0) - Neutral Coordinator
Tables found: 8
Random restart probability: 0.15
Starting at: ducklake.products

Step   0: ducklake.products        (rows: 4) -> ducklake.categories [edge]
Step   1: ducklake.categories      (rows: 4) -> ducklake.products [edge]
Step   2: ducklake.products        (rows: 4) -> ducklake.users [teleport]
...

=== Ergodicity Analysis ===
Coverage: 100.0%
Edge transitions: 38.0%
Teleportations: 62.0%
Entropy: 1.994 / 2.079 (max)
Ergodic: YES

GF(3) Walker Roles

class GF3Trit(IntEnum):
    MINUS = -1     # Validator (cold hue 270°)
    ERGODIC = 0    # Coordinator (neutral hue 180°)
    PLUS = 1       # Generator (warm hue 30°)

# Role-specific behavior weights
PLUS:    explore=0.7, validate=0.1, synthesize=0.2
MINUS:   explore=0.2, validate=0.6, synthesize=0.2
ERGODIC: explore=0.3, validate=0.2, synthesize=0.5

Related Skills

  • duckdb-timetravel (trit: 0) - Temporal versioning
  • duckdb-ies (trit: +1) - Interactome analytics
  • random-walk-fusion (trit: +1) - Skill graph navigation
  • acsets (trit: 0) - Algebraic databases

Scientific Skill Interleaving

This skill connects to the K-Dense-AI/​claude-scientific-skills ecosystem:

Graph Theory

  • networkx [○] via bicomodule
    • Universal graph hub

Bibliography References

  • graph-theory: 38 citations in bib.duckdb

Cat# Integration

This skill maps to Cat# = Comod(P) as a bicomodule in the equipment structure:

Trit: 0 (ERGODIC)
Home: Prof
Poly Op: ⊗
Kan Role: Adj
Color: #26D826

GF(3) Naturality

The skill participates in triads satisfying:

(-1) + (0) + (+1) ≡ 0 (mod 3)

This ensures compositional coherence in the Cat# equipment structure.

Forward Reference

  • unified-reafference (canonical cross-agent DuckDB schema)

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View