Skip to content

[v2] Scoped Card Generation for Skill Nodes #222

@nicholaspsmith

Description

@nicholaspsmith

Overview

Refactor flashcard generation to be scoped to specific skill tree nodes instead of freeform chat.

Part of

Memoryloop v2 Pivot - Branch 014-goal-based-learning

User Flow

  1. User selects a skill node in their tree
  2. User clicks "Generate Cards"
  3. System generates cards specific to that topic
  4. User reviews, edits, or deletes cards
  5. User confirms and cards are added to deck

Changes Required

Refactor

  • lib/claude/flashcard-generator.ts - Accept skillNode context instead of conversation
  • app/api/flashcards/generate/route.ts - Take goalId and skillNodeId parameters

New

  • Card review/edit UI before committing
  • Refinement chat scoped to current generation
  • Link cards to skill nodes for mastery tracking

Remove

  • lib/claude/rag.ts - No longer need conversation RAG
  • lib/claude/context.ts - No longer need conversation context

Prompt Engineering

  • Create focused prompts for each card format:
    • Flashcard (question/answer)
    • Multiple choice (4 options)
    • Scenario-based (situational questions)

Acceptance Criteria

  • Cards generated for specific skill node topic
  • 10 cards generated in under 60 seconds (SC-002)
  • User can review/edit before committing
  • Cards linked to skill node in database
  • Refinement feedback improves generation

Dependencies

Related Spec

See specs/014-goal-based-learning/spec.md - User Story 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestp1Priority 1 - Critical

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions