Skip to content

Commit 4d0ac3d

Browse files
author
Jeshua ben Joseph
committed
refactor: Update documentation and comments to replace CDD principles with architectural principles
1 parent 9c1b89c commit 4d0ac3d

File tree

12 files changed

+30
-30
lines changed

12 files changed

+30
-30
lines changed

.github/copilot-instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ When run on a typical Rust project with placeholder code:
9090
Default configuration includes:
9191
- **Placeholders**: TODO/FIXME/HACK comments, unimplemented!/todo!/panic! macros
9292
- **Incomplete implementations**: Empty Ok(()) returns
93-
- **Architectural violations**: Hardcoded paths, CDD header missing
93+
- **Architectural violations**: Hardcoded paths, architectural header missing
9494
- **Severity levels**: error (fails CI), warning (informational), info (suggestions)
9595
- **Path filtering**: Supports .gitignore-style patterns with include/exclude
9696

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "rust-guardian"
33
version = "0.1.0"
44
edition = "2021"
5-
authors = ["ARIA Systems"]
5+
authors = ["The Rust Guardian Team"]
66
description = "Dynamic code quality enforcement preventing incomplete or placeholder code"
77
license = "MIT"
88
repository = "https://github.com/cloudfunnels/rust-guardian"

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ Simplified format for automated processing and agent consumption:
387387
Placeholder comment detected: TODO
388388
389389
[102:src/lib.rs]
390-
Traditional tests violate CDD - consciousness architecture should be self-validating
390+
Traditional unit tests found - consider integration tests for better architectural validation
391391
392392
[67:src/models.rs]
393393
Function returns Ok(()) with no meaningful implementation
@@ -619,7 +619,7 @@ Built with love for the craft of software development.
619619

620620
Done and done.
621621

622-
ARIA Systems
622+
The Rust Guardian Team
623623

624624
## Support
625625

examples/guardian.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,15 +106,15 @@ patterns:
106106
- "**/core/**"
107107
- "**/tests/**"
108108

109-
# CDD compliance checking (optional)
110-
cdd_compliance:
109+
# Architectural compliance checking (optional)
110+
architectural_compliance:
111111
severity: info
112112
enabled: false # Disabled by default - enable per project
113113
rules:
114-
- id: cdd_header_missing
114+
- id: architectural_header_missing
115115
type: regex
116-
pattern: '//!\s*.*\n(?:.*\n)*?\s*//!\s*CDD Principle:'
117-
message: "File missing CDD principle header comment"
116+
pattern: '//!\s*.*\n(?:.*\n)*?\s*//!\s*Architecture:'
117+
message: "File missing architectural principle header comment"
118118
exclude_if:
119119
in_tests: true
120120
file_patterns:

guardian.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,15 +118,15 @@ patterns:
118118
message: "Magic number found: {match} - consider using a named constant"
119119
enabled: false
120120

121-
# Test pattern violations for CDD compliance
121+
# Test pattern violations for architectural compliance
122122
test_patterns:
123123
severity: error
124124
enabled: true
125125
rules:
126126
- id: no_traditional_tests
127127
type: regex
128128
pattern: '(mod\s+tests?\s*\{|#\[test\]|#\[cfg\(test\)\])'
129-
message: "Traditional tests violate CDD principles - use integration tests instead: {match}"
129+
message: "Traditional unit tests found - consider integration tests for better architectural validation: {match}"
130130
severity: error
131131
case_sensitive: true
132132
exclude_if:

