TrajectoryOS iOS - Production Roadmap
Add new entities to schema: ```swift let schema = Schema([ // Existing LifeStateEntity.self, SkillEntity.self, SkillEvidenceEntity.self, TransitionEntity.self, ProjectEntity.self, ConstraintEntity.self, // NEW - Skills System SkillDecayConfigEntity.self, SkillRelationshipEntity.self, SkillTargetEntity.self, SkillTargetRequirementEntity.self, LearningPathEntity.self, SkillPracticeLogEntity.self, SkillAssessmentEntity.self, SkillDecayAlertEntity.self, ]) ```
Full Public Reader
TrajectoryOS iOS - Production Roadmap
Current Status
### โ
Completed
- SwiftData Entities (7): SkillDecayConfig, SkillRelationship, SkillTarget, LearningPath, SkillPracticeLog, SkillAssessment, SkillDecayAlert
- Services (6): SkillDecay, SkillRelationship, LearningPath, SkillPractice, SkillAssessment, SkillGraph (facade)
- ViewModel: SkillsViewModel with @Observable pattern
### ๐ด Critical Gaps for Production
1. No UI views for Skills System
2. New entities not registered in app schema
3. SkillsViewModel uses sample data (not connected to SkillEntity)
4. No navigation to Skills from main app
5. No notifications for decay alerts
6. No backend sync
---
Phase 1: Core UI & Integration (Critical Path)
### 1.1 App Entry Point Update
File: `TrajectoryOSApp.swift`
Add new entities to schema:
let schema = Schema([
// Existing
LifeStateEntity.self,
SkillEntity.self,
SkillEvidenceEntity.self,
TransitionEntity.self,
ProjectEntity.self,
ConstraintEntity.self,
// NEW - Skills System
SkillDecayConfigEntity.self,
SkillRelationshipEntity.self,
SkillTargetEntity.self,
SkillTargetRequirementEntity.self,
LearningPathEntity.self,
SkillPracticeLogEntity.self,
SkillAssessmentEntity.self,
SkillDecayAlertEntity.self,
])### 1.2 Main Navigation Update
File: `ContentView.swift`
Convert to TabView with Skills tab:
TabView {
DashboardView()
.tabItem { Label("Dashboard", systemImage: "gauge") }
SkillsDashboardView()
.tabItem { Label("Skills", systemImage: "brain") }
LearningPathsView()
.tabItem { Label("Learning", systemImage: "map") }
SettingsView()
.tabItem { Label("Settings", systemImage: "gear") }
}1.3 Skills Views (Priority Order)
| View | Purpose | Complexity |
|---|---|---|
| SkillsDashboardView | Overview with health score, at-risk skills, recommendations | Medium |
| SkillDetailView | Single skill detail with decay, practice, relationships | High |
| PracticeLogSheet | Log practice modal | Low |
| SkillGraphView | Visual skill relationship graph | High |
| LearningPathsView | Active paths, gap analysis | Medium |
| AssessmentView | Take self-assessments | Medium |
1.4 Connect ViewModel to Data
Update `SkillsViewModel.loadSkillsCache()`:
private func loadSkillsCache() async {
guard let container = modelContainer else { return }
let context = ModelContext(container)
let descriptor = FetchDescriptor<SkillEntity>(
sortBy: [SortDescriptor(\.name)]
)
do {
let entities = try context.fetch(descriptor)
skillsCache = entities.map { entity in
(entity.id, entity.name, Int(entity.level), entity.confidence)
}
} catch {
print("Failed to load skills: \(error)")
}
}---
Phase 2: User Experience Polish
### 2.1 Notifications
File: `Services/NotificationService.swift`
actor NotificationService {
func scheduleDecayAlert(_ alert: SkillDecayAlert, skillName: String) async
func schedulePracticeReminder(skillId: UUID, skillName: String) async
func cancelAll(for skillId: UUID) async
}Trigger points:
- Daily decay check finds critical skill
- Skill becomes "at risk" status
- Streak about to break (no practice yesterday)
### 2.2 Haptics & Animations
- Practice logged โ Success haptic + confetti animation
- Streak milestone reached โ Celebration animation
- Skill level up โ Level-up sound + animation
### 2.3 Search & Filter
- Search skills by name
- Filter by domain, level, decay status
- Sort by various criteria
### 2.4 Onboarding
- First-time skills setup wizard
- Import from existing data
- Suggested skill templates
---
Phase 3: Native Apple Integration
### 3.1 Siri Shortcuts (AppIntents)
File: `Intents/SkillIntents.swift`
struct LogPracticeIntent: AppIntent {
@Parameter(title: "Skill") var skillName: String
@Parameter(title: "Duration") var minutes: Int
@Parameter(title: "Activity") var activityType: PracticeActivityType
func perform() async throws -> some IntentResult
}
struct SkillsAtRiskIntent: AppIntent {
func perform() async throws -> some IntentResult & ProvidesDialog
}Phrases:
- "Log 30 minutes of Swift practice"
- "What skills need practice?"
- "Start SwiftUI assessment"
### 3.2 Widgets
Files: `Widgets/SkillsWidgets/`
| Widget | Size | Content |
|---|---|---|
| StreakWidget | Small | Current streak count + days |
| AtRiskWidget | Medium | Skills needing practice |
| ProgressWidget | Large | Learning path progress |
| QuickLogWidget | Medium | Tap to log practice |
### 3.3 HealthKit Integration
File: `Services/HealthKitService.swift`
actor HealthKitService {
func requestAuthorization() async throws
func getSleepQuality(for date: Date) async throws -> Double
func getActivityLevel(for date: Date) async throws -> Double
}Use cases:
- Correlate sleep with learning effectiveness
- Suggest optimal practice times based on energy
- Track practice as "mindful minutes"
### 3.4 Watch App Companion
Directory: `TrajectoryOSWatch/`
Features:
- Current streak complication
- Quick practice logging
- Practice reminder notifications
- Skill status glance
---
Phase 4: Backend Sync & Cloud
### 4.1 API Client Extension
File: `Services/TrajectoryAPIClient.swift`
New endpoints:
// Skills sync
func syncSkills(userId: String, skills: [SkillSyncPayload]) async throws
func fetchSkills(userId: String, since: Date?) async throws -> [SkillSyncPayload]
// Practice sync
func syncPracticeLogs(userId: String, logs: [PracticeLogPayload]) async throws
func fetchPracticeLogs(userId: String, since: Date?) async throws -> [PracticeLogPayload]
// Learning paths sync
func syncLearningPaths(userId: String, paths: [LearningPathPayload]) async throws### 4.2 Sync Engine
File: `Services/SyncEngine.swift`
actor SyncEngine {
func syncAll() async throws
func syncSkills() async throws
func syncPractice() async throws
func resolveConflicts(_ conflicts: [SyncConflict]) async throws
}Conflict resolution:
- Last-write-wins for simple fields
- Merge for practice logs (both sides win)
- User prompt for complex conflicts
### 4.3 Offline Support
- Queue mutations when offline
- Replay queue when online
- Show sync status indicator
---
Phase 5: Advanced Features
### 5.1 Speak Integration
File: `Services/SpeakIntegration/`
- Voice capture for practice notes
- Speak reflections about skills
- AI analysis of practice sessions
### 5.2 Prompt Logs Integration
- Track AI conversations about skills
- Link conversations to practice sessions
- AI coaching recommendations
### 5.3 Analytics & Insights
- Practice trends over time
- Decay prediction models
- Learning velocity calculations
- Skill acquisition patterns
### 5.4 Social Features
- Share skill progress
- Compare with peers (anonymous)
- Skill endorsements
---
Implementation Priority Matrix
| Priority | Feature | Effort | Impact |
|---|---|---|---|
| P0 | SkillsDashboardView | Medium | Critical |
| P0 | App schema update | Low | Critical |
| P0 | Navigation integration | Low | Critical |
| P1 | SkillDetailView | High | High |
| P1 | PracticeLogSheet | Low | High |
| P1 | Connect to SkillEntity | Medium | High |
| P2 | Notifications | Medium | Medium |
| P2 | LearningPathsView | Medium | Medium |
| P2 | Siri Shortcuts | Medium | Medium |
| P3 | Widgets | High | Medium |
| P3 | HealthKit | Medium | Low |
| P3 | Watch App | High | Low |
| P4 | Backend Sync | High | High |
| P4 | Speak Integration | High | Medium |
---
File Structure (Target)
TrajectoryOS/
โโโ TrajectoryOSApp.swift [โ
Update schema]
โโโ ContentView.swift [โ
Add TabView]
โ
โโโ Views/
โ โโโ Dashboard/
โ โ โโโ DashboardView.swift [Existing]
โ โโโ Skills/
โ โ โโโ SkillsDashboardView.swift [NEW]
โ โ โโโ SkillDetailView.swift [NEW]
โ โ โโโ SkillCardView.swift [NEW]
โ โ โโโ SkillGraphView.swift [NEW]
โ โ โโโ PracticeLogSheet.swift [NEW]
โ โ โโโ DecayAlertBanner.swift [NEW]
โ โ โโโ Components/
โ โ โโโ SkillHealthRing.swift [NEW]
โ โ โโโ DecayProgressBar.swift [NEW]
โ โ โโโ StreakBadge.swift [NEW]
โ โ โโโ PracticeActivityPicker.swift [NEW]
โ โโโ Learning/
โ โ โโโ LearningPathsView.swift [NEW]
โ โ โโโ GapAnalysisView.swift [NEW]
โ โ โโโ TargetDetailView.swift [NEW]
โ โโโ Assessment/
โ โ โโโ AssessmentListView.swift [NEW]
โ โ โโโ TakeAssessmentView.swift [NEW]
โ โโโ Settings/
โ โโโ SettingsView.swift [NEW]
โ
โโโ ViewModels/
โ โโโ DashboardViewModel.swift [Existing]
โ โโโ SkillsViewModel.swift [โ
Created]
โ
โโโ Services/
โ โโโ Skills/ [โ
All created]
โ โโโ NotificationService.swift [NEW]
โ โโโ HealthKitService.swift [NEW]
โ โโโ SyncEngine.swift [NEW]
โ
โโโ Intents/
โ โโโ SkillIntents.swift [NEW]
โ
โโโ Widgets/
โโโ SkillsWidgets/ [NEW]---
Testing Strategy
### Unit Tests
- All service methods
- Decay calculations
- Streak calculations
- Domain model conversions
### Integration Tests
- ViewModel โ Service โ Entity flow
- Sync engine conflict resolution
- Notification scheduling
### UI Tests
- Practice logging flow
- Navigation between views
- Accessibility compliance
### Performance Tests
- Large skill graph rendering
- Bulk practice log queries
- Sync performance with 1000+ records
---
Success Metrics
### User Engagement
- Daily active users viewing skills
- Practice sessions logged per week
- Streak retention (7-day, 30-day)
### System Health
- Sync success rate > 99
- App launch time < 2s
- Crash-free sessions > 99.5
### Business Goals
- Skills at risk addressed within 7 days
- Learning path completion rate
- Assessment completion rate
Promotion Decision
Attach run IDs, datasets, metrics, and reproduction commands.
Source Anchor
projects/Documentation/02-projects/ios-app/PRODUCTION_ROADMAP.md
Detected Structure
Method ยท Evaluation ยท Code Anchors ยท Architecture