Why:
- Need implementation plan and task tracking documentation
- Need strategy explanations for reference
Changes:
- phases.md: 5-phase implementation plan with status tracking
- tasks.md: 25 tasks mapped to phases and steps
- chunking_strategies.md: detailed explanations of all 5 strategies
Why:
- App factory needs to mount document routes and initialize SQLite at startup
Changes:
- Import and mount documents_router
- Call init_db() on app creation
Why:
- Need abstract base class for all chunking strategies
- Need OpenAI embedding service (text-embedding-3-small)
- Need orchestration to run chunk → embed → store pipeline
Changes:
- Base: ChunkingStrategy ABC, token counting, chunk ID generation, sentence splitting
- Embedding: batch embedding with 2048 text limit per call
- Service: strategy registry, single/multi-strategy runners with per-strategy failure isolation
Why:
- Need to parse .docx/.doc files into DocumentTree + markdown
- Need API endpoints for document upload, processing, and deletion
Changes:
- Parser: .doc→.docx conversion via LibreOffice, XML-level extraction for table-heavy docs, heuristic heading detection
- Service: upload, process (delegates to chunking), delete orchestration
- Routes: POST /documents, POST /documents/{id}/process, DELETE /documents/{id}, GET /strategies