Imported from jspenguin2017/DoubleClickHotkey (
AGENTS.md). Install upstream withnpx skills add jspenguin2017/DoubleClickHotkey. Copyright stays with the author.
AGENTS.md
Double Click Hotkey is a C++17 Windows 11 x64 tray utility with a portable core and Linux/Windows tests.
Development
- Keep log retention, countdown state, and orchestration in
src/application/; Native UI and Win32 operations belong insrc/platform/windows/behindinclude/double_click_hotkey/platform_binding.hpp. Core and tests must have no Win32 APIs or headers. - Dependencies: executable → Windows adapter → core; tests → core and GoogleTest only. Keep
src/main.cppplatform neutral and select the binding factory through CMake; exclude the adapter from native Linux builds. - Keep UI events, presentation, and cleanup on one thread. Queue reentrant ordinary events; quit must cancel timers immediately. Contain exceptions at native callback boundaries and detach callbacks before teardown.
- Ship one executable with only Windows-provided DLL dependencies. Preserve static linking, size optimizations,
debugging information in
DebugandRelWithDebInfo, and stream-free text formatting as described in release guidance. - Register new C++ files in
DOUBLE_CLICK_HOTKEY_FORMAT_FILESinCMakeLists.txt, and test sources intests/CMakeLists.txt. - Update documentation with behavior, workflow, and build changes. Keep README focused on common tasks; put reference
details in
docs/, avoid duplication, and update affected links.
Validation
- Add only portable unit tests through interfaces and fakes that run unchanged on Linux and Windows. No Win32 APIs,
Windows headers, or platform-specific test gating. Run CTest only with native-host presets; retain cross-build
DISCOVERY_MODE PRE_TEST. - Check for build size regressions whenever changes can affect the binary (application code, build/link settings, dependencies, or resources). Follow release validation: measure Release before and after with the same toolchain and configuration, report byte counts and percentage change, investigate unexpected growth, and fix regressions or explain necessary increases. Inspect DLL imports and ASLR/NX as part of the check.
- Prefer
npm run build,npm run test, andnpm run format:check; apply formatting withnpm run format. See development for prerequisites, direct CMake commands, and the repository layout.