ai-rulez 5.1.1 → 5.2.1
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 +281 -105
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
<img src="https://raw.githubusercontent.com/Goldziher/ai-rulez/main/docs/assets/ai-rulez-banner.png" alt="AI-Rulez" width="820" />
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
|
-
<h1 align="center">ai-rulez</h1>
|
|
6
|
-
|
|
7
5
|
<p align="center">
|
|
8
|
-
<strong>The standards-compliant lifecycle tool for
|
|
6
|
+
<strong>The standards-compliant lifecycle tool for agentic governance</strong>
|
|
9
7
|
</p>
|
|
10
8
|
|
|
11
9
|
<p align="center">
|
|
12
|
-
<a href="https://www.npmjs.com/package/ai-rulez"><img src="https://img.shields.io/npm/v/ai-rulez" alt="npm version"></a>
|
|
13
|
-
<a href="https://pypi.org/project/ai-rulez/"><img src="https://img.shields.io/pypi/v/ai-rulez" alt="PyPI version"></a>
|
|
14
|
-
<a href="https://github.com/Goldziher/
|
|
10
|
+
<a href="https://www.npmjs.com/package/ai-rulez"><img src="https://img.shields.io/npm/v/ai-rulez?color=blue" alt="npm version"></a>
|
|
11
|
+
<a href="https://pypi.org/project/ai-rulez/"><img src="https://img.shields.io/pypi/v/ai-rulez?color=blue" alt="PyPI version"></a>
|
|
12
|
+
<a href="https://github.com/Goldziher/homebrew-tap"><img src="https://img.shields.io/github/v/release/Goldziher/ai-rulez?label=homebrew&color=blue" alt="Homebrew version"></a>
|
|
13
|
+
<a href="https://pkg.go.dev/github.com/Goldziher/ai-rulez/v5"><img src="https://img.shields.io/github/v/release/Goldziher/ai-rulez?label=go&color=blue" alt="Go version"></a>
|
|
14
|
+
<a href="https://github.com/Goldziher/ai-rulez/blob/main/LICENSE"><img src="https://img.shields.io/github/license/Goldziher/ai-rulez?color=blue" alt="License"></a>
|
|
15
15
|
<a href="https://goldziher.github.io/ai-rulez/"><img src="https://img.shields.io/badge/docs-ai--rulez-blue" alt="Documentation"></a>
|
|
16
16
|
</p>
|
|
17
17
|
|
|
@@ -34,6 +34,15 @@ through the whole lifecycle:
|
|
|
34
34
|
author -> generate -> bundle -> lint / validate -> govern -> publish
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
+
Most tools in this space stop at "turn my rules into markdown." ai-rulez treats agent knowledge like software you
|
|
38
|
+
ship: versioned, linted, locked, signed and audited, with an organization policy layer that enforces a floor no
|
|
39
|
+
repository can loosen.
|
|
40
|
+
|
|
41
|
+
- **One source, 52 targets.** Author once in `.ai-rulez/`; generate native files for every harness your team uses instead of hand-copying rules across tools.
|
|
42
|
+
- **A real lock file.** `ai-rulez.lock` pins remote includes, installed skills and authored content the way `go.sum` or `package-lock.json` pin dependencies.
|
|
43
|
+
- **Supply-chain-grade trust.** Sigstore signing, in-toto/DSSE attestations, CycloneDX/SPDX SBOMs and reviewer approvals, so "what prompt is actually running in production" has a verifiable answer.
|
|
44
|
+
- **Org-wide policy, not just repo config.** A central [policy](docs/policy.md) sets tighten-only floors; `verify` and CI gates enforce it everywhere.
|
|
45
|
+
|
|
37
46
|
| Stage | What happens | Commands | Docs |
|
|
38
47
|
| ----- | ------------ | -------- | ---- |
|
|
39
48
|
| **Author** | Rules, context, skills, agents, commands and checks as markdown in `.ai-rulez/`, with domains, profiles, roles and includes. `.ai-rulez/` is an [OKF](docs/okf.md) bundle: OKF is the internal format, and `init`, `add` and the MCP tools write it. A pre-OKF tree still loads, with a deprecation notice; `migrate okf` converts it. | `init`, `add`, `convert`, `import`, `migrate okf` | [Author](docs/configuration.md) |
|
|
@@ -43,10 +52,81 @@ author -> generate -> bundle -> lint / validate -> govern -> publish
|
|
|
43
52
|
| **Govern** | A content-pinning lock, reviewer approvals, Sigstore signing, an organization policy and an SBOM. | `lock`, `approve`, `sign`, `verify --attestation`, `sbom` | [Trust model](docs/trust-model.md) |
|
|
44
53
|
| **Publish** | Reproducible, checksummed release artifacts to GitHub releases, npm, OCI and marketplaces. | `publish` | [Publish](docs/publish.md) |
|
|
45
54
|
|
|
55
|
+
<p align="center">
|
|
56
|
+
<img src="https://raw.githubusercontent.com/Goldziher/ai-rulez/main/docs/assets/quickstart.gif" alt="ai-rulez init and generate: one .ai-rulez source becomes the native files of four AI tools" width="820" />
|
|
57
|
+
</p>
|
|
58
|
+
|
|
59
|
+
## Supported tools
|
|
60
|
+
|
|
61
|
+
ai-rulez ships 52 built-in presets — one per AI coding assistant, CLI agent or IDE integration — each writing that
|
|
62
|
+
tool's own file layout, frontmatter and settings documents from the same `.ai-rulez/` source. Mix and match any
|
|
63
|
+
combination in `presets = [...]`; the full feature matrix (rules, skills, agents, commands, MCP, hooks, permissions,
|
|
64
|
+
checks, user scope) is in [Supported harnesses](docs/harnesses.md), and a provider that isn't listed yet still gets
|
|
65
|
+
full parity through a [custom provider-backed preset](docs/configuration.md#provider-backed-presets-full-parity).
|
|
66
|
+
|
|
67
|
+
<details>
|
|
68
|
+
<summary><strong>All 52 supported tools</strong></summary>
|
|
69
|
+
|
|
70
|
+
| Preset | Tool |
|
|
71
|
+
| ------ | ---- |
|
|
72
|
+
| `aiassistant` | [JetBrains AI Assistant](https://www.jetbrains.com/help/ai-assistant/) |
|
|
73
|
+
| `amp` | [Sourcegraph Amp](https://ampcode.com) |
|
|
74
|
+
| `antigravity` | [Google Antigravity](https://antigravity.google/docs) |
|
|
75
|
+
| `augment` | [Augment Code](https://docs.augmentcode.com) |
|
|
76
|
+
| `baz` | [Baz](https://baz.ai/docs/agents/skills-and-instructions) |
|
|
77
|
+
| `bob` | [IBM Bob](https://bob.ibm.com/docs) |
|
|
78
|
+
| `claude` | [Claude Code](https://code.claude.com/docs) |
|
|
79
|
+
| `cline` | [Cline](https://docs.cline.bot) |
|
|
80
|
+
| `codebuddy` | [CodeBuddy Code](https://www.codebuddy.ai/docs/cli) |
|
|
81
|
+
| `codebuff` | [Codebuff](https://www.codebuff.com/docs) |
|
|
82
|
+
| `codewhale` | [Codewhale](https://github.com/codewhale-hq/Codewhale) |
|
|
83
|
+
| `codex` | [OpenAI Codex](https://developers.openai.com/codex) |
|
|
84
|
+
| `commandcode` | [Command Code](https://commandcode.ai/docs) |
|
|
85
|
+
| `copilot` | [GitHub Copilot](https://docs.github.com/en/copilot) |
|
|
86
|
+
| `copilot-cli` | [GitHub Copilot CLI](https://docs.github.com/en/copilot/how-tos/copilot-cli) |
|
|
87
|
+
| `cortex` | [Snowflake Cortex Code](https://docs.snowflake.com/en/user-guide/cortex-code/extensibility) |
|
|
88
|
+
| `crush` | [Crush](https://github.com/charmbracelet/crush) |
|
|
89
|
+
| `cursor` | [Cursor](https://cursor.com/docs) |
|
|
90
|
+
| `deepagents` | [Deep Agents Code](https://docs.langchain.com/oss/deepagents/code) |
|
|
91
|
+
| `devin` | [Devin CLI](https://docs.devin.ai/cli) |
|
|
92
|
+
| `dsh` | [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) |
|
|
93
|
+
| `factory` | [Factory Droid](https://docs.factory.ai) |
|
|
94
|
+
| `gemini` | [Gemini CLI](https://geminicli.com/docs/) |
|
|
95
|
+
| `gitlab-duo` | [GitLab Duo CLI](https://docs.gitlab.com/user/gitlab_duo_cli/customize/) |
|
|
96
|
+
| `goose` | [goose](https://goose-docs.ai) |
|
|
97
|
+
| `grok` | [Grok Build CLI](https://docs.x.ai/build/overview) |
|
|
98
|
+
| `hermes` | [Hermes Agent](https://hermes-agent.nousresearch.com/docs) |
|
|
99
|
+
| `junie` | [JetBrains Junie](https://junie.jetbrains.com) |
|
|
100
|
+
| `kilo` | [Kilo Code](https://kilo.ai/docs) |
|
|
101
|
+
| `kimi` | [Kimi Code](https://moonshotai.github.io/kimi-code/) |
|
|
102
|
+
| `kiro` | [Kiro](https://kiro.dev/docs) |
|
|
103
|
+
| `letta` | [Letta Code](https://docs.letta.com) |
|
|
104
|
+
| `mimocode` | [MiMo Code](https://mimo.xiaomi.com/mimocode) |
|
|
105
|
+
| `muse` | [Meta Muse Code](https://dev.meta.ai/docs/muse-code) |
|
|
106
|
+
| `omp` | [oh-my-pi](https://github.com/can1357/oh-my-pi) |
|
|
107
|
+
| `openclaw` | [OpenClaw](https://docs.openclaw.ai) |
|
|
108
|
+
| `opencode` | [OpenCode](https://opencode.ai/docs) |
|
|
109
|
+
| `pi` | [pi](https://pi.dev/docs/latest) |
|
|
110
|
+
| `poolside` | [Poolside Pool](https://docs.poolside.ai) |
|
|
111
|
+
| `qoder` | [Qoder](https://docs.qoder.com/cli/quickstart) |
|
|
112
|
+
| `qwen` | [Qwen Code](https://qwenlm.github.io/qwen-code-docs/en/) |
|
|
113
|
+
| `reasonix` | [Reasonix](https://github.com/esengine/DeepSeek-Reasonix) |
|
|
114
|
+
| `replit` | [Replit Agent](https://docs.replit.com/features/agent/overview) |
|
|
115
|
+
| `rovodev` | [Atlassian Rovo Dev](https://www.atlassian.com/software/rovo-dev) |
|
|
116
|
+
| `takt` | [Takt](https://github.com/nrslib/takt) |
|
|
117
|
+
| `trae` | [Trae](https://docs.trae.ai/ide/rules) |
|
|
118
|
+
| `vibe` | [Mistral Vibe](https://docs.mistral.ai/vibe) |
|
|
119
|
+
| `warp` | [Warp](https://docs.warp.dev) |
|
|
120
|
+
| `xum` | [Xum](https://xum.coder.com) |
|
|
121
|
+
| `zcode` | [ZCode](https://zcode.z.ai/en/docs) |
|
|
122
|
+
| `zed` | [Zed](https://zed.dev/docs/ai) |
|
|
123
|
+
| `zoocode` | [Zoo Code](https://docs.zoocode.dev) |
|
|
124
|
+
|
|
125
|
+
</details>
|
|
126
|
+
|
|
46
127
|
## Standards
|
|
47
128
|
|
|
48
|
-
|
|
49
|
-
checked against that standard's own schema or rules. A standard is marked **supported** when the code generates it and
|
|
129
|
+
Generation isn't limited to harness files — ai-rulez aims to be compliant with the major emerging standards in the agentic ecosystem. A standard is marked **supported** when the code generates it and
|
|
50
130
|
validates it today, and **planned** when it does not yet.
|
|
51
131
|
[docs/standards.md](docs/standards.md) carries the pinned spec version, the conformance test suite and the known gaps for
|
|
52
132
|
each row, and is the source of truth for test status.
|
|
@@ -57,34 +137,115 @@ each row, and is the source of truth for test status.
|
|
|
57
137
|
| [Agent Plugins](docs/agent-plugins.md) (agent-plugins.org) | supported | `generate --plugin`, `publish --emit agent-plugins` | `validate --strict` (AR9O codes) |
|
|
58
138
|
| [ARD](docs/ard.md) (Agentic Resource Discovery, a proposal) | supported | `publish --emit ard` | `validate` (entry schema, URN grammar) |
|
|
59
139
|
| [Agent Skills](docs/skills.md) (agentskills.io) | supported | `generate` | `validate` (frontmatter checks; partial) |
|
|
60
|
-
| [AGENTS.md](docs/agents-md.md) | supported | `generate` | `validate` |
|
|
140
|
+
| [AGENTS.md](docs/agents-md.md), also as the [source](docs/agents-source.md) with `source = "agents"` | supported | `generate` | `validate` |
|
|
61
141
|
| [llms.txt](docs/llms-txt.md) | supported | the `llms-txt` preset | `validate` |
|
|
62
142
|
| MCP server config | supported | `generate` | `validate` (partial) |
|
|
63
|
-
| MCP server card |
|
|
143
|
+
| MCP server card | partial (experimental extension, pinned `526201b`) | `publish --emit mcp-server-card`, `publish --emit ard` | conformance tests only |
|
|
64
144
|
| [CycloneDX / SPDX SBOM](docs/sbom.md) | supported | `sbom` | `sbom --check` |
|
|
65
145
|
| [in-toto / DSSE / Sigstore](docs/signing.md) | supported | `sign` | `verify --attestation` |
|
|
66
146
|
| [OpenTelemetry (OTLP)](docs/telemetry.md) | supported | `telemetry export --to otlp` | not applicable |
|
|
67
|
-
| "Agent bundle" | planned
|
|
147
|
+
| "Agent bundle" | planned, no spec yet | none | none |
|
|
68
148
|
|
|
69
|
-
##
|
|
149
|
+
## Usage
|
|
70
150
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
151
|
+
Every option below produces the same `.ai-rulez/` tree and the same generated output — pick however your project
|
|
152
|
+
already runs tools. Each one walks through init, generate and validate; [Bundle and publish](#bundle-and-publish),
|
|
153
|
+
[Validate](#validate) and [Govern](#govern) below cover what comes after.
|
|
74
154
|
|
|
75
155
|
```toml
|
|
76
156
|
# .ai-rulez/config.toml
|
|
77
157
|
presets = ["claude", "cursor", "codex", "copilot", "gemini"] # any of the 52 harnesses
|
|
78
158
|
```
|
|
79
159
|
|
|
160
|
+
<details>
|
|
161
|
+
<summary><strong>npx (Node.js, no install)</strong></summary>
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
npx ai-rulez@latest init
|
|
165
|
+
npx ai-rulez@latest generate
|
|
166
|
+
npx ai-rulez@latest validate --strict
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
</details>
|
|
170
|
+
|
|
171
|
+
<details>
|
|
172
|
+
<summary><strong>uvx (Python, no install)</strong></summary>
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
uvx ai-rulez init
|
|
176
|
+
uvx ai-rulez generate
|
|
177
|
+
uvx ai-rulez validate --strict
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
</details>
|
|
181
|
+
|
|
182
|
+
<details>
|
|
183
|
+
<summary><strong>Homebrew (macOS / Linux)</strong></summary>
|
|
184
|
+
|
|
185
|
+
```bash
|
|
186
|
+
brew install goldziher/tap/ai-rulez
|
|
187
|
+
ai-rulez init
|
|
188
|
+
ai-rulez generate
|
|
189
|
+
ai-rulez validate --strict
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
</details>
|
|
193
|
+
|
|
194
|
+
<details>
|
|
195
|
+
<summary><strong>Go</strong></summary>
|
|
196
|
+
|
|
197
|
+
```bash
|
|
198
|
+
go install github.com/Goldziher/ai-rulez/v5/cmd/ai-rulez@latest
|
|
199
|
+
ai-rulez init
|
|
200
|
+
ai-rulez generate
|
|
201
|
+
ai-rulez validate --strict
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
The module path needs `/v5`; without it `@latest` resolves to an old build.
|
|
205
|
+
|
|
206
|
+
</details>
|
|
207
|
+
|
|
208
|
+
<details>
|
|
209
|
+
<summary><strong>npm (global)</strong></summary>
|
|
210
|
+
|
|
211
|
+
```bash
|
|
212
|
+
npm install -g ai-rulez
|
|
213
|
+
ai-rulez init
|
|
214
|
+
ai-rulez generate
|
|
215
|
+
ai-rulez validate --strict
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
</details>
|
|
219
|
+
|
|
220
|
+
<details>
|
|
221
|
+
<summary><strong>uv tool</strong></summary>
|
|
222
|
+
|
|
223
|
+
```bash
|
|
224
|
+
uv tool install ai-rulez
|
|
225
|
+
ai-rulez init
|
|
226
|
+
ai-rulez generate
|
|
227
|
+
ai-rulez validate --strict
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
</details>
|
|
231
|
+
|
|
232
|
+
<details>
|
|
233
|
+
<summary><strong>pip / pipx</strong></summary>
|
|
234
|
+
|
|
80
235
|
```bash
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
236
|
+
pip install ai-rulez
|
|
237
|
+
# or, isolated:
|
|
238
|
+
pipx install ai-rulez
|
|
239
|
+
|
|
240
|
+
ai-rulez init
|
|
241
|
+
ai-rulez generate
|
|
242
|
+
ai-rulez validate --strict
|
|
85
243
|
```
|
|
86
244
|
|
|
87
|
-
|
|
245
|
+
</details>
|
|
246
|
+
|
|
247
|
+
<details>
|
|
248
|
+
<summary><strong>Day-to-day commands</strong></summary>
|
|
88
249
|
|
|
89
250
|
```bash
|
|
90
251
|
ai-rulez generate --watch # regenerate on every change to .ai-rulez/
|
|
@@ -93,6 +254,8 @@ ai-rulez doctor # read-only diagnostics: drift, removed
|
|
|
93
254
|
ai-rulez generate --user # the same, for your home directory (~/.claude, ~/.codex, ...)
|
|
94
255
|
```
|
|
95
256
|
|
|
257
|
+
</details>
|
|
258
|
+
|
|
96
259
|
Prefer the project-level [`.config/` convention](https://github.com/pi0/config-dir)? ai-rulez also discovers
|
|
97
260
|
`.config/ai-rulez/`, and `ai-rulez init --config-dir .config/ai-rulez` scaffolds it.
|
|
98
261
|
|
|
@@ -100,6 +263,9 @@ Prefer the project-level [`.config/` convention](https://github.com/pi0/config-d
|
|
|
100
263
|
|
|
101
264
|
Bundling and publishing need a `[plugin]` block (`name`, `version` and `description`) in `config.toml`:
|
|
102
265
|
|
|
266
|
+
<details>
|
|
267
|
+
<summary><strong>Show commands</strong></summary>
|
|
268
|
+
|
|
103
269
|
```bash
|
|
104
270
|
ai-rulez generate --plugin # plugin bundles and a marketplace index from the [plugin] block
|
|
105
271
|
ai-rulez export okf # an OKF bundle of your rules, context and skills (docs/okf)
|
|
@@ -107,6 +273,8 @@ ai-rulez publish --emit agent-plugins --emit ard --dry-run
|
|
|
107
273
|
ai-rulez publish --to github-release --execute --yes
|
|
108
274
|
```
|
|
109
275
|
|
|
276
|
+
</details>
|
|
277
|
+
|
|
110
278
|
`publish` runs a preflight first (`validate --strict`, `lock --check`, `verify --plugin`, a secret scan and the policy
|
|
111
279
|
gates), writes a byte-reproducible tar.gz with `SHA256SUMS`, and uploads only when you pass `--execute --yes`. See
|
|
112
280
|
[Publish](docs/publish.md) and [Authoring plugins](docs/plugins.md).
|
|
@@ -115,8 +283,21 @@ Pi packages are opt-in with `[plugin] runtimes = ["pi"]`: skills and prompt temp
|
|
|
115
283
|
from Git or npm. Publishing to npm preserves Pi and OpenCode runtime metadata while using the
|
|
116
284
|
configured scope and plugin name for the released package.
|
|
117
285
|
|
|
286
|
+
`verify --plugin` reports a hand-edited or stray file in a bundle as drift, and `generate --plugin` restores it:
|
|
287
|
+
|
|
288
|
+
<p align="center">
|
|
289
|
+
<img src="https://raw.githubusercontent.com/Goldziher/ai-rulez/main/docs/assets/plugin-drift.gif" alt="ai-rulez verify --plugin reporting changed and extra files in a plugin bundle, then generate --plugin restoring it" width="820" />
|
|
290
|
+
</p>
|
|
291
|
+
|
|
118
292
|
## Validate
|
|
119
293
|
|
|
294
|
+
<p align="center">
|
|
295
|
+
<img src="https://raw.githubusercontent.com/Goldziher/ai-rulez/main/docs/assets/validate.gif" alt="ai-rulez validate --strict flags a defect, --explain describes it, and generate --check fails on drift" width="820" />
|
|
296
|
+
</p>
|
|
297
|
+
|
|
298
|
+
<details>
|
|
299
|
+
<summary><strong>Show commands</strong></summary>
|
|
300
|
+
|
|
120
301
|
```bash
|
|
121
302
|
ai-rulez validate # config plus content checks, exit 2 on findings
|
|
122
303
|
ai-rulez validate --explain AR001 # what a rule checks and how to suppress it
|
|
@@ -125,8 +306,13 @@ ai-rulez okf validate docs/okf # lint any OKF bundle, ai-rulez's or a
|
|
|
125
306
|
ai-rulez generate --check # generated files still match their sources
|
|
126
307
|
```
|
|
127
308
|
|
|
309
|
+
</details>
|
|
310
|
+
|
|
128
311
|
## Govern
|
|
129
312
|
|
|
313
|
+
<details>
|
|
314
|
+
<summary><strong>Show commands</strong></summary>
|
|
315
|
+
|
|
130
316
|
```bash
|
|
131
317
|
ai-rulez lock # pin remote includes, installed skills and authored content
|
|
132
318
|
ai-rulez approve --list # what still needs a reviewer's approval
|
|
@@ -135,6 +321,8 @@ ai-rulez verify --attestation # check it offline against the [signing
|
|
|
135
321
|
ai-rulez sbom -o ai-bom.cdx.json # CycloneDX 1.6 (or --type spdx-json)
|
|
136
322
|
```
|
|
137
323
|
|
|
324
|
+
</details>
|
|
325
|
+
|
|
138
326
|
An organization [policy](docs/policy.md) sets tighten-only floors a repository cannot loosen. See the
|
|
139
327
|
[trust model](docs/trust-model.md).
|
|
140
328
|
|
|
@@ -143,6 +331,16 @@ An organization [policy](docs/policy.md) sets tighten-only floors a repository c
|
|
|
143
331
|
- **MCP server.** `ai-rulez mcp` lets an assistant manage the configuration; with `--serve-skills` one server serves
|
|
144
332
|
skills on demand and the config tools together (`--read-only` keeps only the read-only tools).
|
|
145
333
|
See [MCP server](docs/mcp-server.md).
|
|
334
|
+
Served skills cost nothing until an assistant asks for them:
|
|
335
|
+
|
|
336
|
+
<img src="https://raw.githubusercontent.com/Goldziher/ai-rulez/main/docs/assets/skills-mcp.gif" alt="ai-rulez tokens before and after serving skills over MCP, then find_skill and load_skill" width="780" />
|
|
337
|
+
|
|
338
|
+
- **Monorepos.** Nested roots each carry their own `.ai-rulez/`; `generate --recursive` and
|
|
339
|
+
`validate --recursive` walk them all, and `tokens --budget` gates what every session loads.
|
|
340
|
+
See [Monorepos](docs/monorepo.md).
|
|
341
|
+
|
|
342
|
+
<img src="https://raw.githubusercontent.com/Goldziher/ai-rulez/main/docs/assets/monorepo.gif" alt="ai-rulez generate --recursive over two nested roots, recursive validation, and a token budget check" width="780" />
|
|
343
|
+
|
|
146
344
|
- **Telemetry.** Item-load records with an optional OTLP export. See [telemetry](docs/telemetry.md).
|
|
147
345
|
- **Evals and improve.** `ai-rulez eval` scores skills; `improve` (experimental) optimizes them behind a held-out eval
|
|
148
346
|
gate. See [evals](docs/evals.md) and [improve](docs/improve.md).
|
|
@@ -150,108 +348,54 @@ An organization [policy](docs/policy.md) sets tighten-only floors a repository c
|
|
|
150
348
|
|
|
151
349
|
Existing project on 4.x? Run `ai-rulez migrate v5 --dry-run`, then see [Migrating to v5](docs/migration-v5.md).
|
|
152
350
|
|
|
153
|
-
##
|
|
154
|
-
|
|
155
|
-
No install needed — `pnpm dlx ai-rulez@latest <command>` works out of the box. Pick a permanent option below:
|
|
156
|
-
|
|
157
|
-
<details>
|
|
158
|
-
<summary><strong>Homebrew (macOS / Linux)</strong></summary>
|
|
159
|
-
|
|
160
|
-
```bash
|
|
161
|
-
brew install goldziher/tap/ai-rulez
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
</details>
|
|
165
|
-
|
|
166
|
-
<details>
|
|
167
|
-
<summary><strong>pnpm dlx (no install)</strong></summary>
|
|
168
|
-
|
|
169
|
-
```bash
|
|
170
|
-
pnpm dlx ai-rulez@latest <command>
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
</details>
|
|
174
|
-
|
|
175
|
-
<details>
|
|
176
|
-
<summary><strong>npm (global)</strong></summary>
|
|
177
|
-
|
|
178
|
-
```bash
|
|
179
|
-
pnpm add -g ai-rulez
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
</details>
|
|
183
|
-
|
|
184
|
-
<details>
|
|
185
|
-
<summary><strong>uvx (no install)</strong></summary>
|
|
186
|
-
|
|
187
|
-
```bash
|
|
188
|
-
uvx ai-rulez <command>
|
|
189
|
-
```
|
|
190
|
-
|
|
191
|
-
</details>
|
|
192
|
-
|
|
193
|
-
<details>
|
|
194
|
-
<summary><strong>uv tool</strong></summary>
|
|
195
|
-
|
|
196
|
-
```bash
|
|
197
|
-
uv tool install ai-rulez
|
|
198
|
-
```
|
|
199
|
-
|
|
200
|
-
</details>
|
|
201
|
-
|
|
202
|
-
<details>
|
|
203
|
-
<summary><strong>pip / pipx</strong></summary>
|
|
204
|
-
|
|
205
|
-
```bash
|
|
206
|
-
pip install ai-rulez
|
|
207
|
-
# or, isolated:
|
|
208
|
-
pipx install ai-rulez
|
|
209
|
-
```
|
|
210
|
-
|
|
211
|
-
</details>
|
|
212
|
-
|
|
213
|
-
<details>
|
|
214
|
-
<summary><strong>Go</strong></summary>
|
|
351
|
+
## Documentation
|
|
215
352
|
|
|
216
|
-
|
|
217
|
-
go install github.com/Goldziher/ai-rulez/v5/cmd/ai-rulez@latest
|
|
218
|
-
```
|
|
353
|
+
Full documentation at [goldziher.github.io/ai-rulez](https://goldziher.github.io/ai-rulez/).
|
|
219
354
|
|
|
220
|
-
|
|
355
|
+
## Git Hooks
|
|
221
356
|
|
|
222
|
-
|
|
357
|
+
ai-rulez supports multiple pre-commit hook harnesses.
|
|
223
358
|
|
|
224
359
|
<details>
|
|
225
|
-
<summary><strong>pre-commit
|
|
360
|
+
<summary><strong>pre-commit/prek</strong></summary>
|
|
226
361
|
|
|
227
362
|
Add to `.pre-commit-config.yaml`:
|
|
228
363
|
|
|
229
364
|
```yaml
|
|
230
365
|
repos:
|
|
231
366
|
- repo: https://github.com/Goldziher/ai-rulez
|
|
232
|
-
rev: v5.
|
|
367
|
+
rev: v5.2.1
|
|
233
368
|
hooks:
|
|
234
|
-
- id: ai-rulez-recursive
|
|
235
|
-
- id: ai-rulez-validate
|
|
369
|
+
- id: ai-rulez-recursive # generate: write outputs for every nested .ai-rulez/ root
|
|
370
|
+
- id: ai-rulez-validate # validate --recursive: content, security and link checks
|
|
236
371
|
```
|
|
237
372
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
373
|
+
Every hook runs `scripts/pre-commit/run-ai-rulez.sh` and triggers only on root or nested `.ai-rulez/` changes:
|
|
374
|
+
|
|
375
|
+
| Hook id | Runs |
|
|
376
|
+
| --- | --- |
|
|
377
|
+
| `ai-rulez-generate` | `generate`, the root `.ai-rulez/` only |
|
|
378
|
+
| `ai-rulez-recursive` | `generate --recursive`, every nested root |
|
|
379
|
+
| `ai-rulez-validate` | `validate --recursive` — a real validation run, not a dry run |
|
|
380
|
+
| `ai-rulez-plugin-generate` | `generate --recursive --plugin --if-configured` |
|
|
381
|
+
| `ai-rulez-plugin-verify` | `verify --recursive --plugin --if-configured` |
|
|
382
|
+
|
|
383
|
+
Add `ai-rulez-plugin-generate` and `ai-rulez-plugin-verify` too if the repository ships plugin bundles; the
|
|
384
|
+
`--if-configured` flag makes them no-ops on consumer-only repositories.
|
|
385
|
+
|
|
241
386
|
</details>
|
|
242
387
|
|
|
243
388
|
<details>
|
|
244
|
-
<summary><strong>
|
|
389
|
+
<summary><strong>Poly</strong></summary>
|
|
245
390
|
|
|
246
391
|
Add ai-rulez as a managed source in your existing `poly.toml` and select the hooks your
|
|
247
|
-
repository needs
|
|
248
|
-
hooks run that release):
|
|
392
|
+
repository needs:
|
|
249
393
|
|
|
250
394
|
```toml
|
|
251
395
|
[[hooks.sources]]
|
|
252
396
|
id = "ai-rulez"
|
|
253
397
|
git = "https://github.com/Goldziher/ai-rulez.git"
|
|
254
|
-
revision = "v5.
|
|
398
|
+
revision = "v5.2.1"
|
|
255
399
|
hooks = ["ai-rulez-recursive", "ai-rulez-plugin-verify"]
|
|
256
400
|
```
|
|
257
401
|
|
|
@@ -268,12 +412,10 @@ git add poly.toml poly-hooks.lock
|
|
|
268
412
|
poly hooks install
|
|
269
413
|
```
|
|
270
414
|
|
|
271
|
-
See the [Poly hooks guide](docs/poly-hooks.md) for local sources, machine install
|
|
272
|
-
preferences, hook behavior, and the producer catalog.
|
|
273
415
|
</details>
|
|
274
416
|
|
|
275
417
|
<details>
|
|
276
|
-
<summary><strong>
|
|
418
|
+
<summary><strong>Lefthook</strong></summary>
|
|
277
419
|
|
|
278
420
|
Add to `lefthook.yml`:
|
|
279
421
|
|
|
@@ -295,12 +437,46 @@ In a monorepo, `ai-rulez generate --recursive` and `ai-rulez validate --recursiv
|
|
|
295
437
|
`.ai-rulez/` root, report all failures, and exit non-zero if any root failed.
|
|
296
438
|
|
|
297
439
|
Or run `ai-rulez init --setup-hooks` while initializing a repo to wire hooks in automatically.
|
|
440
|
+
|
|
298
441
|
</details>
|
|
299
442
|
|
|
300
|
-
##
|
|
443
|
+
## GitHub Actions
|
|
301
444
|
|
|
302
|
-
|
|
445
|
+
ai-rulez ships its own composite Action ([`action.yml`](action.yml) at the repository root), so any workflow can
|
|
446
|
+
`uses: Goldziher/ai-rulez@<ref>` directly — no subpath. It downloads a release binary, verifies its sha256 against
|
|
447
|
+
the release's `checksums.txt`, caches it (keyed by OS, arch and the resolved version) and adds it to `PATH`. No Go
|
|
448
|
+
toolchain, Node or Python needed in the job. It reuses the same `scripts/pre-commit/run-ai-rulez.sh`
|
|
449
|
+
download-and-verify logic the pre-commit hooks above use, so the two stay in sync.
|
|
450
|
+
|
|
451
|
+
| | |
|
|
452
|
+
| --- | --- |
|
|
453
|
+
| **Input** `version` | `X.Y.Z`, `vX.Y.Z`, or `latest` (default). Optional — omit it to always use the newest release. |
|
|
454
|
+
| **Output** `version` | The resolved version, without the leading `v`. |
|
|
455
|
+
| **Output** `path` | Absolute path to the installed `ai-rulez` binary. |
|
|
456
|
+
|
|
457
|
+
<details>
|
|
458
|
+
<summary><strong>Show workflow</strong></summary>
|
|
303
459
|
|
|
304
|
-
|
|
460
|
+
```yaml
|
|
461
|
+
name: ai-rulez
|
|
462
|
+
on:
|
|
463
|
+
pull_request:
|
|
464
|
+
push:
|
|
465
|
+
branches: [main]
|
|
466
|
+
jobs:
|
|
467
|
+
check:
|
|
468
|
+
runs-on: ubuntu-latest
|
|
469
|
+
steps:
|
|
470
|
+
- uses: actions/checkout@v4
|
|
471
|
+
- uses: Goldziher/ai-rulez@main # pin a release tag once one exists past v5.1.0 (the tag predates action.yml)
|
|
472
|
+
# with:
|
|
473
|
+
# version: 5.1.0 # optional; omit (or "latest") to always use the newest release
|
|
474
|
+
- run: ai-rulez generate --check # the committed output matches the sources
|
|
475
|
+
- run: ai-rulez validate --strict # content and security checks, warnings fail
|
|
476
|
+
- run: ai-rulez lock --check # pins were updated when the sources were
|
|
477
|
+
```
|
|
478
|
+
|
|
479
|
+
</details>
|
|
305
480
|
|
|
306
|
-
|
|
481
|
+
See [CI usage](docs/lockfile.md#ci-usage) for the lock-check-vs-generate-check distinction and a scheduled
|
|
482
|
+
"outdated sources" report job.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ai-rulez",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.2.1",
|
|
4
4
|
"description": "Standards-compliant lifecycle tool for agent knowledge and capabilities. Author rules, skills, agents and MCP servers once; generate for 52 harnesses; bundle as OKF, Agent Plugins and ARD; validate against each standard; govern with signing, approvals and policy; publish.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agent-plugins",
|