Coding standards¶
Enforced on every task in the local MVP lane.
Rules¶
| Rule | Meaning |
|---|---|
| Atomic functions | One responsibility; ~30 lines max |
| Chunk + test | pytest green before next task |
| Protocols | typing.Protocol for parsers — no vendor imports in core/ |
| Registry | Plugins register in plugins/__init__.py only |
| Stable contracts | Return core/models.py types from all plugins |
| Fail closed | Missing creds → enabled=False, never silent wrong API |
| No PHI in logs | Log job_id, parser_id, confidence only |
| No Elation HTTP in MVP | elation_adapter builds JSON preview only |
Test layout¶
tests/
test_core_models.py
test_registry.py
test_plugins_gcp.py # @pytest.mark.gcp skips without creds
test_orchestrator.py
test_api.py
test_elation_adapter.py
Adding code checklist¶
- Implement smallest unit
- Write test
- Run
pytest - Update MkDocs page for the area you changed
- Entry in
.cursor/memory/CHANGELOG.md(no PHI)