ai-rulez 2.4.3 → 3.0.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 +48 -104
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,10 +1,10 @@
1
- # ai-rulez
1
+ # ai-rulez
2
2
 
3
3
  <p align="center">
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
- **AI-powered development governance. One config to rule them all.**
7
+ Directory-based AI governance for development teams.
8
8
 
9
9
  [![Go Version](https://img.shields.io/badge/Go-1.24%2B-00ADD8)](https://go.dev)
10
10
  [![NPM Version](https://img.shields.io/npm/v/ai-rulez)](https://www.npmjs.com/package/ai-rulez)
@@ -15,142 +15,86 @@
15
15
 
16
16
  ---
17
17
 
18
- ## Why ai-rulez
18
+ ## What is ai-rulez?
19
19
 
20
- - One YAML file stays in sync with every AI assistant format (`CLAUDE.md`, `.cursorrules`, `.windsurfrules`, MCP configs, and more).
21
- - AI agents enforce your rules in real time with optional auto-fix and review loops.
22
- - Git hooks, CI, and MCP integrations keep governance in every stage of your workflow.
23
- - Works for individuals and teams with presets, remote includes, and monorepo support.
20
+ ai-rulez organizes your AI assistant rules, context, and domain-specific guidance in a single `.ai-rulez/` directory. Write once, generate native configurations for Claude, Cursor, Windsurf, Copilot, Gemini, and more.
24
21
 
25
- <p align="center">
26
- <img src="docs/assets/ai-rulez-python-demo.gif" alt="AI-Rulez Configuration Demo" width="90%">
27
- </p>
22
+ **Key features:**
23
+ - **Directory-based** – One `.ai-rulez/` directory for all your AI tooling
24
+ - **Multi-tool generation** – Generate configs for all major AI assistants from one source
25
+ - **Domain separation** – Organize rules by backend, frontend, QA, or any domain
26
+ - **Profiles** – Define profiles for different teams or use cases
27
+ - **Includes** – Compose from local packages or Git repositories
28
+ - **CRUD operations** – Manage configuration programmatically via CLI or MCP
28
29
 
29
30
  ---
30
31
 
31
- ## What You Get
32
+ ## Installation
32
33
 
33
- - **Universal configuration management** – `ai-rulez` analyzes your repo and generates native configuration files for every assistant.
34
- - **AI-powered enforcement** – Run `ai-rulez enforce` to catch violations, apply fixes, and gate merges with configurable quality thresholds.
35
- - **Automation built-in** – Smart `.gitignore` updates, Git hook integration (lefthook, pre-commit, husky), and CI ready commands.
36
- - **MCP everywhere** – Automatically wire MCP servers into Claude CLI, Gemini CLI, Cursor, and other supported tools.
37
-
38
- ---
39
-
40
- ## Quick Start
41
-
42
- ### Configuration Management
34
+ ### Quick Start (No Installation)
43
35
 
36
+ **npm:**
44
37
  ```bash
45
- # Analyze your project and scaffold configuration
46
- npx ai-rulez@latest init "My Project" --preset popular
47
-
48
- # Generate all assistant configuration files
49
- npx ai-rulez@latest generate
38
+ npx ai-rulez@latest init "My Project"
50
39
  ```
51
40
 
52
- ### Rule Enforcement
53
-
41
+ **uv:**
54
42
  ```bash
55
- # Check for violations (read-only)
56
- uvx ai-rulez@latest enforce --agent claude
57
-
58
- # Apply fixes or run multi-agent reviews
59
- uvx ai-rulez@latest enforce --agent claude --fix
60
- uvx ai-rulez@latest enforce --agent gemini --review --review-iterations 2
43
+ uvx ai-rulez init "My Project"
61
44
  ```
62
45
 
63
- ### Optional: Auto-Configure Git Hooks
46
+ ### Global Installation
64
47
 
48
+ **Homebrew (macOS/Linux):**
65
49
  ```bash
66
- # Detect pre-commit, lefthook, or husky and add ai-rulez validation
67
- npx ai-rulez@latest init --setup-hooks
50
+ brew install goldziher/tap/ai-rulez
68
51
  ```
69
52
 
70
- `--setup-hooks` adds the official hooks for the detected system and keeps existing configuration intact.
71
-
72
- ---
73
-
74
- ## Example `ai-rulez.yaml`
75
-
76
- ```yaml
77
- $schema: https://github.com/Goldziher/ai-rulez/schema/ai-rules-v2.schema.json
78
-
79
- metadata:
80
- name: "My SaaS Platform"
81
-
82
- presets:
83
- - "popular" # Claude, Cursor, Windsurf, Copilot, Gemini
84
-
85
- rules:
86
- - name: "Go Code Standards"
87
- priority: high
88
- content: "Follow standard Go project layout and export only what is necessary."
53
+ **Go:**
54
+ ```bash
55
+ go install github.com/Goldziher/ai-rulez/cmd@latest
56
+ ```
89
57
 
90
- sections:
91
- - name: "Project Structure"
92
- priority: critical
93
- content: |
94
- - `cmd/`: Main application entry point
95
- - `internal/`: Private application code
96
- - `pkg/`: Public-facing libraries
58
+ **npm (Node.js):**
59
+ ```bash
60
+ npm install -g ai-rulez
61
+ ```
97
62
 
98
- agents:
99
- - name: "go-developer"
100
- description: "Expert Go developer focused on idiomatic code and tests."
63
+ **uv (Python):**
64
+ ```bash
65
+ uv tool install ai-rulez
66
+ ```
101
67
 
102
- mcp_servers:
103
- - name: "ai-rulez"
104
- command: "npx"
105
- args: ["-y", "ai-rulez@latest", "mcp"]
106
- description: "Configuration management server"
68
+ **pip (Python):**
69
+ ```bash
70
+ pip install ai-rulez
107
71
  ```
108
72
 
109
73
  ---
110
74
 
111
- ## Installation Options
75
+ ## Quick Example
112
76
 
113
- - **No install required**
114
- - `npx ai-rulez@latest ...` for Node/JS environments
115
- - `uvx ai-rulez@latest ...` for Python users
116
- - `go run github.com/Goldziher/ai-rulez/cmd@latest ...` for Go projects
117
- - **Global installs**
118
- - `brew install goldziher/tap/ai-rulez`
119
- - `npm install -g ai-rulez`
120
- - `pip install ai-rulez`
121
- - `go install github.com/Goldziher/ai-rulez/cmd@latest`
122
-
123
- ---
124
-
125
- ## Git Hooks & Automation
77
+ ```bash
78
+ # Initialize a new project
79
+ ai-rulez init "My Project" --preset claude
126
80
 
127
- - **Official pre-commit hooks**
81
+ # Add a rule
82
+ ai-rulez add rule coding-standards --priority high
128
83
 
129
- ```yaml
130
- repos:
131
- - repo: https://github.com/Goldziher/ai-rulez
132
- rev: v2.4.3
133
- hooks:
134
- - id: ai-rulez-validate
135
- - id: ai-rulez-generate
136
- ```
84
+ # Generate configs for all tools
85
+ ai-rulez generate
86
+ ```
137
87
 
138
- - **CLI hook setup** Run `ai-rulez init --setup-hooks` to auto-configure pre-commit, lefthook, or husky if they are present in your repo.
139
- - **No-Go requirement** – Hooks use `scripts/pre-commit/run-ai-rulez.sh`, which fetches the correct prebuilt binary on-demand (override with `AI_RULEZ_BINARY` if you already have one installed).
140
- - **CI/CD examples** – See the [Enforcement guide](https://goldziher.github.io/ai-rulez/enforcement/) for GitHub Actions, pipeline tips, and advanced workflows.
88
+ This creates `CLAUDE.md`, `.cursorrules`, and other native configs from your `.ai-rulez/` directory.
141
89
 
142
90
  ---
143
91
 
144
- ## More to Explore
92
+ ## Learn More
145
93
 
146
- - [Quick Start](https://goldziher.github.io/ai-rulez/quick-start/) – Guided setup in minutes.
147
- - [CLI Reference](https://goldziher.github.io/ai-rulez/cli/) – All commands and flags.
148
- - [Configuration Guide](https://goldziher.github.io/ai-rulez/configuration/) – Advanced YAML features, includes, and presets.
149
- - [Enforcement Guide](https://goldziher.github.io/ai-rulez/enforcement/) – Multi-agent reviews, automation, and reporting.
150
- - [Migration Guide](https://goldziher.github.io/ai-rulez/migration-guide/) – Upgrading from v1.x.
94
+ **[Full Documentation →](https://goldziher.github.io/ai-rulez/)**
151
95
 
152
96
  ---
153
97
 
154
98
  ## Contributing
155
99
 
156
- We welcome contributions! Read the [CONTRIBUTING.md](CONTRIBUTING.md) for development setup, coding standards, and release process details.
100
+ We welcome contributions! Read [CONTRIBUTING.md](CONTRIBUTING.md) for development setup and guidelines.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-rulez",
3
- "version": "2.4.3",
3
+ "version": "3.0.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",