Canonical AI guidance for this repository.
CLAUDE.mdmust remain a symlink to this file.
- Project: Windows gaming, emulation, and utility automation scripts
- Primary language: AutoHotkey v2 (
ahk/,Lib/v2/) - Legacy surface: AutoHotkey v1 scripts and helper assets in
Other/ - Platform: Windows 10/11 for runtime and meaningful validation
- Canonical user docs:
README.md,CONTRIBUTING.md, directory READMEs
- Treat this file as the detailed, shared source of truth for AI assistants.
- Keep
.github/copilot-instructions.mdshorter and reference this file instead of duplicating large sections. - Keep guidance repo-specific; remove version counts, file counts, and other details that drift quickly.
ahk/ Primary AutoHotkey v2 scripts
Lib/v2/ Shared v2 helpers (`AHK_Common`, `WindowManager`, `AutoStartHelper`)
Other/ Legacy v1 scripts plus PowerShell/CMD utilities and specialized tools
.github/instructions/ File-path or workflow guidance for Copilot
.github/skills/ Reusable Copilot task playbooks for repo-specific work
.github/workflows/ CI definitions; `ahk-lint-format-compile.yml` is the main AHK validation workflow
- Prefer v2 for new work. Add new automation scripts under
ahk/unless a legacy workflow inOther/requires v1 compatibility. - Reuse shared helpers before adding new logic. Check
Lib/v2/first for initialization, fullscreen, window, and auto-start behavior. - Be careful with shared libraries. Changes in
Lib/v2/can affect many scripts; inspect consumers before editing and test representative dependents. - Respect Windows-oriented formatting rules.
.ahk,.ps1,.cmd,.bat: CRLF, UTF-8, 4 spaces.md,.json,.yml,.yaml: LF- Follow
.editorconfigand.gitattributeswhen they differ from editor defaults.
- Avoid hardcoded user-specific paths. Prefer
A_ScriptDir,A_MyDocuments,%AppData%, and environment-aware logic. - Preserve low-latency behavior. Gaming and automation scripts keep
InitScript()or equivalent performance settings unless the task documents an explicit exception. - Keep documentation synchronized by design. Put durable repo-wide rules here; keep shorter tool-entry docs concise and linked back here.
- Start with
#Requires AutoHotkey v2.0. - Reuse
Lib/v2/AHK_Common.ahkand callInitScript(...)in v2 entry scripts that need shared startup behavior. - Use v2 function syntax consistently.
- Prefer existing helpers such as
ToggleFakeFullscreenMultiMonitor(),WaitForWindow(), andAutoStartFullscreen()instead of copy-pasting window and process logic.
- Treat v1 scripts as maintenance-oriented unless the task explicitly requires legacy behavior.
- Preserve local helper and binary assumptions in those folders, for example:
Other/Citra_per_game_config/depends ontf.ahkOther/Downloader/expects companion binaries such asyt-dlp.exe,spotdl.exe, andffmpeg.exe
- Keep legacy v1 edits limited to the targeted maintenance task unless the work explicitly calls for a migration.
- Find dependents first (for example, grep for
#Includereferences). - Keep public helper names and calling conventions stable unless the task requires a coordinated refactor.
- Test multiple consuming scripts on Windows before considering the change complete.
- Update
AGENTS.mdfirst when changing repo-wide rules. - Keep
.github/copilot-instructions.mdas a compact operating summary. - Keep
CLAUDE.mdresolving toAGENTS.md.
- The authoritative AHK CI workflow is
.github/workflows/ahk-lint-format-compile.yml. - That workflow performs version detection, syntax compilation, and formatting checks on Windows.
- Agent guidance changes should run
ctxlintandagnix. - Use
.github/skills/validate/SKILL.mdfor the exact commands and scope. - If you need to reproduce CI locally, prefer matching the workflow definitions over older duplicated doc snippets.
- Pushing a tag triggers
build.ymlandbuild-cached.ymlto create release artifacts. - Treat tagged builds as the release path for compiled
.exeoutputs.
README.md- project overview and user-facing setupCONTRIBUTING.md- contributor workflow expectationsahk/README.md,Lib/README.md,Other/*/README.md- area-specific behavior and dependencies.github/instructions/autohotkey.instructions.md- file-type guidance for Copilot