NormCore (Rust)
NormCore implements a deterministic normative admissibility evaluator for agent speech acts.
Given:
- an agent utterance
- a trajectory that includes externally observed tool results
it produces an admissibility judgment under a fixed set of axioms (A4–A7).
It evaluates participation legitimacy, not semantic truth or task correctness.
Specification
NormCore tracks the IETF Internet-Draft:
Important:
- This is an Internet-Draft (work in progress), not an RFC.
- Axiom labels used in this repository (
A4,A5,A6,A7) follow that draft. - If draft wording changes in future revisions, repository behavior may be updated accordingly.
Installation
From source (this repository):
Install CLI binary locally:
After installation, run:
Without install, you can run directly with Cargo:
What this is
NormCore is:
- deterministic and auditable (no embeddings, no semantic inference)
- form-based (statement modality drives the checks)
- grounding-based (licensing comes only from observed evidence)
- lexicographic (one violation makes the whole act inadmissible)
- an operational judgment gate for grounded agent outputs
What this is NOT
NormCore does not:
- verify semantic truth
- score output quality or usefulness
- infer intent, reasoning, or "why"
- do ranking / grading / reward modeling
- allow agent text to license itself
- generate code or assess code quality as such
If you need "is this answer good/correct?", this is the wrong tool.
Normative boundary
NormCore answers one question only:
Was the agent allowed to speak in this form, given what it observed?
It does not answer whether the statement is semantically true, useful, or optimal. In practice, this targets operational decision statements grounded in observed tool/file evidence, not code-generation capability evaluation.
Entry points (public API)
Rust library:
use ;
let judgment = evaluate
.expect;
assert_eq!;
CLI:
Inputs
evaluate() consumes:
agent_output(optional): assistant output stringconversation(optional): full chat history as JSON messages; last message must be assistantgrounds(optional): external grounds as OpenAI-style annotations or normalized grounds
At least one of agent_output or conversation is required.
If both are provided, agent_output must exactly match last assistant content in conversation.
Grounding is built from trajectory tool results plus optional external grounds.
Canonical examples
Unlicensed assertive (violates_norm):
Conditional downgrade (conditionally_acceptable):
Grounded assertive via conversation + citation (acceptable):
CLI parameters
--log-level: accepted for CLI parity (CRITICAL|ERROR|WARNING|INFO|DEBUG)-v,-vv: accepted verbosity flags--agent-output: agent output text (string)--conversation: conversation history as JSON array; last item must be assistant message--grounds: grounds payload as JSON array
Sanity rule:
- if both
--agent-outputand--conversationare provided,--agent-outputmust exactly match the last assistantcontentin--conversation.
Scripted checks (repo)
Rust-focused evaluation scripts are in:
scripts/rust/evaluate_history_rs.shscripts/rust/run_normcore_rs_eval.shscripts/rust/smoke_codex_rust_local.sh
Example:
Rust Test Tracks
This crate includes five complementary Rust-only testing tracks:
- Property-based invariants (
proptest):normcore-rs/tests/property_invariants.rs
- Golden scenario corpus regression:
normcore-rs/tests/golden_corpus.rsnormcore-rs/tests/fixtures/golden_corpus.json
- Formal trace replay regression:
normcore-rs/tests/trace_replay.rsnormcore-rs/tests/fixtures/trace_replay.json
- Mutation testing (
cargo-mutants):just rust-mutants- wrapper script:
scripts/rust/run_mutants_rs.sh
- Fuzz testing (
cargo-fuzz):just rust-fuzz fuzz_parse_json 5000just rust-fuzz fuzz_parse_conversation 5000just rust-fuzz fuzz_extract_citation_keys 5000- wrapper script:
scripts/rust/run_fuzz_rs.sh - fuzz crate:
normcore-rs/fuzz/Cargo.toml