brainstorming
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).
swift-testingWrite XCTest cases, async tests, and organized test suites in Swift. Use when writing XCTest cases, async tests, or organizing test suites in Swift.
Independent GitHub snapshot · Automated classification · Original documentation governs
[MOB-TEST-01] Tripartite Naming: Test functions must follow test_method_scenario_expectedBehavior or testMethod_scenario_expectedBehavior.[MOB-TEST-02] State Invariant Rule: Assert state transitions and invariants; ban trivial state mirror tests.[MOB-TEST-03] Entity Invariant & Codable Rule: Test calculations, validations, domain invariants, and non-trivial Codable serialization/parsing or error mapping; ban testing trivial getters or echo tests.[MOB-TEST-04] Contract Testing Rule: Repositories and data sources must be tested for contract compliance and error mapping; ban 1:1 pass-through mock echoing.[MOB-TEST-05] Bug-First Regression Lock: Every PR fixing a bug ticket or with title fix(...) must introduce a test reproducing the defect prior to the fix.[MOB-TEST-01], e.g., func test_userLogin_whenValid_isSuccessful()).setUpWithError() and tearDownWithError() for environment management.XCTAssertEqual, XCTAssertNil, XCTAssertTrue, etc.See implementation examples for XCTest setup/teardown, async tests, and UI test patterns.
async throws and use try await directly inside them.XCTestExpectation for callback-based async logic. Call expectation then fulfill() when done; then wait(for: [exp], timeout: 2.0) to block.init(service: ServiceProtocol)). Focus on logic isolation using mocks/stubs.XCUIApplication and accessibility identifiers.[MOB-TEST-01..05] Violations: Ban vague names, trivial state mirrors, echo tests, 1:1 mock echoing, and unverified bug fixes.XCTUnwrap() for better failure messages.When this skill applies, preserve the following domain terminology or equivalent concrete examples in the answer when relevant: