Skip to content

Update apple-platform-dev skill with Phase 4 Alpha guidance #45

@kj6dev

Description

@kj6dev

Overview

Update the apple-platform-dev skill and CLAUDE-SWIFT.md with coding conventions identified during Phase 4 Alpha preference discovery sessions.

High Priority Updates

Type Inference Guidelines

  • Prefer type inference
  • Use explicit types for: type coercion (let padding: CGFloat = 16.0) and static member shorthand (let token: SpaceToken = .x4)

Action Handler Naming

  • Direct actions: *Action suffix (saveAction)
  • Event handlers: on* prefix (onSheetDismissed)

Boolean Property Naming

  • Preferred: is prefix (isLoading, isEnabled)
  • Acceptable: has prefix (hasError)
  • Avoid: shows, displays

View Suffix Conventions

  • View: General SwiftUI components
  • Row: List/ForEach items
  • Page: Full-screen views

Medium Priority Updates

  • Constants Enum Organization: Prefer flat enum Constants, split if large
  • Common Value Extraction Threshold: Extract when 2+ uses AND meaningful cleanup
  • Computed Property Naming: Noun form (header), avoid verb form (buildHeader)
  • Preview Organization: Multiple for data states, single if variations not revealing

Low Priority Updates

  • No leading underscores in property names
  • Protocol conformance placement guidelines
  • Nested types guidelines
  • Preview content strategy
  • Preview naming conventions
  • Binding naming conventions

Already Implemented

  • EmptyView Anti-Pattern → CLAUDE-SWIFT.md
  • ViewModel Naming Standard → CLAUDE-SWIFT.md
  • Property Wrapper Line Breaks → apple-platform-dev skill
  • Pointless Container Anti-Pattern → apple-platform-dev skill
  • View Extraction Decision Matrix → apple-platform-dev skill
  • Extension Usage Guidelines → apple-platform-dev skill
  • Extension File Naming → apple-platform-dev skill

Reference

Full session archive: PreferenceDiscovery/archive/phase4-alpha/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions