بنقرة واحدة
fsrs-integration
Implement or extend spaced repetition with ts-fsrs
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Implement or extend spaced repetition with ts-fsrs
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Manage the project backlog — add, list, filter, update, prioritize, and suggest work items
Daily session wrapper — start with backlog, work, commit, retro
End-of-session retrospective — summarize work, update backlog statuses, update MEMORY.md
Commit, branch, PR, self-review, fix — then stop for human approval before merge
Pre-flight for parallel work — pick items, check file overlap, set statuses, generate terminal commands
Manage project backlog — add, list, filter, update, prioritize, suggest
| name | fsrs-integration |
| description | Implement or extend spaced repetition with ts-fsrs |
| user-invocable | true |
Implement or extend spaced repetition in DanskPrep.
Reference: Read
.claude/references/fsrs-rules.mdfirst — it covers ts-fsrs configuration, card lifecycle, due queue logic, and TypeScript pitfalls.
src/lib/fsrs.ts — scheduler init, dbToFsrsCard, fsrsCardToDb, scheduleReview, getSchedulingOptionssrc/hooks/useStudy.ts — due queue, reviewCard(), Supabase syncsrc/components/study/CardRating.tsx — 4-button rating UI with interval preview// Supabase user_cards → ts-fsrs Card
{ state, difficulty, stability, due, last_review, reps, lapses }
→ Card { state, difficulty, stability, due: new Date(due), last_review: new Date(last_review) | undefined, reps, lapses, elapsed_days: 0, scheduled_days: 0 }
// After review: Card → Supabase
card.due.toISOString(), card.last_review?.toISOString() ?? null
due <= now() ordered by due ASC, limit 50scheduleReview(dbToFsrsCard(row), rating)UPDATE user_cards SET ...fsrsCardToDb(updatedCard) + increment correct/incorrect/streakINSERT review_logs with rating, response, was_correct, time_taken_msrating === Again: re-append card to end of queue; otherwise remove itAlways show the next interval next to each button so users understand the consequence:
Again (5m) | Hard (1d) | Good (4d) | Easy (14d)
Use getSchedulingOptions(card) which returns { again, hard, good, easy } as human-readable strings.
Rating.Manual = 0 causes type errors. Use numeric literals 1|2|3|4 instead of Rating as key type. Cast f.repeat() result to any when indexing — see fsrs-rules.md.