# Breakdown page

> The script marked up the way an AD does it with coloured pencils: select words, say what they are, and they go on the sheet too.

Source: https://kwark.space/designSystem/components/breakdown-page

## Usage

### When to use
In Breakdown, scene by scene. An AD breaks a script down with coloured pencils: every prop, vehicle and effect underlined in its department's colour, then copied onto a sheet. In Kwark both are one act (Decision 0005): marking the page writes the sheet.

### When not to
- To edit the script. The page is never edited: marking a prop cannot change a word of the screenplay.
- For the writer's editor. Writers never see breakdown pencils unless they open Breakdown.

### How marking works
1. Select the words. A small panel asks *“grease pencil” is a…* with the project's categories.
2. Choose one. The words are underlined in that colour and appear on the scene's sheet.
3. If the words appear in other scenes, offer *Mark it in all 4 scenes that mention it*. The gun is a gun on every page.
4. Select a mark to take it off.

Marks are found by looking for each element's own words, longest first, so "police car" is one vehicle, and a rewritten line simply stops being marked.

### Categories
Standard: Cast, Background, Prop, Wardrobe, Hair & makeup, Vehicle, Set dressing, Effect, VFX, Sound, Music, Stunt, Animal, Special equipment, plus Mechanical effect, Greenery, Livestock, Animal handler, Security, Additional labour and Miscellaneous. Projects add their own. Use the [Element tag](https://kwark.space/designSystem/components/element-tag.md) for each.

### Writing
The question is plain: *is a…*. Never jargon like "Assign tag".

**Do:** Select *Reel 3*, choose **Prop**, and it is underlined in lavender and listed on the sheet.

**Don't:** A separate breakdown form where the AD retypes what the page already says.

## Style

### Anatomy

Page: Courier 13.5px/1.6, 64ch measure, 26px × 16–48px padding, character at 22ch, dialogue at 10ch. Mark: 20% wash and a 2px underline in the pencil. Ask panel 300px, floating. Sheet row: tone bar, scene number 18px mono, heading, counts.

### Tokens

| Token | Light | Dark |
|---|---|---|
| `--k-bk-cast` | #e0685c |  |
| `--k-bk-prop` | #a98bd6 |  |
| `--k-bk-set-dressing` | #b39a78 |  |
| `--k-bk-sfx` | #6fa3d8 |  |
| `--k-bk-wardrobe` | #72b07e |  |
| `--k-bk-vfx` | #7fc2bd |  |
| `--k-font-screenplay` | 'Courier Prime', 'Courier New', monospace |  |
| `--k-surface` | #ffffff | #1a1a1a |

## Code

### React

In the Kwark app: `import { MarkedPage } from '@/pages/PreProduction/BreakdownModule/components/MarkedPage'`.

```tsx
<MarkedPage lines={scene.lines} items={sheet.items} canEdit={canEdit}
  categories={categoriesWith(project.breakdownCategories)}
  mentionCount={text => scenesMentioning(text).length}
  onTag={(category, text, everywhere) => tag(category, text, everywhere)}
  onUntag={untag} />
```

| Prop | Type | Notes |
|---|---|---|
| `lines` | `ScriptLine[]` | the scene, read-only |
| `items` | `{ category, text }[]` | marks are found by each element's own words |
| `onTag` | `(category, text, everywhere?) => void` | marks on the page and writes the sheet in one act |
| `mentionCount` | `(text) => number` | offers "Mark it in all N scenes" |

### HTML and CSS

Works anywhere with `kwark.css`.

```html
<div class="kw-marked-page">
  <p data-kind="scene">12. INT. EDIT SUITE – NIGHT</p>
  <p><mark data-category="cast" tabindex="0" title="Cast, select to take it off">MIRA</mark> (30s) threads <mark data-category="prop" tabindex="0" title="Prop, select to take it off">Reel 3</mark> onto the <mark data-category="setDressing" tabindex="0" title="Set dressing, select to take it off">Steenbeck</mark>. <mark data-category="sfx" tabindex="0" title="Effect, select to take it off">Rain</mark> streaks the window.</p>
  <p data-kind="character">MIRA</p>
  <p data-kind="dialogue">I didn’t shoot this.</p>
  <div class="kw-mark-ask" role="dialog" aria-label="What is “grease pencil”?" style="position:relative;margin-top:8px">
    <div class="kw-mark-ask__head"><span>“grease pencil” is a…</span><button class="kw-icon-button" type="button" aria-label="Never mind"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M18 6 6 18M6 6l12 12"/></svg></button></div>
    <div class="kw-mark-ask__cats"><button class="kw-element-tag" type="button" data-category="prop">Prop</button><button class="kw-element-tag" type="button" data-category="setDressing">Set dressing</button><button class="kw-element-tag" type="button" data-category="wardrobe">Wardrobe</button><button class="kw-element-tag" type="button" data-category="vfx">VFX</button></div>
    <label class="kw-check" style="margin-top:8px"><input type="checkbox"><span class="kw-box"></span>Mark it in all 4 scenes that mention it</label>
  </div>
</div>
<div class="kw-sheet-row"><span class="kw-tone" data-tone="int-night"></span><span class="kw-sheet-row__number">12</span><span class="kw-sheet-row__heading"><strong>INT. EDIT SUITE – NIGHT</strong><small>1 3/8 pages · Mira</small></span><span class="kw-sheet-row__counts"><span class="kw-element-tag" data-category="cast">Cast 1</span><span class="kw-element-tag" data-category="prop">Props 2</span><span class="kw-element-tag" data-category="sfx">Effects 1</span></span></div>
```

## Accessibility

- Marks are focusable; their title and accessible name say the category ("Prop: Reel 3").
- Marking works without a mouse: select text with Shift and arrows, then the panel opens on Enter.
- Category is always a word; colour repeats it.

## For agents

### Rules

- **Never** edit the screenplay from Breakdown.
- **Must** mark the page and write the sheet in one act.
- **Always** offer marking every scene that mentions the same words.
- **Must** name the category in words wherever its colour appears.

### AI readiness test

**Task:** Let the AD tag a vehicle across the whole script at once.

**Give the agent:** Breakdown page, Element tag, Decision 0005.

**Constraint:** Some mentions are inside dialogue.

**A reliable answer:**
- Select once, choose Vehicle
- Offer "Mark it in all N scenes"
- Sheet rows updated
- Script text unchanged
- Mentions in dialogue marked too
