LifeMate — Personal, Family & Learning Companion
docs: specify personalized profile and guidance model
davoodmehraban89 committed
Oct 7, 2026 at 18:34 UTC
50a2ed9760ed303eecac191b7c7955504153051c
1 file changed
+89
docs/superpowers/specs/2026-10-07-personalized-profile-guidance-design.md
new
+89
@@ -0,0 +1,89 @@
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.