diff --git a/docs/workstation/README.md b/docs/workstation/README.md index 2c6a68c..d9aaa42 100644 --- a/docs/workstation/README.md +++ b/docs/workstation/README.md @@ -145,3 +145,4 @@ Notes: - `docs/repository-layout.md` - `docs/agentplane-integration.md` +- `docs/workstation/shortcut-map.md` — bounded shortcut contract (active + proposed bindings) diff --git a/tests/workstation-shortcut-map-contract.nix b/tests/workstation-shortcut-map-contract.nix new file mode 100644 index 0000000..6cefe35 --- /dev/null +++ b/tests/workstation-shortcut-map-contract.nix @@ -0,0 +1,31 @@ +{ pkgs ? import {} }: +pkgs.runCommand "workstation-shortcut-map-contract" { + nativeBuildInputs = [ pkgs.gnugrep ]; +} '' + # Document must exist and be non-empty + test -s ${../docs/workstation/shortcut-map.md} + + # Active screenshot bindings must be present + grep -q "Super+Shift+3" ${../docs/workstation/shortcut-map.md} + grep -q "Super+Shift+4" ${../docs/workstation/shortcut-map.md} + grep -q "Super+Shift+5" ${../docs/workstation/shortcut-map.md} + grep -q "Super+Shift+6" ${../docs/workstation/shortcut-map.md} + + # Palette and app-launch bindings must be documented + grep -q "Super+Space" ${../docs/workstation/shortcut-map.md} + grep -q "Super+E" ${../docs/workstation/shortcut-map.md} + grep -q "Super+Return" ${../docs/workstation/shortcut-map.md} + + # Document must distinguish active from proposed/future bindings + grep -q "Active bindings" ${../docs/workstation/shortcut-map.md} + grep -q "future" ${../docs/workstation/shortcut-map.md} + grep -q "non-active\|non.active\|NOT currently enforced" ${../docs/workstation/shortcut-map.md} + + # Helper references must be present + grep -q "mac-defaults.sh" ${../docs/workstation/shortcut-map.md} + grep -q "palette-hotkey.sh" ${../docs/workstation/shortcut-map.md} + grep -q "doctor.sh" ${../docs/workstation/shortcut-map.md} + + mkdir -p $out + echo validated > $out/result.txt +''