一键导入
testing
Load before writing tests, after non-trivial code changes, or when deciding verification scope. Canonical definition of done for Ensemble.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Load before writing tests, after non-trivial code changes, or when deciding verification scope. Canonical definition of done for Ensemble.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Build, launch, and capture debug logs from the iOS simulator. Use when you need to verify runtime behavior, measure timing, or diagnose issues without asking the user to manually capture logs.
Use when the user asks to visually test, touch, automate, or walk every Ensemble app surface across iOS/iPadOS and macOS, including agent-run UI sweeps, issue detection, reproduction, log inspection, fix-plan reports, platform parity checks, and repeatable screenshot/accessibility evidence runs.
Canonical Ensemble behavior policy router. Load before changing app behavior, playback, queue, offline/connectivity, downloads, sync/refresh, mutations, platform UI behavior, or verification expectations; update the relevant policy reference when implementation changes or clarifies behavior.
Plex Media Server API reference. Load when implementing or debugging Plex API integration.
Load before designing features, adding services, or touching multiple packages. Compact ownership, dependency, and subsystem rules for Ensemble.
Load when locating files, adding files, or checking package ownership. Compact map plus discovery commands; use rg for live file lists.
| name | testing |
| description | Load before writing tests, after non-trivial code changes, or when deciding verification scope. Canonical definition of done for Ensemble. |
This is the canonical verification policy. Other skills may add task-specific details, but they should not redefine done.
| Change | Required verification |
|---|---|
| Docs or agent-guidance only | Syntax/link sanity checks relevant to the edited files. No Swift tests required unless commands/scripts changed. |
| Shell/script/tooling change | bash -n or equivalent static check, plus a safe dry run or targeted execution. |
| Package business logic | Affected package tests with swift test --package-path Packages/<Package>. |
| CoreData model/repository | scripts/compile_coredata_model.sh, swift test --package-path Packages/EnsemblePersistence, and dependent package tests as needed. |
| UI, navigation, playback, sync workflow, or user-visible bug fix | Affected package tests plus visual runtime validation of the changed flow on each touched platform when feasible. Navigate to the changed surface and exercise the changed behavior; launching the app, landing on the default tab, or checking an unrelated screen is not sufficient. Capture screenshots or equivalent UI inspection evidence; if visual validation is blocked, document the blocker and residual risk. |
| Performance-sensitive SwiftUI/playback/download change | Targeted tests plus simulator/device evidence. Use scripts/capture_performance_gate.sh when changing observation, root chrome, Feed launch/refresh, or Downloads queue behavior. |
| Broad architectural refactor | Tests for new services/repositories, affected package tests, app build, and simulator verification for user-facing paths. |
Every completed turn with code, UI, behavior, script, or policy changes needs targeted verification before handoff. Select the smallest verification that proves the changed contract, but make it specific to the changed area. For example, after fixing Albums on iOS, build/run the iOS app and navigate to Albums to verify the Albums behavior itself; a Feed launch screenshot does not verify an Albums change.
If runtime verification is blocked by credentials, third-party service availability, simulator state, or an external dependency, report the blocker precisely and do not present the task as fully verified.
Required for:
Usually not required for:
For a major architectural feature, test each public service/repository behavior that future refactors could silently break.
# Affected package examples
swift test --package-path Packages/EnsembleAPI
swift test --package-path Packages/EnsembleSupport
swift test --package-path Packages/EnsembleDomain
swift test --package-path Packages/EnsemblePlex
swift test --package-path Packages/EnsembleWatchCore
swift test --package-path Packages/EnsembleCore
swift test --package-path Packages/EnsemblePersistence
swift test --package-path Packages/EnsembleUI
swift test --package-path Packages/EnsembleSiriShared
# Core warning budget for Core refactors
scripts/check_core_warning_budget.sh
# Full app tests
xcodebuild -workspace Ensemble.xcworkspace -scheme Ensemble \
-sdk iphonesimulator \
-destination 'platform=iOS Simulator,name=iPhone 17 Pro' test
Load simulator-test when runtime proof is required. Use the iOS Simulator MCP server to install, launch, inspect accessibility output, drive taps/typing/swipes, and capture screenshots/logs.
Typical expectations:
For macOS-visible UI changes, use the built app with Computer Use, Xcode UI tooling, screenshots, or another direct UI inspection path. A build-only check is not sufficient unless the changed surface cannot be reached because of a documented environment blocker such as missing credentials, unavailable data, or a locked desktop.
Each package owns tests beside its sources:
Packages/EnsembleAPI/Tests/
Packages/EnsembleSupport/Tests/
Packages/EnsembleDomain/Tests/
Packages/EnsemblePlex/Tests/
Packages/EnsembleWatchCore/Tests/
Packages/EnsembleCore/Tests/
Packages/EnsemblePersistence/Tests/
Packages/EnsembleUI/Tests/
Packages/EnsembleSiriShared/Tests/
EnsembleUITests/
Use @testable import for internal package behavior. Prefer protocol mocks for service dependencies and in-memory CoreData stacks for persistence tests. Never use CoreDataStack.shared in tests.
.downloading recovery.Check existing tests before adding new files so coverage stays focused instead of duplicated.