tpt-aletheia
RustAn autonomous, closed-loop Rust epistemic engine that hypothesizes, formally verifies, fabricates, measures, and rewrites its own physics models — no LLM, no network, no human in the loop.
Languages
tpt-aletheia
An autonomous, closed-loop epistemic engine for scientific discovery and material synthesis.
tpt-aletheia is a fully autonomous, self-contained scientific singularity. It does not
simulate reality — it forces reality to reconcile with its own mathematics. Operating with
no external LLM calls and no network access for core logic, it runs a continuous loop:
hypothesize → formally verify → compile to fabrication → execute → measure → rewrite its own physics
It proposes novel physical and material states, mathematically proves their stability, compiles those proofs into deterministic hardware instructions, executes the synthesis via a pluggable Hardware Abstraction Layer (HAL), ingests physical telemetry, computes the epistemic error vector, and rewrites its own internal physics models from empirical reality.
The Aletheia Loop
The system is divided into five strictly-typed, internally isolated subsystems that form a single unbroken loop:
┌───────────────────────────────────────────────────────────┐
│ ▼
episteme ──▶ nous ──▶ logos ──▶ demiurge ──▶ aisthesis ──▶ (back to episteme)
(knowledge) (hypothesis)(verify) (fabricate) (telemetry/reconcile)
| Crate | Role |
|---|---|
tpt-aletheia-core | Shared, #![no_std]-compatible vocabulary: hypotheses, proofs, fabrication directives, lattices. |
tpt-aletheia-episteme | Zero-allocation-hot-path knowledge substrate: an event-sourced hypergraph of axioms, hypotheses, and experiments. |
tpt-aletheia-logos | Self-contained formal verification kernel (no external SMT solver; bounded rule-based proof search). |
tpt-aletheia-nous | Generative hypothesis engine: symbolic regression, evolutionary topology search, constrained random-walk. |
tpt-aletheia-demiurge | Fabrication compiler: verified hypotheses → deterministic hardware directives via a pluggable HAL. |
tpt-aletheia-aisthesis | Telemetry ingestion and epistemic reconciliation: sensors, error-vector computation, axiom rewriting. |
tpt-aletheia-orchestrator | Orchestration binary that drives one full loop iteration (and runs the simulated end-to-end test). |
A single iteration
- Gap identification —
epistemeidentifies a need (e.g. higher thermal conductivity at lower mass). - Hypothesis generation —
nousproposes a novel lattice / composition / geometry exploiting the gap. - Formal proof —
logosverifies thermodynamic and structural stability under bounded computation. - Physical compilation —
demiurgecompiles the verified structure into aFabricationDirectivestream. - Execution — the HAL executes the directives; matter is synthesized.
- Sensory polling —
aisthesismeasures the result at high frequency. - Reconciliation — if the epistemic error vector exceeds epsilon,
aisthesisrewritesepisteme's correction axioms. The loop restarts with a more accurate model of reality.
Workspace layout
tpt-aletheia/
├── Cargo.toml # workspace manifest (members, shared package metadata, lints)
├── rustfmt.toml
├── spec.txt # original design document
├── TODO.md # implementation tracking checklist
├── tpt-aletheia-core/ # shared types (no_std)
├── tpt-aletheia-episteme/ # knowledge substrate
├── tpt-aletheia-logos/ # verification kernel
├── tpt-aletheia-nous/ # hypothesis engine
├── tpt-aletheia-demiurge/ # fabrication compiler
├── tpt-aletheia-aisthesis/ # telemetry & reconciliation
└── tpt-aletheia-orchestrator/# loop driver / binary
Building & running
Requires a recent stable Rust toolchain (cargo / rustc ≥ 1.97).
# Build everything
cargo build --workspace
# Run the full simulated loop
cargo run -p tpt-aletheia-orchestrator
# Run the test suite (unit, property-based, and full-loop integration)
cargo test --workspace
# Lint
cargo clippy --workspace --all-targets -- -D warnings
# Format check
cargo fmt --all -- --check
The default build uses the simulated HAL and sensor backends, so the whole loop runs
without any physical hardware. The persistent feature (on by default for episteme)
enables an embedded sled event-log store; disable it for an in-memory substrate.
CLI & examples
The orchestrator binary accepts tunable flags (no recompile needed):
cargo run -p tpt-aletheia-orchestrator -- \
--iterations 20 --seed 0xCAFE --epsilon 0.005 \
--persistent ./aletheia_store # optional: persist learned corrections
Run the per-crate examples to learn the extension points:
cargo run -p tpt-aletheia-core --example lattice_predict
cargo run -p tpt-aletheia-nous --example generate
cargo run -p tpt-aletheia-demiurge --example custom_hal
cargo run -p tpt-aletheia-aisthesis --example custom_sensor
cargo run -p tpt-aletheia-episteme --example persist -- ./aletheia_store
These demonstrate the main extension points: defining candidate lattices
(core), steering the hypothesis engine (nous), implementing a custom
Hardware Abstraction Layer (demiurge), and implementing a custom sensor
(aisthesis).
Design principles
- No external dependencies for intelligence. No LLM calls, no SMT solver, no network.
- Allocation-free hot path.
episteme's prediction path uses only stack-allocated state. #![no_std]readiness.coreisno_std-compatible for edge-sensor integration.- Fail loud, learn fast. Anything
logoscannot prove is rejected and fed back tonous; anythingaisthesismeasures as wrong rewrites the axioms.
Scope & roadmap
Implemented: the full closed loop against simulated hardware, unit/property/integration tests, and a hot-path benchmark.
Future work (see TODO.md): real HAL backend (CNC / robotic / fluidic), real ADC
sensor integration, air-gapped hardening, and a #![no_std] edge-sensor target.
License
Licensed under either of MIT or Apache-2.0, at your option.
- MIT: see
LICENSE-MIT - Apache-2.0: see
LICENSE-APACHE-2.0
Every crate manifest declares license = "MIT OR Apache-2.0" (SPDX), inhereted
from the workspace package metadata. Unless you explicitly state otherwise, any
contribution you submit is understood to be dual-licensed under these terms.
Maintained by the tpt-aletheia contributors.