Skip to content

Commit 95d5399

Browse files
hyperpolymathclaude
andcommitted
docs: corpus subsystem guide + 2026-04-28 ADR + 6a2 sync + Justfile recipes
Closing the documentation arc on the N-dim corpus push. Files: * `docs/CORPUS.md` — user-facing guide for the corpus subsystem: CLI surface, query DSL, octad shape, cross-prover semantics, limitations, end-to-end verified fixtures. * `docs/decisions/2026-04-28-corpus-and-design-search.md` — ADR-style record covering D1–D7: design problems vs tactic problems, SA → swarm progression, the honest-energy lesson, capability-first ordering, the 6-step N-dim plan, hashing-trick → GNN trade-off, Bennettian/Landauer caveat with the cross-reference to echo-types' own thermo work. * `.machine_readable/6a2/STATE.a2ml` — appended `[session-2026-04-28-corpus-and-design-search]` block recording commits, modules, CLI verbs, design-problems, recommendations, fixtures, test posture, remaining-open. The full proof-direction log lives there + in the ADR. * `.machine_readable/6a2/META.a2ml` — version 2.1.1 → 2.2.0, last-updated → 2026-04-28, completion 92% → 94%, phase line reflects the new corpus + design-search + swarm. * `.machine_readable/6a2/ECOSYSTEM.a2ml` — version 0.2.0 → 0.3.0; `verisimdb` upgraded from `planned-integration` to `active-integration` (octad emit verified); added `echo-types` as `active-consumer`, `januskey/reversible-core` as `planned-integration`, `jtv` and `eclexia` as `indexed`. * `.machine_readable/contractiles/intend/Intentfile.a2ml` — Purpose block extended with the corpus + 8-modality octad + design-search + swarm declaration so `intend` reflects current scope. * `.gitignore` — added `data/corpus/*.octads.jsonl` (regenerable from the JSON index via `corpus export-octads`). * `Justfile` — added `corpus-ingest-{agda,coq,lean,idris}`, `corpus-impact`, `corpus-near`, `corpus-cross`, `corpus-octads`, `design-search`, `design-swarm` recipes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 8265f9b commit 95d5399

8 files changed

Lines changed: 569 additions & 9 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,3 +199,4 @@ dist/
199199

