# Validation and acceptance

Status: implementation contract · Version 0.1.0 · 2026-08-21

Validation protects the shared world from assets that are attractive in isolation but incompatible in context. It combines hard technical gates, a weighted visual-integrity score and insertion tests in real Scenes.

## Required sequence

1. Validate the Component or Scene record against its JSON Schema.
2. Run file-integrity gates: path, MIME type, dimensions, alpha, color profile and checksum.
3. Inspect projection, world scale, footprint and anchors.
4. Inspect material, light direction, ambient response, contact shadow and edge treatment.
5. Exercise every declared interaction state without depending on color alone.
6. Insert the Component into at least two fixtures with different environment light.
7. Score the result, record evidence and issue a decision.

## Hard gates

Failure of any hard gate returns the asset for repair. A high score cannot average it away.

| Gate | Requirement |
| --- | --- |
| Schema | Valid canonical record with stable ID and version. |
| Alpha | RGBA file with genuinely transparent pixels and clean edges. |
| Projection | Declared 2:1 basis, orientation and elevation agree with the pixels. |
| Anchors | Placement, interaction and shadow anchors exist; subtype anchors are complete. |
| Scale | World dimensions and footprint are plausible within subtype tolerance. |
| Lighting | `receivesLight` is declared; no incompatible Scene-specific bake. |
| Provenance | Author/tool, source references, permitted use and checksum recorded. |
| Accessibility | Accessible name, focus anchor, keyboard path and non-color state cue. |

## Weighted score

Acceptance requires 88/100 or better after hard gates pass.

| Dimension | Points |
| --- | ---: |
| Projection and anchors | 20 |
| Scale and footprint | 10 |
| Palette and materials | 15 |
| World lighting | 15 |
| Shadow and contact | 10 |
| Detail and edge integrity | 10 |
| Atmosphere and ornament | 8 |
| Alpha and runtime readiness | 7 |
| States and interaction | 3 |
| Accessibility | 2 |

## Fixture matrix

- **Neutral workshop:** flat mid-value ground, neutral authoring light, no atmospheric camouflage.
- **Commons dusk:** warm sun, deep peripheral value, stone, brass, foliage and portrait presence.
- **Grove moonrise:** cool fill, layered vegetation, soft occlusion and strong rim-separation demands.

Components must pass two fixtures; reusable foundation Components should pass all three. Scene records must remain legible with Panels, Overlays and Chrome disabled.

## Decisions

- **Accept:** all gates pass, score ≥ 88, fixtures pass.
- **Accept with documented variance:** a purposeful exception is bounded, tested and recorded.
- **Return for repair:** the visual direction is sound but one or more defects are actionable.
- **Reject:** the asset conflicts with the constitution, lacks rights or cannot be made interoperable without reconstruction.

## Automated checks

Run `npm run validate:system`. The validator parses all catalogs and Scenes, validates all 50 Component records and all nine Scene records, resolves every Scene instance to a Component, confirms expected files, inspects PNG alpha pixels and checks local Markdown links. Its JSON result is written to `validation/latest-validation.json` and packaged with the release.

Automation is evidence, not taste. A human visual review remains mandatory for lighting, material truth, relational dignity and whether the result feels like a living Kiduna place.
