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
//! Core data models for PMAT.
//!
//! This module contains all the data structures and models used throughout PMAT.
//! Each submodule represents a specific domain within the codebase analysis toolkit.
//!
//! # Models Overview
//!
//! - **churn**: Code churn metrics and repository activity analysis
//! - **`complexity_bound`**: Complexity metrics and bounds for code analysis
//! - **dag**: Directed Acyclic Graph structures for dependency analysis
//! - **`dead_code`**: Dead code detection and representation
//! - **`deep_context_config`**: Configuration for deep context analysis
//! - **`defect_report`**: Defect reporting structures (SATD, lint issues)
//! - **error**: Error types and handling
//! - **mcp**: Model Context Protocol specific structures
//! - **pdmt**: PDMT integration for deterministic todo generation with quality enforcement
//! - **`project_meta`**: Project metadata and configuration
//! - **`quality_gate`**: Quality gate results and violations
//! - **refactor**: Refactoring state machine and operations
//! - **tdg**: Task Dependency Graph for workflow analysis
//! - **template**: Template structures for code generation
//! - **`unified_ast`**: Unified AST representation across languages
//!
//! # Example
//!
//! ```
//! use pmat::models::defect_report::{Defect, DefectCategory, Severity};
//! use pmat::models::dag::DependencyGraph;
//! use std::path::PathBuf;
//!
//! // Create a defect
//! let defect = Defect {
//! id: "SATD-001".to_string(),
//! severity: Severity::Medium,
//! category: DefectCategory::TechnicalDebt,
//! file_path: PathBuf::from("src/main.rs"),
//! line_start: 42,
//! line_end: Some(45),
//! column_start: Some(5),
//! column_end: Some(80),
//! message: "Refactor this function".to_string(),
//! rule_id: "satd-todo".to_string(),
//! fix_suggestion: None,
//! metrics: Default::default(),
//! };
//! ```