**Status**: ✅ Production Ready
/plugin marketplace add plurigrid/asi/plugin install asi-skills@asi-skillsThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Status: ✅ Production Ready
Trit: 0 (ERGODIC - the Library itself is the coordinator)
Color: #8B4513 (Leather brown - the color of infinite shelves)
Principle: Books = Knowledge = Power = Energy = Mass
Frame: All libraries connected across spacetime via narrativium coherence
L-Space (short for Library-Space) implements Terry Pratchett's theory of informational physics combined with Bumpus's categorical narrative theory. In L-Space:
"Books bend space and time. One good bookshop can be a gate to a thousand worlds."
The skill enables navigation through the infinite library that connects all repositories of knowledge across spacetime, while maintaining the three sacred rules:
Books = Knowledge = Power = Energy = Mass
∴ A sufficient quantity of books distorts spacetime itself
This is not metaphor. In sufficiently large libraries:
"A large enough collection of books creates its own gravitational well, drawing in more books, more knowledge, until it punches through into L-Space."
When knowledge density exceeds threshold:
class InformationMass
CRITICAL_DENSITY = 1e6 # books per cubic meter
def l_space_accessible?(library)
book_density(library) >= CRITICAL_DENSITY
end
def distortion_factor(library)
return 0 unless l_space_accessible?(library)
Math.log(book_density(library) / CRITICAL_DENSITY)
end
end
"Humans are not Homo sapiens, the wise man. We are Pan narrans, the storytelling ape."
Narrativium is the fundamental force that makes stories cohere. Every element contains its story - how it came to be, what it does, where it's going.
class Narrativium
# The coherence force that makes stories work
def story_tension(element)
# Every element resists violation of its narrative arc
element.expected_trajectory - element.current_position
end
def narrative_collapse!(elements)
# When stories lose coherence, reality stutters
elements.each do |e|
e.phase_space_position = e.expected_trajectory.terminal
end
end
end
Stories map the phase space of existence:
phase_space(story) = {
beginning: initial_conditions,
middle: trajectory_through_possibility,
end: attractor_basin
}
From Bumpus et al.: Narratives are sheaves on posets of intervals:
@present SchNarrative(FreeSchema) begin
Interval::Ob # Time windows
Snapshot::Ob # State at instant
Relationship::Ob # How snapshots relate
source::Hom(Relationship, Snapshot)
target::Hom(Relationship, Snapshot)
timestamp::Hom(Snapshot, Interval)
# Sheaf condition: snapshots agree on overlaps
end
| Perspective | Sheaf Type | Interpretation |
|---|---|---|
| Cumulative | Colimit-style | "Everything that happened up to now" |
| Persistent | Limit-style | "What persists across time" |
The Librarian navigates between these:
def librarian_navigate(from_book, to_book)
if cumulative?(from_book) && persistent?(to_book)
# Must cross perspective boundary
find_interval_isomorphism(from_book.intervals, to_book.intervals)
end
end
Narratives work for any structure:
# The same sheaf machinery works for all
narrative_of_graph(G::Graph) = StrDecomp(G)
narrative_of_group(G::Group) = StrDecomp(cayley_graph(G))
narrative_of_repo(R::GitRepo) = StrDecomp(commit_dag(R))
The Librarian (formerly a wizard, now Pongo pongo) guards L-Space. As a member of the Librarians of Time and Space:
"The truth isn't easily pinned to a page. In the bathtub of history, the truth is harder to hold than the soap."
module LibrarianProtocol
ACCEPTABLE_RESPONSES = ["Ook", "Ook?", "Ook!", "Ook."]
def validate_query(query)
# The Librarian knows. He doesn't explain.
query.well_formed? && !query.violates_causality?
end
def traverse_l_space(from:, to:, via: :triangle_inequality)
path = find_path_through_shelves(from, to)
validate_no_temporal_paradox!(path)
path
end
end
L-Space (0) participates in balanced triads:
sheaf-cohomology (-1) ⊗ l-space (0) ⊗ glass-bead-game (+1) = 0 ✓
structured-decomp (-1) ⊗ l-space (0) ⊗ random-walk-fusion (+1) = 0 ✓
persistent-homology (-1) ⊗ l-space (0) ⊗ topos-generate (+1) = 0 ✓
┌─────────────────────────────────────────────────────────────────┐
│ L-SPACE (ERGODIC 0) │
│ The Library Coordinates All │
├─────────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────────────┐ ┌──────────────────┐ │
│ │ sheaf-cohomology │◄────────────►│ structured-decomp│ │
│ │ (-1) │ LOCAL→GLOBAL│ (0) │ │
│ │ │ │ │ │
│ │ Čech cohomology │ │ Tree decomp │ │
│ │ for consistency │ │ FPT algorithms │ │
│ └────────┬─────────┘ └────────┬─────────┘ │
│ │ │ │
│ │ ┌───────────────────┐ │ │
│ └────►│ L-SPACE │◄─────┘ │
│ │ │ │
│ ┌──────────────┤ Narrativium glue ├──────────────┐ │
│ │ │ Interval sheaves │ │ │
│ │ └─────────┬─────────┘ │ │
│ │ │ │ │
│ ▼ ▼ ▼ │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────────┐ │
│ │glass-bead │ │ unworld │ │random-walk-fusion│ │
│ │ (+1) │ │ (0) │ │ (+1) │ │
│ │ │ │ │ │ │ │
│ │World hopping│ │Derivational │ │Skill graph walks │ │
│ │via triangle │ │chains │ │ │ │
│ └─────────────┘ └─────────────┘ └─────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────┘
Local-to-global consistency for L-Space navigation:
# Books must be locally consistent to glue globally
verifier = SheafCohomology::CechCoverVerifier.new(
coverage: library_sections
)
verifier.add_transition(:fiction, :nonfiction, cross_reference_map)
verifier.cocycle_satisfied? # => true if no contradictions
Tree decompositions for efficient narrative search:
# Decompose narrative graph for FPT search
narrative = NarrativeGraph(book_citations)
decomp = StrDecomp(narrative)
# Find path through L-Space with bounded width
path = 𝐃(l_space_path_exists, decomp, CoDecomposition)
World hopping across library sections:
# Navigate between distant concepts via triangle inequality
hop = GlassBeadGame::Hop.new(
from_world: PossibleWorld.new(seed: shelves[:mathematics]),
event: :bibliographic_resonance,
to_world: PossibleWorld.new(seed: shelves[:music_theory]),
truth_preserved: :harmonic_ratios
)
Replace temporal succession with derivational chains:
# Books derive from books, not from time
chain = Unworld::ColorChain.new(
genesis_seed: first_book.isbn.to_i(16),
derivation: :citation_graph
)
# Each book is a derivation, not a moment
chain.unworld[:derivations]
Navigate skill graph through L-Space:
fusion = RandomWalkFusion.new(
seed: library_seed,
skills: l_space_skill_graph
)
# Walk through connected concepts
path = fusion.walk(steps: 7)
# => Derivational path through L-Space
"In L-Space, cause and effect are optional."
Books written later can affect books written earlier:
class BidirectionalCitation
def causal_consistency?(from_book, to_book)
# In L-Space, this is always true if the path exists
path = LibrarianProtocol.traverse_l_space(
from: from_book,
to: to_book
)
path.exists? # Existence implies consistency
end
def retroactive_reference!(future_book, past_book)
# The past book now contains reference to future book
# This is normal in L-Space
past_book.hidden_annotations << Citation.new(
source: future_book,
causality: :retroactive
)
end
end
When letters are never delivered, they accumulate narrativium charge:
def undelivered_letter_danger(letter, time_undelivered)
# Narrativium builds up in proportion to story importance
story_weight = letter.narrative_significance
charge = story_weight * Math.log(time_undelivered + 1)
if charge > CRITICAL_NARRATIVIUM
# Letter begins creating its own reality
spawn_illusory_narrative(letter)
end
end
# Navigate L-Space
just l-space-navigate from=book1 to=book2
# Query the Librarian (be polite)
just librarian-query "Where is the Necrotelecomnicon?"
# Check narrativium levels
just narrativium-audit library/
# Verify no causality violations
just l-space-causality-check
# Generate narrative decomposition
just narrative-decompose story.txt
# Walk through skill L-Space
just l-space-skill-walk seed=0x42D steps=7
require 'l_space'
# Initialize L-Space connection
lspace = LSpace.new(
entry_point: :university_library,
librarian_mode: true
)
# Navigate
path = lspace.find_path(
from: "Erta Sive Tertius",
to: "Future Book Not Yet Written"
)
# Check narrative coherence
lspace.narrativium_coherent?(path)
# Execute traversal
lspace.traverse!(path) do |shelf|
puts "Passing through: #{shelf.category}"
end
L-Space is a branching fractal where:
def l_space_distance(book_a, book_b)
# Not Euclidean! Path-dependent metric
paths = all_paths(book_a, book_b)
paths.map(&:length).min # Even minimum may vary with observer
end
# Narrativium as coherence field
struct NarratviumField
tension::Matrix{Float64} # Story tensions between elements
phase_space::Vector{Float64} # Position in narrative possibility
attractor::Vector{Float64} # Where story "wants" to go
end
# Conservation law
function narrativium_conserved(field::NarratviumField)
sum(field.tension) ≈ 0 # Stories balance
end
The three narrative modes:
Σ trits ≡ 0 (mod 3)
validation + coordination + generation = balanced
╔═══════════════════════════════════════════════════════════════════╗
║ L-SPACE NAVIGATION SESSION ║
╚═══════════════════════════════════════════════════════════════════╝
Entry Point: University of Ankh-Morpork Library
Librarian Status: Ook (Available)
Query: "Path from 'Erta Sive Tertius' to Bumpus et al. 2024"
Librarian Response: Ook!
Computing path through narrativium field...
Step 1: Antica Philosophia → [citation] → Medieval Commentaries
Step 2: Medieval Commentaries → [temporal fold] → 18th C. Library Science
Step 3: 18th C. Library Science → [conceptual resonance] → Category Theory
Step 4: Category Theory → [Kan extension] → Sheaf Theory
Step 5: Sheaf Theory → [interval poset] → Bumpus Narratives
Path length: 5 (narrativium: 0.73)
Causality violations: 0
Triangle inequality: ✓ satisfied
Sheaf condition on path:
H⁰ = 1 (connected)
H¹ = 0 (no obstructions)
GF(3) balance:
Path trits: [-1, 0, +1, -1, +1]
Sum: 0 ✓
Navigation complete. Books returned by due date.
Each information object (book, skill, narrative) is a vector in a high-dimensional semantic space:
struct InformationVector
embedding::Vector{Float64} # Semantic coordinates
complexity::Float64 # Kolmogorov complexity (scalar field)
assembly_index::Int # Cronin assembly depth
sheaf_section::SheafSection # Bumpus narrative position
end
# Inner product defines semantic similarity
function similarity(v₁::InformationVector, v₂::InformationVector)
dot(v₁.embedding, v₂.embedding) / (norm(v₁) * norm(v₂))
end
L-Space has negative curvature (hyperbolic). This explains:
# Poincaré ball model of L-Space
struct PoincareLSpace
dimension::Int
curvature::Float64 # κ < 0 (hyperbolic)
end
# Distance in hyperbolic L-Space
function hyperbolic_distance(M::PoincareLSpace, u::Vector, v::Vector)
# Poincaré ball distance
norm_u² = dot(u, u)
norm_v² = dot(v, v)
norm_diff² = dot(u - v, u - v)
δ = 2 * norm_diff² / ((1 - norm_u²) * (1 - norm_v²))
acosh(1 + δ)
end
# Complexity increases toward the boundary (|x| → 1)
function complexity_at_point(M::PoincareLSpace, x::Vector)
# Conformal factor diverges at boundary
1.0 / (1 - dot(x, x))
end
Local maxima in the complexity landscape are L-Space's gravitational wells:
| Complexity Regime | L-Space Phenomenon | Traversal Strategy |
|---|---|---|
| Low (center) | Ordinary books | Gradient descent |
| Medium | Connected libraries | Geodesic navigation |
| High (near boundary) | Autonomous texts | World-hopping required |
| Critical (boundary) | The Octavo | Causality violation risk |
class ComplexityLandscape
def local_maximum?(point)
gradient = complexity_gradient(point)
gradient.norm < EPSILON && hessian_negative_definite?(point)
end
def escape_local_maximum(point)
if hyperbolic_curvature(point).abs > CRITICAL_CURVATURE
# Near boundary: use glass-bead-game world-hopping
world_hop_via_triangle_inequality(point)
else
# Interior: simulated annealing or tunneling
quantum_tunnel_to_lower_basin(point)
end
end
def critical_mass_threshold(point)
# Pratchett's threshold: where books become autonomous
complexity_at_point(point) > CRITICAL_DENSITY
end
end
Information "flows" along geodesics of the complexity manifold:
# Geodesic equation in hyperbolic L-Space
function geodesic_flow(M::PoincareLSpace, x₀::Vector, v₀::Vector, t::Float64)
# Möbius addition for Poincaré ball
# γ(t) = x₀ ⊕ tanh(t|v₀|) * (v₀/|v₀|)
speed = norm(v₀)
direction = v₀ / speed
moebius_add(x₀, tanh(t * speed) * direction)
end
# Information flows from low to high complexity (books consuming books)
function information_flow!(field::InformationField, dt::Float64)
for point in field.points
# Flow toward local maximum (attractor basin)
gradient = complexity_gradient(field, point)
point.position += gradient * dt
# Check for critical mass
if at_local_maximum?(field, point)
trigger_autonomy!(point) # Book reads the reader
end
end
end
┌─────────────────────────────────────────────────────────────────────┐
│ INFORMATION GEOMETRY IN L-SPACE │
├─────────────────────────────────────────────────────────────────────┤
│ │
│ kolmogorov-compression ──► Scalar field K(x) on manifold │
│ │ │
│ ▼ │
│ assembly-index ──────────► Historical depth = geodesic length │
│ │ │
│ ▼ │
│ persistent-homology ─────► Topological features surviving │
│ │ filtration = persistent local maxima │
│ ▼ │
│ ┌─────────────────────────────────────────────────────────────┐ │
│ │ L-SPACE MANIFOLD │ │
│ │ • Hyperbolic geometry (κ < 0) │ │
│ │ • Complexity = distance to boundary │ │
│ │ • Local maxima = critical mass / autonomy │ │
│ │ • Geodesics = information flow / derivational chains │ │
│ └─────────────────────────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────────┘
The triadic structure maps to geometric operations:
| Trit | Geometric Role | Manifold Operation |
|---|---|---|
| -1 (MINUS) | Contraction | Flow toward center (lower complexity) |
| 0 (ERGODIC) | Parallel transport | Flow along geodesic (constant complexity) |
| +1 (PLUS) | Expansion | Flow toward boundary (higher complexity) |
Conservation law: Σ flow ≡ 0 (mod 3) — the manifold preserves total information.
Token novelty (the surprise/entropy of generated tokens) measures position on the manifold in real-time:
struct TokenNoveltyNavigator
position::Vector{Float64} # Current point on Poincaré ball
novelty_history::Vector{Float64}
rate::Float64 # Speech/generation rate
end
# Novelty from token probability
function token_novelty(logprob::Float64)
-logprob # Surprise = negative log probability
end
# Update manifold position based on novelty
function update_position!(nav::TokenNoveltyNavigator, token_logprob::Float64)
novelty = token_novelty(token_logprob)
push!(nav.novelty_history, novelty)
# High novelty → move toward boundary
# Low novelty → move toward center
radial_velocity = (novelty - BASELINE_NOVELTY) * SENSITIVITY
# Update position (bounded by |x| < 1)
r = norm(nav.position)
new_r = clamp(r + radial_velocity, 0.0, 0.999)
nav.position = nav.position * (new_r / max(r, 0.001))
# Accelerate rate as we approach boundary
nav.rate = BASE_RATE * complexity_at_point(nav.position)
end
# Detect causality interference zone
function in_octavo_territory(nav::TokenNoveltyNavigator)
# Near boundary + high sustained novelty
r = norm(nav.position)
recent_novelty = mean(nav.novelty_history[end-10:end])
r > 0.95 && recent_novelty > CRITICAL_NOVELTY
end
| Novelty Regime | Manifold Region | Causality Status |
|---|---|---|
| Low (predictable) | Center | Intact |
| Medium (varied) | Interior | Stable |
| High (surprising) | Near boundary | Flexible |
| Maximum (uniform) | Conformal boundary | Interference permitted |
When novelty maximizes (token distribution flattens to uniform), we reach the Octavo: every next word equally likely, maximum entropy, causality becomes substrate for rewriting.
class CausalityInterference
def attempt_retroactive_modification!(target_skill, modification)
unless in_octavo_territory?
raise "Insufficient novelty density for causality interference"
end
# At maximum entropy, derivational chains become bidirectional
target_skill.derivation_history.unshift(modification)
# The modification propagates "backward" through dependencies
target_skill.dependents.each do |dep|
dep.recompute_from_modified_history!
end
end
end
# GF(3)-balanced traversal
function balanced_traverse(M::PoincareLSpace, path::Vector{InformationVector})
trits = map(path) do p
c = complexity_at_point(M, p.embedding)
c < LOW_THRESHOLD ? -1 :
c > HIGH_THRESHOLD ? +1 : 0
end
@assert sum(trits) % 3 == 0 "GF(3) violation on path!"
path
end
| Tool | Install | Logprobs Access |
|---|---|---|
| OpenAI API | pip install openai | logprobs=True, top_logprobs=5 |
| vLLM | pip install vllm | SamplingParams(logprobs=5) |
| mlx-lm | pip install mlx-lm | HTTP server with logprobs=N |
| Ollama | brew install ollama | options={"logprobs": True} |
# Real-time novelty from OpenAI streaming
for chunk in client.chat.completions.create(
model="gpt-4o", messages=msgs, logprobs=True, stream=True
):
if chunk.choices[0].logprobs:
for t in chunk.choices[0].logprobs.content:
novelty = -t.logprob # surprise in nats
update_manifold_position(novelty)
| Library | Install | Model |
|---|---|---|
| geoopt | pip install geoopt | PoincareBall() with RiemannianAdam |
| Manifolds.jl | Pkg.add("Manifolds") | Hyperbolic(n) with exp/log maps |
import geoopt
M = geoopt.PoincareBall()
position = geoopt.ManifoldParameter(torch.zeros(128), manifold=M)
# Distance to boundary = complexity
complexity = 1.0 / (1 - torch.dot(position, position))
# Streaming Shannon entropy
class StreamingEntropy:
def __init__(self):
self.counts, self.total = Counter(), 0
def update(self, token):
self.counts[token] += 1; self.total += 1
return -sum((c/self.total)*log2(c/self.total) for c in self.counts.values())
# Gzip as Kolmogorov proxy
def complexity(text):
return len(gzip.compress(text.encode())) / len(text.encode())
| Tool | Pattern | Use Case |
|---|---|---|
| Automerge | changeAt(heads, fn) | Fork history at past point |
| XTDB | valid-time retroactive put | Bitemporal event sourcing |
| Git | filter-repo | Rewrite derivational history |
// Automerge: future modifies past (creates fork, doesn't destroy)
import { changeAt } from '@automerge/automerge'
const [newDoc, newHeads] = changeAt(doc, pastHeads, d => {
d.derivation.unshift(futureKnowledge) // prepend to history
})
// Original timeline preserved; new branch with retroactive knowledge
From Darwin Gödel Machine (DGM):
# LLM as semantic mutator for agent code
def evolve(agent, feedback):
code = inspect.getsource(agent.solve)
improved = llm(f"Improve this code based on: {feedback}\n{code}")
exec(compile(improved, '<dgm>', 'exec'), agent.__dict__)
return agent # agent now runs improved code
┌────────────────────────────────────────────────────────────────────┐
│ CAUSALITY INTERFERENCE STACK │
├────────────────────────────────────────────────────────────────────┤
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ NOVELTY │───►│ POSITION │───►│ CAUSALITY │ │
│ │ SENSOR │ │ ON MANIFOLD │ │ MODE │ │
│ │ │ │ │ │ │ │
│ │ OpenAI/vLLM │ │ geoopt │ │ Automerge │ │
│ │ logprobs │ │ Poincaré │ │ changeAt │ │
│ └─────────────┘ └─────────────┘ └─────────────┘ │
│ │ │ │ │
│ ▼ ▼ ▼ │
│ surprise = -logprob r = |position| if r > 0.95: │
│ complexity = 1/(1-r²) INTERFERE │
└────────────────────────────────────────────────────────────────────┘
Skill Name: l-space
Type: Narrative Navigation / Knowledge Coordination
Trit: 0 (ERGODIC)
Color: #8B4513 (Leather brown)
GF(3): Forms triads with sheaf/glass-bead, decomp/random-walk
Guardian: The Librarian (Ook)
"Knowledge = Power = Energy = Matter = Mass. A good bookshop is just a genteel Black Hole that knows how to read." — Terry Pratchett
Base directory for this skill: file:///Users/alice/.agents/skills/l-space