dsh-cad-harness 0.2.1-preview.2 → 0.2.1-preview.3
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.en.md +9 -14
- package/README.md +9 -14
- package/docs/TOKEN-BASELINE.json +28 -1
- package/docs/TOOL-CONTRACTS.md +26 -3
- package/docs/TOOL-SURFACE-MAP.md +5 -3
- package/docs/TOOL-SURFACE-V1.json +12 -2
- package/docs/en/llm/README.md +3 -3
- package/docs/en/llm/assembly.md +20 -7
- package/docs/en/llm/engines.md +4 -3
- package/docs/en/llm/library.md +1 -1
- package/docs/llm/README.md +3 -3
- package/docs/llm/assembly.md +5 -3
- package/docs/llm/engines.md +1 -1
- package/docs/llm/library.md +1 -1
- package/lib/check-register.js.map +1 -1
- package/lib/client.js +1247 -216
- package/lib/client.js.map +4 -4
- package/lib/contract-cli.js.map +2 -2
- package/lib/import-run.js.map +2 -2
- package/lib/index.js +982 -580
- package/lib/index.js.map +4 -4
- package/lib/provision.js.map +1 -1
- package/lib/types/client/attention-store.d.ts +33 -0
- package/lib/types/client/attention-turn-tail.d.ts +11 -0
- package/lib/types/client/attention-view.d.ts +62 -0
- package/lib/types/client/browse.d.ts +55 -0
- package/lib/types/client/i18n.d.ts +13 -0
- package/lib/types/client/panel-target.d.ts +47 -0
- package/lib/types/client/panel.d.ts +3 -1
- package/lib/types/client/part-mention.d.ts +150 -0
- package/lib/types/host/attention.d.ts +68 -0
- package/lib/types/host/compile.d.ts +2 -0
- package/lib/types/host/deliver-attention.d.ts +4 -0
- package/lib/types/host/delivery-audit.d.ts +1 -1
- package/lib/types/host/delivery-routes.d.ts +1 -1
- package/lib/types/host/manifest.d.ts +1 -1
- package/lib/types/host/mesh.d.ts +32 -0
- package/lib/types/host/project.d.ts +1 -0
- package/lib/types/host/run-attention.d.ts +11 -0
- package/lib/types/shared/error-envelope.d.ts +20 -1
- package/lib/types/shared/types.d.ts +1 -1
- package/lib/verify.js +10 -2
- package/lib/verify.js.map +2 -2
- package/package.json +11 -3
- package/python/cad_worker/worker.py +216 -0
- package/schemas/assembly-manifest.schema.json +1 -1
- package/scripts/provision.mjs +4 -2
- package/skills/cad-assembly/SKILL.md +10 -2
- package/skills/cad-toolbox/SKILL.md +12 -1
package/README.en.md
CHANGED
|
@@ -85,20 +85,15 @@ The `dsh-cad-*` binaries are declared in `package.json`; they are on `PATH` when
|
|
|
85
85
|
the package is linked into a profile/tool installation. From an unpacked tarball,
|
|
86
86
|
`node scripts/*.mjs` is the reliable form.
|
|
87
87
|
|
|
88
|
-
## What's new in 0.2.1-preview.
|
|
89
|
-
|
|
90
|
-
- **
|
|
91
|
-
- **
|
|
92
|
-
- **
|
|
93
|
-
- **
|
|
94
|
-
-
|
|
95
|
-
- **
|
|
96
|
-
-
|
|
97
|
-
- **Delivery gate**: a CAD file can leave only through export or `cad_deliver` `present` (the latter takes `{versionId, format}` and the plugin generates the file and its sha256 receipt); bare `present` of an arbitrary CAD path is rejected. Hard blockers make the state `blocked`; soft findings are `warnings` (`difficult` is only a warning label, not a third state). Every warning must be explained in `evidence-exceptions.json` (`finding` + `reason` + `expiresAt`) before delivery; otherwise the gate refuses. A successful delivery writes a receipt.
|
|
98
|
-
- **Kickoff gate**: a blank project must write its `brief` on the assembly root first (`processes` / `verify` / `buyVsMake` / `limits`; `limits` is `maxX`/`maxY`/`maxZ` in mm, or `{source:"none", note}`); without it the design/check/simulate tools are refused, and old projects need one brief.
|
|
99
|
-
- **Delivery reminder (agent first)**: every user turn that used a design/verification tool is checked; ordinary iteration injects the gaps, a completion claim/delivery attempt gets one follow-up, and only an ineffective reminder reaches the panel. `cad_deliver` `defer` stops the reminder for a revision.
|
|
100
|
-
- `generate` still takes `dryRun` / `preflight`; `cad_check` `sweep` screens a joint range before a motion run; motion supports a `gear` ratio.
|
|
101
|
-
- Full notes, evidence and known issues: `docs/dev/RELEASE-NOTES-0.2.0.md` in the source repository.
|
|
88
|
+
## What's new in 0.2.1-preview.3
|
|
89
|
+
|
|
90
|
+
- **Attention management**: `cad_deliver` `invite` pins a record to a version, `@pNNN` names a part in chat, and the panel's "to look at" strip / per-turn footer locate that record in one click. Duplicate reminders are de-duplicated and a read mark expires with the version.
|
|
91
|
+
- **Assembly extractability**: `cad_check` `retention` walks a declared disassembly sequence and reports whether a part can actually come out (a closed cavity, or a part blocked by one that can leave, is not retained). The verdict enters the contract, the delivery audit and `verify` / `claim` / `run` evidence; `acceptedFree` accepts a part that is free but stays put.
|
|
92
|
+
- **Replay**: the simulation section of the navigator stays visible, a `run` can be named, and the machine page gains a Replay tab; runs with no part can be pinned too.
|
|
93
|
+
- **Delivery gate**: the review turn branches on "is the design finished" (deliver vs defer), the gate reminder no longer reads the turn text, and explained warnings are no longer printed as UNEXPLAINED.
|
|
94
|
+
- **`$fn` / meshes**: `$fn` became a default value and the saved mesh is normalized at the compile boundary.
|
|
95
|
+
- **Examples**: pitcher-pump 304 (pump head + bench plumbing) with contract, motion and single-phase-fluid evidence.
|
|
96
|
+
- Full notes: `docs/user/preview.md`; the release history is in `docs/dev/RELEASE-NOTES-0.2.1-preview.3.md` in the source repository.
|
|
102
97
|
|
|
103
98
|
## Documentation
|
|
104
99
|
|
package/README.md
CHANGED
|
@@ -46,20 +46,15 @@ does not appear at all — no error, just a missing mode. `npx dsh-cad-doctor` r
|
|
|
46
46
|
- CadQuery pack optional, ~1.6 GiB, post-install: `npx dsh-cad-provision --cadquery`
|
|
47
47
|
- BOSL2 optional, under `lib/BOSL2/` in the source checkout
|
|
48
48
|
|
|
49
|
-
## What's new in 0.2.1-preview.
|
|
50
|
-
|
|
51
|
-
- **
|
|
52
|
-
- **
|
|
53
|
-
- **
|
|
54
|
-
- **
|
|
55
|
-
-
|
|
56
|
-
- **
|
|
57
|
-
-
|
|
58
|
-
- **Delivery gate**: a CAD file can leave only through export or `cad_deliver` `present` (the latter takes `{versionId, format}` and the plugin generates the file and its sha256 receipt); bare `present` of an arbitrary CAD path is rejected. Hard blockers make the state `blocked`; soft findings are `warnings` (`difficult` is only a warning label, not a third state). Every warning must be explained in `evidence-exceptions.json` (`finding` + `reason` + `expiresAt`) before delivery; otherwise the gate refuses. A successful delivery writes a receipt.
|
|
59
|
-
- **Kickoff gate**: a blank project must write its `brief` on the assembly root first (`processes` / `verify` / `buyVsMake` / `limits`; `limits` is `maxX`/`maxY`/`maxZ` in mm, or `{source:"none", note}`); without it the design/check/simulate tools are refused, and old projects need one brief.
|
|
60
|
-
- **Delivery reminder (agent first)**: every user turn that used a design/verification tool is checked; ordinary iteration injects the gaps, a completion claim/delivery attempt gets one follow-up, and only an ineffective reminder reaches the panel. `cad_deliver` `defer` stops the reminder for a revision.
|
|
61
|
-
- `generate` still takes `dryRun` / `preflight`; `cad_check` `sweep` screens a joint range before a motion run; motion supports a `gear` ratio.
|
|
62
|
-
- Full notes, evidence and known issues: `docs/dev/RELEASE-NOTES-0.2.0.md` in the source repository.
|
|
49
|
+
## What's new in 0.2.1-preview.3
|
|
50
|
+
|
|
51
|
+
- **Attention management**: `cad_deliver` `invite` pins a record to a version, `@pNNN` names a part in chat, and the panel's "to look at" strip / per-turn footer locate that record in one click. Duplicate reminders are de-duplicated and a read mark expires with the version.
|
|
52
|
+
- **Assembly extractability**: `cad_check` `retention` walks a declared disassembly sequence and reports whether a part can actually come out (a closed cavity, or a part blocked by one that can leave, is not retained). The verdict enters the contract, the delivery audit and `verify` / `claim` / `run` evidence; `acceptedFree` accepts a part that is free but stays put.
|
|
53
|
+
- **Replay**: the simulation section of the navigator stays visible, a `run` can be named, and the machine page gains a Replay tab; runs with no part can be pinned too.
|
|
54
|
+
- **Delivery gate**: the review turn branches on "is the design finished" (deliver vs defer), the gate reminder no longer reads the turn text, and explained warnings are no longer printed as UNEXPLAINED.
|
|
55
|
+
- **`$fn` / meshes**: `$fn` became a default value and the saved mesh is normalized at the compile boundary.
|
|
56
|
+
- **Examples**: pitcher-pump 304 (pump head + bench plumbing) with contract, motion and single-phase-fluid evidence.
|
|
57
|
+
- Full notes: `docs/user/preview.md`; the release history is in `docs/dev/RELEASE-NOTES-0.2.1-preview.3.md` in the source repository.
|
|
63
58
|
|
|
64
59
|
## Documentation
|
|
65
60
|
|
package/docs/TOKEN-BASELINE.json
CHANGED
|
@@ -67,5 +67,32 @@
|
|
|
67
67
|
"chars": 282
|
|
68
68
|
}
|
|
69
69
|
]
|
|
70
|
-
}
|
|
70
|
+
},
|
|
71
|
+
"skillBodies": [
|
|
72
|
+
{
|
|
73
|
+
"name": "cad-assembly",
|
|
74
|
+
"chars": 9629,
|
|
75
|
+
"lines": 54
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"name": "cad-manufacturing",
|
|
79
|
+
"chars": 4073,
|
|
80
|
+
"lines": 38
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"name": "cad-modeling-measure",
|
|
84
|
+
"chars": 5345,
|
|
85
|
+
"lines": 50
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"name": "cad-simulation",
|
|
89
|
+
"chars": 11497,
|
|
90
|
+
"lines": 72
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"name": "cad-toolbox",
|
|
94
|
+
"chars": 18768,
|
|
95
|
+
"lines": 164
|
|
96
|
+
}
|
|
97
|
+
]
|
|
71
98
|
}
|
package/docs/TOOL-CONTRACTS.md
CHANGED
|
@@ -218,6 +218,29 @@ cad_check({ action: "printability", args: { versionId: "…" } })
|
|
|
218
218
|
returns: `versionId`, `nextLook`, `verdict`, `minWallMm`, `wallMeasured`, `thinSamples`, `sampled`, `thinAreaMm2`, `thinAreaPct`, `edgeOnlyThinPct`, `surfaceAreaMm2`, `overhangAreaMm2`, `printOrientationDeg`, `overhangZRange`, `findings`, `minWallAtMm`, `watertight`, `attention`, `profileSource`, `profiles`
|
|
219
219
|
|
|
220
220
|
|
|
221
|
+
## `check_retention`
|
|
222
|
+
|
|
223
|
+
Model-facing call: `cad_check` action `retention` (this section documents the internal op).
|
|
224
|
+
|
|
225
|
+
Geometric retention: can each part be pulled out of the assembly? For every part it tries a set of escape directions (6 world axes + the part's principal axes + any you name), translates it up to travelMm, and reports the first blocking distance and the part that blocks it. FREE means no POSITIVE LOCK along that direction — not that the part will fall out: friction, adhesive and press fits are invisible here, so a glued joint reads FREE and the mechanism is your declaration. A part held only by parts that are themselves free is not held. Geometry only: no gravity, no force, no contact.
|
|
226
|
+
|
|
227
|
+
| parameter | type | default | meaning |
|
|
228
|
+
|---|---|---|---|
|
|
229
|
+
| `parts` | array | **required** | At least two parts, each a saved version plus its world transform (R = Rz·Ry·Rx, then translate). |
|
|
230
|
+
| `ground` | array | — | Names of parts that do not move (base / the end you hold). Never tested; always block. |
|
|
231
|
+
| `acceptedFree` | array | — | Parts whose FREEDOM you accept because a declared mechanism holds them (adhesive, friction, press fit, a strap). A free part not listed here fails the run — that is what makes this evidence rather than a screen. |
|
|
232
|
+
| `travelMm` | number | — | How far out counts as free. Default 5. |
|
|
233
|
+
| `stepMm` | number | — | Sweep step. Default 0.5. |
|
|
234
|
+
| `directions` | array | — | Extra world directions, e.g. a hole axis the part geometry does not suggest. |
|
|
235
|
+
| `includePartAxes` | boolean | — | Add the moving part's principal axes. Default true. |
|
|
236
|
+
|
|
237
|
+
```js
|
|
238
|
+
cad_check({ action: "retention", args: { parts: [] } })
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
returns: `travelMm`, `stepMm`, `freeParts`, `parts`, `note`
|
|
242
|
+
|
|
243
|
+
|
|
221
244
|
## `check_sheet2d`
|
|
222
245
|
|
|
223
246
|
Model-facing call: `cad_check` action `sheet2d` (this section documents the internal op).
|
|
@@ -335,7 +358,7 @@ Audit the corpus before delivering: failing runs that are still the newest of th
|
|
|
335
358
|
| parameter | type | default | meaning |
|
|
336
359
|
|---|---|---|---|
|
|
337
360
|
| `manifestPath` | string | — | Assembly manifest to audit against. Defaults to assembly/assembly.json in the session workspace. |
|
|
338
|
-
| `claims` | array | — | Delivery CLAIMS to back with evidence: {kind, statement}. kind is strength \| motion \| assembly \| manufacturability \| appearance \| review \| flow. A claim with no fresh run of the kind it needs is reported as claim-without-evidence (blocked). Omit it and the audit declines to judge any delivery claim — it only says whether the CORPUS is coherent. |
|
|
361
|
+
| `claims` | array | — | Delivery CLAIMS to back with evidence: {kind, statement}. kind is strength \| motion \| retention \| assembly \| manufacturability \| appearance \| review \| flow. A claim with no fresh run of the kind it needs is reported as claim-without-evidence (blocked). Omit it and the audit declines to judge any delivery claim — it only says whether the CORPUS is coherent. |
|
|
339
362
|
| `scanPaths` | array | — | Workspace-relative roots scanned for mesh files no version accounts for. Default ["."] (whole workspace, skipping the corpus, nested projects and common build dirs); pass [] to disable. A found file NEWER than the newest version is blocked — register it with import_part or declare it exempt. |
|
|
340
363
|
| `exempt` | array | — | Declared exceptions for files intentionally left as files (e.g. bought/reference geometry): {path, reason}. Reported as info, never blocked, and the reason is echoed. Use it instead of narrowing scanPaths when the file is a legitimate non-version. |
|
|
341
364
|
| `visualReview` | string (required \| off) | — | Per-version LLM visual review gate. "required" (default): every printed part in the assembly must have a fresh top+iso review of the EXACT version (review_visual), or delivery is blocked. "off" is a declared opt-out for legacy/bench corpora and is reported as info. |
|
|
@@ -354,7 +377,7 @@ returns: `verdict`, `judgement`, `findings`, `summary`, `versions`, `parts`, `ru
|
|
|
354
377
|
|
|
355
378
|
Model-facing call: `cad_part` action `generate` (this section documents the internal op).
|
|
356
379
|
|
|
357
|
-
Compile a part into a new version. Pass EITHER `scadCode` (OpenSCAD) OR `code` (CadQuery Python); exactly one is required. CadQuery scripts must leave a `result` (Workplane/Shape) or call `show_object(...)`; declare anchors with datum/datum_axis/datum_plane/datum_cyl (point first, same schema as OpenSCAD). OpenSCAD code is self-contained
|
|
380
|
+
Compile a part into a new version. Pass EITHER `scadCode` (OpenSCAD) OR `code` (CadQuery Python); exactly one is required. CadQuery scripts must leave a `result` (Workplane/Shape) or call `show_object(...)`; declare anchors with datum/datum_axis/datum_plane/datum_cyl (point first, same schema as OpenSCAD). OpenSCAD code is self-contained: $fn DEFAULTS to 64 and a top-level `$fn = …;` in your own code overrides it (a default, not a clamp — write 240+ when a Ø250 face needs the resolution). BOSL2 available when installed; declare datum("name",[x,y,z]) at top level in final world coordinates. G2: datum_axis/datum_plane/datum_cyl are (name, point, dir) — POINT FIRST; a swapped OpenSCAD positional call compiles silently and corrupts the contract. Renders are attached by default; trim with `views` on numeric iterations. CadQuery renders are produced by the shared STL→OpenSCAD path, never by VTK. The FIRST version of a part also gets a sampled wall screen (minWallMm + warning) — when several parts share a new feature (a slot, a snap, a thread), generate ONE representative, fix its screen, then generate the family; regenerating N parts after a shared defect costs N rounds.
|
|
358
381
|
|
|
359
382
|
| parameter | type | default | meaning |
|
|
360
383
|
|---|---|---|---|
|
|
@@ -572,7 +595,7 @@ Run the mandatory delivery sequence in one call: printability for every part (ne
|
|
|
572
595
|
|
|
573
596
|
| parameter | type | default | meaning |
|
|
574
597
|
|---|---|---|---|
|
|
575
|
-
| `claims` | array | — | Delivery claims to back with evidence: {kind, statement}. kind = strength \| motion \| assembly \| manufacturability \| appearance \| review \| flow. |
|
|
598
|
+
| `claims` | array | — | Delivery claims to back with evidence: {kind, statement}. kind = strength \| motion \| retention \| assembly \| manufacturability \| appearance \| review \| flow. |
|
|
576
599
|
| `profileIds` | array | — | Declared process profiles to screen against (same meaning as in check_printability). |
|
|
577
600
|
| `scanPaths` | array | — | Workspace-relative roots for the unregistered-geometry scan (same meaning as in delivery_audit). Default ["."]; [] disables it. |
|
|
578
601
|
| `exempt` | array | — | Declared exceptions for files intentionally left as files: {path, reason} (same meaning as in delivery_audit). |
|
package/docs/TOOL-SURFACE-MAP.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> `node scripts/audit-tool-surface.mjs --write`
|
|
4
4
|
>
|
|
5
|
-
> **Frozen** 2026-11-26, revision
|
|
5
|
+
> **Frozen** 2026-11-26, revision 10 (2026-12-04).
|
|
6
6
|
> Under the 0.2.0 contract the nine surface names and every action name below are
|
|
7
7
|
> **frozen: add only**. `docs/TOOL-SURFACE-V1.json` is the machine copy this page is
|
|
8
8
|
> rendered from; `accept-tool-surface` and `accept-cad-all-surfaces` compare the live
|
|
@@ -43,6 +43,7 @@ Call the surface/action on the right, not the tool on the left.
|
|
|
43
43
|
| `check_edm_access` | `cad_check` action `edm` |
|
|
44
44
|
| `check_parts` | `cad_check` action `parts` |
|
|
45
45
|
| `check_printability` | `cad_check` action `printability` |
|
|
46
|
+
| `check_retention` | `cad_check` action `retention` |
|
|
46
47
|
| `check_sheet2d` | `cad_check` action `sheet2d` |
|
|
47
48
|
| `check_sweep` | `cad_check` action `sweep` |
|
|
48
49
|
| `check_turning` | `cad_check` action `turning` |
|
|
@@ -62,6 +63,7 @@ Call the surface/action on the right, not the tool on the left.
|
|
|
62
63
|
| `present_delivery` | `cad_deliver` action `present` |
|
|
63
64
|
| `project_info` | `cad_session` action `info` |
|
|
64
65
|
| `python_runtime` | `cad_python` action `runtime` |
|
|
66
|
+
| `raise_attention` | `cad_deliver` action `invite` |
|
|
65
67
|
| `recall_reference_image` | `cad_see` action `reference` |
|
|
66
68
|
| `render_part` | `cad_see` action `render` |
|
|
67
69
|
| `request_review` | `cad_session` action `review` |
|
|
@@ -89,8 +91,8 @@ Call the surface/action on the right, not the tool on the left.
|
|
|
89
91
|
| surface | ops | actions |
|
|
90
92
|
|---|---|---|
|
|
91
93
|
| `cad_assembly` | 5 | `check`, `datums`, `suggest`, `validate`, `write` |
|
|
92
|
-
| `cad_check` |
|
|
93
|
-
| `cad_deliver` |
|
|
94
|
+
| `cad_check` | 9 | `appearance`, `cnc`, `edm`, `parts`, `printability`, `retention`, `sheet2d`, `sweep`, `turning` |
|
|
95
|
+
| `cad_deliver` | 8 | `affected`, `audit`, `defer`, `invite`, `plan`, `preflight`, `present`, `retire` |
|
|
94
96
|
| `cad_inspect` | 5 | `analyze`, `attention`, `features`, `measure`, `versions` |
|
|
95
97
|
| `cad_part` | 9 | `appearance`, `create`, `generate`, `import`, `library`, `merge`, `retire`, `revert`, `role` |
|
|
96
98
|
| `cad_python` | 2 | `run`, `runtime` |
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"frozenAt": "2026-11-26",
|
|
3
|
-
"updatedAt": "2026-12-
|
|
4
|
-
"revision":
|
|
3
|
+
"updatedAt": "2026-12-04",
|
|
4
|
+
"revision": 10,
|
|
5
5
|
"policy": "add only; removal or rename needs a deprecation cycle of at least one minor version",
|
|
6
6
|
"schemaCharsBudget": 6144,
|
|
7
7
|
"surfaces": {
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"edm",
|
|
19
19
|
"parts",
|
|
20
20
|
"printability",
|
|
21
|
+
"retention",
|
|
21
22
|
"sheet2d",
|
|
22
23
|
"sweep",
|
|
23
24
|
"turning"
|
|
@@ -26,6 +27,7 @@
|
|
|
26
27
|
"affected",
|
|
27
28
|
"audit",
|
|
28
29
|
"defer",
|
|
30
|
+
"invite",
|
|
29
31
|
"plan",
|
|
30
32
|
"preflight",
|
|
31
33
|
"present",
|
|
@@ -115,6 +117,10 @@
|
|
|
115
117
|
"surface": "cad_check",
|
|
116
118
|
"action": "printability"
|
|
117
119
|
},
|
|
120
|
+
"check_retention": {
|
|
121
|
+
"surface": "cad_check",
|
|
122
|
+
"action": "retention"
|
|
123
|
+
},
|
|
118
124
|
"check_sheet2d": {
|
|
119
125
|
"surface": "cad_check",
|
|
120
126
|
"action": "sheet2d"
|
|
@@ -191,6 +197,10 @@
|
|
|
191
197
|
"surface": "cad_python",
|
|
192
198
|
"action": "runtime"
|
|
193
199
|
},
|
|
200
|
+
"raise_attention": {
|
|
201
|
+
"surface": "cad_deliver",
|
|
202
|
+
"action": "invite"
|
|
203
|
+
},
|
|
194
204
|
"recall_reference_image": {
|
|
195
205
|
"surface": "cad_see",
|
|
196
206
|
"action": "reference"
|
package/docs/en/llm/README.md
CHANGED
|
@@ -6,19 +6,19 @@ This is the reference layer for **agents**. User docs live in `docs/user/`; do n
|
|
|
6
6
|
|
|
7
7
|
## Call surface (since 2026-11-16)
|
|
8
8
|
|
|
9
|
-
A production session exposes **9 surfaces /
|
|
9
|
+
A production session exposes **9 surfaces / 52 ops**. The call form is `cad_<surface>({ action: "<op>", args: { … } })`; this directory uses that form. Legacy tool names (`generate_part`, `check_assembly`, …) are internal op names; calling them directly fails with `unknown tool`.
|
|
10
10
|
|
|
11
11
|
| surface | actions |
|
|
12
12
|
|---|---|
|
|
13
13
|
| `cad_session` | `info` · `init` · `bind` · `review` · `kernel` |
|
|
14
14
|
| `cad_part` | `create` · `generate` · `import` · `merge` · `role` · `appearance` · `retire` · `revert` · `library` |
|
|
15
15
|
| `cad_assembly` | `write` · `validate` · `check` · `datums` · `suggest` |
|
|
16
|
-
| `cad_check` | `printability` · `sheet2d` · `turning` · `cnc` · `edm` · `parts` · `appearance` · `sweep` |
|
|
16
|
+
| `cad_check` | `printability` · `sheet2d` · `turning` · `cnc` · `edm` · `parts` · `appearance` · `sweep` · `retention` |
|
|
17
17
|
| `cad_simulate` | `physics` · `motion` · `fluid` · `lbm` · `stress` · `hotspots` |
|
|
18
18
|
| `cad_inspect` | `measure` · `features` · `attention` · `analyze` · `versions` |
|
|
19
19
|
| `cad_see` | `render` · `review` · `reference` |
|
|
20
20
|
| `cad_python` | `run` · `runtime` |
|
|
21
|
-
| `cad_deliver` | `plan` · `preflight` · `audit` · `affected` · `retire` · `present` · `defer` |
|
|
21
|
+
| `cad_deliver` | `plan` · `preflight` · `audit` · `affected` · `retire` · `present` · `defer` · `invite` |
|
|
22
22
|
|
|
23
23
|
`catalog` / `help` are read-only actions on every surface: `catalog` lists the ops, `help` gives the legacy parameters.
|
|
24
24
|
|
package/docs/en/llm/assembly.md
CHANGED
|
@@ -91,16 +91,24 @@ from the inline list alone. When an endpoint resolves only against the version,
|
|
|
91
91
|
|
|
92
92
|
## Kickoff alignment: `brief` (2026-11-14, extended 2026-12-02)
|
|
93
93
|
|
|
94
|
-
Settle
|
|
95
|
-
|
|
94
|
+
Settle the following with the user BEFORE the first part and write them into the root's `brief`;
|
|
95
|
+
the verification set is YOURS to derive, not a menu handed to the user. Then model:
|
|
96
96
|
|
|
97
97
|
- **buyVsMake** — gears, bearings, springs, motors, fasteners: bought or made. The default is to
|
|
98
98
|
ASK, never to assume "make";
|
|
99
99
|
- **processes** — the SET of processes the user allows (multi-select: FDM / sheet metal / CNC /
|
|
100
100
|
moulding). The user allows the set; YOU pick per part and record who chose it in that part's
|
|
101
101
|
`process` (`process.source` already carries that provenance);
|
|
102
|
-
- **verify
|
|
103
|
-
|
|
102
|
+
- **verify — you derive the set; it is not the user's checklist.** The contract and the object's
|
|
103
|
+
function decide what applies: assembly (≥2 parts), manufacturability (every fabricated part) and
|
|
104
|
+
review (every printed part) always apply; a revolute / prismatic / spring interface adds `motion`
|
|
105
|
+
and `retention` (retention applies to EVERY assembly); a load path that ends in fracture or large
|
|
106
|
+
bending adds `strength`; moving fluid adds `flow`; appearance only when asked. Retention fails
|
|
107
|
+
when a part can translate out along one of its interface axes / normals, or when a 1 g run lets a
|
|
108
|
+
part leave its place; `travel` is the engagement length + 0.5 (3.0 with no engagement) and must be
|
|
109
|
+
echoed. **Silence is not a pass**: an applicable dimension that is neither verified nor exempted
|
|
110
|
+
is `verify-unexplained`; an exemption states the holding / load mechanism + load + force budget
|
|
111
|
+
(or "no load path") and the audit prints it. The user may ADD a must-run item; nobody removes one.
|
|
104
112
|
- **The budget (`budget.json`) is a criterion, not a contract**: it is not on `assembly.seal`'s hash chain, so editing it creates no revision. So that a verdict can still answer "which criterion was this judged against", `check_appearance` archives the budget WITH the run (`budget-snapshot.json`: path / sha256 / mtime / content) and returns `budget.hash` and `modifiedAt`; the run summary and the `[budget]` line carry the 8-hex prefix. This makes the criterion reproducible even in a workspace that is not a git repository. What is still missing is the budget file's own change history (who changed it, and why) — that needs a separate seal. A group's `exposure` (`exterior` / `mixed` / `internal`) is ATTRIBUTION only (declared vs measured), NOT an exemption switch: declaring `internal` removes the group from no criterion (Q4, settled 2026-12-02) — an exemption you can write yourself is not a check.
|
|
105
113
|
- **limits** (2026-12-02) — how big the design may get: `maxX` / `maxY` / `maxZ` in mm, as an
|
|
106
114
|
OUTER EXTENT (hi − lo), not coordinates. A user can answer "it must fit a 600 mm drawer"; a
|
|
@@ -129,13 +137,18 @@ human are naming the same part. A part without `color` keeps the old palette (no
|
|
|
129
137
|
reports, tables and contracts never use it. Worth setting when a machine has coaxial compound
|
|
130
138
|
gears or mating pairs, which are exactly the parts people misname by colour.
|
|
131
139
|
|
|
132
|
-
**`verify` is enforced; everything else is a record.** Declaring `motion` / `strength` requires a
|
|
140
|
+
**`verify` is enforced; everything else is a record.** Declaring `motion` / `strength` / `retention` requires a
|
|
133
141
|
FRESH run of that kind citing the newest version, or `cad_deliver` (`action: "audit"`) is `blocked`
|
|
134
142
|
(`verify-required-motion` / `verify-required-strength`). **With no `brief` at all**, any
|
|
135
143
|
`转动副` / `滑动副` / `弹簧` interface makes `motion` required by derivation (`verify-derived` says
|
|
136
144
|
so) — the patch for the wind-up frog shipping with “未测 live simulation” in its README. Narrowing
|
|
137
|
-
the scope means
|
|
138
|
-
`verify-waived`: that is a DECISION, never a pass.
|
|
145
|
+
the scope means YOU record an exemption with a reason (mechanism + load + budget); the audit then
|
|
146
|
+
prints `verify-waived`: that is a DECISION, never a pass. A must-run item added by the user cannot
|
|
147
|
+
be waived.
|
|
148
|
+
|
|
149
|
+
**State (2026-12-04):** the rule is in `skills/cad-assembly/SKILL.md`; `verify-unexplained` and
|
|
150
|
+
structured exemptions (`verifyExcluded` / `verifyMust`) are not implemented yet — today the audit
|
|
151
|
+
checks declared kinds only, and prints `verify-waived` when a kinematic interface has no `motion`.
|
|
139
152
|
|
|
140
153
|
## Where this sits in the delivery discipline (updated 2026-10-20)
|
|
141
154
|
|
package/docs/en/llm/engines.md
CHANGED
|
@@ -7,9 +7,10 @@ Five engines, five scopes of trust. **Motion/physics/fluid/LBM do not report for
|
|
|
7
7
|
## Playback: how motion is shown
|
|
8
8
|
|
|
9
9
|
Every simulation run writes `runs/<id>/trajectory.json` (fluid: `frames.json` + frame
|
|
10
|
-
binaries) into its run directory, and the panel's **
|
|
11
|
-
those files
|
|
12
|
-
|
|
10
|
+
binaries) into its run directory, and the panel's **Simulation → rNNN → playback** view
|
|
11
|
+
reads exactly those files (the machine page's **Replay** tab and the nav's **Simulation**
|
|
12
|
+
section both lead there): pause, scrub, event markers, chart. The reply carries `runId`
|
|
13
|
+
and `playback`; quote `playback` instead of describing the navigation.
|
|
13
14
|
|
|
14
15
|
**A "0 penetration" in a gear run is not evidence about the teeth.** With a `gear` joint the pair's contact is DISABLED (the ratio is prescribed), so the zero is by construction; `metrics.gearContactsDisabled` lists those pairs and the report carries a dedicated note. To show the teeth do not interfere, run the same parts WITHOUT the gear joint (contact mode), or use `cad_assembly` (`action: "validate"`). `solverIterations` (default 4) and `ccdSubsteps` (default 1) are available and echoed in `metrics.solver` — but for thin teeth with a 0.03mm backlash the knobs may not help, and the verdict must say so.
|
|
15
16
|
|
package/docs/en/llm/library.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
> Long-form reference; the short rule lives in `skills/cad-toolbox/SKILL.md`.
|
|
6
6
|
|
|
7
7
|
**99 pre-generated specs (14 families) ship with the plugin and are reached through `cad_part`'s `library` op.**
|
|
8
|
-
The production surface has 9 surfaces /
|
|
8
|
+
The production surface has 9 surfaces / 52 ops.
|
|
9
9
|
This is not BOSL2, and not the spring `standardId` seed used by the assembly checker.
|
|
10
10
|
|
|
11
11
|
## Three different things
|
package/docs/llm/README.md
CHANGED
|
@@ -6,19 +6,19 @@
|
|
|
6
6
|
|
|
7
7
|
## 调用面(2026-11-16 起)
|
|
8
8
|
|
|
9
|
-
生产会话只暴露 **9 个 surface /
|
|
9
|
+
生产会话只暴露 **9 个 surface / 52 个 op**。调用格式是 `cad_<surface>({ action: "<op>", args: { … } })`;本文档统一用这个写法。旧工具名(如 `generate_part`、`check_assembly`)只是内部 op 名,直接调用会报 `unknown tool`。
|
|
10
10
|
|
|
11
11
|
| surface | actions |
|
|
12
12
|
|---|---|
|
|
13
13
|
| `cad_session` | `info` · `init` · `bind` · `review` · `kernel` |
|
|
14
14
|
| `cad_part` | `create` · `generate` · `import` · `merge` · `role` · `appearance` · `retire` · `revert` · `library` |
|
|
15
15
|
| `cad_assembly` | `write` · `validate` · `check` · `datums` · `suggest` |
|
|
16
|
-
| `cad_check` | `printability` · `sheet2d` · `turning` · `cnc` · `edm` · `parts` · `appearance` · `sweep` |
|
|
16
|
+
| `cad_check` | `printability` · `sheet2d` · `turning` · `cnc` · `edm` · `parts` · `appearance` · `sweep` · `retention` |
|
|
17
17
|
| `cad_simulate` | `physics` · `motion` · `fluid` · `lbm` · `stress` · `hotspots` |
|
|
18
18
|
| `cad_inspect` | `measure` · `features` · `attention` · `analyze` · `versions` |
|
|
19
19
|
| `cad_see` | `render` · `review` · `reference` |
|
|
20
20
|
| `cad_python` | `run` · `runtime` |
|
|
21
|
-
| `cad_deliver` | `plan` · `preflight` · `audit` · `affected` · `retire` · `present` · `defer` |
|
|
21
|
+
| `cad_deliver` | `plan` · `preflight` · `audit` · `affected` · `retire` · `present` · `defer` · `invite` |
|
|
22
22
|
|
|
23
23
|
`catalog` / `help` 是每个 surface 自带的两个只读 action:`catalog` 列 op,`help` 给旧参数。
|
|
24
24
|
|
package/docs/llm/assembly.md
CHANGED
|
@@ -92,11 +92,11 @@ from the inline list alone. When an endpoint resolves only against the version,
|
|
|
92
92
|
|
|
93
93
|
## 开工对齐:`brief`(2026-11-14,2026-12-02 增补)
|
|
94
94
|
|
|
95
|
-
|
|
95
|
+
建模之前把下面这些和用户定下来,写进根节点的 `brief`;其中验收集由你推导、不从用户那里收菜单,然后开始画零件:
|
|
96
96
|
|
|
97
97
|
- **buyVsMake**:齿轮、轴承、弹簧、电机、紧固件——买还是做。默认是**问**,不是默认自制;
|
|
98
98
|
- **processes**:用户允许的工艺**集合**(可多选:FDM / 钣金 / CNC / 注塑)。用户给集合,**你**按零件选,并在每个零件的 `process` 里写明谁定的(沿用 `process.source`);
|
|
99
|
-
- **verify
|
|
99
|
+
- **verify:验收集由你推导,不是用户的菜单。** 契约与功能决定适用面:装配(≥2 件)、可制造性(每个要加工的件)、复核(每个打印件)永远适用;有转动副 / 滑动副 / 弹簧 → `motion` 与 `retention`(保持性,**每个装配都要**);载荷路径止于断裂或大变形 → `strength`;动流体 → `flow`;外观只在被要求时。`retention` 的判据:每个零件沿接口轴 / 法向的逃逸方向必须被挡住,或 1 g 场景下没有零件离开原位;`travel` 取啮合长度 + 0.5,无啮合取 3.0,且必须回显。**沉默不是通过**:适用但既没验也没有豁免的维度是 `verify-unexplained`;豁免必须写保持 / 承载机制 + 载荷 + 力预算(或“没有载荷路径”),由审计逐条打印。用户只能**加**(“这项必须跑,不能豁免”),不能减。
|
|
100
100
|
- **预算(`budget.json`)是判据,不是契约**:它不在 `assembly.seal` 的哈希链上,改它不产生 revision。为了不再"判完就说不清按哪版判的",`check_appearance` 会把读到的预算**随 run 存档**(`budget-snapshot.json`:path / sha256 / mtime / 内容),返回值里给 `budget.hash` 与 `modifiedAt`;summary 与 `[budget]` 行带 hash 前 8 位。这样即使工作区不在 git 里,也能复现当时那版判据。**仍没有**的是预算文件自身的变更史(谁改的、为什么)——需要追责时要另做封版。 组上的 `exposure`(`exterior` / `mixed` / `internal`)只做**归属对账**(声明 vs 测量),**不是豁免开关**:声明 `internal` 不会把该组从任何判据里剔除(Q4,2026-12-02 定稿)——“自己能写的豁免”等于没有检查。
|
|
101
101
|
- **limits**(2026-12-02):设计最多能有多大——`maxX` / `maxY` / `maxZ`,mm,指**外廓尺寸**(hi − lo),不是坐标。用户能回答的是“能不能放进 600mm 抽屉”,而 `[lo,hi]` 还顺带固定了一个用户没选过的装配原点。**逐轴可选**:只知道“高度 ≤ 400”也是答案,缺的轴就是不判;确实没有限制时写 `{source:"none", by, note:"为什么没有"}`——**空白不算决定**。`source`(`space` / `mating` / `user-spec`)可选,**只有 `none` 是承重的**:它区分“没有限制”和“忘了写”。它是**前提**,不是判据,也**不换算成 `budget.json` 的 `envelope`**:envelope 是“摆在哪”的位置盒子,由人按需声明;尺寸与位置是两件事,换算需要原点,而原点正是它想避开的假设。 声明了 `limits` 后,`check_appearance` 会拿**实测整场景外廓**(含外购件)与它比较,超界进 `sizeLimit`,并复用 `budget.json` 的 `overruns` 三态(`group:"整机"`、`direction:"above"`、`acceptedBy` 必填);**界内不会把 `check` 变成通过**——只有盒子被量过,外观没被判。
|
|
102
102
|
|
|
@@ -111,7 +111,9 @@ from the inline list alone. When an endpoint resolves only against the version,
|
|
|
111
111
|
(不凭空加色);报告、表格、契约里**不使用**颜色。装配里有同轴复合件、成对齿轮时尤其值得标,
|
|
112
112
|
因为它们最容易被人按颜色叫错名字。
|
|
113
113
|
|
|
114
|
-
**`verify` 是硬要求,其余是记录。** 声明了 `motion` / `strength`,就必须有一条**新鲜**的对应 run(引用最新版本),否则 `cad_deliver` (`action: "audit"`) 直接 `blocked`(`verify-required-motion` / `verify-required-strength`)。**没写 `brief` 时**,只要 ICD 里出现 `转动副` / `滑动副` / `弹簧`,`motion` 自动成为要求(`verify-derived` 会说明这个推导)——这是发条青蛙那次“README 写着未测 live
|
|
114
|
+
**`verify` 是硬要求,其余是记录。** 声明了 `motion` / `strength` / `retention`,就必须有一条**新鲜**的对应 run(引用最新版本),否则 `cad_deliver` (`action: "audit"`) 直接 `blocked`(`verify-required-motion` / `verify-required-strength`)。**没写 `brief` 时**,只要 ICD 里出现 `转动副` / `滑动副` / `弹簧`,`motion` 自动成为要求(`verify-derived` 会说明这个推导)——这是发条青蛙那次“README 写着未测 live 仿真、交付照样过审”的补丁。要缩小范围,由你写一条带理由的豁免(机制 + 载荷 + 预算),审计打印 `verify-waived`——**那是一个决定,不是一次通过**;用户加的“必须跑”项不能被你豁免。
|
|
115
|
+
|
|
116
|
+
**现状(2026-12-04)**:规则已写进 `skills/cad-assembly/SKILL.md`;`verify-unexplained` 与结构化豁免(`verifyExcluded` / `verifyMust`)尚未实现,今天审计仍只校验已声明的项,并对“有运动副却没写 `motion`”打印 `verify-waived`。
|
|
115
117
|
|
|
116
118
|
## Where this sits in the delivery discipline (updated 2026-10-20)
|
|
117
119
|
|
package/docs/llm/engines.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
## 回放:运动的默认表达方式
|
|
8
8
|
|
|
9
|
-
每条仿真运行都会把 `runs/<id>/trajectory.json`(流体是 `frames.json` + 帧二进制)写进 run
|
|
9
|
+
每条仿真运行都会把 `runs/<id>/trajectory.json`(流体是 `frames.json` + 帧二进制)写进 run 目录,**面板的「仿真 → rNNN → 回放」直接读这些文件**(整机页的「回放」页与导航「仿真」段都能到):可暂停、拖动、带事件标记和曲线。工具回复里带 `runId` 与 `playback`,把用户指到那里即可——照抄 `playback`,不要自己描述导航。
|
|
10
10
|
|
|
11
11
|
**齿轮 run 的“穿透 0”不是齿面证据。** 用 physics 的 `gear` 关节时该对的接触是**关闭**的(比率是给定约束),所以 `penetration 0` 是构造出来的;`metrics.gearContactsDisabled` 列出这些对,report 里也有一条专门的 note。要证明齿面不打架,用**不带 gear 关节的接触 run**,或 `cad_assembly` (`action: "validate"`)。求解器可用 `solverIterations`(默认 4)和 `ccdSubsteps`(默认 1)调,生效值回显在 `metrics.solver`——但薄齿 + 0.03mm 侧隙这类几何,调参未必有用,报告里该怎么判就怎么写。
|
|
12
12
|
|
package/docs/llm/library.md
CHANGED