add_line_to_repertoire
Merge a line of SAN moves into a chess repertoire, adding branches without duplicating or reordering existing variations. New positions are scheduled for review automatically.
Instructions
Merge a line of SAN moves (from the starting position) into a repertoire.
Joins branches that already exist instead of duplicating them, and never reorders existing variations — the first variation at a position is the answer the user gets drilled on, so reordering would change what they're tested on. New positions are scheduled automatically when the file is next opened; existing cards and review history are untouched.
En Croissant must be closed: it holds repertoire files open and would silently overwrite this change. The previous contents are backed up first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| moves | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | File name without extension, e.g. 'Vienna Game'. | |
| path | Yes | Absolute path. Never rename or move this file — En Croissant keys training state by absolute path, and a rename orphans the review history. | |
| main_line | Yes | The main line in SAN. | |
| move_count | Yes | Total moves recorded across all variations. | |
| orientation | Yes | Which colour this repertoire trains: 'white' or 'black'. |