docs: Documentation for OCR expansion (#129) #146
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Relates to #129
Milestone 8: Documentation
Files
backend/src/features/ocr/CLAUDE.mdbackend/src/features/ocr/README.mdbackend/src/core/CLAUDE.mdocr/app/CLAUDE.mdocr/app/engines/CLAUDE.md(NEW)frontend/src/features/fuel-logs/CLAUDE.mdfrontend/src/features/maintenance/CLAUDE.md(NEW)frontend/src/features/documents/CLAUDE.md(NEW)Requirements
backend/src/features/ocr/CLAUDE.md
Add entries for all files modified in M1 and M6:
api/ocr.controller.ts(WHAT: Request handlers for receipt and manual OCR extraction, WHEN: Adding/modifying OCR endpoints)api/ocr.routes.ts(WHAT: Route registration for /extract/receipt and /extract/manual with auth and tier guards, WHEN: Route changes)domain/ocr.service.ts(WHAT: Business logic for receipt and manual extraction with file validation, WHEN: OCR feature development)domain/ocr.types.ts(WHAT: TypeScript types for OCR responses including ReceiptExtractionResponse and ManualJobResponse, WHEN: Type changes)external/ocr-client.ts(WHAT: HTTP client to Python OCR service with extractReceipt and submitManualJob methods, WHEN: OCR integration changes)backend/src/features/ocr/README.md
Add new sections:
backend/src/core/CLAUDE.md
Update entry for
config/feature-tiers.tsto reflectfuelLog.receiptScanPro+ tier requirementocr/app/CLAUDE.md
Add entry:
engines/gemini_engine.py(WHAT: Gemini 2.5 Flash integration for maintenance schedule extraction from PDF, WHEN: Manual extraction debugging or Gemini integration changes)Update entry for
extractors/manual_extractor.py(WHAT: Gemini-based manual extraction coordinator with subtype fuzzy matching, WHEN: Manual extraction pipeline changes)ocr/app/engines/CLAUDE.md (NEW)
Create with entries for all engine files in directory
frontend/src/features/fuel-logs/CLAUDE.md
Update entry for
hooks/useReceiptOcr.ts(WHAT: Receipt OCR extraction hook calling /ocr/extract/receipt, WHEN: Receipt scanning changes)frontend/src/features/maintenance/CLAUDE.md (NEW)
Create with entries:
components/MaintenanceScheduleReviewScreen.tsx(WHAT: Review screen for Gemini-extracted maintenance schedules with select/edit/create, WHEN: Manual extraction UI changes)hooks/useCreateSchedulesFromExtraction.ts(WHAT: Batch schedule creation from extracted maintenance items, WHEN: Schedule creation flow changes)frontend/src/features/documents/CLAUDE.md (NEW)
Create with entries:
hooks/useManualExtraction.ts(WHAT: Async manual extraction job submission and polling hook, WHEN: Manual extraction flow changes)components/DocumentForm.tsx(WHAT: Document upload form with maintenance scan checkbox, WHEN: Document upload UI changes)Acceptance Criteria
Verification Checklist
Tests
Skip - documentation-only milestone. Manual verification via checklist above.
Milestone: M8 Documentation
Phase: Execution | Agent: Developer | Status: PASS
Summary
Most documentation was already created during M0-M7 milestone execution. Verification against actual implementation code found two discrepancies that were fixed:
requireTier('fuelLog.receiptScan')in ocr.routes.ts)Verification Checklist (All PASS)
Files Modified
backend/src/features/ocr/README.md- Fixed receipt tier gating (Pro, not "-")backend/src/core/CLAUDE.md- Added feature tier gating references to config/ descriptionFiles Verified (already complete from M0-M7)
backend/src/features/ocr/CLAUDE.md- All 5 file entries present and accurateocr/app/CLAUDE.md- Subdirectory entries cover engines/ and extractors/ocr/app/engines/CLAUDE.md- All 7 engine files documented including gemini_engine.pyfrontend/src/features/fuel-logs/CLAUDE.md- useReceiptOcr.ts entry accuratefrontend/src/features/maintenance/CLAUDE.md- ReviewScreen and useCreateSchedulesFromExtraction entries accuratefrontend/src/features/documents/CLAUDE.md- useManualExtraction and DocumentForm entries accurateVerdict: PASS | Commit:
docs: fix receipt tier gating and add feature tier refs to core docs (refs #146)