idea153-aidmesh-mobile-first/AGENTS.md

1.0 KiB

AGENTS.md

Architecture

  • idea153_aidmesh_mobile_first is a small Python package for offline-first disaster-response planning.
  • Core pieces:
    • contracts.py: parses a tiny ContractScript dialect and compiles it into a canonical portable module.
    • solver.py: deterministic bounded solver for allocating scarce resources to tasks.
    • sync.py: signed plan deltas, merge policy, and append-only plan ledger.
    • replay.py: deterministic replay from signed logs.
    • adapters.py: starter adapters for field inventory and drone routing.

Tech Stack

  • Python 3.11+
  • pydantic for validation
  • pytest for tests
  • setuptools for packaging

Rules

  • Keep changes deterministic and replayable.
  • Prefer minimal, explicit data structures over hidden state.
  • Preserve canonical JSON ordering when hashing or signing.
  • Add tests for any behavior change in parsing, solving, syncing, or replay.
  • Keep public APIs small and stable.

Test Commands

  • bash test.sh
  • PYTHONPATH=src python3 -m pytest
  • python3 -m build