200200
# Generated corpus indices (rebuilt with `echidna corpus ingest`)
201201
data/corpus/*.json
202+
data/corpus/*.octads.jsonl

.machine_readable/6a2/ECOSYSTEM.a2ml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
# ECOSYSTEM.a2ml — Ecosystem position for echidna
55

66
[metadata]
7-
version = "0.2.0"
8-
last-updated = "2026-04-11"
7+
version = "0.3.0"
8+
last-updated = "2026-04-28"
99
project = "echidna"
1010
ecosystem = "hyperpolymath"
1111

@@ -26,9 +26,13 @@ type = "component"
2626
projects = [
2727
{ name = "proven-servers (nesy-solver-api)", relationship = "consumer", notes = "nesy-solver-api calls /api/verify on echidna-nesy.flycast:8090. Cold-start grace 90s." },
2828
{ name = "hypatia", relationship = "sibling-neurosym", notes = "Hypatia performs neurosymbolic CI scanning; echidna does theorem proving. Both are Tier 2 formal verification tools." },
29-
{ name = "verisimdb", relationship = "planned-integration", notes = "Proof attempt results should feed VeriSimDB for longitudinal tracking." },
29+
{ name = "verisimdb", relationship = "active-integration", notes = "Corpus emits 8-modality octads (corpus/octad.rs) compatible with /api/v1/octads. Round-trip verified; HTTP push deferred." },
3030
{ name = "neural-foundations", relationship = "monorepo-satellite", notes = "echidna is mirrored as a submodule/satellite inside neural-foundations." },
3131
{ name = "maa-framework", relationship = "sibling", notes = "Absolute-zero and related MA/ML tools in same neurosymbolic tier." },
32+
{ name = "echo-types", relationship = "active-consumer", notes = "Echidna's design-search drove the Phase 1.3 _≤_ redesign + unbudgeted wf-<ᵇʳᶠ rank-function recommendations. Handoff document at echo-types/docs/echidna-design-search-2026-04-28.adoc. 640 entries indexed." },
33+
{ name = "januskey/reversible-core", relationship = "planned-integration", notes = "Bennettian reversibility substrate for the SA annealer trace ledger. Not yet wired." },
34+
{ name = "jtv (Lean 4)", relationship = "indexed", notes = "147 entries verified during Lean adapter rollout." },
35+
{ name = "eclexia (Idris 2 ABI)", relationship = "indexed", notes = "93 entries verified during Idris 2 adapter rollout." },
3236
]
3337

3438
[deployment]

.machine_readable/6a2/META.a2ml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,20 @@ full-name = "Extensible Cognitive Hybrid Intelligence for Deductive Neural Assis
88
author = "Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>"
99
license = "PMPL-1.0-or-later"
1010
standard = "RSR 2026"
11-
version = "2.1.1"
12-
last-updated = "2026-04-20"
11+
version = "2.2.0"
12+
last-updated = "2026-04-28"
1313
status = "active"
1414

1515
[project-context]
1616
name = "echidna"
17-
completion-percentage = 92
18-
phase = "v2.1.1 - Production Ready"
17+
completion-percentage = 94
18+
phase = "v2.2.0 — N-dim corpus + design-search + swarm landed"
19+
notes = """
20+
2026-04-28: corpus subsystem expanded into an N-dimensional / 8-
21+
modality / cross-prover index, with simulated-annealing design-search
22+
and 007 swarm dispatcher driving it. See docs/CORPUS.md and
23+
docs/decisions/2026-04-28-corpus-and-design-search.md.
24+
"""
1925

2026
[dependencies]
2127
primary = ["Rust", "Julia", "ReScript", "Idris2", "Zig"]

.machine_readable/6a2/STATE.a2ml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1112,3 +1112,77 @@ remaining-open = [
11121112
"Stage 1c extractor premise gaps (28/50, in-flight)",
11131113
"Stage 8 E10-E13 proofs + SPARK kernel (Opus design session needed)",
11141114
]
1115+
1116+
[session-2026-04-28-corpus-and-design-search]
1117+
date = "2026-04-28"
1118+
summary = """
1119+
Built the project-corpus indexer + simulated-annealing design-search +
1120+
007 swarm dispatcher + rank-function search, then expanded the corpus
1121+
into an N-dimensional / 8-modality / cross-prover index per the
1122+
VeriSim octad shape. Eleven commits in echidna; one in echo-types
1123+
(handoff document for the Phase 1.3 + unbudgeted wf-<ᵇʳᶠ proof
1124+
campaign).
1125+
"""
1126+
commits-pushed = [
1127+
"85c2b55 feat(corpus): project-corpus indexer + Agda adapter + ordinal/WF synonyms",
1128+
"ae68579 feat(learning): SA design-search — proof-design space, not tactic space",
1129+
"fca18d5 feat(agent): swarm dispatcher + SA energy refinement",
1130+
"ca56b96 feat(learning): rank-function search for unbudgeted wf-<ᵇʳᶠ_",
1131+
"e599868 feat(corpus): reverse-dep index — Step 1 of N-dim VeriSim plan",
1132+
"572b9b7 feat(corpus): Coq + Lean 4 + Idris 2 adapters; cross-prover semantic classes",
1133+
"8604909 feat(corpus): 8-modality octad emission — Step 3 of N-dim plan",
1134+
"3148d14 feat(corpus): tensor-octad metrics — Step 4 of N-dim plan",
1135+
"4558e61 feat(corpus): vector-octad embeddings — Step 5 of N-dim plan",
1136+
"8265f9b feat(corpus): multi-axis query DSL — N-dim plan capstone",
1137+
]
1138+
new-modules = [
1139+
"src/rust/corpus/{mod,agda,coq,lean,idris2,metrics,embed,octad,query}.rs",
1140+
"src/rust/learning/{design_search,buchholz_rank}.rs",
1141+
"src/rust/agent/swarm.rs",
1142+
]
1143+
new-cli-verbs = [
1144+
"echidna corpus ingest --root <path> --adapter <agda|coq|lean|idris2>",
1145+
"echidna corpus query <pattern> [--deps] [--reverse-deps] [--reverse-closure]",
1146+
"echidna corpus near \"<text>\" [--top N]",
1147+
"echidna corpus crossquery <semantic-class>",
1148+
"echidna corpus export-octads --index <X.json> --out <X.octads.jsonl>",
1149+
"echidna corpus import-octads --octads <X.octads.jsonl> --out <X.json>",
1150+
"echidna corpus stats [--index <X.json>]",
1151+
"echidna design search <problem> [--iterations N] [--top K]",
1152+
"echidna design swarm <problem> [--agents N] [--broadcast-every N]",
1153+
]
1154+
design-problems-available = [
1155+
"brouwer-leq — Phase 1.3 _≤_ redesign",
1156+
"buchholz-rank — unbudgeted wf-<ᵇʳᶠ rank function",
1157+
]
1158+
recommendations-issued = """
1159+
Phase 1.3: switch Ordinal.Brouwer._≤_ to a recursive definition.
1160+
Energy [0, 0, 1, 0]; SA + 4-agent swarm both unanimous.
1161+
1162+
Unbudgeted wf-<ᵇʳᶠ_: rank shape
1163+
rank bzero = oz
1164+
rank (bOmega ν) = ω-rank ν
1165+
rank (bplus x y) = rank x ⊕ rank y
1166+
rank (bpsi ν α) = psi-rank ν (rank α)
1167+
Energy [3, 0, 1]; three downstream blockers (Phase-2.2 rank-mono-<ᵇ,
1168+
⊕-mono-<-right twice). Closes via Subrelation.wellFounded chain.
1169+
1170+
Handoff document: echo-types/docs/echidna-design-search-2026-04-28.adoc
1171+
"""
1172+
verified-fixtures = [
1173+
"echo-types/proofs/agda — 57 modules / 640 entries (Agda)",
1174+
"echidna/proofs/coq — 5 modules / 108 entries (Coq)",
1175+
"jtv/jtv_proofs — 7 modules / 147 entries (Lean 4)",
1176+
"eclexia/src/abi — 4 modules / 93 entries (Idris 2)",
1177+
]
1178+
test-posture = "1059 lib tests pass (16 added). 0 failures, 2 ignored (pre-existing)."
1179+
remaining-open = [
1180+
"Apply recommendation to Agda — Phase 1.3 redesign + Σ-elim rewrite (multi-session)",
1181+
"Wire SA energy in learning/buchholz_rank::blockers to consume the corpus query DSL (~1d)",
1182+
"Reversibility integration with januskey/reversible-core::ContentStore for SA trace ledger",
1183+
"GNN embeddings via Julia /gnn/embed (deferred ML training column)",
1184+
]
1185+
new-docs = [
1186+
"docs/CORPUS.md — user-facing guide for the corpus subsystem",
1187+
"docs/decisions/2026-04-28-corpus-and-design-search.md — ADR record",
1188+
]

.machine_readable/contractiles/intend/Intentfile.a2ml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,17 @@ Declared intent and purpose for Echidna.
99
## Purpose
1010

1111
Echidna is a trust-hardened neurosymbolic theorem proving platform.
12-
It supports 48 prover backends, records every proof attempt to VeriSimDB,
13-
and feeds the Hypatia learning loop so the fleet gets smarter over time.
12+
It supports 128 prover backends, records every proof attempt to
13+
VeriSimDB, and feeds the Hypatia learning loop so the fleet gets
14+
smarter over time.
15+
16+
As of 2026-04-28, Echidna also operates a project-corpus indexer with
17+
adapters for Agda, Coq, Lean 4, and Idris 2; emits 8-modality
18+
declaration octads compatible with VeriSim's `/api/v1/octads`; and
19+
runs simulated-annealing design-search + 007-style swarm dispatchers
20+
over candidate axiomatisations and rank functions. See
21+
`docs/CORPUS.md` and `docs/decisions/2026-04-28-corpus-and-design-
22+
search.md`.
1423

1524
## Anti-Purpose
1625

Justfile

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -830,3 +830,48 @@ crg-badge:
830830
D) color="orange" ;; E) color="red" ;; F) color="critical" ;; \
831831
*) color="lightgrey" ;; esac; \
832832
echo "[![CRG $$grade](https://img.shields.io/badge/CRG-$$grade-$$color?style=flat-square)](https://github.com/hyperpolymath/standards/tree/main/component-readiness-grades)"
833+
834+
835+
# ────────────────────────────────────────────────────────────────────
836+
# Corpus + design-search (added 2026-04-28)
837+
# ────────────────────────────────────────────────────────────────────
838+
839+
# Ingest an Agda project into the corpus
840+
corpus-ingest-agda root:
841+
cargo run --bin echidna -- corpus ingest --root {{root}} --adapter agda
842+
843+
# Ingest a Coq project into the corpus
844+
corpus-ingest-coq root:
845+
cargo run --bin echidna -- corpus ingest --root {{root}} --adapter coq
846+
847+
# Ingest a Lean 4 project into the corpus
848+
corpus-ingest-lean root:
849+
cargo run --bin echidna -- corpus ingest --root {{root}} --adapter lean
850+
851+
# Ingest an Idris 2 project into the corpus
852+
corpus-ingest-idris root:
853+
cargo run --bin echidna -- corpus ingest --root {{root}} --adapter idris2
854+
855+
# Query the corpus by name with full reverse-dep impact set
856+
corpus-impact name index="data/corpus/agda.json":
857+
cargo run --bin echidna -- corpus query "{{name}}" --index {{index}} --reverse-closure
858+
859+
# Cosine-similarity nearest-neighbour query
860+
corpus-near query index="data/corpus/agda.json" top="10":
861+
cargo run --bin echidna -- corpus near "{{query}}" --index {{index}} --top {{top}}
862+
863+
# Cross-prover semantic-class lookup
864+
corpus-cross class:
865+
cargo run --bin echidna -- corpus crossquery {{class}}
866+
867+
# Export a JSON index as 8-modality octad JSONL (VeriSim-compatible)
868+
corpus-octads in="data/corpus/agda.json" out="data/corpus/agda.octads.jsonl":
869+
cargo run --bin echidna -- corpus export-octads --index {{in}} --out {{out}}
870+
871+
# Run the SA design-search on a named problem
872+
design-search problem="brouwer-leq" iterations="2000" top="10":
873+
cargo run --bin echidna -- design search {{problem}} --iterations {{iterations}} --top {{top}}
874+
875+
# Run the parallel-swarm design-search
876+
design-swarm problem="brouwer-leq" agents="4" iterations="800":
877+
cargo run --bin echidna -- design swarm {{problem}} --agents {{agents}} --iterations {{iterations}} --broadcast-every 50

0 commit comments

Comments
 (0)