brepjs 18.60.0 → 18.62.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 +30 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -103,6 +103,36 @@ Layer 0 kernel/, utils/ WASM bindings
103
103
 
104
104
  Imports flow downward only. Boundaries are enforced in CI.
105
105
 
106
+ ## Authoring CAD with AI (brepjs-verify)
107
+
108
+ [`brepjs-verify`](https://www.npmjs.com/package/brepjs-verify) helps an AI agent (or you) author parametric CAD in brepjs and **prove it is correct** before handing it off. An LLM can't see geometry — so it writes a `.brep.ts` part, runs it on a real kernel, and reads a deterministic report instead of guessing from how the code reads. It ships as two cooperating pieces: a **Claude Code skill** (the authoring loop) and a **verification CLI** (validity + measured dimensions + multi-view snapshots + STEP export).
109
+
110
+ Install both — they ride on two rails:
111
+
112
+ ```bash
113
+ # 1. The skill — Claude Code plugin (delivered via this repo's marketplace)
114
+ /plugin marketplace add andymai/brepjs
115
+ /plugin install brepjs-verify@brepjs
116
+
117
+ # 2. The runtime — the CLI the skill drives
118
+ npm i -D brepjs-verify
119
+ ```
120
+
121
+ `brepjs-verify` bundles its own `brepjs` + `occt-wasm`, so it runs in an empty directory; inside an existing brepjs project it prefers your installed versions so verified parts match what you ship. A model is a module that default-exports a zero-arg function returning a shape:
122
+
123
+ ```typescript
124
+ // bracket.brep.ts
125
+ import { box } from 'brepjs';
126
+ export const expected = { volume: 8000, tolerancePct: 1 }; // optional: assert intent
127
+ export default () => box(40, 20, 10, { centered: true });
128
+ ```
129
+
130
+ ```bash
131
+ npx -y brepjs-verify bracket.brep.ts --check --step bracket.step --json report.json
132
+ ```
133
+
134
+ The command exits non-zero unless the report is `ok` (valid **and** every declared dimension within tolerance), so it drops straight into CI or an agent loop. See the [**Authoring with AI**](https://brepjs.dev/agent/overview) guide for the full loop, CLI reference, examples, and the measurement eval.
135
+
106
136
  ## Projects Using brepjs
107
137
 
108
138
  - [Gridfinity Layout Tool](https://github.com/andymai/gridfinity-layout-tool): Web-based layout generator for Gridfinity storage systems
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "brepjs",
3
- "version": "18.60.0",
3
+ "version": "18.62.0",
4
4
  "description": "Web CAD library with pluggable geometry kernel",
5
5
  "keywords": [
6
6
  "cad",