Prompt file imported from akspa0/parp-tools (
.codex/prompts/wow-viewer-shared-io-library-plan.md). Copyright stays with the author.
Design the owned shared library plan for wow-viewer so there is one first-party codebase for reading and writing the file types we currently handle across the old repo.
Read First
gillijimproject_refactor/memory-bank/activeContext.mdgillijimproject_refactor/memory-bank/progress.mdgillijimproject_refactor/src/MdxViewer/memory-bank/activeContext.mdAGENTS.mdgillijimproject_refactor/plans/v0_5_0_wow_viewer_bootstrap_and_migration_draft_2026-03-25.mdgillijimproject_refactor/src/MdxViewergillijimproject_refactor/src/WoWMapConverter/WoWMapConverter.Coregillijimproject_refactor/src/gillijimproject-csharp
Goal
Define one owned library stack that becomes the source of truth for file-format reading, writing, conversion, and shared domain contracts instead of leaving that truth scattered across MdxViewer, WoWMapConverter.Core, gillijimproject-csharp, DBCTool.V2, AlphaLkToAlphaStandalone, parpToolbox, PM4Tool, and other historical tool roots.
Current Validated State To Build On
wow-viewer/src/core/WowViewer.Coreandwow-viewer/src/core/WowViewer.Core.IOnow already contain:FourCC,ChunkHeader, andChunkHeaderReaderChunkedFileReader- WDT or ADT top-level summary contracts and
MapFileSummaryReader - shared
WowFileKind,WowFileDetection, andWowFileDetector
WowViewer.Tool.Inspectnow consumes that shared surface throughmap inspect.WowViewer.Tool.Converternow consumes that shared surface throughdetect.- If the ask is to implement the next narrow shared-format slice instead of planning ownership, use
wow-viewer-shared-io-implementation.mdinstead of this broader planning prompt.
File-Type Families To Cover Explicitly
- Alpha and standard
ADT/WDT - terrain chunk families and placement chunks
M2/MDX/MDLWMOincluding version seams such asv14,v16, andv17PM4WDLDBCand related table access seams used by tools/viewer runtimeBLP- export/import surfaces already split across viewer and converter tools
Non-Negotiable Constraints
- Do not keep multiple first-party parser/writer stacks alive as peers in the new repo.
- Do not confuse upstream dependency reuse with first-party format ownership.
- Preserve readable FourCC handling internally and only reverse at I/O boundaries.
- Keep Alpha and standard terrain handling explicitly separated where the format boundary is real.
- Distinguish canonical readers/writers from partial, speculative, or research-only handlers.
- Treat runtime ingestion helpers and file-format ownership as related but separate seams.
What The Plan Must Produce
- The target shared-library breakdown.
- A format ownership matrix by file family.
- The source-root mapping for code to absorb, rewrite, wrap, or discard.
- The writer/read-roundtrip risk matrix.
- The migration order for file families.
- The first file-family slice that proves the shared library is real.
- Validation expectations using real data.
Source Roots To Inventory Explicitly
gillijimproject_refactor/src/MdxViewergillijimproject_refactor/src/WoWMapConverter/WoWMapConverter.Coregillijimproject_refactor/src/gillijimproject-csharpgillijimproject_refactor/DBCTool.V2gillijimproject_refactor/AlphaLkToAlphaStandaloneparpToolboxPM4ToolADTPrefabTool
Deliverables
Return all items:
- target library/module tree
- file-family ownership matrix
- absorb vs rewrite vs wrap vs discard map
- canonical read/write authority list
- highest-risk format seams
- first vertical slice
- real-data validation plan
First Output
Start with:
- the worst source-of-truth duplication seams in the current repo
- which file families should become canonical first
- which old code roots should be absorbed first versus treated as archaeology/reference
- what writer/read path must not stay split in the new repo
