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.
- package/README.md +48 -104
- 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
|
-
|
|
7
|
+
Directory-based AI governance for development teams.
|
|
8
8
|
|
|
9
9
|
[](https://go.dev)
|
|
10
10
|
[](https://www.npmjs.com/package/ai-rulez)
|
|
@@ -15,142 +15,86 @@
|
|
|
15
15
|
|
|
16
16
|
---
|
|
17
17
|
|
|
18
|
-
##
|
|
18
|
+
## What is ai-rulez?
|
|
19
19
|
|
|
20
|
-
-
|
|
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
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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
|
-
##
|
|
32
|
+
## Installation
|
|
32
33
|
|
|
33
|
-
|
|
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
|
-
|
|
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
|
-
|
|
53
|
-
|
|
41
|
+
**uv:**
|
|
54
42
|
```bash
|
|
55
|
-
|
|
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
|
-
###
|
|
46
|
+
### Global Installation
|
|
64
47
|
|
|
48
|
+
**Homebrew (macOS/Linux):**
|
|
65
49
|
```bash
|
|
66
|
-
|
|
67
|
-
npx ai-rulez@latest init --setup-hooks
|
|
50
|
+
brew install goldziher/tap/ai-rulez
|
|
68
51
|
```
|
|
69
52
|
|
|
70
|
-
|
|
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
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
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
|
-
|
|
99
|
-
|
|
100
|
-
|
|
63
|
+
**uv (Python):**
|
|
64
|
+
```bash
|
|
65
|
+
uv tool install ai-rulez
|
|
66
|
+
```
|
|
101
67
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
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
|
-
##
|
|
75
|
+
## Quick Example
|
|
112
76
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
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
|
-
|
|
81
|
+
# Add a rule
|
|
82
|
+
ai-rulez add rule coding-standards --priority high
|
|
128
83
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
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
|
-
|
|
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
|
|
92
|
+
## Learn More
|
|
145
93
|
|
|
146
|
-
|
|
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
|
|
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": "
|
|
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",
|