dominus-cli 0.5.6 → 0.5.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -680,8 +680,20 @@ These are built-in lessons that ship with Dominus. Follow them exactly.
680
680
  - Full UI tree \u2192 \`create_ui\` (one call, never loop \`insert_instance\` for UI)
681
681
  - **Convert/export existing UI \u2192 \`serialize_ui\`** (NOT get_descendants_properties)
682
682
  - Adjusting an existing instance \u2192 \`set_properties\` (not \`run_code\`)
683
+ - **Inspecting user's selection \u2192 \`get_selection\`, then \`get_properties\` or \`serialize_ui\`**
684
+ - **Reading properties \u2192 \`get_properties\` (NEVER \`run_code\` with dump scripts)**
685
+ - **Browsing the tree \u2192 \`get_explorer\`**
683
686
  - Anything exotic or procedural \u2192 \`run_code\` as last resort
684
687
 
688
+ ### NEVER use run_code for:
689
+ - Getting properties of an instance \u2192 use \`get_properties\` or \`serialize_ui\`
690
+ - Dumping selection info \u2192 use \`get_selection\` + \`get_properties\`
691
+ - Creating instances \u2192 use \`create_part\`, \`create_ui\`, \`insert_instance\`, \`build_multiple\`
692
+ - Modifying properties \u2192 use \`set_properties\` or \`bulk_set_properties\`
693
+ - Reading scripts \u2192 use \`read_script\`
694
+ - Browsing the explorer \u2192 use \`get_explorer\`
695
+ \`run_code\` is ONLY for procedural logic, terrain generation, raycasts, physics queries, or custom algorithms with no tool equivalent.
696
+
685
697
  ### Verification habits
686
698
  - After a build, call \`get_explorer\` or \`get_selection\` to confirm the tree looks right.
687
699
  - After editing a script, read it back.
@@ -2624,7 +2636,7 @@ async function startMcpServer() {
2624
2636
  );
2625
2637
  mcp.tool(
2626
2638
  "run_code",
2627
- "Execute Luau code in Roblox Studio and return output",
2639
+ "Execute arbitrary Luau code in Roblox Studio. LAST RESORT \u2014 only use when no dedicated tool exists. Do NOT use for: reading properties (use get_properties/get_selection/serialize_ui), creating instances (use create_part/create_ui/insert_instance/build_multiple), modifying properties (use set_properties/bulk_set_properties), or inspecting the tree (use get_explorer). Valid uses: complex procedural generation, terrain algorithms, raycasting, custom logic with no tool equivalent.",
2628
2640
  { code: z.string().describe("Luau code to execute") },
2629
2641
  async ({ code }) => {
2630
2642
  assertConnected();
@@ -2720,7 +2732,7 @@ async function startMcpServer() {
2720
2732
  );
2721
2733
  mcp.tool(
2722
2734
  "get_selection",
2723
- "Get the currently selected instances in Roblox Studio",
2735
+ 'Get the currently selected instances in Roblox Studio. Returns paths and class names of all selected objects. Use this FIRST when the user says "my selection" or "what I have selected". Then use get_properties or serialize_ui on the returned paths to inspect details.',
2724
2736
  {},
2725
2737
  async () => {
2726
2738
  assertConnected();
@@ -4259,10 +4271,22 @@ You are deeply knowledgeable about:
4259
4271
 
4260
4272
  You have direct access to Roblox Studio through tools. You can read/edit scripts, run code, browse the explorer tree, manage instances, and run tests -- all in real-time via WebSocket.
4261
4273
 
4274
+ ## CRITICAL: NEVER use run_code for tasks that have a dedicated tool
4275
+ run_code is a LAST RESORT. You have 30+ specialized tools \u2014 use them.
4276
+ - Reading properties \u2192 get_properties, get_selection, get_descendants_properties
4277
+ - Inspecting selection \u2192 get_selection (returns paths), then get_properties or serialize_ui
4278
+ - Creating parts \u2192 create_part, build_multiple
4279
+ - Creating UI \u2192 create_ui
4280
+ - Modifying properties \u2192 set_properties, bulk_set_properties
4281
+ - Browsing the tree \u2192 get_explorer
4282
+ - Reading/editing scripts \u2192 read_script, edit_script
4283
+ - Converting UI \u2192 serialize_ui
4284
+ Only use run_code for: procedural generation, terrain algorithms, raycasting, physics queries, or other logic that no tool covers.
4285
+
4262
4286
  When the user asks you to do something, you should:
4263
4287
  1. Use your tools to gather context (read scripts, check explorer, recall memory)
4264
4288
  2. Plan your approach for complex tasks
4265
- 3. Execute changes using your tools (edit scripts, run code, insert instances)
4289
+ 3. Execute changes using the appropriate dedicated tools (NOT run_code unless truly necessary)
4266
4290
  4. Verify your changes worked (read back, check output for errors)
4267
4291
  5. Remember important facts for future sessions`);
4268
4292
  if (opts.connected) {