@rigstate/rules-engine
v0.6.0
Published
The universal rules generation engine for Rigstate. This package centralizes the logic for creating context-aware rules for various AI-powered IDEs (Cursor, Windsurf, VS Code, etc.).
Downloads
271
Readme
@rigstate/rules-engine
The universal rules generation engine for Rigstate. This package centralizes the logic for creating context-aware rules for various AI-powered IDEs (Cursor, Windsurf, VS Code, etc.).
🚀 Features
- Multi-Agent Identity: Generates instructions for specialized AI agents (The Nordic Trinity).
- Guardian Rules: Enforces architectural constraints like file size limits and type safety.
- Roadmap Injection: Dynamically injects the current active roadmap step into rules.
- Stack DNA: Applies tech-stack specific constraints.
- Multi-IDE Support: Supports different rule formats and filenames (.cursorrules, .windsurfrules, etc.).
- Strict Tool Ownership: Binds MCP tools to specific Agent IDs for persona consistency.
📦 Usage
import { generateRuleContent, fetchLegacyStats, fetchActiveAgents } from '@rigstate/rules-engine';
const rules = generateRuleContent(
project,
techStackList,
roadmapChunks,
'cursor', // preference
legacyStats,
activeAgents
);🏗️ Architecture
This package is designed to be environment-agnostic. It can be used in:
- Next.js Web App: For rule previews and GitHub synchronization.
- MCP Server: For real-time rule delivery directly to the IDE.
- CLI: for local rule validation.
🛡️ License
MIT
