Repository navigation
feat(antigravity-plugin): create a missing plugin.json manifest on generate - #3326
Merged
Merged
Conversation
…nerate
Antigravity loads a directory as a plugin only when it has a plugin.json at
its root, so a plugin tree generated from scratch was never discovered. When
antigravity-plugin is a target in project scope, generate now writes
{"name": "<plugin directory name>"} to each output root that has no
manifest. The name must match ^[a-zA-Z0-9-_]+$; otherwise rulesync warns and
writes nothing. An existing manifest is never read, rewritten or deleted.
Refs #2666
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Y4MwhqMc6s4ct5MzMReGJj
…fest tests Strip control characters from the directory name and path in the manifest warning and dry-run log, cover mixed output roots and a failing --check on a missing manifest, and document that antigravity-plugin and vibe-plugin need separate output roots. Refs #2666 Co-Authored-By: Claude Opus 5.5 <[email protected]> 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.
Summary
Antigravity loads a directory as a plugin only when it has a
plugin.jsonat its root. Theantigravity-plugintarget never wrote that file, so a plugin tree that rulesync generated from scratch was not discovered at all. Gap 3 of #2666.When
antigravity-pluginis a target in project scope,generatenow writes{"name": "<plugin directory name>"}to each output root that has noplugin.json. This happens whatever features are selected.^[a-zA-Z0-9-_]+$. If it doesn't, rulesync warns once and writes nothing, so the user has to write the manifest by hand.plugin.jsonis never read, rewritten or deleted, including under--delete. Import does not read it.--dry-runreports the file it would write.--checkreports a missing manifest as a diff.pluginManifestCount/pluginManifestPaths, labelled "plugin manifests" in the CLI summary andpluginManifestin the--jsonfeature results and plan). It is not folded into the Hermes activation slot.Design decisions
This changes documented policy.
docs/guide/plugin-packaging.mdused to say rulesync never creates plugin metadata for any*-plugintarget. Antigravity is now the one exception, and the guide and README say so. The exception is narrow for three reasons:name,description) and setsadditionalProperties: false.name, can be derived from the directory name.The Claude Code, Kimi and Vibe manifests are different: they declare components rulesync cannot infer, so they stay hand-authored.
The manifest has only
name. The published schema putsadditionalProperties: falsebeside thenameanddescriptionproperties. A$schemakey in the file itself would therefore be an extra property under strict validation; the docs present it only as an editor-validation aid.No error on an invalid directory name. rulesync warns instead of failing, because the generated component files are still useful.
When it runs: after the
--deletesweep, so the sweep can never remove a manifest this run creates. No feature claims the file, so it is never swept.Not in this PR
disable-slash-commandfor skills): already resolved by fix(antigravity): trigger frontmatter for CLI project rules, skill disable-slash-command/metadata passthrough #3276. It maps the rootuser-invocable: falsetodisable-slash-command: true, and the per-targetantigravity-ide/antigravity-clisections can override it. Nothing to add here.Sources
/docs/plugins.md): "Every plugin requires aplugin.jsonfile at its root to identify the directory as a plugin". The field table saysnameis required for the CLI (optional in 2.0/IDE, where it defaults to the folder name) and must match^[a-zA-Z0-9-_]+$. The full JSON schema sets"required": ["name"]and"additionalProperties": false.Tests
src/features/shared/antigravity-plugin-manifest.test.tscover four cases: the file is created, an existing file is left untouched, preview mode writes nothing, and an invalid name produces a warning.src/lib/generate.test.tscovers the wiring for three cases: project-scope roots, a non-target run, and global mode.src/e2e/e2e-plugins.spec.ts:--deletecreates the manifest, and a following--checkpasses.descriptioncomes through byte-for-byte.pnpm cicheckpasses.Refs #2666
🤖 Generated with Claude Code
https://claude.ai/code/session_01Y4MwhqMc6s4ct5MzMReGJj