LifeMate — Personal, Family & Learning Companion

fix/local-task-persistence
chore/phase1-repository-cleanup deploy/stable-web-apk deployment-static design/mobile-accessibility-v2 design/mobile-navigation-review docs/child-education-access-decision docs/offline-data-rescue-options docs/owner-guide-and-delivery-plan docs/phase1-policy-options docs/public-review-live-2026-10-15 feat/aparat-learning-library feat/child-device-safety feat/child-identity-schema feat/flutter-mobile-navigation feat/learning-content-operations feat/local-signing-preflight feat/online-family-stage0 feat/personal-encrypted-recovery feat/private-planner-series-api feat/public-review-page feat/standalone-weekly-planner feat/weekly-planner-android final-feature-1/iran-family-school fix/auth-abuse-expiry-safety fix/auth-expiry-after-lock fix/backend-request-safety fix/lifeguide-bootstrap-naming-ci fix/lifeguide-pages-qa-base-preflight fix/lifeguide-qa-pages-env-deployment fix/local-task-persistence fix/managed-child-session-boundary fix/personal-jalali-dates fix/personal-notification-controls fix/personal-upgrade-delivery-guard fix/sms-approval-gates fix/study-duration-display infra/cloudflare-neon-migration infra/lifeguide-cloudflare-qa infra/lifeguide-github-pages-qa infra/lifeguide-supabase-qa main phase-1/foundation-completion phase-2/product-foundation-identity phase-3/planner-school-family-core phase-4/ai-learning-wellbeing phase-5/hardening-observability-release test/android-reminder-acceptance test/personal-notification-settings test/personal-recovery-acceptance test/role-entry-apk
md 89 lines 6.01 KB
Rendered Raw
1 # Life Guide Personalized Profile & Guidance Design
2
3 **Date:** 2026-10-07
4
5 ## Goal
6 Replace the temporary role-entry model with a durable profile model that distinguishes **فرزند دختر**, **فرزند پسر**, and **بزرگسال**, while keeping the user's editable display name independent from profile type. This profile becomes the basis for relevant calendar/health capabilities and context-aware guidance without encoding behavioral stereotypes.
7
8 ## Current-state findings
9 - The role-entry test build currently offers `فرزند / دانش‌آموز`, `مادر`, and `پدر`.
10 - `LocalRoleTestApi` stores the entry label in a final field, so `updateProfile()` returns an edited name but subsequent `getProfile()` still returns the original label. This explains why a child continues to appear as «فرزند».
11 - The existing PostgreSQL profile already stores `display_name`, `birth_date`, and a theme preference with girl/boy/adult variants, but it has no explicit profile category/sex-context field.
12 - Existing family membership roles (`parent_guardian`, `teen_minor`, `adult_member`) describe authorization/family responsibility and must not be overloaded to represent girl/boy.
13 - Existing wellbeing and AI-guidance flows already separate private notes from guardian summaries; this privacy boundary must be preserved.
14
15 ## Product model
16 ### Profile category
17 The first-run test experience offers exactly:
18 1. **فرزند دختر**
19 2. **فرزند پسر**
20 3. **بزرگسال**
21
22 The profile category is separate from family authorization role. Both child categories map to the minor/student shell; adult maps to the adult shell. Parent/guardian status is assigned inside family management, not on the first screen.
23
24 ### Display name
25 After selecting a profile category, the user can set a display name. It is editable later from the profile area. A name such as «آرام» must persist across navigation and app restart and must replace generic labels such as «فرزند» wherever the personal name is intended.
26
27 ### Personalization
28 Profile category is a capability/context signal, not a personality template.
29 - Girl/boy may select appropriate default visual theme.
30 - Biological/reproductive-health features are opt-in and shown only when relevant to the user's profile and choices.
31 - Menstrual-cycle tracking is never inferred merely from appearance or conversation. It is explicitly enabled by the user, stores sensitive health data separately, and can be disabled.
32 - Psychology, family guidance, and educational guidance may use age, user-stated preferences, goals, current state, and relevant profile context, but must not assume fixed temperament, interests, abilities, or communication style from sex/category alone.
33
34 ## Health calendar
35 Introduce an optional health-calendar capability, initially focused on menstrual-cycle tracking for users for whom it is relevant.
36 - Explicit opt-in before collecting cycle data.
37 - Store cycle dates/settings separately from ordinary planner events.
38 - Default visibility is private.
39 - No raw cycle data is exposed to guardians by default.
40 - Guidance must be educational/supportive and must not diagnose disease or replace professional care.
41 - The ordinary calendar may display private health markers only for the profile owner when enabled.
42
43 ## Guidance
44 The guidance context supplied to AI/advisory services may include only the minimum necessary profile context: age band, profile category when relevant, user communication preferences, current goal/context, and explicitly enabled health context. Sensitive health context is excluded unless the feature and the current interaction require it.
45
46 ## Data architecture
47 Add an explicit profile category field rather than deriving it from theme:
48 - `profile_category`: `girl_minor | boy_minor | adult`
49 - Keep `member_role` unchanged for family authorization.
50 - Keep `theme_preference` independent so users can customize appearance.
51
52 Health-cycle data gets dedicated tables/records with owner-only access semantics and auditability rather than being embedded in generic planner notes.
53
54 ## Test-build persistence
55 The security-bypassed APK remains a test-only entrypoint. Its selected category, display name, and opt-in settings must use local persistent storage so closing/reopening the APK does not reset the profile. Production API-backed behavior remains separate and is not weakened.
56
57 ## UX
58 First run:
59 `انتخاب نوع پروفایل → وارد کردن/تأیید نام → HomeShell`.
60
61 Profile area:
62 - display name
63 - profile category
64 - date of birth/age information where supplied
65 - theme
66 - relevant optional health features
67 - family role/status shown separately
68
69 Changing profile category later requires confirmation because it changes feature availability, but must not delete data silently.
70
71 ## Safety and privacy
72 - Treat reproductive-health and wellbeing content as sensitive.
73 - Minimize collection and sharing.
74 - Child private notes/conversations remain private except already-defined safety-controlled behavior.
75 - No diagnostic claims.
76 - No gender-based psychological stereotyping.
77 - Family permissions remain enforced by membership/guardian relationships, never by profile category.
78
79 ## Acceptance criteria
80 1. Fresh test APK shows exactly «فرزند دختر»، «فرزند پسر»، «بزرگسال».
81 2. User can set «آرام» as display name and sees it after navigation and app restart.
82 3. Girl and boy child profiles both use student navigation; adult uses adult navigation.
83 4. Family authorization remains independent of profile category.
84 5. Theme defaults differ appropriately but are user-changeable.
85 6. Menstrual tracking is opt-in, private by default, and not shown for unrelated profiles unless profile settings are intentionally changed.
86 7. Guidance receives only relevant/minimized context and does not hard-code psychological stereotypes.
87 8. Existing wellbeing privacy behavior remains intact.
88 9. Automated tests cover entry choices, name persistence, shell routing, profile editing, sensitive-feature gating, and privacy boundaries.
89 10. Release APK is built only after Flutter/backend tests pass.