Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

7 · Directives reference

Every card marker and % key: value directive in one place. Scope is where each may appear — deck = the header (before the first card), card = after a card’s front, anywhere = both. Each links to the chapter that explains it in full.

TokenScopeWhat it does
# frontcardStarts a card at column 0; the indented lines below are the answer. → ch 3
#? frontcardA cloze card; blanks are {{spans}} in the answer line.
! linecardA note, shown after you answer. → ch 3
% lineanywhereA comment — ignored, unless it’s one of the directives below.
% mode:deck · cardAnswer mode: flip, typing, fuzzy, choice, line, explain.
% order:deckCard order: scheduled (default) or sequential. → ch 5
% scheduler:deckScheduler: leitner (default) or sm2.
% direction:deck · cardReview direction: forward, reverse, both.
% unlock-stage:deckStage that opens the gate 1–5: the exam/unlock fires once every card reaches it (cards keep drilling).
% frontend:deck · cardRestrict to any, tui, or web. → ch 6
% img: / % img-back:cardImage on the front / back (web only).
% img-dir:deckBase directory image filenames resolve against. → ch 6
% title:deckDisplay name shown instead of the file name.
% requires:deckPrerequisite deck that gates unlocks (repeatable).
% link:deckask-Claude reference URL — tutor-only (repeatable).
% source:deckExam ground truth (URL/file, repeatable); also a trace’s path origin, and a tutor reference.
% strictness:deckExam grading rigor: strict, balanced, lenient.
% trace:deckWhat a trace walks; its presence makes the deck a trace.
% at:cardA locator into the % source: (file:lines): a trace checkpoint’s reveal target, or a fact card’s source citation shown on reveal.
% given:cardA trace checkpoint’s off-screen symbol, as name — meaning (repeatable).

Two that look similar but aren’t. Both point at material a deck is about, but % source: is the exam’s ground truth — questions are generated from it and answers graded against it — and a URL source doubles as a tutor reference. % link: is only a tutor reference and never becomes exam material; use it for supplementary reading the exam should ignore. The implication runs one way: a % source: URL is offered to the tutor, but a % link: is never promoted to a source.

Precedence

Where a setting can come from several places, the more specific wins:

CLI flag > card % directive > deck % directive > workspace [defaults] > built-in default

So --mode on the command line overrides a card’s % mode:, which overrides the deck’s, which overrides a workspace’s [defaults], which overrides alix’s default.