refactor: split architecture rules into domain-specific files
Split the monolithic .architecture-rules.yaml (1700+ lines) into focused domain-specific files in .architecture-rules/ directory: - _main.yaml: Core config, principles, ignore patterns, severity levels - api.yaml: API endpoint rules (API-001 to API-005) - service.yaml: Service layer rules (SVC-001 to SVC-007) - model.yaml: Model rules (MDL-001 to MDL-004) - exception.yaml: Exception handling rules (EXC-001 to EXC-005) - naming.yaml: Naming convention rules (NAM-001 to NAM-005) - auth.yaml: Auth and multi-tenancy rules (AUTH-*, MT-*) - middleware.yaml: Middleware rules (MDW-001 to MDW-002) - frontend.yaml: Frontend rules (JS-*, TPL-*, FE-*, CSS-*) - language.yaml: Language/i18n rules (LANG-001 to LANG-010) - quality.yaml: Code quality rules (QUAL-001 to QUAL-003) Also creates scripts/validators/ module with base classes for future modular validator extraction. The validate_architecture.py loader now auto-detects and merges split YAML files while maintaining backward compatibility with single file mode. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
36
scripts/validators/__init__.py
Normal file
36
scripts/validators/__init__.py
Normal file
@@ -0,0 +1,36 @@
|
||||
# scripts/validators/__init__.py
|
||||
"""
|
||||
Architecture Validators Package
|
||||
===============================
|
||||
|
||||
This package contains domain-specific validators for the architecture validation system.
|
||||
Each validator module handles a specific category of rules.
|
||||
|
||||
Modules:
|
||||
- base: Base classes and helpers (Severity, Violation, ValidationResult)
|
||||
- api_validator: API endpoint rules (API-*)
|
||||
- service_validator: Service layer rules (SVC-*)
|
||||
- model_validator: Model rules (MDL-*)
|
||||
- exception_validator: Exception handling rules (EXC-*)
|
||||
- naming_validator: Naming convention rules (NAM-*)
|
||||
- auth_validator: Auth and multi-tenancy rules (AUTH-*, MT-*)
|
||||
- middleware_validator: Middleware rules (MDW-*)
|
||||
- frontend_validator: Frontend rules (JS-*, TPL-*, FE-*, CSS-*)
|
||||
- language_validator: Language/i18n rules (LANG-*)
|
||||
"""
|
||||
|
||||
from .base import (
|
||||
BaseValidator,
|
||||
FileResult,
|
||||
Severity,
|
||||
ValidationResult,
|
||||
Violation,
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
"Severity",
|
||||
"Violation",
|
||||
"FileResult",
|
||||
"ValidationResult",
|
||||
"BaseValidator",
|
||||
]
|
||||
Reference in New Issue
Block a user