38 lines
1.3 KiB
Markdown
38 lines
1.3 KiB
Markdown
# AGENTS.md
|
|
|
|
## Architecture
|
|
|
|
CrediMesh is a Python package that models privacy-preserving mortgage underwriting as a federated workflow.
|
|
|
|
Key modules:
|
|
|
|
- `models.py`: typed request, signal, plan, budget, and audit records.
|
|
- `identity.py`: Ed25519-based signing and DID-style identifiers.
|
|
- `contracts.py`: graph-of-contracts registry and adapter conformance checks.
|
|
- `adapters.py`: income verification and property appraisal signal adapters.
|
|
- `solver.py`: deterministic ADMM-lite underwriting solver.
|
|
- `ledger.py`: SQLite-backed governance and audit log persistence.
|
|
- `orchestrator.py`: end-to-end orchestration over adapters, solver, and audit trail.
|
|
|
|
## Tech Stack
|
|
|
|
- Python 3.11+
|
|
- `pydantic` for strict model validation
|
|
- `cryptography` for signing and verification
|
|
- `networkx` for contract graph bookkeeping
|
|
- SQLite for governance persistence
|
|
|
|
## Testing
|
|
|
|
- `bash test.sh`
|
|
- `pytest`
|
|
- `python3 -m build`
|
|
|
|
## Rules
|
|
|
|
- Keep outputs privacy-minimized; never store raw borrower payloads in audit records.
|
|
- Preserve deterministic replay behavior for the same inputs.
|
|
- Prefer small, explicit changes over broad rewrites.
|
|
- Update tests when changing schemas, solver behavior, or contract rules.
|
|
- Do not add new dependencies unless they materially improve the orchestration layer.
|