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>
28 lines
713 B
YAML
28 lines
713 B
YAML
# Architecture Rules - Code Quality Rules
|
|
# Rules for code quality, formatting, and linting
|
|
|
|
code_quality_rules:
|
|
|
|
- id: "QUAL-001"
|
|
name: "All code must be formatted with Ruff"
|
|
severity: "error"
|
|
description: |
|
|
Run 'make format' before committing
|
|
enforcement: "pre_commit"
|
|
|
|
- id: "QUAL-002"
|
|
name: "All code must pass Ruff linting"
|
|
severity: "error"
|
|
description: |
|
|
Run 'make lint' before committing
|
|
enforcement: "pre_commit"
|
|
|
|
- id: "QUAL-003"
|
|
name: "Type hints recommended for functions"
|
|
severity: "warning"
|
|
description: |
|
|
Add type hints to function parameters and return types
|
|
pattern:
|
|
file_pattern: "app/**/*.py"
|
|
encouraged: true
|