tokmd_analysis_effort/lib.rs
1//! # tokmd-analysis-effort
2//!
3//! Deterministic effort-estimation support for analysis receipts.
4//!
5//! This crate turns repository inventory plus optional analysis enrichers into a
6//! top-level [`tokmd_analysis_types::EffortEstimateReport`].
7//!
8//! The engine is intentionally layered:
9//!
10//! 1. build an authored-vs-total size basis,
11//! 2. run a deterministic baseline model over authored KLOC,
12//! 3. widen or narrow the estimate using observed repo signals,
13//! 4. explain the result with drivers and confidence reasons,
14//! 5. optionally attach a base/head delta estimate.
15//!
16//! The implementation is local and receipt-driven. It uses repository files and
17//! already-computed analysis reports; it does not call external services.
18//!
19//! ## Inputs
20//!
21//! The effort builder can consume:
22//!
23//! - `ExportData` for per-file size, language, and module context,
24//! - `DerivedReport` for totals, tests, polyglot spread, and baseline derived metrics,
25//! - optional `GitReport`, `ComplexityReport`, `ApiSurfaceReport`, and
26//! `DuplicateReport` for richer driver extraction and confidence scoring.
27//!
28//! ## Output contract
29//!
30//! The main output is [`tokmd_analysis_types::EffortEstimateReport`], which
31//! contains:
32//!
33//! - `size_basis`
34//! - `results`
35//! - `confidence`
36//! - `drivers`
37//! - `assumptions`
38//! - optional `delta`
39//!
40//! Rendering layers should treat this crate as the source of estimate semantics
41//! and should not infer missing values on their own.
42
43pub mod classify;
44pub mod cocomo2;
45pub mod cocomo81;
46pub mod confidence;
47pub mod delta;
48pub mod drivers;
49pub mod model;
50pub mod monte_carlo;
51pub mod request;
52pub mod size_basis;
53pub mod uncertainty;
54
55// Public request/config surface used by orchestration and CLI plumbing.
56// Main effort builder entrypoint.
57pub use model::build_effort_report;
58pub use request::{DeltaInput, EffortLayer, EffortModelKind, EffortRequest};