Back to corpus
proposalexperiment writeup candidatescore 18

Stage 0: RESEARCH

**Scale:** 237 Swift files total. BWBCore: 155 files, 43K+ lines, 434 tests passing. BWB_Kiosk: 25 files, 8,456 lines. BWB_POS: 20+ files.

Full HTML reader

Read the full artifact

Open in new tab

Extracted abstract or opening context

**Scale:** 237 Swift files total. BWBCore: 155 files, 43K+ lines, 434 tests passing. BWB_Kiosk: 25 files, 8,456 lines. BWB_POS: 20+ files. **Voice Pipeline (COMPLETE, production-grade):** - 10-component modular voice ordering pipeline decomposed from a 2,464-line monolith - `VoiceOrderingOrchestrator` -- thin coordinator managing state: idle -> listening -> processing -> confirming -> complete - `TranscriptPipeline` -- transcript normalization, stability tracking, session accumulation - `UtteranceCompletionDetector` -- silence/completion via stability count, order-ending phrases - `LiveOrderPreviewGenerator` -- regex-based pattern matching (~50ms latency), menu alias matching - `OrderParsingPipeline` -- HYBRID MERGE strategy: AI + NLU parsers run in parallel, results merged - `CartCoordinator` -- pending vs confirmed cart, clarification flow - `ConfirmationCoordinator` -- auto-confirm at 0.8 confidence after 3-second countdown - `FeedbackCoordinator` -- TTS (AVSpeechSynthesizer), haptics, audio cues (10 audio types, 6 haptic types) - `SessionManager` -- 120-second timeout, activity tracking, session lifecycle - `AudioCaptureController` -- wraps `SpeechAnalyzerService` (iOS 26+) and `LegacyVoiceService` (iOS 17-25) **AI Routing (COMPLETE):** - 12-component architecture decomposed from 7 monoliths (4,059 lines -> 12 focused files) - 6-factor routing: CartAvailability (25%), ComplexityMatch (20%), StaffEfficiency (20%), CustomerLocation (15%), HistoricalPattern (10%), SpaceBalance (10%) - Dynamic + Standard + Fallback routing strategies - LocationService with BLE beacon ranging, trilateration, movement analysis - DrinkComplexityAnalyzer: Simple/Medium/Complex/Premium classification **NLU Engine:** - `EnhancedVoiceNLUEngine.swift` (28K lines) -- full NLU for coffee ordering domain - `VoiceNLUEngine.swift` (33K lines) + vocabulary extension (17K lines) - `AITranscriptParser.swift` (46K lines) -- AI-powered order parsing - Fuzzy matching at 70-80% similarity threshold, Levenshtein distance with weighted penalties - Menu intelligence: handles "large coffee" -> "16oz house blend" mapping **Payment (PARTIAL, 2,937 lines across 6 files):** - `PaymentService.swift` (507 lines) -- Apple Pay + Stripe backend integration - `SquareMobilePaymentHandler.swift` (555 lines) -- Square Mobile Payments SDK (BLE reader pairing, payment flow, reader state management) - `CardPaymentHandler.swift` (347 lines) - `SquareInAppPaymentHandler.swift` (559 lines) - `SquarePaymentTypes.swift` (453 lines) -- full type system for Square integration - `PaymentTypes.swift` (516 lines) - Status: Apple Pay works. Square SDK integrated with `#if canImport(SquareMobilePaymentsSDK)` guards. Stripe PaymentIntent creation via Supabase Edge Functions. Card payment without Apple Pay requires

Promotion decision

What has to happen next

Attach run IDs, datasets, metrics, and reproduction commands.

Why this is not always a full paper yet

Corpus pages are public-safe readers for discovered workspace artifacts. They are not automatically final papers. A corpus item becomes a polished paper only after the editable source, evidence checkpoints, references, figures, render path, and release status are attached through the paper schema.