ssot-rule-engine-template
Cursor AI SSOT & Rule Engine Template: A comprehensive framework for integrating Cursor AI's advanced features into any project. Includes Single Source of Truth (SSOT) tracking, custom project rules, and Model Context Protocol (MCP) with Knowledge Graph for intelligent context management.
Documentation
SSOT-RULE-ENGINE-TEMPLATE
An intelligent AI-powered development framework that combines Single Source of Truth (SSOT) project state management, context-aware Rule Engine, and Model Context Protocol (MCP) integration to create a self-organizing, learning development environment.
๐ฏ Overview
The SSOT-RULE-ENGINE-TEMPLATE transforms your development workflow by providing:
- ๐ง Persistent AI Memory: Knowledge Graph-based project understanding that grows over time
- ๐ Centralized State Management: Single Source of Truth for all project information
- ๐๏ธ Context-Aware AI Behavior: Dynamic rule system that adapts to your project needs
- ๐ง Advanced AI Capabilities: Specialized MCP servers for enhanced reasoning and analysis
- ๐ Intelligent Project Tracking: Automated progress monitoring and documentation
- ๐ Advanced Analytics: Real-time project health monitoring and performance insights
โจ Key Features
๐๏ธ SSOT (Single Source of Truth) System
- Centralized project state in `.cursor/CORE/SSOT/`
- Automated project history and progress tracking
- Intelligent workflow orchestration via trigger system
- Project portability with snapshot/restore capabilities
๐ฏ Rule Engine
- Context-aware AI behavior through `.mdc` files
- Global and file-specific rule application
- Automated rule generation and staging
- Consistent development standards enforcement
๐ MCP Integration
- Knowledge Graph Server: Persistent entity-relationship project modeling
- Sequential Thinking Server: Multi-step reasoning and problem solving
- Filesystem Server: Enhanced file system operations and analysis
๐ Intelligent Workflows
- Automated project initialization and analysis
- Smart codebase understanding and documentation
- GitHub preparation and repository optimization
- Comprehensive testing and quality assurance
๐ Advanced Analytics System
- Real-time project health scoring (0-100 scale)
- Interactive web dashboard with live visualizations
- Multi-dimensional analysis (SSOT, MCP, Rules, Project structure)
- Intelligent recommendations engine with priority suggestions
- Development velocity tracking and trend analysis
- System performance monitoring and optimization insights
๐ Quick Start
Prerequisites
- Node.js (v16 or higher)
- npm or yarn
- Cursor IDE with AI capabilities
Installation
For New Projects
1. Describe Your Project in Cursor chat, then initialize:
!!-INIT-.ENGINE-!!2. Install MCP Servers:
!!-INSTALL-MCP-!!3. Build Knowledge Graph:
!!-BUILD-KG-!!For Existing Projects
1. Analyze Existing Codebase:
!!-ADD-.ENGINE-!!2. Install MCP Servers:
!!-INSTALL-MCP-!!3. Build Knowledge Graph:
!!-BUILD-KG-!!๐ฎ Core Commands
| Command | Purpose | When to Use |
|---|---|---|
| `!!-INIT-.ENGINE-!!` | Initialize new project *(auto-launches dashboard)* | After providing project description |
| `!!-ADD-.ENGINE-!!` | Add to existing project *(auto-launches dashboard)* | For existing codebases |
| `!!-INSTALL-MCP-!!` | Install MCP servers | After INIT or ADD |
| `!!-BUILD-KG-!!` | Build Knowledge Graph | After MCP installation |
| `!!-LAUNCH-DASHBOARD-!!` | Launch analytics dashboard with visual rule engine | Manual dashboard launch anytime |
| `!!-ANALYZE-PROJECT-!!` | Run comprehensive project analysis | For detailed health scoring |
| `!!-VIEW-DASHBOARD-!!` | Open analytics dashboard in browser | Quick dashboard access |
| `!!-HEALTH-CHECK-!!` | Quick system assessment | For rapid status overview |
| `!!-UPDATE-SSOT-!!` | Sync project state | After significant changes |
| `!!-CREATE-PORTABLE-!!` | Create project snapshot | For backup/transfer |
| `!!-LOAD-PORTABLE-!!` | Load project snapshot | To restore state |
| `!!-UPDATE-DOCS-!!` | Update documentation | For doc synchronization |
| `!!-PREPARE-GITHUB-!!` | Prepare for GitHub | Before repository upload |
๐ Project Structure
.cursor/
โโโ CORE/
โ โโโ SSOT/ # Single Source of Truth files
โ โ โโโ .ENGINE # Central workflow orchestrator
โ โ โโโ .INIT # Project initialization
โ โ โโโ .CONTEXT # High-level overview
โ โ โโโ .FACTS # Technical decisions
โ โ โโโ .MEMORY # Component summaries
โ โ โโโ .HISTORY # Activity log
โ โ โโโ .CONTINUE # Next steps
โ โ โโโ .PROGRESS # Task tracking
โ โโโ MCP/ # MCP server implementations
โ โ โโโ knowledge-graph/ # Graph database server
โ โ โโโ sequentialthinking/ # Reasoning server
โ โ โโโ filesystem/ # File operations server
โ โโโ RULE-ENGINE/ # Generated rules staging
โ โโโ MEMORY/ # Persistent memory storage
โ โโโ PROMPTS/ # System prompts
โ โโโ ANALYTICS/ # Analytics engine and dashboard
โ โ โโโ analytics_engine.py # Project health analysis
โ โ โโโ dashboard.py # Web dashboard with visual rule engine
โ โ โโโ startup.py # Dashboard auto-launch script
โ โ โโโ USER-RULES-TEMPLATE.md # Template for easy USER-RULES setup
โ โ โโโ dashboard/ # Generated dashboard files
โ โโโ DOCS/ # Documentation
โโโ rules/ # Active rule files
โโโ mcp.json # MCP configuration
โโโ launch-dashboard.py # Quick dashboard launcher๐ง Configuration
MCP Servers Configuration
The template includes three pre-configured MCP servers:
1. Knowledge Graph Server - Persistent project memory
2. Sequential Thinking Server - Advanced reasoning capabilities
3. Filesystem Server - Enhanced file operations
Configuration is handled automatically through the trigger system.
Rule Engine Configuration
Rules are defined in `.mdc` files with frontmatter:
---
description: Rule description
globs: **/*.js, **/*.ts
alwaysApply: false
---
# Rule Content
Your guidelines and instructions...๐ Example Use Cases
Web Application Development
# Describe your Flask/Django/Express app, then:
!!-INIT-.ENGINE-!!
!!-INSTALL-MCP-!!
!!-BUILD-KG-!!Existing Codebase Integration
# For any existing project:
!!-ADD-.ENGINE-!!
!!-INSTALL-MCP-!!
!!-BUILD-KG-!!Team Collaboration
# Create portable state for sharing:
!!-CREATE-PORTABLE-!!
# Team member loads state:
!!-LOAD-PORTABLE-!!Project Analytics & Monitoring
# Quick health assessment:
!!-HEALTH-CHECK-!!
# Comprehensive analysis:
!!-ANALYZE-PROJECT-!!
# Launch interactive dashboard with visual rule engine:
!!-LAUNCH-DASHBOARD-!!
# Open dashboard in browser (if already running):
!!-VIEW-DASHBOARD-!!
# Manual launch options:
python launch-dashboard.py # Quick launcher from project root
python .cursor/CORE/ANALYTICS/startup.py # Direct startup scriptDashboard Features:
- ๐ Analytics Tab: Real-time health scoring and project metrics
- โ๏ธ Rule Engine Tab: Visual rule management interface
- ๐ USER-RULES Tab: Template copying for easy setup
- ๐๏ธ SSOT Tab: System state monitoring and file inspection
๐ฏ Benefits
For Developers
- Persistent Context: AI remembers your project across sessions
- Intelligent Assistance: Context-aware suggestions and code generation
- Automated Documentation: Self-updating project documentation
- Quality Assurance: Consistent coding standards and best practices
For Teams
- Knowledge Sharing: Easy context transfer between team members
- Onboarding: New developers quickly understand project structure
- Standards Enforcement: Consistent development patterns across team
- Progress Tracking: Comprehensive project history and progress monitoring
For Projects
- Reduced Technical Debt: Continuous quality monitoring and improvement
- Better Architecture: AI-guided architectural decisions and refactoring
- Enhanced Testing: Intelligent test generation and coverage analysis
- Documentation: Always up-to-date project documentation
- Health Monitoring: Real-time project health scoring and trend analysis
- Performance Insights: Actionable recommendations for optimization
- Visual Analytics: Interactive dashboards for comprehensive project oversight
๐ Advanced Features
Knowledge Graph Queries
The system builds a comprehensive knowledge graph of your project:
- Entities: Files, functions, classes, modules, configurations
- Relationships: Dependencies, calls, implementations, contains
- Observations: Comments, metrics, patterns, decisions
Advanced Analytics Dashboard
Real-time project monitoring and insights:
- Health Scoring: Comprehensive 0-100 scale project health assessment
- System Analysis: SSOT (30%), MCP (30%), Rules (25%), General (15%) breakdown
- Interactive Visualizations: Charts, graphs, and real-time data displays
- Intelligent Recommendations: Priority-based suggestions for improvement
- Development Velocity: Activity tracking and productivity metrics
- Web Interface: Responsive dashboard with auto-refresh capabilities
# Launch analytics dashboard
cd .cursor/CORE/ANALYTICS
python dashboard.py # Opens browser automatically
# Generate static reports
python analytics_engine.py # Creates JSON and Markdown reportsProject Portability
Create and restore complete project snapshots:
- Full SSOT state preservation
- Knowledge Graph backup/restore
- Rule configuration transfer
- Cross-environment compatibility
GitHub Integration
Automated repository preparation:
- Intelligent `.gitignore` generation
- Documentation synchronization
- Code quality checks
- Release preparation
๐ ๏ธ Troubleshooting
MCP Server Issues
# Check MCP server status
npm run build # In each MCP server directory
# Restart servers
# Restart Cursor IDESSOT Synchronization
# Update SSOT after major changes
!!-UPDATE-SSOT-!!
# Rebuild Knowledge Graph if needed
!!-BUILD-KG-!!Rule Engine Problems
- Check `.mdc` file syntax in `rules/` directory
- Verify glob patterns match intended files
- Review rule staging in `CORE/RULE-ENGINE/`
Analytics Dashboard Issues
# Generate dashboard without starting server
cd .cursor/CORE/ANALYTICS
python dashboard.py --generate-only
# Start dashboard on custom port
python dashboard.py --port 8080 --no-browser
# Run analytics analysis only
python analytics_engine.py๐ค Contributing
1. Fork the repository
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
3. Use the SSOT system for development tracking
4. Update documentation using `!!-UPDATE-DOCS-!!`
5. Prepare for submission with `!!-PREPARE-GITHUB-!!`
6. Submit a Pull Request
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Acknowledgments
- Model Context Protocol (MCP) - For the foundational server architecture
- Cursor AI - For the intelligent IDE integration
- Anthropic - For advanced AI reasoning capabilities
๐ Support
- Documentation: See `DOCS/Comprehensive Documentation.md`
- Issues: Report issues through GitHub Issues
- Discussions: Use GitHub Discussions for questions and ideas
๐บ๏ธ Roadmap
- [ ] Visual Knowledge Graph explorer
- [x] Advanced analytics and metrics
- [ ] Integration with popular development tools
- [ ] Multi-language support expansion
- [ ] Cloud-based Knowledge Graph synchronization
- [ ] Machine learning-based project predictions
- [ ] Team collaboration analytics
- [ ] CI/CD pipeline integration
Start building smarter with AI-powered development today! ๐
Frequently asked questions
What is ssot-rule-engine-template?
ssot-rule-engine-template is Cursor AI SSOT & Rule Engine Template: A comprehensive framework for integrating Cursor AI's advanced features into any project. Includes Single Source of Truth (SSOT) tracking, custom project rules, and Model Context Protocol (MCP) with Knowledge Graph for intelligent context management.
How do I install ssot-rule-engine-template?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is ssot-rule-engine-template open source?
Yes โ it is hosted on GitHub at https://github.com/Diadems666/SSOT-RULE-ENGINE-TEMPLATE and has 1 stars.
Related MCP tools
AWS MCP Servers โ helping you get the most out of AWS, wherever you use MCP. Python-based implementation. Trusted by 6900+ developers.
A simple, secure MCP-to-OpenAPI proxy server Python-based implementation. Trusted by 3500+ developers. Trusted by 3500+ developers.
Cut AI token costs 95%+ on code exploration. The leading MCP server for precise, symbol-level GitHub code retrieval via tree-sitter AST. Works with Claude Code, Cursor & any MCP client. 313B+ tokens saved.
Official MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Give your AI agents persistent, collective memory โ with deduplicating absorb, supersession lineage, semantic search, and a graph UI. Speaks MCP.
Cognee is the open-source AI memory platform for agents. Give your AI agents persistent long-term memory across sessions with a self-hosted knowledge graph engine.
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP