# GridResilience Studio - Agent Guidelines Overview - This repository hosts a production-ready core for an offline-first cross-domain orchestrator aimed at disaster-resilient grids. - It emphasizes canonical primitives: Objects (LocalDevicePlans), Morphisms (SharedSignals), and PlanDelta (incremental updates). Architecture - Python-based core with a lightweight, pluggable adapters layer. - Core primitives live in `gridresilience_studio/core.py`. - Offline-first delta-sync protocol implemented in `gridresilience_studio/offline_sync.py`. - Adapters scaffold in `adapters/` for cross-domain interoperability (IEC61850, simulators, etc.). - Governance ledger scaffold for audit trails. - Interop MVP: AddedEnergiBridge bridge (src/gridresilience_studio/bridge.py) and starter adapters under `src/gridresilience_studio/adapters/` as a scaffold for cross-domain interoperability. - Adapters: `IEC61850Adapter` and `MicrogridSimulatorAdapter` provide contracts to plug into the offline-first runtime. - Package layout: adapters are exposed as a Python package `gridresilience_studio.adapters` within the core project to support packaging and testing. Testing & Build - Tests located in `tests/` using pytest. - `test.sh` runs tests and validates packaging via `python -m build`. - The publishing process expects a ready-to-publish signal file: `READY_TO_PUBLISH`. Usage & Collaboration - Install dependencies via `pip install -e .`. - Run tests with `bash test.sh`. - See README for detailed usage and API surface. Conventions - Code in ASCII, simple, well-documented. - Minimal, production-ready, with hooks for expansion.