/ ROADMAP.md
ROADMAP.md
  1  # Roadmap
  2  
  3  ## Milestone 0 — Repository baseline
  4  
  5  - Phoenix/LiveView project structure.
  6  - PostgreSQL/pgvector Docker Compose.
  7  - Oban configured.
  8  - Domain contexts created.
  9  - Docs/specs/tests included.
 10  
 11  Exit criteria:
 12  
 13  - `mix deps.get` succeeds.
 14  - `mix test` succeeds.
 15  - LiveView routes render.
 16  
 17  ## Milestone 1 — Document ingestion MVP
 18  
 19  - Manual text document ingestion.
 20  - Chunking.
 21  - Keyword fallback retrieval.
 22  - Document list UI.
 23  
 24  Exit criteria:
 25  
 26  - User can paste a policy document.
 27  - User can ask a question and retrieve relevant chunks.
 28  
 29  ## Milestone 2 — Embeddings + pgvector
 30  
 31  - Generate embeddings in Oban worker.
 32  - Store vectors in `document_chunks.embedding`.
 33  - Use cosine search.
 34  - Add source snippets to answers.
 35  
 36  Exit criteria:
 37  
 38  - RAG answers use vector search.
 39  - Retrieved chunks show source document title.
 40  
 41  ## Milestone 3 — Support workflow
 42  
 43  - Support ticket intake webhook.
 44  - Ticket classification.
 45  - Draft reply generation.
 46  - Human approval queue.
 47  
 48  Exit criteria:
 49  
 50  - Ticket can be classified.
 51  - Draft reply creates approval item.
 52  - Reviewer can approve/reject.
 53  
 54  ## Milestone 4 — Sales/CRM workflow
 55  
 56  - Sales-call transcript summarization.
 57  - CRM task suggestion.
 58  - Local CRM task list.
 59  - Approval before external CRM writes.
 60  
 61  Exit criteria:
 62  
 63  - Transcript produces structured summary.
 64  - Task suggestions can be reviewed.
 65  
 66  ## Milestone 5 — Evals
 67  
 68  - Implement workflow dispatch in eval runner.
 69  - Add schema assertions.
 70  - Add safety assertions.
 71  - Add regression command to Makefile.
 72  
 73  Exit criteria:
 74  
 75  - `make eval` runs enabled eval cases.
 76  - Failed evals block deployment.
 77  
 78  ## Milestone 6 — Auth/RBAC/security
 79  
 80  - Add authentication.
 81  - Add roles: admin/operator/support/sales/reviewer.
 82  - Add document permissions.
 83  - Add audit dashboard.
 84  
 85  Exit criteria:
 86  
 87  - Users see only permitted documents and workflows.
 88  
 89  ## Milestone 7 — Production hardening
 90  
 91  - Rate limits.
 92  - Retry/backoff.
 93  - Cost budgets.
 94  - Prompt/model versioning.
 95  - Deployment pipeline.
 96  - Observability dashboard.
 97  
 98  Exit criteria:
 99  
100  - System can run in production with predictable costs and auditability.
101  
102  ## Milestone 8 — Agent orchestration
103  
104  - Implement instruction manifest.
105  - Typestate workflow structs.
106  - Capability tokens for external writes.
107  - Tool/function calling adapter.
108  
109  Exit criteria:
110  
111  - Agent plans over explicit instructions.
112  - External actions require approved capability token.