qloom
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
qloom
Standalone
QLOOM/2.0&QLOOM/1.0(.qloom) Algebraic State, Multi-Agent Weave & Cryptographic Provenance Format
A zero-dependency, pure-stdlib protocol and verification engine engineered for AI/LLM agents, multi-agent coding swarms, CLI coding harnesses, tool sandboxes, and long-horizon context compaction.
What QLOOM Is & Why It Exists
AI/LLM agent harnesses routinely stitch together incompatible formats: raw JSON blobs for state checkpoints, untyped Markdown (AGENTS.md / TODO.md) for plans, YAML for policies, and ad-hoc shell strings for tool calls. Under multi-agent concurrency and long-horizon compaction, those formats fail silently:
Context Rot & Lossy Compaction: Truncating agent history destroys provenance chains unless immutable constraints (
@charter) and active continuations (@pulse) survive progressive projection (L4 -> L0) with cryptographicparent=lineage.Multi-Agent Race Conditions: Parallel coding or research workers overwrite shared files when execution plans lack explicit
R={}/W={}read/write partitions and Bernstein concurrency checks (mode=share).Prompt Injection & Taint Escalation: Untrusted external payloads (web fetches, webhooks, third-party tool output) leak into trusted plans when a format cannot separate
T0/T1verified facts fromT2/T3quarantined blobs (@vault).Shell-Injection & Unbounded Tool Runs: Inline shell strings in agent plans invite
CWE-78command injection and hung processes unless tool witnesses and saga rollbacks use strictargvlists with explicit timeouts (@contracts).Arithmetic & Token-Budget Drift: Row truncation, silent budget overruns, and hook-output clipping happen unnoticed without inline relation assertions (
^count,^sum,^tol,^net,^quota) and an8,000-character wire ceiling.
QLOOM/2.0 (.qloom) solves all five in a single human-readable, diff-friendly, cryptographically sealed (=~) 6-plane algebraic state file verified statically in sub-millisecond time before any agent mutates a workspace.
Related MCP server: yqztk-capabilities
Format Comparison
Capability | QLOOM/2.0 ( | JSON Checkpoints | YAML Agent Configs | Markdown ( | TOML | XML |
Native 6-Plane Agent State | ✅ Charter..Pulse | ❌ Ad-hoc keys | ⚠️ Untyped | ❌ Prose only | ❌ Flat KV | ⚠️ Verbose |
Lossless | ✅ + | ❌ Manual trim | ❌ | ❌ Manual edit | ❌ | ❌ |
Bernstein Race-Free DAG ( | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
Taint Quarantine ( | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
CWE-78 Safe | ✅ | ❌ | ⚠️ Strings | ❌ | ❌ | ❌ |
Typed Relations & Inline Math | ✅ | ❌ | ❌ | ❌ | ❌ | ⚠️ XSD |
Spend & 8KB Hook Ceiling | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
Built-In SHA-256 Knot Seal | ✅ | ❌ | ❌ | ❌ | ❌ | ⚠️ DSig |
Safe Parsing (No Alias Bombs) | ✅ Bounded pure stdlib | ✅ | ⚠️ | ✅ | ✅ | ⚠️ XXE |
Legend: ✅ Built-in & statically verified · ⚠️ Partial, external schema, or safety caveat · ❌ Not supported
Architecture
QLOOM/1.0 Wire ──▶ parse_qloom() [8 Laws: LAW_01..08] ──┐
▼
QLOOM/2.0 Wire ──▶ parse_qloom() [10 Laws: LAW_01..10] ──┴─▶ QloomDocument AST
│
┌────────────────┬────────────────┬────────────────┬────────────────┤
▼ ▼ ▼ ▼ ▼
Verifier Projector Wave Planner Compat & Hub Draw / MCP
• verify_qloom • project_qloom • plan_weave_ • upgrade/ • draw() ASCII
• 10 laws • L4 ──▶ L0 waves() downgrade • Stdio MCP
• =~ SHA-256 • parent= chain • Bernstein R/W • link_qlooms() • 5 MCP toolsAll 6 Planes & QLOOM/2.0 Primitives (What & Why)
Header & Cryptographic Seal (~= / =~)
Primitive | Syntax & AST Field | What It Is & Why It Exists |
Protocol Header |
| Declares protocol version ( |
Window Governance |
| Caps |
SHA-256 Knot Seal |
| Deterministic Merkle-style SHA-256 footer over canonical body text ( |
Progressive Tiers |
| Compacts |
The 6 Planes
Plane | Primitives | What It Is & Why It Exists |
|
| Non-overridable T0 mission constraints, spend/size circuit breakers, and concise rules verified by |
|
| Columnar epistemic tables tracking |
|
| Causal execution DAG enforcing read-only |
|
| Pre/post-condition verification clauses using strict |
|
| Out-of-band quarantine for untrusted external data so |
|
| Hot execution cursor, compact single-line status filament, machine signals, bounded next actions, and explicit blockers preserved across every |
10 Real-World AI/LLM Agent & CLI Harness Use Cases
Multi-Agent Coding Swarm Handoff without Race Conditions: Declare explicit
R={...}andW={...}path sets on@weave mode=sharenodes and callplan_weave_waves()so parallel subagents never triggerWRITE_WRITE,READ_WRITE, orWRITE_READhazards.Long-Horizon Context Compaction (
L4 -> L2 -> L0): Runproject_qloom(doc, "L2")ordistill_qloom_handoff(doc)at session boundaries to prune superseded reasoning and untrusted blobs while preserving@charter,@pulse, and cryptographicparent=lineage.Untrusted External Data & Prompt-Injection Quarantine: Store fetched web pages, webhook payloads, and third-party snippets in
@vaultatT2/T3soLAW_04_TAINT_LATTICEblocks trustedT0/T1plans, contracts, or@pulse.focusfrom referencing tainted sources.Guardrailed CLI Harness Tool Execution & Saga Rollbacks: Replace raw shell strings with structured
witness_argv, boundedtimeout_s, and deterministicrollback_argvin@contracts, enforced statically byLAW_03_SAFE_ARGVandLAW_10_LINEAGE_AND_SAGA_BOUNDS.Planner -> Executor Model Routing: Tag complex architecture/patching nodes with
weight=thick, mid-complexity test nodes withweight=medium, and fast lint/canary checks withweight=fineinside@weaveso orchestrators route steps to the right model tier.Evolving Belief & Claim Supersession in Deep Research Agents: Track findings in
@latticewithmod=tentative|inferred|verified|supersededand acyclicsupersedes:ref?chains (LAW_06_DAG_AND_REFS) so outdated hypotheses drop cleanly atL3/L2.Shadow/Canary Dry-Run Verification (
face=Vvsface=R): Pair primary mutating nodes (face=R) with read-only shadow/canary verification twins (face=V spin=Z) in the same signed.qloompacket (LAW_05forbids writes onface=Vinmode=share).Token & Dollar Spend Circuit Breakers: Enforce
tokens<=,chars<=,cost_usd<=,retries<=, andtol_pct<=locks in@charter, paired with@lattice^toland^netchecks to halt runaway agent loops before budget exhaustion.Federated Swarm Hub Rollup (
link_qlooms): Aggregate heterogeneousQLOOM/1.0andQLOOM/2.0worker packets into a single sealedhubmanifest (admin=summary,tag="swarm_hub") with^countand^sum(nodes)invariants.Deterministic CI / Pre-Commit State & Ledger Audit Gates: Run
qloom verify --file state.qloom --jsonin pre-commit hooks and GitHub Actions to validate all 10 static laws, SHA-256 knot seals, and the8,000-char hook ceiling in under a millisecond.
Visual CLI State & DAG Renderer (qloom draw)
Inspect any QLOOM/1.0 or QLOOM/2.0 packet as a compact ASCII/Unicode 6-plane diagram in your terminal or Python code:
qloom draw --file examples/agent_handoff_v2.qloom
qloom draw --file examples/parallel_swarm_weave.qloom --max-rows 8import qloom
with open("examples/agent_handoff_v2.qloom", encoding="utf-8") as fh:
print(qloom.draw(fh.read())) # aliases: qloom.draw_qloom(), qloom.render_qloom_ascii()Example 1: Guardrailed Auth Migration Handoff (examples/agent_handoff_v2.qloom)
=== QLOOM/2.0: epic.auth.v2 [tier=L4 state=MUTATION_PREPARE epoch=4 admin=working tag=auth_migration | knot=qloom-fa62f41be2b0] ===
════════════════════════════════════════════════════════════════════════════════════
├─ @charter goal: Migrate token validator to stdlib HMAC verification.
│ locks=[G0_NO_SHELL, G0_BUDGET] mandates=1
├─ @lattice
│ ├── relation artifacts (2 rows)
│ │ [0] art_audit | T1 | "artifacts/auth_audit.md"
│ │ [1] adr_04 | T0 | "docs/adr/0004_hmac_stdlib.md"
│ ├── relation claims (3 rows) ^count=3
│ │ [0] c1 | superseded | T1 | "JWT parser uses custom base64 decoder." | ->art_audit | _
│ │ [1] c2 | verified | T0 | "Auth validator enforces stdlib HMAC-SHA256." | ->adr_04 | ->c1
│ │ [2] c3 | tentative | T2 | "External RFC 7519 draft notes key rotation window." | ->v_ext_rfc | _
├─ @weave (mode=share)
│ ├── [done] n_audit (spin=Z R fine) R=1 W=0
│ ├── [active] n_patch (spin=S R thick) deps=[n_audit] R=1 W=1
│ ├── [pending] n_canary (spin=Z V fine) deps=[n_patch] R=1 W=0
│ └── [pending] n_tests (spin=S R medium) deps=[n_patch] R=1 W=1
├─ @contracts clauses=[C_UNIT]
├─ @vault quarantined=[v_ext_rfc(T2)]
└─ @pulse focus=->n_patch next=2 blockers=0
════════════════════════════════════════════════════════════════════════════════════Example 2: Parallel Swarm Weave & Ledger Assertions (examples/parallel_swarm_weave.qloom)
=== QLOOM/2.0: swarm.release.v2 [tier=L4 state=MUTATION_PREPARE epoch=2 admin=working tag=parallel_swarm hub=SwarmHub | knot=qloom-0bc681b7f44d] ===
════════════════════════════════════════════════════════════════════════════════════
├─ @charter goal: Run parallel module updates with disjoint write sets and budget checks.
│ locks=[L_NO_SHELL, L_SPEND] mandates=1
├─ @lattice
│ ├── relation ledger (4 rows) ^count=4 ^sum(credit, 0..1)=600 ^net(credit, debt)=0 ^tol(credit, pct=5.0)=980 ^quota(guard, pct=22.5)=4000
│ │ [0] w_api | verified | T0 | 300 | 250 | 200
│ │ [1] w_ui | verified | T0 | 300 | 250 | 200
│ │ [2] w_docs | inferred | T1 | 200 | 250 | 250
│ │ [3] w_qa | verified | T0 | 200 | 250 | 250
├─ @weave (mode=share)
│ ├── [done] n_plan (spin=Z R thick) R=1 W=0
│ ├── [active] n_api (spin=S R medium) deps=[n_plan] R=1 W=1
│ ├── [active] n_ui (spin=S R fine) deps=[n_plan] R=1 W=1
│ ├── [pending] n_shadow (spin=Z V fine) deps=[n_api,n_ui] R=2 W=0
│ └── [pending] n_qa (spin=S R medium) deps=[n_api,n_ui] R=2 W=1
├─ @contracts clauses=[C_SWARM]
└─ @pulse focus=->n_api next=2 blockers=0
════════════════════════════════════════════════════════════════════════════════════Installation
qloom requires Python 3.10+ and has zero runtime dependencies.
# Install from PyPI (when published) or directly from GitHub
pip install qloom
pip install "git+https://github.com/skupriienko/qloom.git"
# Or clone and install in editable mode
git clone https://github.com/skupriienko/qloom.git
cd qloom
pip install -e .Quick Python API
import qloom
# 1. Generate or parse a sealed QLOOM/2.0 document
doc = qloom.sample_qloom(version="QLOOM/2.0")
wire = qloom.dump(doc)
# 2. Parse, roundtrip AST dict, and run all 10 static verification laws
parsed = qloom.parse(wire)
ast_dict = qloom.loads(wire)
assert qloom.dumps(ast_dict) == wire
report = qloom.verify(wire)
assert report["valid"] is True
assert len(report["laws_checked"]) == 10 # 8 laws for QLOOM/1.0, 10 for QLOOM/2.0
# 3. Progressive disclosure compaction (L4 -> L2 -> L0) & wave scheduling
l0_doc = qloom.project(parsed, "L0")
assert l0_doc.parent == parsed.seal.knot
waves = qloom.plan_weave_waves(parsed)
# 4. Visual ASCII diagram, version shims, distillation & hub federation
print(qloom.draw(wire))
v1_doc = qloom.downgrade_qloom_to_v1(wire)
v2_doc = qloom.upgrade_qloom_to_v2(v1_doc, admin="working", tag="ci")
summary = qloom.distill_qloom_handoff(v2_doc, tier="L2")
hub = qloom.link_qlooms({"worker_a": summary, "legacy": v1_doc}, hub_id="SwarmHub")CLI Commands
# Emit a canonical verified QLOOM/2.0 (or QLOOM/1.0) sample packet
qloom sample --version QLOOM/2.0
# Verify all static laws, SHA-256 knot seal, and 8KB hook ceiling
qloom verify --file examples/agent_handoff_v2.qloom --json
# Project L4 state down to L2 or L0 with chained parent= lineage
qloom project --file examples/agent_handoff_v2.qloom --tier L0
# Compile between .qloom wire format and JSON AST
qloom compile --file examples/agent_handoff_v2.qloom --to-json > state.json
qloom compile --file state.json --from-json
# Draw visual 6-plane ASCII/Unicode state & DAG diagram
qloom draw --file examples/parallel_swarm_weave.qloom
# Compute dependency- and Bernstein-safe parallel execution waves
qloom waves --file examples/parallel_swarm_weave.qloom --json
# Upgrade 1.0 -> 2.0, downgrade 2.0 -> 1.0, or distill into summary handoff
qloom upgrade --file examples/legacy_v1_compat.qloom --admin working --tag release
qloom downgrade --file examples/agent_handoff_v2.qloom
qloom distill --file examples/agent_handoff_v2.qloom --tier L2
# Launch the zero-dependency Stdio JSON-RPC 2.0 MCP server
qloom mcpMCP Client Configuration
qloom ships a pure-stdlib Stdio JSON-RPC 2.0 MCP server (qloom mcp) exposing five tools: qloom_verify, qloom_project, qloom_draw, qloom_plan_waves, and qloom_compat (sample, upgrade, downgrade, distill, link, to_json, from_json).
Add the following block to your MCP client configuration (Claude Desktop, Cursor, Windsurf, etc.):
{
"mcpServers": {
"qloom": {
"command": "qloom",
"args": ["mcp"]
}
}
}Using with AI Coding Agents (Agent Skill)
This repository includes an Agent Skills specification–compliant skill at skills/qloom/SKILL.md (mirrored at SKILL.md) with detailed references in skills/qloom/references/.
# 1. Install via npx skills CLI (Claude Code, Codex, Cursor, Windsurf, Gemini CLI, etc.)
npx skills add skupriienko/qloom
# 2. Or clone / copy into your agent's global or project skill directory
git clone https://github.com/skupriienko/qloom.git /tmp/qloom-repo
cp -r /tmp/qloom-repo/skills/qloom ~/.claude/skills/qloom # Claude Code
# cp -r /tmp/qloom-repo/skills/qloom ~/.agents/skills/qloom # Cross-agent (~/.agents/skills)
# cp -r /tmp/qloom-repo/skills/qloom .cursor/skills/qloom # Project-local CursorPair the skill with pip install "git+https://github.com/skupriienko/qloom.git" (CLI) or the qloom mcp Stdio server above so agents follow .qloom best practices and run live static verification, wave scheduling, and L4 -> L0 compaction.
Andean Textile & Loom Heritage
Every wire keyword and Python identifier in QLOOM/2.0 uses concise, explicit English. Historically, the format's structural model draws inspiration from Andean knotted-cord (quipu/khipu) accounting and weaving traditions:
Historical Term | Origin | Concise English Meaning |
|
quipu / khipu | Quechua | Knotted-cord tactile record for accounting and structured memory | Legacy |
waranqa | Quechua | Administrative unit of 1,000 capping working-ledger granularity |
|
pachaka | Quechua | Decimal unit of 100 used for intermediate grouped rollups |
|
inokatha | Aymara | Balanced double-entry pairing between credit and debt cords |
|
yapa | Quechua | Small permissible positive margin before an overrun breach |
|
hanan / hurin (recto / verso) | Quechua / Epigraphy | Complementary upper/primary vs lower/shadow attachment faces |
|
top-cord | Epigraphy | Upward summary cord aggregating pendant cord totals |
|
Z / S spin | Epigraphy | Directional ply twist distinguishing immutable vs mutable threads |
|
Documentation & Examples
Formal Protocol Specification: docs/SPECIFICATION.md — EBNF grammar, data model, canonical serialization,
L4..L0projection, all 10 static verification laws, compatibility shims, CWE security bounds, and heritage glossary.Examples Cookbook: docs/EXAMPLES.md — End-to-end recipes for multi-agent handoffs, Bernstein wave planning,
L4 -> L0compaction, taint quarantine, saga rollbacks, CLI, and Stdio MCP JSON-RPC.Runnable
.qloomFixtures:examples/agent_handoff_v2.qloom — Sealed
QLOOM/2.06-plane agent handoff withT0..T2claims,@vaultisolation,face=R|V,weight, and rollback contractexamples/parallel_swarm_weave.qloom — Sealed
QLOOM/2.0Bernstein-disjoint parallel swarm with^net,^tol,^quota, and---spacersexamples/context_projected_l0.qloom —
L0minimal compacted envelope chained viaparent="qloom-fa62f41be2b0"examples/legacy_v1_compat.qloom — Sealed
QLOOM/1.0packet for 8-law backward-compatibility andupgradeworkflows
License
MIT © Serhii Kupriienko
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Capability-routed CLI/MCP: signed provenance exports, WCAG-validated themes, sovereign deploy modes.
AI Reasoning Cache & Consensus Layer with 11 MCP tools via Streamable HTTP.
Provenance and metadata tools for AI agents. Paid tools use x402 (USDC) at /mcp/<tool>.
Tamper-evident proof creation and verification for AI agents via MCP, A2A, and REST.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables MCP clients to search, record, correct, and review the provenance and version history of memories, and to obtain answers composed from guarded context in which private values are replaced by placeholders and resolved locally on the device. Exposes these capabilities through dependency-free tools over stdio.MIT
- AlicenseNot gradedqualityBmaintenanceEnables MCP-capable AI agents to invoke 38 deterministic, private, auditable compute tools over stdio, covering PII masking, finance schedules, health, text, units, media, business, gaming, and scheduling without network access or dependencies.MIT
- AlicenseNot gradedqualityBmaintenanceEnables MCP-compatible AI agents to store, search, link, and retrieve encrypted long-term memories through a local stdio interface, with bounded graph exploration and context assembly.12GPL 3.0
- AlicenseNot gradedqualityAmaintenanceEnables MCP-capable coding agents to store, search, verify, merge, and undo versioned repository memory with provenance and staleness detection over stdio.52 npmMIT