Studio and Packer RGBA8888 Asset Pipeline Alignment

This commit is contained in:
2026-05-23 22:15:52 +01:00
parent 8a854dc2ee
commit e044fc15fc
10 changed files with 1750 additions and 393 deletions
@@ -0,0 +1,136 @@
---
id: PLN-0081
ticket: studio-packer-rgba8888-asset-pipeline
title: RGBA8888 Packer and Studio Spec Propagation
status: review
created: 2026-05-23
completed:
ref_decisions:
- DEC-0037
tags:
- specs
- packer
- studio
- rgba8888
---
## Objective
Propagate `DEC-0037` into the normative Studio and packer specifications before
code implementation starts.
## Background
`DEC-0037` keeps `GLYPH/indexed_v1` but changes its palette contract from
RGB565 to RGBA8888. Specs currently still describe RGB565 palette bytes,
`convertedRgb565`, and a 2048-byte palette block.
## Scope
### Included
- Update packer specs for `asset.json` palette metadata and `assets.pa`
glyph-bank payload layout.
- Update Studio asset workspace specs if they expose palette metadata or
details/read projection behavior.
- Preserve the fixed 64-palette model and explicitly leave `DSC-0005` for a
later palette-count optimization.
### Excluded
- Code changes.
- Test changes.
- Variable palette-count serialization.
- Runtime spec changes, except references to runtime `DEC-0029`.
## Execution Steps
### Step 1 - Update asset declaration palette fields
**What:** Replace `originalArgb8888`/`convertedRgb565` examples and rules with
canonical `rgba8888`.
**How:** Edit the palette portions of the asset declaration spec so
`output.pipeline.palettes[*].palette.rgba8888` is the canonical field. State
that ARGB may be an input API detail but is not canonical authored/projected
palette data.
**File(s):**
- `docs/specs/packer/3. Asset Declaration and Virtual Asset Contract Specification.md`
### Step 2 - Update glyph-bank payload layout
**What:** Change `GLYPH/indexed_v1` palette layout from RGB565 to RGBA8888.
**How:** Keep the format name. Change the palette block from
`64 * 16 * 2 = 2048` bytes to `64 * 16 * 4 = 4096` bytes. Update size and
decoded-size formulas. State that palette entries use runtime RGBA channel
order.
**File(s):**
- `docs/specs/packer/4. Build Artifacts and Deterministic Packing Specification.md`
### Step 3 - Document alpha and index semantics
**What:** Document that palette index `0` is ordinary and all 16 palette entries
are usable.
**How:** Add normative rules that transparency and partial transparency are
encoded only by RGBA alpha, magenta color-key is removed, and partial alpha is
valid palette data.
**File(s):**
- `docs/specs/packer/3. Asset Declaration and Virtual Asset Contract Specification.md`
- `docs/specs/packer/4. Build Artifacts and Deterministic Packing Specification.md`
### Step 4 - Update Studio-facing projection rules
**What:** Ensure Studio-facing docs use `rgba8888` where palette metadata is
visible.
**How:** Update asset workspace language only where it describes palette read,
details, scene preview, or palette default behavior. Keep scene `palette_id`
semantics unchanged.
**File(s):**
- `docs/specs/studio/4. Assets Workspace Specification.md`
## Test Requirements
### Unit Tests
- Not applicable for this spec-only plan.
### Integration Tests
- Not applicable for this spec-only plan.
### Manual Verification
- Search specs for stale `RGB565`, `convertedRgb565`, 2048-byte palette block,
reserved index `0`, and magenta color-key language.
## Acceptance Criteria
- [ ] Packer specs define `rgba8888` as the canonical palette field.
- [ ] `GLYPH/indexed_v1` remains named exactly that.
- [ ] Palette block formulas use `64 * 16 * 4 = 4096`.
- [ ] Specs state palette index `0` is ordinary and all 16 entries are usable.
- [ ] Specs state partial alpha is valid and magenta color-key is removed.
- [ ] Specs leave `DSC-0005` variable palette-count work out of scope.
## Dependencies
- Depends on accepted `DEC-0037`.
- Should complete before code plans are implemented.
## Risks
- Leaving stale RGB565 examples in specs will make implementation review
ambiguous.
- Over-editing scene specs could accidentally imply a scene payload change that
`DEC-0037` does not authorize.
@@ -0,0 +1,144 @@
---
id: PLN-0082
ticket: studio-packer-rgba8888-asset-pipeline
title: RGBA8888 Palette Model and ARGB Conversion
status: review
created: 2026-05-23
completed:
ref_decisions:
- DEC-0037
tags:
- packer
- palette
- rgba8888
- conversion
---
## Objective
Replace the packer palette model with canonical RGBA8888 data and introduce a
single deliberate ARGB-to-RGBA conversion boundary for image inputs.
## Background
`PackerPaletteV1` currently stores `originalArgb8888` and `convertedRgb565`.
`PackerGlyphBankWalker` reads Java ARGB pixels, drops alpha semantics, reserves
index `0`, applies magenta color-key, and converts colors to RGB565.
## Scope
### Included
- Replace `PackerPaletteV1` fields with canonical `rgba8888`.
- Add or localize ARGB-to-RGBA conversion helpers.
- Preserve partial alpha.
- Remove RGB565 conversion from the normal palette model.
- Expand glyph palette extraction from 15 to 16 usable colors.
### Excluded
- Binary `assets.pa` emission changes.
- Read/detail API projection changes outside direct model compile fixes.
- Spec edits.
- Fixture regeneration for `main` and `fragments`.
## Execution Steps
### Step 1 - Replace the palette record
**What:** Change the packer palette model to carry canonical RGBA8888 values.
**How:** Replace `int[] originalArgb8888, short[] convertedRgb565` with
`int[] rgba8888`. Keep the record name only if it remains semantically useful;
otherwise rename only if all callers are updated in the same change.
**File(s):**
- `prometeu-packer/prometeu-packer-v1/src/main/java/p/packer/models/PackerPaletteV1.java`
### Step 2 - Convert ARGB image pixels to RGBA
**What:** Introduce one conversion path from Java `BufferedImage` ARGB to raw
runtime RGBA.
**How:** Convert `0xAARRGGBB` to `0xRRGGBBAA` when building palette entries.
Do not store ARGB in canonical packer metadata.
**File(s):**
- `prometeu-packer/prometeu-packer-v1/src/main/java/p/packer/repositories/PackerGlyphBankWalker.java`
### Step 3 - Remove magenta color-key and reserved index behavior
**What:** Stop treating alpha zero or magenta as special palette-index behavior.
**How:** Remove `COLOR_KEY_RGB`. Build palette identity from full RGBA8888
values, including alpha. Assign indices from `0` through `15`.
**File(s):**
- `prometeu-packer/prometeu-packer-v1/src/main/java/p/packer/repositories/PackerGlyphBankWalker.java`
### Step 4 - Preserve partial alpha
**What:** Remove partial-alpha warnings and flattening.
**How:** Delete the `partialAlphaFound` warning path. Ensure pixels with alpha
from `0` through `255` participate in palette extraction by full RGBA value.
**File(s):**
- `prometeu-packer/prometeu-packer-v1/src/main/java/p/packer/repositories/PackerGlyphBankWalker.java`
### Step 5 - Update color-limit validation
**What:** Change validation from 15 usable colors to 16 usable colors.
**How:** Replace `MAX_COLORS_PER_PALETTE = 15` with a 16-entry limit and update
diagnostic wording to remove `indices 1..15`.
**File(s):**
- `prometeu-packer/prometeu-packer-v1/src/main/java/p/packer/repositories/PackerGlyphBankWalker.java`
## Test Requirements
### Unit Tests
- Update `PackerGlyphBankWalkerTest` to assert:
- 16 unique RGBA colors are valid.
- a 17th unique RGBA color is blocking.
- alpha `0`, partial alpha, and alpha `255` are preserved.
- magenta is treated as an ordinary color.
- palette index `0` can hold an ordinary color.
### Integration Tests
- None for this plan; binary emission is covered by a later plan.
### Manual Verification
- Search packer model and glyph walker sources for `convertedRgb565`,
`originalArgb8888`, `COLOR_KEY_RGB`, `convertToRgb565`, and partial-alpha
warning text.
## Acceptance Criteria
- [ ] `PackerPaletteV1` exposes `rgba8888` and no RGB565 field.
- [ ] `PackerGlyphBankWalker` stores canonical RGBA values.
- [ ] Magenta is not special.
- [ ] Alpha zero and partial alpha are valid palette data.
- [ ] All 16 palette indices are usable.
- [ ] Unit tests cover conversion and palette indexing semantics.
## Dependencies
- Depends on `PLN-0081` for spec wording.
- Must complete before payload emission and projection plans.
## Risks
- Confusing Java ARGB input with runtime RGBA output will create hard-to-debug
byte-order failures.
- Cache reuse may keep stale palette metadata if reusable metadata checks are
not updated with the model change.
@@ -0,0 +1,145 @@
---
id: PLN-0083
ticket: studio-packer-rgba8888-asset-pipeline
title: RGBA8888 Glyph Payload Emission and Size Accounting
status: review
created: 2026-05-23
completed:
ref_decisions:
- DEC-0037
tags:
- packer
- assets-pa
- glyph-bank
- rgba8888
---
## Objective
Change packer glyph-bank runtime payload emission from RGB565 palette bytes to
RGBA8888 palette bytes while keeping `GLYPH/indexed_v1` and the fixed
64-palette model.
## Background
`DEC-0037` requires `GLYPH/indexed_v1` to retain its format name and indexed
model but emit RGBA8888 palette entries. Current payload emission in
`FileSystemPackerWorkspaceService` writes RGB565 bytes, reserves index `0`, and
uses color-key bytes.
## Scope
### Included
- Update glyph-bank payload palette byte emission.
- Update measured payload size and decoded-size accounting.
- Remove RGB565 palette constants and palette color-key bytes from emission.
- Keep scene `palette_id` payload semantics unchanged.
### Excluded
- Palette model extraction changes covered by `PLN-0082`.
- Read/detail projection changes covered by `PLN-0084`.
- Variable palette count.
## Execution Steps
### Step 1 - Update glyph payload constants and formulas
**What:** Change palette entry width from 2 bytes to 4 bytes.
**How:** Introduce clear constants for palette count, colors per palette, and
RGBA bytes per color. Use `64 * 16 * 4` for palette block size.
**File(s):**
- `prometeu-packer/prometeu-packer-v1/src/main/java/p/packer/services/FileSystemPackerWorkspaceService.java`
- `prometeu-packer/prometeu-packer-v1/src/main/java/p/packer/repositories/PackerAssetWalker.java`
- `prometeu-packer/prometeu-packer-v1/src/main/java/p/packer/repositories/PackerRuntimeAssetMaterializer.java`
### Step 2 - Emit RGBA8888 palette bytes
**What:** Write each palette color as runtime RGBA channel bytes.
**How:** Replace RGB565 little-endian writes with four byte writes in `R`, `G`,
`B`, `A` order derived from the canonical `rgba8888` integer value.
**File(s):**
- `prometeu-packer/prometeu-packer-v1/src/main/java/p/packer/services/FileSystemPackerWorkspaceService.java`
### Step 3 - Remove reserved color-key emission
**What:** Stop writing a synthetic color-key value at palette index `0`.
**How:** Remove `GLYPH_BANK_COLOR_KEY_RGB565` and any emission path that fills
index `0` with magenta. Emit declared RGBA values for index `0` like every
other index.
**File(s):**
- `prometeu-packer/prometeu-packer-v1/src/main/java/p/packer/services/FileSystemPackerWorkspaceService.java`
### Step 4 - Update declared palette lookup
**What:** Read `rgba8888` from declared pipeline metadata.
**How:** Replace `originalArgb8888`/`convertedRgb565` lookup paths with
`rgba8888`. Ensure empty or malformed `rgba8888` is structural failure where
emission requires a palette.
**File(s):**
- `prometeu-packer/prometeu-packer-v1/src/main/java/p/packer/services/FileSystemPackerWorkspaceService.java`
- `prometeu-packer/prometeu-packer-v1/src/main/java/p/packer/repositories/PackerAssetWalker.java`
### Step 5 - Keep scene payload stable
**What:** Preserve scene `palette_id` layout.
**How:** Do not change `writeSceneBankPayload` except compile fixes caused by
shared helper changes. Scene tile records continue carrying `palette_id` as an
index into the referenced glyph palette.
**File(s):**
- `prometeu-packer/prometeu-packer-v1/src/main/java/p/packer/services/FileSystemPackerWorkspaceService.java`
## Test Requirements
### Unit Tests
- Add or update tests asserting glyph payload size includes a 4096-byte palette
block.
- Assert emitted palette bytes for a known RGBA value, including alpha.
- Assert index `0` emits declared RGBA data, not magenta.
### Integration Tests
- Update workspace build tests that read `build/assets.pa` and assert glyph-bank
offsets/sizes.
### Manual Verification
- Search production packer code for `GLYPH_BANK_COLOR_KEY_RGB565`,
`convertedRgb565`, RGB565 palette byte writes, and hard-coded `2048`.
## Acceptance Criteria
- [ ] Glyph payloads keep `GLYPH/indexed_v1`.
- [ ] Glyph palette blocks are 4096 bytes.
- [ ] Palette entries are emitted as RGBA bytes in runtime channel order.
- [ ] No synthetic magenta/color-key value is emitted.
- [ ] Size and decoded-size metadata match the new payload length.
- [ ] Scene `palette_id` payload shape is unchanged.
## Dependencies
- Depends on `PLN-0082`.
- Should run before tests/fixture conformance in `PLN-0085`.
## Risks
- Updating size formulas without updating emitted bytes, or vice versa, will
corrupt payload slicing in `assets.pa`.
- Accidental scene payload edits could widen the change beyond `DEC-0037`.
@@ -0,0 +1,141 @@
---
id: PLN-0084
ticket: studio-packer-rgba8888-asset-pipeline
title: RGBA8888 Packer Projections and Workspace APIs
status: review
created: 2026-05-23
completed:
ref_decisions:
- DEC-0037
tags:
- packer
- studio
- api
- rgba8888
---
## Objective
Update packer and Studio-facing read/detail/write projections so palette data
is exposed and accepted as `rgba8888`, with no normal `convertedRgb565` or
canonical `originalArgb8888` surface.
## Background
`DEC-0037` requires packer metadata, Studio read/detail projections, tests, and
fixtures to stop treating RGB565 as normal palette data. Several services still
parse or project `originalArgb8888` and `convertedRgb565`.
## Scope
### Included
- Update parser and declaration normalization for palette metadata.
- Update read/detail mappers.
- Update palette-overhauling and bank-composition support to emit `rgba8888`.
- Preserve existing DTO shapes except for palette payload field names.
### Excluded
- Binary payload byte emission.
- Renderer/runtime changes.
- Manual regeneration of `main` and `fragments`.
## Execution Steps
### Step 1 - Update asset declaration parsing
**What:** Parse canonical `rgba8888` arrays from `asset.json`.
**How:** Replace palette validation that requires `originalArgb8888` and
`convertedRgb565` with validation for `rgba8888`. Keep numeric validation.
Reject malformed or missing `rgba8888` where a palette payload is required.
**File(s):**
- `prometeu-packer/prometeu-packer-v1/src/main/java/p/packer/services/PackerAssetDeclarationParser.java`
### Step 2 - Update details projection
**What:** Return `rgba8888` from asset details.
**How:** Change `palettePayloadFromNode` to project `{ index, rgba8888 }`.
Remove `convertedRgb565` and canonical `originalArgb8888` from details output.
**File(s):**
- `prometeu-packer/prometeu-packer-v1/src/main/java/p/packer/services/PackerAssetDetailsService.java`
### Step 3 - Update read message mapping
**What:** Map `PackerPaletteV1` and cached palette metadata to `rgba8888`.
**How:** Replace `originalArgb8888` and `convertedRgb565` mapping with a single
`rgba8888` array.
**File(s):**
- `prometeu-packer/prometeu-packer-v1/src/main/java/p/packer/services/PackerReadMessageMapper.java`
### Step 4 - Update workspace write operations
**What:** Ensure packer write APIs that apply palette changes persist `rgba8888`.
**How:** Replace palette-overhauling and related write-lane logic that requires
both `originalArgb8888` and `convertedRgb565` with a `rgba8888` contract.
**File(s):**
- `prometeu-packer/prometeu-packer-v1/src/main/java/p/packer/services/FileSystemPackerWorkspaceService.java`
### Step 5 - Update cache reuse and walk projection checks
**What:** Make cache reuse validate new palette metadata.
**How:** Replace reusable metadata checks for `originalArgb8888` with
`rgba8888`. Stale cached RGB565-derived metadata must not be considered
reusable.
**File(s):**
- `prometeu-packer/prometeu-packer-v1/src/main/java/p/packer/repositories/PackerGlyphBankWalker.java`
- `prometeu-packer/prometeu-packer-v1/src/main/java/p/packer/repositories/PackerAssetWalker.java`
## Test Requirements
### Unit Tests
- Update parser tests to accept `rgba8888` and reject missing/malformed
`rgba8888`.
- Update details service tests to assert `rgba8888`.
- Update read mapper coverage for `PackerPaletteV1`.
- Update write operation tests for palette overhauling.
### Integration Tests
- Exercise a workspace read/build flow from `asset.json` using `rgba8888`.
### Manual Verification
- Search `prometeu-packer` for `originalArgb8888` and `convertedRgb565` after
this plan. Remaining matches must be migration-only or removed in later
fixture plan.
## Acceptance Criteria
- [ ] `asset.json` palette metadata uses `rgba8888`.
- [ ] Details/read projections expose `rgba8888`.
- [ ] Workspace write operations persist `rgba8888`.
- [ ] Stale RGB565-derived cache metadata is not reused as canonical.
- [ ] No normal API requires `convertedRgb565`.
## Dependencies
- Depends on `PLN-0082`.
- Can run partly in parallel with `PLN-0083` after the palette model is stable.
## Risks
- DTO consumers may assume old map keys. Tests must cover the Studio-facing
projection boundary.
- Cache reuse can hide stale behavior if not invalidated by metadata shape.
@@ -0,0 +1,141 @@
---
id: PLN-0085
ticket: studio-packer-rgba8888-asset-pipeline
title: RGBA8888 Tests, Fixtures, and Conformance Updates
status: review
created: 2026-05-23
completed:
ref_decisions:
- DEC-0037
tags:
- tests
- fixtures
- conformance
- rgba8888
---
## Objective
Update packer tests and fixtures so RGBA8888 is the asserted source of truth and
RGB565-specific expectations are removed.
## Background
`DEC-0037` requires tests and fixtures to stop proving RGB565 behavior. The code
base has parser, walker, details, materializer, and workspace service tests that
mention `convertedRgb565`, `originalArgb8888`, 15-color limits, magenta
color-key behavior, and RGB565 payload sizes.
## Scope
### Included
- Update packer unit tests and integration-style workspace tests.
- Update fixture `asset.json` files under packer test resources.
- Add conformance-oriented assertions for RGBA channel order, alpha, index `0`,
16 usable colors, and removed color-key behavior.
### Excluded
- Manual regeneration of `test-projects/main` and `fragments`.
- Production code changes except minor compile-fix test helpers.
- Runtime repository tests.
## Execution Steps
### Step 1 - Update parser and details tests
**What:** Replace palette payload fixtures with `rgba8888`.
**How:** Rewrite test JSON snippets and assertions that mention
`originalArgb8888` or `convertedRgb565`.
**File(s):**
- `prometeu-packer/prometeu-packer-v1/src/test/java/p/packer/services/PackerAssetDeclarationParserTest.java`
- `prometeu-packer/prometeu-packer-v1/src/test/java/p/packer/services/PackerAssetDetailsServiceTest.java`
### Step 2 - Update glyph walker tests
**What:** Assert new palette extraction semantics.
**How:** Add image fixtures in tests that cover:
16 colors, 17-color failure, alpha 0, partial alpha, magenta as ordinary color,
and index `0` as ordinary.
**File(s):**
- `prometeu-packer/prometeu-packer-v1/src/test/java/p/packer/repositories/PackerGlyphBankWalkerTest.java`
### Step 3 - Update materializer and workspace service tests
**What:** Assert RGBA8888 runtime payload and metadata behavior.
**How:** Update tests that read `assets.pa`, measured bank size, payload offsets,
and palette byte expectations. Replace RGB565 byte checks with RGBA byte checks.
**File(s):**
- `prometeu-packer/prometeu-packer-v1/src/test/java/p/packer/repositories/PackerRuntimeAssetMaterializerTest.java`
- `prometeu-packer/prometeu-packer-v1/src/test/java/p/packer/services/FileSystemPackerWorkspaceServiceTest.java`
- `prometeu-packer/prometeu-packer-v1/src/test/java/p/packer/services/PackerRuntimePatchServiceTest.java`
- `prometeu-packer/prometeu-packer-v1/src/test/java/p/packer/services/PackerRuntimeRegistryTest.java`
### Step 4 - Update packer fixture assets
**What:** Replace fixture `asset.json` palette fields with `rgba8888`.
**How:** Edit packer test fixtures under `src/test/resources/fixtures` so
canonical palette declarations do not contain `convertedRgb565`.
**File(s):**
- `prometeu-packer/prometeu-packer-v1/src/test/resources/fixtures/**/asset.json`
### Step 5 - Add stale-contract guards
**What:** Add tests or quality checks that catch old RGB565 palette contract
residue.
**How:** Add assertions in existing tests or a focused repository quality test
that normal packer specs/tests/fixtures do not contain `convertedRgb565` or
RGB565 glyph palette payload expectations.
**File(s):**
- Existing packer test suites under `prometeu-packer/prometeu-packer-v1/src/test/java`
## Test Requirements
### Unit Tests
- Parser, details, mapper, glyph walker, and workspace service unit tests must
all pass.
### Integration Tests
- Run the relevant Gradle test task for `prometeu-packer-v1`.
### Manual Verification
- Search for `convertedRgb565`, `originalArgb8888`, `RGB565`, `rgb565`, `2048`,
and magenta color-key references in packer tests and fixtures.
## Acceptance Criteria
- [ ] Tests use `rgba8888` as canonical palette data.
- [ ] Tests assert RGBA channel order and alpha preservation.
- [ ] Tests assert 16 usable palette entries.
- [ ] Tests assert magenta is ordinary or no longer special.
- [ ] Tests assert 4096-byte palette blocks where payload size is checked.
- [ ] Packer test fixtures no longer rely on `convertedRgb565`.
## Dependencies
- Depends on `PLN-0082`, `PLN-0083`, and `PLN-0084`.
## Risks
- Some stale generated fixture data may be easier to regenerate than hand-edit.
- Overbroad residue checks could flag historical discussion artifacts; scope
checks to normal specs, code, tests, and fixtures.
@@ -0,0 +1,148 @@
---
id: PLN-0086
ticket: studio-packer-rgba8888-asset-pipeline
title: RGBA8888 Final Integration and Residue Removal
status: review
created: 2026-05-23
completed:
ref_decisions:
- DEC-0037
tags:
- integration
- validation
- residue-removal
- rgba8888
---
## Objective
Run final integration checks and remove normal-path RGB565 residue after the
spec, model, emission, projection, and test plans are implemented.
## Background
`DEC-0037` prohibits RGB565 compatibility mode, normal `convertedRgb565`
projection, magenta color-key behavior, reserved palette index `0`, and partial
alpha flattening. Final validation must prove that the repository implements
those constraints coherently.
## Scope
### Included
- Repository-wide residue audit.
- Full relevant Gradle test execution.
- Discussion workflow validation.
- Final implementation notes for follow-up plan or lesson creation.
### Excluded
- New feature design.
- Runtime repository changes.
- Variable palette-count work in `DSC-0005`.
- Manual regeneration of `main` and `fragments`.
## Execution Steps
### Step 1 - Run focused residue searches
**What:** Find stale RGB565 palette-contract residue.
**How:** Search production specs/code/tests/fixtures for:
`convertedRgb565`, `originalArgb8888`, `RGB565`, `rgb565`, `COLOR_KEY`,
`magenta`, `2048`, `indices 1..15`, and partial-alpha flattening text.
Classify each match as removed, historical discussion-only, or out-of-scope.
**File(s):**
- `docs/specs/packer/**`
- `docs/specs/studio/**`
- `prometeu-packer/**`
### Step 2 - Run packer tests
**What:** Execute the packer test suite.
**How:** Run the Gradle test task that covers `prometeu-packer-v1` and related
API modules.
**File(s):**
- Gradle modules under `prometeu-packer`
### Step 3 - Run broader build validation
**What:** Verify Studio build integration still compiles.
**How:** Run the repository's standard build or the narrowest existing Gradle
task that compiles Studio plus packer consumers.
**File(s):**
- Root Gradle project
- `prometeu-app`
- `prometeu-packer`
### Step 4 - Validate discussion workflow
**What:** Ensure discussion artifacts remain consistent.
**How:** Run `discussion validate` after implementation and before any
housekeeping.
**File(s):**
- `discussion/index.ndjson`
- `discussion/workflow/**`
### Step 5 - Record remaining intentional residue
**What:** Document any allowed remaining RGB565 references.
**How:** If matches remain only in historical discussions, runtime references,
or explicit future migration notes, list them in the implementation summary so
housekeeping and lesson work can distinguish intentional context from missed
normal-path behavior.
**File(s):**
- Implementation summary or future lesson, after code work is complete.
## Test Requirements
### Unit Tests
- Packer unit tests must pass.
### Integration Tests
- Packer workspace build/materialization tests must pass.
- Studio compile/build validation must pass.
### Manual Verification
- Residue search results must contain no normal-path `convertedRgb565`,
RGB565 glyph palette payload, magenta color-key, reserved index `0`, or
partial-alpha flattening behavior.
## Acceptance Criteria
- [ ] `discussion validate` passes.
- [ ] Packer tests pass.
- [ ] Studio/packer build validation passes.
- [ ] Normal specs/code/tests/fixtures contain no stale RGB565 glyph-palette
contract residue.
- [ ] Remaining stale-looking matches, if any, are documented as historical or
explicitly out of scope.
- [ ] `DSC-0005` remains untouched except by explicit future work.
## Dependencies
- Depends on `PLN-0081` through `PLN-0085`.
## Risks
- A broad residue search may include historical discussions and cause false
positives.
- Generated project cache files may change during tests; those changes must be
reviewed separately from source edits.