src/cache/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! File hash caching for incremental checks
22
//!
3-
//! CDD Principle: Infrastructure Layer - Cache provides performance optimization without affecting domain logic
3+
//! Architecture: Infrastructure Layer - Cache provides performance optimization without affecting domain logic
44
//! - FileCache acts as a repository for file metadata and analysis results
55
//! - Hash-based validation ensures cache coherence with minimal overhead
66
//! - Domain objects remain pure while infrastructure handles caching concerns
@@ -402,7 +402,7 @@ fn current_timestamp() -> u64 {
402402
impl FileCache {
403403
/// Self-validation - Infrastructure validates its own coherence
404404
///
405-
/// Guardian Principle: Self-validating architecture - Infrastructure components ensure their own correctness
405+
/// Architecture Principle: Self-validating infrastructure - Components ensure their own correctness
406406
/// - Cache validates its invariants during normal operation
407407
/// - File hash verification maintains cache coherence
408408
/// - Metadata consistency checked on each operation
@@ -459,7 +459,7 @@ impl FileCache {
459459

460460
/// Integrity verification during normal operations
461461
///
462-
/// Guardian Principle: Continuous self-monitoring - Infrastructure monitors its own health
462+
/// Architecture Principle: Continuous self-monitoring - Infrastructure monitors its own health
463463
fn verify_integrity_on_operation(&self) -> GuardianResult<()> {
464464
// Quick integrity checks that run during normal operations
465465
if self.data.version == 0 {

src/config/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! Configuration loading and management for Rust Guardian
22
//!
3-
//! CDD Principle: Anti-Corruption Layer - Configuration translates external YAML formats
3+
//! Architecture: Anti-Corruption Layer - Configuration translates external YAML formats
44
//! - Raw YAML structures are converted to clean domain objects
55
//! - Default configurations are embedded in the domain, not infrastructure
66
//! - Configuration acts as a repository for pattern rules and path filters
@@ -243,10 +243,10 @@ impl GuardianConfig {
243243
}),
244244
},
245245
PatternRule {
246-
id: "cdd_header_missing".to_string(),
246+
id: "architectural_header_missing".to_string(),
247247
rule_type: RuleType::Regex,
248-
pattern: r"//!\s*(?:.*\n)*?\s*//!\s*CDD Principle:".to_string(),
249-
message: "File missing CDD principle header".to_string(),
248+
pattern: r"//!\s*(?:.*\n)*?\s*//!\s*Architecture:".to_string(),
249+
message: "File missing architectural principle header".to_string(),
250250
severity: Some(Severity::Info),
251251
enabled: false, // Disabled by default, can be enabled per project
252252
case_sensitive: false,
@@ -454,7 +454,7 @@ impl Default for ConfigBuilder {
454454
}
455455

456456
impl GuardianConfig {
457-
/// Self-validating configuration integrity check following CDD principles
457+
/// Self-validating configuration integrity check following architectural principles
458458
/// Guardian validates itself rather than relying on external tests
459459
pub fn verify_config_integrity(&self) -> GuardianResult<()> {
460460
// Domain validates its own consistency

src/domain/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! Domain layer for Rust Guardian
22
//!
3-
//! CDD Principle: Domain Model - Pure business logic for code quality enforcement
3+
//! Architecture: Domain Model - Pure business logic for code quality enforcement
44
//! - Contains all core entities, value objects, and domain services
55
//! - Independent of infrastructure concerns like databases, file systems, or external APIs
66
//! - Expresses the ubiquitous language of code quality and violation detection

src/domain/violations.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! Core domain models for code quality violations and validation results
22
//!
3-
//! CDD Principle: Rich Domain Models - Violations are entities with behavior, not just data
3+
//! Architecture: Rich Domain Models - Violations are entities with behavior, not just data
44
//! - Violations can classify themselves, suggest fixes, and maintain context
55
//! - ValidationReport acts as an aggregate root managing collections of violations
66
//! - Domain events can be generated when patterns are detected or when validation completes

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! Rust Guardian - Dynamic code quality enforcement for systems
22
//!
3-
//! CDD Principle: Clean Architecture - Library interface serves as the application layer
3+
//! Architecture: Clean Architecture - Library interface serves as the application layer
44
//! - Pure domain logic separated from infrastructure concerns
55
//! - Clean boundaries between core business logic and external dependencies
66
//! - Agent integration API provides validation workflows

0 commit comments

Comments
 (0)