Skip to content

Commit a0df135

Browse files
Resite: finalise decisions + Codex execution handoff (#40)
## What Finalises the resite decisions and adds a **self-contained execution handoff** that an autonomous agent (e.g. a Codex instance) with org credentials can follow to move each database/language out of the coordination repo. This PR is **docs/coordination only** — no cross-repo moves happen here (my session's GitHub access is still scoped to `nextgen-databases`). ## Files - **`docs/migration/RESITE-CODEX-HANDOFF.adoc`** (new) — step-by-step command sheet: preconditions + STOP conditions, golden safety rules, the final mapping, and exact `git filter-repo` / `gh` commands for each repo (create-new vs reconcile-existing), the `verisim-modular-experiment` → `verisimdb` fold, the coordination-repo thinning PR, and a verification checklist + report template. - **`REGISTRY.adoc`** — finalised authoritative map. - **`docs/migration/RESITE-DATABASES-TO-OWN-REPOS.adoc`** — decisions marked resolved; points to the handoff for commands. ## Resolved decisions (baked in) - `verisim-core` → its own **`VerisimCore.jl`** (Julia-package pattern). - `verisim-modular-experiment` → **folded into `verisimdb`** as a standard feature (no longer an experiment). - `gnpl` → **standalone** (un-nest `gql-dt/` + `core-factor/gql/` now). - Existing canonical repos (`verisimdb`, `quandledb`, `vcl-ut`, `krl`) → **reconcile, never overwrite** (they already hold real history + open issues; the monorepo copies are stale duplicates). - References → **hybrid**: submodules for `verisimdb` + `lithoglyph`, registry links for the rest. ## Key safety design The handoff forbids force-pushing `main` of existing repos: each is extracted, **diffed against the live canonical repo**, and only PR'd via an `import/from-monorepo` branch if it has unique work. Nothing is deleted from the coordination repo until its destination is confirmed. ## Execution gate Running it needs the executing session to have access to: `verisimdb`, `quandledb`, `vcl-ut` (reconcile) and create rights for `lithoglyph`, `glyphbase`, `gnpl`, `nqc`, `VerisimCore.jl`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01W8DXRHQRBgxwSdDz8om287 --- _Generated by [Claude Code](https://claude.ai/code/session_01W8DXRHQRBgxwSdDz8om287)_ Co-authored-by: Claude <noreply@anthropic.com>
1 parent 8c26b8f commit a0df135

3 files changed

Lines changed: 267 additions & 70 deletions

File tree

REGISTRY.adoc

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,19 @@ repositories that own each database and each query language. `nextgen-databases`
1010
Registered in the estate clade registry: https://github.com/hyperpolymath/gv-clade-index
1111
(see `.machine_readable/CLADE.a2ml`).
1212

13+
Resite: decisions finalised; execution per
14+
`docs/migration/RESITE-DATABASES-TO-OWN-REPOS.adoc` (plan) and
15+
`docs/migration/RESITE-CODEX-HANDOFF.adoc` (step-by-step agent command sheet).
16+
1317
== Databases
1418

1519
[cols="1,2,1,2",options=header]
1620
|===
1721
| Database | Repository | Status | Query language (repo)
18-
| VeriSimDB (cross-modal consistency) | hyperpolymath/verisimdb | exists | VCL — in-repo (`verisimdb/src/vcl/`)
19-
| Lithoglyph (narrative-first) | hyperpolymath/lithoglyph | to create | GQL/GNPL — hyperpolymath/gnpl
22+
| VeriSimDB (cross-modal consistency) | hyperpolymath/verisimdb | exists (canonical) | VCL — nested in verisimdb
23+
| Lithoglyph (narrative-first) | hyperpolymath/lithoglyph | to create | GNPL — hyperpolymath/gnpl
2024
| Glyphbase (Lithoglyph web UI) | hyperpolymath/glyphbase | to create | —
21-
| QuandleDB (knot-theory) | hyperpolymath/quandledb | exists (stub) | KRL — hyperpolymath/krl
25+
| QuandleDB (knot-theory) | hyperpolymath/quandledb | exists (canonical) | KRL — hyperpolymath/krl
2226
|===
2327

2428
== Query languages
@@ -27,21 +31,26 @@ Registered in the estate clade registry: https://github.com/hyperpolymath/gv-cla
2731
|===
2832
| Language | Repository | Status | Notes
2933
| VCL (Verified Consonance Language) | (in hyperpolymath/verisimdb) | exists | Production; stays nested in verisimdb
30-
| VCL-UT (usage-tracked extension) | hyperpolymath/vcl-ut | exists | Maps to `typeql-experimental/`; standalone-vs-fold DECISION pending
34+
| VCL-UT (usage-tracked extension) | hyperpolymath/vcl-ut | exists (canonical) | Maps to `typeql-experimental/`; reconcile + delete copy
3135
| GNPL / GQL (Glyph query language) | hyperpolymath/gnpl | to create | From `lithoglyph/gql-dt/` + `lithoglyph/core-factor/gql/`
32-
| KRL (Knot query language) | hyperpolymath/krl | exists | Implementation not present in this monorepo
36+
| KRL (Knot query language) | hyperpolymath/krl | exists (canonical) | No KRL content in this monorepo
3337
| NQC (Nested Query Calculus) | hyperpolymath/nqc | to create | Already standalone in `nqc/` (Gleam)
3438
|===
3539

36-
== Undecided / research (see runbook)
40+
== VeriSim satellites
3741

3842
[cols="1,2",options=header]
3943
|===
4044
| Component | Disposition
41-
| `verisim-core/` (slim Julia identity-core) | Own repo `verisim-core` *or* fold into verisimdb — DECISION
42-
| `verisim-modular-experiment/` (research-experiment) | Move to a research repo *or* keep as a documented exception — DECISION
45+
| `verisim-core/` (slim Julia identity-core) | → own repo *hyperpolymath/VerisimCore.jl* (Julia-package pattern); create + push
46+
| `verisim-modular-experiment/` | → *folded into hyperpolymath/verisimdb* as a standard feature (no longer an experiment)
4347
|===
4448

49+
== Reference strategy (after extraction)
50+
51+
Hybrid: `verisimdb` and `lithoglyph` are git submodules of this coordination repo; every other
52+
repo is referenced by link from this registry.
53+
4554
== What belongs in *this* (coordination) repo
4655

4756
* Portfolio docs: `README.adoc`, `TOPOLOGY.md`, `ROADMAP.adoc`, `EXPLAINME.adoc`
Lines changed: 208 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,208 @@
1+
// SPDX-License-Identifier: MPL-2.0
2+
// Copyright (c) 2026 Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
3+
= Resite execution — Codex agent handoff
4+
:toc: left
5+
6+
Status: READY TO EXECUTE (pending repo access). Source repo baseline: `main`.
7+
8+
== Audience & how to use this
9+
You are an autonomous coding agent (e.g. Codex) executing the resite of the
10+
`hyperpolymath/nextgen-databases` *coordination repo*: every database / query language is
11+
being moved to its own repo so this repo becomes thin. This file is self-contained — follow
12+
it top to bottom. `REGISTRY.adoc` is the authoritative map; this file is the command sheet.
13+
14+
== Preconditions (verify first; STOP if unmet)
15+
. `gh` CLI authenticated to the `hyperpolymath` org with `repo` + repo-creation rights:
16+
`gh auth status` and `gh repo view hyperpolymath/verisimdb` must succeed.
17+
. `git filter-repo` installed: `git filter-repo --version`
18+
(install via `pipx install git-filter-repo`, `brew install git-filter-repo`, or distro pkg).
19+
. Write access to existing repos: `verisimdb`, `quandledb`, `vcl-ut`.
20+
. Create access for new repos: `lithoglyph`, `glyphbase`, `gnpl`, `nqc`, `VerisimCore.jl`.
21+
If any check fails, STOP and report exactly which access is missing. Do not work around it.
22+
23+
== Golden safety rules (do not violate)
24+
. *Never* `git push` to `main`/`master` of an *existing* repo. Existing repos
25+
(`verisimdb`, `quandledb`, `vcl-ut`) get an `import/from-monorepo` branch + PR only.
26+
. *Reconcile before delete*: never `git rm` a directory from the coordination repo until its
27+
destination demonstrably contains the content (diff clean or PR merged).
28+
. *One repo at a time*; verify each before moving on.
29+
. Operate on throwaway clones under `/tmp`, never on a working clone you intend to keep.
30+
. New repos: default visibility *public* (matches the org). Change to `--private` if told to.
31+
32+
== Final mapping (authoritative: REGISTRY.adoc)
33+
[cols="2,2,1,2",options=header]
34+
|===
35+
| Source (monorepo) | Destination | Exists? | Action
36+
| `nqc/` | hyperpolymath/nqc | create | extract as-is
37+
| `verisim-core/` | hyperpolymath/VerisimCore.jl | create | extract (Julia package)
38+
| `lithoglyph/glyphbase/` | hyperpolymath/glyphbase | create | un-nest
39+
| `lithoglyph/gql-dt/` + `lithoglyph/core-factor/gql/` | hyperpolymath/gnpl | create | un-nest (2 paths)
40+
| `lithoglyph/` (minus the two above) | hyperpolymath/lithoglyph | create | slimmed parent
41+
| `typeql-experimental/` | hyperpolymath/vcl-ut | exists | reconcile -> delete copy
42+
| `quandledb/` (stub) | hyperpolymath/quandledb | exists | reconcile -> delete copy
43+
| `verisimdb/` (incl. `src/vcl/`) | hyperpolymath/verisimdb | exists | reconcile -> delete copy; VCL stays nested
44+
| `verisim-modular-experiment/` | hyperpolymath/verisimdb | exists | FOLD IN as standard feature -> delete
45+
| (no KRL content here) | hyperpolymath/krl | exists | no-op
46+
|===
47+
48+
== Step 0 — setup
49+
[source,sh]
50+
----
51+
git filter-repo --version
52+
gh auth status
53+
git clone https://github.com/hyperpolymath/nextgen-databases /tmp/ngdb
54+
cd /tmp/ngdb && git rev-parse HEAD # record baseline SHA in your final report
55+
# sanity-check the un-nest subpaths exist before extracting:
56+
ls -d lithoglyph/glyphbase lithoglyph/gql-dt lithoglyph/core-factor/gql
57+
----
58+
59+
== Step 1 — create + populate NEW repos (no risk to existing)
60+
Do smallest first to prove the pattern. Generic single-path helper:
61+
[source,sh]
62+
----
63+
extract() { # $1 = subdir/ (trailing slash) $2 = /tmp workdir name
64+
rm -rf "/tmp/$2"
65+
git clone --no-local /tmp/ngdb "/tmp/$2"
66+
( cd "/tmp/$2" && git filter-repo --path "$1" --path-rename "$1:" )
67+
( cd "/tmp/$2" && git log --oneline -1 && echo "files: $(git ls-files | wc -l)" )
68+
}
69+
publish() { # $1 = /tmp workdir $2 = owner/repo $3 = description
70+
gh repo create "$2" --public --description "$3" --disable-wiki
71+
( cd "$1" && git remote add dest "https://github.com/$2.git" && git push dest HEAD:main )
72+
}
73+
----
74+
75+
=== 1a. nqc
76+
[source,sh]
77+
----
78+
extract nqc/ nqc
79+
publish /tmp/nqc hyperpolymath/nqc "NQC — Nested Query Calculus (Gleam)"
80+
----
81+
82+
=== 1b. VerisimCore.jl
83+
[source,sh]
84+
----
85+
extract verisim-core/ VerisimCore.jl
86+
publish /tmp/VerisimCore.jl hyperpolymath/VerisimCore.jl "VerisimCore.jl — slim Julia identity-core of VeriSimDB"
87+
----
88+
89+
=== 1c. glyphbase (un-nest)
90+
[source,sh]
91+
----
92+
extract lithoglyph/glyphbase/ glyphbase
93+
publish /tmp/glyphbase hyperpolymath/glyphbase "Glyphbase — Lithoglyph web UI / data layer"
94+
----
95+
96+
=== 1d. gnpl (un-nest, two source paths)
97+
[source,sh]
98+
----
99+
rm -rf /tmp/gnpl && git clone --no-local /tmp/ngdb /tmp/gnpl
100+
( cd /tmp/gnpl && git filter-repo \
101+
--path lithoglyph/gql-dt/ --path lithoglyph/core-factor/gql/ \
102+
--path-rename lithoglyph/gql-dt/:gql-dt/ \
103+
--path-rename lithoglyph/core-factor/gql/:core-factor-gql/ )
104+
publish /tmp/gnpl hyperpolymath/gnpl "GNPL — Glyph query language (dependently-typed)"
105+
----
106+
107+
=== 1e. lithoglyph (slimmed: drop the un-nested subdirs; two filter-repo passes)
108+
[source,sh]
109+
----
110+
rm -rf /tmp/lithoglyph && git clone --no-local /tmp/ngdb /tmp/lithoglyph
111+
( cd /tmp/lithoglyph \
112+
&& git filter-repo --path lithoglyph/ --path-rename lithoglyph/: \
113+
&& git filter-repo --invert-paths --path glyphbase/ --path gql-dt/ --path core-factor/gql/ )
114+
publish /tmp/lithoglyph hyperpolymath/lithoglyph "Lithoglyph — narrative-first, reversible, audit-grade database"
115+
----
116+
117+
== Step 2 — reconcile EXISTING repos (never clobber)
118+
For each, compare the monorepo copy against the live canonical repo, then decide.
119+
[source,sh]
120+
----
121+
reconcile() { # $1 = subdir/ $2 = owner/repo
122+
name="${2##*/}"
123+
rm -rf "/tmp/mono-$name"; git clone --no-local /tmp/ngdb "/tmp/mono-$name"
124+
( cd "/tmp/mono-$name" && git filter-repo --path "$1" --path-rename "$1:" )
125+
rm -rf "/tmp/canon-$name"; git clone "https://github.com/$2" "/tmp/canon-$name"
126+
echo "===== DIFF $1 vs $2 ====="
127+
diff -rq --exclude=.git "/tmp/mono-$name" "/tmp/canon-$name" || true
128+
}
129+
reconcile quandledb/ hyperpolymath/quandledb # stub here; expect canonical is ahead
130+
reconcile typeql-experimental/ hyperpolymath/vcl-ut
131+
reconcile verisimdb/ hyperpolymath/verisimdb
132+
----
133+
Decision per repo, from the diff:
134+
135+
* *No monorepo-unique content* (canonical already has it) -> nothing to push; mark
136+
"safe to delete" for Step 4.
137+
* *Monorepo has unique/newer content worth keeping* -> open an import PR (never push main):
138+
[source,sh]
139+
----
140+
cd /tmp/mono-<name>
141+
git remote add dest "https://github.com/hyperpolymath/<name>.git"
142+
git push dest HEAD:refs/heads/import/from-monorepo
143+
gh pr create --repo hyperpolymath/<name> --base main --head import/from-monorepo \
144+
--title "Import unique work from the nextgen-databases monorepo copy" \
145+
--body "Reconciles the stale monorepo duplicate before it is deleted from the coordination repo."
146+
----
147+
Mark "delete after this PR merges".
148+
149+
== Step 3 — fold modular-experiment into verisimdb
150+
The capability is being standardised (no longer an experiment). Bring it in via a feature
151+
branch + PR; do not create a separate repo.
152+
[source,sh]
153+
----
154+
rm -rf /tmp/mod && git clone --no-local /tmp/ngdb /tmp/mod
155+
( cd /tmp/mod && git filter-repo \
156+
--path verisim-modular-experiment/ --path-rename verisim-modular-experiment/:modular-core/ )
157+
cd /tmp/mod
158+
git remote add dest https://github.com/hyperpolymath/verisimdb.git
159+
git push dest HEAD:refs/heads/feature/modular-core
160+
gh pr create --repo hyperpolymath/verisimdb --base main --head feature/modular-core \
161+
--title "Standardise modular-core (from verisim-modular-experiment)" \
162+
--body "Folds the proven modular-experiment in as a standard verisimdb feature."
163+
----
164+
165+
== Step 4 — thin the coordination repo (one PR on nextgen-databases)
166+
Only after each destination above is confirmed (diff clean or PR merged).
167+
[source,sh]
168+
----
169+
cd /tmp/ngdb
170+
git checkout -b resite/thin-coordination
171+
git rm -r nqc verisim-core lithoglyph typeql-experimental verisim-modular-experiment quandledb verisimdb
172+
git submodule add https://github.com/hyperpolymath/verisimdb.git verisimdb
173+
git submodule add https://github.com/hyperpolymath/lithoglyph.git lithoglyph
174+
----
175+
Then edit, in this repo:
176+
177+
* `REGISTRY.adoc` — set every row to its final state / link.
178+
* `0-AI-MANIFEST.a2ml` — empty the LEGACY directory list (nothing legacy remains).
179+
* `EXPLAINME.adoc`, `TOPOLOGY.md`, `README.adoc` — describe the thin structure (submodules +
180+
registry links).
181+
* `.github/workflows/placement-guard.yml` — empty the `GRANDFATHER` regex so ANY database
182+
path is now a hard error (not a warning).
183+
* `.claude/hooks/block-db-writes.sh` — keep the dest map (for helpful messages) but the
184+
directories no longer exist, so any reintroduction is blocked outright.
185+
* `docs/migration/RESITE-DATABASES-TO-OWN-REPOS.adoc` — set `Status: DONE`.
186+
187+
[source,sh]
188+
----
189+
git add -A
190+
git commit -m "chore(resite): thin coordination repo to references; remove extracted databases"
191+
git push -u origin resite/thin-coordination
192+
gh pr create --base main --title "Resite: thin the coordination repo" \
193+
--body "Removes extracted databases (now in their own repos), adds verisimdb + lithoglyph as submodules, and points REGISTRY.adoc at the canonical repos. Closes the resite."
194+
----
195+
196+
== Verification (run before declaring done)
197+
* Each NEW repo: `git -C /tmp/<name> log --oneline -1` shows preserved history; the GitHub
198+
repo has files at root and an `0-AI-MANIFEST.a2ml`.
199+
* Each EXISTING repo: the Step-2 diff is empty, or the import PR is merged.
200+
* Coordination repo after Step 4:
201+
`git ls-tree HEAD verisimdb lithoglyph` shows `commit` (submodule) entries, not trees;
202+
`git ls-files | grep -E '^(nqc|verisim-core|typeql-experimental|quandledb|verisim-modular-experiment)/'`
203+
returns nothing; the placement-guard `GRANDFATHER` regex is empty;
204+
`git clone --recurse-submodules` of the coordination repo still yields verisimdb + lithoglyph.
205+
206+
== Final report (post this back)
207+
For every row in the mapping: action taken, destination URL, PR link (if any), and
208+
verification result. List anything skipped and why.

0 commit comments

Comments
 (0)