tpt-aletheia

Rust

An 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.

0 stars0 forks0 watchers2 open issuesApache License 2.0

Languages

Rust100.0%
README

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)
CrateRole
tpt-aletheia-coreShared, #![no_std]-compatible vocabulary: hypotheses, proofs, fabrication directives, lattices.
tpt-aletheia-epistemeZero-allocation-hot-path knowledge substrate: an event-sourced hypergraph of axioms, hypotheses, and experiments.
tpt-aletheia-logosSelf-contained formal verification kernel (no external SMT solver; bounded rule-based proof search).
tpt-aletheia-nousGenerative hypothesis engine: symbolic regression, evolutionary topology search, constrained random-walk.
tpt-aletheia-demiurgeFabrication compiler: verified hypotheses → deterministic hardware directives via a pluggable HAL.
tpt-aletheia-aisthesisTelemetry ingestion and epistemic reconciliation: sensors, error-vector computation, axiom rewriting.
tpt-aletheia-orchestratorOrchestration binary that drives one full loop iteration (and runs the simulated end-to-end test).

A single iteration

  1. Gap identificationepisteme identifies a need (e.g. higher thermal conductivity at lower mass).
  2. Hypothesis generationnous proposes a novel lattice / composition / geometry exploiting the gap.
  3. Formal prooflogos verifies thermodynamic and structural stability under bounded computation.
  4. Physical compilationdemiurge compiles the verified structure into a FabricationDirective stream.
  5. Execution — the HAL executes the directives; matter is synthesized.
  6. Sensory pollingaisthesis measures the result at high frequency.
  7. Reconciliation — if the epistemic error vector exceeds epsilon, aisthesis rewrites episteme'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. core is no_std-compatible for edge-sensor integration.
  • Fail loud, learn fast. Anything logos cannot prove is rejected and fed back to nous; anything aisthesis measures 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.

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.