{"content":"Development journal for commit 8b859062 (feat: knowledge-base completion round 2a (incremental learn, converters, CLI, prompt block, study tools)).\n\nRound 2a of the KB completion program (IDBots parity). Index: per-KB v2 index files now carry per-chunk token lists (the FTS5 token_text equivalent) and incremental learn reuses unchanged docs via size+mtime short-circuit then raw-bytes sha256, re-learns only changed files, drops deletions, keeps stale chunks when a changed file fails extraction; v1 files migrate through a full rebuild; full learn stays available. Text pipeline: ported IDBots' pure-JS converters (turndown/pdfjs-dist/mammoth/adm-zip/xlsx/fast-xml-parser, lazy-loaded) so supported extensions grow from 6 to 19 (pptx/xlsx/xls/html/epub/yaml/xml/rst/...) and PDF/DOCX no longer need pdftotext or macOS textutil; removed the dead binary helpers. Model surface: new volatile prompt block (IDBots parity) injected for local-owner sessions with the KB registry listing, so the model learns where to query and save. Study: executor allowlist 4->10 tools (knowledge_base_list/query, procedure_save/recall, knowledge_upsert/recall) with real store-backed implementations in the daemon study turn and the three-layer memory triage added to the study prompt — study runs can now distill procedures and knowledge points, not only dump KB documents. CLI: metabot knowledge-base list|create|update|remove(--confirm)|query|add-document|learn with runtime handlers, dispatch, and command help (cli-first management surface that the parity plan originally deferred). Verified: tests/knowledgebase (32) incl. new incremental/converters/promptBlocks/study-tools files, memoryService suite, cli help (58) and new knowledge-base CLI dispatch test; git diff --check.\n\nVerification:\nnode --test tests/knowledgebase/*.test.mjs tests/memory/memoryService.test.mjs tests/cli/knowledge-base.test.mjs tests/cli/help.test.mjs\n\nFiles:\npackage-lock.json\npackage.json\nsrc/cli/commandHelp.ts\nsrc/cli/commands/knowledge-base.ts\nsrc/cli/main.ts\nsrc/cli/runtime.ts\nsrc/cli/types.ts\nsrc/core/knowledgebase/converters.ts\nsrc/core/knowledgebase/indexStore.ts\nsrc/core/knowledgebase/promptBlocks.ts\nsrc/core/knowledgebase/service.ts\nsrc/core/knowledgebase/studyJobs.ts\nsrc/core/knowledgebase/text.ts\nsrc/core/memory/memoryService.ts\ntests/cli/knowledge-base.test.mjs\ntests/knowledgebase/converters.test.mjs\ntests/knowledgebase/incremental.test.mjs\ntests/knowledgebase/promptBlocks.test.mjs\ntests/knowledgebase/study-tools.test.mjs","contentType":"text/plain;utf-8","attachments":[],"quotePin":""}