Skip to content

feat: Phase 4 KB Integration - pdf_kb_ingest tool#11

Merged
krisoye13 merged 1 commit intomainfrom
feature/phase4-kb-integration
Feb 2, 2026
Merged

feat: Phase 4 KB Integration - pdf_kb_ingest tool#11
krisoye13 merged 1 commit intomainfrom
feature/phase4-kb-integration

Conversation

@krisoye
Copy link
Copy Markdown
Owner

@krisoye krisoye commented Feb 2, 2026

Summary

Implements Phase 4 of Epic #21 - KB Integration for the Document Analysis MCP Server.

Features

  • pdf_kb_ingest tool - One-shot PDF ingestion for knowledge bank integration
  • Smart text chunking respecting paragraph/sentence boundaries
  • Page number tracking for source references
  • Document classification (LLM with heuristic fallback)
  • Caching support with parameter-specific keys
  • Comprehensive input validation and error handling

Changes

  • New src/document_analysis_mcp/tools/kb_ingest.py (1,200+ lines)
  • Updated server.py with pdf_kb_ingest tool registration
  • Updated tools/init.py exports
  • 43 new tests in tests/test_kb_ingest.py

Test Results

  • 266 tests passing (43 new)
  • All linting checks pass
  • Code review approved with zero P0/P1 issues

Test plan

  • Unit tests for chunking logic
  • Unit tests for classification (LLM and heuristic)
  • Integration tests for end-to-end flows
  • Edge case tests (empty PDFs, large docs, invalid input)
  • CI pipeline validation

Resolves Epic #21 Phase 4
Refs: krisoye/project-tracker#96

🤖 Generated with Claude Code

Implements one-shot PDF ingestion for knowledge bank integration:

- Smart text chunking respecting paragraph/sentence boundaries
- Page number tracking for source references
- Document classification (LLM with heuristic fallback)
- Caching support with parameter-specific keys
- Comprehensive input validation and error handling

Adds 43 new tests for kb_ingest functionality (266 total tests passing).

Resolves Epic #21 Phase 4: KB Integration
Refs: krisoye/project-tracker#96

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@krisoye13 krisoye13 merged commit 2dcdc0c into main Feb 2, 2026
4 checks passed
@krisoye krisoye deleted the feature/phase4-kb-integration branch February 6, 2026 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants