implement-feature
Guide for implementing features using architecture-first design, TDD, rich domain models, and Swift 6.2 patterns, ensuring a clean separation between Domain, Infrastructure, and App layers.
Introduction
This skill serves as a rigorous, mandatory guide for developers building robust Swift applications. It enforces an architecture-first philosophy that minimizes technical debt by requiring a visual component diagram and a clear definition of data flows before any code is written. By mandating Test-Driven Development (TDD) for both domain and infrastructure layers, it ensures that your implementation is both testable and maintainable. This skill is ideal for software engineers, senior developers, and technical leads who are tasked with adding complex features that span across domain services, repository patterns, and SwiftUI view layers. It promotes a design where domain models encapsulate business behavior rather than acting as simple data containers, and it strictly follows Swift 6.2 concurrency patterns and modern idiomatic practices to ensure high performance and thread safety.
-
Architecture-first workflow: Requires requirement analysis, component diagramming, and explicit user approval before implementation.
-
TDD-centric development: Focuses on domain model tests, infrastructure integration tests, and decoupling business logic from UI.
-
Swift 6.2 best practices: Encourages the use of actors, Sendable protocols, and direct consumption of domain models by SwiftUI views to eliminate redundant ViewModel layers.
-
Comprehensive layer management: Handles logic across Domain, Infrastructure, and Application tiers to ensure system-wide coherence.
-
High-level abstractions: Employs protocol-based dependency injection with @Mockable to support clean modularity and testing.
-
Always start with the architecture design phase; user approval is a prerequisite for proceeding to code implementation.
-
Use ASCII diagrams to document data flow, component interactions, and external dependencies such as APIs or databases.
-
When implementing, prioritize 'Tell-Don't-Ask' principles for domain objects, ensuring business rules remain within the domain layer.
-
Views should be kept lightweight, consuming domain models directly to maintain a unidirectional data flow and avoid unnecessary state synchronization.
-
Input for this skill typically involves feature requirements or 'how-to' technical questions; output includes structured architecture plans, TDD test suites, and clean Swift source code.
Repository Stats
- Stars
- 77
- Forks
- 8
- Open Issues
- 2
- Language
- Swift
- Default Branch
- main
- Sync Status
- Idle
- Last Synced
- May 3, 2026, 08:40 PM