# ISIS v2 GLB Output Schema and Metadata Contract

Generated: 2026-03-06T09:31:29.382Z Checklist: `MXD-0049` (ISIS2-01239) Format:
`glb` (model/gltf-binary) Phase: Phase 4 | Milestone: M3 Launch (2026-07-27 to
2026-10-30)

## Objective

Define a canonical schema and metadata contract for GLB outputs with chunk-level
size validation, scene-graph coverage, deterministic manifest metadata, and
workflow provenance suitable for compact engine-ready mesh, rig, and scene
delivery.

## Canonical Schema

- Schema ID: `isis.v2.output.glb.package`
- Schema Version: `1.0.0`
- Binary signature: `67 6C 54 46`
- Required top-level fields:
  - `schemaVersion`
  - `format`
  - `assetVersion`
  - `sceneCount`
  - `nodeCount`
  - `meshCount`
  - `materialCount`
  - `textureCount`
  - `imageCount`
  - `animationCount`
  - `skinCount`
  - `jsonChunkLength`
  - `binaryChunkLength`
  - `totalByteLength`
  - `containsExternalResources`
  - `extensionsUsed`
  - `upAxis`
  - `artifactRole`
  - `manifest`
- Manifest fields:
  - `filename`
  - `mimeType`
  - `checksumAlgorithm`
  - `checksum`
  - `generatedAt`
  - `provenance`
- Provenance fields:
  - `assetFamilyId`
  - `workflowId`
  - `workflowVariant`
  - `promptFingerprint`
  - `seed`
  - `modelId`
  - `dependencyManifestRef`

## Supported Package Classes

| Package Class  | Storage Tier | Required Artifacts                                          |
| -------------- | ------------ | ----------------------------------------------------------- |
| `mesh-package` | WARM         | `mesh/main.{obj,fbx,gltf,glb}`, `mesh/topology-report.json` |

## Supported Output Classes

| Output Class   | Package Classes |
| -------------- | --------------- |
| `mesh_package` | `mesh-package`  |

## Applicable Asset Families

| Asset Family | Output Classes | Naming Rules |
| ------------ | -------------- | ------------ |

## Validation Invariants

- defaultSceneIndex, when provided, must resolve to a declared GLB scene.
- Animation-cache GLB outputs require at least one animation.
- Rig-source GLB outputs require at least one skin.
- Mesh-source GLB outputs require at least one mesh.
- Animated or mesh-bearing GLB outputs require a binary chunk.
- GLB outputs with textures require at least one image.
- totalByteLength must exceed the JSON chunk length for GLB outputs.
- GLB extensionsUsed values must be unique.
- RegisterOutputRequest mimeType must be model/gltf-binary, type must be
  3d-model, and storage.key must end with .glb when glbPackage is supplied.
- GLB manifest checksum uses sha256 and must preserve workflow/dependency
  provenance linkage.

## Verification Commands

- `pnpm --filter @isis/output-registry exec vitest run src/schemas/output.schema.spec.ts`
- `node scripts/isis/validate-v2-glb-output-schema-metadata-contract.mjs`

## Acceptance Criteria

- Output registry accepts first-class GLB package metadata with strict
  validation over scene selection, chunk sizing, mesh and rig signaling, and
  manifest checksum fields.
- Canonical GLB contract enumerates the package classes and output classes that
  legitimately emit GLB artifacts under the shared output taxonomy.
- GLB manifest provenance preserves workflow-variant and dependency-manifest
  linkage needed for deterministic downstream ingest of engine-ready binary
  scene interchange artifacts.
- Validator and schema tests catch invalid GLB registrations and enforce the
  canonical metadata surface.

## Traceability

- Checklist item: `MXD-0049`
- Ticket key: `ISIS2-01239`
- Source references:
  - `docs/domains/isis/remediation-v2/ISIS_REMEDIATION_V2_TICKETS.json`
  - `docs/domains/isis/remediation-v2/ISIS_V2_OUTPUT_PACKAGE_TAXONOMY.json`
  - `apps/isis/output-registry/src/schemas/output.schema.ts`
  - `apps/isis/output-registry/src/schemas/output.schema.spec.ts`
  - `apps/isis/output-registry/src/services/output.service.ts`
  - `apps/isis/output-registry/src/types.ts`
  - `ISIS_TODOS_2.md`
