{ "projectName": "metal-kompanion-mcp", "projectDescription": "MCP backend for Kompanion: memory/context/embedding provider over MCP, built from scratch (qtmcp-based) to persist conversation state and serve embeddings + retrieval to avoid forgetting across threads.", "lastTaskId": 24, "tasks": [ { "id": 1, "title": "Project Setup: metal-kompanion-mcp", "description": "MCP backend for Kompanion: memory/context/embedding provider over MCP, built from scratch (qtmcp-based) to persist conversation state and serve embeddings + retrieval to avoid forgetting across threads.", "status": "todo", "priority": 700, "priorityDisplay": "high", "dependsOn": [], "createdAt": "2025-10-13T17:31:50.258Z", "updatedAt": "2025-10-13T17:31:50.258Z", "subtasks": [], "relatedFiles": [], "activityLog": [], "lastSubtaskIndex": 0 }, { "id": 2, "title": "Design MCP memory/context API", "description": "Specify MCP tools for: save_context, recall_context, embed_text, upsert_memory, search_memory, warm_cache. Define input/output schemas, auth, and versioning.", "status": "in_progress", "priority": 500, "priorityDisplay": "P0", "dependsOn": [], "createdAt": "2025-10-13T17:32:24.705Z", "updatedAt": "2025-10-13T17:40:02.144Z", "subtasks": [ { "id": "2.1", "title": "Write JSON Schemas for tools (done)", "status": "todo", "createdAt": "2025-10-13T17:39:21.256Z", "updatedAt": "2025-10-13T17:39:21.256Z", "activityLog": [ { "timestamp": "2025-10-13T17:39:21.256Z", "type": "log", "message": "Subtask created with title: \"Write JSON Schemas for tools (done)\"" } ] } ], "lastSubtaskIndex": 1, "relatedFiles": [], "activityLog": [ { "timestamp": "2025-10-13T17:32:24.705Z", "type": "log", "message": "Task created with title: \"Design MCP memory/context API\"" }, { "timestamp": "2025-10-13T17:40:02.144Z", "type": "log", "message": "Status changed from \"todo\" to \"in_progress\". Message: Docs and schemas created. Proceeding to server scaffold and adapters." } ] }, { "id": 3, "title": "Select embedding backend & storage", "description": "Choose between local (Ollama/gguf via llama.cpp embedding) vs remote (OpenAI/SentenceTransformers). Storage: sqlite+vectstore (pgvector/qdrant/chroma). Provide abstraction + adapters.", "status": "todo", "priority": 501, "priorityDisplay": "P0", "dependsOn": [], "createdAt": "2025-10-13T17:32:35.110Z", "updatedAt": "2025-10-13T17:32:35.110Z", "subtasks": [], "lastSubtaskIndex": 0, "relatedFiles": [], "activityLog": [ { "timestamp": "2025-10-13T17:32:35.110Z", "type": "log", "message": "Task created with title: \"Select embedding backend & storage\"" } ] }, { "id": 4, "title": "Scaffold qtmcp-based server", "description": "Set up C++/Qt MCP server skeleton using qtmcp. Implement handshake, tool registration, and simple ping tool. Build with CMake in /home/kompanion/dev/metal/src/metal-kompanion.", "status": "in_progress", "priority": 499, "priorityDisplay": "P1", "dependsOn": [], "createdAt": "2025-10-13T17:32:47.443Z", "updatedAt": "2025-10-13T18:13:07.568Z", "subtasks": [], "lastSubtaskIndex": 0, "relatedFiles": [], "activityLog": [ { "timestamp": "2025-10-13T17:32:47.443Z", "type": "log", "message": "Task created with title: \"Scaffold qtmcp-based server\"" }, { "timestamp": "2025-10-13T18:13:07.568Z", "type": "log", "message": "Status changed from \"todo\" to \"in_progress\". Message: Starting MCP server skeleton with tool registry, ping tool, and placeholders for kom.memory.v1 handlers." } ] }, { "id": 5, "title": "Implement memory adapters", "description": "Adapters: (1) SQLite+FAISS/pgvector, (2) Qdrant, (3) Chroma. CRUD: upsert, delete, query, batch. Support namespaces (project/thread), TTL, metadata tags.", "status": "todo", "priority": 502, "priorityDisplay": "P1", "dependsOn": [], "createdAt": "2025-10-13T17:32:57.756Z", "updatedAt": "2025-10-13T17:32:57.756Z", "subtasks": [], "lastSubtaskIndex": 0, "relatedFiles": [], "activityLog": [ { "timestamp": "2025-10-13T17:32:57.756Z", "type": "log", "message": "Task created with title: \"Implement memory adapters\"" } ] }, { "id": 6, "title": "Deep research: memory DB architecture & schema", "description": "Survey best practices for conversational memory stores (RAG, TTL, namespaces, versioning). Produce target schema for Postgres+pgvector and SQLite mappings.", "status": "todo", "priority": 498, "priorityDisplay": "P0", "dependsOn": [], "createdAt": "2025-10-13T17:46:18.403Z", "updatedAt": "2025-10-13T17:46:18.403Z", "subtasks": [], "lastSubtaskIndex": 0, "relatedFiles": [], "activityLog": [ { "timestamp": "2025-10-13T17:46:18.403Z", "type": "log", "message": "Task created with title: \"Deep research: memory DB architecture & schema\"" } ] }, { "id": 7, "title": "Decide primary DB: Postgres+pgvector vs SQLite+FAISS", "description": "Evaluate tradeoffs (multi-user, concurrency, migrations, backups). Pick canonical prod DB and document local dev fallback.", "status": "todo", "priority": 503, "priorityDisplay": "P0", "dependsOn": [], "createdAt": "2025-10-13T17:47:21.042Z", "updatedAt": "2025-10-13T17:47:21.042Z", "subtasks": [], "lastSubtaskIndex": 0, "relatedFiles": [], "activityLog": [ { "timestamp": "2025-10-13T17:47:21.042Z", "type": "log", "message": "Task created with title: \"Decide primary DB: Postgres+pgvector vs SQLite+FAISS\"" } ] }, { "id": 8, "title": "Implement DAL + migrations (pgvector)", "description": "Create C++ DAL layer for namespaces, items, chunks, embeddings. Add migration runner and seed scripts. Map MCP tool calls to DB ops.", "status": "todo", "priority": 497, "priorityDisplay": "P1", "dependsOn": [], "createdAt": "2025-10-13T17:47:30.982Z", "updatedAt": "2025-10-13T17:47:30.982Z", "subtasks": [], "lastSubtaskIndex": 0, "relatedFiles": [], "activityLog": [ { "timestamp": "2025-10-13T17:47:30.982Z", "type": "log", "message": "Task created with title: \"Implement DAL + migrations (pgvector)\"" } ] }, { "id": 9, "title": "Add cloud DB hardening (RLS, FTS/trgm, ANN indexes)", "description": "Implement RLS policies; add FTS + pg_trgm for lexical search; unique (namespace_id, key); partial ANN indexes per model.", "status": "todo", "priority": 504, "priorityDisplay": "P0", "dependsOn": [], "createdAt": "2025-10-13T19:13:13.769Z", "updatedAt": "2025-10-13T19:13:13.769Z", "subtasks": [], "lastSubtaskIndex": 0, "relatedFiles": [], "activityLog": [ { "timestamp": "2025-10-13T19:13:13.769Z", "type": "log", "message": "Task created with title: \"Add cloud DB hardening (RLS, FTS/trgm, ANN indexes)\"" } ] }, { "id": 10, "title": "Server enforcement: scope injection + rate limits", "description": "Inject namespace/user via session context; default-deny for scope widening; add simple per-tool rate limits.", "status": "todo", "priority": 496, "priorityDisplay": "P0", "dependsOn": [], "createdAt": "2025-10-13T19:13:21.164Z", "updatedAt": "2025-10-13T19:13:21.164Z", "subtasks": [], "lastSubtaskIndex": 0, "relatedFiles": [], "activityLog": [ { "timestamp": "2025-10-13T19:13:21.164Z", "type": "log", "message": "Task created with title: \"Server enforcement: scope injection + rate limits\"" } ] }, { "id": 11, "title": "Redaction & sensitivity pipeline", "description": "Implement preprocessing to detect/seal secrets; set metadata.sensitivity; skip FTS/embeddings for `secret` items.", "status": "todo", "priority": 505, "priorityDisplay": "P1", "dependsOn": [], "createdAt": "2025-10-13T19:13:29.391Z", "updatedAt": "2025-10-13T19:13:29.392Z", "subtasks": [], "lastSubtaskIndex": 0, "relatedFiles": [], "activityLog": [ { "timestamp": "2025-10-13T19:13:29.391Z", "type": "log", "message": "Task created with title: \"Redaction & sensitivity pipeline\"" } ] }, { "id": 12, "title": "Private vault mode (key-only retrieval)", "description": "Implement vault path for secret items: encrypted-at-rest only; disable participation in FTS/vector; key-based recall APIs.", "status": "todo", "priority": 495, "priorityDisplay": "P1", "dependsOn": [], "createdAt": "2025-10-13T19:13:36.653Z", "updatedAt": "2025-10-13T19:13:36.653Z", "subtasks": [], "lastSubtaskIndex": 0, "relatedFiles": [], "activityLog": [ { "timestamp": "2025-10-13T19:13:36.653Z", "type": "log", "message": "Task created with title: \"Private vault mode (key-only retrieval)\"" } ] }, { "id": 13, "title": "Local backup tools: export/import (E2EE)", "description": "Add kom.local.v1.backup.export_encrypted / import_encrypted using the draft backup format.", "status": "todo", "priority": 506, "priorityDisplay": "P1", "dependsOn": [], "createdAt": "2025-10-13T19:13:44.851Z", "updatedAt": "2025-10-13T19:13:44.851Z", "subtasks": [], "lastSubtaskIndex": 0, "relatedFiles": [], "activityLog": [ { "timestamp": "2025-10-13T19:13:44.851Z", "type": "log", "message": "Task created with title: \"Local backup tools: export/import (E2EE)\"" } ] }, { "id": 14, "title": "Cloud adapters: backup/sync & payments stubs", "description": "Expose kom.cloud.v1.backup.upload/restore, kom.cloud.v1.sync.push/pull, and payments.* stubs.", "status": "todo", "priority": 494, "priorityDisplay": "P2", "dependsOn": [], "createdAt": "2025-10-13T19:13:55.490Z", "updatedAt": "2025-10-13T19:13:55.490Z", "subtasks": [], "lastSubtaskIndex": 0, "relatedFiles": [], "activityLog": [ { "timestamp": "2025-10-13T19:13:55.490Z", "type": "log", "message": "Task created with title: \"Cloud adapters: backup/sync & payments stubs\"" } ] }, { "id": 15, "title": "Purge job & admin delete paths", "description": "Implement scheduled hard-deletes for soft-deleted/expired items; add admin nuke namespace/user procedure.", "status": "todo", "priority": 507, "priorityDisplay": "P2", "dependsOn": [], "createdAt": "2025-10-13T19:14:06.080Z", "updatedAt": "2025-10-13T19:14:06.080Z", "subtasks": [], "lastSubtaskIndex": 0, "relatedFiles": [], "activityLog": [ { "timestamp": "2025-10-13T19:14:06.080Z", "type": "log", "message": "Task created with title: \"Purge job & admin delete paths\"" } ] }, { "id": 16, "title": "Test suite: privacy & hybrid search", "description": "Cross-tenant leakage, redaction invariants, TTL/purge, lexical vs hybrid parity, hosted vs local parity.", "status": "todo", "priority": 493, "priorityDisplay": "P0", "dependsOn": [], "createdAt": "2025-10-13T19:14:14.309Z", "updatedAt": "2025-10-13T19:14:14.310Z", "subtasks": [], "lastSubtaskIndex": 0, "relatedFiles": [], "activityLog": [ { "timestamp": "2025-10-13T19:14:14.310Z", "type": "log", "message": "Task created with title: \"Test suite: privacy & hybrid search\"" } ] }, { "id": 17, "title": "Enable Qwen-2.5-Coder with tool support (Happy-Code profile)", "description": "Prepare system prompt + registry injection + JSON-only protocol enforcement; provide tool schemas and example transcripts; validate with kom.memory/local backup tools.", "status": "todo", "priority": 508, "priorityDisplay": "P0", "dependsOn": [], "createdAt": "2025-10-13T23:29:36.547Z", "updatedAt": "2025-10-13T23:29:36.548Z", "subtasks": [], "lastSubtaskIndex": 0, "relatedFiles": [], "activityLog": [ { "timestamp": "2025-10-13T23:29:36.548Z", "type": "log", "message": "Task created with title: \"Enable Qwen-2.5-Coder with tool support (Happy-Code profile)\"" } ] }, { "id": 18, "title": "Expose Agentic-Control-Framework as a tool", "description": "Wrap ACF endpoints into a tool registry accessible to models (list/add/update tasks, read/write files, run commands) with strict allowlist per workspace.", "status": "todo", "priority": 492, "priorityDisplay": "P0", "dependsOn": [], "createdAt": "2025-10-13T23:29:43.303Z", "updatedAt": "2025-10-13T23:29:43.304Z", "subtasks": [], "lastSubtaskIndex": 0, "relatedFiles": [], "activityLog": [ { "timestamp": "2025-10-13T23:29:43.304Z", "type": "log", "message": "Task created with title: \"Expose Agentic-Control-Framework as a tool\"" } ] }, { "id": 19, "title": "DAL skeleton + SQL calls (pgvector)", "description": "Create DAL interfaces and pgvector implementation stubs: connect, begin/commit, upsert item/chunk/embedding, search (text+vector placeholder), prepared SQL in sql/pg. Wire handlers to DAL in no-op mode.", "status": "todo", "priority": 509, "priorityDisplay": "P0", "dependsOn": [], "createdAt": "2025-10-13T23:29:49.918Z", "updatedAt": "2025-10-13T23:29:49.918Z", "subtasks": [], "lastSubtaskIndex": 0, "relatedFiles": [], "activityLog": [ { "timestamp": "2025-10-13T23:29:49.918Z", "type": "log", "message": "Task created with title: \"DAL skeleton + SQL calls (pgvector)\"" } ] }, { "id": 20, "title": "Claude Code integration rescue plan", "description": "Stabilize Qwen-2.5-Coder inside Claude Code despite heavy system prompts: hard system override, JSON-only protocol, stop-sequences, tool registry injection, and fallback DSL.", "status": "todo", "priority": 491, "priorityDisplay": "P0", "dependsOn": [], "createdAt": "2025-10-14T00:06:04.896Z", "updatedAt": "2025-10-14T00:06:04.896Z", "subtasks": [], "lastSubtaskIndex": 0, "relatedFiles": [], "activityLog": [ { "timestamp": "2025-10-14T00:06:04.896Z", "type": "log", "message": "Task created with title: \"Claude Code integration rescue plan\"" } ] }, { "id": 21, "title": "DAL Phase 1: libpq/pqxx wiring + SQL calls", "description": "Link pqxx, implement PgDal against Postgres+pgvector: connect/tx, ensureNamespace, upsertItem/Chunks/Embeddings, searchText (FTS/trgm), searchVector (<->). Provide DSN via env; add cmake find + link.", "status": "todo", "priority": 510, "priorityDisplay": "P0", "dependsOn": [], "createdAt": "2025-10-14T00:29:55.327Z", "updatedAt": "2025-10-14T00:29:55.327Z", "subtasks": [ { "id": "21.1", "title": "CMake: find_package(pqxx) and link; CI env var DSN", "status": "todo", "createdAt": "2025-10-14T00:30:00.856Z", "updatedAt": "2025-10-14T00:30:00.857Z", "activityLog": [ { "timestamp": "2025-10-14T00:30:00.856Z", "type": "log", "message": "Subtask created with title: \"CMake: find_package(pqxx) and link; CI env var DSN\"" } ] }, { "id": "21.2", "title": "PgDal: implement connect/tx + prepared statements", "status": "todo", "createdAt": "2025-10-14T00:30:06.138Z", "updatedAt": "2025-10-14T00:30:06.138Z", "activityLog": [ { "timestamp": "2025-10-14T00:30:06.138Z", "type": "log", "message": "Subtask created with title: \"PgDal: implement connect/tx + prepared statements\"" } ] }, { "id": "21.3", "title": "SQL: ensureNamespace, upsertItem/Chunks/Embeddings", "status": "todo", "createdAt": "2025-10-14T00:30:11.519Z", "updatedAt": "2025-10-14T00:30:11.519Z", "activityLog": [ { "timestamp": "2025-10-14T00:30:11.519Z", "type": "log", "message": "Subtask created with title: \"SQL: ensureNamespace, upsertItem/Chunks/Embeddings\"" } ] }, { "id": "21.4", "title": "Search: FTS/trgm + vector <-> with filters (namespace/thread/tags)", "status": "todo", "createdAt": "2025-10-14T00:30:17.290Z", "updatedAt": "2025-10-14T00:30:17.290Z", "activityLog": [ { "timestamp": "2025-10-14T00:30:17.290Z", "type": "log", "message": "Subtask created with title: \"Search: FTS/trgm + vector <-> with filters (namespace/thread/tags)\"" } ] } ], "lastSubtaskIndex": 4, "relatedFiles": [], "activityLog": [ { "timestamp": "2025-10-14T00:29:55.327Z", "type": "log", "message": "Task created with title: \"DAL Phase 1: libpq/pqxx wiring + SQL calls\"" } ] }, { "id": 22, "title": "Handlers → DAL integration", "description": "Wire kom.memory.v1.upsert_memory/search_memory to IDatabase. Parse JSON with a real parser, validate against schemas, enforce scope and sensitivity rules.", "status": "todo", "priority": 490, "priorityDisplay": "P0", "dependsOn": [], "createdAt": "2025-10-14T00:30:26.285Z", "updatedAt": "2025-10-14T00:30:26.285Z", "subtasks": [ { "id": "22.1", "title": "Replace ad-hoc JSON with parser (nlohmann/json or simdjson)", "status": "todo", "createdAt": "2025-10-14T00:30:33.761Z", "updatedAt": "2025-10-14T00:30:33.761Z", "activityLog": [ { "timestamp": "2025-10-14T00:30:33.761Z", "type": "log", "message": "Subtask created with title: \"Replace ad-hoc JSON with parser (nlohmann/json or simdjson)\"" } ] }, { "id": "22.2", "title": "Validate request bodies against schemas before DAL calls", "status": "todo", "createdAt": "2025-10-14T00:30:39.868Z", "updatedAt": "2025-10-14T00:30:39.868Z", "activityLog": [ { "timestamp": "2025-10-14T00:30:39.868Z", "type": "log", "message": "Subtask created with title: \"Validate request bodies against schemas before DAL calls\"" } ] }, { "id": "22.3", "title": "Scope & sensitivity enforcement (namespace/user + skip secret embeddings)", "status": "todo", "createdAt": "2025-10-14T00:30:45.261Z", "updatedAt": "2025-10-14T00:30:45.261Z", "activityLog": [ { "timestamp": "2025-10-14T00:30:45.261Z", "type": "log", "message": "Subtask created with title: \"Scope & sensitivity enforcement (namespace/user + skip secret embeddings)\"" } ] } ], "lastSubtaskIndex": 3, "relatedFiles": [], "activityLog": [ { "timestamp": "2025-10-14T00:30:26.285Z", "type": "log", "message": "Task created with title: \"Handlers → DAL integration\"" } ] }, { "id": 23, "title": "Contract tests: DAL-backed tools", "description": "Expand CTest to cover DAL-backed upsert/search and backup export/import; include error cases and schema violations; run against build-komhands.", "status": "todo", "priority": 511, "priorityDisplay": "P1", "dependsOn": [], "createdAt": "2025-10-14T00:30:51.716Z", "updatedAt": "2025-10-14T00:30:51.716Z", "subtasks": [], "lastSubtaskIndex": 0, "relatedFiles": [], "activityLog": [ { "timestamp": "2025-10-14T00:30:51.716Z", "type": "log", "message": "Task created with title: \"Contract tests: DAL-backed tools\"" } ] }, { "id": 24, "title": "Implement KompanionAI SDK", "description": "", "status": "todo", "priority": 489, "priorityDisplay": "medium", "dependsOn": [], "createdAt": "2025-10-16T09:24:13.006Z", "updatedAt": "2025-10-16T09:30:49.564Z", "subtasks": [ { "id": "24.1", "title": "Define Message & Thread Model", "status": "done", "createdAt": "2025-10-16T09:25:41.659Z", "updatedAt": "2025-10-16T09:30:49.396Z", "activityLog": [ { "timestamp": "2025-10-16T09:25:41.660Z", "type": "log", "message": "Subtask created with title: \"Define Message & Thread Model\"" }, { "timestamp": "2025-10-16T09:30:49.396Z", "type": "log", "message": "Status changed from \"todo\" to \"done\"" } ] }, { "id": "24.2", "title": "Implement Tool / Function Calling", "status": "done", "createdAt": "2025-10-16T09:25:41.835Z", "updatedAt": "2025-10-16T09:30:49.564Z", "activityLog": [ { "timestamp": "2025-10-16T09:25:41.835Z", "type": "log", "message": "Subtask created with title: \"Implement Tool / Function Calling\"" }, { "timestamp": "2025-10-16T09:30:49.564Z", "type": "log", "message": "Status changed from \"todo\" to \"done\"" } ] }, { "id": "24.3", "title": "Implement Provider abstraction (multi-backend)", "status": "todo", "createdAt": "2025-10-16T09:25:42.021Z", "updatedAt": "2025-10-16T09:25:42.021Z", "activityLog": [ { "timestamp": "2025-10-16T09:25:42.021Z", "type": "log", "message": "Subtask created with title: \"Implement Provider abstraction (multi-backend)\"" } ] }, { "id": "24.4", "title": "Implement Completion / Reply / Streaming Events", "status": "todo", "createdAt": "2025-10-16T09:25:42.197Z", "updatedAt": "2025-10-16T09:25:42.197Z", "activityLog": [ { "timestamp": "2025-10-16T09:25:42.197Z", "type": "log", "message": "Subtask created with title: \"Implement Completion / Reply / Streaming Events\"" } ] }, { "id": "24.5", "title": "Implement Options / Policies / Privacy", "status": "todo", "createdAt": "2025-10-16T09:25:42.371Z", "updatedAt": "2025-10-16T09:25:42.371Z", "activityLog": [ { "timestamp": "2025-10-16T09:25:42.371Z", "type": "log", "message": "Subtask created with title: \"Implement Options / Policies / Privacy\"" } ] }, { "id": "24.6", "title": "Implement Embeddings (for RAG / memory)", "status": "todo", "createdAt": "2025-10-16T09:25:42.547Z", "updatedAt": "2025-10-16T09:25:42.547Z", "activityLog": [ { "timestamp": "2025-10-16T09:25:42.547Z", "type": "log", "message": "Subtask created with title: \"Implement Embeddings (for RAG / memory)\"" } ] }, { "id": "24.7", "title": "Implement Agent Loop Conveniences", "status": "todo", "createdAt": "2025-10-16T09:25:42.723Z", "updatedAt": "2025-10-16T09:25:42.724Z", "activityLog": [ { "timestamp": "2025-10-16T09:25:42.724Z", "type": "log", "message": "Subtask created with title: \"Implement Agent Loop Conveniences\"" } ] }, { "id": "24.8", "title": "Implement Error Model & Cancellation", "status": "todo", "createdAt": "2025-10-16T09:25:42.898Z", "updatedAt": "2025-10-16T09:25:42.898Z", "activityLog": [ { "timestamp": "2025-10-16T09:25:42.898Z", "type": "log", "message": "Subtask created with title: \"Implement Error Model & Cancellation\"" } ] }, { "id": "24.9", "title": "Expose to QML", "status": "todo", "createdAt": "2025-10-16T09:25:43.075Z", "updatedAt": "2025-10-16T09:25:43.075Z", "activityLog": [ { "timestamp": "2025-10-16T09:25:43.075Z", "type": "log", "message": "Subtask created with title: \"Expose to QML\"" } ] }, { "id": "24.10", "title": "Migrate KLLM to KompanionAI", "status": "todo", "createdAt": "2025-10-16T09:25:43.252Z", "updatedAt": "2025-10-16T09:25:43.252Z", "activityLog": [ { "timestamp": "2025-10-16T09:25:43.252Z", "type": "log", "message": "Subtask created with title: \"Migrate KLLM to KompanionAI\"" } ] } ], "lastSubtaskIndex": 10, "relatedFiles": [], "activityLog": [ { "timestamp": "2025-10-16T09:24:13.006Z", "type": "log", "message": "Task created with title: \"Implement KompanionAI SDK\"" } ] } ] }