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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
//! 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 use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;