@davoodmehraban89 / LifeMate / commits / d3ce648
Fork 0

LifeMate — Personal, Family & Learning Companion

docs: define reviewed curriculum and family feedback boundaries

Quinn White committed Oct 11, 2026 at 04:58 UTC d3ce64829284aefbd4b8df219d996c20a06f0a6f
9 files changed +535
docs/decisions/0012-aparat-learning-library.md new
+11
@@ -0,0 +1,11 @@
1 +# ADR 0012 — Grade-aware learning catalogue and in-page Aparat
2 +
3 +Date: 2026-10-09. Status: accepted for local implementation; deployment remains gated.
4 +
5 +Feature 1 supplies education profiles and a grade-7 textbook seed but no teaching videos or lesson progress. The owner requests grades1–12 teaching inside LifeGuide, using Aparat embeds without downloading or redirecting by default.
6 +
7 +Extend the existing PostgreSQL curriculum/textbook model with evidence-bearing ordered units/resources and owner-private self-reported progress. Use deterministic imports, expected-version mutations and durable client queues. Reuse canonical planner/study sessions; do not infer learning from playback.
8 +
9 +Use the official HTTPS Aparat player in a click-to-load iframe on web/PWA and an in-page WebView on Android. Accept only a video hash, no arbitrary HTML/URL. Keep credentials and user metadata out of provider requests, suppress referrer, permit only the player frame in the application's frame policy. Aparat is a narrow user-authorized exception to the local-only runtime-assets policy; no external font/CanvasKit/API dependency follows from it.
10 +
11 +Tradeoffs: video streaming cannot be offline; provider advertisements, cookies, removal, availability and network restrictions are outside LifeGuide's control. Metadata/free-access checks do not certify teaching quality. Catalogue counts must disclose missing coverage and edition alignment. Full pedagogical review and Android/Safari acceptance remain UNVERIFIED. No provider account, payment, public deployment or live migration follows from this ADR.
docs/decisions/0013-family-learning-quality-and-feedback.md new
+15
@@ -0,0 +1,15 @@
1 +# ADR 0013 — Evidence of learning, publication review and private family feedback
2 +
3 +Date: 2026-10-09. Status: accepted for local development. Extends ADR0012 following the owner's stricter content requirements.
4 +
5 +LifeGuide serves the whole family. School textbooks from authoritative current Iranian editions anchor school objectives; teaching methods use international learning research. Future parenting, couple communication, sibling relationships and workplace learning are separate age/audience contexts, not school grades or gender stereotypes.
6 +
7 +Video metadata is a research candidate, not approved teaching. Every teaching resource and assessment starts draft. Learner publication requires a recorded full review of current-edition alignment, accuracy, age suitability, explanation/exercises and display rights. Imports cannot publish candidates. The current research has no completed pedagogical video reviews; therefore it must not automatically populate the published player list. Rights and third-party behavior remain explicit.
8 +
9 +Separate self-reported completion, recorded study time and assessment evidence. The assessment foundation grades submitted answers server-side, returns explanatory/remedial feedback, stores versioned owner-private attempts and proposes spaced review. It does not infer comprehension from watching, call a single score mastery, or guarantee understanding. Questions require review before publication. Broader chapter exams, open-answer rubrics and effectiveness measurement remain future acceptance work.
10 +
11 +Feedback to the content team is an explicit, separate submission. No extraction of private AI conversations, notes, health/cycle details or abuse disclosures into product analytics/development occurs. The service stores only a user-chosen minimal summary/category and target; account identity is server-derived. Consent, per-owner access, rate limits, stable mutation IDs and withdrawal are server-enforced. The development loop is request → triage → research brief → owner review → branch/PR/tests → separately approved release. No autonomous live code change, private-data export or notification to another person is authorized by this ADR.
12 +
13 +Age-appropriate AI support remains disabled until provider, consent, privacy and safeguarding gates are met. It must never introduce itself as a psychologist or diagnose. An abuse disclosure needs a distinct reviewed support/safety flow, an appropriate safe adult/professional route and an explicit imminent-danger policy; automatic parental forwarding may harm a child when a caregiver is implicated. This ADR does not implement or certify that flow. Sensitive data residency in-country, licensed specialist review, retention and minor consent remain launch gates.
14 +
15 +Generalized international curricula/providers/languages use separate catalogue context, not changes to the existing repo/schema/JWT names. Public hosting, current-child data migration and commercial release remain unauthorized.
docs/research/aparat-embed-2026-10-09.md new
+132
@@ -0,0 +1,132 @@
1 +# Aparat official embedded player: research and boundary
2 +
3 +Checked on 2026-10-09. This is public-source research and a paused player-frame
4 +probe, followed by client component tests. No video was played, downloaded,
5 +rehosted or transcribed. No provider account, user data or credentials were used.
6 +
7 +## Official frame and sources
8 +
9 +The official JavaScript endpoint
10 +[`https://www.aparat.com/embed/rod03i6`](https://www.aparat.com/embed/rod03i6)
11 +returned HTTP200 over verified HTTPS. It creates an iframe with fullscreen
12 +attributes and this address:
13 +
14 +```text
15 +https://www.aparat.com/video/video/embed/videohash/{videoHash}/vt/frame
16 +```
17 +
18 +The public example `rod03i6` is a 54-second embed-code tutorial, **not an approved
19 +school lesson or a catalog seed**. Its public metadata endpoint
20 +[`/etc/api/video/videohash/rod03i6`](https://www.aparat.com/etc/api/video/videohash/rod03i6)
21 +returned HTTP200; the frame also returned HTTP200. The official embed script
22 +does not add autoplay parameters by default. The frame is a provider-controlled
23 +JavaScript application, not a direct video-file URL.
24 +
25 +Relevant official public sources:
26 +
27 +- [Aparat editorial explanation of embedding](https://aparat.blog/what-is-embed/)
28 + describes the supported embed flow, attribution/view counts, adaptive quality
29 + and optional autoplay settings. It explains embedding videos without hosting
30 + another copy; it does not grant blanket rights to arbitrary third-party lessons.
31 +- [Official upload guidance](https://support.aparat.com/kb/articles/article-94)
32 + describes copyright enforcement and inappropriate-for-children settings.
33 + Those uploader controls do not certify every public video as suitable for minors.
34 +- [Official revenue-sharing page](https://www.aparat.com/income/) establishes
35 + that advertising is part of the provider's service. Exact ad behavior in an
36 + embedded school lesson was not verified.
37 +- [Main-service rules](https://www.aparat.com/etc/main/rules) returned HTTP403;
38 + a search-provider fetch also timed out. The full current terms and privacy
39 + policy remain **UNVERIFIED**. Rules from Aparat Kids/Music were not substituted.
40 +
41 +Keep provider branding and controls. Do not fetch file variants, strip ads,
42 +scrape playback into another player, infer permission from public availability,
43 +or claim ad-free, cookie-free or age-filtered playback. Catalog publishing still
44 +requires separate content suitability and rights review.
45 +
46 +## Client contract
47 +
48 +`AparatPlayer(videoHash: ..., title: ...)` accepts a case-preserving ASCII
49 +alphanumeric hash of 5–64 characters. It rejects URLs, slashes, escapes, query
50 +strings, whitespace and other scripts. The component constructs the official
51 +HTTPS frame URI itself. No caller-supplied HTML, media URL, app token, account ID,
52 +callback URL or autoplay parameter is forwarded.
53 +
54 +The Persian explanation and an explicit **بارگذاری ویدئو از آپارات** button appear
55 +before creating the remote platform view. Selecting another video requires a new
56 +click. Close, route disposal and paused/hidden app lifecycle remove the view.
57 +Load errors and a 30-second frame-document timeout offer an explicit retry;
58 +frame readiness is not reported as successful playback or recorded study.
59 +
60 +Web/PWA uses `HtmlElementView.fromTagName('iframe')`, with restrictions set before
61 +attachment and `src` assignment:
62 +
63 +```text
64 +referrerpolicy="no-referrer"
65 +sandbox="allow-scripts allow-same-origin"
66 +allow="fullscreen; autoplay 'none'; camera 'none'; microphone 'none';
67 + geolocation 'none'; payment 'none'"
68 +allowfullscreen
69 +```
70 +
71 +The cross-origin frame needs scripts and its own origin for provider resources.
72 +Top navigation, popups, downloads and forms are not granted by the sandbox.
73 +The app's CSP needs `frame-src https://www.aparat.com`; app script/connect/font
74 +sources should remain local. The child document has its own network and policy
75 +context. Browsers may fire iframe `load` for a provider error page, so this event
76 +cannot prove media availability or viewing.
77 +
78 +Android uses official `webview_flutter`4.14.1 and Android implementation4.14.1.
79 +JavaScript is enabled for the provider; no JavaScript bridge or app headers are
80 +installed. Media requires a user gesture, third-party cookies and geolocation are
81 +disabled, mixed content is forbidden and permission requests are denied. TLS
82 +errors cancel. Initial controller loading is validated separately because it does
83 +not pass through the navigation delegate.
84 +
85 +Main-document navigation permits only HTTPS, port443, `www.aparat.com` or
86 +`aparat.com`, and the exact selected embed path, with no userinfo/query/fragment.
87 +Other redirects and app protocols are prevented. The native delegate is **not a
88 +CDN/subframe resource firewall**. First-party provider cookies can still exist;
89 +provider-related recommendations, controls and ads remain provider-controlled.
90 +This component must not imply that only the curated lesson can ever be displayed.
91 +The component installs official Android custom-widget callbacks with a presenter
92 +that records its exact fullscreen route. User Back/close/disposal returns the
93 +native custom view once; a repeated provider hide removes only that owned route,
94 +not a different app page. This replaces the plugin's broad default `Navigator.pop`
95 +behavior. Physical fullscreen/back-button behavior remains a device acceptance gate.
96 +
97 +Current direct additions are `web`1.1.1, `webview_flutter`4.14.1 and
98 +`webview_flutter_android`4.14.1; lockfile resolves platform interface2.15.1 and
99 +WKWebView3.27.0. The core package requires Dart3.10+/Flutter3.38+, compatible with
100 +the existing Flutter3.47.6/Dart3.13.5 toolchain. The resolved native implementations
101 +raise lockfile minimums to Flutter3.47/Dart3.13; these are satisfied here.
102 +iPhone/iPad delivery uses the PWA
103 +iframe; a future native iOS build is not accepted by this research. Native desktop
104 +shows an in-page unsupported message instead of launching another application.
105 +
106 +## Actual probe and test limits
107 +
108 +[Sanitized real frame receipt](../audits/evidence/aparat-frame-probe-2026-10-09.json)
109 +records a Playwright1.62.1/system Chromium probe. Only the reserved test wrapper
110 +was intercepted. Aparat's document, scripts, stylesheet, metadata API, font and
111 +poster/profile images used actual HTTPS through the normal proxy, with
112 +`ignoreHTTPSErrors:false` and no TLS bypass. The inspected frame displayed a
113 +paused Play control and `00:54`; it was not clicked.
114 +
115 +Observed: one synthetic wrapper request plus seven real provider/CDN requests;
116 +initial iframe request sent no wrapper Referer; provider child resources used
117 +their own provider Referer. No media request, page/request error or initial cookie
118 +was observed in this fresh browser profile. Playback was deliberately disabled and
119 +media request types/extensions were guarded before fetching. Empty initial cookies
120 +do not establish provider behavior after Play or for an existing browser profile.
121 +
122 +The fixture widget tests verify hash/navigation validation, no remote frame before
123 +consent, failure/retry, selection change, stale callback rejection, close/background
124 +removal, fullscreen route isolation and desktop
125 +fallback. They use a replaceable platform port and **do not prove playback**.
126 +The first widget run found a short-viewport overflow; a scrollable body and visible
127 +close control fixed it. Focused final suite:12/12 passed, zero skips. Platform source
128 +analysis is separate from native Android compilation.
129 +
130 +Actual media streaming, ads/cookies after Play, fullscreen, Android WebView/device
131 +behavior, iPhone/iPad Safari/PWA, VPN-free reachability inside Iran, and the full
132 +latest service terms remain **UNVERIFIED**. No live service or release was changed.
docs/research/aparat-primary-2026-10-09.md new
+59
@@ -0,0 +1,59 @@
1 +# پژوهش کتاب‌ها و آموزش آپارات: ابتدایی، ۲۰۲۶-۱۰-۰۹
2 +
3 +این بستهٔ LifeGuide فقط پژوهش و گردآوری فرادادهٔ عمومی است. **تماشای کامل ویدیو، ارزیابی مستقل صحت تدریس، پخش iframe روی Android/Safari و دسترسی بدون VPN از داخل ایران: UNVERIFIED.** هیچ ویدیویی دانلود، بازنشر یا رونویسی نشده است؛ فقط صفحه، نمایه، API فراداده و فهرست کتاب بررسی شده‌اند. PDF رسمی کتاب برای خواندن فهرست استفاده شد و فایل کتاب در مخزن بازنشر نشده است.
4 +
5 +## خروجی قابل بازتولید
6 +
7 +داده در `backend/content/iran-primary-aparat.json` قرار دارد: **۶۲ کتاب، ۹۰۸ واحد فهرست/صفحه، ۴۹۵ ارجاع ویدیویی با ۴۹۵ شناسهٔ متمایز**. ۴۳۳ ارجاع `metadata_verified` و ۶۲ ارجاع `index_verified` هستند. همهٔ `pedagogicalReview`ها `unverified` باقی مانده‌اند؛ ارجاع نمایه‌ای رایگان‌بودن/مدت `null` دارد. کتاب یا واحد بی‌ویدیو، دورهٔ ویدیویی کامل محسوب نمی‌شود.
8 +
9 +| پایه | کتاب/نسخهٔ رسمی | واحد فهرست/صفحه | ارجاع ویدیو |
10 +|---|---:|---:|---:|
11 +| ۱ | ۱۳ | ۴۴ | ۳ |
12 +| ۲ | ۸ | ۱۷۶ | ۱۱۷ |
13 +| ۳ | ۹ | ۱۸۴ | ۱۰۲ |
14 +| ۴ | ۱۰ | ۲۱۴ | ۱۴۷ |
15 +| ۵ | ۱۰ | ۷۰ | ۴ |
16 +| ۶ | ۱۲ | ۲۲۰ | ۱۲۲ |
17 +
18 +اعتبارسنجی واقعی JSON با Python اجرا شد: یکتایی کد/نسخه و کلید واحد، پایه۱–۶، سال واقعی، شناسهٔ bounded alphanumeric آپارات، URL کانال، مدت مثبت/نامعلوم، حذف410 و نبود URL مستقیم رسانه بررسی شد. خروجی: `PASS public research JSON validation: 62 books, 908 units, 495 video references; no direct video URLs/binary media`. این بررسی ساختار/فراداده است و آزمون importer یا پخش محسوب نمی‌شود.
19 +
20 +۲۰ درخواست Exa Search با `numResults=10` انجام شد: **sources_reviewed = Σ numResults = ۲۰۰**. این شمارش، نتایج نامرتبط را هم طبق تعریف مهارت Search شامل می‌شود و به معنای ۲۰۰ مدرس یا ۲۰۰ منبع تأییدشده نیست. محورهای جست‌وجو: شناسایی رسمی پایه۱–۶، مجموعه‌های صفحه‌ای محسن نجفی، فارسی/علوم/قرآن/اجتماعی ابتدایی، و مقایسهٔ مدرس/پلی‌لیست. Fetchهای بعدی در این عدد جمع نشده‌اند.
21 +
22 +۶۲ صفحهٔ جزئیات رسمی کتاب با پاسخ۲۰۰ خوانده شد. سال هرکدام **۱۴۰۵–۱۴۰۶** بود؛ کد و عنوان از همان صفحه ثبت شد. از ۱۸ PDF فارسی/ریاضی/علوم و ۱۷ PDF قرآن/هدیه/اجتماعی/پژوهش/فناوری، فقط ۱۵ صفحهٔ نخست برای مشخصات و فهرست متن‌خوانی شد. تصویر فهرست علوم۱، صفحه۹ PDF، نیز برای ترتیب درس‌های۱۰–۱۴ مشاهده شد. این کار، بازبینی کامل کتاب یا تطبیق کامل محتوای تدریس نیست.
23 +
24 +## منابع رسمی و تفاوت نسخه‌ها
25 +
26 +- [فهرست رسمی کتاب‌های درسی](http://www.chap.sch.ir/school-books): کشف عنوان‌ها و صفحات جزئیات.
27 +- [فارسی اول استاندارد، کد۱۰۳](http://www.chap.sch.ir/books/14143)، [علوم اول، کد۱۰۶](http://www.chap.sch.ir/books/14146)، [ریاضی چهارم، کد۴۰۵](http://www.chap.sch.ir/books/14168)، [ریاضی پنجم، کد۵۰۵](http://www.chap.sch.ir/books/14177)، [علوم سوم، کد۳۰۶](http://www.chap.sch.ir/books/14160): نمونه‌های اتصال مستقیم؛ URL و PDF هر کتاب داخل داده موجود است. HTTP منبع تاریخی/رسمی حفظ شده؛ URL پخش آپارات فقط HTTPS است.
28 +- کدهای آزمایشی پایه۱ در صفحهٔ خلاصه قدیمی بودند. صفحات جاری کدهای **۱۰۱۱،۱۰۳۱،۱۰۴۱،۱۰۵۱،۱۰۶۱،۱۰۸۱،۱۰۹۱** را تأیید کردند: نمونه [فارسی می‌خوانم۱۰۳۱](http://www.chap.sch.ir/books/15022)، [ریاضی دوست‌داشتنی۱۰۵۱](http://www.chap.sch.ir/books/15023). راهنمای اولیا۱۹۴۱ جداست. این نسخه‌ها و نسخه‌های ویژهٔ اهل سنت/اقلیت دینی، با استاندارد مخلوط نشده‌اند و ویدیو استاندارد به آن‌ها منتقل نشده است.
29 +- ریاضی پنجم فایل **C505-New.pdf** با ۲۰۸ صفحه دارد. نمایهٔ مدرس هنوز صفحه۲ را آغاز آموزش معرفی می‌کند، درحالی‌که درس ابتدایی کتاب جدید از صفحه۱۲ است. **۷۹ پیوند صفحه‌ای آن نمایه حذف از نگاشت چاپ جاری** شدند؛ سه نامزد فصل۱/موضوع گنجایش فقط در سطح موضوع فصل و با هشدار تطبیق کامل چاپ UNVERIFIED افزوده شدند.
30 +- در علوم سوم جاری، «مواد اطراف ما» **درس۴** است. ویدیوهای `tdw29go` و `n49ptt9` با برچسب درس۳ به واحد جدید متصل نشدند؛ `vldva17` با عنوان درس۴ انتخاب شد.
31 +
32 +## مقایسهٔ نامزدهای رایگان
33 +
34 +رایگان‌بودن یعنی API عمومی آپارات در زمان بررسی `cost_type=free` و `watch_action=watch` برگرداند؛ تضمین حذف‌نشدن، نبود تبلیغ یا دسترسی همیشگی نیست. کیفیت صدا، روش توضیح، صحت حل و میزان یادگیری بدون تماشای انسانی **UNVERIFIED** است. «بهترین مدرس برای همه» ادعا نمی‌شود.
35 +
36 +| نامزد | شواهد پوشش و تطبیق | انتخاب و محدودیت |
37 +|---|---|---|
38 +| [محسن نجفی](https://www.aparat.com/mohsen_najafi78) | نمایه‌های [دوم](https://mohsennajafi.ir/post/618)، [سوم](https://mohsennajafi.ir/post/638)، [چهارم](https://mohsennajafi.ir/post/621)، [پنجم](https://mohsennajafi.ir/post/620)، [ششم](https://mohsennajafi.ir/post/622)، مجموع۵۵۴ ردیف | اولویت پژوهشی برای پوشش صفحه‌ای۲/۳/۴/۶؛ پس از حذف پنجم/410/دو اختلاف شماره،۴۷۲ ردیف نگاشت شد. عنوان حل تمرین شاهد وجود توضیح است؛ کیفیت آموزش و کامل‌بودن چاپ جاری تأیید نشده. |
39 +| [مدرسه من](https://www.aparat.com/mmadresehman) | فرادادهٔ فصل۱ و۲ ریاضی۴، مدت۲۹۷۷ و۱۲۵۳ثانیه، رایگان | نامزد مقایسهٔ توضیح فصل؛ دورهٔ کامل احراز نشد. |
40 +| [ریاضی با خانم صفری](https://www.aparat.com/Mahtab_Safari) | فصل۱ ریاضی۵ «عددنویسی»،۵۵۲۴ثانیه، رایگان | موضوع فصل با فهرست جاری سازگار؛ تطبیق تمرین/چاپ جدید UNVERIFIED. |
41 +| [آموزگار ناصری](https://www.aparat.com/naseri_teacher) | فارسی۳، درس۱ «محله ما»، عنوان جدید،۳۵۹ثانیه، رایگان | اتصال دقیق عنوان/شماره؛ نمونهٔ یک درس، نه کتاب کامل. |
42 +| [محمد آهنگر داودی](https://www.aparat.com/madavoodi) | فارسی۴ درس۱، علوم۳ درس۴، قرآن۴ درس۳/جلسه۳؛ فراداده هر سه رایگان | عنوان/پایه/درس بررسی شد؛ گسترهٔ کامل کتاب و کیفیت تدریس UNVERIFIED. |
43 +| [یادگیری هوشمند](https://www.aparat.com/smart_learning) | فارسی۲ «کتابخانه کلاس ما»،۱۵۲ثانیه | محتوای کمکی واژه/روخوانی؛ آموزش جامع درس فرض نمی‌شود. |
44 +| [گنجینه آموزش قرآن](https://www.aparat.com/moalem_quran) | فرادادهٔ ویدیوی گستردهٔ درس۱–۷ قرآن۴،۱۷۰۹ثانیه | به هفت درس مستقل تکثیر نشد. پلی‌لیست روش تدریس آموزگار به‌جای دورهٔ دانش‌آموز انتخاب نشد. |
45 +
46 +## نتیجهٔ پیمایش فراداده و رد نگاشت
47 +
48 +۵۵۴ endpoint فرادادهٔ نمایه‌ها خوانده شد:۴۱۲ پاسخ معتبر،۱۴۱ پاسخ429 و یک410. پس از فاصله،۳۶ نامزد مستقیم جست‌وجو به‌صورت آهسته بررسی شدند و هر۳۶ فراداده معتبر دادند؛۲۳ مورد مکمل با نگاشت دقیق پذیرفته شد. نمونهٔ [endpoint فرادادهٔ صفحه۲ ریاضی۲](https://www.aparat.com/etc/api/video/videohash/vvo9vt9) شامل عنوان/کانال/مدت/وضعیت رایگان است. خروجی API می‌تواند URL فایل ویدیو هم داشته باشد؛ آن URLها دانلود یا در داده نگهداری نشدند.
49 +
50 +- `rvpj8z1`، صفحه۱۳۹ ریاضی۲:410؛ حذف شد.
51 +- `g275823`: نمایه صفحه۳۲ اما عنوان API صفحه۲۳. `Eukq6`: نمایه۶۶/۶۷ اما API۶۷/۶۸. هر دو کنار گذاشته شدند.
52 +- ۷۹ مورد429 مربوط به نمایهٔ پنجمِ ناسازگار بود. **۶۲ مورد429 ریاضی۴ فقط در سطح نمایه** پذیرفته شد؛ خطای429 به معنای لینک مرده نیست، اما تأیید پخش هم نیست. UI باید وضعیت سطح تأیید/دسترسی نامعلوم را نشان دهد.
53 +- پلی‌لیست‌های4656696،588438 و1284316 صفحهٔ عمومی داشتند، ولی fetch محتوای همهٔ آیتم‌ها را روشن نکرد؛ کامل‌بودن آن‌ها UNVERIFIED. پلی‌لیست7064138 دربارهٔ روش تدریس آموزگاران است.
54 +
55 +## شکاف‌های باقی‌مانده
56 +
57 +کاتالوگ رسمی برای هر شش پایه دارد؛ پوشش ویدیویی کامل برای هر کتاب ندارد. ریاضی۱، نگارش، خط تحریری، چاپ‌های آزمایشی/دینی، پژوهش/مهارت‌های فناوری و بیشتر درس‌های فارسی/علوم۵/۶ هنوز نیازمند گردآوری و بازبینی انسانی هستند. واحدهای اصلی فارسی/علوم با توالی رسمی ثبت شدند؛ اجزای فرعی شعر/تمرین/جلسه/پروژه ادعای پوشش کامل ندارند. برای قرآن۴/۵/۶، شمارهٔ درس از فهرست رسمی ثبت شده و عنوان کلی «درسN» جای نقل نام سوره/جلسهٔ نامطمئن را گرفته است.
58 +
59 +برای پذیرش واقعی باید نمونه‌های هر مدرس روی دستگاه پخش شوند؛ صحت توضیح، سازگاری با نسخه/صفحه، وضوح تصویر/صدا، نبود پیش‌نمایش پولی و ترتیب کل مجموعه بررسی و جداگانه ثبت شود. این بسته فقط فراداده است و ادعای اجرای importer، آزمون Backend، Build یا پذیرش دستگاه ندارد.
docs/research/aparat-secondary-2026-10-09.md new
+49
@@ -0,0 +1,49 @@
1 +# پژوهش کتاب‌های مدرسه و آموزش آپارات — ۲۰۲۶-۱۰-۰۹
2 +
3 +داده قابل واردسازی در [iran-secondary-aparat.json](../../backend/content/iran-secondary-aparat.json) شامل **۱۵۵ ردیف کتاب/پایه، ۴۶ کتاب دارای واحد، ۴۶۵ واحد و ۸۵۳ شناسه ویدیوی یکتا** است. از این تعداد، **۲۶۶ ویدیو** با API عمومی تک‌ویدیو و وضعیت رایگان تأیید شدند؛ **۵۸۷ مورد** فقط از نمایه یا فهرست ارائه‌دهنده شناسایی شدند و `freeAccess:null` دارند. این آمار پوشش کامل همه دروس، تماشای تدریس، کیفیت آموزشی یا موفقیت پخش تعبیه‌شده را اثبات نمی‌کند.
4 +
5 +این فایل فقط پایه‌های ۷ تا ۱۲ را پوشش می‌دهد؛ کاتالوگ ابتدایی به‌طور مستقل تهیه می‌شود. هر سه رشته نظری ریاضی، تجربی و انسانی ثبت شده‌اند. کتاب بدون ویدیو حذف نشده تا کمبود واقعی در محصول دیده شود. رشته‌های فنی‌وحرفه‌ای، کاردانش و علوم‌ومعارف اسلامی، همه محتوای تکمیلی تیزهوشان و نسخه‌های دینی هنوز پوشش کامل ندارند.
6 +
7 +| پایه | ردیف کتاب/پایه | ردیف رشته ریاضی | ردیف رشته تجربی | ردیف رشته انسانی |
8 +|---|---:|---:|---:|---:|
9 +| ۷ | ۲۳ | مشترک | مشترک | مشترک |
10 +| ۸ | ۲۳ | مشترک | مشترک | مشترک |
11 +| ۹ | ۲۰ | مشترک | مشترک | مشترک |
12 +| ۱۰ | ۲۸ | ۱۸ | ۱۸ | ۱۸ |
13 +| ۱۱ | ۳۲ | ۱۹ | ۱۸ | ۱۷ |
14 +| ۱۲ | ۲۹ | ۱۷ | ۱۶ | ۱۷ |
15 +
16 +کتاب مشترک بین رشته‌ها یک ردیف با چند `trackCodes` دارد؛ بنابراین ستون‌های رشته با تعداد ردیف یکتا برابر نیستند. کد ۷۶۵ نیز در فهرست رسمی هر سه پایه متوسطه اول تکرار شده و در داده با پایه جدا حفظ شده است. کتاب‌های آزمایشی، دینی و تیزهوشان با `variant` مشخص شده‌اند؛ عنوان نسخه دختران/پسران در عنوان کتاب باقی می‌ماند.
17 +
18 +## روش و محدوده تأیید
19 +
20 +مهارت [Search](skill://plugin_asdk_app_69ea4ed2cf7c8191b742ef3622479ddd/Search/SKILL.md) و راهنماهای searching/source-quality آن به‌کار رفت. `sourcesReviewed:720` دقیقاً جمع `numResults` درخواست‌شده در جستجوهای Exa است: **۱۵۰ پژوهش اصلی + ۲۰۰ متوسطه اول + ۳۷۰ انسانی (۲۷۰ پژوهش انسانی و ۱۰۰ زیرپژوهش منطق/روان‌شناسی)**. این عدد تعداد منبع یکتای مطالعه‌شده یا درس تماشاشده نیست. Fetch و درخواست‌های API در این شمارش جستجو وارد نشده‌اند.
21 +
22 +منابع رسمی عنوان و کد کتاب با منابع اصلی مدرس/ناشر برای ترتیب درس، و API عمومی آپارات برای عنوان، مدت، کانال، alias و رایگان بودن ترکیب شدند. پس از پاسخ‌های HTTP429، بررسی‌های حجیم متوقف شد و موارد باقی‌مانده نامشخص ثبت شدند. هیچ درخواست حساب، خرید، تغییر سرویس یا دسترسی به داده دانش‌آموز انجام نشد.
23 +
24 +`metadata_verified` فقط مشاهده فراداده عمومی تک‌ویدیو است؛ `index_verified` مشاهده عنوان/شناسه در نمایه ارائه‌دهنده است. هیچ موردی `embed_verified` یا دارای ارزیابی آموزشی تأییدشده نیست. `checkedAt` زمان واقعی مشاهده یا بازبینی منبع ثبت‌شده است؛ محدودیت زمان بازیابی دسته اولیه متوسطه اول در یادداشت همان موارد آمده است. هش قدیمی منبع حفظ می‌شود و شناسه canonical فقط در صورت مشاهده نگاشت واقعی API ذخیره شده است.
25 +
26 +## چاپ کتاب و ترتیب
27 +
28 +فهرست‌های رسمی تاریخ چاپ هر ردیف را مشخص نمی‌کردند و بعضی صفحه‌بندی یا موارد تاریخی دارند. وجود گزینه ۱۴۰۵–۱۴۰۶ در منوی سالِ بعضی صفحات دلیل چاپ همان سال برای هر کتاب نیست. همه ردیف‌های این فایل `schoolYear:null` و `editionVerification:unverified` دارند. راهنماهای رسمیِ تاریخی روی میزبان ثانویه و فهرست‌های ۱۴۰۰–۱۴۰۱ برای تکمیل عنوان/کد با هشدار ثبت شده‌اند؛ به چاپ جاری تبدیل نشده‌اند.
29 +
30 +شماره صفحه، فصل و درس در منابع، ترتیب ارائه‌دهنده است (`provider_index`)؛ با فهرست رسمی چاپ جاری تطبیق داده نشده است. واحدهای مرور/نمونه آزمون زبان نهم عنوان مستقل دارند و نباید درس رسمی جدید تلقی شوند. موارد مبهم مانند فارسی هشتم/نهم، عنوان متفاوت افعال باقاعده/بی‌قاعده و نمونه مشترک پایه ۹/۱۰ در یادداشت کیفیت مشخص هستند. ورود از وسط سال با انتخاب واحد فراهم می‌شود، اما محصول باید هشدار انطباق چاپ را نشان دهد.
31 +
32 +## نمونه منابع و شکاف‌ها
33 +
34 +- [فهرست رسمی متوسطه اول](http://www.chap.sch.ir/guide-books): عنوان/کد کتاب‌های ۷ تا ۹ و نسخه‌ها.
35 +- [جستجوی رسمی کتاب](http://www.chap.sch.ir/advanced-search2) و [پایه دوازدهم تجربی](http://chap.sch.ir/category/%D8%AF%D9%88%D8%B1%D9%87/712): مرجع کاتالوگ، همراه صفحات رشته دهم/یازدهم ثبت‌شده در داده.
36 +- [فهرست ریاضی هفتم محسن نجفی](https://www.mohsennajafi.ir/post/623) و [ریاضی هشتم](https://www.mohsennajafi.ir/post/680): ۱۱۴ و ۱۴۱ پیوند صفحه/فصل؛ این تعداد دلیل انطباق با چاپ جدید یا مرور آموزشی کامل نیست.
37 +- [فهرست مدرس زبان/عربی](https://eitaa.com/haghnevisenglish/742): شش نشانی فهرست پخش متوسطه اول؛ ۳۴ شناسه نمایه انگلیسی نهم با فراداده رایگان بررسی شدند. محتوای سایر فهرست‌های پخش در Fetch به پوسته برنامه محدود شد.
38 +- [علوم دانش‌پسند](https://daneshpasand.ir/filmoloom7th/) و [فهرست پخش علوم هشتم](https://www.aparat.com/playlist/11356052): فصل‌های شماره‌دار و نمونه‌های رایگان؛ فایل‌های جانبی می‌توانند پولی باشند. پوشش ویدیو علوم نهم کامل تأیید نشده است.
39 +- [منطق Koosheh_com](https://www.aparat.com/Koosheh_com) و [روان‌شناسی واقفی](https://www.aparat.com/vaghefi): فراداده رایگان هر ۱۰ درس منطق و ۱۶ قسمت روان‌شناسی بررسی شد؛ کامل بودن تدریس داخل هر درس یا چاپ جاری احراز نشده است.
40 +- [جامعه‌شناسی](https://www.aparat.com/Jamee_shenase): شماره‌های درس ۱۰ تا ۱۲ شناسایی شدند. نمونه درس ۱۴ دهم فقط ۱۱۴ ثانیه است و به‌عنوان قطعه کوتاه ثبت شده؛ وجود شماره همه درس‌ها معادل آموزش کامل کتاب نیست.
41 +- [فیزیک قاسمی](https://www.aparat.com/ghasemiphysic)، [ریاضی هادی اسدی](https://www.aparat.com/Asadi_math)، [شیمی جشانی‌پور](https://www.aparat.com/Ahmadrezajashanipoor): بخشی از صفحات/فصل‌های متوسطه دوم؛ شیمی جشانی‌پور تا جلسه ۱۸ و شروع هواکره مشاهده شد و دوره کامل فرض نشده است.
42 +
43 +نمونه‌های رایگان فولیتو و علوم‌وفنون سلام هدف، دوره کامل رایگان محسوب نشده‌اند. [صفحه اصلی فولیتو](https://fullito.org/first-chapter-12th-biology/) فقط بخش ابتدایی زیست دوازدهم را رایگان و ادامه را پولی معرفی می‌کند. بازنشر زیست در کانال شیمی با مهرزاد به دلیل نامشخص بودن منشأ اصلی وارد نگاشت نشد. نمونه فلسفه با کانال تأییدنشده کنار گذاشته شد. برای قرآن، دین، نگارش، هنر، فناوری، دفاعی و چند کتاب عمومی متوسطه دوم کمبود ویدیو باقی است.
44 +
45 +فقط هش، عنوان کوتاه درس، اعتبار مدرس، منبع و محدودیت بررسی ذخیره شد؛ هیچ فایل ویدیو، CDN/نشانی فایل رسانه یا رونوشت کامل درس ذخیره، دانلود یا بازنشر نشده است. دسترسی بدون VPN از ایران، تبلیغ/کوکی آپارات، پخش Android/Safari و دسترس‌پذیری عملی هنوز **تأییدنشده** هستند. واردسازی این داده باید محلی و بدون درخواست شبکه باشد؛ آماده بودن فایل پژوهش مجوز انتشار یا تغییر میزبان زنده نیست.
46 +
47 +## وضعیت انتشار پس از الزام بازبینی کامل
48 +
49 +همه ۸۵۳ مرجع این پژوهش **پیش‌نویس و بازبینی‌نشده** هستند. تأیید رایگان بودن یا نمایه/فراداده برای انتشار آموزشی کافی نیست؛ در API دانش‌آموز، ویدیو فقط با وضعیت منتشرشده و بازبینی کامل معتبر ارائه می‌شود. بازبینی باید دیدن کامل ویدیو، نام بازبین و زمان، چاپ/واحد منطبق، صحت و تناسب آموزشی، مجوز تعبیه و پوشش سؤال را ثبت کند. هیچ درس واقعی تأیید یا منتشر نشده و هیچ endpoint انتشار ساخته نشده است. هش ثبت‌شده برای اعتبار بازبینی، خلاصه فراداده کتاب/واحد/ویدیو است؛ هش فایل رسانه یا شاهد تماشای تدریس نیست.
docs/research/learning-evidence-2026-10-09.md new
+29
@@ -0,0 +1,29 @@
1 +# مبنای آموزش و سنجش لایف‌گاید
2 +
3 +بررسی واقعی وب در ۲۰۲۶-۱۰-۰۹: سه جست‌وجوی پنج‌نتیجه‌ای روش‌های یادگیری و دو جست‌وجوی پنج‌نتیجه‌ای منابع جایگزین؛ `sources_reviewed=25` تعداد نتایج درخواستی است، نه تعداد منابع مستقلی که تدریسشان تماشا شده. چهار صفحه اصلی آموزشی با fetch خوانده شد؛ fetch صفحه parenting یونیسف timeout شد و بررسی آن **UNVERIFIED** است.
4 +
5 +## روش آموزشی
6 +
7 +| منبع اصلی | نتیجه قابل استفاده | محدودیت |
8 +|---|---|---|
9 +| [IES/WWC، Organizing Instruction and Study، ۲۰۰۷](https://ies.ed.gov/ncee/WWC/PracticeGuide/1) | مرور با فاصله، بازیابی فعال با کوییز، مثال حل‌شده همراه حل مستقل، توضیح چرایی و پیوند نمایش عینی و انتزاعی | پیشنهاد پژوهشی برای طراحی است؛ تضمین فهم تک‌تک دانش‌آموزان یا اعتبار آزمون ما نیست. |
10 +| [EEF، بازخورد، ۲۰۲۱](https://educationendowmentfoundation.org.uk/education-evidence/guidance-reports/feedback) | بازخورد باید سوءبرداشت را روشن کند و فرصت استفاده از آن بدهد؛ صرف نمایش درست/غلط کافی نیست. | خود راهنما هشدار می‌دهد بازخورد نامناسب می‌تواند به پیشرفت آسیب بزند. |
11 +| [EEF، فراشناخت و یادگیری خودتنظیم، ۲۰۲۵](https://educationendowmentfoundation.org.uk/education-evidence/guidance-reports/metacognition) | هدف‌گذاری، پایش و ارزیابی درون همان درس؛ توضیح راهبرد و کاهش تدریجی کمک | صفحه اصلی خوانده شد؛ ارزیابی اثربخشی مخصوص لایف‌گاید هنوز انجام نشده است. |
12 +| [Khan Academy، Course and Unit Mastery](https://support.khanacademy.org/hc/en-us/articles/115002552631-What-are-Course-and-Unit-Mastery) | تفکیک تمرین، کوییز، آزمون واحد و مرور مهارت؛ پیشنهاد بازگشت به درس بر اساس پاسخ‌ها | الگوی محصول است؛ امتیازها/آستانه‌ها را بدون اعتبارسنجی کپی نمی‌کنیم. |
13 +
14 +چرخه مطلوب هر درس: هدف و پیش‌نیاز → پرسش مقدماتی کم‌فشار → آموزش بازبینی‌شده → مثال و تمرین مستقل → کوییز با توضیح خطا → تمرین اصلاحی → مرور بعدی → سنجش ترکیبی فصل و کاربرد در مسئله جدید. پاسخ درست، اعتمادبه‌نفس، زمان تایمر و گزارش تکمیل چهار داده متفاوت‌اند. هیچ‌یک به‌تنهایی «فهم کامل» یا اثبات مطالعه نیست. کودک نباید با آزمون تنبیه، شرمنده یا در یک مسیر غیرقابل‌تغییر قفل شود.
15 +
16 +آزمون کوتاه موتور اولیه، شمار پاسخ‌های درست و بازخورد را ثبت می‌کند؛ سنجش پاسخ تشریحی، کیفیت بانک سؤال، اعتبار روان‌سنجی، تعمیم یادگیری، دسترس‌پذیری و اثربخشی واقعی هنوز **UNVERIFIED** است. فاصله پیشنهادی اولیه برای مرور یک سیاست قابل تنظیم محصول است، نه زمان علمی بهینه برای همه سنین/درس‌ها.
17 +
18 +## منابع خارج از آپارات
19 +
20 +- [رشد: FAQ رسمی](https://www.roshd.ir/omoumi/FAQ): رمزینه‌های کتاب به محتوای مکمل متصل‌اند و با ذکر منبع استفاده از مطالب را مجاز اعلام می‌کند؛ این عبارت به‌تنهایی آزمون فنی iframe، مجوز همه ویدیوهای اشخاص یا سازگاری موبایل را ثابت نمی‌کند. FAQ به محتوای قدیمی Flash هم اشاره دارد. انتخاب نخست برای تطبیق کتاب/رمزینه؛ پخش درون برنامه و مجوز هر منبع **UNVERIFIED**.
21 +- [سامانه رسمی کنترل کیفیت منابع آموزشی](https://standard.roshd.ir/fa/film-education): عنوان، وضعیت و پایان اعتبار برخی منابع را دارد. تاریخ اعتبار هر مورد باید بررسی شود؛ فهرست‌شدن یک محصول معادل رایگان‌بودن یا حق embed نیست.
22 +- [آرشیو مدرسه تلویزیونی ۱۴۰۵](https://telewebion.net/program/0x16bb0348/archive): عنوان جلسات پایه۷–۹ و موضوعات دیده شد. [فهرست قدیمی‌تر](https://telewebion.net/tags/0x1b24168) دوره۱۴۰۰–۱۴۰۱ دارد؛ به چاپ جدید تعمیم نمی‌دهیم. قرارداد iframe/حقوق استفاده و تطبیق کامل جلسات هنوز **UNVERIFIED**؛ هیچ فایل ویدیویی دانلود نشد.
23 +- [فیلیمومدرسه](https://app.filimo.school/): صفحه رسمی ویدیو و نمونه‌سؤال پایه‌ها را معرفی می‌کند. دسترسی رایگان دائمی و حق استفاده/embed تأیید نشد؛ خبر دسترسی موقت گذشته معیار رایگان‌بودن فعلی نیست. حساب یا خریدی انجام نشد.
24 +
25 +در این بسته، رابط پخش فقط برای قرارداد رسمی آپارات ساخته شده است. افزودن ارائه‌دهنده دیگر باید یک adapter با قرارداد و مجوز روشن، بدون دریافت URL/HTML دلخواه، داشته باشد؛ بررسی منابع جایگزین به معنی پیاده‌سازی پخش آنها نیست.
26 +
27 +## انتشار محتوا
28 +
29 +تمام منابع گردآوری‌شده فعلی نامزد پژوهش‌اند. بررسی index/metadata/قاب پخش، تماشای کامل یا بررسی خط‌به‌خط آموزشی نیست. پیش از نمایش به‌عنوان آموزش منتشرشده: نسخه معتبر کتاب، هدف/درس/صفحه، مشاهده کامل، صحت علمی، تناسب سن، کیفیت توضیح/تمرین، حقوق نمایش و سؤال‌های متناظر باید با نام بازبین و تاریخ ثبت شود. محتوای قدیمی/نامنطبق یا بازنشر نامشخص، خودکار تأیید نمی‌شود. بازخورد خانواده مکمل این فرایند است و جای بازبینی اولیه را نمی‌گیرد.
docs/superpowers/plans/2026-10-09-aparat-learning-library.md new
+19
@@ -0,0 +1,19 @@
1 +# Aparat learning library execution
2 +
3 +Goal: an authenticated, grade-aware Iranian learning library with in-page Aparat video, durable private progress and existing planner/timer integration.
4 +
5 +Architecture: additive PostgreSQL catalogue/unit/progress storage, deterministic public-resource import, real Express routes; Flutter conditional web iframe/native WebView with a durable account-scoped progress queue. Reuse identity/Feature 1/planner/study APIs.
6 +
7 +Tech: Node22/Express/PostgreSQL16; Flutter3.47.6; official Aparat iframe and metadata. [Design](../specs/2026-10-09-aparat-learning-library-design.md).
8 +
9 +Global constraints: no video downloads/rehosting; no fake complete coverage; no automatic proof of studying; no third-party student identifiers; no live changes. Research metadata is not pedagogical or device acceptance.
10 +
11 +- [x] Read AGENTS/PROJECT_STATE and inspect existing education, planner/offline/timer contracts; create isolated feature branch.
12 +- [ ] Record official book/edition and provider evidence across primary, middle and upper-secondary; disclose content gaps.
13 +- [ ] Add migration/importer/API/private progress/idempotency and lesson-to-plan linkage; real HTTP/DB tests including restart and permission negatives.
14 +- [ ] Add Persian grade/track library, ordered lessons, explicit progress/offline/conflict states and planning/timer connection.
15 +- [ ] Add click-to-load canonical iframe/WebView, scoped permissions and credits; test malformed hashes and no automatic completion.
16 +- [ ] Run migration repeat, backend regressions, Flutter analysis/tests, compiled web and actual embed checks; record output and hardware UNVERIFIED gates.
17 +- [ ] Independent security/curation review; update state/version/README/changelog/ADRs; commit small packets and open a stacked draft PR.
18 +
19 +Review focus: edition mismatches, missing free sequences, auth/cache boundary, false acknowledgement, provider URL injection, unintended external requests, private-progress leakage, catalogue import privilege separation.
docs/superpowers/specs/2026-10-09-aparat-learning-library-design.md new
+34
@@ -0,0 +1,34 @@
1 +# LifeGuide: Iranian school library with in-page Aparat teaching
2 +
3 +Status: implementation authorized by the owner on 2026-10-09; local/test work only. Updated for the owner's full content-review gate, assessment and family-feedback requirements. This extends Feature 1 and the real planner, rather than replacing identity, family, calendar, offline storage or study timers.
4 +
5 +## User outcome
6 +
7 +An authenticated learner selects grade 1–12 and, for grades 10–12, a track. The library shows corresponding books, ordered lessons/pages and only fully reviewed, published teaching resources. Research candidates remain draft; current metadata research does not count as full pedagogical review. The learner can start at any lesson midyear, explicitly record personal progress, and add a lesson to the existing durable study planner. Approved video plays in the same screen. Videos are never downloaded, rehosted or transcribed. See ADR0013 for formative assessment, explicit feedback and family-learning boundaries.
8 +
9 +Initial upper-secondary content covers the three academic tracks (math, experimental sciences, humanities) unless the owner's pending clarification expands it. Vocational tracks remain an explicit content gap; the catalogue can add them later. A listed book is not evidence of a complete video course. Missing lessons and unverified edition alignment must remain visible.
10 +
11 +## Data and API
12 +
13 +- Additive migration 0013 extends `education_profile` with validated track selection, and extends the existing curriculum/textbook catalogue with stable book keys, edition/variant/source evidence. Existing migration files/checksums and grade-7 seed remain unchanged.
14 +- Add ordered learning units and hash-only Aparat resources, linked to the textbook. Retain the original source hash and optional canonical metadata UID. Store title, author/channel, source, verification time, free-access evidence and review limitations, never media URLs or arbitrary embed HTML.
15 +- Deterministic, transactional, idempotent catalogue import consumes checked public research JSON. Imports do not make external network calls or invent missing lessons. Official HTTP source references remain accurately labelled as references; playback uses HTTPS only.
16 +- `GET /v1/education/library` returns selected education context and courses, with grade/track/year filters; `GET /v1/education/courses/:id` returns ordered units, source/edition warnings and only the caller's progress. Older/unknown editions are labelled and never silently relabelled as the selected year.
17 +- `PUT /v1/me/learning-progress/:unitId` accepts status `not_started`, `in_progress` or `completed`, source `self_reported`, UUID `mutationId` and `expectedVersion`. Owner derives exclusively from the authenticated session. Mutation hashing, transaction locks and optimistic versions make retries idempotent and conflicts explicit. Read/update/reset survive restart. No parental watch-history or another-user progress endpoint is introduced.
18 +- Extend canonical plan mutations with optional validated `learningUnitId`; do not misuse child-owned `subjectId` for a global textbook. Existing sharing rules, stable UUIDs, server acknowledgements and study-session interval model remain authoritative.
19 +
20 +## Client and privacy
21 +
22 +Persian RTL library has grade/track/year settings, subject/book search, availability counts, ordered units, direct midyear selection, previous/next navigation, resource credits and explicit self-reported progress. Empty courses explain the coverage gap. Progress uses the authenticated endpoint/account namespace, durable enqueue-before-send, accepted-server timestamps and conflicts retained for deliberate resolution. Cached metadata/progress are labelled stale/offline; streaming requires connectivity and is never described as offline-capable.
23 +
24 +The Aparat iframe/WebView loads only after the learner explicitly chooses to load it. Accept bounded ASCII alphanumeric hashes and construct the canonical HTTPS embed URL internally. Web iframe uses `no-referrer`, a minimal sandbox and fullscreen permission without autoplay. Credentials, student identity, profile, grade and progress are never sent to Aparat. This is the owner's explicitly requested, narrow third-party video exception: API, fonts, CanvasKit and other application assets remain local; do not broaden app script/connect policies to provider CDNs. Aparat may handle IP/device metadata, advertising or cookies after interaction; LifeGuide cannot promise an ad-free player or control provider removal/access. External AI/voice and sensitive health features remain disabled.
25 +
26 +Opening a frame, elapsed video time or a page load never proves studying, understanding or completion. Progress is the learner's explicit report. Planning launches the existing study timer; recorded time retains its existing disclosure. Changing grade does not delete plans/progress from earlier grades.
27 +
28 +## Curation and acceptance
29 +
30 +Select sources using textbook/edition alignment, lesson sequence, free-access evidence, named teacher, clarity/explanation/exercises and coverage. Search/index/metadata checks are distinct from watching a lesson or validating pedagogy; unperformed pedagogical review is UNVERIFIED. Paid previews, mismatched pagination, expired links and missing subjects are not presented as a complete free school.
31 +
32 +Acceptance: import repeat preserves IDs/counts; grades and tracks filter correctly; missing/old/variant books are visibly distinguished; real authenticated HTTP + independent PostgreSQL verifies progress, restart, retry, conflict and owner isolation; planner linkage persists with stable sync IDs; Flutter tests verify library navigation, durable offline progress and no auto-completion; compiled web shows an in-page canonical iframe after explicit load and no third-party requests beforehand. Actual Android playback/fullscreen and Safari Add to Home Screen/playback remain UNVERIFIED until a real device is available.
33 +
34 +No public deployment, live schema change, merge, provider signup or paid action is authorized by this design.
docs/superpowers/specs/2026-10-09-family-learning-feedback-design.md new
+187
@@ -0,0 +1,187 @@
1 +# Reviewed education and consented content feedback
2 +
3 +Status: owner-authorized local implementation packet, 2026-10-09. This spec
4 +extends the school-library design after the owner's stricter review requirement.
5 +It does not authorize a live migration, external AI, content publication or deploy.
6 +
7 +## Learning and publication boundary
8 +
9 +Public metadata and a working embed are research leads, not reviewed instruction.
10 +Every current researched video remains **DRAFT**. The learner catalogue must not
11 +present these as trusted published teaching; the current fully reviewed count is
12 +zero. A source can later be Aparat or another legally embeddable free provider,
13 +but a new provider needs its own rights, player, privacy and technical review.
14 +
15 +Before publication a human content reviewer watches the complete lesson and
16 +checks each explanation, worked step, exercise and answer against the latest
17 +official Iranian textbook for the specific grade, track, book code, edition,
18 +chapter and pages. The record must identify the official edition/source, video
19 +identity, review date/reviewer, precise alignment, omissions, inaccuracies,
20 +age-appropriate language and accessibility/clarity limits. Metadata/search checks
21 +cannot replace this review. A mismatch, incomplete review, removed video or
22 +unknown free-access permission blocks publication. Corrections are versioned and
23 +reviewed again; old evidence must not silently certify a changed video or book.
24 +
25 +Grade/track selects curriculum, not intelligence, gender stereotypes, family
26 +authority or permanent identity. Learners can begin midyear and revisit any
27 +available lesson without deleting older plans/progress. Viewing time and a
28 +self-reported completion remain separate from demonstrated understanding.
29 +
30 +## Pedagogy and assessment specification
31 +
32 +The [public-source evidence review](../../research/learning-evidence-2026-10-09.md)
33 +includes the IES2007 instruction/study practice guide, EEF2021 feedback and EEF2025
34 +metacognition guidance, plus Khan2024 mastery workflow documentation. These informed the subsequent migration0015 assessment infrastructure in this
35 +branch: real server grading, private attempts and explanatory feedback. The
36 +feedback router remains separate. No real reviewed question bank or full unit
37 +exam is published or certified by either packet.
38 +
39 +For each publishable lesson, record learning objectives and prerequisite concepts;
40 +review a short retrieval check after instruction, worked examples and supported
41 +practice followed by progressively independent practice. Feedback explains the
42 +reasoning and a useful next action, rather than only a score. Offer a later spaced
43 +retrieval opportunity and a way to revisit a misconception. Metacognitive prompts
44 +ask the learner to plan, explain their approach and reflect, without claiming that
45 +confidence or watch duration proves understanding.
46 +
47 +Question wording, correct answers, explanations and plausible distractors require
48 +the same textbook/age review. Unit exams should sample the declared objectives
49 +and disclose coverage gaps. A mastery threshold, automated adaptive sequence or
50 +claim of educational effectiveness needs its own assessment design and evidence;
51 +it is not inferred from another product's workflow. Future lesson/quiz versions
52 +must be explicit so old attempts are not silently scored against changed answers.
53 +
54 +Adult/family topics—parenting, couples, siblings and work—are future content
55 +domains with separate appropriateness and review criteria. They do not create a
56 +content-admin grant, change a child's sharing policy or turn AI into a psychologist.
57 +Future age-appropriate assistance must not diagnose, claim complete understanding,
58 +or automatically expose a child's abuse disclosure to parents/admins. Private chat,
59 +notes and health data remain outside this feedback feature.
60 +
61 +## Consent and feedback flow
62 +
63 +A learner or parent may voluntarily choose a category and write a new summary for
64 +the content team. This is a separate explicit action, not permission inherited
65 +from a chat, parent role, video click or account settings. The form previews the
66 +exact submitted summary and requires an unchecked explicit sharing choice.
67 +
68 +Suggested Persian explanation:
69 +
70 +> فقط همین خلاصه برای بررسی محتوای آموزشی ارسال می‌شود. گفت‌وگو، یادداشت و
71 +> اطلاعات سلامت شما همراه آن ارسال نمی‌شود. نام، اطلاعات تماس یا شرح موضوعات
72 +> خصوصی و آسیب را در این بازخورد ننویسید. بررسی توسط مسئول محتوا انجام می‌شود؛
73 +> دریافت بازخورد به معنی تأیید مشکل یا وعدهٔ اصلاح نیست.
74 +
75 +The API accepts exactly the user's chosen bounded summary; it does not read,
76 +summarize, attach or export chat/notes/health. It does not attempt an unreliable
77 +PII detector. Plain-text rendering and parameterized SQL protect the transport/
78 +display boundary but do not establish that a voluntarily typed summary contains
79 +no sensitive information.
80 +
81 +## Implemented small backend contract
82 +
83 +`createLearningFeedbackRouter({pool, auth})` mounts under `/v1`. Authentication
84 +checks the current account/session. Owner identity derives only from it.
85 +
86 +`POST /v1/education/feedback` accepts these fields and rejects unknown fields:
87 +
88 +```json
89 +{
90 + "mutationId": "UUID",
91 + "unitId": null,
92 + "category": "topic_request",
93 + "summary": "A new, explicitly chosen summary of up to 1000 characters",
94 + "shareWithContentTeam": true
95 +}
96 +```
97 +
98 +`unitId` can be null or an existing public-catalogue unit UUID, including a DRAFT
99 +unit for reviewer feedback. It does not authorize reading unpublished teaching or
100 +any user's progress. Categories are `inaccurate`, `edition_mismatch`,
101 +`broken_video`, `unclear`, and `topic_request`. The summary is a nonblank string,
102 +at most1000 Unicode code points, with no NUL. Consent must be literal `true`.
103 +Owner/child overrides, private-chat attachments and other fields are rejected.
104 +
105 +New submissions return201; identical owner-scoped mutation retries return200 with
106 +the same feedback ID. A canonical request hash detects changed-payload UUID reuse
107 +and returns409. The acknowledgement names the mutation and feedback ID with
108 +`accepted` or `already_applied`; receipt is not a promise that the report is correct.
109 +
110 +Feedback response fields are `id`, `mutationId`, `unitId`, `category`, `summary`,
111 +`shareWithContentTeam`, `status`, `version`, `createdAt`, `updatedAt` and
112 +`withdrawnAt`. No account/contact, chat, note or health fields are returned.
113 +New status is `received`. Durable per-user rolling limits are5 new submissions
114 +per hour and20 per day;429 includes `Retry-After`. Identical retries do not consume
115 +quota, and withdrawal/restart does not reset it. Owner-row locking makes
116 +concurrent retries and limit checks atomic.
117 +
118 +`GET /v1/me/education-feedback` returns only the caller's rows, newest first,
119 +up to100 per page with an optional UUID `cursor` and `nextCursor`. No `childId`,
120 +owner override or family-role read is available. A cursor must belong to the same
121 +caller; missing/foreign cursor IDs use the same404 result.
122 +
123 +`DELETE /v1/me/education-feedback/:id` withdraws only the caller's feedback and
124 +returns204, including a repeated withdrawal. Missing/foreign IDs return404.
125 +Withdrawal removes the stored summary and sharing consent and increments the
126 +version once. Minimal ID/request-hash/time/category/unit tombstone remains for
127 +idempotency and rate limits. A matching POST retry returns that redacted tombstone
128 +and never republishes its old summary; changed payload still returns409. There is
129 +no guarantee of retracting something a future authorized reviewer already read.
130 +
131 +Migration0014 adds only `learning_content_feedback`, linked to `app_user` and
132 +`learning_unit` from0013. Existing migrations/checksums remain unchanged. The shared
133 +runtime role policy must cover this table; no new content-admin role is granted here.
134 +
135 +## Human review and future operations
136 +
137 +Stored review statuses are `received`, `triaged`, `planned`, `released`, `declined`;
138 +withdrawal is separate. This packet provides no status-update/admin/other-user API,
139 +exporter, email/SMS sender, external AI or automation trigger. Real moderation and
140 +review-team access remain a future explicit policy. Until then, any manual database
141 +inspection is limited to separately approved local synthetic fixtures.
142 +
143 +The intended future owner workflow is: consented summary → manual content triage
144 +→ approved, minimized R&D brief → developer work → tests/review → versioned PR.
145 +Never use raw private chat as an R&D brief and never auto-publish/deploy from a
146 +feedback row. A released status requires a human-reviewed actual change; receipt
147 +must not be presented as an automatic improvement promise.
148 +
149 +## Acceptance and limits
150 +
151 +Use actual loopback HTTP and migrated synthetic PostgreSQL to verify consent and
152 +input rejection, owner/family/outsider isolation, hash conflicts and concurrent
153 +duplicate suppression, real restart persistence, per-user durable hourly/daily
154 +limits, withdrawal and tombstone retries. Seed unrelated private chat-like/notes/
155 +health records only in synthetic fixtures and prove the feedback result/logs never
156 +contain them. Inspect SQL state independently of HTTP responses. Register the
157 +router in the real entrypoint through the coordinating owner, not a fake auth handler.
158 +
159 +No media review, published teaching, pedagogical effectiveness, quiz engine,
160 +real feedback administration, real delivery or live migration is certified by
161 +these backend tests. Each remains a separate acceptance gate.
162 +
163 +## Actual backend verification, 2026-10-09
164 +
165 +Migration0014 was applied only to the existing isolated local synthetic test
166 +database after the library migration0013 and an exclusive test window were
167 +confirmed. The unchanged migrator checked the prior ledger and applied the new
168 +table. No live database or privilege transition ran.
169 +
170 +Node22.23.3 input tests were first observed failing2/2, then passing2/2. The actual
171 +production entrypoint/HTTP/PostgreSQL run first passed those2 and failed all8 new
172 +route cases with404 before implementation. Final focused run passed10/10 with
173 +zero failures/skips, including consent rejection, guardian/admin isolation,
174 +independent SQL checks, concurrent retry/quota enforcement, a real API process
175 +restart, redacted tombstone retry,20/day quota and100-row paging with preserved
176 +microsecond cursor boundaries.
177 +
178 +The final complete backend runner passed **145/145**, zero failures/skips, in26.13s.
179 +An earlier144/145 run exposed a library test assertion that queried a stable unit
180 +without its owner filter; the library owner corrected the test and the complete
181 +suite was rerun. This was not a feedback product failure. Syntax and repository
182 +diff checks passed. The synthetic database window was then released.
183 +
184 +The coordinating owner registers the router and updates the shared runtime table
185 +policy. Client feedback/withdrawal and malformed-ack behavior are independently
186 +owned and must receive their own final acceptance; backend PASS is not a claim
187 +that the frontend, administration, teaching or deployment is complete.