fix: module 10 review round 1 (module-local SpellGrid cards, cast target check, CLI without panic hook)
- SpellGrid cards move to course/10-spellgrid/cards; start-module and verify-references stage course/cards plus module-local cards up to the module, so M5-M9 workspaces get exactly the pre-M10 card set. - cast() rejects a chosen-target spell without a target (checkCast/checkPlay); new test_10_targeted_spell_needs_target. - Rust CLI pre-validates instead of swapping the global panic hook. - Catalog: CRIER noun; DEATHRATTLE/BATTLECRY note on lexicon vs catalog role. - Lesson: design note on mid-movement reparse. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
a0cf9be214
commit
6f576940b7
@@ -48,6 +48,19 @@ export function scenarioNames(path, file = "scenarios.md") {
|
||||
return [...names].sort();
|
||||
}
|
||||
|
||||
/**
|
||||
* The card data a workspace at module `upTo` has: course/cards (every module's, from
|
||||
* Module 5), then the cards/ of each module up to `upTo` that has its own (Module 10's
|
||||
* SpellGrid cards), so earlier modules never see later modules' cards.
|
||||
*/
|
||||
export function cardDirs(upTo) {
|
||||
const shared = join(courseRoot(), "cards");
|
||||
const local = moduleDirs()
|
||||
.filter((m) => Number(m.num) <= Number(upTo))
|
||||
.map((m) => join(m.path, "cards"));
|
||||
return [shared, ...local].filter((d) => existsSync(d));
|
||||
}
|
||||
|
||||
export function loadCatalog() {
|
||||
const f = join(courseRoot(), "catalog.json");
|
||||
if (!existsSync(f)) throw new Error(`catalog not found: ${f}`);
|
||||
|
||||
Reference in New Issue
Block a user