Skip to content

Commit 88bce1d

Browse files
hyperpolymathclaude
andcommitted
chore: absorb quandledb into monorepo + align with KRL stack
Per monorepo rule (no .git dirs in subdirs), flatten the nested quandledb git repo into nextgen-databases. Absorbed history summary: 6889ffc feat: quandle semantic sidecar + ABI/FFI stack (Idris2/Zig/V/BEAM) ce4490a fix: replace Obj.magic with typed Fetch API bindings in Api.res 0a20355 chore: batch RSR compliance 816272f docs: add KQL safety model — two-tier architecture with TypeLL levels cb1caa5 feat: KQL query language design — SQL compat + dependent type variants Contents: - Quandle semantic sidecar server with SQLite index over Skein.jl - QuandleSemantic module (presentation extraction + canonical hashing) - Idris2 ABI additions, Zig FFI layer, V-lang API triples, Elixir BEAM NIFs - 21 tests passing (9 extraction + 12 semantic integration) Also updates nextgen-databases README.adoc with KRL architecture map link and aligns QuandleDB description with Lithoglyph/Glyphbase naming. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent c94c8fb commit 88bce1d

108 files changed

Lines changed: 10524 additions & 133 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.adoc

Lines changed: 51 additions & 132 deletions
Original file line numberDiff line numberDiff line change
@@ -1,161 +1,80 @@
11
// SPDX-License-Identifier: PMPL-1.0-or-later
22
// Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
33

4-
= Next-Gen Databases
5-
:author: Jonathan D.A. Jewell
6-
:email: j.d.a.jewell@open.ac.uk
7-
:revdate: 2026-02-13
8-
:toc:
4+
= Next-Generation Databases
5+
Jonathan Jewell (hyperpolymath)
6+
:toc: left
7+
:toc-title: Contents
8+
:doctype: article
99
:icons: font
1010

11-
*Parent repository for tracking and coordinating database application development*
12-
13-
**IMPORTANT:** This is a **PARENT REPOSITORY ONLY** — it contains documentation and tracking but NO implementation code.
11+
link:../tangle/docs/krl_map.html[→ KRL architecture map (HTML)]
1412

1513
== Overview
1614

17-
This repository serves as the central tracking hub for the Next-Gen Databases initiative — a coordinated effort to build specialised database applications across different domains, each with its own query language, storage engine, and web interface.
15+
This category contains database systems built on mathematical foundations
16+
that go beyond the relational and document models.
17+
The common thread is _semantic identity_: each system represents objects in
18+
a way that captures structural and algebraic meaning, not just data fields.
1819

19-
**All database implementations are in their respective canonical repositories.**
20+
== Projects
2021

21-
== Database Portfolio
22+
=== QuandleDB
23+
Algebraic database using quandle structure as the semantic identity layer.
24+
Quandles provide a canonical fingerprint for equivalence classes under
25+
transformation, grounded in knot-theoretic coloring invariants.
2226

23-
[cols="1,2,2,2,1"]
24-
|===
25-
| Database | Description | Technology | Query Language | Status
26-
27-
| *VeriSimDB*
28-
| Cross-system entity consistency engine — 8 modalities (octad), drift detection, self-normalisation, formally verified queries. **Primary database project.** Operates as standalone database OR federation coordinator over existing databases (PostgreSQL, ArangoDB, Elasticsearch).
29-
| Rust (core) + ReScript (VQL parser) + Elixir (orchestration)
30-
| VQL (VeriSim Query Language) + VQL-DT (dependent types)
31-
| Active — beta
32-
33-
| *QuandleDB*
34-
| Knot-theory database — stores knots as Gauss codes, computes invariants (Jones polynomial, genus, Seifert circles), queries by topological properties. **Exploratory/research project**: a thought experiment in applying knot theory to database design, not yet intended as a production tool.
35-
| Julia (Skein.jl engine) + ReScript frontend
36-
| KQL (Knot Query Language) — in development
37-
| Exploratory
38-
39-
| *LithoGlyph*
40-
| Narrative-first, reversible, audit-grade database core for journalism, narrative arts, and media/comms. Working towards production but **secondary priority** to VeriSimDB. Long-term vision: intimate integration with portfolio tools (bofig, etc.) for journalism and PR applications.
41-
| Forth (storage) + Zig (bridge) + Factor (FQL) + Idris2 (proofs) + Lean 4 (normalizer)
42-
| GQL (Glyph Query Language) — planned
43-
| Active — on backburner
44-
45-
| *Glyphbase*
46-
| Web interface for LithoGlyph — browser-based search, visualisation, and annotation of glyph specimens
47-
| ReScript frontend + LithoGlyph API
48-
| (via LithoGlyph)
49-
| Planned
27+
Primary role in the KRL stack: semantic equivalence search and fingerprinting.
5028

