feat: Add DocumentProfile for document-type-specific extraction - #4
Merged
Conversation
The plan command now requires defining specific test cases (Given/When/Then) before breaking down tasks. This: - Forces concrete thinking about behavior during planning - Creates clear 'done' criteria - Makes plan → implement handoff smoother - Validates plans are specific enough
Implements document profiles system for configuring CascadingExtractor based on document type (book, article, essay, report, generic). Changes: - Add DocumentProfile frozen dataclass with extraction settings - Add 5 standard profiles: BOOK, ARTICLE, ESSAY, REPORT, DEFAULT - Add get_profile() for auto-detection using estimate_document_type() - Modify CascadingExtractor to accept profile parameter - Add for_profile() and for_document() classmethods - Add profile_used field to StructureResult - Update module exports in extractors/__init__.py This completes ROADMAP milestones 1.4 (Structure Extraction) and 1.5 (Document Profiles). Tests: 288 passing (28 new profile tests + 3 integration tests)
Owner
Author
Code ReviewStatus: ✅ Approved Strengths
Minor Observations (Non-blocking)
Verification
LGTM - ready to merge. |
Resolves merge conflict in .claude/commands/plan.md by accepting the more comprehensive main branch version. Brings in workflow improvements from PRs #5, #6, #7: - Autonomous development workflow with review gates - Enhanced commands (auto, debug, diagnose, review-pr, etc.) - Session logging and signal capture - Parallelization guide
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
get_profile()using existingestimate_document_type()profileparameterChanges
DocumentProfilefrozen dataclass with extraction settingsfor_profile()andfor_document()classmethods to CascadingExtractorprofile_usedfield to StructureResult for trackingextractors/__init__.pyTest plan