Improve Card Generator
Own parser and generator behavior in packages/lorcana/lorcana-cards. Hand
gameplay behavior back to lorcana-cards once generation is unblocked.
Workflow
- Resolve the exact card or failing generation output. Use
lorcana-find-cardwhen identity is unclear. - Read the current implementation before choosing an architecture:
scripts/generate-cards.tsscripts/generators/parser-validator.tsscripts/generators/file-generator.tssrc/parser/
- Reproduce the smallest failing parser, validator, or generator case. Prefer an existing nearby test over a full regeneration.
- Add a failing test for the missing text pattern or output invariant.
- Make the smallest type-safe parser/generator change. Do not move gameplay semantics into generation code.
- Run the focused test and package typecheck.
- Regenerate only when the fix changes generated output, then inspect every generated diff for unrelated churn.
Commands
From the Lorcana workspace:
rg -n "missingImplementation: true" packages/lorcana/lorcana-cards/src/cards
bun test --cwd packages/lorcana/lorcana-cards <focused-test-file>
bun run --cwd packages/lorcana/lorcana-cards check-types
bun run --cwd packages/lorcana/lorcana-cards generate-cards:all --skip-fetch
The generation command is repository-wide for this package. The current script
does not promise per-set, per-card, --dry-run, or --force modes. Do not
invent those flags.
Handoff
Report the root cause, changed parser/generator files, affected cards, exact
checks run, and any remaining unsupported pattern. A generated card still
marked missingImplementation remains blocked.