|
| 1 | +# Copilot instructions for Aurora |
| 2 | + |
| 3 | +## Architecture (how Aurora loads) |
| 4 | +- Entry point is Aurora_Mainline.toc; it loads libs, Skin/skin.xml, then aurora.lua and gui.lua. Saved variables live in AuroraConfig. |
| 5 | +- The core boot flow is in aurora.lua: it builds the Aurora API tables, registers ADDON_LOADED, then runs functions in private.fileOrder (set in Skin/init.lua) before skinning already-loaded addons. |
| 6 | +- Skin module order is defined by Skin/skin.xml (init, color, util, api, backdrop, texture, skin, deprecated). Add new core skin helpers in Skin/ and add to that file. |
| 7 | +- Addon-specific skins live under Skin/Interface/AddOns/ and are wired via XML include lists (e.g., Skin/Interface/AddOns/AddOns_Mainline.xml). |
| 8 | + |
| 9 | +## Skin registration patterns |
| 10 | +- Use Base.AddSkin(addonName, func) from Skin/api.lua to register skins for non-Blizzard addons; they execute on ADDON_LOADED and also immediately if the addon is already loaded. |
| 11 | +- Use the shared helpers in Aurora.Base/Aurora.Skin/Aurora.Util; common texture cleanup uses Base.StripBlizzardTextures and Base.StripAllTextures. |
| 12 | +- Respect feature toggles stored in AuroraConfig (bags, chat, loot, tooltips, fonts, mainmenubar); see aurora.lua for how disabled features short-circuit hooks. |
| 13 | + |
| 14 | +## Config/UI conventions |
| 15 | +- Options UI is built in gui.lua and registered via Settings.RegisterCanvasLayoutCategory; changes should go through AuroraConfig and update helpers like private.updateHighlightColor. |
| 16 | +- Color/alpha updates call Util.SetFrameAlpha and update C.frames to keep frame alpha consistent across skins. |
| 17 | + |
| 18 | +## Build and packaging |
| 19 | +- Packaging uses .pkgmeta (manual changelog in CHANGELOG.md). Dev helpers in dev/ are excluded from packages. |
| 20 | +- The toc uses do-not-package tags around dev/test.lua; keep debug-only code inside those tags. |
| 21 | +- Lua linting uses .luacheckrc (Lua 5.1, libs excluded). |
| 22 | + |
| 23 | +## Integration points |
| 24 | +- Optional dependencies are declared in Aurora_Mainline.toc (Ace3, LibTextDump-1.0, BugSack, WagoAnalytics). Guard usage when those libraries are absent. |
| 25 | +- WagoAnalytics is wired in aurora.lua; keep telemetry changes behind the existing config flags. |
0 commit comments