pmat 2.93.1

PMAT - Zero-config AI context generation and code quality toolkit (CLI, MCP, HTTP)
//! CLI command handlers organized by category
//!
//! This module structure reduces complexity by separating concerns
//! and grouping related functionality together.

pub mod advanced_analysis_handlers;
pub mod agent_handlers;
pub mod analysis;
pub mod analysis_handlers;
pub mod big_o_handlers;
pub mod cache;
pub mod churn_formatter;
pub mod complexity_handlers;
pub mod comprehensive_analysis_handler;
pub mod comprehensive_handler;
pub mod config_command_handlers;
pub mod configuration_handlers;
pub mod defect_prediction_handler;
pub mod demo_handlers;
pub mod duplication_analysis;
pub mod enforce_handlers;
pub mod enhanced_reporting_handlers;
pub mod generation_handlers;
pub mod hooks_command_handlers;
pub mod incremental_coverage_handler;
pub mod lint_hotspot_handlers;
#[cfg(test)]
pub mod lint_hotspot_property_tests;
pub mod memory;
pub mod name_similarity_analysis;
pub mod new_tdg_handler;
pub mod proof_annotations_handler;
pub mod provability_handler;
pub mod qdd_handlers;
pub mod quality_gate_formatter;
#[cfg(test)]
pub mod quality_gate_property_tests;
pub mod refactor_auto_handlers;
#[cfg(test)]
pub mod refactor_auto_property_tests;
pub mod refactor_docs_handlers;
pub mod refactor_handlers;
pub mod satd_handler;
pub mod similarity_handler;
pub mod tdg_diagnostic_handler;
pub mod tdg_formatter;
pub mod tdg_handlers;
pub mod telemetry_handlers;
pub mod test_handlers;
pub mod utility_handlers;
pub mod wasm_handler;
pub mod wasm_handlers;

// Re-export handler functions
pub use advanced_analysis_handlers::{
    handle_analyze_comprehensive, handle_analyze_deep_context, handle_analyze_graph_metrics,
    handle_analyze_makefile, handle_analyze_symbol_table, handle_analyze_tdg,
};
pub use agent_handlers::handle_agent_command;
pub use analysis_handlers::route_analyze_command;
pub use cache::handle_cache_command;
pub use complexity_handlers::{
    handle_analyze_churn, handle_analyze_complexity, handle_analyze_dag, handle_analyze_dead_code,
};
pub use config_command_handlers::handle_config_command;
pub use configuration_handlers::handle_configuration;
pub use defect_prediction_handler::handle_analyze_defect_prediction;
pub use demo_handlers::{handle_demo, handle_quality_gate};
pub use duplication_analysis::handle_analyze_duplicates;
pub use enforce_handlers::route_enforce_command;
pub use generation_handlers::{
    handle_generate, handle_list_agent_templates, handle_scaffold, handle_scaffold_agent,
    handle_validate, handle_validate_agent_template, ScaffoldAgentParams,
};
pub use hooks_command_handlers::handle_hooks_command;
pub use incremental_coverage_handler::handle_analyze_incremental_coverage;
pub use lint_hotspot_handlers::handle_analyze_lint_hotspot;
pub use memory::handle_memory_command;
pub use name_similarity_analysis::handle_analyze_name_similarity;
pub use provability_handler::handle_analyze_provability;
pub use refactor_docs_handlers::handle_refactor_docs;
pub use refactor_handlers::{route_refactor_command, RefactorServeParams};
pub use satd_handler::handle_analyze_satd;
pub use tdg_handlers::handle_tdg_command;
pub use telemetry_handlers::handle_telemetry;
pub use test_handlers::handle_test;
pub use utility_handlers::{
    handle_context, handle_diagnose, handle_list, handle_search, handle_serve,
};
pub use wasm_handlers::{handle_analyze_assemblyscript, handle_analyze_webassembly};

#[cfg(test)]
mod tests {

    #[test]
    fn test_handler_exports() {
        // Basic test to verify module exports
        assert_eq!(1, 1);
    }

    #[test]
    fn test_module_basic() {
        // Basic test
        assert_eq!(2 + 2, 4);
    }
}

#[cfg(test)]
mod property_tests {
    use proptest::prelude::*;

    proptest! {
        #[test]
        fn basic_property_stability(_input in ".*") {
            // Basic property test for coverage
            prop_assert!(true);
        }

        #[test]
        fn module_consistency_check(_x in 0u32..1000) {
            // Module consistency verification
            prop_assert!(_x < 1001);
        }
    }
}