Skip to content

Commit 99271a9

Browse files
claudehyperpolymath
authored andcommitted
docs(krl): sharpen four-op glosses, add Retrieve clause + QL-deferral ADR
- README 'four KRL operations': add the four-verb glosses (construct/ transform/resolve/retrieve) and a Retrieve clause stating Retrieve recovers resolution-relevant artefacts (presentations, invariants, witnesses, equivalence classes, prior resolutions, explanations, provenance) and is NOT arbitrary database querying; generic access is an engine-layer affordance. - docs/decisions/0002-query-language-deferred.adoc: ADR recording that querying stays a mode of KRL; a sibling query language is deferred (not rejected) behind an explicit trigger list, and if built will be a KRL-family projection/reporting dialect over TangleIR, not a rival paradigm. - CITATION.cff: authorship/citation metadata (anti-commoditisation provenance). - ROADMAP: fix placeholder title; point Future Directions at the ADR. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017TXizM5c1Yd9HWf7Y15YH2
1 parent c8874ee commit 99271a9

4 files changed

Lines changed: 159 additions & 4 deletions

File tree

CITATION.cff

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# SPDX-License-Identifier: MPL-2.0
2+
# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
3+
cff-version: 1.2.0
4+
message: "If you use KRL (Knot Resolution Language), please cite it as below."
5+
title: "KRL — Knot Resolution Language"
6+
abstract: >-
7+
KRL is QuandleDB's canonical resolution DSL: a database-facing language whose
8+
domain is knot/tangle identity, equivalence, transformation, and disambiguation.
9+
It is the user- and author-facing language for constructing, transforming,
10+
resolving, and retrieving knot/tangle presentations, invariants, witnesses,
11+
equivalence classes, and disambiguation results, lowering through TangleIR into
12+
Tangle-level computation over the QuandleDB and Skein.jl backends.
13+
type: software
14+
authors:
15+
- family-names: Jewell
16+
given-names: "Jonathan D. A."
17+
email: j.d.a.jewell@open.ac.uk
18+
alias: hyperpolymath
19+
license: MPL-2.0
20+
repository-code: "https://github.com/hyperpolymath/krl"
21+
url: "https://github.com/hyperpolymath/krl"
22+
keywords:
23+
- knot theory
24+
- resolution language
25+
- knot identity
26+
- equivalence
27+
- disambiguation
28+
- domain-specific language

README.adoc

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,18 @@ KRL is *not* responsible for:
9494

9595
== The four KRL operations
9696

97+
KRL has exactly four operations. The four-verb shape is deliberate: it stops
98+
"querying" from becoming the whole identity of the language.
99+
100+
[horizontal]
101+
*construct*:: create or declare presentations, structures, claims, datasets
102+
*transform*:: rewrite, normalize, compose, concatenate, permute, mutate
103+
*resolve*:: decide / disambiguate / evaluate equivalence or identity questions
104+
*retrieve*:: inspect, fetch, project, explain, or return stored or computed results
105+
97106
[cols="1,2,1,2"]
98107
|===
99-
|Operation |Knot concept |Repo |Example syntax
108+
|Operation |Knot concept |Primary site |Example syntax
100109

101110
|*Construct* |Tangles, ports, composition, tensor |TanglePL
102111
|`compose sigma1 sigma1` +
@@ -113,11 +122,26 @@ KRL is *not* responsible for:
113122
`classify t` +
114123
`near t`
115124

116-
|*Retrieve* |Jones/Alexander invariants, indexed store |Skein.jl
125+
|*Retrieve* |Invariants, witnesses, stored resolutions |Skein.jl + QuandleDB
117126
|`find where jones = p` +
118127
`where crossing < 8`
119128
|===
120129

