feat(kb): add knowledge base generation from existing documents#5
Open
bkuberek wants to merge 1 commit into
Open
feat(kb): add knowledge base generation from existing documents#5bkuberek wants to merge 1 commit into
bkuberek wants to merge 1 commit into
Conversation
Add `mkcv kb generate` and `mkcv kb update` CLI commands that use an LLM to synthesize a structured, lossless knowledge base from career documents (PDF, Markdown, DOCX, HTML, TXT). Supports single files, multiple files, and recursive directory scanning with glob filtering. Follows hexagonal architecture with new DocumentReaderPort, MultiFormatDocumentReader adapter, KBGenerationService, and Jinja2 prompt templates. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
mkcv kb generateandmkcv kb updateCLI commands that synthesize structured, lossless knowledge bases from existing career documents using an LLMDocumentReaderPort,MultiFormatDocumentReaderadapter,KBGenerationService, and Jinja2 prompt templatesNew Commands
Architecture
core/ports/document_reader.pyDocumentReaderPortprotocolcore/models/document_content.py,kb_generation_result.pycore/exceptions/kb_generation.pyDocumentReadError,KBGenerationErroradapters/filesystem/document_reader.pyMultiFormatDocumentReader(5 formats)core/services/kb_generation_service.pyKBGenerationServicewith generate/updateprompts/kb_generate.j2,kb_update.j2cli/commands/kb.pyconfig/settings.toml[default.kb]sectionTest plan
DocumentContentandKBGenerationResultmodelsDocumentReadErrorandKBGenerationErrorexceptionsMultiFormatDocumentReader(all 5 formats, directory scanning, glob filtering)KBGenerationService(generate, update, chunked processing, error handling)create_kb_generation_service)mkcv kb generateandmkcv kb update(help, args, mock service)🤖 Generated with Claude Code