rulebookguard 0.10.0 → 0.11.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 CHANGED
@@ -40,11 +40,15 @@ docs/rules/clients/R-CLI-001.md ── anchors ──▶ src/clients/**/*.ts
40
40
 
41
41
  Requires Node.js 22 or later.
42
42
 
43
+ rulebookguard does not need to be a dependency of your project. Nothing in your code imports it, so you can run it with `npx`, pinning the version so that every machine and CI run the same one:
44
+
43
45
  ```sh
44
- npx rulebookguard lint
46
+ npx rulebookguard@0.11.0 lint
45
47
  ```
46
48
 
47
- Or add it to a project:
49
+ Each release locks its own dependencies for npm and `npx`, so a pinned version keeps running the same code. Other package managers, such as `pnpm dlx`, ignore that lock and resolve the dependency ranges. Your `package.json` and lockfile stay untouched.
50
+
51
+ If you prefer to keep the version in your lockfile, and renovate it with the rest of your dependencies, add it as a dev dependency instead:
48
52
 
49
53
  ```sh
50
54
  npm install --save-dev rulebookguard
@@ -52,10 +56,10 @@ npm install --save-dev rulebookguard
52
56
 
53
57
  A first rule in four steps:
54
58
 
55
- 1. Set up the rulebook: `npx rulebookguard init clients --ci` writes `rulebookguard.config.yaml`, the `clients` context and a CI workflow (see [Configuration](#configuration) to adjust `testGlobs`).
56
- 2. Scaffold a rule: `npx rulebookguard new clients` creates `docs/rules/clients/R-CLI-001.md` as `proposed`.
59
+ 1. Set up the rulebook: `npx rulebookguard@0.11.0 init clients --ci` writes `rulebookguard.config.yaml`, the `clients` context and a CI workflow (see [Configuration](#configuration) to adjust `testGlobs`).
60
+ 2. Scaffold a rule: `npx rulebookguard@0.11.0 new clients` creates `docs/rules/clients/R-CLI-001.md` as `proposed`.
57
61
  3. Write the rule, add its `anchors`, set `status: active`, and wrap the test that proves it with `@rule R-CLI-001` and `@endrule R-CLI-001`.
58
- 4. Run `npx rulebookguard lint`, and add it to CI with the [CI recipe](#ci-recipe).
62
+ 4. Run `npx rulebookguard@0.11.0 lint`, and add it to CI with the [CI recipe](#ci-recipe).
59
63
 
60
64
  ## Configuration
61
65
 
@@ -524,7 +528,7 @@ The rulebook is found from `--project` (default: the current directory). A comma
524
528
  > npm install --save-dev rulebookguard @rulebookguard/site
525
529
  > ```
526
530
 
527
- Without it, the site commands fail, exit 1, with `The site commands need the @rulebookguard/site package. Install it next to rulebookguard: npm install --save-dev @rulebookguard/site`. One-off, without installing: `npx -p rulebookguard -p @rulebookguard/site rulebookguard site:run`.
531
+ Without it, the site commands fail, exit 1, with `The site commands need the @rulebookguard/site package. Install it next to rulebookguard: npm install --save-dev @rulebookguard/site`. One-off, without installing: `npx -p rulebookguard@0.11.0 -p @rulebookguard/site@0.11.0 rulebookguard site:run`.
528
532
 