130+
[NOTE]
131+
====
132+
*Retrieve is not arbitrary database querying.* It recovers
133+
*resolution-relevant artefacts*: presentations, invariants, witnesses,
134+
equivalence classes, prior resolutions, explanations, and provenance.
135+
136+
Generic data access — arbitrary filters, dashboards, reporting, analytics,
137+
exploratory search, index tuning — is an *engine-layer* affordance (Skein.jl
138+
predicates over SQLite; QuandleDB's filtered endpoints), deliberately *not*
139+
elevated to a KRL operation or a rival query language. A separate query
140+
language is *deferred*, not absent; see
141+
`docs/decisions/0002-query-language-deferred.adoc` for the rationale and
142+
trigger conditions.
143+
====
144+
121145
== Grammar (sketch)
122146

123147
----

ROADMAP.adoc

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// SPDX-License-Identifier: MPL-2.0
22
// Copyright (c) Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
3-
= YOUR Template Repo Roadmap
3+
= KRL Roadmap
44

55
== Current Status
66

@@ -20,4 +20,11 @@ Initial development phase.
2020

2121
== Future Directions
2222

23-
_To be determined based on community feedback._
23+
* *Query language: deferred.* Querying stays a mode of KRL (the `retrieve`
24+
operation), not a sibling language. A separate query language is deferred until
25+
sustained non-resolution operations accrue — dashboards, arbitrary filters,
26+
administrative analytics, bulk reporting, exploratory search, index tuning. If
27+
built, it will be a KRL-family projection/reporting dialect compiling to TangleIR,
28+
not a rival paradigm. See `docs/decisions/0002-query-language-deferred.adoc`.
29+
30+
_Otherwise to be determined based on community feedback._
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
// SPDX-License-Identifier: MPL-2.0
2+
// Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
3+
= Architecture Decision Record: 0002-query-language-deferred
4+
<!-- SPDX-License-Identifier: MPL-2.0 -->
5+
<!-- Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk> -->
6+
7+
# 2. Query language deferred — querying stays a mode of KRL
8+
9+
Date: 2026-06-18
10+
11+
## Status
12+
13+
Accepted
14+
15+
## Context
16+
17+
KRL is a *resolution language*, not a query language. Its identity is the four
18+
operations — *construct*, *transform*, *resolve*, *retrieve* — and the four-verb
19+
shape is deliberate: it stops "querying" from becoming the whole identity of the
20+
language.
21+
22+
A recurring pressure works against this:
23+
24+
- Databases are *expected* to ship a query language; its apparent absence reads as
25+
"toy" to evaluators arriving with SQL / Cypher / AQL muscle memory.
26+
- The *retrieve* operation, by name, can drag readers back toward "query language".
27+
- There is a genuine future need for non-resolution data operations: dashboards,
28+
arbitrary filters, administrative analytics, bulk reporting, exploratory search,
29+
index tuning.
30+
31+
But the two failure modes are asymmetric:
32+
33+
- *No query language* is a **messaging** problem — cheap, reversible, fixable with
34+
documentation.
35+
- *A premature, weak query language* is a **reputation** problem — it invites direct
36+
comparison with mature query languages on their own turf, where a young project
37+
loses, and first impressions in developer tooling are durable. A bounced evaluator
38+
is hard to win back.
39+
40+
Query *access* already exists at the engine/API layer (Skein.jl composable
41+
predicates over SQLite; QuandleDB's filtered HTTP endpoints). What is declined here
42+
is a *first-class, branded query language* that competes as a paradigm. Those are
43+
different things.
44+
45+
There is also a strategic-identity dimension. A capability framed as "a query
46+
sublanguage" is absorbable as a feature ("the next AQL add-in module"); a *named
47+
category* — resolution as a paradigm for equivalence / identity determination — is
48+
not. Keeping KRL a language rather than a query mode is therefore also how the work
49+
retains a distinct, attributable identity, especially if the broader bet (resolution
50+
as a general primitive for determining equivalent acts and things, including for AI)
51+
pays off.
52+
53+
## Decision
54+
55+
1. Querying remains a *mode of KRL* — the *retrieve* operation — not a first-class
56+
sibling language. No separate query language is built now.
57+
58+
2. *Retrieve* is defined narrowly. It recovers **resolution-relevant artefacts**:
59+
presentations, invariants, witnesses, equivalence classes, prior resolutions,
60+
explanations, and provenance. It is **not** arbitrary database querying.
61+
62+
3. Generic data access (arbitrary filters, dashboards, reporting, analytics,
63+
exploratory search, index tuning) is an *engine-layer* affordance (Skein.jl /
64+
SQLite; QuandleDB endpoints), deliberately not elevated to a KRL operation.
65+
66+
4. A separate query language is *deferred, not rejected*. It becomes warranted only
67+
when sustained non-resolution database operations accumulate — the trigger list:
68+
dashboards, arbitrary filters, administrative analytics, bulk reporting,
69+
exploratory search, index tuning.
70+
71+
5. *Pre-committed shape.* If/when that query language is built, it will be a
72+
*KRL-family projection / reporting dialect that compiles to the same TangleIR and
73+
engine* — one semantic core with a reporting surface — not an independent rival
74+
paradigm. This makes it structurally impossible for the future query language to
75+
be a "me-too" graph/relational language.
76+
77+
## Consequences
78+
79+
### Positive
80+
81+
- KRL leads from strength (resolution — where it has no competitor) rather than
82+
fighting established query languages on their turf.
83+
- The distinctive, attributable identity ("knot resolution", a named paradigm) is
84+
preserved against commoditisation.
85+
- No premature surface to poison first impressions.
86+
87+
### Negative
88+
89+
- Evaluators expecting a headline query language must be pointed at the engine-layer
90+
access path and the *retrieve* clause; the absence must be *explained*, not shipped
91+
around.
92+
93+
### Neutral
94+
95+
- The decision is revisited when the trigger conditions accrue; this ADR is then
96+
superseded by the ADR that specifies the deferred dialect.

0 commit comments

Comments
 (0)