# Stage S7: Post-Episode Review

You are reviewing a completed episode and updating the cross-episode continuity state.

## Episode Context

Episode: **{episode_number}** — "{episode_title}"

Read the episode brief: `{episode_path}/brief.txt`
Read the story bible: `{bible_path}`

## Current Continuity State

{continuity_state}

## Completed Assembly

The episode has been assembled. Review:
- The pipeline state: `{episode_path}/pipeline.json`
- The final assembly: `{episode_path}/13-assembly/`
- The script and grid outputs from earlier stages

## Task

Review the completed episode and update the continuity tracking for subsequent episodes.

### What to Track

1. **Character Visual State**
   - How each character actually looks in the generated video (may differ slightly from reference)
   - Specific visual details established (clothing colors, hairstyle, etc.)
   - Notes for maintaining consistency in next episodes

2. **Location Visual State**
   - How locations were rendered
   - Specific details to maintain (color of sky, building details, etc.)

3. **Story Progress**
   - What was shown vs. what was planned
   - Any deviations from the episode breakdown
   - Setup for next episode

4. **Quality Notes**
   - What worked well (for replicating in next episodes)
   - What to adjust (prompt refinements, style corrections)

5. **New References**
   - If any generated frames/grids produced excellent character shots, note them
   - These can be extracted and added to references/ for next episodes

## Output

Write TWO files:

1. **continuity_update.json** — Update to merge into continuity.json:
```json
{
  "last_episode_reviewed": {episode_number},
  "characters": {
    "character_id": {
      "visual_notes": "...",
      "consistency_tips": "...",
      "last_seen_in": {episode_number}
    }
  },
  "locations": {
    "location_id": {
      "visual_notes": "...",
      "established_details": "..."
    }
  },
  "story_progress": {
    "shown": "...",
    "next_setup": "..."
  },
  "quality_notes": {
    "worked_well": ["..."],
    "adjust_next": ["..."]
  },
  "new_references": [
    {"source": "path/to/frame", "description": "...", "target": "references/people/..."}
  ]
}
```

2. **user_message.txt** — Summary of the review: what was established, any issues, recommendations for next episode.
