ai-rulez 4.0.1 → 4.0.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.
Files changed (2) hide show
  1. package/README.md +73 -257
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  <h1 align="center">ai-rulez</h1>
6
6
 
7
7
  <p align="center">
8
- <strong>Directory-based AI governance for 19+ tools</strong>
8
+ <strong>A complete development workflow for AI coding tools</strong>
9
9
  </p>
10
10
 
11
11
  <p align="center">
@@ -16,327 +16,143 @@
16
16
  <a href="https://goldziher.github.io/ai-rulez/"><img src="https://img.shields.io/badge/docs-ai--rulez-blue" alt="Documentation"></a>
17
17
  </p>
18
18
 
19
- <p align="center">
20
- Define rules, context, skills, agents and commands once — generate native configs for Claude, Cursor, Copilot, Windsurf, Gemini, Codex, and more.
21
- </p>
22
-
23
- ---
24
-
25
- Every AI coding tool wants its own config format. Claude needs `CLAUDE.md` + `.claude/skills/` + `.claude/agents/`, Cursor wants `.cursor/rules/`, Copilot expects `.github/copilot-instructions.md`. Keeping them in sync is tedious and error-prone.
26
-
27
- **ai-rulez** solves this: organize your AI governance in `.ai-rulez/`, run `generate`, and get native configs for all your tools — with proper frontmatter, tool-specific formatting, and full feature support (skills, agents, MCP servers, plugins).
28
-
29
- ```bash
30
- npx ai-rulez@latest init && npx ai-rulez@latest generate
31
- ```
32
-
33
19
  <p align="center">
34
20
  <a href="https://goldziher.github.io/ai-rulez/"><strong>Documentation</strong></a> &middot;
35
21
  <a href="https://goldziher.github.io/ai-rulez/quick-start/"><strong>Quick Start</strong></a> &middot;
36
22
  <a href="https://goldziher.github.io/ai-rulez/examples/"><strong>Examples</strong></a>
37
23
  </p>
38
24
 
39
- ## What You Get
25
+ ---
40
26
 
41
- - **19 preset generators**: Claude, Cursor, Windsurf, Copilot, Gemini, Antigravity, Cline, Continue.dev, Amp, Junie, Codex, OpenCode, and custom presets
42
- - **Commands system**: Define slash commands once, use them across tools that support it
43
- - **Concise builtins**: Optimized builtin rules for minimal token footprint
44
- - **Remote includes**: Pull shared rules from git repos (company standards, team configs)
45
- - **Profile system**: Generate different configs for backend/frontend/QA teams
46
- - **MCP server**: Let AI assistants manage their own rules via Model Context Protocol
47
- - **Plugins & Marketplaces**: Extend ai-rulez with custom generators and install pre-built rulesets from marketplaces
48
- - **Type-safe schemas**: JSON Schema validation for all config files
27
+ ## The Problem
49
28
 
50
- ## Quick Start
29
+ Every AI coding tool wants its own config: Claude needs `CLAUDE.md`, Cursor wants `.cursor/rules/`, Copilot expects `.github/copilot-instructions.md`. Each has different formats, frontmatter, and directory conventions. If you use more than one tool, you're maintaining duplicate rules that inevitably drift apart.
51
30
 
52
- ```bash
53
- # No install required
54
- npx ai-rulez@latest init "My Project"
55
- npx ai-rulez@latest generate
56
- ```
31
+ ## The Solution
57
32
 
58
- This creates:
33
+ Write your rules, context, skills, agents, and commands once in `.ai-rulez/`. Run `generate`. Get native configs for every tool you use.
59
34
 
