Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Get started in minutes:
## How It Works

1. **Security rules** are written in unified markdown format (`sources/` directory)
2. **Conversion tools** translate rules to IDE-specific formats (Cursor, Windsurf, Copilot, Claude Code)
2. **Conversion tools** translate rules to IDE-specific formats (Cursor, Windsurf, Copilot, Claude Code,antigravity)
Copy link

Copilot AI Nov 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing comma in the list. The list should be "Cursor, Windsurf, Copilot, Claude Code, Antigravity" with a space after the comma before "antigravity". Additionally, "antigravity" should be capitalized to match the naming of other IDEs in the list.

Suggested change
2. **Conversion tools** translate rules to IDE-specific formats (Cursor, Windsurf, Copilot, Claude Code,antigravity)
2. **Conversion tools** translate rules to IDE-specific formats (Cursor, Windsurf, Copilot, Claude Code, Antigravity)

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI Nov 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent capitalization: the code uses "antigravity" (lowercase) in README.md but "AntiGravity" in docs/getting-started.md. This should be standardized across all documentation. Use consistent casing (either "Antigravity" or "AntiGravity") throughout.

Suggested change
2. **Conversion tools** translate rules to IDE-specific formats (Cursor, Windsurf, Copilot, Claude Code,antigravity)
2. **Conversion tools** translate rules to IDE-specific formats (Cursor, Windsurf, Copilot, Claude Code, AntiGravity)

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI Dec 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space after comma. The list should be formatted as: (Cursor, Windsurf, Copilot, Claude Code, antigravity) with a space after "Claude Code,".

Suggested change
2. **Conversion tools** translate rules to IDE-specific formats (Cursor, Windsurf, Copilot, Claude Code,antigravity)
2. **Conversion tools** translate rules to IDE-specific formats (Cursor, Windsurf, Copilot, Claude Code, antigravity)

Copilot uses AI. Check for mistakes.
3. **Release automation** packages rules into downloadable ZIP files
4. **AI assistants** reference these rules when generating or reviewing code
5. **Secure code** is produced automatically without developer intervention
Expand Down
8 changes: 8 additions & 0 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ Before you begin, familiarize yourself with how rules work in your IDE:

