This document provides guidelines and context for working with Claude Code on the ECHIDNA project.
ECHIDNA (Extensible Cognitive Hybrid Intelligence for Deductive Neural Assistance) is a trust-hardened neurosymbolic theorem proving platform supporting 48 prover backends with a comprehensive verification pipeline.
Repository: https://github.com/hyperpolymath/echidna Version: 2.1.0 License: PMPL-1.0-or-later
echidna/
├── src/
│ ├── rust/ # Rust core (48 provers, trust pipeline)
│ │ ├── provers/ # 30 prover backend implementations
│ │ ├── verification/ # Trust pipeline (portfolio, certificates, axioms, confidence, mutation, pareto, statistics)
│ │ ├── integrity/ # Solver binary integrity (SHAKE3-512, BLAKE3)
│ │ ├── executor/ # Sandboxed solver execution (Podman, bubblewrap)
│ │ ├── exchange/ # Cross-prover proof exchange (OpenTheory, Dedukti)
│ │ ├── dispatch.rs # Full trust-hardening dispatch pipeline
│ │ ├── agent/ # Agentic proof search (actor model)
│ │ ├── gnn/ # GNN integration (graph construction, embeddings, client, guided search)
│ │ ├── neural.rs # Neural premise selection (text-based, complements GNN)
│ │ ├── aspect.rs # Aspect tagging
│ │ ├── core.rs # Core types (Term, ProofState, Tactic, Goal)
│ │ ├── parsers/ # Proof file parsers
│ │ ├── ffi/ # Foreign function interface
│ │ ├── server.rs # HTTP API server
│ │ ├── repl.rs # Interactive REPL
│ │ ├── main.rs # CLI entry point
│ │ └── lib.rs # Library root
│ ├── interfaces/ # API interfaces (workspace members)
│ │ ├── graphql/ # GraphQL (async-graphql, port 8081)
│ │ ├── grpc/ # gRPC (tonic, port 50051)
│ │ └── rest/ # REST (axum + OpenAPI, port 8000)
│ ├── julia/ # Julia ML components
│ ├── rescript/ # ReScript+Deno UI (33 files)
│ └── mercury/ # Mercury/Logtalk logic (optional)
├── .machine_readable/ # SCM files (STATE.scm, META.scm, ECOSYSTEM.scm)
├── .github/workflows/ # 17 CI/CD workflows
├── Cargo.toml # Rust workspace root
├── Justfile # Primary build system
└── Containerfile # Podman container
- Code Quality: Maintain high code quality standards with proper error handling, tests, and documentation
- Git Workflow: Follow conventional commit messages and keep commits atomic
- Security: Be vigilant about security vulnerabilities
- Dependencies: Document all dependencies and their purposes
Follow conventional commit format:
feat:- New featuresfix:- Bug fixesdocs:- Documentation changesrefactor:- Code refactoringtest:- Adding or updating testschore:- Maintenance tasks
- Rust: Core logic, 48 prover backends, trust pipeline, CLI, REPL, API servers
- Julia: ML inference (tactic prediction, premise selection, port 8090)
- ReScript + Deno: UI components (33 files, zero TypeScript)
- Chapel: Optional parallel proof dispatch
- Interactive Proof Assistants: Agda, Coq/Rocq, Lean 4, Isabelle/HOL, Idris2, F*
- SMT Solvers: Z3, CVC5, Alt-Ergo
- Auto-Active Verifiers: Dafny, Why3
- Specialised: Metamath, HOL Light, Mizar, HOL4, PVS, ACL2, TLAPS, Twelf, Nuprl, Minlog, Imandra
- First-Order ATPs: Vampire, E Prover, SPASS
- Constraint Solvers: GLPK, SCIP, MiniZinc, Chuffed, OR-Tools
The v1.5 trust hardening added:
- Solver binary integrity verification (SHAKE3-512 + BLAKE3)
- SMT portfolio solving / cross-checking
- Proof certificate checking (Alethe, DRAT/LRAT, TSTP)
- Axiom usage tracking (4 danger levels: Safe, Noted, Warning, Reject)
- Solver sandboxing (Podman, bubblewrap, none)
- 5-level trust hierarchy for confidence scoring
- Mutation testing for specifications
- Prover dispatch pipeline
- Cross-prover proof exchange (OpenTheory, Dedukti)
- Pareto frontier computation for multi-objective proof search
- Statistical confidence tracking with Bayesian timeout estimation
src/rust/provers/mod.rs: ProverBackend trait, ProverKind enum (48 variants), ProverFactorysrc/rust/dispatch.rs: Full trust-hardening dispatch pipelinesrc/rust/verification/: Portfolio, certificates, axiom tracker, confidence, mutation, pareto, statisticssrc/rust/integrity/: Solver binary integrity (SHAKE3-512, BLAKE3)src/rust/executor/: Sandboxed solver executionsrc/rust/exchange/: OpenTheory, Dedukti proof exchangesrc/rust/core.rs: Core types (Term, ProofState, Tactic, Goal, Context, Theorem)src/rust/gnn/: GNN integration (graph construction, embeddings, inference client, guided search)src/rust/agent/: Agentic proof search (actor model)
Completed (v2.0.0):
- 48/48 prover backends across 10 tiers
- Trust & safety hardening (13 tasks complete)
- 638+ tests passing (528 unit + 38 integration + 21 property + interface)
- 3 API interfaces (GraphQL, gRPC, REST) with real prover backend invocation
- Agda meta-checker: 30+ formally verified trust pipeline properties
- Criterion benchmarks: 13 functions covering all critical paths
- FFI bridge: complete C-compatible API for all 48 provers
- Julia ML layer (logistic regression, MRR 0.66)
- 26 CI/CD workflows (including Agda meta-checker)
- Zig FFI layer (4 shared libraries)
- Idris2 ABI formal proofs (16 modules, zero believe_me)
- 0 clippy warnings, 0 compiler errors on stable Rust
v2.1 (GNN Integration):
- GNN proof graph construction (7 node kinds, 8 edge kinds)
- 32-dim local term embeddings + GNN inference client
- GNN-guided proof search (hybrid GNN + symbolic scoring)
- Julia /gnn/rank endpoint with cosine fallback
- Idris2 formal proofs: 7 GNN properties (0 believe_me)
- 28 new tests, 0 clippy warnings
Next (v2.2+):
- Train GNN/Transformer on larger corpus (Flux.jl)
- Chapel → Rust C FFI bridge
- Tamarin/ProVerif bridge
# Build System (Justfile is PRIMARY)
just build # Build the project
just test # Run tests (638+)
just check # Run all quality checkers
# Cargo commands
cargo build # Build Rust code
cargo test # Run all tests
cargo test --lib # Unit tests only (232)
cargo test --test integration_tests # Integration tests (38)
# Container Management (Podman, not Docker)
podman build -f Containerfile . # Build container
podman run echidna # Run container
# Quality Checks
cargo clippy # Rust lints
cargo fmt --check # Format check- NO PYTHON - use Julia for ML/data, Rust for systems, ReScript for apps
- RSR/CCCP Compliance Required - follow Rhodium Standard Repository guidelines
- Justfile PRIMARY - never use Make or other build systems
- Podman not Docker - always use Podman for containers
- License: PMPL-1.0-or-later (not AGPL, not dual MIT/Palimpsest)
- Author: Jonathan D.A. Jewell j.d.a.jewell@open.ac.uk
Last Updated: 2026-03-23 Maintained By: Jonathan D.A. Jewell j.d.a.jewell@open.ac.uk