Skip to content
pijul-sparse-skills logo

Pijul Sparse Skills

pijul-sparse-skills

Sparsity-preserving skill versioning via Pijul patches with GF(3) projection gates

plurigrid/asi0installs67stars

SKILL.md

Full skill instructions

pijul-sparse-skills

Sparsity-preserving skill versioning where changes are stored as morphisms, not materialized states.

Trit: 0 (ERGODIC) - Coordinator role for projection gate decisions


Philosophy

Default: SPARSE Mode

┌─────────────────────────────────────────────────────────┐
│  SPARSE (default)                                       │
│  - Changes stored as patches (morphisms)                │
│  - No materialization unless required                   │
│  - Lazy evaluation of skill state                       │
│  - Minimal storage footprint                            │
└─────────────────────────────────────────────────────────┘

Projection Only When:

TriggerDescriptionGF(3)
--materializeExplicit flagAny
trit == 0ERGODIC coordination point0
--archiveExplicit archiveAny
ConflictResolution requires full stateAny

Categorical Foundation

Patches as Morphisms in Cat(Skills)

Ob(C) = { skill states }
Mor(C) = { patches transforming states }

For patches p, q:
  p ⊥ q (independent) ⟹ p;q = q;p (commute)

Sparsity via Lazy Evaluation

# Sparse representation (default)
struct SparseSkill
    base_hash::UInt64      # Root state reference
    patches::Vector{Patch}  # Morphism chain, not applied
end

# Materialized only on demand
function materialize(s::SparseSkill)
    foldl(apply, s.patches; init=load(s.base_hash))
end

GF(3) Projection Gates

Gate Logic

function should_project(skill::Skill, flags::Flags)::Bool
    # Explicit materialization requested
    flags.materialize && return true
    
    # ERGODIC trit forces coordination checkpoint
    skill.trit == 0 && return true
    
    # Explicit archive
    flags.archive && return true
    
    # Conflict requires full state
    has_conflicts(skill) && return true
    
    # Otherwise: stay sparse
    return false
end

Trit-Based Behavior

trit = -1 (MINUS/​Validator):
  → Verify patch integrity without materializing
  → Check commutativity conditions
  → Validate GF(3) conservation
  
trit = 0 (ERGODIC/​Coordinator):
  → PROJECT: Create materialized checkpoint
  → Coordinate merge points
  → Synchronize distributed states
  
trit = +1 (PLUS/​Generator):
  → Generate new patches
  → Create without materializing target
  → Lazy forward references

Workflow Examples

Record Skill Change (Sparse)

cd .agents/​skills/​my-skill

# Edit SKILL.md
echo "new content" >> SKILL.md

# Record as patch (NOT materialized)
pijul record -m "Add GF(3) section"
# Stores: Patch{add_lines: [...], hash: 0x...}

Sync Skills (Sparse Pull)

# Pull only patch metadata
pijul pull --partial origin

# View pending patches without applying
pijul log --pending

# Apply lazily (on access)
cat SKILL.md  # Materializes only this file

Force Materialization (ERGODIC Gate)

# Explicit checkpoint
pijul reset --materialize

# Or via trit-aware tool
skill-checkpoint my-skill --trit 0

Integration Patterns

With flox-mcp

;; Install pijul via flox MCP
(flox-install "pijul")

;; Record skill change
(shell "pijul" "record" "-m" (str "Update " skill-name))

;; Sparse pull from upstream
(shell "pijul" "pull" "--partial" upstream-url)

With structured-decomp

# Tree decomposition of skill graph
tree = decompose(skill_graph)

# Each bag gets sparse representation
for bag in tree.bags
    bag.skills = map(to_sparse, bag.skills)
end

# Sheaf gluing respects sparsity
glue!(tree)  # Only materializes at boundaries

With Gay.jl Colors

using Gay

# Patch hash → color for visual diff
function patch_color(patch::Patch)
    seed = reinterpret(UInt64, patch.hash)
    Gay.color_at(seed, 1)
end