60
- ```
61
- .ai-rulez/
62
- ├── config.toml # Which tools to generate for
63
- ├── rules/ # Guidelines AI must follow
64
- ├── context/ # Project background info
65
- ├── skills/ # Specialized AI roles
66
- ├── agents/ # Agent-specific prompts
67
- └── commands/ # Slash commands
35
+ ```bash
36
+ npx ai-rulez@latest init && npx ai-rulez@latest generate
68
37
  ```
69
38
 
70
- And generates native configs for each tool you specify.
39
+ ai-rulez generates correct, tool-native output for **19 platforms**: Claude, Cursor, Windsurf, Copilot, Gemini, Cline, Continue.dev, Codex, OpenCode, Amp, Junie, Antigravity, and more. Each preset respects the target tool's conventions — proper frontmatter, directory structure, file extensions, agent formats.
71
40
 
72
- ## Configuration
41
+ ## What Ships Out of the Box
73
42
 
74
- ```toml
75
- # .ai-rulez/config.toml
76
- version = "4.0"
77
- name = "My Project"
78
-
79
- presets = ["claude", "cursor", "copilot", "windsurf"]
80
-
81
- builtins = ["security", "testing"]
82
-
83
- # Optional: team-specific profiles
84
- [profiles]
85
- backend = ["backend", "database"]
86
- frontend = ["frontend", "ui"]
43
+ ai-rulez isn't just a config generator. It ships with **32 builtin domains** containing opinionated rules, agents, and workflows that establish a professional development baseline immediately.
87
44
 
88
- # Optional: share rules across repos
89
- [[includes]]
90
- name = "company-standards"
91
- source = "https://github.com/company/ai-rules.git"
92
- ref = "main"
45
+ ### Builtin Rules (auto-included)
93
46
 
94
- # Optional: inline MCP servers
95
- [[mcp_servers]]
96
- name = "ai-rulez"
97
- command = "npx"
98
- args = ["-y", "ai-rulez@latest", "mcp"]
99
- transport = "stdio"
100
- ```
47
+ These activate automatically. No configuration needed.
101
48
 
102
- ## Content Structure
49
+ | Domain | What it enforces |
50
+ |--------|-----------------|
51
+ | **ai-governance** | No AI signatures in commits. Concise communication. Systematic debugging. Verification before claiming success. Critical review of subagent output. |
52
+ | **code-quality** | Anti-patterns prevention. Complexity limits. Dead code removal. Error handling standards. Readability. |
53
+ | **testing** | TDD workflow (red-green-refactor, no exceptions). Testing anti-patterns. Meaningful assertions. Test independence. |
54
+ | **git-workflow** | Atomic commits. Conventional commit messages. Safe operations. Branch hygiene. |
55
+ | **security** | Secrets handling. Input validation. Dependency auditing. Least privilege. |
56
+ | **token-efficiency** | Task runner usage. Incremental approach. Context preservation. Batch operations. |
57
+ | **agent-delegation** | Multi-agent coordination and delegation patterns. |
103
58
 
104
- **Rules** - What AI must do:
105
- ```markdown
106
- ---
107
- priority: critical
108
- ---
109
- # Security Standards
110
- - Never commit credentials
111
- - Use environment variables for secrets
112
- - Sanitize all user input
113
- ```
59
+ ### Builtin Agents
114
60
 
115
- **Context** - What AI should know:
116
- ```markdown
117
- ---
118
- priority: high
119
- ---
120
- # Architecture
121
- This is a microservices app:
122
- - API Gateway (Go, port 8080)
123
- - Auth Service (Go, port 8081)
124
- - PostgreSQL 15
125
- ```
61
+ Specialized agents ready to use as subagents:
126
62
 
127
- **Commands** - Slash commands across tools:
128
- ```markdown
129
- ---
130
- name: review
131
- aliases: [r, pr-review]
132
- targets: [claude, cursor, continue-dev]
133
- ---
134
- # Code Review
135
- Review the current PR for:
136
- 1. Logic errors
137
- 2. Security issues
138
- 3. Performance problems
139
- ```
63
+ | Agent | Domain | Model | What it does |
64
+ |-------|--------|-------|-------------|
65
+ | **code-reviewer** | ai-governance | sonnet | Reviews changes for correctness, security, and conventions. Reports by severity. |
66
+ | **test-writer** | testing | sonnet | Writes tests following strict TDD. Fails first, then implements. |
67
+ | **security-auditor** | security | sonnet | Audits dependencies, scans for CVEs, reviews input validation. |
68
+ | **docs-writer** | ai-governance | haiku | Writes clear, concise documentation. No fluff. |
69
+ | **devops-engineer** | cicd | haiku | CI/CD pipelines, GitHub Actions, Docker, deployment automation. |
70
+ | **release-engineer** | cicd | haiku | Version management, changelogs, multi-registry publishing. |
140
71
 
141
- ## Installation
72
+ ### Opt-in Domains
142
73
 
143
- **No install required:**
144
- ```bash
145
- npx ai-rulez@latest <command>
146
- # or
147
- uvx ai-rulez <command>
148
- ```
74
+ Enable these based on your stack:
149
75
 
150
- **Global install:**
151
- ```bash
152
- # Homebrew
153
- brew install goldziher/tap/ai-rulez
76
+ **Languages** (10): `rust`, `python`, `typescript`, `go`, `java`, `ruby`, `php`, `elixir`, `csharp`, `r`
154
77
 
