fix(antigravity): trigger frontmatter for CLI project rules, skill disable-slash-command/metadata passthrough - #3276
Merged
Conversation
…ss skill flags through - antigravity-cli: project non-root rules in .agents/rules/ now carry trigger frontmatter, since Antigravity silently discards a rules/*.md file without a valid trigger. The CLI and IDE now write identical files to the shared tree. - antigravity-ide / antigravity-cli / antigravity-plugin skills: emit disable-slash-command (from the root user-invocable: false or the target section) and metadata (root or section), and keep extra SKILL.md keys under the target section on import. - Refresh the stale inheritMcp note on the Antigravity subagent schema. Refs #2666 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y4MwhqMc6s4ct5MzMReGJj
…IDE and CLI The antigravity-cli project root no longer carries a rule reference block, since the CLI loads trigger-tagged .agents/rules files itself, matching antigravity-ide. Both targets now merge the antigravity-ide and antigravity-cli skill sections (CLI wins) on the shared project .agents/skills tree so generation order never changes SKILL.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y4MwhqMc6s4ct5MzMReGJj
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y4MwhqMc6s4ct5MzMReGJj
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y4MwhqMc6s4ct5MzMReGJj
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y4MwhqMc6s4ct5MzMReGJj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #2666
Resolves the sub-gaps of #2666 that map cleanly onto existing rulesync features. The rest of the issue is explained below and stays open.
Changes
rules (
antigravity-cli, project): non-root rules now carrytriggerfrontmatterAntigravity's rules docs say: "Every
.mdfile insiderules/must start with YAML frontmatter declaring a validtrigger". A file without one is one that "Antigravity silently discards". The CLI tab lists.agents/rules/*.mdas a CLI surface. Until nowAntigravityCliRulewrote project non-root rules as bare markdown, so every non-root rule was dropped for CLI-only users. When both Antigravity targets were enabled, the IDE's triggers were also overwritten, depending on target order.~/.gemini/config/rules/files already do. A plain rule becomesalways_on, and specific globs becomeglob.antigravity-ideandantigravity-clinow write byte-identical files to the shared.agents/rules/tree. A test checks this.globs/antigravity. A legacy file with no frontmatter, written by an older rulesync, still imports as an always-applied rule.AGENTS.md,~/.gemini/GEMINI.md) stay plain, because the docs exempt them from frontmatter.antigravity-cliproject rootAGENTS.mdno longer carries a rule reference block (ruleDiscoveryMode: "auto", as forantigravity-ide). Both targets therefore write the same projectAGENTS.mdtoo, and a rules-processor test checks this.skills (
antigravity-ide/antigravity-cli/antigravity-plugin):disable-slash-commandandmetadataBefore this change,
AntigravitySharedSkillwrote and imported onlyname/description. Two flags were affected:disable-slash-command: true, which hides a skill from the/menu but leaves it model-invocable.metadata.icon.Neither could be authored, and both were lost on import (CLI CHANGELOG).
antigravity-ide/antigravity-clisections on the rulesync skill frontmatter carrydisable-slash-commandandmetadata.antigravity-pluginreads theantigravity-idesection, following the existing plugin convention indocs/guide/plugin-packaging.md.user-invocable: falseis reused as the shared default and maps todisable-slash-command: true. That root key already has the same meaning ("hide from the/menu, keep model access") for many tools, and Devin already maps it onto its own native field. A section'sdisable-slash-commandoverrides it. Rootmetadatais the default, and a sectionmetadatareplaces it outright, asresolveMetadatadoes for other tools..agents/skills/tree, so there each reads theantigravity-idesection and then theantigravity-clisection merged (the CLI wins). The output then never depends on generation order. This is the same rule the Antigravity MCP and subagent features use for their shared files. In the global trees, each target reads only its own section.SKILL.mdkey beyondname/descriptionis kept under the target's section, so generate → import → generate gives the same output.Small cleanup
The
AntigravitySubagentFrontmatterSchemadocstring still described the per-kindinheritMcpkey as current. CLI 1.1.14 replaced it withinheritCustomizations. The docstring now says so and lists the other release-note-only passthrough keys.Docs:
docs/reference/supported-tools.md(CLI rules no longer "plain markdown") and the skill frontmatter sample indocs/reference/file-formats.md.Not implemented here, and why
sidecar.json): rulesync has no matching feature dimension. Sidecars are global-only or plugin-only (~/.gemini/config/sidecars/<id>/, with no workspace location), and they only run once the user enables them per ID in the shared~/.gemini/config/config.json. Adding a new feature dimension is a product decision and is out of scope for a follow-up fix.plugin.jsonforantigravity-plugin: this is intentionally not emitted.docs/guide/plugin-packaging.mdstates the cross-target policy: "Rulesync manages the selected component files but does not create or modify plugin metadata … Keep the required upstream manifest in the plugin directory", and it lists Antigravity'splugin.json. None of the*-plugintargets (Claude Code, AugmentCode, ZCode, Vibe, Devin) writes its manifest.rules.json: this item is obsolete. The rules docs now describerules.jsonas an optional aggregator, and they say plugin rules underplugins/<name>/rules/are activated automatically..geminiignore→.antigravityignore: this is not switched. The only primary source is one CLI 1.1.16 changelog line that names.antigravityignore. No docs page names either file, and nothing shows that.geminiignoreis no longer read; upstream issue ci(deps): bump actions/setup-node from 4 to 5 in the all-actions group #309 expects both to be honored. Renaming the output would orphan existing.geminiignorefiles on that evidence.unsandboxed(...)deprecation warning: this is not added./docs/permissionsstill listsunsandboxedas a supported action in its Windows section and in its "CLI fine-grained permissions" table, so a warning would contradict the current docs.command-skill-ownership.ts). It changes the commands output of every Antigravity user and the global paths, so it needs its own PR.subprojectPathnesting, thetriggeron the plugin'srules/AGENTS.md,antigravity-ideglobal non-root rules: these are follow-ups. The pluginAGENTS.mditem is rated low confidence in the issue itself. The IDE global rules need IDE↔CLI coordination on the shared~/.gemini/config/rules/.Tests
antigravity-cli-rule.test.ts: trigger frontmatter on project non-root rules,always_ondefault, byte equality with the IDE output, glob round trip, frontmatter-less legacy import, invalid frontmatter rejection.antigravity-cli-skill.test.ts/antigravity-ide-skill.test.ts: rootuser-invocablemapping, section override,metadata, section isolation between targets, import → regenerate round trip.pnpm cicheckpasses.🤖 Generated with Claude Code
https://claude.ai/code/session_01Y4MwhqMc6s4ct5MzMReGJj