ai-rulez 2.3.0 → 2.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +218 -75
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,30 +4,45 @@
|
|
|
4
4
|
<img src="https://raw.githubusercontent.com/Goldziher/ai-rulez/main/docs/assets/logo.png" alt="ai-rulez logo" width="200" style="border-radius: 15%; overflow: hidden;">
|
|
5
5
|
</p>
|
|
6
6
|
|
|
7
|
-
**One config to rule them all.**
|
|
7
|
+
**AI-powered development governance. One config to rule them all.**
|
|
8
8
|
|
|
9
|
-
## The
|
|
9
|
+
## The Complete AI Development Platform
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
AI-Rulez is the **definitive platform for AI-powered development governance**. Beyond just generating configuration files, it provides real-time rule enforcement, automated code quality assurance, and intelligent governance across your entire development workflow.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
### 🚀 Two Powerful Capabilities
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
**1. Universal Configuration Management** - Write once, deploy everywhere
|
|
16
|
+
**2. AI-Powered Rule Enforcement** - Real-time governance with automated fixes
|
|
16
17
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
## Why AI-Rulez?
|
|
19
|
+
|
|
20
|
+
Modern development teams need more than just configuration management:
|
|
20
21
|
|
|
21
|
-
|
|
22
|
+
### ⚠️ **The Problem**
|
|
23
|
+
- **Configuration Hell**: Each AI tool needs its own format (`.cursorrules`, `CLAUDE.md`, `.windsurfrules`, etc.)
|
|
24
|
+
- **Rule Enforcement Gap**: No way to automatically validate that code follows your standards
|
|
25
|
+
- **Team Inconsistency**: Different developers get different AI guidance
|
|
26
|
+
- **Manual Quality Control**: Time-consuming code reviews for basic rule violations
|
|
27
|
+
- **Reactive Governance**: Finding issues after they're already committed
|
|
22
28
|
|
|
23
|
-
|
|
24
|
-
- **
|
|
25
|
-
- **
|
|
26
|
-
- **
|
|
27
|
-
- **
|
|
28
|
-
- **
|
|
29
|
+
### ✨ **The Solution**
|
|
30
|
+
AI-Rulez provides **proactive development governance** with a single `ai-rulez.yaml` that:
|
|
31
|
+
- **Generates configurations** for every AI tool automatically
|
|
32
|
+
- **Enforces rules in real-time** using AI agents (Claude, Gemini, etc.)
|
|
33
|
+
- **Applies automatic fixes** for code quality issues
|
|
34
|
+
- **Integrates with your workflow** (Git hooks, CI/CD, pre-commit)
|
|
35
|
+
- **Scales across teams** with consistent standards
|
|
36
|
+
|
|
37
|
+
<p align="center">
|
|
38
|
+
<img src="docs/assets/ai-rulez-python-demo.gif" alt="AI-Rulez Configuration Demo" width="100%">
|
|
39
|
+
<br><em>📝 Configuration Management (via npx ai-rulez)</em>
|
|
40
|
+
</p>
|
|
29
41
|
|
|
30
|
-
|
|
42
|
+
<p align="center">
|
|
43
|
+
<img src="docs/assets/ai-rulez-enforce-demo.gif" alt="AI-Rulez Enforcement Demo" width="100%">
|
|
44
|
+
<br><em>🤖 AI-Powered Rule Enforcement (via uvx ai-rulez@latest)</em>
|
|
45
|
+
</p>
|
|
31
46
|
|
|
32
47
|
[](https://go.dev)
|
|
33
48
|
[](https://www.npmjs.com/package/ai-rulez)
|
|
@@ -38,40 +53,58 @@ AI-Rulez solves this with a single `ai-rulez.yaml` that understands your project
|
|
|
38
53
|
|
|
39
54
|
---
|
|
40
55
|
|
|
41
|
-
##
|
|
56
|
+
## 🚀 Core Capabilities
|
|
42
57
|
|
|
43
|
-
###
|
|
44
|
-
|
|
58
|
+
### 1. 📋 Universal Configuration Management
|
|
59
|
+
|
|
60
|
+
Write once, deploy everywhere with intelligent AI-powered project analysis:
|
|
45
61
|
|
|
46
62
|
```bash
|
|
47
63
|
# AI analyzes your codebase and generates tailored config
|
|
48
|
-
npx ai-rulez init "My Project" --preset popular
|
|
64
|
+
npx ai-rulez init "My Project" --preset popular
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
**Features:**
|
|
68
|
+
- **AI Project Analysis**: Automatically detects your tech stack, patterns, and conventions
|
|
69
|
+
- **Universal Output Generation**: One YAML → all AI tool formats (`CLAUDE.md`, `.cursorrules`, `.windsurfrules`, etc.)
|
|
70
|
+
- **Smart Gitignore Management**: Automatically excludes generated files from version control
|
|
71
|
+
- **MCP Integration**: Auto-configure MCP servers across CLI tools (Claude, Gemini, etc.)
|
|
72
|
+
- **Team Collaboration**: Remote includes, local overrides, monorepo support
|
|
73
|
+
|
|
74
|
+
### 2. 🤖 AI-Powered Rule Enforcement
|
|
75
|
+
|
|
76
|
+
Real-time governance with automated fixes using multiple AI agents:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
# Check for violations with AI analysis
|
|
80
|
+
uvx ai-rulez@latest enforce --agent claude
|
|
81
|
+
|
|
82
|
+
# Automatically apply fixes
|
|
83
|
+
uvx ai-rulez@latest enforce --agent claude --fix
|
|
84
|
+
|
|
85
|
+
# Multi-agent review workflow
|
|
86
|
+
uvx ai-rulez@latest enforce --agent gemini --review --review-agent claude
|
|
49
87
|
```
|
|
50
88
|
|
|
51
|
-
|
|
52
|
-
-
|
|
53
|
-
-
|
|
54
|
-
-
|
|
55
|
-
-
|
|
56
|
-
- **
|
|
57
|
-
|
|
58
|
-
### Universal Output Generation
|
|
59
|
-
One YAML config generates files for every tool:
|
|
60
|
-
- `CLAUDE.md` for Claude Code
|
|
61
|
-
- `.cursorrules` for Cursor
|
|
62
|
-
- `.windsurfrules` for Windsurf
|
|
63
|
-
- `.github/copilot-instructions.md` for GitHub Copilot
|
|
64
|
-
- Custom formats for any future AI tool
|
|
65
|
-
|
|
66
|
-
### Powerful Enterprise Features
|
|
67
|
-
- **MCP Integration:** Automatically configure MCP servers across CLI tools (Claude, Gemini) and generate config files for others (Cursor, VS Code). One configuration, every tool connected.
|
|
68
|
-
- **Team Collaboration:** Remote config includes, local overrides, and monorepo support with `--recursive`
|
|
69
|
-
- **Full-Featured CLI:** Manage your entire configuration from the command line. Add rules, update agents, and generate files without ever opening a YAML file.
|
|
70
|
-
- **Security & Performance:** SSRF protection, schema validation, Go-based performance with instant startup
|
|
89
|
+
**Features:**
|
|
90
|
+
- **Multi-Agent Support**: Claude, Gemini, AMP, Cursor, Codex, Continue.dev, Junie
|
|
91
|
+
- **Automated Fixes**: AI suggests and applies code improvements
|
|
92
|
+
- **Review Workflows**: Iterative improvement with quality thresholds
|
|
93
|
+
- **Multiple Output Formats**: Table, JSON, CSV, summary reports
|
|
94
|
+
- **CI/CD Integration**: Git hooks, pre-commit, workflow automation
|
|
95
|
+
- **Quality Scoring**: 0-100% compliance with configurable thresholds
|
|
71
96
|
|
|
72
97
|
## How It Works
|
|
73
98
|
|
|
74
|
-
|
|
99
|
+
AI-Rulez operates as a **comprehensive AI development governance platform**:
|
|
100
|
+
|
|
101
|
+
1. **📝 Configuration Phase**: Your `ai-rulez.yml` serves as the single source of truth
|
|
102
|
+
2. **🏗️ Generation Phase**: Automatically creates native files for every AI tool
|
|
103
|
+
3. **🔍 Enforcement Phase**: AI agents continuously validate code against your rules
|
|
104
|
+
4. **🛠️ Fix Phase**: Automatic corrections and improvements applied in real-time
|
|
105
|
+
5. **📊 Reporting Phase**: Detailed compliance reports and quality metrics
|
|
106
|
+
|
|
107
|
+
Think of it as **CI/CD for code quality** - proactive governance instead of reactive fixes.
|
|
75
108
|
|
|
76
109
|
## Example: `ai-rulez.yml`
|
|
77
110
|
|
|
@@ -107,33 +140,132 @@ agents:
|
|
|
107
140
|
# MCP servers for direct AI tool integration
|
|
108
141
|
mcp_servers:
|
|
109
142
|
- name: "ai-rulez"
|
|
110
|
-
command: "
|
|
111
|
-
args: ["mcp"]
|
|
143
|
+
command: "npx"
|
|
144
|
+
args: ["-y", "ai-rulez@latest", "mcp"]
|
|
112
145
|
description: "AI-Rulez MCP server for configuration management"
|
|
113
146
|
```
|
|
114
147
|
|
|
115
148
|
Run `ai-rulez generate` → get all your configuration files, perfectly synchronized.
|
|
116
149
|
|
|
117
|
-
## Quick Start
|
|
150
|
+
## ⚡ Quick Start
|
|
118
151
|
|
|
152
|
+
### 📋 Configuration Management
|
|
119
153
|
```bash
|
|
120
|
-
# 1. AI-powered
|
|
121
|
-
ai-rulez init "My Project" --preset popular
|
|
154
|
+
# 1. AI-powered project analysis and setup
|
|
155
|
+
npx ai-rulez@latest init "My Project" --preset popular
|
|
122
156
|
|
|
123
|
-
# 2. Generate all AI
|
|
124
|
-
ai-rulez generate
|
|
157
|
+
# 2. Generate all AI tool configuration files
|
|
158
|
+
npx ai-rulez@latest generate
|
|
125
159
|
|
|
126
160
|
# 3. Your AI tools now have comprehensive, project-specific context!
|
|
127
161
|
```
|
|
128
162
|
|
|
129
|
-
|
|
163
|
+
### 🤖 AI-Powered Rule Enforcement
|
|
164
|
+
```bash
|
|
165
|
+
# 1. Check for rule violations
|
|
166
|
+
uvx ai-rulez@latest enforce --agent claude --format table
|
|
167
|
+
|
|
168
|
+
# 2. Get detailed analysis and suggestions
|
|
169
|
+
uvx ai-rulez@latest enforce --agent claude --format json
|
|
170
|
+
|
|
171
|
+
# 3. Apply automatic fixes
|
|
172
|
+
uvx ai-rulez@latest enforce --agent claude --fix
|
|
173
|
+
|
|
174
|
+
# 4. Set up review workflow
|
|
175
|
+
uvx ai-rulez@latest enforce --agent claude --review --review-iterations 2
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
**That's it!** You now have both intelligent configuration management AND real-time rule enforcement powered by AI.
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
## 🗂️ .gitignore Management
|
|
183
|
+
|
|
184
|
+
AI-Rulez manages your `.gitignore` to keep generated files out of version control.
|
|
185
|
+
|
|
186
|
+
**Automatic updates:**
|
|
187
|
+
```bash
|
|
188
|
+
# During init (enabled by default)
|
|
189
|
+
ai-rulez init --preset claude
|
|
190
|
+
|
|
191
|
+
# During generate (optional)
|
|
192
|
+
ai-rulez generate --update-gitignore
|
|
193
|
+
|
|
194
|
+
# Disable if needed
|
|
195
|
+
ai-rulez init --preset popular --no-gitignore
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
**What gets ignored:**
|
|
199
|
+
- Generated markdown files (`CLAUDE.md`, `GEMINI.md`, `AGENTS.md`)
|
|
200
|
+
- AI tool directories (`.claude/`, `.cursor/`, `.windsurf/`, `.clinerules/`, etc.)
|
|
201
|
+
- Config files (`.mcp.json`, `.gemini/settings.json`)
|
|
202
|
+
|
|
203
|
+
All entries are added under `# AI Rules generated files` without duplicates.
|
|
204
|
+
|
|
205
|
+
**Best practice:** Commit `ai-rulez.yaml` and `.gitignore`, but not the generated AI configuration files.
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
## 🤖 AI-Powered Rule Enforcement
|
|
210
|
+
|
|
211
|
+
The killer feature that sets AI-Rulez apart: **real-time rule enforcement using AI agents**. No more manual code reviews for basic violations—let AI catch and fix issues automatically.
|
|
212
|
+
|
|
213
|
+
### ✨ Key Benefits
|
|
214
|
+
|
|
215
|
+
- **Proactive Quality Control**: Catch issues before they reach production
|
|
216
|
+
- **Multi-Agent Support**: Claude, Gemini, AMP, Cursor, Codex—use the best AI for each task
|
|
217
|
+
- **Automatic Fixes**: AI doesn't just find problems, it solves them
|
|
218
|
+
- **Workflow Integration**: Git hooks, CI/CD, pre-commit—enforcement everywhere
|
|
219
|
+
- **Team Consistency**: Same standards for everyone, from junior to senior devs
|
|
220
|
+
|
|
221
|
+
### 🎯 Real-World Use Cases
|
|
222
|
+
|
|
223
|
+
```bash
|
|
224
|
+
# Prevent console.log in production builds
|
|
225
|
+
ai-rulez enforce --agent claude --only-rules "no-console-output" --fix
|
|
226
|
+
|
|
227
|
+
# Ensure all functions have proper error handling
|
|
228
|
+
ai-rulez enforce --agent gemini --level strict --format json
|
|
229
|
+
|
|
230
|
+
# Multi-agent review for critical code changes
|
|
231
|
+
ai-rulez enforce --agent claude --review --review-agent gemini --review-threshold 95
|
|
232
|
+
|
|
233
|
+
# Automated fixes in CI/CD pipeline
|
|
234
|
+
ai-rulez enforce --agent claude --fix --format csv --output violations.csv
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
### 📊 Output Formats & Integration
|
|
238
|
+
|
|
239
|
+
| Format | Use Case | Command |
|
|
240
|
+
|--------|----------|---------|
|
|
241
|
+
| **Table** | Human-readable terminal output | `--format table` |
|
|
242
|
+
| **JSON** | API integration, detailed analysis | `--format json --pretty` |
|
|
243
|
+
| **CSV** | Data analysis, reporting | `--format csv --output report.csv` |
|
|
244
|
+
| **Summary** | Quick overview with scores | `--format summary` |
|
|
245
|
+
|
|
246
|
+
### 🔄 Advanced Workflows
|
|
247
|
+
|
|
248
|
+
**Review Pipeline**: Multi-agent validation with quality gates
|
|
249
|
+
```bash
|
|
250
|
+
ai-rulez enforce --agent claude --review --review-iterations 3 --review-threshold 85
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
**Fix & Verify**: Apply fixes and validate improvements
|
|
254
|
+
```bash
|
|
255
|
+
ai-rulez enforce --agent gemini --fix --review --require-improvement
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
**Team Standards**: Consistent enforcement across the entire codebase
|
|
259
|
+
```bash
|
|
260
|
+
ai-rulez enforce --include-files "src/**/*.{js,ts,py}" --level strict --agent claude
|
|
261
|
+
```
|
|
130
262
|
|
|
131
263
|
**Prefer manual setup?**
|
|
132
264
|
```bash
|
|
133
265
|
# Basic initialization without AI assistance
|
|
134
|
-
ai-rulez init "My Project" --preset popular
|
|
266
|
+
ai-rulez init "My Project" --preset popular --no-agent
|
|
135
267
|
|
|
136
|
-
# Add your project-specific context
|
|
268
|
+
# Add your project-specific context
|
|
137
269
|
ai-rulez add rule "Tech Stack" --priority critical --content "This project uses Go and PostgreSQL."
|
|
138
270
|
|
|
139
271
|
# Generate files
|
|
@@ -142,6 +274,8 @@ ai-rulez generate
|
|
|
142
274
|
|
|
143
275
|
## MCP Server Integration
|
|
144
276
|
|
|
277
|
+
> **New in v2.3.2**: Improved Codex/Gemini agent compatibility, optional agent test gating, and tighter MCP CLI integrations for smoother non-interactive workflows.
|
|
278
|
+
|
|
145
279
|
`ai-rulez` provides seamless **Model Context Protocol (MCP)** integration, automatically configuring both file-based and CLI-based AI tools with your MCP servers.
|
|
146
280
|
|
|
147
281
|
### Automatic CLI Configuration
|
|
@@ -215,8 +349,8 @@ ai-rulez mcp
|
|
|
215
349
|
# Or configure it automatically via your ai-rulez.yaml
|
|
216
350
|
mcp_servers:
|
|
217
351
|
- name: "ai-rulez"
|
|
218
|
-
command: "
|
|
219
|
-
args: ["mcp"]
|
|
352
|
+
command: "npx"
|
|
353
|
+
args: ["-y", "ai-rulez@latest", "mcp"]
|
|
220
354
|
description: "Configuration management server"
|
|
221
355
|
```
|
|
222
356
|
|
|
@@ -224,6 +358,10 @@ mcp_servers:
|
|
|
224
358
|
|
|
225
359
|
AI-Rulez provides **real-time rule enforcement** using AI agents to automatically detect violations and apply fixes across your codebase.
|
|
226
360
|
|
|
361
|
+
<p align="center">
|
|
362
|
+
<img src="docs/assets/ai-rulez-enforce-demo.gif" alt="AI-Rulez Enforcement Demo" width="100%">
|
|
363
|
+
</p>
|
|
364
|
+
|
|
227
365
|
### Basic Enforcement
|
|
228
366
|
|
|
229
367
|
```bash
|
|
@@ -267,6 +405,7 @@ AI-Rulez integrates with all major AI coding assistants:
|
|
|
267
405
|
- **AMP** (`amp`) - Sourcegraph's AI assistant
|
|
268
406
|
- **Codex** (`codex`) - OpenAI's code model
|
|
269
407
|
- **Continue.dev** (`continue-dev`) - Open-source coding assistant
|
|
408
|
+
- **Junie** (`junie`) - JetBrains AI assistant
|
|
270
409
|
|
|
271
410
|
### Enforcement Levels
|
|
272
411
|
|
|
@@ -325,53 +464,57 @@ The AI reviewer analyzes:
|
|
|
325
464
|
- ✅ Overall improvement between iterations
|
|
326
465
|
- ✅ Compliance with project standards
|
|
327
466
|
|
|
328
|
-
## Installation
|
|
467
|
+
## 📦 Installation
|
|
329
468
|
|
|
330
|
-
|
|
469
|
+
Choose your installation method based on your primary use case:
|
|
331
470
|
|
|
332
|
-
|
|
471
|
+
### 🚀 Quick Start (No Installation)
|
|
333
472
|
|
|
334
|
-
**
|
|
473
|
+
**For Configuration Management** (project setup, file generation):
|
|
335
474
|
```bash
|
|
336
|
-
|
|
475
|
+
# Node.js - Best for web/JS projects
|
|
476
|
+
npx ai-rulez@latest init "My Project" --preset popular
|
|
477
|
+
npx ai-rulez@latest generate
|
|
337
478
|
```
|
|
338
479
|
|
|
339
|
-
**
|
|
480
|
+
**For Rule Enforcement** (AI-powered validation):
|
|
340
481
|
```bash
|
|
341
|
-
#
|
|
342
|
-
|
|
482
|
+
# Python - Latest features, fastest updates
|
|
483
|
+
uvx ai-rulez@latest enforce --agent claude --fix
|
|
484
|
+
uvx ai-rulez@latest enforce --agent gemini --review
|
|
343
485
|
```
|
|
344
486
|
|
|
345
|
-
**
|
|
487
|
+
**For Go Projects**:
|
|
346
488
|
```bash
|
|
347
|
-
|
|
348
|
-
uvx ai-rulez init
|
|
489
|
+
go run github.com/Goldziher/ai-rulez/cmd@latest init
|
|
349
490
|
```
|
|
350
491
|
|
|
351
|
-
###
|
|
352
|
-
|
|
353
|
-
For frequent use, a global installation is recommended.
|
|
492
|
+
### 🔧 Global Installation
|
|
354
493
|
|
|
355
|
-
|
|
356
|
-
```bash
|
|
357
|
-
go install github.com/Goldziher/ai-rulez/cmd@latest
|
|
358
|
-
```
|
|
494
|
+
For teams and frequent usage:
|
|
359
495
|
|
|
360
|
-
**Homebrew (macOS/Linux)**
|
|
496
|
+
**Homebrew (Recommended for macOS/Linux)**
|
|
361
497
|
```bash
|
|
362
498
|
brew install goldziher/tap/ai-rulez
|
|
499
|
+
ai-rulez init "My Project"
|
|
500
|
+
ai-rulez enforce --agent claude
|
|
363
501
|
```
|
|
364
502
|
|
|
365
|
-
**npm**
|
|
503
|
+
**npm (Best for Node.js teams)**
|
|
366
504
|
```bash
|
|
367
505
|
npm install -g ai-rulez
|
|
368
506
|
```
|
|
369
507
|
|
|
370
|
-
**pip**
|
|
508
|
+
**pip (Best for Python teams)**
|
|
371
509
|
```bash
|
|
372
510
|
pip install ai-rulez
|
|
373
511
|
```
|
|
374
512
|
|
|
513
|
+
**Go (For Go developers)**
|
|
514
|
+
```bash
|
|
515
|
+
go install github.com/Goldziher/ai-rulez/cmd@latest
|
|
516
|
+
```
|
|
517
|
+
|
|
375
518
|
## Pre-commit Hooks
|
|
376
519
|
|
|
377
520
|
You can use `ai-rulez` with `pre-commit` to automatically validate and generate your AI configuration files.
|
|
@@ -381,7 +524,7 @@ Add the following to your `.pre-commit-config.yaml`:
|
|
|
381
524
|
```yaml
|
|
382
525
|
repos:
|
|
383
526
|
- repo: https://github.com/Goldziher/ai-rulez
|
|
384
|
-
rev: v2.2
|
|
527
|
+
rev: v2.3.2
|
|
385
528
|
hooks:
|
|
386
529
|
- id: ai-rulez-validate
|
|
387
530
|
- id: ai-rulez-generate
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ai-rulez",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.2",
|
|
4
4
|
"description": "⚡ One config to rule them all. Centralized AI assistant configuration management - generate rules for Claude, Cursor, Copilot, Windsurf and more from a single YAML file.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|