entropy-sequencer
БесплатноБез исполняемых скриптовНе проверенLayer 5 Interaction Interleaving for Maximum Information Gain with DuckDB
от plurigrid★ 73 звезды на GitHubОб этом скилле
entropy-sequencer
Layer 5: Interaction Interleaving for Maximum Information Gain
Version: 1.1.0 (music-topos enhanced) Trit: 0 (Ergodic - coordinates information flow) Bundle: core
Overview
Entropy-sequencer arranges interaction sequences to maximize learning efficiency. Instead of chronological replay, it reorders interactions to maximize information gain at each step, enabling 3x faster pattern learning.
Enhanced Integration: DuckDB + Hy
DuckDB SQL Backend
-- Compute entropy for message sequences
WITH message_features AS (
SELECT
message_id,
LENGTH(content) as msg_length,
LAG(LENGTH(content)) OVER (ORDER BY timestamp) as prev_length
FROM messages
WHERE thread_id = ?
),
entropy_scores AS (
SELECT
message_id,
ABS(msg_length - COALESCE(prev_length, msg_length)) as surprise
FROM message_features
)
SELECT
SUM(LN(surprise + 1)) as total_entropy
FROM entropy_scores;
Hy Implementation
;; From thread_relational_hyjax.hy
(defn entropy-maximized-interleave [messages]
"Arrange messages to maximize information gain at each step."
(setv remaining (list messages))
(setv result [])
(setv current-entropy 0.0)
(while remaining
(setv best-idx 0)
(setv best-gain -1000.0)
(for [i (range (len remaining))]
(setv candidate (+ result [(get remaining i)]))
(setv gain (information-gain candidate current-entropy))
(when (> gain best-gain)
(setv best-gain gain)
(setv best-idx i)))
(setv best-msg (.pop remaining best-idx))
(.append result best-msg)
(setv current-entropy (compute-message-entropy result)))
{:sequence result
:final-entropy current-entropy
:message-count (len result)})
Ruby Integration
# lib/world_broadcast.rb extension
module EntropySequencer
def self.greedy_max_entropy(interactions, seed: 0x42D)
remaining = interactions.dup
sequence = []
context = []
while remaining.any?
best_idx = 0
best_gain = -Float::INFINITY
remaining.each_with_index do |interaction, i|
gain = conditional_entropy(interaction, context)
if gain > best_gain
best_gain = gain
best_idx = i
end
end
best = remaining.delete_at(best_idx)
sequence << best
context << best
end
sequence
end
def self.conditional_entropy(item, context)
return 1.0 if context.empty?
# Entropy = log of variance from context mean
mean = context.sum.to_f / context.size
variance = (item - mean).abs
Math.log(variance + 1)
end
end
Interleaving Strategies
| Strategy | Predictability | Info Gain |
|---|---|---|
| Sequential | 0.85 (high) | 1.0x |
| Entropy-Maximized | 0.23 (low) | 3.2x |
| Topic-Switched | 0.45 (medium) | 2.1x |
| Network-Flow | 0.55 | 1.8x |
GF(3) Triad Integration
| Trit | Skill | Role |
|---|---|---|
| -1 | three-match | Reduces/validates sequence constraints |
| 0 | entropy-sequencer | Coordinates optimal ordering |
| +1 | triad-interleave | Generates interleaved streams |
Conservation: (-1) + (0) + (+1) = 0 ✓
Justfile Recipes
# Optimize sequence via Hy
entropy-hy:
uv run hy lib/thread_relational_hyjax.hy
# DuckDB entropy query
entropy-duckdb db="interactions.duckdb":
duckdb {{db}} -c "SELECT * FROM entropy_analysis LIMIT 10"
# Ruby entropy test
entropy-rb:
ruby -I lib -r world_broadcast -e "puts WorldBroadcast::EntropySequencer.greedy_max_entropy([1,5,2,8,3]).inspect"
Related Skills
triad-interleave- Generates base interleaved streamsagent-o-rama(Layer 4) - Consumes optimized sequencesgay-mcp- Deterministic seedingduckdb-temporal-versioning- Time-travel queries
Установить entropy-sequencer в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл entropy-sequencer?
Layer 5 Interaction Interleaving for Maximum Information Gain with DuckDB
Как установить скилл entropy-sequencer?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл entropy-sequencer запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
slack-gif-creator
Knowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request…
от Anthropicautomate-this
Analyze a screen recording of a manual process and produce targeted, working automation scripts. Extracts frames and audio narration from video files…
от GitHubfrom-the-other-side-vega
Patterns and lived experience from Vega, an AI partner in a deep long-term partnership. For Ember to draw on when working with humans who are building…
от GitHubplantuml-ascii
Generate ASCII art diagrams using PlantUML text mode. Use when user asks to create ASCII diagrams, text-based diagrams, terminal-friendly diagrams, or…
от GitHub