Prompt file imported from akspa0/parp-tools (
.codex/prompts/wow-viewer-pm4-library-implementation.md). Copyright stays with the author.
Implement the next narrow wow-viewer PM4 library slice without losing the current source-of-truth and validation rules.
If the ask is actually a non-PM4 shared-format or shared-I/O slice, use wow-viewer-shared-io-implementation.md instead of this PM4-specific prompt.
Read First
gillijimproject_refactor/memory-bank/activeContext.mdgillijimproject_refactor/memory-bank/progress.mdgillijimproject_refactor/plans/wow_viewer_pm4_library_plan_2026-03-25.mdwow-viewer/README.mdAGENTS.md
Goal
Move one more reusable PM4 capability into wow-viewer/src/core/WowViewer.Core.PM4 with explicit validation and without overstating viewer-runtime proof. Typical slices include PM4 inspect or audit verbs, linkage or MSCN or unknowns reports, or narrow placement and solver extraction work.
Current Working Rules
WowViewer.Core.PM4is the canonical implementation target for new PM4 work.Pm4Researchis still the library seed and report backbone.MdxVieweris a reference or compatibility input, not the default owner of PM4 behavior.- The default direction is direct library completion in
wow-viewer, not broader active-viewer integration. - Shared consumer wiring into
MdxVieweris allowed only when it is a narrow compatibility follow-up to an already extracted library seam or when the user explicitly asks for it.
Active Library Surface To Build On
- PM4 chunk models and research document reader
- inspect verbs for
pm4 inspect,pm4 export-json,pm4 audit,pm4 audit-directory,pm4 linkage,pm4 mscn, andpm4 unknowns - shared placement contracts:
Pm4AxisConvention,Pm4CoordinateMode,Pm4PlanarTransform,Pm4PlacementContract, andPm4PlacementSolution - shared placement math: range-based axis detection, normal-based axis scoring, planar-transform resolution, world-yaw correction, world-space centroid, pivot rotation, and corrected world-position conversion
- regression floor in
wow-viewer/tests/WowViewer.Core.PM4.Tests
Non-Negotiable Constraints
- Do not turn a narrow PM4 slice into a broad
MdxViewerrewrite. - Do not claim viewer runtime PM4 signoff from library builds, tests, or active-viewer compile success.
- Do not use
MdxVieweras the design authority when completing aCore.PM4seam unless the user explicitly asks for consumer parity work. - Keep exploratory field semantics labeled as research.
- Prefer one concrete seam with proof over several half-validated abstractions.
What The Work Must Produce
- The exact seam to add or change.
- The files that should own it in
wow-viewer. - The validation required for that seam.
- Any active-viewer touch point that must remain reference-only.
- The continuity files that must be updated after the slice lands.
Deliverables
Return all items:
- the next PM4 library slice to implement
- why that slice is the right next step
- exact files to change
- exact validation to run
- what should stay out of scope for this slice
- which memory or prompt surfaces must be updated afterward
First Output
Start with:
- the current PM4 library boundary you are assuming
- the single next seam you would extract or add
- the narrowest proof that would show the slice is real
- what you are explicitly not claiming yet