529
533
  Builds a read-only static site of the rulebook with [Astro Starlight](https://starlight.astro.build) into `--out` (default `site`, relative to the current directory) and prints that path. Open it from disk or publish it as is, for example on GitHub Pages; pass `--base` when it is served from a sub-path (`--base /rules`).
530
534
 
@@ -577,11 +581,11 @@ jobs:
577
581
  - uses: actions/setup-node@v6
578
582
  with:
579
583
  node-version: 22
580
- - run: npx --yes rulebookguard@0.10.0 lint --base origin/${{ github.base_ref }}
584
+ - run: npx --yes rulebookguard@0.11.0 lint --base origin/${{ github.base_ref }}
581
585
  ```
582
586
 
583
587
  > [!TIP]
584
- > Pin the version, or add rulebookguard as a dev dependency and run it from the lockfile, so a new release never changes CI results by itself.
588
+ > Keep the version pinned, or add rulebookguard as a dev dependency and run it from the lockfile, so a new release never changes CI results by itself.
585
589
 
586
590
  ## Claude Code plugin
587
591
 
package/dist/cli.mjs CHANGED
@@ -495,7 +495,7 @@ function render(path, rules, regions, text) {
495
495
  return parts.join("\n\n");
496
496
  }
497
497
  // package.json
498
- var version = "0.10.0";
498
+ var version = "0.11.0";
499
499
  // src/commands/new.ts
500
500
  const MAX_NUMBER = 999;
501
501
  const CONTEXT_NAME = /^[a-z0-9][a-z0-9_-]*$/;
@@ -0,0 +1,148 @@
1
+ {
2
+ "name": "rulebookguard",
3
+ "version": "0.11.0",
4
+ "lockfileVersion": 3,
5
+ "requires": true,
6
+ "packages": {
7
+ "": {
8
+ "name": "rulebookguard",
9
+ "version": "0.11.0",
10
+ "license": "MIT",
11
+ "dependencies": {
12
+ "@modelcontextprotocol/server": "2.3.1",
13
+ "ajv": "8.20.0",
14
+ "picomatch": "4.0.7",
15
+ "yaml": "2.9.1",
16
+ "zod": "4.6.7"
17
+ },
18
+ "bin": {
19
+ "rulebookguard": "dist/cli.mjs"
20
+ },
21
+ "engines": {
22
+ "node": ">=22"
23
+ },
24
+ "peerDependencies": {
25
+ "@rulebookguard/site": "^0.11.0"
26
+ },
27
+ "peerDependenciesMeta": {
28
+ "@rulebookguard/site": {
29
+ "optional": true
30
+ }
31
+ }
32
+ },
33
+ "node_modules/@modelcontextprotocol/core": {
34
+ "version": "2.3.1",
35
+ "resolved": "https://registry.npmjs.org/@modelcontextprotocol/core/-/core-2.3.1.tgz",
36
+ "integrity": "sha512-laVmIhPGpWi7rG9q+0UigblRN0Hws/Yjlb6qLFtVqryXVLkc4h+yN8z731POD2LnAGQlFe7/tXhUm7Bi0YB91g==",
37
+ "license": "Apache-2.0",
38
+ "dependencies": {
39
+ "zod": "^4.2.0"
40
+ },
41
+ "engines": {
42
+ "node": ">=20"
43
+ }
44
+ },
45
+ "node_modules/@modelcontextprotocol/server": {
46
+ "version": "2.3.1",
47
+ "resolved": "https://registry.npmjs.org/@modelcontextprotocol/server/-/server-2.3.1.tgz",
48
+ "integrity": "sha512-e59MfWuSssj6DoQ96JCTqdW1AXT5/XtnTl0WWd6MU1Ka434fFUGGosCLJbGNySDhHGvxQWoRWK137FXYFkYNWw==",
49
+ "license": "Apache-2.0",
50
+ "dependencies": {
51
+ "@modelcontextprotocol/core": "2.3.1",
52
+ "zod": "^4.2.0"
53
+ },
54
+ "engines": {
55
+ "node": ">=20"
56
+ }
57
+ },
58
+ "node_modules/ajv": {
59
+ "version": "8.20.0",
60
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.20.0.tgz",
61
+ "integrity": "sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==",
62
+ "license": "MIT",
63
+ "dependencies": {
64
+ "fast-deep-equal": "^3.1.3",
65
+ "fast-uri": "^3.0.1",
66
+ "json-schema-traverse": "^1.0.0",
67
+ "require-from-string": "^2.0.2"
68
+ },
69
+ "funding": {
70
+ "type": "github",
71
+ "url": "https://github.com/sponsors/epoberezkin"
72
+ }
73
+ },
74
+ "node_modules/fast-deep-equal": {
75
+ "version": "3.1.3",
76
+ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
77
+ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
78
+ "license": "MIT"
79
+ },
80
+ "node_modules/fast-uri": {
81
+ "version": "3.1.9",
82
+ "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.9.tgz",
83
+ "integrity": "sha512-hS/0Wt3Ya043oKXs0sIxrMpKQITXhMLIrVAKKXi4gozGC9v7YRWVnXIZzjNPTO02M9BdxLCWqK1yRXgNziVyJQ==",
84
+ "funding": [
85
+ {
86
+ "type": "github",
87
+ "url": "https://github.com/sponsors/fastify"
88
+ },
89
+ {
90
+ "type": "opencollective",
91
+ "url": "https://opencollective.com/fastify"
92
+ }
93
+ ],
94
+ "license": "BSD-3-Clause"
95
+ },
96
+ "node_modules/json-schema-traverse": {
97
+ "version": "1.0.0",
98
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
99
+ "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",
100
+ "license": "MIT"
101
+ },
102
+ "node_modules/picomatch": {
103
+ "version": "4.0.7",
104
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz",
105
+ "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==",
106
+ "license": "MIT",
107
+ "engines": {
108
+ "node": ">=12"
109
+ },
110
+ "funding": {
111
+ "url": "https://github.com/sponsors/jonschlinkert"
112
+ }
113
+ },
114
+ "node_modules/require-from-string": {
115
+ "version": "2.0.2",
116
+ "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz",
117
+ "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==",
118
+ "license": "MIT",
119
+ "engines": {
120
+ "node": ">=0.10.0"
121
+ }
122
+ },
123
+ "node_modules/yaml": {
124
+ "version": "2.9.1",
125
+ "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.9.1.tgz",
126
+ "integrity": "sha512-3NxN8+78OdzbT7C/WjGsyfPAtJaN3FNDsWxv7Y7mcDsT/oOmgW8BpyQQFFBnvZE3j9Y2Sdz1ULFLezL7Eb2yFw==",
127
+ "license": "ISC",
128
+ "bin": {
129
+ "yaml": "bin.mjs"
130
+ },
131
+ "engines": {
132
+ "node": ">= 14.6"
133
+ },
134
+ "funding": {
135
+ "url": "https://github.com/sponsors/eemeli"
136
+ }
137
+ },
138
+ "node_modules/zod": {
139
+ "version": "4.6.7",
140
+ "resolved": "https://registry.npmjs.org/zod/-/zod-4.6.7.tgz",
141
+ "integrity": "sha512-g8W2D2kU6a8untc053fX1uVBKzM7yqAxW/3zwk83+6RyF2+SKOuV+c0wBDhUwzV1PaGapmZH+rmcUzPf+3CGwg==",
142
+ "license": "MIT",
143
+ "funding": {
144
+ "url": "https://github.com/sponsors/colinhacks"
145
+ }
146
+ }
147
+ }
148
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rulebookguard",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "description": "Keep business rules as the single source of truth, bound to code and tests.",
5
5
  "homepage": "https://github.com/JuanCJR/rulebookguard#readme",
6
6
  "bugs": {
@@ -16,7 +16,8 @@
16
16
  },
17
17
  "files": [
18
18
  "dist",
19
- "schemas"
19
+ "schemas",
20
+ "npm-shrinkwrap.json"
20
21
  ],
21
22
  "type": "module",
22
23
  "exports": {
@@ -36,14 +37,14 @@
36
37
  },
37
38
  "devDependencies": {
38
39
  "@modelcontextprotocol/client": "2.3.1",
39
- "@rulebookguard/site": "0.10.0",
40
+ "@rulebookguard/site": "0.11.0",
40
41
  "@types/node": "^20.19.43",
41
42
  "@types/picomatch": "^4.0.3",
42
43
  "typescript": "^7.0.2",
43
44
  "vite-plus": "^1.4.0"
44
45
  },
45
46
  "peerDependencies": {
46
- "@rulebookguard/site": "^0.10.0"
47
+ "@rulebookguard/site": "^0.11.0"
47
48
  },
48
49
  "peerDependenciesMeta": {
49
50
  "@rulebookguard/site": {