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
76
77
78
79
//! Quality Gates Module (ML-001 through ML-017)
//!
//! Implements tiered quality gate enforcement following Toyota Production System
//! principles. Gates are configured via `.pmat-gates.toml` and enforced at three tiers:
//!
//! - **Tier 1 (ON-SAVE)**: Sub-second checks (clippy, complexity)
//! - **Tier 2 (ON-COMMIT)**: 1-5 minute checks (tests, coverage, SATD)
//! - **Tier 3 (NIGHTLY)**: Hours (mutation testing, security audit)
//!
//! # Features
//!
//! - **Quality Gates** (ML-001 to ML-003): Tiered enforcement with configurable thresholds
//! - **SBFL Fault Localization** (ML-004 to ML-006): Tarantula, Ochiai formulas
//! - **Oracle ML Classification** (ML-007 to ML-010): k-NN classifier, pattern library, drift detection
//! - **Rich ASCII Reporting** (ML-011 to ML-014): Box drawing, sparklines, histograms
//! - **Control Flow Analysis** (ML-015 to ML-017): CFG generation, complexity metrics
//!
//! # Toyota Way Principles
//!
//! - **Jidoka** (Automation with human touch): ML classifies, human approves
//! - **Kaizen** (Continuous improvement): Learn from fix acceptance
//! - **Visual Management** (Mieruka): Rich ASCII dashboards
//! - **Genchi Genbutsu** (Go and see): SBFL locates actual faults
//! - **Poka-yoke** (Error-proofing): Confidence scores prevent bad fixes
//!
//! # References
//!
//! - BASHRS-SPEC-ML-001: ML-Powered Linting specification
//! - Jones & Harrold (2005): Tarantula fault localization
//! - Abreu et al. (2007): Ochiai formula
//! - McCabe (1976): Cyclomatic complexity
//! - Kim et al. (2013): Bug localization with learning-to-rank
// Core quality gates
// Quality gates uses expect() for internal invariants
// Rich ASCII reporting
// SBFL fault localization
// Oracle ML classification
// Rich lint report with clustering
// Lint report uses expect() for internal invariants
// Control flow graph and complexity
// AST-to-CFG bridge (Sprint 5: Formal CFG Construction)
// Mock command executor for testing gates
// Mock executor uses expect() for internal invariants
// Re-exports for convenience
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;