Anki separates stored information from study prompts:
A Basic note type normally has Front and Back fields and one template, so one note creates one card. A Basic-and-reversed type has two templates and creates two cards. A Cloze type creates one card for each distinct positive cN marker found in its text.
Create child decks with AnkiDeck.AddSubdeck(). Anki's displayed hierarchy uses Parent::Child names, while AnkiIO stores each local segment separately and traverses the hierarchy in stable insertion order. Deck, note, card, and note type identifiers are 64-bit values. Let AnkiIO generate them unless importing known identities.
AnkiScheduling.New is the safest state for generated cards. Advanced scheduling values are preserved by native JSON and legacy APKG I/O, but queue and card-type combinations must be consistent. Suspended and buried queues retain the underlying card type; the meaning of Due depends on the active queue. Never synthesize review history merely to make a card appear mature.
The mutable object graph is designed for single-operation construction and editing. It is not safe for concurrent mutation unless a member explicitly documents otherwise.