Note | Project status: Active, secondary priority. LithoGlyph is working towards production for specialist use in journalism, narrative arts, and media/communications. It is not the primary priority project right now — that is VeriSimDB, which is a substantial undertaking in cross-modal database consistency. Lessons learned from VeriSimDB (drift detection, formal verification, federation architecture) will directly improve LithoGlyph when development focus returns here. For most journalism, storytelling, and media workflows, LithoGlyph and its query language GQL are likely the database you want. The narrative-first, reversible, audit-grade design is built specifically for this domain. VeriSimDB and VCL/VCL-UT become more relevant when your work involves cross-source investigative verification, large-scale entity tracking across multiple systems, long-term identity consistency, or situations where you need to prove that data across different databases has not drifted apart. For everything else — the story you want to write, the sources you want to cite, the narrative you want to build — LithoGlyph is designed to be your storage layer. In the long run, LithoGlyph is intended to work intimately with tools like bofig in the portfolio and serve as a database for journalism and PR applications more broadly. |
Lithoglyph (from Greek lithos "stone" + glyphein "to carve") is a narrative-first, reversible, audit-grade database core. Like ancient glyphs carved in stone, Lithoglyph treats schemas, constraints, migrations, blocks, and journals as permanent narrative artefacts—the database is part of the story, not an opaque substrate.
The name reflects the core metaphor: Forth code sculpts data onto disk, carving each operation into permanent, auditable stone.
Schemas, constraints, migrations, blocks, and journals are narrative artefacts. The database is part of the story, not an opaque substrate. Data is carved in stone—permanent, auditable, reversible.
Investigative journalism
Governance/compliance
Agentic ecosystems + multi-repo handover
Long-term cultural/institutional archives
lithoglyph/
├── spec/ # Format specs + rationale (AsciiDoc)
├── core-forth/ # Form.Blocks + Form.Model (truth core)
├── core-zig/ # Form.Bridge (ABI + port framing)
├── core-factor/ # Form.Runtime (GQL + introspection)
├── control-plane/ # Elixir/OTP gateway (optional)
├── tools/ # Render/inspect/doctor utilities
├── test-vectors/ # Golden bytes + golden renders
└── stories/ # Narrative examples + onboarding artefactsLithoglyph is structured in layers, each with a specific language and responsibility:
┌─────────────────────────────────────────────────────────────┐
│ Form.ControlPlane (Elixir/OTP - optional) │
│ Sessions, supervision, cluster edge │
├─────────────────────────────────────────────────────────────┤
│ Form.Normalizer (Factor + Lean 4) │
│ FD discovery, type encoding, proof-carrying normalization │
├─────────────────────────────────────────────────────────────┤
│ Form.Runtime (Factor) │
│ GQL parse/plan/exec, explain, introspection │
├─────────────────────────────────────────────────────────────┤
│ Form.Bridge (Zig) │
│ Stable Zig ABI (no C), safety governor │
├─────────────────────────────────────────────────────────────┤
│ Form.Model (Forth) │
│ Multi-model logical layer: documents, edges, schemas │
├─────────────────────────────────────────────────────────────┤
│ Form.Blocks (Forth) │
│ Deterministic storage, journal, reversibility primitives │
└─────────────────────────────────────────────────────────────┘Fixed-size blocks with symbolic headers
Append-only journal
Crash recovery and integrity checks
Repair guidance
Document collections
Edge collections
Schema + constraint metadata
Migration artefacts
Stable Zig ABI for runtimes (no C dependency)
Opaque handles + byte buffers + explicit error codes
Marshalling only; no business logic duplication
Uses
callconv(.C)for FFI compatibility without requiring C toolchain
GQL minimal subset for PoC
Planner steps introspection
Constraint explanation surfaces
Provenance surfaces
Automatic functional dependency discovery (DFD/TANE/FDHits)
Type encoding of FDs in GQL-DT
Normal form predicates (1NF through BCNF)
Proof-carrying schema evolution
Narrative explanations for all normalization decisions
These are non-negotiable guarantees:
| Truth Ownership | On-disk truth is owned by the block/journal layer; higher layers do not bypass it. |
| Journal-First | Every mutating operation is journaled before being considered committed. |
| Reversibility | Every committed operation MUST have a defined inverse OR be explicitly marked irreversible-with-story. |
| Renderability | Blocks and journal entries MUST be renderable deterministically into human/agent-readable form. |
| Provenance | All query results can optionally include provenance pointers to journal and blocks. |
| Constraints as Ethics | Constraints are explainable: rejections must return reasons + pointers + narrative rationale. |
GQL is the query language for Lithoglyph—the native query interface for this narrative-first database. The name "Glyph Query Language" reflects the stone-carving metaphor: each query carves new glyphs (data) into permanence.
PoC subset capabilities:
INSERTdocument into collectionINSERTedge (from, to, type, props)SELECTwith simple predicatesEXPLAIN(returns plan + reasons)INTROSPECTschema/constraintsOptional provenance output
Be a drop-in Postgres replacement
Win microbenchmarks
Ship full distributed consensus in the first PoC
Single-node db open/close
Append-only journal with deterministic rendering
Document + edge insert/select
Constraint rejection returns explain payload
Migration artefact recorded + reversible
Golden test vectors pass
Seam checks (B↔M, M↔R, B↔R) pass at freeze
See .machine_readable/HANDOVER.a2ml for structured open questions with acceptance criteria:
Q-BLOCK-HEADER-001: Minimal block header layoutQ-JOURNAL-ENTRY-001: Minimal journal entry schemaQ-ABI-BLOBS-001: ABI blob encoding choiceQ-GQL-POC-001: GQL PoC grammarQ-CTRL-PLANE-001: Elixir/OTP introduction timing
Quickstart Guide - Get running in 5 minutes
Versioning & Stability - API stability guarantees
Changelog - Release history
Architecture - Technical architecture deep-dive
Roadmap - Development roadmap
Philosophy - Design philosophy and principles
.machine_readable/HANDOVER.a2ml - Machine-readable specification
GQL Specification - Query language reference
GQL Dependent Types - Compile-time verified queries
Self-Normalizing Database - Automatic FD discovery, proof-carrying schema evolution
Block Format - Storage layer specification
Journal Format - Audit log specification
Deployment Guide - Run Lithoglyph in production
Observability - Monitoring, logging, tracing
Security & Auth - Authentication and hardening
API Reference - Programmatic interfaces
Migration from RDBMS - Moving from PostgreSQL/MySQL
Integration Patterns - Queues, search, analytics
WP05 - Lithoglyph for Interactive Documentary/Journalism
GQL-DT - Dependently-typed GQL (same database, compile-time proofs)
Lithoglyph Studio - Zero-friction GUI for non-technical users
BoFIG - Evidence graph for investigative journalism
Zotero-Lithoglyph - Post-truth reference manager with PROMPT scores
Lithoglyph Debugger - Proof-carrying database debugger (Lean 4 + Idris 2)
FormBase - Open-source Airtable alternative with provenance
Code is MPL-2.0; documentation is CC-BY-SA-4.0. This is the estate canonical pair, set by nextgen-databases#48.
See CONTRIBUTING.adoc for guidelines.