## ADDED Requirements

### Requirement: Centralized TypeScript interfaces
The project SHALL define shared TypeScript interfaces in `src/types/` with the following files:
- `candles.ts`: `Candle` interface with `time`, `open`, `high`, `low`, `close`, optional `volume`
- `annotations.ts`: `Annotation`, `AnnotationType` interfaces
- `charts.ts`: `Chart` interface
- `predictions.ts`: `PredictionSpan`, `PredictionState`, `ModelInfo` interfaces
- `span-annotations.ts`: `SpanAnnotation`, `SpanLabelType`, `SubSpan` interfaces
- `index.ts`: barrel file re-exporting all types

#### Scenario: Import shared Candle type
- **WHEN** a component needs the `Candle` interface
- **THEN** it imports from `@/types` instead of defining its own

#### Scenario: No duplicate interface definitions
- **WHEN** the codebase is searched for `interface Candle` or `interface SpanAnnotation`
- **THEN** each interface is defined exactly once in `src/types/` (not in component files)

#### Scenario: Type consistency across components
- **WHEN** `page.tsx`, `CandleChart.tsx`, `SpanAnnotationManager.tsx`, `Toolbox.tsx`, `SpanAnnotationList.tsx`, and `SpanPopover.tsx` reference shared types
- **THEN** they all import from `@/types` and use the same interface definitions

### Requirement: Replace pervasive any types
All `any` type annotations in component files SHALL be replaced with proper typed interfaces from `src/types/`. Specifically: `geometry` fields SHALL use a defined `Geometry` interface, `sub_spans` SHALL use `SubSpan[]`, candle arrays SHALL use `Candle[]`, and prediction cache values SHALL use `PredictionSpan[]`.

#### Scenario: Geometry field typed
- **WHEN** a component accesses `annotation.geometry`
- **THEN** the type is `Geometry | null` (not `any`)

#### Scenario: Prediction cache typed
- **WHEN** `predictionCacheRef` is accessed
- **THEN** its type is `Map<string, PredictionSpan[]>` (not `Map<string, any>`)