51-
|===
29+
link:../quandle-db/README.adoc[→ QuandleDB documentation]
5230

53-
[NOTE]
54-
====
55-
**Project priorities:** VeriSimDB is the primary database engineering project, receiving active development focus. LithoGlyph is working towards production for specialist use in journalism and narrative arts, but is secondary priority while VeriSimDB matures. QuandleDB is a research exploration into knot theory's applications in database design — valuable for the mathematical insights but not positioned as a production tool at this stage.
31+
=== Skein.jl
32+
Persistence, indexing, and query layer for topological objects (tangles, knots, links).
33+
Stores canonical `TangleIR` objects, caches invariants, indexes by algebraic fingerprint,
34+
and maintains a rewrite-step graph for provenance and simplification tracking.
5635

57-
Lessons learned from VeriSimDB development (drift detection, formal verification, federation) will directly improve LithoGlyph when development focus returns to it.
58-
====
36+
Primary role in the KRL stack: the database engine.
5937

60-
== Architecture
38+
link:../skein-jl/README.adoc[→ Skein.jl documentation]
6139

62-
Each database in the portfolio follows a layered architecture:
40+
=== VeriSimDB / VanguardDB
41+
Self-normalising multimodal database with formal verification properties.
42+
Rust core, Elixir/OTP orchestration, Podman deployment.
6343

64-
----
65-
Query Language (DSL)
66-
67-
Database Engine (storage, indexing, computation)
68-
69-
HTTP API Server (JSON endpoints)
70-
71-
Web Frontend (ReScript SPA)
72-
----
44+
link:../verisimdb/README.adoc[→ VeriSimDB documentation]
7345

74-
=== Common Patterns
46+
=== Lithoglyph / Glyphbase / GQL
47+
Narrative-first database for documentary journalism.
48+
Dependent types extension; GQL (Glyph Query Language) front-end.
49+
Glyphbase is the web interface layer over Lithoglyph.
7550

76-
* *Engines* are domain-specific libraries (Julia, Rust, Elixir)
77-
* *APIs* expose JSON endpoints wrapping engine queries
78-
* *Frontends* are ReScript + React SPAs with TEA-style state management
79-
* *Query languages* are typed DSLs parsed with ReScript or domain-native parsers
80-
* *Databases* use SQLite or custom storage depending on domain needs
51+
link:../lithoglyph/README.adoc[→ Lithoglyph documentation]
8152

82-
== Satellite Repositories
53+
== Common Principles
8354

84-
[cols="1,1,2,1"]
85-
|===
86-
| Project | Repository | Description | Status
87-
88-
| QuandleDB
89-
| link:https://github.com/hyperpolymath/quandledb[quandledb]
90-
| Knot-theory database wrapping Skein.jl
91-
| Active
92-
93-
| Skein.jl
94-
| link:https://github.com/hyperpolymath/Skein.jl[Skein.jl]
95-
| Knot database engine (Julia library)
96-
| Active
97-
98-
| VeriSimDB
99-
| link:https://github.com/hyperpolymath/verisimdb[verisimdb]
100-
| Multimodal verification database
101-
| Active
102-
103-
| VeriSimDB Data
104-
| link:https://github.com/hyperpolymath/verisimdb-data[verisimdb-data]
105-
| Scan data ingestion pipeline
106-
| Active
107-
108-
| Lithoglyph
109-
| link:https://github.com/hyperpolymath/lithoglyph[lithoglyph]
110-
| Glyph and inscription database
111-
| Active
112-
113-
| Glyphbase
114-
| link:https://github.com/hyperpolymath/glyphbase[glyphbase]
115-
| Web frontend for Lithoglyph
116-
| Active
55+
* Mathematical objects as primary storage units, not rows
56+
* Structural and semantic fingerprinting for identity and deduplication
57+
* Equivalence as a first-class database concept, not a post-query computation
58+
* Invariant caches as indexed columns, not application-layer lookups
59+
* Provenance and rewrite history stored alongside objects
11760

118-
|===
61+
== Relationship to Next-Generation Languages
11962

120-
== Query Language Ecosystem
63+
The databases in this category are designed to be driven by the languages
64+
in `nextgen-languages`. In particular:
12165

