[Phase 1.4] Build chaotic_ingestor ETL, Invariant Validator & Per-Card .ron Export #5

Open
opened 2026-11-17 06:12:10 +00:00 by john4064 · 0 comments
Owner

Goal

Implement deterministic ingestion from tools/raw_canonical_data/ into immutable per-card .ron files under assets/cards/dawn_of_perim/.

Metadata

  • Phase / Step: Phase 1.4
  • Depends On: #3, #4
  • Unlocks: #6, #21, #22
  • Target Crates / Paths: crates/chaotic_ingestor/src/{main.rs,parser.rs,validator.rs,ron_export.rs}, assets/cards/dawn_of_perim/
  • Line Budget Plan: Production .rs <= 400 lines, test .rs <= 600 lines, mod.rs < 80 lines (AGENTS.md Section 2.3)

Acceptance Criteria

  • Split ingestor cleanly into parser.rs, validator.rs, ron_export.rs, and main.rs (each <= 400 lines).
  • Export one .ron file per card organized by type: assets/cards/dawn_of_perim/{creatures,attacks,mugic,battlegear,locations}/<slug>.ron with deterministic slug generation.
  • Normalize Creature stats to Average baseline and enforce Creature printing laws (base_energy > 0, stats % 5 == 0, mugic_counters <= 3, valid Tribe, non-empty base_name).
  • Enforce Attack printing laws (build_points <= 5, base_damage % 5 == 0, elemental damages % 5 == 0).
  • Enforce SHA-256 raw_printed_text locking and quarantine any unparsed ability text as ImplementationStatus::UnverifiedQuarantine.
  • Support cargo run --package chaotic_ingestor -- --verify-all assets/cards/ failing non-zero on any violation and reporting Verified vs. Quarantined counts.
## Goal Implement deterministic ingestion from `tools/raw_canonical_data/` into immutable per-card `.ron` files under `assets/cards/dawn_of_perim/`. ## Metadata - **Phase / Step:** Phase 1.4 - **Depends On:** #3, #4 - **Unlocks:** #6, #21, #22 - **Target Crates / Paths:** `crates/chaotic_ingestor/src/{main.rs,parser.rs,validator.rs,ron_export.rs}`, `assets/cards/dawn_of_perim/` - **Line Budget Plan:** Production `.rs` <= 400 lines, test `.rs` <= 600 lines, `mod.rs` < 80 lines (`AGENTS.md` Section 2.3) ## Acceptance Criteria - [ ] Split ingestor cleanly into `parser.rs`, `validator.rs`, `ron_export.rs`, and `main.rs` (each <= 400 lines). - [ ] Export one `.ron` file per card organized by type: `assets/cards/dawn_of_perim/{creatures,attacks,mugic,battlegear,locations}/<slug>.ron` with deterministic slug generation. - [ ] Normalize Creature stats to **Average** baseline and enforce Creature printing laws (`base_energy > 0`, stats `% 5 == 0`, `mugic_counters <= 3`, valid `Tribe`, non-empty `base_name`). - [ ] Enforce Attack printing laws (`build_points <= 5`, `base_damage % 5 == 0`, elemental damages `% 5 == 0`). - [ ] Enforce SHA-256 `raw_printed_text` locking and quarantine any unparsed ability text as `ImplementationStatus::UnverifiedQuarantine`. - [ ] Support `cargo run --package chaotic_ingestor -- --verify-all assets/cards/` failing non-zero on any violation and reporting Verified vs. Quarantined counts.
Sign in to join this conversation.
No description provided.