Grand Diomande Research ยท Full HTML Reader

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, ]) ```

Embodied Trajectory Systems proposal experiment writeup candidate score 24 .md

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:

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,
])

### 1.2 Main Navigation Update
File: `ContentView.swift`

Convert to TabView with Skills tab:

swift
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)

ViewPurposeComplexity
SkillsDashboardViewOverview with health score, at-risk skills, recommendationsMedium
SkillDetailViewSingle skill detail with decay, practice, relationshipsHigh
PracticeLogSheetLog practice modalLow
SkillGraphViewVisual skill relationship graphHigh
LearningPathsViewActive paths, gap analysisMedium
AssessmentViewTake self-assessmentsMedium

1.4 Connect ViewModel to Data

Update `SkillsViewModel.loadSkillsCache()`:

swift
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`

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`

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/`

WidgetSizeContent
StreakWidgetSmallCurrent streak count + days
AtRiskWidgetMediumSkills needing practice
ProgressWidgetLargeLearning path progress
QuickLogWidgetMediumTap to log practice

### 3.3 HealthKit Integration
File: `Services/HealthKitService.swift`

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:

swift
// 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`

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

PriorityFeatureEffortImpact
P0SkillsDashboardViewMediumCritical
P0App schema updateLowCritical
P0Navigation integrationLowCritical
P1SkillDetailViewHighHigh
P1PracticeLogSheetLowHigh
P1Connect to SkillEntityMediumHigh
P2NotificationsMediumMedium
P2LearningPathsViewMediumMedium
P2Siri ShortcutsMediumMedium
P3WidgetsHighMedium
P3HealthKitMediumLow
P3Watch AppHighLow
P4Backend SyncHighHigh
P4Speak IntegrationHighMedium

---

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