Bootstrap Cursor rules (
.mdc
) for AI agent-guided projects. This tool helps you generate and maintain project-specific rules for multiple frameworks and architectures.
Agent Rules Kit is a CLI tool that facilitates the installation and configuration of rules for Cursor AI, the AI-powered IDE. The rules help AI agents better understand the structure, patterns, and best practices of different technology stacks.
Listen to a brief introduction about Agent Rules Kit:
podcast_en.mp4
podcast_es.mp4
- Quick Start
- New Architecture
- New Features
- Supported Stacks
- MCP Tools Integration
- Implementation Status
- Contributing
- Code of Conduct
- License
# Install and run interactively
npx agent-rules-kit
# The CLI will guide you through:
# 1. π Project path selection
# 2. π Stack and architecture choice (optional)
# 3. π Global best practices (recommended)
# 4. π§ MCP tools selection (multiple tools supported)
# 5. β‘ Automatic rule generation
Your rules will be generated in .cursor/rules/rules-kit/
and automatically detected by Cursor!
- Stack Selection: Choose the main framework or technology for your project
- Global Rules: Include general best practice rules
- Cursor Directory: Specify the location of the Cursor directory
- Project Path: Define the relative path if the project is not in the root
- Mirror Documentation: Generate .md files that reflect the rules for human reference
- Debug Mode: Enable detailed logging for troubleshooting
We've completely redesigned the internal architecture to provide a more maintainable and extensible system:
- Service-Based Architecture: Replaced the helper-based system with a clean service-oriented architecture that enhances maintainability and extensibility
- Automatic Backups: Smart backup system that preserves your custom rules when updating
- Enhanced Debug Mode: Better visibility into the rule generation process with standardized logging
- Improved Testing Framework: More robust testing with better mocking and service isolation
- React Architecture Options: Now includes support for atomic design and feature-sliced design
- Better State Management Support: Enhanced support for modern state management libraries
- π Quick setup of rules for different frameworks and stacks
- π Automatic framework version detection
- ποΈ Support for multiple architectural styles
- π Mirror documentation generation for human reference
- π§© Modular system for easy expansion to new frameworks
- πΎ Automatic backups of existing rules
- π Version-specific rule overlays
- π§ Multi-select MCP Tools integration (New in v2.0)
New in v2.0: Agent Rules Kit now includes comprehensive support for Model Context Protocol (MCP) tools! This powerful feature allows AI agents to work more effectively with external tools and services.
Model Context Protocol (MCP) tools are standardized interfaces that allow AI assistants to securely connect to external data sources and services. These tools enable AI agents to:
- π Search codebases semantically with understanding of code meaning
- π Manage repositories with secure GitHub integration
- π§ Maintain persistent memory across conversation sessions
- π Access file systems with configurable security controls
- π Perform version control operations with Git integration
Choose from 5 popular MCP tools during installation:
Tool | Name | Description | Best For |
---|---|---|---|
π PAMPA | Semantic Code Search | AI-powered code search with project memory | Understanding large codebases, finding relevant code patterns |
π GitHub | Repository Management | Secure GitHub API integration for file operations | Repository management, collaborative development |
π§ Memory | Persistent Knowledge | Long-term memory storage across sessions | Maintaining context, learning from previous interactions |
π Filesystem | File Operations | Secure file system access with controls | File management, project organization |
π Git | Version Control | Repository operations and history analysis | Version control, commit management, branch operations |
The new multi-select interface allows you to install rules for multiple MCP tools simultaneously:
? Select MCP tools to install rules for: (Use space to select, enter to confirm)
β―β PAMPA - Semantic Code Search - AI-powered semantic code search and project memory system
β GitHub - Repository Management - Secure access to GitHub repositories for file operations
β― Memory - Persistent Knowledge - Persistent knowledge storage and retrieval across sessions
β Filesystem - File Operations - Secure file operations with configurable access controls
β― Git - Version Control - Repository operations, commit history analysis, and version control
Each selected MCP tool generates organized rules in your project:
.cursor/rules/rules-kit/mcp-tools/
βββ pampa/
β βββ pampa-mcp-usage.mdc # Core usage patterns
β βββ pampa-best-practices.mdc # Best practices and tips
βββ github/
β βββ github-mcp-usage.mdc # GitHub API integration rules
β βββ github-workflow.mdc # Workflow patterns
βββ memory/
βββ memory-mcp-usage.mdc # Memory management rules
βββ memory-patterns.mdc # Common memory patterns
MCP Tools rules help AI agents:
- π― Use tools effectively: Clear guidelines on when and how to use each tool
- π‘οΈ Follow security best practices: Built-in security patterns and access controls
- β‘ Optimize performance: Efficient usage patterns to avoid rate limits and errors
- π Handle errors gracefully: Common error scenarios and recovery strategies
- π Learn workflows: Step-by-step patterns for complex operations
MCP tools rules work alongside your stack-specific rules:
- π Independent Generation: MCP rules are separate from stack rules
- π§© Flexible Combinations: Any stack + any combination of MCP tools
- π― Focused Guidance: Tool-specific rules don't interfere with framework patterns
- π Complete Coverage: Both development patterns AND tool usage covered
- Laravel (v8-12)
- Next.js (v12-14)
- React (v17-18)
- React Native
- Angular (v14-17)
- NestJS
- Vue (v2-3)
- Nuxt (v2-3)
- Svelte (v3-5)
- SvelteKit (v1-2)
- Astro
- Generic (for any project)
Enhanced Extensibility: Detailed documentation has been added on how to extend Agent Rules Kit with new services, making it easier to contribute new stacks and features.
For guidelines on contributing to this project, please see CONTRIBUTING.md.
Please read our Code of Conduct before participating in our project.
This project is licensed under the ISC License. See the LICENSE file for details.
Choose from a wide range of technology stacks:
Stack | SDKs/Versions | Architectures |
---|---|---|
Laravel | 8, 9, 10, 11 | Standard, DDD, Hexagonal |
Next.js | 12, 13, 14, 15 | App Router, Pages Router |
Angular | 12, 13, 14, 15, 16, 17, 18 | Standard, Standalone, Micro-frontends |
React | 16, 17, 18, 19 | Standard, Hooks, Concurrent |
Vue.js | 2, 3 | Options API, Composition API, Nuxt |
Astro | 3, 4 | Static, SSR, Hybrid |
React Native | 0.70, 0.71, 0.72, 0.73, 0.74 | Standard, Expo |
NestJS | 8, 9, 10 | Standard, Microservices, GraphQL |
Go | 1.20, 1.21, 1.22 | Standard, DDD, Hexagonal |
Django | 4, 5 | MVT, API, Full-Stack |
FastAPI | 0.100+ | Standard, Async, Microservices |
Express.js | 4 | Standard, REST, GraphQL |
Spring Boot | 2, 3 | Standard, Reactive, Microservices |
π MCP (Model Context Protocol) | Python, TypeScript, Java, Kotlin, C#, Swift | Server, Client, Toolkit |
π Pampa | Latest | Standard |
MCP is an open standard that enables AI applications to securely connect to data sources. Our rules kit includes comprehensive implementation guides for all major SDKs:
- π Architecture Concepts: Core MCP patterns and best practices
- π Python SDK: Async/await patterns with Pydantic validation
- π¦ TypeScript SDK: Type-safe implementations with modern JS patterns
- β Java SDK: Enterprise patterns with Spring Boot integration
- π― Kotlin SDK: Coroutines and advanced async features
- π· C# SDK: .NET patterns with dependency injection
- π Swift SDK: Actors and async/await with Vapor integration
Pampa is our own AI-powered semantic code search tool designed specifically for AI agents:
- π Semantic Search: Understand code meaning, not just syntax
- π€ AI Agent Optimized: Built specifically for AI agent workflows
- π Multi-Language: Python, TypeScript, Java, Go, PHP, and more
- π Simple Setup: No versions, no complex config - just install and use
- π MCP Integration: Built-in MCP server for seamless AI integration
Perfect for AI agents to quickly understand and navigate any codebase!
- π― Multi-Stack Support: 15+ frameworks including Laravel, Next.js, React, Angular, Vue, and more
- ποΈ Architecture-Aware: Specialized rules for different architectural patterns (MVC, DDD, Hexagonal, etc.)
- π¦ Version Detection: Automatic framework version detection with version-specific optimizations
- π Global Best Practices: Universal coding standards and quality assurance rules
- π§ MCP Tools Integration: Multi-select support for popular Model Context Protocol tools (PAMPA, GitHub, Memory, Filesystem, Git)
- β‘ Performance Optimized: Efficient rule generation with progress tracking and memory management
- π Smart Updates: Backup existing rules and merge configurations intelligently
- π¨ Beautiful CLI: Interactive interface with helpful prompts and clear feedback