Use this guide for day-to-day contributor workflow.
styluaselenepre-commit- WoW API MCP access is preferred for API validation (manual fallback is acceptable when MCP is unavailable)
- Script index helper:
pwsh ./scripts/help.ps1
Start here before large refactors. Prefer the owning module over new files.
- Find the setting in
CombatMode/UI/Options/Tabs/Tab*.lua(get/set closures). - Confirm the DB key lives in
CombatMode/Constants/DatabaseDefaults.luawith the right scope (globalvschar). - Apply behavior in the feature module that owns it (
Core/FreeLook,Core/Crosshair, …) — not in the tab file. - If enable/disable touches mouselook, CVars, or bindings: keep apply ↔ cleanup symmetric and combat-safe (
InCombatLockdown/ defer).
- Put static tables in
CombatMode/Constants/(the domain file that already owns that concern: Assets, CVars, …). Colocate feature-only numbers in the owning module when they are not shared. - Consume via
CM.Constants.*from feature code — avoid magic numbers in hot paths. - New files must be listed in
CombatMode/Embeds.xmlbefore their consumers.
Retail can return secret values. Comparing them with == / using them as table keys / truncating them for display can error or taint.
- Prefer
UnitExists("unit"), plate identity (GetNamePlateForUnit), andissecretvalue/canaccessvalue/PublicBool-style helpers already used in Crosshair / Ally Cycle HUD / Focus marker. - Full guardrails:
.cursor/rules/combatmode-lua-safety.mdc(Secret values section). - When unsure, look at nearby code in the same module rather than inventing a new pattern.
If you move, rename, or re-order modules:
| Update | Why |
|---|---|
CombatMode/Embeds.xml |
Load order |
STRUCTURE.md |
Human map |
.cursor/rules/combatmode-architecture-and-style.mdc |
Agent module map |
| Touched file headers | What this module owns / does not |
Policy: .cursor/rules/combatmode-docs-and-headers-stay-in-sync.mdc. Do not leave STRUCTURE or headers stale after a move.
- Make your code changes.
- Lint:
- Preferred:
pwsh ./scripts/lint-changed.ps1 - Equivalent:
pre-commit run --files <changed files>
- Preferred:
- Version + changelog (when ready to bump): agents ask before doing this; humans can wait until shipping a version or preparing a PR that should bump.
- Bump
## VersioninCombatMode/CombatMode.toc(SemVer). - Update
CombatMode/CHANGELOG.md(Keep a Changelog; match TOC version). - Run
pwsh ./scripts/sync-changelog-to-lua.ps1soCombatMode/UI/Changelog/ChangelogData.luamatches the in-game viewer.
- Bump
- Profile performance (optional): toggle the Debug Mode ON in the options panel to start the built-in profiler, play your scenario, toggle it OFF to dump the report (see
TESTING.md). - Run focused runtime checks from
TESTING.mdfor touched features. - Open your PR.
Use full sweep only for release prep or explicit maintainer request:
pre-commit run --all-files
- MCP-first for changed WoW APIs/events:
lookup_api,list_deprecated,get_event,get_enum
- Manual fallback:
- verify changes against Warcraft Wiki API docs and event payload docs
- Changed-files lint passes (
lint-changed.ps1/ pre-commit). - If this PR bumps a version: TOC,
CHANGELOG.md, and changelog sync script are all updated together. - Feature behavior verified with focused testing (
TESTING.md). - Architecture moves updated Embeds + STRUCTURE + architecture rule + headers (see Keep docs cold).
- Any process/rule/documentation updates included when workflow changed.