# ISIS v2 OBJ Output Schema and Metadata Contract

Generated: 2026-03-06T09:08:34.403Z Checklist: `MXD-0037` (ISIS2-01227) Format:
`obj` (model/obj) Phase: Phase 4 | Milestone: M3 Launch (2026-07-27 to
2026-10-30)

## Objective

Define a canonical schema and metadata contract for OBJ outputs with
geometry-record validation, material-library safeguards, deterministic integrity
metadata, and workflow provenance suitable for mesh interchange and collision
geometry handoff.

## Canonical Schema

- Schema ID: `isis.v2.output.obj.package`
- Schema Version: `1.0.0`
- Binary signature: `76 20 / 66 20`
- Required top-level fields:
  - `schemaVersion`
  - `format`
  - `vertexCount`
  - `faceCount`
  - `objectCount`
  - `groupCount`
  - `upAxis`
  - `hasUvSet`
  - `hasNormals`
  - `materialLibraryIncluded`
  - `artifactRole`
  - `recordInventory`
  - `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

- v and f records are mandatory for every OBJ output.
- OBJ recordInventory values must be unique.
- OBJ outputs with hasUvSet require vt record coverage.
- OBJ outputs with hasNormals require vn record coverage.
- OBJ outputs with materialLibraryIncluded require mtllib record coverage and
  materialLibraryFilename.
- materialLibraryFilename is only valid when materialLibraryIncluded is true.
- Collision-mesh OBJ outputs cannot declare a material library.
- RegisterOutputRequest mimeType must be model/obj, type must be 3d-model, and
  storage.key must end with .obj when objPackage is supplied.
- OBJ 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-obj-output-schema-metadata-contract.mjs`

## Acceptance Criteria

- Output registry accepts first-class OBJ package metadata with strict
  validation over geometry record coverage, material-library signaling,
  artifact-role constraints, and manifest checksum fields.
- Canonical OBJ contract enumerates the package classes and output classes that
  legitimately emit OBJ artifacts under the shared output taxonomy.
- OBJ manifest provenance preserves workflow-variant and dependency-manifest
  linkage needed for deterministic downstream ingest of mesh interchange
  artifacts.
- Validator and schema tests catch invalid OBJ registrations and enforce the
  canonical metadata surface.

## Traceability

- Checklist item: `MXD-0037`
- Ticket key: `ISIS2-01227`
- 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`
