1.1 KiB
1.1 KiB
AGENTS.md
Architecture
- Python 3.11 package under
src/idea170_agrimesh_federated_privacy. - SQLite-backed governance ledger for farms, adapters, contracts, deltas, and sync state.
- Pydantic models validate local problems, shared signals, plan deltas, and adapter contracts.
solver.pycontains the ADMM-lite allocator for cross-farm irrigation planning.canonical.pymaps AgriMesh primitives into a CatOpt-style intermediate representation.demo.pyassembles a drought scenario for 2 to 3 farms.
Tech Stack
- Standard library:
sqlite3,json,hashlib,hmac,math,random,dataclasses,pathlib. - External dependency:
pydanticfor strict data validation. - Tests:
pytest.
Rules
- Keep changes minimal and deterministic.
- Preserve SQLite schema compatibility unless a migration is explicitly added.
- Any new public data model should have validation and at least one test.
- Preserve canonical JSON ordering when hashing or signing payloads.
- Do not bypass the solver or ledger abstractions with ad hoc state.
Testing
bash test.shpytest -qpython3 -m build