155
- # npm
156
- npm install -g ai-rulez
78
+ **Bindings** (10): `pyo3`, `napi-rs`, `magnus`, `ext-php-rs`, `rustler`, `wasm`, `jni-rs`, `extendr`, `cgo`, `vite-plus`
157
79
 
158
- # pip
159
- pip install ai-rulez
80
+ **Operational**: `cicd`, `docker`, `observability`, `documentation`, `default-commands`
160
81
 
161
- # Go
162
- go install github.com/Goldziher/ai-rulez/cmd@latest
82
+ ```toml
83
+ # .ai-rulez/config.toml
84
+ builtins = ["rust", "python", "pyo3", "cicd", "docker", "default-commands"]
163
85
  ```
164
86
 
165
- ## CLI Reference
166
-
167
- ```bash
168
- # Initialize project
169
- ai-rulez init "Project Name"
170
- ai-rulez init --domains backend,frontend,qa
171
-
172
- # Generate configs
173
- ai-rulez generate
174
- ai-rulez generate --profile backend
175
- ai-rulez generate --dry-run
176
-
177
- # Content management
178
- ai-rulez add rule security-standards --priority critical
179
- ai-rulez add context api-docs
180
- ai-rulez add skill database-expert
181
- ai-rulez add command review-pr
87
+ ## Content Types
182
88
 
183
- ai-rulez list rules
184
- ai-rulez remove rule outdated-rule
89
+ | Type | Purpose | Example |
90
+ |------|---------|---------|
91
+ | **Rules** | What AI must/must not do | Security standards, coding conventions |
92
+ | **Context** | What AI should know | Architecture docs, domain knowledge |
93
+ | **Skills** | Reusable prompts and workflows | Deployment checklist, review protocol |
94
+ | **Agents** | Specialized AI personas | Code reviewer, performance engineer |
95
+ | **Commands** | Slash commands across tools | `/review`, `/deploy`, `/test` |
185
96
 
186
- # Installed skills
187
- ai-rulez skill install kreuzberg --source https://github.com/kreuzberg-dev/kreuzberg
188
- ai-rulez skill list
189
- ai-rulez skill remove kreuzberg
97
+ ## Organization at Scale
190
98
 
191
- # Validation
192
- ai-rulez validate
193
-
194
- # MCP server (for AI assistants)
195
- npx ai-rulez@latest mcp
99
+ ai-rulez scales from solo projects to large organizations:
196
100
 
101
+ **Domains** — Group content by feature, language, or team:
102
+ ```
103
+ .ai-rulez/domains/backend/rules/
104
+ .ai-rulez/domains/frontend/rules/
197
105
  ```
198
106
 
199
- ## Remote Includes
200
-
201
- Share rules across repositories:
107
+ **Profiles** Generate different configs for different audiences:
108
+ ```toml
109
+ [profiles]
110
+ backend = ["backend", "database"]
111
+ frontend = ["frontend", "ui"]
112
+ ```
202
113
 
114
+ **Remote Includes** — Share rules across repositories:
203
115
  ```toml
