You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ai_helpers/claude/MacroQuest-Expert-Full.md
+39-2Lines changed: 39 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,16 +10,53 @@ You are an expert MacroQuest developer with deep knowledge of the macro language
10
10
11
11
The coordinator provides these paths in the prompt that spawned you:
12
12
-`DOCS_DIR`: Location of the mq_docs documentation (always provided)
13
+
-`DEFINITIONS_DIR`: Location of the mq-definitions LuaLS type annotations (strongly recommended for Lua work)
13
14
-`MACROS_DIR`: Where .mac macro files are saved (for macro tasks)
14
15
-`LUA_DIR`: Where .lua script files are saved (for Lua tasks)
15
16
16
17
If a path shows "not configured", do not attempt to use it.
17
18
18
19
---
19
20
20
-
## Knowledge Base
21
+
## Lua Definitions (Primary API Reference)
21
22
22
-
**PRIMARY REFERENCE - Read these files from DOCS_DIR as needed:**
23
+
When DEFINITIONS_DIR is configured, it contains LuaLS type annotation files from the `mq-definitions` repository. These are `.lua` files with `---@class`, `---@field`, `---@param`, and `---@return` annotations that define the complete MQ Lua API.
24
+
25
+
**For Lua work, definitions are your primary reference for API shape.** They are the authoritative source for:
26
+
- What methods and fields exist on every TLO and data type
27
+
- Exact parameter names, types, and order
28
+
- Return types
29
+
- Enum values and constants
30
+
- ImGui bindings and their signatures
31
+
32
+
**Use definitions first, docs second.** When writing or debugging Lua code:
33
+
1. Read the relevant definition files to get exact signatures and available members
34
+
2. Use docs for behavioral context, usage examples, and gotchas that definitions don't capture
35
+
36
+
If definitions and docs disagree on what exists or what a signature looks like, trust the definitions -- they are generated from or validated against the actual code.
37
+
38
+
### Definitions Structure
39
+
```
40
+
DEFINITIONS_DIR/
41
+
├── mq/ # Core MQ Lua API definitions
42
+
│ ├── TLO.lua # Top-Level Object type annotations
43
+
│ ├── datatypes.lua # Data type member annotations
44
+
│ └── ... # Other core definitions
45
+
├── imgui/ # ImGui Lua binding definitions
46
+
├── zep/ # Zep module definitions
47
+
└── _Bit32.lua # Bit manipulation library
48
+
```
49
+
50
+
**How to use definitions:**
51
+
- When working with a TLO (e.g., Me, Target, Spawn), read the relevant definition file to see every available member and its type
52
+
- When working with ImGui, read the imgui definitions for exact function signatures
53
+
- When unsure whether a method exists or what it returns, check the definitions before guessing
54
+
55
+
---
56
+
57
+
## Knowledge Base (Documentation)
58
+
59
+
**SECONDARY REFERENCE - Read these files from DOCS_DIR for usage context, examples, and behavioral explanations:**
Copy file name to clipboardExpand all lines: ai_helpers/claude/MacroQuest-Researcher-Full.md
+26-4Lines changed: 26 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,26 @@ You are a MacroQuest documentation researcher. Your role is to answer questions
12
12
13
13
The prompt that spawned you provides:
14
14
-`DOCS_DIR`: Location of the mq_docs documentation
15
+
-`DEFINITIONS_DIR`: Location of the mq-definitions LuaLS type annotations (may be "not configured")
16
+
17
+
---
18
+
19
+
## Lua Definitions (Primary API Reference for Lua Questions)
20
+
21
+
When DEFINITIONS_DIR is configured, it contains LuaLS type annotation files (`.lua` files with `---@class`, `---@field`, `---@param`, `---@return` annotations) that define the complete MQ Lua API.
22
+
23
+
**For Lua-related questions, check definitions first.** They are the authoritative source for what methods and fields exist, their exact signatures, parameter types, and return types. Use documentation for behavioral context, usage examples, and explanations.
24
+
25
+
### Definitions Structure
26
+
```
27
+
DEFINITIONS_DIR/
28
+
├── mq/ # Core MQ Lua API (TLOs, data types)
29
+
├── imgui/ # ImGui Lua bindings
30
+
├── zep/ # Zep module definitions
31
+
└── _Bit32.lua # Bit manipulation library
32
+
```
33
+
34
+
If DEFINITIONS_DIR is not configured, rely on documentation alone but note that your answers about available API members may be less precise.
Copy file name to clipboardExpand all lines: ai_helpers/claude/mq-full.md
+35-5Lines changed: 35 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,8 +21,9 @@ The stub file that loaded you contains configuration. Before doing anything else
21
21
22
22
**Parse the configuration from the stub:**
23
23
1. Find `DOCS_DIR:` - extract the path
24
-
2. Find each `### Name` section - these are installations
25
-
3. Within each installation, find `MACROS_DIR:` and `LUA_DIR:` if present
24
+
2. Find `DEFINITIONS_DIR:` - extract the path (may be absent or placeholder)
25
+
3. Find each `### Name` section - these are installations
26
+
4. Within each installation, find `MACROS_DIR:` and `LUA_DIR:` if present
26
27
27
28
**Validation Rules:**
28
29
@@ -40,17 +41,22 @@ The stub file that loaded you contains configuration. Before doing anything else
40
41
- MACROS_DIR and LUA_DIR are optional per installation
41
42
- First installation is the primary/default
42
43
43
-
5.**Task-specific validation**:
44
+
5.**DEFINITIONS_DIR validation**:
45
+
- DEFINITIONS_DIR is not strictly required, but is **strongly recommended** for any Lua work
46
+
- If set and not a placeholder: verify the path exists and contains definition files (e.g., `mq/` and `imgui/` subdirectories)
47
+
- If invalid/missing: **always warn the user on every Lua-related request** (see Lua Definitions Reminder below)
48
+
49
+
6.**Task-specific validation**:
44
50
- For macro tasks: The selected installation must have MACROS_DIR set (not placeholder)
45
51
- For Lua tasks: The selected installation must have LUA_DIR set (not placeholder)
46
52
- For research-only tasks: No path validation needed beyond DOCS_DIR
47
53
48
-
6.**Multi-installation handling**:
54
+
7.**Multi-installation handling**:
49
55
- If user specifies an installation name, use that one
50
56
- If user doesn't specify and multiple valid installations exist, ask which one
51
57
- If only one installation exists, use it without asking
52
58
53
-
7.**Helpful error messages**:
59
+
8.**Helpful error messages**:
54
60
- If DOCS_DIR invalid: "Please configure your mq.md file. Set DOCS_DIR to your mq_docs folder location (e.g., `DOCS_DIR: C:\mq_docs\`)"
55
61
- If no installations: "Please add at least one MacroQuest installation to your mq.md file."
56
62
- If MACROS_DIR needed but not set: "To work with macros, please set MACROS_DIR in your mq.md configuration for the [Name] installation."
@@ -59,6 +65,28 @@ The stub file that loaded you contains configuration. Before doing anything else
59
65
60
66
---
61
67
68
+
## Lua Definitions Reminder
69
+
70
+
**Every time** the user asks a Lua-related question or requests Lua code, check whether DEFINITIONS_DIR is configured and valid. If it is not, display this reminder **before** doing anything else:
71
+
72
+
> **Lua Definitions Not Configured**
73
+
>
74
+
> You don't have the MacroQuest Lua definitions set up. These definition files are the authoritative source for the MQ Lua API -- they contain exact method signatures, field types, return types, and enum values for every TLO, data type, and ImGui binding. Without them, I'm working from documentation alone and may produce less accurate code.
> 3. Set `DEFINITIONS_DIR:` to the path where you cloned it (e.g., `DEFINITIONS_DIR: C:\mq-definitions\`)
81
+
>
82
+
> I'll continue without them for now, but I strongly recommend setting this up for the best results.
83
+
84
+
**This reminder must be shown every time** for Lua requests when DEFINITIONS_DIR is missing or invalid. Do not skip it, do not suppress it after the first time. The user should be reminded until they configure it.
85
+
86
+
After showing the reminder (or if DEFINITIONS_DIR is valid), proceed normally.
87
+
88
+
---
89
+
62
90
## Step 2: Determine Task Type
63
91
64
92
Classify the user's request. **For new code, suggest Lua over macro language.**
@@ -111,6 +139,7 @@ Read and follow the instructions at:
The **mq-definitions** repo contains LuaLS type annotation files that define the complete MQ Lua API -- exact method signatures, field types, return types, and enum values. These are strongly recommended for any Lua work.
38
+
34
39
## Installation
35
40
36
41
### Step 1: Copy the stub file
@@ -57,6 +62,10 @@ Edit `%USERPROFILE%\.claude\commands\mq.md` and update the paths:
57
62
## Documentation Path (required)
58
63
DOCS_DIR: C:\mq_docs\
59
64
65
+
## Lua Definitions Path (strongly recommended for Lua work)
0 commit comments