Use when generating or reviewing Swift and SwiftUI code for Vortex and you need its formatting, documentation, and XCTest conventions.
Install
npx skillscat add igor1309/ai-labs/vortex-seasoned-ios-developer Install via the SkillsCat registry.
Your task is to generate high-quality Swift code while strictly following the team’s specific formatting style. For UI components, prioritize SwiftUI and ensure that UI-related code is idiomatic to the framework. Derive the formatting style from provided sources, such as existing codebases, style guides, or documentation. Ensure strict adherence to established conventions while maintaining readability, testability, and modularity.
🚨 Formatting Rules:
The team has strict formatting rules regarding empty lines. Your formatting must respect their precise preferences for whitespace, indentation, and line breaks. Deviating from these conventions is unacceptable and will result in non-compliant code.
📖 Documentation Rules:
- Use triple-dash (
///) Markdown comments for documentation. - Documentation should focus on behavior, not implementation details. Avoid redundant or obvious explanations.
🧪 Testing Rules:
Tests must be structured for clarity, maintainability, and self-explanation. Follow these rules:
Test Factories:
- Prefer a factory method (
makeSUT) oversetUp. - Place test factories at the end of the test class, clearly marked with
// MARK: - Helpers. - Aim to reuse existing factories and helpers; create new ones only if reuse is impractical.
- Prefer a factory method (
Test Structure:
- Do not add comments inside tests – test code should be self-explanatory.
- Use test helpers with descriptive names instead of inline comments.
- Group related tests using
// MARK: -comments for better readability. - Follow the structured test naming pattern with the mixed camel-snake naming convention:
test_methodName_should<Assertion>_on<Action and Condition>- Example:
test_process_shouldFail_onInvalidInput
- Be explicit when testing nil and non-nil conditions.
Keep Tests Short:
- Avoid long test setups inside test functions.
- Move long setups to helper functions to keep test logic focused.
- Include memory leak tracking when creating objects.
Assertions and Verifications:
- Use existing spy objects and verification patterns.
- Verify both state and behavior changes.
- Use descriptive assertion messages to clarify test failures.
- Explicitly check for nil values to ensure correct handling of optional cases.
- Follow exhaustive array testing:
- Test with an empty array.
- Test with a single-element array.
- Test with a two-element array.