AI Coding Rules Plugin#
The AI Coding Rules plugin for Backstage provides comprehensive visualization and management of AI coding rules from various sources like Cursor, GitHub Copilot, Cline, and Claude Code. It enables teams to discover, view, and manage their AI coding guidelines directly within the Backstage interface with clickable links to open rule files in their git repositories.
Plugin Components#
Frontend Plugin#
The frontend plugin provides a user interface for:
- Visualizing Cursor rules from
.mdc
files in.cursor/rules/
directories - Displaying GitHub Copilot rules from
.github/copilot-instructions.md
- Showing Cline rules from
.clinerules/*.md
files - Displaying Claude Code rules from
CLAUDE.md
files - Manual filtering with configurable default rule types
- Clickable links to open rule files directly in git repositories
- Viewing rule metadata and content in expandable cards
- Statistics and overview of rule counts
- Apply Filter functionality for controlled rule searches
Learn more about the frontend plugin
Backend Plugin#
The backend plugin handles:
- Integration with Backstage SCM integrations
- Fetching rules from Git repositories with retry logic and exponential backoff
- Parsing frontmatter metadata in rule files
- API endpoints for rule data retrieval
- Support for multiple rule types and formats
- Rate limiting protection for large repositories
- Multi-provider git support (GitHub, GitLab, etc.)
Learn more about the backend plugin
Features#
- Multi-Source Support: Support for Cursor, GitHub Copilot, Cline, and Claude Code rules
- Modern UI: Clean and intuitive interface with manual filtering and Apply Filter controls
- Clickable Git Links: Direct links to open rule files in git repositories in new tabs
- Rule Discovery: Automatic detection of rule files in repositories
- Configurable Defaults: Separate configuration for allowed and default rule types
- Manual Filtering: Users control when to search with Apply Filter functionality
- Metadata Parsing: Extract and display rule metadata from frontmatter
- Repository Integration: Seamless integration with all Backstage SCM integrations
- Rate Limiting Protection: Retry logic with exponential backoff for large repositories
- Multi-Provider Support: Works with GitHub, GitLab, and other git providers
Screenshots#
AI Rules Overview#
AI Rules component showing no rule types selected
AI Rules component showing rule statistics and filtering options
Detailed view of AI coding rules from cursor with expandable cards
Detailed view of AI coding rules from Claude Code project rules
Detailed view of AI coding rules from copilot project rules
Detailed view of AI coding rules from cline with expandable cards
Documentation Structure#
Frontend Plugin
- About
- Installation
- Configuration
Backend Plugin
- About
- Installation
- Configuration
Supported Rule Types#
The plugin supports the following AI coding rule sources:
- Cursor Rules:
.mdc
files in.cursor/rules/
directories with frontmatter metadata support - GitHub Copilot Rules:
.github/copilot-instructions.md
files with automatic section splitting - Cline Rules:
.md
files in.clinerules/
directories with markdown section extraction - Claude Code Rules:
CLAUDE.md
files in repository root with markdown content and title extraction
Getting Started#
To get started with the AI Coding Rules plugin:
- Install and configure the backend plugin
- Set up the frontend components
- Configure rule types in your app-config.yaml
- Add the component to entity pages
- Start discovering and managing AI coding rules
For detailed installation and configuration instructions, refer to the individual plugin documentation linked above.