Skip to content

Commit 92d06ce

Browse files
docs: CONTRIBUTING.adoc + CLAUDE.md + QUICKSTART-USER coherence (#170)
## Summary Three threads of perfective doc maintenance after #169 cleared the README + EXPLAINME drift: ### CONTRIBUTING (broken-link fix) `CONTRIBUTING.md` was a 3-line stub pointing to `CONTRIBUTING.adoc` — which did not exist in the repository. Every PR-template touchpoint returned 404 from that link. - New `CONTRIBUTING.adoc` — canonical contributor guide. Sections: what's accepted (per Lientz-Swanson maintenance category), what's not (RSR-H4 / H6 / H7 / H14 / H15 + ABI scan), commit + PR conventions, test surface, doc surface-ownership table, licence + SPDX, security pointer. - `CONTRIBUTING.md` rewritten as a thin Markdown pointer + one-screen orientation list so `.md`-preferring renderers get an immediate summary. ### CLAUDE.md (count + date defer) Had three mutually-disagreeing prover counts in one file (128 / 105 / 128), stale test counts (638+ / 528 / 232 / 38), a stale `Last Updated: 2026-03-23` footer, and a `Version: 2.3.0` header that disagreed with `Cargo.toml`'s `2.1.0`. - All specific counts deferred to `docs/PROVER_COUNT.md` (canonical tier table). - "Current Status" replaces the v1.5/v2.0/v2.1/v2.2 ladder with a by-area shape summary; release-keyed history defers to `CHANGELOG.md`. - Repository-structure block updated to mention `src/abi/`, `src/chapel/`, `src/zig_ffi/`, `.containerization/`, `.machine_readable/`. - Tech-stack list gained Idris2-ABI and Zig-FFI rows. - Licence line keeps the intentional MPL-2.0 doc stance verbatim (per `feedback_echidna_license_docs_mpl_intentional`). - "Useful Commands" gained the Idris2 ABI type-check, `just doctor / heal / tour`, and a pointer to `.containerization/Containerfile.wave3`. - `Last Updated` footer removed. ### QUICKSTART-USER.adoc Two `48 backends` mentions (header tagline + REPL example) re-routed to `docs/PROVER_COUNT.md`. ## Out of scope (deliberate) - LICENSE / SPDX header sweep — owner-managed. - `src/abi/` module-decl state — owner-managed. - `QUICKSTART-DEV.adoc`, `QUICKSTART-MAINTAINER.adoc`, `MAINTAINERS.adoc`, `CODE_OF_CONDUCT.md`, `SECURITY.md` — no count drift; left as-is. ## Test plan - [x] `grep -nE '48 backend|48 prover|128|105|Last Updated|2026-02-08|2026-03-23' QUICKSTART-USER.adoc QUICKSTART-DEV.adoc QUICKSTART-MAINTAINER.adoc CLAUDE.md` → no matches - [x] CONTRIBUTING.adoc renders in `gh pr view --web` (will verify after PR open) - [ ] CI on this PR
1 parent 6aff53b commit 92d06ce

4 files changed

Lines changed: 287 additions & 125 deletions

File tree

CLAUDE.md

Lines changed: 74 additions & 121 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,28 @@
11
# CLAUDE.md
22

3-
This document provides guidelines and context for working with Claude Code on the ECHIDNA project.
3+
Guidelines and context for working with Claude Code on the ECHIDNA project.
44

55
## Project Overview
66

7-
**ECHIDNA** (Extensible Cognitive Hybrid Intelligence for Deductive Neural Assistance) is a trust-hardened neurosymbolic theorem proving platform supporting 128 prover backends with a comprehensive verification pipeline.
7+
**ECHIDNA** (Extensible Cognitive Hybrid Intelligence for Deductive Neural Assistance) is a trust-hardened neurosymbolic theorem-proving platform with a polyglot backend surface and a comprehensive verification pipeline.
88

9-
**Repository**: https://github.com/hyperpolymath/echidna
10-
**Version**: 2.3.0 (see `CHANGELOG.md`; release-tag publication tracked in `docs/handover/TODO.md`)
11-
**License**: MPL-2.0
12-
**Architecture overview**: [`docs/ARCHITECTURE.md`](docs/ARCHITECTURE.md)
13-
**Canonical prover count**: [`docs/PROVER_COUNT.md`](docs/PROVER_COUNT.md) (128 total, 12 core)
14-
**Environment variables**: [`docs/ENV-VARS.md`](docs/ENV-VARS.md)
9+
- **Repository**: https://github.com/hyperpolymath/echidna
10+
- **Version + release history**: [`CHANGELOG.md`](CHANGELOG.md) (single source of truth; do not duplicate version strings elsewhere)
11+
- **License**: MPL-2.0
12+
- **Architecture overview**: [`docs/ARCHITECTURE.md`](docs/ARCHITECTURE.md)
13+
- **Canonical prover count + tier table**: [`docs/PROVER_COUNT.md`](docs/PROVER_COUNT.md)
14+
- **Environment variables**: [`docs/ENV-VARS.md`](docs/ENV-VARS.md)
15+
- **RSR / CCCP compliance statement**: [`RSR_COMPLIANCE.adoc`](RSR_COMPLIANCE.adoc)
16+
- **Receipts for README claims**: [`EXPLAINME.adoc`](EXPLAINME.adoc)
17+
- **Contributor guide**: [`CONTRIBUTING.adoc`](CONTRIBUTING.adoc)
1518

1619
## Repository Structure
1720

1821
```
1922
echidna/
2023
├── src/
21-
│ ├── rust/ # Rust core (128 provers, trust pipeline)
22-
│ │ ├── provers/ # 128 prover backend implementations
24+
│ ├── rust/ # Rust core + ProverKind enum + ProverFactory
25+
│ │ ├── provers/ # Per-backend ProverBackend impls (see docs/PROVER_COUNT.md for the tier table)
2326
│ │ ├── verification/ # Trust pipeline (portfolio, certificates, axioms, confidence, mutation, pareto, statistics)
2427
│ │ ├── integrity/ # Solver binary integrity (SHAKE3-512, BLAKE3)
2528
│ │ ├── executor/ # Sandboxed solver execution (Podman, bubblewrap)
@@ -40,13 +43,17 @@ echidna/
4043
│ │ ├── graphql/ # GraphQL (async-graphql, port 8081)
4144
│ │ ├── grpc/ # gRPC (tonic, port 50051)
4245
│ │ └── rest/ # REST (axum + OpenAPI, port 8000)
46+
│ ├── abi/ # Idris2 formal ABI (EchidnaABI.TacticRecord, …)
47+
│ ├── chapel/ # Optional parallel proof dispatch (--features chapel)
4348
│ ├── julia/ # Julia ML components
44-
│ └── rescript/ # ReScript UI (10 files — migration to AffineScript-TEA in progress)
45-
├── .machine_readable/ # A2ML metadata (STATE.a2ml, META.a2ml, ECOSYSTEM.a2ml, …)
46-
├── .github/workflows/ # 17 CI/CD workflows
49+
│ ├── rescript/, src/ui/ # UI — ReScript → AffineScript-TEA migration in flight
50+
│ └── zig_ffi/, ffi/zig/ # Zig FFI bridge (C-ABI surface for backends)
51+
├── .machine_readable/ # A2ML metadata, contractiles (MUST/ADJUST/TRUST/INTENT)
52+
├── .github/workflows/ # CI/CD workflows
53+
├── .containerization/ # Per-prover image tree (Containerfile.wave3)
4754
├── Cargo.toml # Rust workspace root
48-
├── Justfile # Primary build system
49-
└── Containerfile # Podman container
55+
├── Justfile # Primary build system (RSR-H14)
56+
└── Containerfile # Podman container (RSR-H15; do not use Dockerfile)
5057
```
5158

5259
## Working with Claude Code
@@ -72,28 +79,26 @@ Follow conventional commit format:
7279

7380
### Tech Stack
7481

75-
- **Rust**: Core logic, 128 prover backends, trust pipeline, CLI, REPL, API servers
76-
- **Julia**: ML inference (tactic prediction, premise selection, port 8090)
77-
- **AffineScript + Deno** (canonical; migration in progress from `src/rescript/`): UI served by Deno
78-
- **Chapel**: Optional parallel proof dispatch
82+
- **Rust**: Core logic, prover backends, trust pipeline, CLI, REPL, API servers
83+
- **Julia**: ML inference (tactic prediction, premise selection)
84+
- **Idris2**: Formal ABI specifications + totality proofs (`src/abi/`); zero `believe_me`, zero postulates, zero admits, enforced by `idris2-abi-ci.yml`
85+
- **Zig**: C-ABI FFI bridge (`ffi/zig/`, `src/zig_ffi/`)
86+
- **Chapel**: Optional parallel proof dispatch (`--features chapel`)
87+
- **AffineScript + Deno** (canonical UI target; ReScript components are being ported)
7988

80-
### Prover Support (105 Total - ALL IMPLEMENTED)
89+
### Prover Support
8190

82-
- **Interactive Proof Assistants**: Agda, Coq/Rocq, Lean 4, Isabelle/HOL, Idris2, F*
83-
- **SMT Solvers**: Z3, CVC5, Alt-Ergo
84-
- **Auto-Active Verifiers**: Dafny, Why3
85-
- **Specialised**: Metamath, HOL Light, Mizar, HOL4, PVS, ACL2, TLAPS, Twelf, Nuprl, Minlog, Imandra
86-
- **First-Order ATPs**: Vampire, E Prover, SPASS
87-
- **Constraint Solvers**: GLPK, SCIP, MiniZinc, Chuffed, OR-Tools
91+
Backend tiers, member lists, and the canonical answer to "how many provers?" all live in [`docs/PROVER_COUNT.md`](docs/PROVER_COUNT.md). The Tier-1 _core_ set is exposed by default through `GET /api/provers`; the rest are reachable via `ProverKind` and the dispatch pipeline. Do not duplicate counts in this file — they drift.
8892

8993
### Trust & Safety Pipeline
9094

91-
The v1.5 trust hardening added:
95+
The trust-hardening pipeline applies the following checks before any proof result leaves the dispatcher:
96+
9297
1. Solver binary integrity verification (SHAKE3-512 + BLAKE3)
9398
2. SMT portfolio solving / cross-checking
94-
3. Proof certificate checking (Alethe, DRAT/LRAT, TSTP)
99+
3. Proof certificate checking (Alethe, DRAT/LRAT, TSTP, Lean4 kernel, Coq kernel)
95100
4. Axiom usage tracking (4 danger levels: Safe, Noted, Warning, Reject)
96-
5. Solver sandboxing (Podman, bubblewrap, none)
101+
5. Solver sandboxing (Podman, bubblewrap, unsandboxed-with-explicit-opt-in)
97102
6. 5-level trust hierarchy for confidence scoring
98103
7. Mutation testing for specifications
99104
8. Prover dispatch pipeline
@@ -103,7 +108,7 @@ The v1.5 trust hardening added:
103108

104109
### Key Components
105110

106-
- `src/rust/provers/mod.rs`: ProverBackend trait, ProverKind enum (128 variants), ProverFactory
111+
- `src/rust/provers/mod.rs`: `ProverBackend` trait, `ProverKind` enum, `ProverFactory`
107112
- `src/rust/dispatch.rs`: Full trust-hardening dispatch pipeline
108113
- `src/rust/verification/`: Portfolio, certificates, axiom tracker, confidence, mutation, pareto, statistics
109114
- `src/rust/integrity/`: Solver binary integrity (SHAKE3-512, BLAKE3)
@@ -112,113 +117,61 @@ The v1.5 trust hardening added:
112117
- `src/rust/core.rs`: Core types (Term, ProofState, Tactic, Goal, Context, Theorem)
113118
- `src/rust/gnn/`: GNN integration (graph construction, embeddings, inference client, guided search)
114119
- `src/rust/agent/`: Agentic proof search (actor model)
120+
- `src/abi/EchidnaABI/`: Idris2 ABI specifications + totality proofs (TacticRecord, AxiomTracker, Gnn, Provers, CapnSchemas)
115121

116122
### Current Status
117123

118-
**Completed (v2.0.0)**:
119-
- 105/128 prover backends across 10 tiers
120-
- Trust & safety hardening (13 tasks complete)
121-
- 638+ tests passing (528 unit + 38 integration + 21 property + interface)
122-
- 3 API interfaces (GraphQL, gRPC, REST) with real prover backend invocation
123-
- Agda meta-checker: 30+ formally verified trust pipeline properties
124-
- Criterion benchmarks: 13 functions covering all critical paths
125-
- FFI bridge: complete C-compatible API for all 128 provers
126-
- Julia ML layer (logistic regression, MRR 0.66)
127-
- 26 CI/CD workflows (including Agda meta-checker)
128-
- Zig FFI layer (4 shared libraries)
129-
- Idris2 ABI formal proofs (16 modules, zero believe_me)
130-
- 0 clippy warnings, 0 compiler errors on stable Rust
131-
132-
**v2.1 (GNN Integration)**:
133-
- GNN proof graph construction (7 node kinds, 8 edge kinds)
134-
- 32-dim local term embeddings + GNN inference client
135-
- GNN-guided proof search (hybrid GNN + symbolic scoring)
136-
- Julia /gnn/rank endpoint with cosine fallback
137-
- Idris2 formal proofs: 7 GNN properties (0 believe_me)
138-
- 28 new tests, 0 clippy warnings
139-
140-
**Next (v2.2+)** (precise status):
141-
142-
- **Chapel → Rust C FFI bridge (L2.1 + L2.2 done; L2.3+ gated)**. Zig shim
143-
(`src/zig_ffi/`) and the rewritten Chapel metalayer (`src/chapel/`) sit
144-
behind `--features chapel`. L2.1 is wired: `ChapelParallelSearch`
145-
(`proof_search.rs`) is invoked by `dispatch.rs::verify_proof_parallel`
146-
and reachable on the live `/api/verify_parallel` route, with graceful
147-
sequential fallback. `just build-chapel-ffi && cargo build --features
148-
chapel` builds and links standalone; `cargo test --features chapel`
149-
passes including the chapel-gated `test_verify_proof_parallel_chapel_path`
150-
(7/7). L2.2 lands 2026-05-30 with the #133 rehabilitation arc: the
151-
`.chpl` sources now compile cleanly under chpl 2.3.0 / 2.8.0 (static
152-
library — apt Chapel ships `CHPL_LIB_PIC=none` only, dynamic awaits
153-
a PIC-runtime CI image), `chapel-ci.yml` chapel-build + zig-ffi are
154-
strict (no continue-on-error), `just chapel-build` / `chapel-smoke` /
155-
`chapel-test` recipes exist, and `parallelProofSearchSpeculative`
156-
ships first-success-wins atomic-CAS semantics next to the existing
157-
best-of `parallelProofSearch`. `proofs/agda/ParallelSoundness.agda`
158-
formalises the aggregation invariants (soundness, completeness,
159-
cancellation-safety) with zero postulate/admit/believe_me — see
160-
`docs/decisions/2026-05-30-chapel-rehabilitation.md` for the rollout
161-
decision. Build reproducibility was fixed 2026-05-18: `build.rs` now
162-
`rerun-if-changed` on the built Zig artifact (was order-dependent on
163-
recipe vs prior `cargo` run), and `build.zig` bundles compiler-rt (was
164-
failing the non-Zig link with `undefined symbol: __zig_probe_stack`).
165-
L2.3 (cancel-token through `tryProver` for mid-flight preemption) is
166-
the next sub-wave; L2.4 mutation parallelism / L2.5 multi-locale /
167-
L2.6 numeric hot paths / L2.7 bench remain hard-gated on L1 Cap'n
168-
Proto and (for L2.5) a cluster runtime — see `docs/handover/TODO.md`.
169-
Direct Rust↔Chapel goes through Zig (no shortcut path).
170-
171-
- **Train GNN/Transformer on larger corpus (Flux.jl, scaffold-only)**.
172-
Flux.jl is declared in `src/julia/Project.toml` and imported across
173-
9 files; ~1.4k LoC of training scaffolds exist
174-
(`train_advanced_models.jl`, `training/train.jl`,
175-
`models/neural_solver.jl`). **Never invoked on real data**:
176-
`models/neural/` does not exist, `models/model_metadata.txt` reads
177-
`0 words, 0 classes`, and `src/julia/api/gnn_endpoint.jl:40-114`
178-
falls back to cosine similarity when no trained model is found.
179-
Corpus ready: `training_data/` 553 MB, 66,674 proofs / 179,933 tactics
180-
across 16 prover systems — untouched.
181-
182-
Note: Tamarin (`provers/tamarin.rs`, 596 LoC, 5 tests) and ProVerif
183-
(`provers/proverif.rs`, 800 LoC, 8 tests) were previously listed under
184-
v2.2+ as "bridge" work — in fact both are already shipped real backends
185-
inside the 105 prover count. Remaining Wave-3 work for these is corpus
186-
fixtures (`.spthy` / `.pv` samples) and CI provisioning of upstream
187-
binaries, tracked in `docs/handover/TODO.md`.
124+
The authoritative status surface is [`CHANGELOG.md`](CHANGELOG.md) (released versions) plus the git log + open issues (in-flight work). Do not duplicate version-keyed status here — it drifts.
125+
126+
Shape, by area:
127+
128+
- **Trust pipeline**: solver integrity, certificate checking, axiom tracking, sandboxing, mutation testing, Pareto ranking, Bayesian confidence — wired into `dispatch.rs`.
129+
- **Idris2 ABI**: `EchidnaABI.TacticRecord` (fixed-point confidence, total-order proofs, in-range round-trip lemmas) + sibling modules; type-checked on every push by `idris2-abi-ci.yml`.
130+
- **GNN integration**: graph construction (7 node kinds, 8 edge kinds), 32-dim local term embeddings, GNN inference client, hybrid GNN + symbolic scoring, Julia `/gnn/rank` with cosine fallback.
131+
- **Chapel parallel layer (`--features chapel`)**: `ChapelParallelSearch` invoked by `dispatch.rs::verify_proof_parallel`; per-prover cwd/filename hooks in `tryProver`; L2.3 cancel-token preemption shipped; `parallelProofSearchSpeculative` (first-success-wins atomic-CAS) alongside best-of `parallelProofSearch`; `proofs/agda/ParallelSoundness.agda` formalises soundness, completeness, and cancellation-safety with zero postulate / admit / believe_me. L2.4+ (mutation parallelism, multi-locale, numeric hot paths, bench) gated on L1 Cap'n Proto and (for L2.5) a cluster runtime — see [`docs/handover/TODO.md`](docs/handover/TODO.md).
132+
- **Wave-3 container infrastructure**: per-prover images in `.containerization/Containerfile.wave3`; weekly cron in `container-ci.yml` runs stub-sentinel detection across all 8 Tier-3 cells.
133+
- **Julia ML layer**: logistic-regression tactic prediction shipped; Flux.jl scaffolds for GNN/Transformer training present but not yet trained on real data — corpus ready under `training_data/`.
134+
- **Migrations in flight**: ReScript → AffineScript-TEA (UI); npm → Deno (`echidna-playground`); CI workflow consolidation under the governance ruleset.
188135

189136
## Useful Commands
190137

191138
```bash
192-
# Build System (Justfile is PRIMARY)
139+
# Build System (Justfile is PRIMARY — RSR-H14)
193140
just build # Build the project
194-
just test # Run tests (638+)
141+
just test # Run tests
195142
just check # Run all quality checkers
143+
just doctor # Verify toolchain
144+
just heal # Auto-install missing tools
145+
just tour # Codebase tour
196146

197-
# Cargo commands
147+
# Cargo
198148
cargo build # Build Rust code
199149
cargo test # Run all tests
200-
cargo test --lib # Unit tests only (232)
201-
cargo test --test integration_tests # Integration tests (38)
202-
203-
# Container Management (Podman, not Docker)
204-
podman build -f Containerfile . # Build container
205-
podman run echidna # Run container
206-
207-
# Quality Checks
208-
cargo clippy # Rust lints
209-
cargo fmt --check # Format check
150+
cargo test --lib # Unit tests only
151+
cargo test --tests # Integration suites
152+
cargo bench # Criterion benchmarks
153+
cargo clippy # Rust lints
154+
cargo fmt --check # Format check
155+
156+
# Idris2 ABI
157+
idris2 --build src/abi/echidnaabi.ipkg # Type-check the ABI package
158+
159+
# Container Management (Podman, not Docker — RSR-H15)
160+
podman build -f Containerfile . # Minimal image
161+
podman run echidna # Run minimal image
162+
# Per-prover images live under .containerization/Containerfile.wave3
210163
```
211164

212165
## Critical Constraints
213166

214-
- **NO PYTHON** - use Julia for ML/data, Rust for systems, ReScript for apps
215-
- **RSR/CCCP Compliance Required** - follow Rhodium Standard Repository guidelines
216-
- **Justfile PRIMARY** - never use Make or other build systems
217-
- **Podman not Docker** - always use Podman for containers
218-
- **License**: MPL-2.0 (not AGPL, not dual MIT/Palimpsest)
219-
- **Author**: Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
167+
- **No Python** outside `salt/` (RSR-H4) — Julia for ML, Rust for systems, AffineScript/ReScript for UI.
168+
- **RSR / CCCP compliance** — see [`RSR_COMPLIANCE.adoc`](RSR_COMPLIANCE.adoc) for the full hard-rule list and out-of-template adaptations.
169+
- **Justfile primary** (RSR-H14) — Just is the build entry point; no Make.
170+
- **Podman not Docker** (RSR-H15) — always Podman; `Containerfile` (not `Dockerfile`); `.containerization/Containerfile.wave3` for per-prover images.
171+
- **License**: MPL-2.0 across the documentation surface (intentional doc stance; see [`feedback_echidna_license_docs_mpl_intentional`](https://github.com/hyperpolymath/echidna/issues?q=license) — historical drift on individual files is owner-managed and not reconciled in routine PRs).
172+
- **Author**: Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>.
220173

221174
---
222175

223-
**Last Updated**: 2026-03-23
224-
**Maintained By**: Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
176+
**Maintained by**: Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>.
177+
This file is kept count-free and date-free in prose; CHANGELOG.md and the git log carry the live timeline.

0 commit comments

Comments
 (0)