122-
The database portfolio contributes three query languages to the link:https://github.com/hyperpolymath/nextgen-languages[nextgen-languages] portfolio:
66+
* *KRL* (Knot Resolution Language) is the surface language for QuandleDB and Skein.jl
67+
* *Eclexia* is the language for resource-constraint databases
68+
* *Phronesis* is the language for multi-agent ethical constraint systems
69+
70+
== Status
12371

12472
[cols="1,1,2"]
12573
|===
126-
| Language | Database | Status
127-
128-
| *KQL* (Knot Query Language)
129-
| QuandleDB
130-
| In development
131-
132-
| *VQL* (Verification Query Language)
133-
| VeriSimDB
134-
| ~40% complete
135-
136-
| *FBQL-DT* (FormDB Query Language)
137-
| FormDB
138-
| ~50% complete
74+
|Project |Status |Notes
13975

76+
|QuandleDB |Active — early stage |Quandle extraction and fingerprinting in progress
77+
|Skein.jl |Active — refactoring |Migrating to TangleIR as primary stored type
78+
|VeriSimDB |Active — design phase |Rust core skeleton in place
79+
|Lithoglyph |Specified |GQL grammar defined; implementation pending
14080
|===
141-
142-
== Documentation
143-
144-
* `.machine_readable/STATE.scm` — Project state and progress
145-
* `.machine_readable/META.scm` — Architecture decisions
146-
* `.machine_readable/ECOSYSTEM.scm` — Ecosystem relationships
147-
148-
== Contributing
149-
150-
Each database welcomes contributions. See individual satellite repositories for project-specific contribution guidelines.
151-
152-
== License
153-
154-
PMPL-1.0-or-later (Palimpsest Licence)
155-
156-
Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath)
157-
158-
159-
== Architecture
160-
161-
See link:TOPOLOGY.md[TOPOLOGY.md] for a visual architecture map and completion dashboard.

quandledb

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
;; SPDX-License-Identifier: PMPL-1.0-or-later
2+
;; .bot_directives — per-bot rules and constraints
3+
;; Media-Type: application/vnd.bot-directives+scm
4+
5+
(bot-directives
6+
(version "1.0")
7+
(notes
8+
"Repo-specific bot constraints."
9+
"Bots must follow these directives in addition to global policies."))
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
;; SPDX-License-Identifier: PMPL-1.0-or-later
2+
(bot-directive
3+
(bot "echidnabot")
4+
(scope "formal verification and fuzzing")
5+
(allow ("analysis" "fuzzing" "proof checks"))
6+
(deny ("write to core modules" "write to bindings"))
7+
(notes "May open findings; code changes require explicit approval"))
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
;; SPDX-License-Identifier: PMPL-1.0-or-later
2+
(bot-directive
3+
(bot "finishbot")
4+
(scope "release readiness")
5+
(allow ("release checklists" "docs updates" "metadata fixes"))
6+
(deny ("code changes without approval"))
7+
(notes "Focus on polish, licensing, and packaging"))
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
;; SPDX-License-Identifier: PMPL-1.0-or-later
2+
(bot-directive
3+
(bot "glambot")
4+
(scope "presentation + accessibility")
5+
(allow ("docs" "readme badges" "ui/accessibility suggestions"))
6+
(deny ("logic changes"))
7+
(notes "Edits limited to presentation layers"))
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
;; SPDX-License-Identifier: PMPL-1.0-or-later
2+
(bot-directive
3+
(bot "rhodibot")
4+
(scope "rsr-compliance")
5+
(allow ("metadata" "docs" "repo-structure checks"))
6+
(deny ("destructive edits without approval"))
7+
(notes "Auto-fix allowed only for formatting in docs and metadata"))
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
;; SPDX-License-Identifier: PMPL-1.0-or-later
2+
(bot-directive
3+
(bot "robot-repo-automaton")
4+
(scope "automated fixes")
5+
(allow ("low-risk automated edits"))
6+
(deny ("core logic changes without approval"))
7+
(notes "Only apply fixes backed by explicit rule approval"))
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
;; SPDX-License-Identifier: PMPL-1.0-or-later
2+
(bot-directive
3+
(bot "seambot")
4+
(scope "integration health")
5+
(allow ("analysis" "contract checks" "docs updates"))
6+
(deny ("code changes without approval"))
7+
(notes "May add integration test suggestions"))
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
;; SPDX-License-Identifier: PMPL-1.0-or-later
2+
(bot-directive
3+
(bot "sustainabot")
4+
(scope "eco/economic standards")
5+
(allow ("analysis" "reporting" "docs updates"))
6+
(deny ("code changes without approval"))
7+
(notes "Focus on measurement and recommendations"))

0 commit comments

Comments
 (0)