Skip to main content

eliciter_core/
lib.rs

1// Restriction-category lint on production code only. `cargo test` compiles with
2// `cfg(test)`, which silences this everywhere — tests may `unwrap`; production
3// code propagates errors. Mirrors the cpm-planner convention.
4#![cfg_attr(not(test), warn(clippy::unwrap_used))]
5
6//! `elicitation-core` — the deterministic, offline kernel for structured
7//! discovery interviews, modeled as an **alignment mechanism run by the
8//! scientific method** (see `docs/spec.md`).
9//!
10//! Claims are **hypotheses**; standing is **computed** (a pure fold over an
11//! append-only event log), never stored. Detectors are exact-match pure
12//! functions over caller-supplied canonical identity — no fuzzy matching, no
13//! normalization, no LLM, no network. The kernel is a pure function of
14//! `(events in) → (computed standing + contradictions + readiness +
15//! next-question out)`.
16//!
17//! # Layout
18//!
19//! - [`model`]      — the typed data model (claim, evidence, contradiction,
20//!   remediation, requirement, entity).
21//! - [`session`]    — the session-configurable coverage schema.
22//! - [`event`]      — the append-only event log line type.
23//! - [`store`]      — the [`StateStore`](store::StateStore) trait + filesystem
24//!   (JSONL) impl.
25//! - [`projection`] — the `InterviewState` fold + computed standing.
26//! - [`detect`]     — intra-spec / spec-vs-reality contradiction + conformance
27//!   detection.
28//! - [`signal`]     — the three first-class signals + `question.next`.
29//! - [`readiness`]  — the plan-readiness gate.
30//! - [`export`]     — `spec.export`.
31//! - [`engine`]     — the [`Engine`](engine::Engine) tying it together.
32//! - [`research`]   — the future `ResearchProvider` seam (`None` in v1).
33
34pub mod detect;
35pub mod engine;
36pub mod error;
37pub mod event;
38pub mod export;
39pub mod model;
40pub mod projection;
41pub mod readiness;
42pub mod research;
43pub mod session;
44pub mod signal;
45pub mod store;
46
47pub use engine::Engine;
48pub use error::{EngineError, Result};
49pub use event::{Event, EvidenceEvent};
50pub use export::SpecDocument;
51pub use model::{
52    Category, Claim, Contradiction, ContradictionKind, EntityRef, EvidenceRef, EvidenceSourceType,
53    HypothesisStanding, Modality, Object, Polarity, Priority, RemediationEvent, RemediationMove,
54    RequirementCandidate, RequirementMeta, Severity, TimeScope,
55};
56pub use projection::{AcceptStance, ClaimWithStanding, InterviewState, Registry};
57pub use readiness::ReadinessReport;
58pub use research::{NoResearch, ResearchProvider};
59pub use session::{CoverageDimension, CoverageSchema};
60pub use signal::{Signal, SignalKind, next_question};
61pub use store::{FilesystemStore, StateStore};