Swift Quality Configuration Landscape Report
Architecture Overview
~/.claude/CLAUDE.md (symlink to synodic-cc-config)
├── CLAUDE-SWIFT.md ────┐
├── CLAUDE-GIT.md │ Domain-specific
├── CLAUDE-TOOLING.md ──┘
├── SuperClaude files (FLAGS, PRINCIPLES, RULES, etc.)
└── skills/
├── swift-quality → swift-quality-tools/claude-skill
└── apple-platform-dev/
└── references/ (5 files, 52KB)
~/Developer/
├── CLAUDE.md (project-level)
└── swift-quality-tools/
├── CLAUDE.md (rule identifiers, warning philosophy)
├── claude-skill/
│ ├── skill.md (15-line rule, refactoring strategies)
│ └── references/ (2 files)
└── Configs/
├── shared-swiftformat.yml (70+ rules)
└── shared-swiftlint.yml (17 opt-in, ~10 disabled)
Custom Rules (11 total)
| Rule ID |
Status |
Documented In |
| skimmable_body |
Active |
swift-quality skill, CLAUDE.md |
| no_group_body |
Active |
swift-quality skill |
| one_top_level_view |
Active |
swift-quality skill |
| no_if_modifier |
Active |
swift-quality skill |
| no_if_without_else |
Active |
swift-quality skill |
| excessive_nesting |
Active |
CLAUDE.md, skill |
| stack_minimum_children |
Active |
swift-quality skill |
| onchange_ignored_old_value |
Active |
swift-quality skill |
| single_modifier_per_line |
Active |
swift-quality skill |
| view_structure_order |
Referenced |
skill (not in CLAUDE.md list) |
| constants_enum_usage |
DISABLED |
CLAUDE.md says "too noisy" |
Duplication Analysis
High Overlap (consolidation candidates)
-
Swift Testing Standards
- CLAUDE-SWIFT.md: 3 lines, just "use Swift Testing"
- apple-platform-dev/skill.md: ~20 lines, pattern examples
- apple-platform-dev/references/testing.md: 8KB comprehensive
- Recommendation: Remove from CLAUDE-SWIFT.md, rely on skill
-
SwiftUI Body Rules
- CLAUDE-SWIFT.md: ~80 lines covering EmptyView, body=ViewBuilder
- swift-quality skill: 250+ lines, authoritative, procedural
- Recommendation: CLAUDE-SWIFT.md → brief pointer to skill
-
onChange Patterns
- CLAUDE-SWIFT.md: 10 lines
- swift-quality skill: same content
- Recommendation: Remove from CLAUDE-SWIFT.md
-
Quality Tool Usage (-smart commands)
- CLAUDE.md: "mandatory workflow" section
- CLAUDE-SWIFT.md: "CRITICAL" warning about bare commands
- CLAUDE-TOOLING.md: script templates
- Recommendation: Single authoritative location
Acceptable Redundancy
- Rule identifier list in CLAUDE.md vs skill: Good (CLAUDE.md = reference, skill = procedural)
- Architecture patterns split between skills: Good (apple-platform-dev = architecture, swift-quality = view code)
SwiftLint Configuration Summary
Opt-In Rules (17):
- Performance: empty_count, empty_string, contains_over_*, first_where, last_where
- Quality: closure_spacing, redundant_nil_coalescing, redundant_type_annotation, toggle_bool, shorthand_operator, implicit_return
- Safety: unhandled_throwing_task
- Organization: one_declaration_per_file
Disabled (4 explicit):
- todo, opening_brace, trailing_comma, no_magic_numbers, sorted_imports
Metrics:
- line_length: 120 warn, 150 error
- file_length: 120 warn, 200 error
- function_body_length: 30 warn, 60 error
- cyclomatic_complexity: 10 warn, 15 error
- nesting: type 3/4, function 5/6
SwiftFormat Rules
~70 active rules across categories: whitespace, braces, imports, code simplification, type organization, spacing, quality, modern features, layout.
Disabled: headerFileName only
Consolidation Opportunities
Option A: Aggressive (smallest footprint)
- CLAUDE-SWIFT.md → Pointers only, 10 lines max
- Skills become authoritative for all Swift patterns
- CLAUDE-TOOLING.md → merge into CLAUDE.md
Option B: Moderate (recommended)
- CLAUDE-SWIFT.md keeps: compiler warnings, EmptyView anti-pattern, ViewModel naming
- Remove: Swift Testing, onChange patterns, body rules (→ skill)
- Keep CLAUDE-TOOLING.md separate (tooling ≠ code style)
Option C: Status Quo + Documentation
- Keep structure, improve cross-references
- Add "See swift-quality skill for..." pointers
- Document why each piece lives where it does
Inconsistencies Found
- view_structure_order rule mentioned in skill but not in CLAUDE.md rule list
- constants_enum_usage disabled as "too noisy" but CLAUDE-SWIFT.md still says "ALWAYS use enum Constants"
- no_wrapper_body mentioned in skill but not in CLAUDE.md rule list
- blank_line_import_separation and preview_required in skill but not in CLAUDE.md
Questions for Direction
- Should skills be the single source of truth for Swift patterns, with CLAUDE.md files just pointing?
- Is the constants_enum_usage rule worth re-enabling with better configuration, or should CLAUDE-SWIFT.md stop recommending it?
- Should rule identifiers be maintained in one place only (CLAUDE.md OR skill, not both)?
Swift Quality Configuration Landscape Report
Architecture Overview
Custom Rules (11 total)
Duplication Analysis
High Overlap (consolidation candidates)
Swift Testing Standards
SwiftUI Body Rules
onChange Patterns
Quality Tool Usage (-smart commands)
Acceptable Redundancy
SwiftLint Configuration Summary
Opt-In Rules (17):
Disabled (4 explicit):
Metrics:
SwiftFormat Rules
~70 active rules across categories: whitespace, braces, imports, code simplification, type organization, spacing, quality, modern features, layout.
Disabled: headerFileName only
Consolidation Opportunities
Option A: Aggressive (smallest footprint)
Option B: Moderate (recommended)
Option C: Status Quo + Documentation
Inconsistencies Found
Questions for Direction