Skip to content

Conversation

Nirus2000
Copy link
Member

@Nirus2000 Nirus2000 commented Oct 3, 2025

Hi @buchen,

I've created and updated CLAUDE-IMPORTER.md that serves as reference
documentation for Claude.ai when developing PDF importers.

Key Updates:

  • Architecture: Simplified PDF import process flow and corrected core
    component descriptions
  • Tax/Fee Processing: Added standard addTaxesSectionsTransaction()
    and addFeesSectionsTransaction() patterns from BaaderBankPDFExtractor
  • Test Documentation: Added complete test assertion structures and
    fixed WithSecurityInEUR examples
  • Multi-language Support: Added German/English test file naming
    conventions (Buy01.txt, Kauf01.txt, etc.)
  • Code Patterns: Enhanced DocumentType patterns and emphasized proper
    // line break usage

Purpose:

  • Structured guidance for Claude.ai to implement new PDF extractors
  • References to proven implementations (BaaderBank, Comdirect, SaxoBank,
    etc.)
  • Collection of tested regex patterns and best practices
  • Guidance for different complexity levels (simple to advanced)

Benefits:

  • More consistent PDF importers through references to established patterns
  • Fewer follow-up questions during AI-assisted development
  • Documentation of current standards and reference implementations
  • Complement to existing CONTRIBUTING.md

The documentation is intentionally reference-oriented, pointing to
existing proven extractors rather than prescribing specific implementation
approaches.

Feedback welcome!

@Nirus2000 Nirus2000 requested a review from buchen October 3, 2025 08:51
@Nirus2000 Nirus2000 force-pushed the Create-new-CLAUDE-IMPORTER.md-and-CONTRIBUTING.md branch 2 times, most recently from c322a88 to 3436b85 Compare October 3, 2025 11:26
@buchen
Copy link
Member

buchen commented Oct 3, 2025

How do you tell Claude Code to use these instructions?

(I am asking because to my knowledge claude is reading CLAUDE.md and I am wondering how to organize this best)

@Nirus2000
Copy link
Member Author

Nirus2000 commented Oct 3, 2025

Full generatet with Claude... --> Result --> #5037
Full generatet with Claude... --> Result --> #5039

1.) I create the PDF debug in the test folder.
2.) I let Claude read the Markdown with the command.

I write in the console follow command:

Read and apply all rules, instructions, workflows, and best practices from claude-importer.md in the project root when working with PDF importers in this codebase.
Before modifying any PDF extractor, read claude-importer.md and strictly follow all guidelines, systematic workflows, pattern consolidation rules, and debugging procedures defined in that document.

3.) I tell him that there is a new PDF debug with [NEWPDF-DEBUG].txt and that he should process it via [PDF-IMPORT-NAME].

4.) Run ...

@Nirus2000 Nirus2000 force-pushed the Create-new-CLAUDE-IMPORTER.md-and-CONTRIBUTING.md branch 2 times, most recently from ff139d5 to 0ea8e59 Compare October 3, 2025 22:46
Improve CLAUDE-IMPORTER.md with comprehensive PDF extractor guidance

  ## Updates Made:

  ### Architecture & Core Components
  - Simplified PDF-Import Architecture Overview with clearer process flow
  - Updated Core Classes documentation with accurate descriptions
  - Revised Key Entry Points to focus on PDF importer development essentials
  - Removed UI integration references to maintain focus

  ### Tax & Fee Processing
  - Replaced complex tax patterns with standard BaaderBankPDFExtractor
  approach
  - Added proper `addTaxesSectionsTransaction()` and
  `addFeesSectionsTransaction()` method documentation
  - Documented use of `processTaxEntries()` and `processFeeEntries()`
  utilities
  - Removed TaxAmountTransactionHelper references per standard practices

  ### Test Documentation
  - Enhanced test assertion structure with complete standard assertions
  - Fixed WithSecurityInEUR test examples with complete method
  implementations
  - Added multi-language test file naming conventions (German/English)
  - Documented proper test organization and sorting patterns
  - Added foreign currency test patterns with CheckCurrenciesAction
  validation

  ### Code Patterns & Best Practices
  - Enhanced DocumentType patterns with proper line break examples
  - Emphasized consistent use of `//` for line breaks in method chains
  - Added comprehensive ExtractorMatchers examples for all transaction types
  - Documented special Comdirect patterns for document pairing scenarios

  ### Structure & References
  - Updated reference implementations to point to proven extractors
  - Added Special Implementation Patterns section for complex scenarios
  - Improved test case organization with systematic naming guidelines
  - Streamlined contributing guidelines and removed outdated references

  ## Impact:
  This update provides Claude.ai with accurate, current guidance for PDF
  extractor implementation, focusing on standard patterns used throughout
  the codebase rather than edge cases. The documentation now properly
  reflects established practices from reference implementations like
  BaaderBankPDFExtractor and ComdirectPDFExtractor.
@buchen buchen merged commit 1fbc811 into portfolio-performance:master Oct 4, 2025
2 checks passed
@Nirus2000 Nirus2000 deleted the Create-new-CLAUDE-IMPORTER.md-and-CONTRIBUTING.md branch October 4, 2025 05:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants