Skip to main content

sdsforge_core/generation/
mod.rs

1//! Formulation input domain model and draft generation for the `generate`
2//! feature.
3//!
4//! Roadmap (see `docs/sdsforge-architecture.md`'s "Generation architecture"
5//! section):
6//! - #8 `input`/`validate` — `ProductInput` and friends, deterministic
7//!   offline validation.
8//! - #9 `draft` — maps a validated `ProductInput` to a partial `SdsRoot`
9//!   (Section 1/3 only).
10//! - #10 `provenance`/`unresolved`/`result` — wraps #9's draft in a
11//!   [`GenerationResult`] that explains what's populated, where it came
12//!   from, what's still missing, and whether the draft is releasable.
13//! - #11+ chematic integration, CLI, GUI — not yet implemented.
14
15mod artifacts;
16mod draft;
17mod evidence;
18mod input;
19mod provenance;
20mod resolve;
21mod result;
22mod unresolved;
23mod validate;
24
25pub use artifacts::{
26    build_generation_artifacts, build_generation_report, render_review_report,
27    serialize_generation_report, serialize_official_sds, GenerationArtifactError,
28    GenerationArtifacts, GenerationReport, REPORT_SCHEMA_VERSION,
29};
30pub use draft::{draft_sections_from_resolved_input, generate_section_1_and_3, SectionDraftResult};
31pub use evidence::{
32    EvidenceApplicability, EvidenceSource, ExplosiveLimitsEvidence, MeasuredPropertiesInput,
33    MeasuredValueEvidence, TestResultEvidence,
34};
35pub use input::{ComponentInput, ConcentrationRange, ProductInput, SupplierInput};
36pub use provenance::{
37    path as field_path, ConfidenceLevel, EvidenceLevel, FieldProvenance, MeasurementConditions,
38};
39pub use result::{
40    compute_evidence_summary, compute_release_status, evaluate_release_gate,
41    generate_from_detailed_lookups, generate_from_normalized_input, generate_from_resolved_input,
42    generate_with_detailed_enrichment, generate_with_enrichment, EvidenceSummary, GenerationResult,
43    ReleaseGateResult, ReleaseStatus,
44};
45pub use unresolved::{
46    build_product_level_unresolved, FieldPolicy, FieldStatus, NotApplicableReason,
47    RegulatoryImpact, RequiredInput, SafetyImpact, UnresolvedField, UnresolvedReason,
48    MOLECULAR_FORMULA_POLICY, PRODUCT_LEVEL_POLICIES,
49};
50pub use validate::validate_product_input;