diff --git a/docs/AGENTIC_AI_ROADMAP.md b/docs/AGENTIC_AI_ROADMAP.md index 80b3ee2..f88a10c 100644 --- a/docs/AGENTIC_AI_ROADMAP.md +++ b/docs/AGENTIC_AI_ROADMAP.md @@ -194,47 +194,46 @@ Add 4 new endpoint groups to the product backend. These are plain REST routes Extend `learning_ai_common_plat/services/mcp-server/src/modules/chronomind/`: -- [ ] `chronomind-client.ts` — add client functions for new endpoints (commit: ) - - `chronomindTimerReschedule(timerId, { delta?, targetTime? }, opts)` - - `chronomindTimerAvailability({ start, end, minSlotMinutes }, opts)` - - `chronomindRoutineStart(routineId, opts)` - - `chronomindAgentActionsList(filters, opts)` - - `chronomindAgentActionApprove(actionId, opts)` -- [ ] `chronomind-tools.ts` — register 5 new MCP tools (commit: ) +- [x] `chronomind-client.ts` — add 6 client functions for new endpoints (commit: efde14ba in common-plat) + - `chronomindTimerReschedule`, `chronomindTimerAvailability`, `chronomindRoutineStart` + - `chronomindAgentActionCreate`, `chronomindAgentActionsList`, `chronomindAgentActionApprove` +- [x] `chronomind-tools.ts` — register 5 new MCP tools (commit: efde14ba in common-plat) - `chronomind.timers.reschedule` — shift timer by delta or to new time - `chronomind.timers.availability` — find free time slots - `chronomind.routines.start` — start a routine template - `chronomind.agentActions.list` — list pending agent actions - `chronomind.agentActions.approve` — approve a proposed action - - All write tools record agent action via A.2 endpoints, passing `actorId`, `actorType: 'mcp'`, `reason` + - Write tools (reschedule, routines.start) record agent action for audit trail (fail-open) - [ ] MCP tool tests (commit: ) + - TODO(AGENTIC-8): Add integration tests for the 5 new MCP tools ### A.4 — Context-Aware AI Messages (LLM upgrade) Upgrade `web/src/lib/context-messages.ts` with optional LLM enrichment: -- [ ] `backend/src/lib/ai-context.ts` — LLM-powered context message generator (commit: ) +- [x] `backend/src/lib/ai-context.ts` — LLM-powered context message generator (commit: c80c1e4) - Accepts: timer label, category, urgency, user's recent timers, time of day - - Returns: enriched prep message (e.g., "Your standup is in 30m — you had 3 unresolved items from yesterday") - - Falls back to existing keyword rules if LLM unavailable - - Uses `@bytelyst/extraction` client to call extraction-service `timer-context` task, or direct `@bytelyst/ollama-client` + - Returns: enriched prep message with source indicator (llm/keyword/generic) + - Falls back to keyword rules if LLM unavailable or flag off + - Calls extraction-service `timer-context` task when EXTRACTION_SERVICE_URL is set - Gate behind `isFeatureEnabled('ai_context_messages.enabled')` flag -- [ ] Backend route: `POST /api/context-message` (commit: ) -- [ ] `web/src/lib/context-messages.ts` — add `fetchEnrichedMessage()` that calls backend endpoint (commit: ) +- [x] Backend route: `POST /api/context-message` (commit: c80c1e4) +- [x] `web/src/lib/context-messages.ts` — add `fetchEnrichedMessage()` (commit: c80c1e4) - Graceful degradation: keyword rules remain primary, LLM messages shown as "AI suggestion" - - Track `ai_context.enriched` or `ai_context.fallback_used` telemetry events + - TODO(AGENTIC-9): Add trackEvent() calls for ai_context.enriched / ai_context.fallback_used - [ ] Tests for AI context generation (commit: ) + - TODO(AGENTIC-10): Add unit tests for generateContextMessage() and fetchEnrichedMessage() ### Phase A Exit Criteria -- [ ] 3 new REST endpoints in chronomind-backend (reschedule, availability, routine start) -- [ ] Agent action module with full CRUD + batch approve -- [ ] 5 new MCP tools registered in centralized mcp-server -- [ ] Context messages enriched by LLM with keyword fallback -- [ ] All gated behind feature flags (default off) -- [ ] Telemetry events tracked for all new operations -- [ ] All existing tests still pass (`pnpm test` in backend + web + mcp-server) -- [ ] No breaking changes to existing timer/routine APIs +- [x] 3 new REST endpoints in chronomind-backend (reschedule, availability, routine start) (686f5fb) +- [x] Agent action module with full CRUD + batch approve (29a4802) +- [x] 5 new MCP tools registered in centralized mcp-server (efde14ba in common-plat) +- [x] Context messages enriched by LLM with keyword fallback (c80c1e4) +- [x] All gated behind feature flags (default off) (f3e14e2) +- [ ] Telemetry events defined but trackEvent() calls needed in routes (ongoing) +- [x] All existing tests still pass (219 backend + 394 web) +- [x] No breaking changes to existing timer/routine APIs ---