active-interleave

Active Interleave Skill

16 stars

Best use case

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

Active Interleave Skill

Teams using active-interleave 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/active-interleave/SKILL.md --create-dirs "https://raw.githubusercontent.com/plurigrid/asi/main/plugins/asi/skills/active-interleave/SKILL.md"

Manual Installation

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

How active-interleave Compares

Feature / Agentactive-interleaveStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Active Interleave Skill

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

# Active Interleave Skill

Interleaves context from recently active Claude/Amp threads into current activity via random walk.

## bmorphism Contributions

> *"all is bidirectional"*
> — [@bmorphism](https://gist.github.com/bmorphism/ead83aec97dab7f581d49ddcb34a46d4), Play/Coplay gist

**Active Inference Pattern**: The interleave implements [Active Inference in String Diagrams](https://arxiv.org/abs/2308.00861) 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.

## Activation

Load when context from recent work would help current task.

## Usage

```bash
# Interleave from last 24 hours
bb ~/.claude/skills/active-interleave/active.bb

# Interleave from last N hours
bb ~/.claude/skills/active-interleave/active.bb --hours 6

# Query-focused interleave
bb ~/.claude/skills/active-interleave/active.bb --query "aptos blockchain"

# JSON output
bb ~/.claude/skills/active-interleave/active.bb --json
```

## Behavior

1. **MINUS (-1)**: Validate recency window, filter to active threads only
2. **ERGODIC (0)**: Random walk through recent sessions following awareness edges  
3. **PLUS (+1)**: Emit interleaved fragments with GF(3) coloring

## GF(3) Conservation

Each interleave batch maintains Σ trits ≡ 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))
```

## Schema

Reads from `~/worldnet/cognition.duckdb`:
- `messages` - Content with timestamps
- `sessions` - Session metadata  
- `awareness_edges` - Play/coplay graph
- `temporal_index` - Time-ordered index



## 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

- `general`: 734 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.

Related Skills

performing-active-directory-vulnerability-assessment

16
from plurigrid/asi

Assess Active Directory security posture using PingCastle, BloodHound, and Purple Knight to identify misconfigurations, privilege escalation paths, and attack vectors.

performing-active-directory-penetration-test

16
from plurigrid/asi

Conduct a focused Active Directory penetration test to enumerate domain objects, discover attack paths with BloodHound, exploit Kerberos weaknesses, escalate privileges via ADCS/DCSync, and demonstrate domain compromise.

performing-active-directory-forest-trust-attack

16
from plurigrid/asi

Enumerate and audit Active Directory forest trust relationships using impacket for SID filtering analysis, trust key extraction, cross-forest SID history abuse detection, and inter-realm Kerberos ticket assessment.

performing-active-directory-compromise-investigation

16
from plurigrid/asi

Investigate Active Directory compromise by analyzing authentication logs, replication metadata, Group Policy changes, and Kerberos ticket anomalies to identify attacker persistence and lateral movement paths.

performing-active-directory-bloodhound-analysis

16
from plurigrid/asi

Use BloodHound and SharpHound to enumerate Active Directory relationships and identify attack paths from compromised users to Domain Admin.

exploiting-active-directory-with-bloodhound

16
from plurigrid/asi

BloodHound is a graph-based Active Directory reconnaissance tool that uses graph theory to reveal hidden and unintended relationships within AD environments. Red teams use BloodHound to identify attac

executing-active-directory-attack-simulation

16
from plurigrid/asi

Executes authorized attack simulations against Active Directory environments to identify misconfigurations, weak credentials, dangerous privilege paths, and exploitable trust relationships that could lead to domain compromise. The tester uses BloodHound for attack path analysis, Mimikatz for credential extraction, and Impacket for protocol-level attacks including Kerberoasting, AS-REP Roasting, and delegation abuse. Activates for requests involving Active Directory pentest, AD attack simulation, domain compromise testing, or Kerberos attack assessment.

duckdb-quadruple-interleave

16
from plurigrid/asi

Chaotic interleaving across local DuckDB databases modeled as coupled quadruple pendula. Random walks both BETWEEN databases and WITHIN tables for context injection.

detecting-dcsync-attack-in-active-directory

16
from plurigrid/asi

Detect DCSync attacks where adversaries abuse Active Directory replication privileges to extract password hashes by monitoring for non-domain-controller accounts requesting directory replication via DsGetNCChanges.

deploying-active-directory-honeytokens

16
from plurigrid/asi

Deploys deception-based honeytokens in Active Directory including fake privileged accounts with AdminCount=1, fake SPNs for Kerberoasting detection (honeyroasting), decoy GPOs with cpassword traps, and fake BloodHound paths. Monitors Windows Security Event IDs 4769, 4625, 4662, 5136 for honeytoken interaction. Use when implementing AD deception defenses for detecting lateral movement, credential theft, and reconnaissance.

containing-active-breach

16
from plurigrid/asi

Executes containment strategies to stop active adversary operations and prevent lateral movement during a confirmed security breach. Implements short-term and long-term containment using network segmentation, endpoint isolation, credential revocation, and access control modifications. Activates for requests involving breach containment, lateral movement prevention, network isolation, active threat containment, or live incident response.

configuring-active-directory-tiered-model

16
from plurigrid/asi

Implement Microsoft's Enhanced Security Admin Environment (ESAE) tiered administration model for Active Directory. Covers Tier 0/1/2 separation, privileged access workstations (PAWs), administrative f