:material-book-open-page-variant: [GitHub Copilot Instructions](https://docs.github.com/en/copilot/how-tos/configure-custom-instructions/add-repository-instructions)

=== "Google AntiGravity"
Google AntiGravity uses `.agent/rules` for rule configuration.

:material-book-open-page-variant: [Google AntiGravity Instructions](https://codelabs.developers.google.com/getting-started-google-antigravity#6)

## Installation

### Option 1: Download Pre-built Rules (Recommended)
Expand Down Expand Up @@ -95,6 +100,7 @@ uv run python src/convert_to_ide_formats.py --source core owasp
cp -r dist/.cursor/ /path/to/your/project/
cp -r dist/.windsurf/ /path/to/your/project/
cp -r dist/.github/ /path/to/your/project/
cp -r dist/.agent/ /path/to/your/project/
```

## Verify Installation
Expand All @@ -103,6 +109,8 @@ After installation, your project structure should include:

```
your-project/
├── .agent/
│ └── rules/
├── .cursor/
│ └── rules/
├── .windsurf/
Expand Down
3 changes: 2 additions & 1 deletion src/convert_to_ide_formats.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from collections import defaultdict

from converter import RuleConverter
from formats import CursorFormat, WindsurfFormat, CopilotFormat, ClaudeCodeFormat
from formats import CursorFormat, WindsurfFormat, CopilotFormat, ClaudeCodeFormat, AntigravityFormat
from utils import get_version_from_pyproject
from validate_versions import set_plugin_version, set_marketplace_version

Expand Down Expand Up @@ -128,6 +128,7 @@ def convert_rules(input_path: str, output_dir: str = "dist", include_claudecode:
CursorFormat(version),
WindsurfFormat(version),
CopilotFormat(version),
AntigravityFormat(version),
]

# Only include Claude Code for core rules (committed plugin)
Expand Down
2 changes: 2 additions & 0 deletions src/formats/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
from formats.windsurf import WindsurfFormat
from formats.copilot import CopilotFormat
from formats.claudecode import ClaudeCodeFormat
from formats.antigravity import AntigravityFormat

__all__ = [
"BaseFormat",
Expand All @@ -38,4 +39,5 @@
"WindsurfFormat",
"CopilotFormat",
"ClaudeCodeFormat",
"AntigravityFormat",
]
66 changes: 66 additions & 0 deletions src/formats/antigravity.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Copyright 2025 Cisco Systems, Inc. and its affiliates
#
# SPDX-License-Identifier: Apache-2.0

"""
Antigravity Format Implementation
Generates .md rule files for Google Antigravity with YAML frontmatter.
"""

from formats.base import BaseFormat, ProcessedRule


class AntigravityFormat(BaseFormat):
"""
Google Antigravity format implementation (.md rule files).
Copy link

Copilot AI Dec 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documentation inconsistency: The comment refers to "workflow files" but this implementation generates rule files stored in .agent/rules. The description should say "rule files" to match the actual implementation.

Copilot uses AI. Check for mistakes.
Antigravity uses .md files with YAML frontmatter containing:
- description: Rule description (required by Antigravity spec)
Copy link

Copilot AI Nov 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incomplete frontmatter documentation. The docstring lists only description in the frontmatter (lines 18-20), but the implementation also includes tags (lines 60-64). Update the docstring to document all fields that may be included in the YAML frontmatter.

Suggested change
- tags: Optional list of tags for categorization (if present)

Copilot uses AI. Check for mistakes.
Rules are stored in .agent/rules/ and can be triggered
on-demand with /rule-name in the Antigravity interface.
Comment on lines +21 to +22
Copy link

Copilot AI Dec 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documentation inconsistency: The comments mention "Workflows are stored in .agent/workflows/" but the actual implementation uses .agent/rules (line 35). These comments should be updated to match the implementation and use "rules" instead of "workflows".

Copilot uses AI. Check for mistakes.
"""

def get_format_name(self) -> str:
"""Return Antigravity format identifier."""
return "antigravity"

def get_file_extension(self) -> str:
"""Return Antigravity format file extension."""
return ".md"

def get_output_subpath(self) -> str:
"""Return Antigravity output subdirectory."""
return ".agent/rules"

def generate(self, rule: ProcessedRule, globs: str) -> str:
"""
Generate Antigravity .md format with YAML frontmatter.
Args:
rule: The processed rule to format
globs: Glob patterns for file matching (not used by Antigravity)
Returns:
Formatted .md content with minimal frontmatter
Note:
Antigravity workflows use simple markdown with description-only
frontmatter. Language/glob information is not needed as workflows
are triggered manually by the user.
"""
yaml_lines = []

# Add description (required by Antigravity spec)
desc = self._format_yaml_field("description", rule.description)
if desc:
yaml_lines.append(desc)

# Optional: Add tags for categorization (if Antigravity supports it)
if rule.tags:
yaml_lines.append("tags:")
for tag in rule.tags:
yaml_lines.append(f"- {tag}")
Comment on lines +53 to +64
Copy link

Copilot AI Nov 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing version field in the YAML frontmatter. All other IDE format implementations (CursorFormat, WindsurfFormat, CopilotFormat, ClaudeCodeFormat) include a version field using self.version. Consider adding yaml_lines.append(f"version: {self.version}") for consistency, unless Antigravity specifically doesn't support version metadata.

Copilot uses AI. Check for mistakes.

Comment on lines +60 to +65
Copy link

Copilot AI Nov 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment says "tags for categorization (if Antigravity supports it)" which suggests uncertainty about the feature support. Either verify that Antigravity supports tags and remove the conditional comment, or remove the tags implementation if support is unverified. Compare with other format implementations like ClaudeCodeFormat which don't include tags.

Suggested change
# Optional: Add tags for categorization (if Antigravity supports it)
if rule.tags:
yaml_lines.append("tags:")
for tag in rule.tags:
yaml_lines.append(f"- {tag}")
# (No tags: Antigravity does not support tags in frontmatter)

Copilot uses AI. Check for mistakes.
return self._build_yaml_frontmatter(yaml_lines, rule.content)