T-ZP78-learning-p4-learner-state-notes
State: planning/proposed · Impact: high · Complexity: medium
Record what the learner did without adding platform code. Progress,
exercise attempts and spaced-repetition card state live as notes in a
learner vault, written through the native frontmatter and doc APIs.
This is the Obsidian-plugin model D-LIRI chose, and it is what
makes the hosted version one learner vault per person.
| Location | Role today |
|---|---|
solutions/determined/crates/determined-platform/src/api/v1/vault_notes.rs | write_frontmatter_fields with etag CAS, create_doc, read_doc, get_changes |
solutions/augmented/apps/vimit/src-astro/src/stores/scheduler.ts | The spaced-repetition scheduler, unit-tested |
solutions/augmented/apps/vimit/src-astro/src/stores/progress.ts | Module completion and position, in localStorage |
solutions/augmented/apps/vimit/src-astro/src/composables/useReviewSession.ts | The review session flow |
solutions/augmented/apps/vimit/src-astro/src/lib/review/cloze-parser.ts | Cloze parsing, tested |
solutions/determined/docs/decisions/D-0018-determined-state-plane.md | No application dot-directory in a content vault |
Proposed
Section titled “Proposed”A learner vault, registered in the roster like any other, holding:
<book id>/progress.md frontmatter: learner_id, book_id, modules {id: status}, position<book id>/cards.md frontmatter: per-card scheduling state<book id>/attempts.md append-only body: one line per attemptKeys are the book id from book.md, never the roster’s vault id, so a
re-downloaded book keeps its progress. Every note carries learner_id
from day one. The scheduler, review session and cloze parser port as
pure TypeScript; the experience reads one cards.md per session and
writes it back with CAS. Book-model contracts cover the three kinds.
Approach
Section titled “Approach”- Add the three learner note kinds to
book-model. - A
useLearnerVaultcomposable: find or create the learner vault in scope, read and CAS-write the three notes per book. - Port scheduler, review session, cloze parser and their tests.
- Runners emit attempts; the experience appends them and updates progress.
- Review page: cards due now across the books in scope.
| Area | Note |
|---|---|
solutions/determined/packages/book-model/ | Learner note kinds |
solutions/determined/experiences/learning/ | Learner vault composable, review page, progress chrome |
Acceptance criteria
Section titled “Acceptance criteria”- AC-1: Completing a module and closing the app persists; reopening shows the position and status.
- AC-2: A review session schedules the same intervals vimit’s tests assert.
- AC-3: Two windows editing progress do not lose a write; the second sees the CAS conflict and reloads.
- AC-4: No file under
solutions/determined/crates/changes.
Out of scope
Section titled “Out of scope”- Identity. The learner id is a setting until the hosted phase.
Dependencies
Section titled “Dependencies”T-J3NWfor attempts to record.
Discovery context
Section titled “Discovery context”D-LIRI.
Depends on
Section titled “Depends on”T-J3NW