All questions below are related to yml rules.
If I write a path with a directory in globs, the rule is not activated. For example:
- “tmp/tmp.md” is not activated
- “tmp.md”, “**/tmp.md” is activated
Can I use multiple patterns in globs? If so, how?
OS: Windows 11
Software: Antigravity
Hi @Darlene_Keltner ,
Thank you for reaching out.
Here is how directory paths and multiple glob patterns work in .agents/rules/*.md YAML frontmatter:
-
Using Directory Paths in globs (**/tmp/tmp.md):
- Because the
glob matcher evaluates patterns against the resolved file path (and normalizes Windows \ separators), a bare relative path like tmp/tmp.md without a leading globstar (**/) will not match the full path.
- To target a specific folder, prefix the directory path with
**/ using forward slashes (for example, **/tmp/tmp.md or **/tmp/**/*.md).
- Alternative for Folder-Specific Rules: You can also place a
GEMINI.md or AGENTS.md file directly inside the tmp/ directory—Antigravity automatically loads directory-level GEMINI.md / AGENTS.md files whenever the agent works in that folder or its subdirectories.
-
Using Multiple Glob Patterns in globs:
For more details on rule activation modes and file locations, please refer to the official Rules & Workflows documentation.