# Live document MVP TODO Updated 2026-10-07 against the revision 1.3 specifications. This checklist tracks implementation; it does not replace the governing [delivery plan](../specifications/RAG-AI-Phase1-Delivery-Plan.md), [implementation guide](../specifications/RAG-Phase1-Implementation-Guide.md), [API catalog](../specifications/RAG-Phase1-API-Catalog.md) or [database design](../specifications/RAG-Phase1-Database-Design.md). Checked baseline items mean existing component implementation, not end-to-end MVP acceptance. See the reference map for executed component checks; these do not certify the full MVP. ## Existing baseline to reuse - [x] Phase 1: PostgreSQL/pgvector foundation, frozen processing/embedding profiles and trusted bootstrap. - [x] Phase 2: bounded CLI intake, immutable originals, independent document/job IDs and request replay. - [x] Phase 3: extraction, normalization, semantic chunk drafts, QC and immutable artifact candidates. - [x] Phase 4: hosted embedding adapter, vector validation and bounded in-memory staging. - [x] English revision 1.3 scope, workflow, API/database proposals and acceptance scenarios documented. - [x] Phase 5 backend: worker, durable fenced artifact attachment, review/resume and atomic publication. Authenticated D06/D07 transport remains pending. - [x] Phase 6: ingestion end-to-end acceptance and operational handoff; real-provider/Persian quality remains separate. Do not rebuild Phases 1-4 for LangChain. A custom retriever/tool can call the existing application services; a thin Embeddings wrapper is optional. The prototype Chroma/Markdown chat does not search this upload pipeline. ## WP1 - Early real-provider proof - [ ] Configure funded fixed embedding, extraction and Live profiles; verify compatible embedding identity/dimension. - [ ] Prove Persian microphone input, spoken output and available transcripts on the target network. - [ ] Prove a Live tool call executes on the backend and returns evidence. - [ ] Verify provider audio formats, turn completion, interruption and error behavior. - [ ] Record measured latency, provider cost and the delivery gate result. Run this gate early while independent worker/API work continues. Four days is conditional; three days is optimistic. A failed provider/network proof must be reported before promising a live demo. ## WP2 - Identity and general browser upload - [ ] Add forward auth/session schema and pre-created admin/user accounts; preserve the applied initial migration. - [ ] Implement login, logout and current-user endpoints with trusted cookie identity, expiry, Origin and CSRF checks. - [ ] Implement bounded authenticated multipart upload using the existing intake service. - [ ] Preserve byte/title deduplication, immutable originals and independent documents for new upload keys. - [ ] Expose document/job status and failure details according to the API catalog. - [ ] Enforce declared format/structure/resource limits for future uploads of unknown total count. The four supplied examples are acceptance fixtures, not a filename allowlist or a four-document capacity limit. ## WP3 - Worker, review and publication (backend implemented; transport/selection pending) - [x] Add reviewed forward extraction-state/audit changes without editing applied revisions. - [x] Implement separate worker claim tokens, leases, heartbeats, bounded attempts and recovery. - [x] Run existing extraction/chunking/embedding under the frozen processing profile. - [x] Attach retained candidates/artifacts only under the current fenced claim. - [x] Implement trusted D06/D07 backend services for exact-output review and evidence/digest-bound approval or rejection. - [ ] Integrate authenticated D06/D07 transport with identity/organization/Origin/CSRF. - [x] Release review-required work as failed with EXTRACTION_REVIEW_REQUIRED; avoid automatic repeated provider calls. - [x] Resume the same eligible failed document/job through the trusted retry backend/CLI after approval; fresh output requires fresh review. Authenticated D04 transport remains pending. - [x] Retain faithful complete FAQ extraction and explicitly approve included factual Q&A groups. - [x] Publish all validated chunks plus ready state in one transaction; keep new ready documents inactive. - [ ] Implement activation/selection revisions, access epochs and invalidation with the documented lock order. - [x] Verify duplicate workers, expired leases, stale approvals, retries and partial failures against isolated PostgreSQL. ## WP4 - Shared scoped search - [ ] Implement one backend pgvector search service using compatible bounded query embeddings. - [ ] Derive organization/user/conversation scope from backend identity. - [ ] Filter to authorized, ready, active and undeleted documents. - [ ] Combine semantic evidence with exact normalized identifiers and bounded context. - [ ] Return faithful text and document_id/chunk_id/location sources. - [ ] Evaluate real Persian questions, numbers, conditions, exceptions and insufficient-evidence behavior. - [ ] Record the measured decision on reranking/ANN; implement only if evaluation demonstrates a need. ## WP5 - LangChain and native Live - [ ] Expose the shared search through a small LangChain retriever/tool boundary. - [ ] Keep persistent secrets and provider-specific objects behind server adapters. - [ ] Add minimal owned voice conversations, Live sessions and voice tool-call persistence through forward migrations. - [ ] Implement session reservation and authenticated backend WSS audio relay to Gemini Live. - [ ] Dispatch tools with trusted backend context; model arguments cannot override identity or knowledge scope. - [ ] Correlate current-session transcripts, tool results and displayed sources. - [ ] Handle follow-up context, interruption/cancellation, provider failure and session termination. - [ ] Suppress stale evidence/audio after knowledge changes, access revocation or cancellation. - [ ] Keep blocking embedding/provider calls off the audio event loop with bounded concurrency/deadlines. ## WP6 - UI, deployment and acceptance - [ ] Build same-origin login and a minimal voice workspace with connection/microphone states. - [ ] Add an admin Documents area for upload, status, retained review, retry and activation. - [ ] Show available current-session transcripts/sources and actionable failures. - [ ] Deploy one API and one separate worker with PostgreSQL/pgvector, persistent files and HTTPS/WSS. - [ ] Validate both sample PDFs: reading order, dates, percentages, conditions and exceptions. - [ ] Validate the sample infographic: headings and group relationships. - [ ] Validate the sample DOCX: all 100 Q&A pairs and explicit factual inclusion. - [ ] Validate unseen in-scope documents uploaded through the UI without code changes. - [ ] Run provider-free regressions and isolated PostgreSQL acceptance with required database configuration. - [ ] Run separately configured real-provider quality/voice checks; ordinary test skips are not acceptance. - [ ] Rehearse upload-to-reviewed-ready-to-active-to-live-answer, follow-ups and interruption on the deployed target. - [ ] Verify restart recovery, revocation, failure reporting and all MVP-01 through MVP-14 criteria. - [ ] Record actual results, remaining limits and demo run instructions. ## Conditional delivery checkpoints | Checkpoint | Required progress | | --- | --- | | Day 1 | WP1 proof started/completed; WP3 worker foundation and WP2 identity/upload underway | | Day 2 | Reviewed complete ingestion/publication and activation; WP4 scoped evidence search | | Day 3 | WP5 LangChain/Live connected; minimal WP6 browser flows | | Day 4 | Example/unseen-file acceptance, failures/revocation/restart and HTTPS rehearsal | Dependencies govern order; this table does not assume parallel staffing or guarantee completion. Use delivery-plan Section 8 for the governing schedule. ## Deferred beyond this MVP Full text chat and durable message/history UI, settings editing, rich management/ delete UI, recording, seamless reconnect, CTI and reranker/ANN without evidence. Preserve their documented future contracts without making them Live prerequisites. When an item is completed, attach the relevant implementation and actual verification evidence. Do not check it solely because its design is documented.