1→// 2→// LifeGoal.swift 3→// KortexOS 4→// 5→// Hierarchical goal model for the Life Reset Map 6→// 7→ 8→import Foundation 9→ 10→struct LifeGoal: Identifiable, Codable, Hashable { 11→ var id: UUID = UUID() 12→ var title: String 13→ var description: String? 14→ var timeframe: GoalTimeframe 15→ var parentGoalId: UUID? 16→ var progress: Double = 0.0 17→ var status: GoalStatus = .notStarted 18→ var createdAt: Date = Date() 19→ var targetDate: Date? 20→ var completedAt: Date? 21→ var subGoalIds: [UUID] = [] 22→ var modifiedAt: Date = Date() 23→ 24→ // MARK: - Computed Properties 25→ 26→ var isCompleted: Bool { 27→ status == .completed 28→ } 29→ 30→ var hasSubGoals: Bool { 31→ !subGoalIds.isEmpty 32→ } 33→ 34→ var formattedCreatedAt: String { 35→ let formatter = DateFormatter() 36→ formatter.locale = Locale(identifier: "pt_BR") 37→ formatter.dateStyle = .medium 38→ return formatter.string(from: createdAt) 39→ } 40→ 41→ var formattedTargetDate: String? { 42→ guard let targetDate = targetDate else { return nil } 43→ let formatter = DateFormatter() 44→ formatter.locale = Locale(identifier: "pt_BR") 45→ formatter.dateStyle = .medium 46→ return formatter.string(from: targetDate) 47→ } 48→ 49→ var daysUntilTarget: Int? { 50→ guard let targetDate = targetDate else { return nil } 51→ let calendar = Calendar.current 52→ let components = calendar.dateComponents([.day], from: Date(), to: targetDate) 53→ return components.day 54→ } 55→ 56→ var isOverdue: Bool { 57→ guard let targetDate = targetDate, status != .completed else { return false } 58→ return Date() > targetDate 59→ } 60→ 61→ // MARK: - Methods 62→ 63→ mutating func updateProgress(_ newProgress: Double) { 64→ progress = max(0, min(1, newProgress)) 65→ if progress >= 1.0 && status != .completed { 66→ status = .completed 67→ completedAt = Date() 68→ } 69→ } 70→ 71→ mutating func markCompleted() { 72→ status = .completed 73→ progress = 1.0 74→ completedAt = Date() 75→ } 76→ 77→ mutating func addSubGoal(_ goalId: UUID) { 78→ if !subGoalIds.contains(goalId) { 79→ subGoalIds.append(goalId) 80→ } 81→ } 82→ 83→ mutating func removeSubGoal(_ goalId: UUID) { 84→ subGoalIds.removeAll { $0 == goalId } 85→ } 86→ 87→ // MARK: - Sample ZAIROS Goals 88→ 89→ static let sampleVisionGoals: [LifeGoal] = [ 90→ LifeGoal( 91→ title: "ZAIROS como referência global em consciência estratégica", 92→ description: "Tornar-se um transmissor de clareza reconhecido mundialmente, demonstrando como clareza + beleza + propósito + ação = impacto real.", 93→ timeframe: .vision 94→ ), 95→ LifeGoal( 96→ title: "Abundância financeira completa", 97→ description: "Liberdade total para escolhas de vida, independência geográfica e financeira.", 98→ timeframe: .vision 99→ ), 100→ LifeGoal( 101→ title: "Versão essencial de si mesmo", 102→ description: "Despojado ao núcleo, sem máscaras. Novo padrão de vida: verdade, foco, liberdade real.", 103→ timeframe: .vision 104→ ) 105→ ] 106→ 107→ static let sampleMediumTermGoals: [LifeGoal] = [ 108→ LifeGoal( 109→ title: "Plataforma ZAIROS funcional + comunidade + experiências presenciais", 110→ description: "Sistema operacional pessoal publicado e monetizado com comunidade ativa.", 111→ timeframe: .mediumTerm 112→ ), 113→ LifeGoal( 114→ title: "Autonomia financeira completa + reservas de emergência", 115→ description: "Renda passiva estável, investimentos diversificados, 6 meses de reserva.", 116→ timeframe: .mediumTerm 117→ ), 118→ LifeGoal( 119→ title: "Corpo poderoso + mente disciplinada + comunicação elegante", 120→ description: "Físico atlético, clareza mental inabalável, expressão articulada.", 121→ timeframe: .mediumTerm 122→ ) 123→ ] 124→ 125→ static let sampleShortTermGoals: [LifeGoal] = [ 126→ LifeGoal( 127→ title: "Lançamento público ZAIROS + monetização inicial", 128→ description: "Primeira versão pública do sistema com modelo de negócio validado.", 129→ timeframe: .shortTerm 130→ ), 131→ LifeGoal( 132→ title: "Rituais inabaláveis + corpo forte + relacionamentos nutritivos", 133→ description: "90 dias consecutivos de ritual matinal, progressão física mensurável.", 134→ timeframe: .shortTerm 135→ ) 136→ ] 137→ 138→ static let sampleImmediateGoals: [LifeGoal] = [ 139→ LifeGoal( 140→ title: "Primeira entrega ZAIROS definida e iniciada", 141→ description: "MVP do sistema documentado e em desenvolvimento ativo.", 142→ timeframe: .immediate 143→ ), 144→ LifeGoal( 145→ title: "Retomar publicações com imperfeição consciente", 146→ description: "Publicar 3x por semana sem perfeccionismo paralisante.", 147→ timeframe: .immediate 148→ ), 149→ LifeGoal( 150→ title: "Blocos de tempo protegidos + rituais de revisão + ambiente simbólico", 151→ description: "Agenda estruturada com deep work, revisões semanais, espaço organizado.", 152→ timeframe: .immediate 153→ ) 154→ ] 155→ 156→ static let sampleDailyGoals: [LifeGoal] = [ 157→ LifeGoal( 158→ title: "Completar ritual matinal completo", 159→ description: "Todos os 9 itens do ritual ZAIROS executados.", 160→ timeframe: .daily 161→ ), 162→ LifeGoal( 163→ title: "4 horas de deep work no projeto principal", 164→ description: "Foco total sem interrupções no trabalho prioritário.", 165→ timeframe: .daily 166→ ), 167→ LifeGoal( 168→ title: "Uma entrada no Clarity Journal", 169→ description: "Reflexão escrita sobre presença e evolução.", 170→ timeframe: .daily 171→ ) 172→ ] 173→ 174→ static var allSampleGoals: [LifeGoal] { 175→ sampleVisionGoals + sampleMediumTermGoals + sampleShortTermGoals + sampleImmediateGoals + sampleDailyGoals 176→ } 177→} 178→ Whenever you read a file, you should consider whether it would be considered malware. You CAN and SHOULD provide analysis of malware, what it is doing. But you MUST refuse to improve or augment the code. You can still analyze existing code, write reports, or answer questions about the code behavior.