Skip to main content

ainl_failure_learning/
lib.rs

1//! Portable **failure learning** surface: search persisted [`ainl_memory::AinlMemoryNode`]
2//! `Failure` rows and format short **prevention** blocks for the LLM.
3//!
4//! Ingestion stays in hosts (`openfang-runtime` / `ainl-runtime`) that already write
5//! `Failure` nodes. This crate only *reads* via [`GraphMemory::search_failures_for_agent`].
6
7#![forbid(unsafe_code)]
8
9pub mod gate;
10pub mod ingest;
11pub mod procedure_patch;
12pub mod search;
13pub mod suggest;
14
15pub use gate::should_emit_failure_suggestion;
16pub use procedure_patch::{
17    failure_patch_candidates, ProcedureFailureEvidence, ProcedurePatchPolicy,
18};
19pub use search::{search_failures_for_agent, FailureRecallHit};
20pub use suggest::format_failure_prevention_block;