# ISIS v2 WS07-007: Editorial Export Bundles

## Scope

`WS07-007` adds first-class editorial export bundles for cinematic workflows,
covering EDL exports, shot manifests, and timecode maps.

## Research and Existing Implementation Alignment

- Reused the first-class package pattern established by
  `output_spec.three_d_package` for structured export bundle contracts.
- Reused output contract lint expansion strategy from 3D package derivation to
  ensure editorial artifacts are injected into required bundle outputs.
- Reused generation-api structured output assembly pattern used by
  `threeDPackage` and `renderPasses`, extending it with deterministic editorial
  metadata.

## Deliverables

1. Extended workflow schema with `editorial_package` contracts:

- `edl` block with format, fps, drop-frame, and timeline start timecode.
- `shot_manifest` block with manifest version and render-pass-reference policy.
- `timecode_map` block with CSV/JSON format control.
- Validation gate enforcing editorial package usage only on video outputs.

2. Extended output contract lint:

- Auto-derived editorial artifact bundle outputs (`edl`, `shot_manifest`,
  `timecode_map`).
- Added lint validation for editorial-package output-type compatibility and
  required artifact presence.

3. Extended runtime workflow capability parsing:

- Parsed `output_spec.editorial_package` into
  `WorkflowOutputConfig.editorialBundle`.

4. Extended generation output contracts:

- Added `JobOutput.editorialBundle` in generation-api and client SDK types.
- Added zod schemas for editorial bundle payloads.

5. Implemented runtime editorial bundle assembly:

- Added deterministic editorial bundle generation in both real provider and
  simulated execution paths.
- Emitted EDL metadata (fps/drop-frame/start timecode/event count).
- Emitted shot manifest entries with source/timeline frame+timecode mappings and
  optional render-pass references.
- Emitted timecode map entries synchronized to shot manifest ranges.

6. Updated representative cinematic workflow metadata:

- Added `editorial_package` declarations to `animatediff-controlnet` workflow.

7. Added comprehensive tests:

- Workflow schema validation for editorial package contracts.
- Rejection test for non-video editorial package misuse.
- Output package lint derivation test for editorial artifacts.
- Job output schema validation for editorial bundle payloads.
- Executor simulation test verifying EDL/shot manifest/timecode-map emission.

## Verification Commands

```bash
pnpm --filter @isis/workflows exec vitest run src/workflows.spec.ts
pnpm --filter @isis/generation-api exec vitest run src/schemas/job.schema.spec.ts src/workflows/executor.spec.ts
node scripts/isis/validate-v2-compliance-gate.mjs
```
