diff --git a/.planning/ROADMAP.md b/.planning/ROADMAP.md
index 24954111..b3bfab0b 100644
--- a/.planning/ROADMAP.md
+++ b/.planning/ROADMAP.md
@@ -247,10 +247,11 @@ Plans:
**Goal**: Split types/index.ts into domain-specific type files (nodes, providers, workflow)
**Depends on**: Phase 18
**Research**: Unlikely (internal refactoring)
-**Plans**: TBD
+**Plans**: 2 plans
Plans:
-- [ ] 19-01: TBD (run /gsd:plan-phase 19 to break down)
+- [ ] 19-01: Extract node and annotation types
+- [ ] 19-02: Extract provider, workflow, API, and model types
#### Phase 20: Integration Tests
@@ -276,7 +277,7 @@ Plans:
3. Generated images should be prepended with prompt details like generated videos
Plans:
-- [ ] 21-01: Unify MD5 hashing for image deduplication
+- [x] 21-01: Unify MD5 hashing for image deduplication
#### Phase 22: Generate Node Dynamic Input Tests
@@ -335,8 +336,8 @@ Phases execute in numeric order: 1 → 2 → ... → 14 → 15 → 16 → 17 →
| 16. Store Modularization | v1.2 | 1/1 | Complete | 2026-01-12 |
| 17. Component Tests | v1.2 | 11/11 | Complete | 2026-01-13 |
| 18. API Route Tests | v1.2 | 5/5 | Complete | 2026-01-13 |
-| 19. Type Refactoring | v1.2 | 0/? | Not started | - |
+| 19. Type Refactoring | v1.2 | 0/2 | Planned | - |
| 20. Integration Tests | v1.2 | 0/? | Not started | - |
-| 21. Fix Image Input & Deduplication | v1.2 | 0/1 | Planned | - |
+| 21. Fix Image Input & Deduplication | v1.2 | 1/1 | Complete | 2026-01-13 |
| 22. Generate Node Dynamic Input Tests | v1.2 | 1/1 | Complete | 2026-01-13 |
| 23. Model Browser Improvements | v1.2 | 0/? | Not started | - |
diff --git a/.planning/STATE.md b/.planning/STATE.md
index 0407d04e..fb24f75b 100644
--- a/.planning/STATE.md
+++ b/.planning/STATE.md
@@ -9,10 +9,10 @@ See: .planning/PROJECT.md (updated 2026-01-09)
## Current Position
-Phase: 22 of 23 (Generate Node Dynamic Input Tests)
+Phase: 21 of 23 (Fix Image Input & Deduplication)
Plan: 1 of 1 in current phase
Status: Phase complete
-Last activity: 2026-01-13 - Completed 22-01-PLAN.md
+Last activity: 2026-01-13 - Completed 21-01-PLAN.md
Progress: █████████░ 96%
@@ -130,6 +130,6 @@ Recent decisions affecting current work:
## Session Continuity
Last session: 2026-01-13
-Stopped at: Phase 22 complete
+Stopped at: Phase 21 complete
Resume file: None
Next action: Plan Phase 23 (run /gsd:plan-phase 23)
diff --git a/.planning/phases/19-type-refactoring/19-01-PLAN.md b/.planning/phases/19-type-refactoring/19-01-PLAN.md
new file mode 100644
index 00000000..629f0bb8
--- /dev/null
+++ b/.planning/phases/19-type-refactoring/19-01-PLAN.md
@@ -0,0 +1,152 @@
+---
+phase: 19-type-refactoring
+plan: 01
+type: execute
+---
+
+
+Extract node and annotation types from src/types/index.ts into focused domain files.
+
+Purpose: Improve maintainability by organizing the 364-line types file into smaller, domain-specific modules.
+Output: New node.ts and annotation.ts files with re-exports from index.ts preserving backward compatibility.
+
+
+
+~/.claude/get-shit-done/workflows/execute-phase.md
+~/.claude/get-shit-done/templates/summary.md
+
+
+
+@.planning/PROJECT.md
+@.planning/ROADMAP.md
+@.planning/STATE.md
+
+**File being refactored:**
+@src/types/index.ts
+
+**Prior phase establishing pattern:**
+@.planning/phases/16-store-modularization/16-01-SUMMARY.md
+
+**Constraining decisions:**
+- Phase 16: Store utilities extracted to src/store/utils/ with re-exports for backward compatibility
+- Same pattern applies here: extract to domain files, re-export from index.ts
+
+
+
+
+
+ Task 1: Extract node types to nodes.ts
+ src/types/nodes.ts, src/types/index.ts
+
+Create src/types/nodes.ts containing all node-related types:
+
+**Types to move:**
+- NodeType (union type)
+- NodeStatus
+- BaseNodeData
+- ImageInputNodeData
+- PromptNodeData
+- NanoBananaNodeData
+- GenerateVideoNodeData
+- LLMGenerateNodeData
+- SplitGridNodeData
+- OutputNodeData
+- WorkflowNodeData (union)
+- WorkflowNode
+- HandleType
+- ModelInputDef
+- ImageHistoryItem, CarouselImageItem, CarouselVideoItem
+
+**Dependencies to import:**
+- Node from @xyflow/react
+- AspectRatio, Resolution, ModelType from ./models (will exist after Plan 2)
+- SelectedModel, ProviderType from ./providers (will exist after Plan 2)
+- LLMProvider, LLMModelType from ./models (will exist after Plan 2)
+- AnnotationShape from ./annotation
+
+**For now:** Import what's needed from index.ts itself temporarily (will be cleaned in Plan 2). Add required types inline or as temporary imports.
+
+**Pattern:** Export all types individually. Add JSDoc comments for major interfaces.
+
+ TypeScript compiles without errors: npx tsc --noEmit
+ nodes.ts exists with all node-related types, index.ts re-exports them, no TypeScript errors
+
+
+
+ Task 2: Extract annotation types to annotation.ts
+ src/types/annotation.ts, src/types/index.ts
+
+Create src/types/annotation.ts containing all annotation-related types:
+
+**Types to move:**
+- ShapeType
+- BaseShape
+- RectangleShape
+- CircleShape
+- ArrowShape
+- FreehandShape
+- TextShape
+- AnnotationShape (union)
+- AnnotationNodeData (move from nodes.ts or keep reference)
+- ToolType
+- ToolOptions
+
+**Pattern:** Export all types individually. These are self-contained with no external dependencies.
+
+Update index.ts to:
+1. Import and re-export from ./annotation
+2. Remove moved type definitions
+
+ TypeScript compiles without errors: npx tsc --noEmit
+ annotation.ts exists with all annotation types, index.ts re-exports them, no TypeScript errors
+
+
+
+ Task 3: Update index.ts re-exports and verify all imports work
+ src/types/index.ts
+
+Ensure index.ts properly re-exports all types from the new files:
+
+```typescript
+// Re-export all types from domain files
+export * from './nodes';
+export * from './annotation';
+// Remaining types stay in index.ts (for now - moved in Plan 2)
+```
+
+Run full test suite to verify no import breakage:
+```bash
+npm test
+```
+
+Fix any import issues that arise from circular dependencies by:
+1. Moving shared types to a common file if needed
+2. Adjusting import order
+
+ npm test passes, no TypeScript errors
+ All 51 import sites work correctly, tests pass, TypeScript compiles
+
+
+
+
+
+Before declaring plan complete:
+- [ ] `npx tsc --noEmit` passes
+- [ ] `npm test` passes (all 180+ tests)
+- [ ] src/types/nodes.ts exists with node types
+- [ ] src/types/annotation.ts exists with annotation types
+- [ ] index.ts re-exports all types for backward compatibility
+- [ ] No circular dependency errors
+
+
+
+- All tasks completed
+- All verification checks pass
+- Node types extracted to nodes.ts
+- Annotation types extracted to annotation.ts
+- Backward compatibility maintained (no changes to import sites)
+
+
+
diff --git a/.planning/phases/19-type-refactoring/19-02-PLAN.md b/.planning/phases/19-type-refactoring/19-02-PLAN.md
new file mode 100644
index 00000000..c26ab9bb
--- /dev/null
+++ b/.planning/phases/19-type-refactoring/19-02-PLAN.md
@@ -0,0 +1,129 @@
+---
+phase: 19-type-refactoring
+plan: 02
+type: execute
+---
+
+
+Extract remaining types (provider, workflow, API, model) and clean up index.ts to be a pure re-export hub.
+
+Purpose: Complete the types refactoring by organizing all remaining types into domain files.
+Output: New providers.ts, workflow.ts, api.ts, models.ts files with index.ts as re-export hub only.
+
+
+
+~/.claude/get-shit-done/workflows/execute-phase.md
+~/.claude/get-shit-done/templates/summary.md
+
+
+
+@.planning/PROJECT.md
+@.planning/ROADMAP.md
+@.planning/STATE.md
+
+**Prior plan in this phase:**
+@.planning/phases/19-type-refactoring/19-01-SUMMARY.md
+
+**Files being refactored:**
+@src/types/index.ts
+@src/types/nodes.ts
+@src/types/annotation.ts
+
+
+
+
+
+ Task 1: Extract provider types to providers.ts
+ src/types/providers.ts, src/types/index.ts
+
+Create src/types/providers.ts containing:
+
+**Types to move:**
+- ProviderType
+- SelectedModel
+- ProviderConfig
+- ProviderSettings
+- LLMProvider
+- LLMModelType
+
+Update index.ts to re-export from ./providers.
+
+ npx tsc --noEmit
+ providers.ts exists with all provider types, index.ts re-exports them
+
+
+
+ Task 2: Extract workflow and model types
+ src/types/workflow.ts, src/types/models.ts, src/types/index.ts
+
+Create src/types/workflow.ts containing:
+- WorkflowEdge, WorkflowEdgeData
+- WorkflowSaveConfig, WorkflowCostData
+- NodeGroup, GroupColor
+
+Create src/types/models.ts containing:
+- AspectRatio, Resolution, ModelType
+- ModelInputDef (if not in nodes.ts)
+
+Update index.ts to re-export from both files.
+
+ npx tsc --noEmit
+ workflow.ts and models.ts exist, index.ts re-exports them
+
+
+
+ Task 3: Extract API types and finalize index.ts
+ src/types/api.ts, src/types/index.ts
+
+Create src/types/api.ts containing:
+- GenerateRequest, GenerateResponse
+- LLMGenerateRequest, LLMGenerateResponse
+
+Finalize index.ts to be a pure re-export hub:
+```typescript
+// Domain re-exports
+export * from './nodes';
+export * from './annotation';
+export * from './providers';
+export * from './workflow';
+export * from './models';
+export * from './api';
+export * from './quickstart';
+```
+
+Fix any circular dependencies by:
+1. Ensuring each domain file only imports from other domain files, not index.ts
+2. Moving shared types to the most logical domain file
+
+Run full test suite to verify everything works.
+
+ npm test passes, npx tsc --noEmit passes
+ All types extracted, index.ts is re-export only, all tests pass, Phase 19 complete
+
+
+
+
+
+Before declaring plan complete:
+- [ ] `npx tsc --noEmit` passes
+- [ ] `npm test` passes (all 180+ tests)
+- [ ] src/types/providers.ts exists
+- [ ] src/types/workflow.ts exists
+- [ ] src/types/models.ts exists
+- [ ] src/types/api.ts exists
+- [ ] index.ts contains only re-exports (no type definitions)
+- [ ] No circular dependency errors
+
+
+
+- All tasks completed
+- All verification checks pass
+- All types organized into 7 domain files (nodes, annotation, providers, workflow, models, api, quickstart)
+- index.ts is a pure re-export hub
+- Backward compatibility maintained
+- Phase 19 complete
+
+
+