# 14. Siri Shortcuts & Intents meta: id: ios-production-14 feature: ios-production priority: P2 depends_on: [] tags: [native-features, siri, production] objective: - Implement Siri Shortcuts and custom intents for common Kordant actions deliverables: - Custom intents for Kordant actions - Siri Shortcuts support - Intent handling in app - Suggested shortcuts steps: 1. Define custom intents: - CheckThreatScoreIntent: "What's my threat score?" - RunSecurityScanIntent: "Run a security scan" - CheckAlertsIntent: "Do I have any security alerts?" - AddWatchlistItemIntent: "Add email to dark web watchlist" - CheckSpamNumberIntent: "Is this number spam?" 2. Create intent definition file: - Add SiriKit intent definition to project - Define parameters for each intent - Add response templates - Localize for supported languages 3. Implement intent handling: - Create IntentHandler extension - Handle each custom intent - Call TRPCBridge to fetch data - Return formatted response to Siri 4. Add shortcuts support: - Donate shortcuts after user performs actions - Add NSUserActivity for eligible actions - Support Add to Siri button in app - Handle intent parameters from shortcuts app 5. Implement suggested shortcuts: - Suggest "Check my threat score" on first launch - Suggest "Run security scan" after onboarding - Suggest "Check alerts" when new alert received 6. Add UI for shortcuts: - Settings section for Siri Shortcuts - List of available shortcuts - Instructions for adding to Siri tests: - Unit: Test intent parameter parsing - Integration: Test Siri response formatting - Device: Test voice commands with Siri acceptance_criteria: - 5+ custom intents defined and working - Siri can respond to "What's my threat score?" - Siri can respond to "Run a security scan" - Shortcuts app can create workflows with Kordant actions - Intents donated after relevant user actions - Suggested shortcuts appear in Siri suggestions - Intent responses formatted naturally - All intents work without opening app (where possible) - Shortcuts settings UI in app - Intents localized for English (expand to other languages later) validation: - Ask Siri "What's my threat score?" → responds with current score - Say "Run a security scan" → scan initiated, confirmation spoken - Create shortcut in Shortcuts app → Kordant actions available - Check Siri suggestions → Kordant shortcuts suggested notes: - SiriKit intents require app to be in foreground for some actions - Custom intents work best for read-only or simple actions - Donate intents frequently so Siri learns user patterns - Test on physical device — simulator Siri support is limited