Zenith Logic Foundry

zlf

Zenith Logic Foundry

Forge Grounded Wisdom, Mapped To You.

解答世间万物

zlf is a WAM-backed Prolog graph database for building AI-native knowledge bases. It stores graph facts persistently, evaluates queries and rules through a single Prolog runtime, and supports retrieval over the resulting knowledge graph.

What it provides

Quick start

Build the CLI:

cargo build --release

Open a database in the Prolog REPL:

target/release/zlf repl ./zlf-db

Documentation

The usage guide is the directory page for the docs:

Track and design records live under docs/track/; outdated material lives under docs/archive/.

Architecture

CLI / HTTP server / REPL
  -> WAM Prolog runtime
  -> storage-backed facts, compiled rules, and indexes
  -> RocksDB

zlf-codeindex (code indexing)
  -> Tree-sitter parsers (10 languages)
  -> discovery / blob store / lifecycle
  -> canonical code graph (provenance, certainty)
  -> bounded traversal + BM25 symbol search
  -> CodeQuery AST (Prolog + JSON/HTTP)

Development

cargo fmt --all
python3 scripts/check-rust-size.py
cargo clippy --workspace --all-targets -- -D warnings -W clippy::too_many_lines
cargo test --workspace

License

MIT OR Apache-2.0