ai-rulez 2.2.0 → 2.3.0

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.
Files changed (2) hide show
  1. package/README.md +108 -3
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -8,7 +8,7 @@
8
8
 
9
9
  ## The Problem
10
10
 
11
- If you're using multiple AI coding assistants (Claude Code, Cursor, Windsurf, GitHub Copilot), you've probably noticed the configuration fragmentation. Each tool demands its own format - `CLAUDE.md`, `.cursorrules`, `.windsurfrules`, `.github/copilot-instructions.md`. Keeping coding standards consistent across all these tools is frustrating and error-prone.
11
+ If you're using multiple AI coding assistants (Claude Code, Cursor, Windsurf, GitHub Copilot, OpenCode), you've probably noticed the configuration fragmentation. Each tool demands its own format - `CLAUDE.md`, `.cursorrules`, `.windsurfrules`, `.github/copilot-instructions.md`, `AGENTS.md`. Keeping coding standards consistent across all these tools is frustrating and error-prone.
12
12
 
13
13
  ## The Solution
14
14
 
@@ -84,7 +84,7 @@ metadata:
84
84
 
85
85
  # Use presets for common configurations
86
86
  presets:
87
- - "popular" # Includes Claude, Cursor, Windsurf, and Copilot
87
+ - "popular" # Includes Claude, Cursor, Windsurf, Copilot, and Gemini
88
88
 
89
89
  rules:
90
90
  - name: "Go Code Standards"
@@ -220,6 +220,111 @@ mcp_servers:
220
220
  description: "Configuration management server"
221
221
  ```
222
222
 
223
+ ## AI-Powered Rule Enforcement
224
+
225
+ AI-Rulez provides **real-time rule enforcement** using AI agents to automatically detect violations and apply fixes across your codebase.
226
+
227
+ ### Basic Enforcement
228
+
229
+ ```bash
230
+ # Check for violations (read-only by default)
231
+ ai-rulez enforce
232
+
233
+ # Automatically apply fixes
234
+ ai-rulez enforce --fix
235
+
236
+ # Use specific AI agent
237
+ ai-rulez enforce --agent gemini --fix
238
+ ```
239
+
240
+ ### Advanced Enforcement Options
241
+
242
+ ```bash
243
+ # Enforce with specific level
244
+ ai-rulez enforce --level strict --agent claude
245
+
246
+ # Review workflow with iterative improvement
247
+ ai-rulez enforce --review --review-iterations 3 --review-threshold 85
248
+
249
+ # Multi-agent review (different agents for enforcement vs review)
250
+ ai-rulez enforce --agent gemini --review --review-agent claude
251
+
252
+ # Target specific files and rules
253
+ ai-rulez enforce --include-files "src/**/*.js" --only-rules "no-console-output"
254
+
255
+ # Output formats for automation
256
+ ai-rulez enforce --format json --output violations.json
257
+ ai-rulez enforce --format csv --output report.csv
258
+ ```
259
+
260
+ ### Supported AI Agents
261
+
262
+ AI-Rulez integrates with all major AI coding assistants:
263
+
264
+ - **Claude** (`claude`) - Anthropic's AI assistant
265
+ - **Gemini** (`gemini`) - Google's AI model
266
+ - **Cursor** (`cursor`) - AI-powered code editor
267
+ - **AMP** (`amp`) - Sourcegraph's AI assistant
268
+ - **Codex** (`codex`) - OpenAI's code model
269
+ - **Continue.dev** (`continue-dev`) - Open-source coding assistant
270
+
271
+ ### Enforcement Levels
272
+
273
+ - **`warn`**: Log violations but don't fail (default)
274
+ - **`error`**: Fail on violations but don't auto-fix
275
+ - **`fix`**: Automatically apply suggested fixes
276
+ - **`strict`**: Fail immediately on any violation
277
+
278
+ ### Integration with Git Hooks
279
+
280
+ Add enforcement to your Git workflow:
281
+
282
+ ```yaml
283
+ # .lefthook.yml
284
+ pre-commit:
285
+ commands:
286
+ ai-rulez-enforce:
287
+ run: ai-rulez enforce --level error --agent gemini
288
+ stage_fixed: true
289
+ ```
290
+
291
+ ```bash
292
+ # Or with pre-commit hooks
293
+ # .pre-commit-config.yaml
294
+ repos:
295
+ - repo: local
296
+ hooks:
297
+ - id: ai-rulez-enforce
298
+ name: AI-Rulez Enforcement
299
+ entry: ai-rulez enforce --level error
300
+ language: system
301
+ pass_filenames: false
302
+ ```
303
+
304
+ ### Review Workflow
305
+
306
+ The review system provides iterative code improvement:
307
+
308
+ ```bash
309
+ # Enable review with quality scoring
310
+ ai-rulez enforce --review --review-threshold 80
311
+
312
+ # Multiple review iterations
313
+ ai-rulez enforce --review --review-iterations 5
314
+
315
+ # Auto-approve after reaching threshold
316
+ ai-rulez enforce --review --review-auto-approve
317
+
318
+ # Require improvement between iterations
319
+ ai-rulez enforce --review --require-improvement
320
+ ```
321
+
322
+ The AI reviewer analyzes:
323
+ - ✅ Code quality and adherence to rules
324
+ - ✅ Suggested fixes and their appropriateness
325
+ - ✅ Overall improvement between iterations
326
+ - ✅ Compliance with project standards
327
+
223
328
  ## Installation
224
329
 
225
330
  ### Run without installing
@@ -276,7 +381,7 @@ Add the following to your `.pre-commit-config.yaml`:
276
381
  ```yaml
277
382
  repos:
278
383
  - repo: https://github.com/Goldziher/ai-rulez
279
- rev: v2.1.0
384
+ rev: v2.2.1
280
385
  hooks:
281
386
  - id: ai-rulez-validate
282
387
  - id: ai-rulez-generate
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-rulez",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
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",