1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
// Restriction-category lint on production code only. `cargo test` compiles with
// `cfg(test)`, which silences this everywhere — production code propagates
// errors; tests may `unwrap`.
//! `fmeca` — the deterministic, offline kernel for structured **FMECA**
//! (Failure Modes, Effects & Criticality Analysis).
//!
//! The caller (an LLM) does the fuzzy work — naming failure modes, causes,
//! effects, and proposing mitigations. This kernel owns **structure**: a typed
//! failure-mode / mitigation ledger, the fixed qualitative criticality matrix
//! (S×P → High/Medium/Low), the prevent→detect→fail-fast mitigation-order
//! discipline, computed residual risk, gap detection with notify/clarify/
//! remediate signals, a readiness gate, and report export.
//!
//! Criticality, residual, and standing are **computed** — a pure fold over an
//! append-only event log, never stored. No LLM, no network. The kernel is a pure
//! function of `(events in) → (criticality + residual + gaps + readiness out)`.
//!
//! # Layout
//!
//! - [`model`] — the typed data model (failure mode, mitigation, entity,
//! levels, criticality, domain, issue).
//! - [`scoring`] — the fixed code-resident evidence→score catalog + the
//! observation→Level map (the model never picks a score).
//! - [`response`] — the deterministic `response_class` magnitude derivation.
//! - [`criticality`] — the fixed qualitative S×P matrix (the 3×3 strategy's cells).
//! - [`matrix`] — the swappable [`MatrixStrategy`](matrix::MatrixStrategy)
//! seam: a closed set of fixed matrices selected per session (3×3
//! default + NASA GSFC-HDBK-8004 5×5), each with locked cells.
//! - [`event`] — the append-only event log line type.
//! - [`store`] — the [`StateStore`](store::StateStore) trait + filesystem
//! (JSONL) impl.
//! - [`projection`] — the [`FmecaState`](projection::FmecaState) fold + computed
//! criticality/residual/standing.
//! - [`detect`] — issue detectors (one per `IssueType`).
//! - [`signal`] — the three first-class signals + `risk.next`.
//! - [`readiness`] — the readiness gate.
//! - [`export`] — `report.export`.
//! - [`engine`] — the [`Engine`](engine::Engine) tying it together, with the
//! per-session write lock.
pub use ;
pub use criticality;
pub use Engine;
pub use ;
pub use Event;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;