This repository provides a Python CLI and library for sending extracted document text to the OpenAI Responses API. Changes must preserve privacy defaults, predictable costs, test isolation, and a clear public interface.
src/openai_document_analyzer/: authoritative application package.scripts/: version 1 compatibility wrappers only.tests/: network-free unit tests.examples/: safe, public sample inputs.docs/: architecture, configuration, API, and migration guides..github/: CI, security, release, and contributor automation.
- Read
README.md,PRIVACY.md,CONTRIBUTING.md, and the relevant file indocs/before editing. - Keep all repository-facing prose, code comments, errors, and examples in English.
- Never commit API keys,
.envfiles, real customer documents, API responses containing private data, or credentials in fixtures. - Never make a live OpenAI request from tests, CI, or validation scripts.
- Treat document contents as untrusted input. Do not weaken the instruction boundary without a documented security review.
- Preserve
store=Falseas the default unless a deliberate privacy decision is documented and approved. - Do not silently truncate input. Reject configured limits with a typed error.
- Add or update tests for every behavior change.
- Update
CHANGELOG.mdand public documentation for user-visible changes. - Keep compatibility wrappers thin; new behavior belongs in the
srcpackage.
python -m pip install -e ".[dev]"
ruff check .
ruff format --check .
pytest
python -m build
git diff --checkCoverage must remain at or above the threshold in pyproject.toml. Tests must
pass without OPENAI_API_KEY.
- Verify current model and API guidance against official OpenAI developer documentation.
- Keep model changes behavior-preserving unless the pull request explicitly documents a migration.
- Preserve explicit model overrides and the Sol/Terra/Luna quality-cost roles.
- Use the Responses API for new features.
- Do not invent model capabilities, pricing, parameters, or availability.
- Mock the injected client and assert the exact request shape in tests.
Use Conventional Commit style for titles. Explain behavior, privacy, cost, compatibility, and migration impact. Include the commands used for validation.
Versions follow Semantic Versioning. Update pyproject.toml,
src/openai_document_analyzer/__init__.py, and CHANGELOG.md together. A
verified vX.Y.Z tag triggers the release workflow.