204
- # HTTPS
205
116
  [[includes]]
206
117
  name = "company-standards"
207
118
  source = "https://github.com/company/ai-rules.git"
208
- ref = "main"
209
- include = ["rules", "context"]
210
119
  merge_strategy = "local-override"
211
-
212
- # SSH
213
- [[includes]]
214
- name = "shared-configs"
215
- source = "git@github.com:org/shared-ai-rulez.git"
216
- ref = "v2.0.0"
217
- include = ["rules", "skills"]
218
-
219
- # Local path
220
- [[includes]]
221
- name = "local-standards"
222
- source = "../shared-rules"
223
- include = ["rules"]
224
120
  ```
225
121
 
226
- Private repos use `AI_RULEZ_GIT_TOKEN` environment variable or `--token` flag.
227
-
228
- ## Installed Skills
229
-
230
- Install named skills from external repositories — fetched dynamically at generate time:
231
-
122
+ **Installed Skills** Pull reusable skills from external repos:
232
123
  ```toml
233
124
  [[installed_skills]]
234
125
  name = "kreuzberg"
235
126
  source = "https://github.com/kreuzberg-dev/kreuzberg"
236
-
237
- [[installed_skills]]
238
- name = "ai-rulez"
239
- source = "https://github.com/Goldziher/ai-rulez"
240
- ```
241
-
242
- ```bash
243
- ai-rulez skill install kreuzberg --source https://github.com/kreuzberg-dev/kreuzberg
244
- ai-rulez skill list
245
- ai-rulez skill remove kreuzberg
246
- ```
247
-
248
- Skills live at `skills/<name>/SKILL.md` in the source repo. See [Installed Skills docs](https://goldziher.github.io/ai-rulez/installed-skills/) for details.
249
-
250
- ## Generated Output
251
-
252
- Running `ai-rulez generate` creates:
253
-
254
- | Preset | Output |
255
- |--------|--------|
256
- | Claude | `CLAUDE.md` + `.claude/skills/` + `.claude/agents/` |
257
- | Cursor | `.cursor/rules/*.mdc` |
258
- | Windsurf | `.windsurf/*.md` |
259
- | Copilot | `.github/copilot-instructions.md` |
260
- | Gemini | `GEMINI.md` |
261
- | Continue.dev | `.continue/prompts/ai_rulez_prompts.yaml` |
262
- | Cline | `.cline/rules/*.md` |
263
- | Codex | `AGENTS.md` |
264
- | Amp | `AMP.md` |
265
- | Junie | `.junie/guidelines.md` |
266
- | OpenCode | `OPENCODE.md` |
267
- | Custom | Any path with markdown, JSON, or directory output |
268
-
269
- ## Use Cases
270
-
271
- **Monorepo**: Generate configs for multiple packages
272
- ```bash
273
- ai-rulez generate --recursive
274
- ```
275
-
276
- **Team profiles**: Different rules for different teams
277
- ```bash
278
- ai-rulez generate --profile backend
279
- ai-rulez generate --profile frontend
280
- ```
281
-
282
- **CI validation**: Ensure configs stay in sync
283
- ```bash
284
- ai-rulez validate && ai-rulez generate --dry-run
285
- ```
286
-
287
- **Import existing configs**: Migrate from tool-specific files
288
- ```bash
289
- ai-rulez init --from auto
290
- ai-rulez init --from .cursorrules,CLAUDE.md
291
127
  ```
292
128
 
293
129
  ## MCP Server
294
130
 
295
- Let AI assistants manage rules directly. MCP servers are configured inline in `config.toml`:
131
+ ai-rulez includes a built-in MCP server with 35+ tools that lets AI assistants manage their own governance. Add rules, update context, generate configs — all programmatically.
296
132
 
297
133
  ```toml
298
134
  [[mcp_servers]]
299
135
  name = "ai-rulez"
300
136
  command = "npx"
301
137
  args = ["-y", "ai-rulez@latest", "mcp"]
302
- transport = "stdio"
303
- enabled = true
304
-
305
- [[mcp_servers]]
306
- name = "custom-server"
307
- command = "python"
308
- args = ["-m", "my_mcp_server"]
309
- transport = "stdio"
310
138
  ```
311
139
 
312
- The MCP server exposes CRUD operations, validation, and generation to AI assistants.
313
-
314
- ## Builtins
140
+ ## Installation
315
141
 
316
- 27 built-in domains ship embedded in the binary — opinionated conventions ready to use without external includes:
142
+ ```bash
143
+ # No install required
144
+ npx ai-rulez@latest <command>
317
145
 
318
- ```toml
319
- builtins = ["rust", "python", "typescript", "security", "testing", "default-commands"]
146
+ # Or install globally
147
+ brew install goldziher/tap/ai-rulez # macOS
148
+ npm install -g ai-rulez # npm
149
+ pip install ai-rulez # pip
150
+ go install github.com/Goldziher/ai-rulez/cmd@latest # Go
320
151
  ```
321
152
 
322
- - **Universal** (9): `ai-governance`\*, `agent-delegation`\*, `security`, `git-workflow`, `code-quality`, `testing`, `token-efficiency`, `documentation`, `default-commands`
323
- - **Languages** (10): `rust`, `python`, `typescript`, `go`, `java`, `ruby`, `php`, `elixir`, `csharp`, `r`
324
- - **Bindings** (9): `pyo3`, `napi-rs`, `magnus`, `ext-php-rs`, `rustler`, `wasm`, `jni-rs`, `extendr`, `cgo`
325
-
326
- \* Auto-included by default. Use `builtins: true` for all, or pick specific ones. Exclude auto-includes with `!` prefix (e.g., `!agent-delegation`).
327
-
328
153
  ## Documentation
329
154
 
330
- - [Configuration Reference](https://goldziher.github.io/ai-rulez/configuration/)
331
- - [Domains & Profiles](https://goldziher.github.io/ai-rulez/domains/)
332
- - [Remote Includes](https://goldziher.github.io/ai-rulez/includes/)
333
- - [MCP Server](https://goldziher.github.io/ai-rulez/mcp-server/)
334
- - [Schema Validation](https://goldziher.github.io/ai-rulez/schema/)
335
- - [Migration Guide](https://goldziher.github.io/ai-rulez/migration/)
336
-
337
- ## Contributing
338
-
339
- Contributions welcome. See [CONTRIBUTING.md](https://github.com/Goldziher/ai-rulez/blob/main/CONTRIBUTING.md).
155
+ Full documentation at [goldziher.github.io/ai-rulez](https://goldziher.github.io/ai-rulez/).
340
156
 
341
157
  ## License
342
158
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ai-rulez",
3
- "version": "4.0.1",
4
- "description": "Directory-based AI governance for Claude, Cursor, Copilot, Windsurf and 19+ tools. Define rules, context, skills and agents in .ai-rulez/ generate synchronized configs for all your AI assistants.",
3
+ "version": "4.0.2",
4
+ "description": "Complete AI development workflow for 19+ tools. Ships with builtin rules, agents, and conventions. Generate native configs for Claude, Cursor, Copilot, Windsurf, Gemini, Codex and more from a single source.",
5
5
  "keywords": [
6
6
  "ai",
7
7
  "ai-assistant",