active-interleave
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseActive Interleave Skill
Active Interleave 技能
Interleaves context from recently active Claude/Amp threads into current activity via random walk.
通过随机游走将最近活跃的Claude/Amp线程中的上下文插入到当前活动中。
bmorphism Contributions
bmorphism 贡献
"all is bidirectional" — @bmorphism, Play/Coplay gist
Active Inference Pattern: The interleave implements Active Inference in String Diagrams epistemic foraging — actively sampling from recent contexts to minimize uncertainty about the current task. Each random walk step is an epistemic action that gathers information.
Play/Coplay Duality: The interleave embodies bmorphism's bidirectional principle:
- Play (action): Query recent threads, walk the awareness graph
- Coplay (perception): Integrate fragments, update current context
GF(3) Balanced Exploration: The triadic structure (MINUS/ERGODIC/PLUS) ensures balanced exploration — validation filters (MINUS), random walk explores (ERGODIC), and colored emission generates (PLUS). Conservation Σ = 0 maintains coherence.
“万物皆双向” — @bmorphism,Play/Coplay gist
主动推理模式:该插入功能实现了《Active Inference in String Diagrams》(https://arxiv.org/abs/2308.00861)中的认知觅食——主动从最近的上下文中采样,以减少当前任务的不确定性。每一步随机游走都是收集信息的认知行为。
Play/Coplay 二元性:该插入功能体现了bmorphism的双向原则:
- Play(行动):查询最近的线程,遍历感知图谱
- Coplay(感知):整合片段,更新当前上下文
GF(3) 平衡探索:三元结构(MINUS/ERGODIC/PLUS)确保平衡探索——验证过滤器(MINUS)、随机游走探索(ERGODIC)、着色输出生成(PLUS)。守恒律Σ ≡ 0(mod 3)保证一致性。
Activation
激活时机
Load when context from recent work would help current task.
当近期工作的上下文对当前任务有帮助时加载。
Usage
使用方法
bash
undefinedbash
undefinedInterleave from last 24 hours
从过去24小时的内容中插入上下文
bb ~/.claude/skills/active-interleave/active.bb
bb ~/.claude/skills/active-interleave/active.bb
Interleave from last N hours
从过去N小时的内容中插入上下文
bb ~/.claude/skills/active-interleave/active.bb --hours 6
bb ~/.claude/skills/active-interleave/active.bb --hours 6
Query-focused interleave
聚焦查询的插入
bb ~/.claude/skills/active-interleave/active.bb --query "aptos blockchain"
bb ~/.claude/skills/active-interleave/active.bb --query "aptos blockchain"
JSON output
JSON格式输出
bb ~/.claude/skills/active-interleave/active.bb --json
undefinedbb ~/.claude/skills/active-interleave/active.bb --json
undefinedBehavior
行为逻辑
- MINUS (-1): Validate recency window, filter to active threads only
- ERGODIC (0): Random walk through recent sessions following awareness edges
- PLUS (+1): Emit interleaved fragments with GF(3) coloring
- MINUS (-1):验证时间窗口,仅筛选活跃线程
- ERGODIC (0):沿着感知边随机遍历最近的会话
- PLUS (+1):输出带有GF(3)着色的插入片段
GF(3) Conservation
GF(3) 守恒律
Each interleave batch maintains Σ trits ≡ 0 (mod 3).
每一批插入的内容都保持Σ三进制位 ≡ 0(mod 3)。
Integration
集成方式
Call from current thread to surface relevant recent context:
clojure
;; In any bb script
(require '[babashka.process :refer [shell]])
(def context (-> (shell {:out :string} "bb" (str (System/getProperty "user.home")
"/.claude/skills/active-interleave/active.bb") "--json")
:out))从当前线程调用以显示相关的近期上下文:
clojure
;; 在任意bb脚本中
(require '[babashka.process :refer [shell]])
(def context (-> (shell {:out :string} "bb" (str (System/getProperty "user.home")
"/.claude/skills/active-interleave/active.bb") "--json")
:out))Schema
数据结构
Reads from :
~/worldnet/cognition.duckdb- - Content with timestamps
messages - - Session metadata
sessions - - Play/coplay graph
awareness_edges - - Time-ordered index
temporal_index
从读取数据:
~/worldnet/cognition.duckdb- - 带时间戳的内容
messages - - 会话元数据
sessions - - Play/coplay图谱
awareness_edges - - 时间顺序索引
temporal_index
Scientific Skill Interleaving
科学技能集成
This skill connects to the K-Dense-AI/claude-scientific-skills ecosystem:
该技能与K-Dense-AI/claude-scientific-skills生态系统相连:
Graph Theory
图论
- networkx [○] via bicomodule
- Universal graph hub
- networkx [○] 通过bicomodule
- 通用图谱枢纽
Bibliography References
参考文献
- : 734 citations in bib.duckdb
general
- : bib.duckdb中有734条引用
general
Cat# Integration
Cat# 集成
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该技能映射到Cat# = Comod(P),作为设备结构中的bicomodule:
Trit: 0 (ERGODIC)
Home: Prof
Poly Op: ⊗
Kan Role: Adj
Color: #26D826GF(3) Naturality
GF(3) 自然性
The skill participates in triads satisfying:
(-1) + (0) + (+1) ≡ 0 (mod 3)This ensures compositional coherence in the Cat# equipment structure.
该技能参与满足以下条件的三元组:
(-1) + (0) + (+1) ≡ 0 (mod 3)这确保了Cat#设备结构中的组合一致性。