Deck generation from the ranked concept list #26

Open
opened 2026-09-26 13:58:36 +00:00 by belvedere · 0 comments
Collaborator

Objective: Turn "the first 1000 words" into actual cards, honouring words the user already
knows.

Files:

  • Create: lib/first_thousand_words/study/deck_generator.ex
  • Modify: lib/first_thousand_words/study.ex (code interface)

Steps:

  1. Select concepts that have a word in both the source and target language, ordered by
    concept rank.
  2. Take the first target_count (default 1000); skip concepts marked known by placement.
  3. Bulk-insert cards with state: :new and due_at: nil.
  4. Idempotent: rely on the (deck_id, concept_id, direction) unique identity.
  5. Report how many cards were created and how many concepts were skipped for missing
    translations — a silent shortfall is a bug.

Verify: generate a deck for a seeded pair; assert card count matches the coverage report.

Refs: depends on M2 coverage.

**Objective:** Turn "the first 1000 words" into actual cards, honouring words the user already knows. **Files:** - Create: `lib/first_thousand_words/study/deck_generator.ex` - Modify: `lib/first_thousand_words/study.ex` (code interface) **Steps:** 1. Select concepts that have a word in **both** the source and target language, ordered by concept `rank`. 2. Take the first `target_count` (default 1000); skip concepts marked known by placement. 3. Bulk-insert cards with `state: :new` and `due_at: nil`. 4. Idempotent: rely on the `(deck_id, concept_id, direction)` unique identity. 5. Report how many cards were created and how many concepts were skipped for missing translations — a silent shortfall is a bug. **Verify:** generate a deck for a seeded pair; assert card count matches the coverage report. **Refs:** depends on M2 coverage.
Sign in to join this conversation.
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
nickkeers/first-thousand-words#26
No description provided.