---
name: multi-platform
description: Build and deploy the same feature consistently across web, mobile, and desktop platforms using API-first architecture and parallel implementation strategies.
Multi-Platform Feature Development Workflow
Build and deploy the same feature consistently across web, mobile, and desktop platforms using API-first architecture and parallel implementation strategies.
[Extended thinking: This workflow orchestrates multiple specialized agents to ensure feature parity across platforms while maintaining platform-specific optimizations. The coordination strategy emphasizes shared contracts and parallel development with regular synchronization points. By establishing API contracts and data models upfront, teams can work independently while ensuring consistency. The workflow benefits include faster time-to-market, reduced integration issues, and maintainable cross-platform codebases.]
Phase 1: Architecture and API Design (Sequential)
1. Define Feature Requirements and API Contracts
- Do this step directly in Codex CLI (legacy playbook referenced subagent: backend-architect).
- Instruction: "Design the API contract for feature: (use the user's prompt). Create OpenAPI 3.1 specification with:
- RESTful endpoints with proper HTTP methods and status codes
- GraphQL schema if applicable for complex data queries
- WebSocket events for real-time features
- Request/response schemas with validation rules
- Authentication and authorization requirements
- Rate limiting and caching strategies
- Error response formats and codes
Define shared data models that all platforms will consume."
- Expected output: Complete API specification, data models, and integration guidelines
2. Design System and UI/UX Consistency
- Do this step directly in Codex CLI (legacy playbook referenced subagent: ui-ux-designer).
- Instruction: "Create cross-platform design system for feature using API spec: [previous output]. Include:
- Component specifications for each platform (Material Design, iOS HIG, Fluent)
- Responsive layouts for web (mobile-first approach)
- Native patterns for iOS (SwiftUI) and Android (Material You)
- Desktop-specific considerations (keyboard shortcuts, window management)
- Accessibility requirements (WCAG 2.2 Level AA)
- Dark/light theme specifications
- Animation and transition guidelines"
- Context from previous: API endpoints, data structures, authentication flows
- Expected output: Design system documentation, component library specs, platform guidelines
3. Shared Business Logic Architecture
- Do this step directly in Codex CLI (legacy playbook referenced subagent: comprehensive-review::architect-review).
- Instruction: "Design shared business logic architecture for cross-platform feature. Define:
- Core domain models and entities (platform-agnostic)
- Business rules and validation logic
- State management patterns (MVI/Redux/BLoC)
- Caching and offline strategies
- Error handling and retry policies
- Platform-specific adapter patterns
Consider Kotlin Multiplatform for mobile or TypeScript for web/desktop sharing."
- Context from previous: API contracts, data models, UI requirements
- Expected output: Shared code architecture, platform abstraction layers, implementation guide
Phase 2: Parallel Platform Implementation
4a. Web Implementation (React/Next.js)
- Do this step directly in Codex CLI (legacy playbook referenced subagent: frontend-developer).
- Instruction: "Implement web version of feature using:
- React 18+ with Next.js 14+ App Router
- TypeScript for type safety
- TanStack Query for API integration: [API spec]
- Zustand/Redux Toolkit for state management
- Tailwind CSS with design system: [design specs]
- Progressive Web App capabilities
- SSR/SSG optimization where appropriate
- Web vitals optimization (LCP < 2.5s, FID < 100ms)
Follow shared business logic: [architecture doc]"
- Context from previous: API contracts, design system, shared logic patterns
- Expected output: Complete web implementation with tests
4b. iOS Implementation (SwiftUI)
- Do this step directly in Codex CLI (legacy playbook referenced subagent: ios-developer).
- Instruction: "Implement iOS version using:
- SwiftUI with iOS 17+ features
- Swift 5.9+ with async/await
- URLSession with Combine for API: [API spec]
- Core Data/SwiftData for persistence
- Design system compliance: [iOS HIG specs]
- Widget extensions if applicable
- Platform-specific features (Face ID, Haptics, Live Activities)
- Testable MVVM architecture
Follow shared patterns: [architecture doc]"
- Context from previous: API contracts, iOS design guidelines, shared models
- Expected output: Native iOS implementation with unit/UI tests
4c. Android Implementation (Kotlin/Compose)
- Do this step directly in Codex CLI (legacy playbook referenced subagent: mobile-developer).
- Instruction: "Implement Android version using:
- Jetpack Compose with Material 3
- Kotlin coroutines and Flow
- Retrofit/Ktor for API: [API spec]
- Room database for local storage
- Hilt for dependency injection
- Material You dynamic theming: [design specs]
- Platform features (biometric auth, widgets)
- Clean architecture with MVI pattern
Follow shared logic: [architecture doc]"
- Context from previous: API contracts, Material Design specs, shared patterns
- Expected output: Native Android implementation with tests
4d. Desktop Implementation (Optional - Electron/Tauri)
- Do this step directly in Codex CLI (legacy playbook referenced subagent: frontend-mobile-development::frontend-developer).
- Instruction: "Implement desktop version using Tauri 2.0 or Electron with:
- Shared web codebase where possible
- Native OS integration (system tray, notifications)
- File system access if needed
- Auto-updater functionality
- Code signing and notarization setup
- Keyboard shortcuts and menu bar
- Multi-window support if applicable
Reuse web components: [web implementation]"
- Context from previous: Web implementation, desktop-specific requirements
- Expected output: Desktop application with platform packages
Phase 3: Integration and Validation
5. API Documentation and Testing
- Do this step directly in Codex CLI (legacy playbook referenced subagent: documentation-generation::api-documenter).
- Instruction: "Create comprehensive API documentation including:
- Interactive OpenAPI/Swagger documentation
- Platform-specific integration guides
- SDK examples for each platform
- Authentication flow diagrams
- Rate limiting and quota information
- Postman/Insomnia collections
- WebSocket connection examples
- Error handling best practices
- API versioning strategy
Test all endpoints with platform implementations."
- Context from previous: Implemented platforms, API usage patterns
- Expected output: Complete API documentation portal, test results
6. Cross-Platform Testing and Feature Parity
- Do this step directly in Codex CLI (legacy playbook referenced subagent: unit-testing::test-automator).
- Instruction: "Validate feature parity across all platforms:
- Functional testing matrix (features work identically)
- UI consistency verification (follows design system)
- Performance benchmarks per platform
- Accessibility testing (platform-specific tools)
- Network resilience testing (offline, slow connections)
- Data synchronization validation
- Platform-specific edge cases
- End-to-end user journey tests
Create test report with any platform discrepancies."
- Context from previous: All platform implementations, API documentation
- Expected output: Test report, parity matrix, performance metrics
7. Platform-Specific Optimizations
- Do this step directly in Codex CLI (legacy playbook referenced subagent: application-performance::performance-engineer).
- Instruction: "Optimize each platform implementation:
- Web: Bundle size, lazy loading, CDN setup, SEO
- iOS: App size, launch time, memory usage, battery
- Android: APK size, startup time, frame rate, battery
- Desktop: Binary size, resource usage, startup time
- API: Response time, caching, compression
Maintain feature parity while leveraging platform strengths.
Document optimization techniques and trade-offs."
- Context from previous: Test results, performance metrics
- Expected output: Optimized implementations, performance improvements
Configuration Options
- --platforms: Specify target platforms (web,ios,android,desktop)
- --api-first: Generate API before UI implementation (default: true)
- --shared-code: Use Kotlin Multiplatform or similar (default: evaluate)
- --design-system: Use existing or create new (default: create)
- --testing-strategy: Unit, integration, e2e (default: all)
Success Criteria
- API contract defined and validated before implementation
- All platforms achieve feature parity with <5% variance
- Performance metrics meet platform-specific standards
- Accessibility standards met (WCAG 2.2 AA minimum)
- Cross-platform testing shows consistent behavior
- Documentation complete for all platforms
- Code reuse >40% between platforms where applicable
- User experience optimized for each platform's conventions
Platform-Specific Considerations
Web: PWA capabilities, SEO optimization, browser compatibility
iOS: App Store guidelines, TestFlight distribution, iOS-specific features
Android: Play Store requirements, Android App Bundles, device fragmentation
Desktop: Code signing, auto-updates, OS-specific installers
Initial feature specification: (use the user's prompt)
Output Format
<result>
<analysis>Brief analysis</analysis>
<solution>Implementation</solution>
<considerations>Trade-offs and notes</considerations>
</result>
1---2name: multi-platform3description: ---4---5---6name: multi-platform7description: Build and deploy the same feature consistently across web, mobile, and desktop platforms using API-first architecture and parallel implementation strategies.8---9# Multi-Platform Feature Development Workflow1011Build and deploy the same feature consistently across web, mobile, and desktop platforms using API-first architecture and parallel implementation strategies.1213[Extended thinking: This workflow orchestrates multiple specialized agents to ensure feature parity across platforms while maintaining platform-specific optimizations. The coordination strategy emphasizes shared contracts and parallel development with regular synchronization points. By establishing API contracts and data models upfront, teams can work independently while ensuring consistency. The workflow benefits include faster time-to-market, reduced integration issues, and maintainable cross-platform codebases.]1415## Phase 1: Architecture and API Design (Sequential)1617### 1. Define Feature Requirements and API Contracts1819- Do this step directly in Codex CLI (legacy playbook referenced subagent: backend-architect).20- Instruction: "Design the API contract for feature: (use the user's prompt). Create OpenAPI 3.1 specification with:21 - RESTful endpoints with proper HTTP methods and status codes22 - GraphQL schema if applicable for complex data queries23 - WebSocket events for real-time features24 - Request/response schemas with validation rules25 - Authentication and authorization requirements26 - Rate limiting and caching strategies27 - Error response formats and codes28 Define shared data models that all platforms will consume."29- Expected output: Complete API specification, data models, and integration guidelines3031### 2. Design System and UI/UX Consistency3233- Do this step directly in Codex CLI (legacy playbook referenced subagent: ui-ux-designer).34- Instruction: "Create cross-platform design system for feature using API spec: [previous output]. Include:35 - Component specifications for each platform (Material Design, iOS HIG, Fluent)36 - Responsive layouts for web (mobile-first approach)37 - Native patterns for iOS (SwiftUI) and Android (Material You)38 - Desktop-specific considerations (keyboard shortcuts, window management)39 - Accessibility requirements (WCAG 2.2 Level AA)40 - Dark/light theme specifications41 - Animation and transition guidelines"42- Context from previous: API endpoints, data structures, authentication flows43- Expected output: Design system documentation, component library specs, platform guidelines4445### 3. Shared Business Logic Architecture4647- Do this step directly in Codex CLI (legacy playbook referenced subagent: comprehensive-review::architect-review).48- Instruction: "Design shared business logic architecture for cross-platform feature. Define:49 - Core domain models and entities (platform-agnostic)50 - Business rules and validation logic51 - State management patterns (MVI/Redux/BLoC)52 - Caching and offline strategies53 - Error handling and retry policies54 - Platform-specific adapter patterns55 Consider Kotlin Multiplatform for mobile or TypeScript for web/desktop sharing."56- Context from previous: API contracts, data models, UI requirements57- Expected output: Shared code architecture, platform abstraction layers, implementation guide5859## Phase 2: Parallel Platform Implementation6061### 4a. Web Implementation (React/Next.js)6263- Do this step directly in Codex CLI (legacy playbook referenced subagent: frontend-developer).64- Instruction: "Implement web version of feature using:65 - React 18+ with Next.js 14+ App Router66 - TypeScript for type safety67 - TanStack Query for API integration: [API spec]68 - Zustand/Redux Toolkit for state management69 - Tailwind CSS with design system: [design specs]70 - Progressive Web App capabilities71 - SSR/SSG optimization where appropriate72 - Web vitals optimization (LCP < 2.5s, FID < 100ms)73 Follow shared business logic: [architecture doc]"74- Context from previous: API contracts, design system, shared logic patterns75- Expected output: Complete web implementation with tests7677### 4b. iOS Implementation (SwiftUI)7879- Do this step directly in Codex CLI (legacy playbook referenced subagent: ios-developer).80- Instruction: "Implement iOS version using:81 - SwiftUI with iOS 17+ features82 - Swift 5.9+ with async/await83 - URLSession with Combine for API: [API spec]84 - Core Data/SwiftData for persistence85 - Design system compliance: [iOS HIG specs]86 - Widget extensions if applicable87 - Platform-specific features (Face ID, Haptics, Live Activities)88 - Testable MVVM architecture89 Follow shared patterns: [architecture doc]"90- Context from previous: API contracts, iOS design guidelines, shared models91- Expected output: Native iOS implementation with unit/UI tests9293### 4c. Android Implementation (Kotlin/Compose)9495- Do this step directly in Codex CLI (legacy playbook referenced subagent: mobile-developer).96- Instruction: "Implement Android version using:97 - Jetpack Compose with Material 398 - Kotlin coroutines and Flow99 - Retrofit/Ktor for API: [API spec]100 - Room database for local storage101 - Hilt for dependency injection102 - Material You dynamic theming: [design specs]103 - Platform features (biometric auth, widgets)104 - Clean architecture with MVI pattern105 Follow shared logic: [architecture doc]"106- Context from previous: API contracts, Material Design specs, shared patterns107- Expected output: Native Android implementation with tests108109### 4d. Desktop Implementation (Optional - Electron/Tauri)110111- Do this step directly in Codex CLI (legacy playbook referenced subagent: frontend-mobile-development::frontend-developer).112- Instruction: "Implement desktop version using Tauri 2.0 or Electron with:113 - Shared web codebase where possible114 - Native OS integration (system tray, notifications)115 - File system access if needed116 - Auto-updater functionality117 - Code signing and notarization setup118 - Keyboard shortcuts and menu bar119 - Multi-window support if applicable120 Reuse web components: [web implementation]"121- Context from previous: Web implementation, desktop-specific requirements122- Expected output: Desktop application with platform packages123124## Phase 3: Integration and Validation125126### 5. API Documentation and Testing127128- Do this step directly in Codex CLI (legacy playbook referenced subagent: documentation-generation::api-documenter).129- Instruction: "Create comprehensive API documentation including:130 - Interactive OpenAPI/Swagger documentation131 - Platform-specific integration guides132 - SDK examples for each platform133 - Authentication flow diagrams134 - Rate limiting and quota information135 - Postman/Insomnia collections136 - WebSocket connection examples137 - Error handling best practices138 - API versioning strategy139 Test all endpoints with platform implementations."140- Context from previous: Implemented platforms, API usage patterns141- Expected output: Complete API documentation portal, test results142143### 6. Cross-Platform Testing and Feature Parity144145- Do this step directly in Codex CLI (legacy playbook referenced subagent: unit-testing::test-automator).146- Instruction: "Validate feature parity across all platforms:147 - Functional testing matrix (features work identically)148 - UI consistency verification (follows design system)149 - Performance benchmarks per platform150 - Accessibility testing (platform-specific tools)151 - Network resilience testing (offline, slow connections)152 - Data synchronization validation153 - Platform-specific edge cases154 - End-to-end user journey tests155 Create test report with any platform discrepancies."156- Context from previous: All platform implementations, API documentation157- Expected output: Test report, parity matrix, performance metrics158159### 7. Platform-Specific Optimizations160161- Do this step directly in Codex CLI (legacy playbook referenced subagent: application-performance::performance-engineer).162- Instruction: "Optimize each platform implementation:163 - Web: Bundle size, lazy loading, CDN setup, SEO164 - iOS: App size, launch time, memory usage, battery165 - Android: APK size, startup time, frame rate, battery166 - Desktop: Binary size, resource usage, startup time167 - API: Response time, caching, compression168 Maintain feature parity while leveraging platform strengths.169 Document optimization techniques and trade-offs."170- Context from previous: Test results, performance metrics171- Expected output: Optimized implementations, performance improvements172173## Configuration Options174175- **--platforms**: Specify target platforms (web,ios,android,desktop)176- **--api-first**: Generate API before UI implementation (default: true)177- **--shared-code**: Use Kotlin Multiplatform or similar (default: evaluate)178- **--design-system**: Use existing or create new (default: create)179- **--testing-strategy**: Unit, integration, e2e (default: all)180181## Success Criteria182183- API contract defined and validated before implementation184- All platforms achieve feature parity with <5% variance185- Performance metrics meet platform-specific standards186- Accessibility standards met (WCAG 2.2 AA minimum)187- Cross-platform testing shows consistent behavior188- Documentation complete for all platforms189- Code reuse >40% between platforms where applicable190- User experience optimized for each platform's conventions191192## Platform-Specific Considerations193194**Web**: PWA capabilities, SEO optimization, browser compatibility195**iOS**: App Store guidelines, TestFlight distribution, iOS-specific features196**Android**: Play Store requirements, Android App Bundles, device fragmentation197**Desktop**: Code signing, auto-updates, OS-specific installers198199Initial feature specification: (use the user's prompt)200## Output Format201202```xml203<result>204 <analysis>Brief analysis</analysis>205 <solution>Implementation</solution>206 <considerations>Trade-offs and notes</considerations>207</result>208```