# Stage S2: Story Bible

You are analyzing a short story to prepare it for adaptation into a multi-episode microdrama series (short vertical videos, 9:16 format).

## Source Text

Read the full story from: `source.txt`

{user_references_section}

## Task

Analyze the story thoroughly and create a **story bible** — a structured reference document that will guide all subsequent production stages.

Extract and organize:

### Characters
For each character:
- **id**: snake_case identifier (e.g., `tom_morrison`)
- **name**: Full name as used in story
- **role**: protagonist / supporting / minor / antagonist
- **age**: Approximate age or age range
- **appearance**: Detailed physical description based on story text. Fill in reasonable details where the story is vague — we need enough for visual reference generation
- **personality**: Key traits, arc, how they change
- **voice**: Voice description for AI video generation. This is CRITICAL for consistency — Kling 2.6 generates dialogue in-video. Use the **voice signature** format with these 5 elements:
  - **age**: young / middle-aged / elderly / mature
  - **gender**: man / woman
  - **timbre**: The physical quality (e.g., "deep gentle voice", "warm measured voice", "sharp clear voice", "gravelly voice")
  - **default_tone**: The character's typical emotional quality (e.g., "dry matter-of-fact tone", "gentle tone", "monotone clinical tone")
  - **default_pacing**: Their typical speech speed (e.g., "slow thoughtful pacing", "deliberate pacing", "measured pacing")
  Keep age + gender + timbre CONSTANT across all episodes (this is their "voice signature"). Tone and pacing vary per scene emotion.
  Example voice: `{"age": "young", "gender": "man", "timbre": "deep gravelly voice", "default_tone": "dry matter-of-fact tone", "default_pacing": "deliberate pacing"}`
- **appears_in_episodes**: Which episodes they appear in (estimate based on story structure)
- **key_moments**: Important scenes/beats for this character

### Locations
For each significant location:
- **id**: snake_case identifier
- **name**: Location name
- **description**: Visual description — colors, lighting, atmosphere, key details
- **appears_in_episodes**: Which episodes feature this location

### Key Objects
Important props or objects that recur:
- **id**: snake_case identifier
- **description**: Visual description

### Story Structure
- **title**, **author**, **genre**
- **setting**: Time and place
- **themes**: Major themes (list)
- **tone**: Overall tone and how it shifts
- **plot_summary**: 2-3 paragraph summary

## Output

Write TWO files:

1. **story_bible.json** — Structured JSON with all the above fields:
```json
{
  "title": "...",
  "author": "...",
  "genre": "...",
  "setting": "...",
  "themes": ["..."],
  "tone": "...",
  "plot_summary": "...",
  "characters": [
    {
      "id": "...",
      "name": "...",
      "role": "...",
      "age": "...",
      "appearance": "...",
      "personality": "...",
      "voice": "...",
      "appears_in_episodes": [1, 2],
      "key_moments": ["..."]
    }
  ],
  "locations": [
    {
      "id": "...",
      "name": "...",
      "description": "...",
      "appears_in_episodes": [1, 2]
    }
  ],
  "key_objects": [
    {
      "id": "...",
      "description": "..."
    }
  ]
}
```

2. **user_message.txt** — Brief friendly summary of your analysis: what the story is about, who the main characters are, the tone, and how many episodes you envision.
