Skip to content

Jev directory

S1

A Rust derive layer for typed System One decisions: enums and structs become Choice, Score, and Noul questions with compile-time-checked, confidence-gated answers, plus a scriptable fake client for network-free tests.
Stars
1
Language
Rust
License
MIT
Reading time
3 min
Published by
Community
Author
AbdelStark
Last verified
Sep 2026

About this project

Typed System One decisions for Rust. Turn enums and structs into Choice, Score, and Noul questions. Get compile-time-checked, confidence-gated answers back. Add a Department::Legal variant and the match stops compiling until you handle it. A complete, network-free version of this snippet lives in examples/triage.rs and runs against s1-test::FakeClient. The typed layer is this git workspace (s1, s1-derive, s1-test). HTTP transport is the published typesafe-rs crate. From a checkout of this repo:

Quoted from the project's README. Read the full README.

Highlights

  • Derive macros turn enums into Choice and Score questions and structs into typed question sets; adding a variant breaks the match until handled.
  • Policy maps confidence onto Verdict::Act, Review, or Escalate, with per-variant thresholds and a NoulPolicy for yes/no questions.
  • HTTP is not in this crate: enable backend-typesafe-rs to use the published typesafe-rs client, or use s1-test::FakeClient.
  • MSRV is 1.85 (edition 2024), and every crate in the workspace has #![forbid(unsafe_code)].
  • The triage and moderation examples run entirely through FakeClient: no network call and no API key.

Quickstart

rust
#[derive(Choice)]
#[s1(instructions = "Which team should handle this ticket?")]
enum Department {
    #[s1("Payment, invoice, refund, or subscription issues")]
    Billing,
    #[s1("Bugs, errors, or integration problems")]
    Technical,
}

Watch out

Dual-licensed under Apache-2.0 or MIT. The typed layer is a git workspace rather than a published crate, HTTP lives in the separate typesafe-rs crate, and live use needs TYPESAFE_API_KEY.

Questions about this entry

Short answers drawn from the linked project or page.

From the Jev guides

Original write-ups on what this entry is for.

From the Jev AI model community

Posts from builders shipping with Jev right now.

Follow @typesafeai