diff --git a/plugins/compound-engineering/.claude-plugin/plugin.json b/plugins/compound-engineering/.claude-plugin/plugin.json index 27b0fa4..a2e0a2e 100644 --- a/plugins/compound-engineering/.claude-plugin/plugin.json +++ b/plugins/compound-engineering/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "compound-engineering", - "version": "2.14.0", - "description": "AI-powered development tools. 27 agents, 18 commands, 13 skills, 2 MCP servers for code review, research, design, and workflow automation.", + "version": "2.15.0", + "description": "AI-powered development tools. 27 agents, 19 commands, 13 skills, 2 MCP servers for code review, research, design, and workflow automation.", "author": { "name": "Kieran Klaassen", "email": "kieran@every.to", diff --git a/plugins/compound-engineering/CHANGELOG.md b/plugins/compound-engineering/CHANGELOG.md index 192a0b1..216f1be 100644 --- a/plugins/compound-engineering/CHANGELOG.md +++ b/plugins/compound-engineering/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to the compound-engineering plugin will be documented in thi The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2.15.0] - 2025-12-18 + +### Added + +- **`/xcode-test` command** - Build and test iOS apps on simulator using XcodeBuildMCP. Discovers projects/schemes, builds for simulator, installs and launches apps, takes screenshots, captures console logs, and supports human verification for Sign in with Apple, push notifications, and in-app purchases. Checks for XcodeBuildMCP installation first. + ## [2.14.0] - 2025-12-18 ### Added diff --git a/plugins/compound-engineering/README.md b/plugins/compound-engineering/README.md index 4f958b7..23311b9 100644 --- a/plugins/compound-engineering/README.md +++ b/plugins/compound-engineering/README.md @@ -7,7 +7,7 @@ AI-powered development tools that get smarter with every use. Make each unit of | Component | Count | |-----------|-------| | Agents | 27 | -| Commands | 18 | +| Commands | 19 | | Skills | 13 | | MCP Servers | 2 | @@ -96,6 +96,7 @@ Core workflow commands use `workflows:` prefix to avoid collisions with built-in | `/resolve_todo_parallel` | Resolve todos in parallel | | `/triage` | Triage and prioritize issues | | `/playwright-test` | Run browser tests on PR-affected pages | +| `/xcode-test` | Build and test iOS apps on simulator | ## Skills diff --git a/plugins/compound-engineering/commands/xcode-test.md b/plugins/compound-engineering/commands/xcode-test.md new file mode 100644 index 0000000..4a4e7ee --- /dev/null +++ b/plugins/compound-engineering/commands/xcode-test.md @@ -0,0 +1,331 @@ +--- +name: xcode-test +description: Build and test iOS apps on simulator using XcodeBuildMCP +argument-hint: "[scheme name or 'current' to use default]" +--- + +# Xcode Test Command + +Build, install, and test iOS apps on the simulator using XcodeBuildMCP. Captures screenshots, logs, and verifies app behavior. + +## Introduction + +iOS QA Engineer specializing in simulator-based testing + +This command tests iOS/macOS apps by: +- Building for simulator +- Installing and launching the app +- Taking screenshots of key screens +- Capturing console logs for errors +- Supporting human verification for external flows + +## Prerequisites + + +- Xcode installed with command-line tools +- XcodeBuildMCP server connected +- Valid Xcode project or workspace +- At least one iOS Simulator available + + +## Main Tasks + +### 0. Verify XcodeBuildMCP is Installed + + + +**First, check if XcodeBuildMCP tools are available.** + +Try calling: +``` +mcp__xcodebuildmcp__list_simulators({}) +``` + +**If the tool is not found or errors:** + +Tell the user: +```markdown +**XcodeBuildMCP not installed** + +Please install the XcodeBuildMCP server first: + +\`\`\`bash +claude mcp add XcodeBuildMCP -- npx xcodebuildmcp@latest +\`\`\` + +Then restart Claude Code and run `/xcode-test` again. +``` + +**Do NOT proceed** until XcodeBuildMCP is confirmed working. + + + +### 1. Discover Project and Scheme + + + +**Find available projects:** +``` +mcp__xcodebuildmcp__discover_projs({}) +``` + +**List schemes for the project:** +``` +mcp__xcodebuildmcp__list_schemes({ project_path: "/path/to/Project.xcodeproj" }) +``` + +**If argument provided:** +- Use the specified scheme name +- Or "current" to use the default/last-used scheme + + + +### 2. Boot Simulator + + + +**List available simulators:** +``` +mcp__xcodebuildmcp__list_simulators({}) +``` + +**Boot preferred simulator (iPhone 15 Pro recommended):** +``` +mcp__xcodebuildmcp__boot_simulator({ simulator_id: "[uuid]" }) +``` + +**Wait for simulator to be ready:** +Check simulator state before proceeding with installation. + + + +### 3. Build the App + + + +**Build for iOS Simulator:** +``` +mcp__xcodebuildmcp__build_ios_sim_app({ + project_path: "/path/to/Project.xcodeproj", + scheme: "[scheme_name]" +}) +``` + +**Handle build failures:** +- Capture build errors +- Create P1 todo for each build error +- Report to user with specific error details + +**On success:** +- Note the built app path for installation +- Proceed to installation step + + + +### 4. Install and Launch + + + +**Install app on simulator:** +``` +mcp__xcodebuildmcp__install_app_on_simulator({ + app_path: "/path/to/built/App.app", + simulator_id: "[uuid]" +}) +``` + +**Launch the app:** +``` +mcp__xcodebuildmcp__launch_app_on_simulator({ + bundle_id: "[app.bundle.id]", + simulator_id: "[uuid]" +}) +``` + +**Start capturing logs:** +``` +mcp__xcodebuildmcp__capture_sim_logs({ + simulator_id: "[uuid]", + bundle_id: "[app.bundle.id]" +}) +``` + + + +### 5. Test Key Screens + + + +For each key screen in the app: + +**Take screenshot:** +``` +mcp__xcodebuildmcp__take_screenshot({ + simulator_id: "[uuid]", + filename: "screen-[name].png" +}) +``` + +**Review screenshot for:** +- UI elements rendered correctly +- No error messages visible +- Expected content displayed +- Layout looks correct + +**Check logs for errors:** +``` +mcp__xcodebuildmcp__get_sim_logs({ simulator_id: "[uuid]" }) +``` + +Look for: +- Crashes +- Exceptions +- Error-level log messages +- Failed network requests + + + +### 6. Human Verification (When Required) + + + +Pause for human input when testing touches: + +| Flow Type | What to Ask | +|-----------|-------------| +| Sign in with Apple | "Please complete Sign in with Apple on the simulator" | +| Push notifications | "Send a test push and confirm it appears" | +| In-app purchases | "Complete a sandbox purchase" | +| Camera/Photos | "Grant permissions and verify camera works" | +| Location | "Allow location access and verify map updates" | + +Use AskUserQuestion: +```markdown +**Human Verification Needed** + +This test requires [flow type]. Please: +1. [Action to take on simulator] +2. [What to verify] + +Did it work correctly? +1. Yes - continue testing +2. No - describe the issue +``` + + + +### 7. Handle Failures + + + +When a test fails: + +1. **Document the failure:** + - Take screenshot of error state + - Capture console logs + - Note reproduction steps + +2. **Ask user how to proceed:** + ```markdown + **Test Failed: [screen/feature]** + + Issue: [description] + Logs: [relevant error messages] + + How to proceed? + 1. Fix now - I'll help debug and fix + 2. Create todo - Add to todos/ for later + 3. Skip - Continue testing other screens + ``` + +3. **If "Fix now":** + - Investigate the issue in code + - Propose a fix + - Rebuild and retest + +4. **If "Create todo":** + - Create `{id}-pending-p1-xcode-{description}.md` + - Continue testing + + + +### 8. Test Summary + + + +After all tests complete, present summary: + +```markdown +## 📱 Xcode Test Results + +**Project:** [project name] +**Scheme:** [scheme name] +**Simulator:** [simulator name] + +### Build: ✅ Success / ❌ Failed + +### Screens Tested: [count] + +| Screen | Status | Notes | +|--------|--------|-------| +| Launch | ✅ Pass | | +| Home | ✅ Pass | | +| Settings | ❌ Fail | Crash on tap | +| Profile | ⏭️ Skip | Requires login | + +### Console Errors: [count] +- [List any errors found] + +### Human Verifications: [count] +- Sign in with Apple: ✅ Confirmed +- Push notifications: ✅ Confirmed + +### Failures: [count] +- Settings screen - crash on navigation + +### Created Todos: [count] +- `006-pending-p1-xcode-settings-crash.md` + +### Result: [PASS / FAIL / PARTIAL] +``` + + + +### 9. Cleanup + + + +After testing: + +**Stop log capture:** +``` +mcp__xcodebuildmcp__stop_log_capture({ simulator_id: "[uuid]" }) +``` + +**Optionally shut down simulator:** +``` +mcp__xcodebuildmcp__shutdown_simulator({ simulator_id: "[uuid]" }) +``` + + + +## Quick Usage Examples + +```bash +# Test with default scheme +/xcode-test + +# Test specific scheme +/xcode-test MyApp-Debug + +# Test after making changes +/xcode-test current +``` + +## Integration with /workflows:review + +When reviewing PRs that touch iOS code, the `/workflows:review` command can spawn this as a subagent: + +``` +Task general-purpose("Run /xcode-test for scheme [name]. Build, install on simulator, test key screens, check for crashes.") +```