# Roadmap

High-level view of what's been shipped, what's in progress, and what's next.

For granular bug/task tracking see [todos.md](todos.md).

---

## Shipped

### Infrastructure & DevOps

| Feature                    | Date       | Docs                                                | Description                                                                                                                               |
| -------------------------- | ---------- | --------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| **DB package extraction**  | 2026-03-16 | [TRD](decisions/trds/db-package-extraction.md)      | Extracted `@coda/db` — Prisma schema, migrations, client, crypto — into a shared workspace package.                                       |
| **Docker Compose**         | 2026-03-17 | [TRD](decisions/trds/docker-compose-environment.md) | Full local dev environment: MySQL, Redis, S3, migrations, server (HMR), client (Vite HMR). Profiles for dev, preview, and all test tiers. |
| **Ephemeral environments** | 2026-03-22 | [TRD](decisions/trds/ephemeral-environments.md)     | PR-comment-triggered ephemeral environments via Jenkins. Create/destroy/list commands, TTL tagging, capacity checks, nightly cleanup.     |
| **Logging improvements**   | 2026-03-22 | [TRD](decisions/trds/logging-improvements.md)       | Request-scoped traceability via AsyncLocalStorage + pino mixin. Structured fields for Datadog faceting. Operational blind spots filled.   |

### AI & Search

| Feature                       | Date       | Docs                                                                            | Description                                                                                                                                |
| ----------------------------- | ---------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| **Semantic schema search**    | 2026-03-21 | [TRD](decisions/trds/semantic-schema-search.md)                                 | Hybrid search (vector + keyword + glossary) with auto-derived schema graph for GraphQL. Replaces pure keyword tokenization.                |
| **Snowflake schema index**    | 2026-03-22 | [TRD](decisions/trds/snowflake-schema-index.md)                                 | Two-phase index for Snowflake: table catalog at startup, FK graph inference, polling for changes. Mirrors GraphQL schema index pattern.    |
| **Incremental schema index**  | 2026-03-24 | [Spec](superpowers/specs/2026-03-24-incremental-snowflake-index-design.md)      | Incremental polling for Snowflake schema index — `LAST_ALTERED` filtering, `HybridSearch` add/update/remove API, `fetchCatalogDiff()`.     |
| **Sandbox engine**            | 2026-03-18 | [PRD](decisions/prds/sandbox-engine.md)                                         | `@coda/sandbox` — V8 isolate execution engine for LLM-generated JavaScript. Message-passing API, memory-gapped sandbox, bridge protocol.   |
| **Standalone search service** | 2026-03-25 | [TRD](decisions/trds/search-service.md), [Architecture](architecture/search.md) | `@coda/search` — ConnectRPC microservice with hybrid BM25+HNSW+glossary search, S3 snapshot persistence, circuit breaker, polling.         |
| **Workspace restructure**     | 2026-03-25 | —                                                                               | Migrated from flat layout to `apps/` (deployable) + `packages/` (shared libraries). Added `common`, `extensions`, `search-api` packages.   |
| **`@coda/common`**            | 2026-03-25 | —                                                                               | Shared algorithms and data structures: collections, graph, search (BM25, HNSW, RRF, stemmer, tokenizer, glossary), circuit breaker, retry. |
| **Domain glossary expansion** | 2026-03-29 | —                                                                               | Cross-domain GraphQL + Snowflake glossary files with fuzzy matching, query expansion, and Snowflake DB/schema resolution.                  |

### Server & API

