Discover and explore top open-source AI tools and projects—updated daily.
fjb040911AI code governance rules engine
Top 35.3% on SourcePulse
Summary
ai-rules is a governance framework designed to combat "Architectural Decay" in AI-driven development. It ensures AI coding agents (such as Cursor, Windsurf, and Copilot) adhere to project-specific boundaries, design patterns, and UI standards. This leads to more consistent AI-generated code from the outset, faster code reviews, and more stable audit and repair workflows.
How It Works
This CLI tool transforms project rules defined in Markdown into structured metadata. It packages engineering standards into local configuration files (.ai-rules.md, rules-config.json, config.json) to generate rule-aware audit and fix prompts for AI agents. This provides AI agents with a project-local operating contract before code reaches review gates, guiding AI development rather than solely protecting the merge boundary.
Quick Start & Requirements
Requires Node.js >= 18. Installation is performed globally via npm install -g ai-law. Key commands include ai-law init to initialize rules within a project, ai-law doctor to validate the setup, ai-law audit to generate prompts for AI analysis, and ai-law fix for generating repair prompts based on AI reports.
Highlighted Details
eval(), weak hashing, and sensitive logging.config.json with pathAliases to accommodate non-standard repository structures without modifying individual rules.regex, import/include, and minimal count rules, while AST and semantic rules remain AI-guided.config.json allows defining thresholds for numeric limits (e.g., maxFunctionLines) and exceptions to suppress known-safe files per rule pattern during local evidence collection.Maintenance & Community
Information regarding maintainers, community channels (e.g., Discord/Slack), or project health signals was not found in the provided README content.
Licensing & Compatibility
The license type and any compatibility notes for commercial use or closed-source linking were not specified in the provided README content.
Limitations & Caveats
ai-rules is not a full static analysis engine; AST and semantic rules are currently AI-guided. The CLI structures context and outputs, but the AI ultimately makes the final audit decision for these higher-level rules. Partial locale support exists for several languages, falling back to English for untranslated elements.
2 days ago
Inactive
cluesmith