# ISIS v2 ENGINE-BUNDLE Output Schema and Metadata Contract

Generated: 2026-03-06T10:15:17.116Z Checklist: `MXD-0069` (ISIS2-01259) Format:
`engine-bundle` (application/zip) Phase: Phase 4 | Milestone: M3 Launch
(2026-07-27 to 2026-10-30)

## Objective

Define a canonical schema and metadata contract for engine bundle archive
outputs with target-engine package scaffolding, deterministic archive metadata,
and workflow provenance suitable for downstream Unreal, Unity, and Godot ingest.

## Canonical Schema

- Schema ID: `isis.v2.output.engine-bundle.package`
- Schema Version: `1.0.0`
- Binary signature: `50 4B 03 04`
- Required top-level fields:
  - `schemaVersion`
  - `format`
  - `engine`
  - `archiveFormat`
  - `sourceMeshFormat`
  - `entryCount`
  - `materialWorkflowCount`
  - `textureCount`
  - `includesReadme`
  - `includesPackageJson`
  - `includesMetadataManifest`
  - `includesPreview`
  - `artifactRole`
  - `bundleManifest`
  - `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                                      |
| --------------- | ------------ | ------------------------------------------------------- |
| `engine-bundle` | WARM         | `engine-bundle/README.md`, `engine-bundle/package.json` |

## Supported Output Classes

| Output Class    | Package Classes |
| --------------- | --------------- |
| `engine_bundle` | `engine-bundle` |
| `sprite_sheet`  | `engine-bundle` |
| `texture_set`   | `engine-bundle` |

## Applicable Asset Families

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

## Validation Invariants

- Engine bundle outputs require README.md, package.json, and
  metadata/manifest.json coverage in bundleManifest.files.
- bundleManifest.engine and bundleManifest.sourceMesh.format must match the
  top-level engine and sourceMeshFormat fields.
- entryCount, materialWorkflowCount, and textureCount must match the declared
  manifest inventories.
- Bundle file paths, materialWorkflows, and textureSlots must remain unique.
- Engine bundle manifests require the engine-specific config file path for
  Unreal, Unity, or Godot.
- RegisterOutputRequest mimeType and storage.key must align with archiveFormat,
  and type must be data or other when engineBundlePackage is provided.

## Verification Commands

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

## Acceptance Criteria

- Output registry accepts first-class engine bundle package metadata with strict
  validation over archive format, engine target scaffolding, deterministic
  manifest linkage, and package artifact coverage.
- Canonical engine bundle contract enumerates the package classes and output
  classes that legitimately emit engine bundle archives under the shared output
  taxonomy.
- Engine bundle manifest provenance preserves workflow-variant and
  dependency-manifest linkage needed for deterministic downstream ingest into
  Unreal, Unity, and Godot.
- Validator and schema tests catch invalid engine bundle registrations and
  enforce the canonical metadata surface.

## Traceability

- Checklist item: `MXD-0069`
- Ticket key: `ISIS2-01259`
- 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`
  - `docs/domains/isis/remediation-v2/ISIS_V2_ENGINE_EXPORT_BUNDLES.md`
  - `docs/domains/isis/remediation-v2/ISIS_V2_CERTIFICATION_MATRIX.json`
  - `ISIS_TODOS_2.md`
