Categorical Composition
**Category:** Phase 3 Core - Compositional Architecture
Best use case
Categorical Composition is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
**Category:** Phase 3 Core - Compositional Architecture
Teams using Categorical Composition 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
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/categorical-composition/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How Categorical Composition Compares
| Feature / Agent | Categorical Composition | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
**Category:** Phase 3 Core - Compositional Architecture
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
# Categorical Composition
**Category:** Phase 3 Core - Compositional Architecture
**Status:** Skeleton Implementation
**Dependencies:** None (foundational)
## Overview
Implements categorical abstractions for compositional learning: Kan extensions for adapting between learning problems, higher adjunctions for bidirectional transformations, and functorial parameter transfer for compositional generalization.
## Capabilities
- **Kan Extensions**: Left/right Kan extensions for problem adaptation
- **Adjunctions**: Adjoint functors for bidirectional transformations
- **Functorial Transfer**: Preserve structure across parameter spaces
- **Compositional Architecture**: Build complex systems from simple components
## Core Components
1. **Category Theory Primitives** (`category_theory.jl`)
- Category, functor, natural transformation definitions
- Composition and identity laws
- Diagram chasing utilities
2. **Kan Extensions** (`kan_extensions.jl`)
- Left Kan extension (initial/colimit-based)
- Right Kan extension (terminal/limit-based)
- Pointwise computation formulas
3. **Adjunctions** (`adjunctions.jl`)
- Adjoint functor pairs
- Unit and counit natural transformations
- Triangle identities verification
4. **Functorial Parameter Transfer** (`functorial_transfer.jl`)
- Transfer neural network parameters via functors
- Preserve compositional structure
- Zero-shot generalization via categorical reasoning
## Integration Points
- **Input from**: All Phase 3 skills (provides compositional framework)
- **Output to**: All Phase 3 skills (foundational abstraction)
- **Coordinates with**: `formal-verification-ai` (correctness proofs)
## Usage
```julia
using CategoricalComposition
# Define source and target categories
C = FiniteCategory(objects=[:A, :B], morphisms=Dict(:f => (:A, :B)))
D = FiniteCategory(objects=[:X, :Y, :Z], morphisms=Dict(:g => (:X, :Y), :h => (:Y, :Z)))
# Define functor F: C -> D
F = Functor(
source=C,
target=D,
object_map=Dict(:A => :X, :B => :Y),
morphism_map=Dict(:f => :g)
)
# Compute left Kan extension
G = Functor(source=C, target=Set, object_map=Dict(:A => [1,2], :B => [3,4]))
Lan_F_G = left_kan_extension(F, G)
# Verify adjunction
@assert check_adjunction(Lan_F_G, restriction_functor(F))
```
## References
- Mac Lane "Categories for the Working Mathematician" (1971)
- Fong & Spivak "Seven Sketches in Compositionality" (2019)
- Shiebler et al. "Category Theory in Machine Learning" (2021)
## Implementation Status
- [x] Basic category theory primitives
- [x] Functor composition
- [ ] Full Kan extension computation
- [ ] Adjunction verification
- [ ] Neural network parameter transfer demoRelated Skills
tripartite-decompositions
GF(3)-balanced structured decompositions for parallel computation. Decomposes problems into MINUS/ERGODIC/PLUS components with sheaf-theoretic gluing. Use for FPT algorithms, skill allocation, or any 3-way parallel workload.
pun-decomposition
Pun Decomposition Skill (MINUS -1)
categorical-rewriting-triad4
Categorical Rewriting: Triad 4 (World Transformation)
compositional-acset-comparison
Compare data structures (DuckDB, LanceDB) via ACSets with persistent homology coverage analysis and geometric morphism translation.
tuple-nav-composition
Tuple and product structure navigation with composition
World Extractable Value via Pair-Graph Hodge Decomposition
**Status**: 🧪 Draft — K₃/K₄/K₅ verified
zx-calculus
Coecke's ZX-calculus for quantum circuit reasoning via string diagrams with Z-spiders (green) and X-spiders (red)
zulip-cogen
Zulip Cogen Skill 🐸⚡
zls-integration
zls-integration skill
zig
zig skill
zig-syrup-bci
Multimodal BCI pipeline in Zig: DSI-24 EEG, fNIRS mBLL, eye tracking IVT, LSL sync, EDF read/write, GF(3) conservation
zig-programming
zig-programming skill