Rule
Executing Python code
Please use uv run instead of python.
The python environment in this project folder is prepared using uv.
Required Context Documents (Read Before Implementing)
When implementing or modifying code, consult these documents first:
specification.md(source of truth for requirements and contracts)documents/technical_documentation.md(architecture and maintenance guidance)documents/source_current_state.md(current implementation snapshot)documents/change_log.md(recent behavior and design changes)
If any conflict appears, follow precedence:
specification.mddocuments/technical_documentation.md- current code behavior
Tools During PDF/CSV Task
System tool
Tesseract OCR (installed via winget)
- Default path:
C:\Program Files\Tesseract-OCR\tesseract.exe - Installed language data:
engandosdonly.
How to use (examples)
List available OCR languages:
& "C:\Program Files\Tesseract-OCR\tesseract.exe" --list-langs
Note: If you need Japanese OCR, install jpn traineddata for Tesseract and set TESSDATA_PREFIX as needed.
Application Update Workflow (Required)
When updating this application, follow this order:
- Confirm scope and impacted areas (
backend,frontend, DB schema, quotation file flow). - Implement the change in the domain layer first (
backend/app/service.py), then wire adapters (backend/app/api.py,backend/main.py) and UI (frontend/src) as needed. - If schema/constraints change, update
backend/app/db.pywith idempotent migration-safe changes. - Run tests with
uv run:- Full backend tests:
uv run python -m pytest - Or targeted tests for touched behavior (for faster iteration), then run full suite before completion.
- Full backend tests:
- Validate runtime behavior for changed user flows (API/CLI/UI path that was modified).
- Update documentation in the same change set:
- User-facing setup/usage:
README.md(root and/orbackend/README.md,frontend/README.mdif relevant) - Architecture/data model/maintenance notes:
documents/technical_documentation.md - Current-state snapshot updates:
documents/source_current_state.mdwhen structure/behavior changed - Change history updates:
documents/change_log.mdfor meaningful changes - Requirements/spec updates:
specification.mdwhen behavior or contract changed
- User-facing setup/usage:
- In your final report, always include:
- What changed
- What tests were run (and results)
- What documentation was updated