Skip to content
Back to skills

Operad Compose

ASecurity

Operad Composition Skill (PLUS +1)

  • 666 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 2, 2026
ai-agentsgobash

Security analysis

A100/100

Scanned September 2, 2026

npx -y skills add majiayu000/claude-skill-registry --skill operad-compose --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Operad Compose?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Operad Compose
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-operad-compose/badge)](https://www.skillsdirectory.com/skills/majiayu000-operad-compose)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: operad-compose
description: Operad Composition Skill (PLUS +1)
version: 1.0.0
---


# Operad Composition Skill (PLUS +1)

> Colored operad composition for structured generation

**Trit**: +1 (PLUS)  
**Color**: #D82626 (Red)  
**Role**: Generator/Creator

## Core Concept

A colored operad O has:
- **Colors** C (types)
- **Operations** O(c₁,...,cₙ; c) (n-ary operations with input colors cᵢ, output color c)
- **Composition** γ (operadic substitution)
- **Units** 1_c ∈ O(c; c)

```
      c₁  c₂  c₃
       \  |  /
        \ | /
         \|/
    O(c₁,c₂,c₃; c)
          |
          c
```

## Operadic Substitution γ

```
γ: O(c₁,...,cₙ; c) × O(d₁,...,dₘ; c₁) → O(d₁,...,dₘ,c₂,...,cₙ; c)
```

Substituting into the first input slot.

### Full Composition
```
γ: O(c₁,...,cₙ; c) × ∏ᵢ O(dᵢ,₁,...,dᵢ,ₖᵢ; cᵢ) → O(d₁,₁,...,dₙ,ₖₙ; c)
```

## Integration with Rubato Composer

```julia
# Musical operad for composition
struct MusicOperad
    colors::Set{Symbol}  # :melody, :rhythm, :harmony, :texture
    operations::Dict{Tuple, Vector{Symbol}}  # input colors → output color
end

# Operadic composition for music
function compose_operad(op1, op2, slot::Int)
    # op1: (c₁,...,cₙ) → c
    # op2: (d₁,...,dₘ) → cₛₗₒₜ
    # result: (c₁,...,cₛₗₒₜ₋₁,d₁,...,dₘ,cₛₗₒₜ₊₁,...,cₙ) → c
    new_inputs = vcat(
        op1.inputs[1:slot-1],
        op2.inputs,
        op1.inputs[slot+1:end]
    )
    (inputs=new_inputs, output=op1.output)
end
```

## Gay.jl 3-Color Operad

```julia
# Colored operad with GF(3) colors
const GF3Colors = [:minus, :ergodic, :plus]  # -1, 0, +1

struct GF3Operad
    # Operations that conserve GF(3)
    operations::Vector{NamedTuple}
end

# Valid operations sum to 0 mod 3
function valid_gf3_op(inputs::Vector{Int}, output::Int)
    (sum(inputs) + output) % 3 == 0
end

# Generate all valid operations
function gf3_operations(arity::Int)
    [(inputs=ins, output=out) 
     for ins in Iterators.product(fill(-1:1, arity)...)
     for out in -1:1
     if valid_gf3_op(collect(ins), out)]
end
```

## Little Disks Operad (E₂)

Configuration spaces of n non-overlapping disks:

```
E₂(n) = { (z₁,r₁),...,(zₙ,rₙ) : disks don't overlap } / scaling
```

- **Composition**: Insert small disk configuration into a slot
- **Braiding**: E₂ is braided (operations can pass through each other)
- **Applications**: 2D field theories, loop spaces

## May Operad for Concurrency

```haskell
-- Little intervals operad for A∞ structure
data E1 n = E1 { intervals :: Vector n (Double, Double) }

-- Composition: splice intervals
compose :: E1 n -> Int -> E1 m -> E1 (n + m - 1)
```

## GF(3) Triads

```
persistent-homology (-1) ⊗ open-games (0) ⊗ operad-compose (+1) = 0 ✓
clj-kondo-3color (-1) ⊗ acsets (0) ⊗ operad-compose (+1) = 0 ✓
proofgeneral-narya (-1) ⊗ glass-bead-game (0) ⊗ operad-compose (+1) = 0 ✓
```

## Commands

```bash
# Compose operations
just operad-mult op1 op2 slot

# Generate GF(3) operations of given arity
just operad-gf3 arity

# Visualize operad tree
just operad-tree operation

# Check operad associativity
just operad-assoc op1 op2 op3
```

## Operads in Nature

| Domain | Operad | Colors |
|--------|--------|--------|
| Music | Composition | melody, rhythm, harmony |
| Types | Substitution | types |
| Topology | Little disks | points |
| Logic | Cut-elimination | formulas |
| AI | Skill composition | capabilities |

## References

- May, "The Geometry of Iterated Loop Spaces"
- Loday & Vallette, "Algebraic Operads"
- Spivak, "The Operad of Wiring Diagrams"



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

- `category-theory`: 139 citations in bib.duckdb
- `operads`: 5 citations in bib.duckdb



## SDF Interleaving

This skill connects to **Software Design for Flexibility** (Hanson & Sussman, 2021):

### Primary Chapter: 3. Variations on an Arithmetic Theme

**Concepts**: generic arithmetic, coercion, symbolic, numeric

### GF(3) Balanced Triad

```
operad-compose (○) + SDF.Ch3 (○) + [balancer] (○) = 0
```

**Skill Trit**: 0 (ERGODIC - coordination)

### Secondary Chapters

- Ch1: Flexibility through Abstraction
- Ch6: Layering
- Ch10: Adventure Game Example

### Connection Pattern

Generic arithmetic crosses type boundaries. This skill handles heterogeneous data.
## Cat# Integration

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

```
Trit: 1 (PLUS)
Home: Prof
Poly Op: ◁
Kan Role: Adj
Color: #4ECDC4
```

### GF(3) Naturality

The skill participates in triads satisfying:
```
(-1) + (0) + (+1) ≡ 0 (mod 3)
```

This ensures compositional coherence in the Cat# equipment structure.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.