From a118b01b1c407d18d7e77ce8fe70c25d983ca1f3 Mon Sep 17 00:00:00 2001 From: Mats Rauhala Date: Thu, 20 Aug 2026 15:13:46 +0300 Subject: [PATCH] Add AGENTS.md --- AGENTS.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 AGENTS.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..732881e --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,26 @@ +# AGENTS.md + +## Project + +A sidecar for Home Assistant that runs automations using arrowized functional +reactive programming (AFRP). Haskell, built with cabal. + +## Code style + +- Vertical modules: split by feature/concept, not by layer. +- Comments are minimal. They describe the contract, not the implementation, + and should stay stable as the implementation changes. + +## Build + +- Nix-backed project: `flake.nix` provides the devShell, `default.nix` is the + generated cabal derivation. +- Always run cabal through the devShell: `nix develop -c cabal build`. +- After adding dependencies to the .cabal file, regenerate the derivation: + `nix run nixpkgs#cabal2nix -- ./. > default.nix`. Do not edit it by hand. +- `secrets.yaml` is sops-encrypted. Never read, print, or commit its contents. + +## Tests + +- hspec for unit tests, hedgehog for property tests. +- Run with `nix develop -c cabal test`.