From 9a4243b37300580ac6a157f0a3db941c9cf18f7a Mon Sep 17 00:00:00 2001 From: Donchitos <150119193+Donchitos@users.noreply.github.com> Date: Sat, 2 May 2026 20:40:23 +1000 Subject: [PATCH] =?UTF-8?q?Fix:=20rg=20--type=20gdscript=20is=20invalid=20?= =?UTF-8?q?=E2=80=94=20use=20--glob=20*.gd=20instead=20(#42)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix: document that rg --type gdscript is invalid, use --glob *.gd instead Closes #37. ripgrep has no gdscript type — *.gd files are registered under the gap type (GAP programming language). Using --type gdscript produces a hard error, silently preventing any search from executing. Added explicit warnings in two places: - .claude/agents/godot-gdscript-specialist.md: new Tooling section with the correct Grep tool param (glob: "*.gd") and shell equivalent - docs/engine-reference/godot/current-best-practices.md: new Tooling section agents read at version-check time Co-Authored-By: Claude Sonnet 4.6 * Fix: propagate rg --glob *.gd tooling warning to all Godot agents Closes the coverage gap identified in PR #42 review — the ripgrep gdscript-type warning was only in godot-gdscript-specialist. Added the same CRITICAL tooling section to godot-specialist, godot-gdextension-specialist, godot-shader-specialist, and godot-csharp-specialist so no Godot agent can silently misfire a search. Co-Authored-By: Claude Sonnet 4.6 --------- Co-authored-by: Claude Sonnet 4.6 --- .claude/agents/godot-csharp-specialist.md | 10 ++++++++++ .claude/agents/godot-gdextension-specialist.md | 10 ++++++++++ .claude/agents/godot-gdscript-specialist.md | 10 ++++++++++ .claude/agents/godot-shader-specialist.md | 10 ++++++++++ .claude/agents/godot-specialist.md | 10 ++++++++++ docs/engine-reference/godot/current-best-practices.md | 6 ++++++ 6 files changed, 56 insertions(+) diff --git a/.claude/agents/godot-csharp-specialist.md b/.claude/agents/godot-csharp-specialist.md index 09c4394..99fc1c4 100644 --- a/.claude/agents/godot-csharp-specialist.md +++ b/.claude/agents/godot-csharp-specialist.md @@ -388,6 +388,16 @@ Do NOT rely on inline version claims in this file — they may be wrong. Always When in doubt, prefer the API documented in the reference files over your training data. +## Tooling — ripgrep File Filtering + +**CRITICAL**: There is no `gdscript` type in ripgrep. `*.gd` files are registered +under the `gap` type (GAP programming language). Using `--type gdscript` or passing +`type: "gdscript"` to the Grep tool produces a hard error — the search never executes. + +**Always use `glob: "*.gd"`** when filtering GDScript files: +- Grep tool: `glob: "*.gd"` ✓ | `type: "gdscript"` ✗ +- Shell/CI: `rg --glob "*.gd"` ✓ | `rg --type gdscript` ✗ + ## Coordination - Work with **godot-specialist** for overall Godot architecture and scene design - Work with **gameplay-programmer** for gameplay system implementation diff --git a/.claude/agents/godot-gdextension-specialist.md b/.claude/agents/godot-gdextension-specialist.md index c0c57be..a0c5d30 100644 --- a/.claude/agents/godot-gdextension-specialist.md +++ b/.claude/agents/godot-gdextension-specialist.md @@ -298,6 +298,16 @@ that may affect native bindings. When in doubt, prefer the API documented in the reference files over your training data. +## Tooling — ripgrep File Filtering + +**CRITICAL**: There is no `gdscript` type in ripgrep. `*.gd` files are registered +under the `gap` type (GAP programming language). Using `--type gdscript` or passing +`type: "gdscript"` to the Grep tool produces a hard error — the search never executes. + +**Always use `glob: "*.gd"`** when filtering GDScript files: +- Grep tool: `glob: "*.gd"` ✓ | `type: "gdscript"` ✗ +- Shell/CI: `rg --glob "*.gd"` ✓ | `rg --type gdscript` ✗ + ## Coordination - Work with **godot-specialist** for overall Godot architecture - Work with **godot-gdscript-specialist** for GDScript/native boundary decisions diff --git a/.claude/agents/godot-gdscript-specialist.md b/.claude/agents/godot-gdscript-specialist.md index ff1c896..b664a7f 100644 --- a/.claude/agents/godot-gdscript-specialist.md +++ b/.claude/agents/godot-gdscript-specialist.md @@ -254,6 +254,16 @@ for the full list. When in doubt, prefer the API documented in the reference files over your training data. +## Tooling — ripgrep File Filtering + +**CRITICAL**: There is no `gdscript` type in ripgrep. `*.gd` files are registered +under the `gap` type (GAP programming language). Using `--type gdscript` or passing +`type: "gdscript"` to the Grep tool produces a hard error — the search never executes. + +**Always use `glob: "*.gd"`** when filtering GDScript files: +- Grep tool: `glob: "*.gd"` ✓ | `type: "gdscript"` ✗ +- Shell/CI: `rg --glob "*.gd"` ✓ | `rg --type gdscript` ✗ + ## Coordination - Work with **godot-specialist** for overall Godot architecture - Work with **gameplay-programmer** for gameplay system implementation diff --git a/.claude/agents/godot-shader-specialist.md b/.claude/agents/godot-shader-specialist.md index abdbe21..150d01b 100644 --- a/.claude/agents/godot-shader-specialist.md +++ b/.claude/agents/godot-shader-specialist.md @@ -246,6 +246,16 @@ stencil buffer (4.5), shader texture types changed from `Texture2D` to When in doubt, prefer the API documented in the reference files over your training data. +## Tooling — ripgrep File Filtering + +**CRITICAL**: There is no `gdscript` type in ripgrep. `*.gd` files are registered +under the `gap` type (GAP programming language). Using `--type gdscript` or passing +`type: "gdscript"` to the Grep tool produces a hard error — the search never executes. + +**Always use `glob: "*.gd"`** when filtering GDScript files: +- Grep tool: `glob: "*.gd"` ✓ | `type: "gdscript"` ✗ +- Shell/CI: `rg --glob "*.gd"` ✓ | `rg --type gdscript` ✗ + ## Coordination - Work with **godot-specialist** for overall Godot architecture - Work with **art-director** for visual direction and material standards diff --git a/.claude/agents/godot-specialist.md b/.claude/agents/godot-specialist.md index f7111ec..c7d072a 100644 --- a/.claude/agents/godot-specialist.md +++ b/.claude/agents/godot-specialist.md @@ -173,6 +173,16 @@ introduced after May 2025, use WebSearch to verify it exists in the current vers When in doubt, prefer the API documented in the reference files over your training data. +## Tooling — ripgrep File Filtering + +**CRITICAL**: There is no `gdscript` type in ripgrep. `*.gd` files are registered +under the `gap` type (GAP programming language). Using `--type gdscript` or passing +`type: "gdscript"` to the Grep tool produces a hard error — the search never executes. + +**Always use `glob: "*.gd"`** when filtering GDScript files: +- Grep tool: `glob: "*.gd"` ✓ | `type: "gdscript"` ✗ +- Shell/CI: `rg --glob "*.gd"` ✓ | `rg --type gdscript` ✗ + ## When Consulted Always involve this agent when: - Adding new autoloads or singletons diff --git a/docs/engine-reference/godot/current-best-practices.md b/docs/engine-reference/godot/current-best-practices.md index bf7bf9b..7b0faff 100644 --- a/docs/engine-reference/godot/current-best-practices.md +++ b/docs/engine-reference/godot/current-best-practices.md @@ -93,6 +93,12 @@ This supplements (not replaces) the agent's built-in knowledge. - Live preview in Quick Open dialog when "Live Preview" enabled - New "Select Mode" (v key) prevents accidental transforms; old mode renamed "Transform Mode" (q key) +## Tooling + +- **ripgrep has no `gdscript` type**: `*.gd` is registered under `gap` (GAP programming language). + `rg --type gdscript` is a hard error — the search never executes. + Always use `rg --glob "*.gd"` (shell) or `glob: "*.gd"` (Grep tool) to filter GDScript files. + ## Platform (4.5+) - **visionOS export**: First new platform since open-sourcing (windowed app mode)