Steward: Contract-driven governance engine for AI systems

โš“ Rust    ๐Ÿ“… 2025-12-21    ๐Ÿ‘ค surdeus    ๐Ÿ‘๏ธ 7      

surdeus

I'm sharing Steward, an open-source governance engine for evaluating AI outputs against human-authored contracts.

The goal: deterministic, traceable verdicts (PROCEED / ESCALATE / BLOCKED) with evidence-backed accountability.

Crate structure:

steward-core โ†’ Deterministic evaluation (zero LLM calls)
steward-runtime โ†’ Optional async LLM orchestration
steward-cli โ†’ Pipe-friendly CLI

Key design decisions:

  1. Parallel lenses with tokio::join! โ€” Five independent evaluators fan-out, synthesizer fans-in. Each lens implements a Lens trait; runtime uses LensAgent (async). Reasonable pattern or overengineered?
  2. BTreeMap for determinism โ€” All config maps use BTreeMap + LensType derives Ord to guarantee iteration order. Worth the overhead vs IndexMap?
  3. ProviderFactory trait for LLM providers โ€” Dynamic registration via ProviderRegistry instead of a ProviderType enum. Adds complexity but avoids enum bloat as providers grow.
  4. Hard boundary: no LLM in steward-core โ€” The synthesizer is a strict policy machine. All LLM assistance lives in steward-runtime. Is this separation clear from the API?
  5. Fallback chain โ€” On LLM failure: Cache โ†’ Simpler Model โ†’ Deterministic (core) โ†’ Escalate. Configured via Vec. Suggestions on the pattern?

Also includes:

  • Python bindings (PyO3/maturin)
  • Node.js bindings (napi-rs)
  • Domain packs: healthcare, finance, legal, education, HR

Repo: Steward GitHub

This is a work in progressโ€”contributors welcome.
Happy to receive any feedback.
Thank you!

1 post - 1 participant

Read full topic

๐Ÿท๏ธ Rust_feed