# GF(3) conservation across patch chain
function verify_chain(patches::Vector{Patch})
    trits = [patch.trit for patch in patches]
    sum(trits) % 3 == 0
end

Delta-State CRDT Bridge

Patches as Delta-States

Pijul Patch ≅ Delta-CRDT Update

Both:
  - Commutative when independent
  - Compose via join semilattice
  - Support partial replication

Merkle Search Tree Index

skills/
├── .pijul/
│   ├── patches/       # Merkle tree of patches
│   ├── sparse-index/  # Hash → patch mapping
│   └── projection-log # When/​why materialized

Commands

Check Sparsity Status

pijul-sparse status
# Output:
#   my-skill: SPARSE (3 pending patches)
#   other-skill: MATERIALIZED (checkpoint 2024-01-07)

Force Projection

pijul-sparse project my-skill --reason "coordination checkpoint"

Verify Conservation

pijul-sparse verify-gf3
# Output:
#   Chain: patch_a(-1) + patch_b(0) + patch_c(+1) = 0 ✓

References

  • pijul skill - Core VCS operations
  • flox-mcp skill - Environment management
  • structured-decomp skill - Tree decompositions
  • Mimram/​Di Giusto: Categorical Patch Theory
  • Almeida et al: Delta-State CRDTs
  • Merkle Search Trees (Auvolat/​Taïani)
  • Irmin/​MRDTs (Tarides)

Triadic Composition

pijul-sparse-skills (0) + pijul (-1) + skill-creator (+1) = 0 ✓
     Coordinator          Validator      Generator

This skill coordinates the projection decision while pijul validates patches and skill-creator generates new content.

More skills from plurigrid

cargo logo
plurigrid/asi

cargo

Rust package manager (36 subcommands).

67 0
View

Translate Figma nodes into production-ready code with 1:1 visual fidelity using the Figma MCP workflow (design context, screenshots, assets, and project-convention translation). Trigger when the user provides Figma URLs or node IDs, or asks to implement designs or components that must match Figma...

67 0
View

**Status**: 🌳 Production Ready (upstream in StringZilla v3+) **Type**: High-Performance String Operations / SIMD-Accelerated Text Processing **Principle**: Zero-copy views, SIMD/SWAR acceleration, deterministic hashing **Frame**: Cross-language interoperability (C, C++, Python, Rust, Go, Swift, ...

67 0
View
conformal-ga logo
plurigrid/asi

conformal-ga

Conformal Geometric Algebra (CGA) for circles, spheres, and Möbius transformations

67 0
View

Verifies code implements exactly what documentation specifies for blockchain audits. Use when comparing code against whitepapers, finding gaps between specs and implementation, or performing compliance checks for protocol implementations.

67 0
View
zig-systems logo
plurigrid/asi

zig-systems

Systems programming and performance optimization using Zig. Provides low-level abstractions, memory-safe compiled code, and performance benchmarking. Use for system-level operations, optimization, and interoperability with C/POSIX APIs.

67 0
View
paypal-mcp logo
plurigrid/asi

paypal-mcp

PayPal MCP server integration for invoices, payments, subscriptions, disputes, and transaction reporting via @paypal/mcp.

67 0
View
unison logo
plurigrid/asi

unison

Unison language - content-addressed functional programming with abilities for effects, distributed computing, and structural types. Use for pure functional code, effect management, distributed systems, and refactoring-safe codebases.

67 0
View
tasks-acset logo
plurigrid/asi

tasks-acset

Google Tasks management via TasksACSet. Transforms task operations into GF(3)-typed Interactions, routes to triadic queues, detects saturation for task-zero-as-condensed-state.

67 0
View
c logo
plurigrid/asi

c

World C Skill

67 0
View
syrup logo
plurigrid/asi

syrup

Syrup binary serialization for OCapN/CapTP wire format. Canonical encoding for capability messages.

67 0
View
skill-installer logo
plurigrid/asi

skill-installer

Install Codex skills into $CODEX_HOME/skills from a curated list or a GitHub repo path. Use when a user asks to list installable skills, install a curated skill, or install a skill from another repo (including private repos).

67 0
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View