# Phase 2: Gemini-Integration + Asset-Pipeline - Discussion Log (Assumptions Mode)

> **Audit trail only.** Do not use as input to planning, research, or execution agents.
> Decisions captured in CONTEXT.md — this log preserves the analysis.

**Date:** 2026-03-29
**Phase:** 02-Gemini-Integration + Asset-Pipeline
**Mode:** assumptions
**Areas analyzed:** Build Script Runtime, IndexedDB Schema Extension, Welcome Screen Avatar Replacement, Gemini API Client Architecture, Fallback System, Companion Text Integration

## Assumptions Presented

### Build Script Runtime
| Assumption | Confidence | Evidence |
|------------|-----------|----------|
| Node.js via npx tsx, isomorphic API module | Confident | SPEC.md line 392, package.json has no tsx yet |

### IndexedDB Schema Extension
| Assumption | Confidence | Evidence |
|------------|-----------|----------|
| Keep DB version 1, API counts in settings store | Likely | db.ts version 1 with 5 stores, simple counting suffices |

### Welcome Screen Avatar Replacement
| Assumption | Confidence | Evidence |
|------------|-----------|----------|
| Static imports in characters.ts, avatarUrl field | Likely | src/assets/companions/ dirs exist, CompanionDefinition has emoji |

### Gemini Image API Format
| Assumption | Confidence | Evidence |
|------------|-----------|----------|
| Base64 inlineData, response_modalities: IMAGE | Likely | SPEC.md lines 636-646, types.ts Blob storage |

## Corrections Made

No corrections — all assumptions confirmed.

## External Research Flagged

- Gemini 3.1 Flash Image Preview API exact format with character consistency
- tsx devDependency version for build script