| Feature                               | Date       | Docs                                                     | Description                                                                                                                                                                       |
| ------------------------------------- | ---------- | -------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Stream module**                     | 2026-03-20 | [TRD](decisions/trds/stream-module.md)                   | Typed SSE reader/writer pair in `@coda/core-api`. Centralizes streaming protocol with compile-time safety.                                                                        |
| **Message status & stream persister** | 2026-03-18 | [TRD](decisions/trds/message-status-stream-persister.md) | Incremental `StreamPersister` class — creates both messages at stream start, persists satellite records as they arrive. `MessageStatus` enum on messages table.                   |
| **Get single chat endpoint**          | 2026-03-18 | [TRD](decisions/trds/get-single-chat-endpoint.md)        | `GET /api/v1/chats/:id` — eliminates pagination workaround in `MutationQueue.refreshFromServer()`.                                                                                |
| **Functional tests**                  | 2026-03-18 | [TRD](decisions/trds/functional-tests.md)                | Full-stack functional tests with real MySQL + Redis, `FakeProvider` for deterministic LLM responses. Covers conversation lifecycle, tool execution, edge cases, streaming events. |
| **Collections consistency**           | 2026-03-21 | [TRD](decisions/trds/collections-consistency.md)         | Normalized `has()`/`delete()` methods across List/Heap collection interfaces in `@coda/common`.                                                                                   |

### Client

| Feature              | Date       | Docs                                      | Description                                                                                                 |
| -------------------- | ---------- | ----------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| **Message feedback** | 2026-03-18 | [PRD](decisions/prds/message-feedback.md) | Thumbs up/down on assistant messages with optional comment. Persisted via `message_feedback` table.         |
| **Auth error page**  | 2026-03-19 | [PRD](decisions/prds/auth-error-page.md)  | Dedicated error page for Auth0 callback and SDK initialization failures. Breaks the infinite redirect loop. |

---

## In Progress

| Feature                                | Docs                                                      | Status                                      | Description                                                                                                                                      |
| -------------------------------------- | --------------------------------------------------------- | ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Dashboards**                         | [PRD](decisions/prds/dashboards.md)                       | DB + client + API scaffolding complete      | Dashboard builder with grid layout, chart/table/markdown cards, data sources, sharing, AI prompt bar. Grid engine and resize working.            |
| **Search quality & evals**             | —                                                         | Active                                      | Reranker tuning, glossary enrichment, eval harness, agent behavior tests.                                                                        |
| **Offline client + cursor pagination** | [PRD](decisions/prds/offline-client-cursor-pagination.md) | Client layers complete, server-side pending | IndexedDB local store, cross-tab BroadcastChannel sync, leader election, mutation queue. Server cursor pagination endpoints not yet implemented. |
| **File splits & dedup**                | [TRD](decisions/trds/file-splits-dedup.md)                | Partially done                              | Remaining: `core-api/src/client.ts`, `offline/coda-store.ts` splits.                                                                             |
| **Codebase review fixes**              | [TRD](decisions/trds/codebase-review-remediation.md)      | 2 P0, 1 P1, 1 P2 open                       | Server-side abort, chat ownership check, auto-naming budget. See [todos.md](todos.md).                                                           |

---

## Up Next

Prioritized items not yet specced or planned.

### Reliability

- **Server-side abort on client disconnect** (P0) — wire `AbortSignal` through orchestrator to stop Bedrock calls when client navigates away
- **Model capabilities to DB** — move `ALLOWED_MODELS` + `supportsThinking` from constants to the `models` table
- **Search auth** (COD-82) — bearer token auth for the search service

### Search Quality

- **Automated search ranking regression tests** — eval harness against live QA service with MRR assertions
- **Agent behavior evals via Langfuse** — (question, expected behavior) pairs for tool-call chain verification

### Infrastructure

- **Blue-green deployments (CodeDeploy)** — start with search service, gate behind feature flag
- **Shared rate limiting in `common/`** — extract rate limiting with sliding window + token bucket strategies
- **Search hardening** — IP rate limiting, Redis-backed query_id validation, audit logging

### Operations

- **Docker smoke tests** — automated smoke tests for the Docker Compose environment
- **Archive Notion pages** — add "moved to repo" banners to legacy Notion docs

---

_Last updated: 2026-05-15_
