image:[License,link="https://github.com/hyperpolymath/palimpsest-license"]
The database where the database is part of the story.
FormBD is a narrative-first, reversible, audit-grade database core. It treats schemas, constraints, migrations, blocks, and journals as narrative artefacts—the database is part of the story, not an opaque substrate.
Schemas, constraints, migrations, blocks, and journals are narrative artefacts. The database is part of the story, not an opaque substrate.
-
Investigative journalism
-
Governance/compliance
-
Agentic ecosystems + multi-repo handover
-
Long-term cultural/institutional archives
FormBD 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) │
│ FQL 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
-
FQL minimal subset for PoC
-
Planner steps introspection
-
Constraint explanation surfaces
-
Provenance surfaces
-
Automatic functional dependency discovery (DFD/TANE/FDHits)
-
Type encoding of FDs in FQL-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. |
FQL is the query language for FormBD—not a "forms" query language, but the native query interface for this narrative-first database.
PoC subset capabilities:
-
INSERTdocument into collection -
INSERTedge (from, to, type, props) -
SELECTwith simple predicates -
EXPLAIN(returns plan + reasons) -
INTROSPECTschema/constraints -
Optional provenance output
-
Be a drop-in Postgres replacement
-
Win microbenchmarks
-
Ship full distributed consensus in the first PoC
formbd/
├── spec/ # Format specs + rationale (AsciiDoc)
├── core-forth/ # Form.Blocks + Form.Model (truth core)
├── core-zig/ # Form.Bridge (ABI + port framing)
├── core-factor/ # Form.Runtime (FQL + introspection)
├── control-plane/ # Elixir/OTP gateway (optional)
├── tools/ # Render/inspect/doctor utilities
├── test-vectors/ # Golden bytes + golden renders
└── stories/ # Narrative examples + onboarding artefacts-
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 formbd.scm for structured open questions with acceptance criteria:
-
Q-BLOCK-HEADER-001: Minimal block header layout -
Q-JOURNAL-ENTRY-001: Minimal journal entry schema -
Q-ABI-BLOBS-001: ABI blob encoding choice -
Q-FQL-POC-001: FQL PoC grammar -
Q-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
-
formbd.scm - Machine-readable specification
-
FQL Specification - Query language reference
-
FQL 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 FormBD 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 - FormBD for Interactive Documentary/Journalism
-
FQLdt - Dependently-typed FQL (same database, compile-time proofs)
-
FormBD Studio - Zero-friction GUI for non-technical users
-
BoFIG - Evidence graph for investigative journalism
-
Zotero-FormBD - Post-truth reference manager with PROMPT scores
-
FormBD Debugger - Proof-carrying database debugger (Lean 4 + Idris 2)
-
FormBase - Open-source Airtable alternative with provenance
Palimpsest-MPL 1.0 (PMPL-1.0)
See CONTRIBUTING.adoc for guidelines.