pmat 3.11.0

PMAT - Zero-config AI context generation and code quality toolkit (CLI, MCP, HTTP)
#![cfg_attr(coverage_nightly, coverage(off))]
//! Rust Project Score v2.0 (Phase 3: Advanced Metadata)
//!
//! Comprehensive Rust project quality scoring extending repo-score
//! with evidence-based refinements from 15 peer-reviewed papers (2022-2025).
//!
//! ## Scoring System
//!
//! Total: 211 points across 6 categories:
//! - **Rust Tooling & CI/CD (130pts)**: Clippy, rustfmt, cargo-audit, cargo-deny, workspace lints, CI/CD integration, advanced metadata, MSRV tracking, **release profiles (NEW)**
//! - Code Quality (26pts): Complexity 3pts, Unsafe 9pts, Mutation 8pts, Build time 4pts
//! - Testing Excellence (20pts): Coverage, integration, doc tests, mutation
//! - Documentation (15pts): Rustdoc, README, changelog
//! - Performance & Benchmarking (10pts): Criterion, profiling
//! - Dependency Health (12pts): Count, feature flags, tree pruning
//!
//! ### v2.0 Phase 1: Workspace-Level Lints (+12pts)
//!
//! Based on "Learn from Rust Giants" TPS-reviewed specification:
//! - Workspace-level lints configured: 5pts
//! - High-value lint categories (correctness, suspicious, perf): 4pts
//! - .clippy.toml with disallowed-methods: 3pts
//!
//! **Academic Foundation**:
//! - Johnson et al. 2013 ICSE: Quality over quantity (avoid warning blindness)
//! - Bacchelli & Bird 2013 ICSE: Automated style enforcement reduces review waste
//!
//! ### v2.0 Phase 2: CI/CD Integration (+37pts)
//!
//! Based on "Learn from Rust Giants" TPS-reviewed specification:
//!
//! **Multi-Platform CI (13pts)**:
//! - Linux + Windows + Mac testing: 6pts
//! - Feature matrix testing (minimal, default, full): 4pts
//! - Separate workflows (stress, loom, audit): 3pts
//!
//! **CI Workflow Diversity (15pts)**:
//! - ≥3 separate GitHub Actions workflows: 6pts
//! - Dedicated security audit workflow: 4pts
//! - Dedicated benchmark workflow: 3pts
//! - Dedicated lint/spell-check workflow: 2pts
//!
//! **Build Automation (9pts)**:
//! - justfile or cargo-xtask (Rust-native): 5pts
//! - Makefile (Windows-problematic, downgraded): 3pts
//! - Common targets (build, test, lint, bench): 3pts
//!
//! **Academic Foundation**:
//! - Hilton et al. 2016 ASE: CI adoption correlates with faster releases
//! - Memon et al. 2017 ICSE-SEIP: Flaky tests reduce productivity by 16%
//! - McIntosh et al. 2015 ICSE: Build system maintenance overhead
//!
//! ### v2.0 Phase 3: Advanced Metadata (+35pts)
//!
//! Based on "Learn from Rust Giants" TPS-reviewed specification:
//!
//! **docs.rs Metadata (10pts)**:
//! - `[package.metadata.docs.rs]` exists: 5pts
//! - `all-features = true` (comprehensive docs): 3pts
//! - `--generate-link-to-definition` in rustdoc-args: 2pts
//!
//! **Workspace Organization (13pts)**:
//! - Project uses workspace (multi-crate): 6pts
//! - `resolver = "2"` specified: 3pts
//! - `[workspace.dependencies]` for shared deps: 2pts
//! - `[workspace.package]` for shared metadata: 2pts
//!
//! **Release Automation (12pts)**:
//! - `[package.metadata.release]` configured: 5pts
//! - Automated CHANGELOG.md updates (pre-release-replacements): 3pts
//! - Version synchronization (shared-version): 2pts
//! - `.github/workflows/post-release.yml` workflow: 2pts
//!
//! **Academic Foundation**:
//! - Aghajani et al. 2019 ICSE: 57% of docs outdated within 6 months
//! - FSE 2022: Manual release processes have 3.8x higher error rate
//! - ICSE 2024: Workspace projects have 34% fewer dependency conflicts
//!
//! ### MSRV (Minimum Supported Rust Version) Tracking (+10pts)
//!
//! Based on "Learn from Rust Giants" specification:
//! - `rust-version` field in Cargo.toml: 5pts
//! - CI tests against MSRV (not just stable): 3pts
//! - MSRV documented in README: 2pts
//!
//! **Academic Foundation**:
//! - Decan et al. 2019 EMSE: Rust ecosystem has lowest dependency conflict rate (3.2%) vs npm (18.7%)
//!
//! ### Release Profile Optimization (+11pts)
//!
//! Based on "Learn from Rust Giants" specification:
//! - [profile.release] with LTO enabled: 4pts
//! - codegen-units = 1 (maximum optimization): 3pts
//! - panic = "abort" for smaller binaries (release): 2pts
//! - [profile.dev] with panic = "abort" (faster testing): 2pts
//! - -3pts penalty if LTO in dev/test profiles (slows TDD loop)
//!
//! **Academic Foundation**:
//! - Beller et al. 2017 MSR: Builds >10min correlate with 42% fewer local test runs
//!
//! ## Evidence-Based Design
//!
//! Key refinements based on peer-reviewed research:
//! - Complexity weight reduced (8→3pts): Low bug correlation (arXiv 2024)
//! - Unsafe code weight increased (6→9pts): Memory safety critical
//! - Mutation testing weight increased (5→8pts): Test quality validated
//! - Tiered Clippy scoring: correctness > suspicious > pedantic
//! - Build time as first-class metric (4pts): Developer productivity
//!
//! ## v1.1 Innovation: Score Velocity Tracking (Kaizen)
//!
//! - Current vs Previous comparison
//! - Points/day velocity calculation
//! - Most improved category detection
//! - 90-day trend visualization
//! - Days to next grade projection
//!
//! ## Usage
//!
//! ```ignore
//! use pmat::services::rust_project_score::*;
//!
//! let score = RustProjectScore::new();
//! ```

pub mod build_perf_scorer;
pub mod code_quality_scorer;
pub mod command_runner;
pub mod dependency_scorer;
pub mod documentation_scorer;
pub mod formal_verification_scorer;
pub mod gpu_simd_scorer;
pub mod known_defects_scorer;
pub mod models;
pub mod orchestrator;
pub mod performance_scorer;
pub mod reproducibility_scorer;
pub mod rust_tooling_scorer;
pub mod scorer;
pub mod testing_scorer;

pub use build_perf_scorer::*;
pub use code_quality_scorer::*;
pub use dependency_scorer::*;
pub use documentation_scorer::*;
pub use formal_verification_scorer::*;
pub use gpu_simd_scorer::*;
pub use known_defects_scorer::*;
pub use models::*;
pub use orchestrator::*;
pub use performance_scorer::*;
pub use reproducibility_scorer::*;
pub use rust_tooling_scorer::*;
pub use scorer::*;
pub use testing_scorer::*;