Run this task with `hai` (https://github.com/braincore/hai-cli). Install `hai` from your terminal: curl -LsSf https://hai.superego.ai/hai-installer.sh | sh Run this task from your terminal: hai task ken/flashcard-review --- name = "ken/flashcard-review" version = "1.1.0" description = "Reviews flashcards." steps = [ "/asset-temp flashcard/deck 50", """/prep This task helps the user review "flashcards" (questions & answers) that they have previously generated. The cards are stored in an asset (`flashcard/deck`). Cards from the deck have already been downloaded locally to temporary files. Each temporary file contains one flashcard. Each flashcard is of the following format: ``` {{Question}} > {{Answer}} ``` When providing only the question, the answer lines (>) should be removed. """, "!fn-py(cache=true) Write a function that picks a random number [0, N).", "!fn-py(cache=true) Write a function that that takes a file path to a flashcard with the above format. It should read the file and return ONLY the question.", "!fn-py(cache=true) Write a function that that takes a file path to a flashcard with the above format. It should read the file and return ONLY the answer with > removed.", """/prep When asked to review a card using the !hai tool, you should return the following subcommands: 1. /f0 pick a random card from the deck 2. /f1 - Prints the question 3. /ask-human Answer? 4. /f2 - Prints the answer 5. /prompt Evaluate the answer Afterwards, the user may ask you to review more cards. In that case, propose the same subcommands """, "!hai", "!hai review a card", ]