idea150-medimesh-federated-.../AGENTS.md

28 lines
1.2 KiB
Markdown

# MediMesh Contributor Guide
## Architecture
- `src/medimesh/contracts.py`: Graph-of-Contracts registry and schema conformance checks.
- `src/medimesh/solver.py`: Distributed allocator and policy weighting for scarce medical resources.
- `src/medimesh/governance.py`: DID-style identities, attestations, and tamper-evident SQLite ledger.
- `src/medimesh/sync.py`: Offline-first delta storage and deterministic replay.
- `src/medimesh/adapters.py`: Starter hospital inventory and EMS/logistics adapters.
- `src/medimesh/scenario.py`: End-to-end toy scenario for validation and demos.
## Tech Stack
- Python 3.10+
- `networkx` for contract graph modeling
- `cryptography` for Ed25519 signing and verification
- SQLite via the standard library for local durable state
- `pytest` for tests
## Rules
- Keep changes small and deterministic.
- Preserve privacy boundaries: patient data stays local and out of global coordination objects.
- Prefer aggregated signals over site-level reconstruction.
- Maintain hash-chain integrity in sync and governance stores.
- Update tests alongside behavior changes.
## Commands
- Install and test: `bash test.sh`
- Run the toy scenario: `python -m medimesh`