forgecad 0.10.2 → 0.10.4

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 (132) hide show
  1. package/README.md +7 -6
  2. package/dist/assets/{AdminPage-CHY6ZN-p.js → AdminPage-B3L3W1Uo.js} +1 -1
  3. package/dist/assets/{BenchmarkPage-BcRT5iGN.js → BenchmarkPage-DXKVXMrJ.js} +2 -2
  4. package/dist/assets/{BlogPage-BssBbnb-.js → BlogPage-B7BWxOCg.js} +1 -1
  5. package/dist/assets/{DocsPage-DsvdiRNK.js → DocsPage-BPGGwht1.js} +28 -48
  6. package/dist/assets/{EditorApp-Bfd3jbtC.js → EditorApp-BWUGCdD5.js} +183 -21
  7. package/dist/assets/{EditorApp-BpjZgzk0.css → EditorApp-C5f24ZN9.css} +8 -0
  8. package/dist/assets/{EmbedViewer-D5t8WamV.js → EmbedViewer-DygByZS2.js} +2 -2
  9. package/dist/assets/{LandingPageProofDriven-DbN7o-Be.js → LandingPageProofDriven-BoVE7JGY.js} +54 -36
  10. package/dist/assets/{LegalPage-DNGrrY0p.js → LegalPage-Din8wv8d.js} +2 -2
  11. package/dist/assets/{PricingPage-Nczr3pRz.js → PricingPage-C2PMzmDc.js} +2 -2
  12. package/dist/assets/{SettingsPage-DZlyu4d4.js → SettingsPage-BlJDCRe8.js} +1 -1
  13. package/dist/assets/{app-C9ct2hRD.js → app-BsRYSfxY.js} +2264 -6259
  14. package/dist/assets/{backendInit-ymjonyQp.js → backendInit-6C0DLgH0.js} +8290 -2136
  15. package/dist/assets/cli/{render-B_0lQwKU.js → render-XXol_ET7.js} +822 -105
  16. package/dist/assets/{constructionHistoryWorker-CZ42Dksy.js → constructionHistoryWorker-cTHWRJEi.js} +699 -284
  17. package/dist/assets/{evalWorker-C2pm8LHP.js → evalWorker-BssDYW9u.js} +2559 -1330
  18. package/dist/assets/{forgecad_geometry-BlMtqluF.js → forgecad_geometry-CZ_IfuvA.js} +1 -9
  19. package/dist/assets/{forgecad_geometry_bg-BllP_WiL.wasm → forgecad_geometry_bg-C3rQHfwg.wasm} +0 -0
  20. package/dist/assets/{inspectWorker-D5T5VbfK.js → inspectWorker-ymhBV4Ll.js} +6254 -671
  21. package/dist/assets/{jointPose-4r8ed8_5.js → jointPose-B0blBj9A.js} +1 -1
  22. package/dist/assets/{landing-proof-driven-ORyigZ6p.css → landing-proof-driven-Cpf-MIbI.css} +73 -13
  23. package/dist/assets/{manifold-5PP1eGLN.js → manifold-B_7QXpGB.js} +1 -1
  24. package/dist/assets/{manifold-DjBkyIc8.js → manifold-CNShmpEJ.js} +1 -1
  25. package/dist/assets/{manifold-C4r6B-XY.js → manifold-CYlIm-M6.js} +2 -2
  26. package/dist/assets/{reportWorker-CwenM7wB.js → reportWorker-Cb5eyM7D.js} +2485 -1275
  27. package/dist/cli/render.html +1 -1
  28. package/dist/docs/index.html +2 -2
  29. package/dist/docs-raw/AI/usage.md +17 -17
  30. package/dist/docs-raw/CLI.md +9 -7
  31. package/dist/docs-raw/README.md +1 -1
  32. package/dist/docs-raw/component-model.md +2 -2
  33. package/dist/docs-raw/generated/assembly.md +1 -1
  34. package/dist/docs-raw/generated/concepts.md +10 -4
  35. package/dist/docs-raw/generated/core.md +96 -1
  36. package/dist/docs-raw/generated/curves.md +8 -1
  37. package/dist/docs-raw/generated/output.md +0 -64
  38. package/dist/docs-raw/generated/runtime-names.md +6 -6
  39. package/dist/docs-raw/generated/viewport.md +3 -12
  40. package/dist/docs-raw/guides/inspection-bundles.md +1 -1
  41. package/dist/docs-raw/simulation-workflow.md +58 -0
  42. package/{dist-skill/website/skills/forgecad-make-a-model.md → dist/docs-raw/skills/forgecad-build-model.md} +18 -8
  43. package/dist/docs-raw/skills/forgecad-design-spec.md +145 -0
  44. package/dist/docs-raw/skills/{forgecad-model-grader.md → forgecad-grade-model.md} +8 -6
  45. package/{dist-skill/website/skills/forgecad-visual-spec.md → dist/docs-raw/skills/forgecad-image-prompt.md} +7 -7
  46. package/dist/docs-raw/skills/{forgecad-render-inspect.md → forgecad-inspect-model.md} +6 -6
  47. package/{dist-skill/website/skills/forgecad-project.md → dist/docs-raw/skills/forgecad-project-sync.md} +5 -5
  48. package/{dist-skill/website/skills/forgecad-3d-reconstruction.md → dist/docs-raw/skills/forgecad-reconstruct-cad-file.md} +7 -7
  49. package/dist/docs-raw/skills/{forgecad-image-replicator.md → forgecad-reconstruct-from-images.md} +12 -12
  50. package/dist/docs-raw/skills/forgecad-verify-mujoco.md +78 -0
  51. package/dist/docs-raw/skills/forgecad.md +24 -24
  52. package/dist/docs-raw/skills/index.md +9 -13
  53. package/dist/index.html +9 -9
  54. package/dist/llms.txt +7 -7
  55. package/dist/sitemap.xml +16 -16
  56. package/dist-cli/{check-compiler-SP7FAL7R.js → check-compiler-4RPB6SB5.js} +1 -1
  57. package/dist-cli/{check-query-propagation-BRLSHP22.js → check-query-propagation-KN3DFQTX.js} +1 -1
  58. package/dist-cli/{chunk-RQQ42YCP.js → chunk-UHBRMYA6.js} +30770 -29253
  59. package/dist-cli/forgecad.js +3277 -237
  60. package/dist-cli/{forgecad_geometry-7TVSNVUB.js → forgecad_geometry-2IMYCUWW.js} +0 -8
  61. package/dist-cli/forgecad_geometry_bg.wasm +0 -0
  62. package/dist-skill/CONTEXT.md +111 -73
  63. package/dist-skill/SKILL.md +1 -1
  64. package/dist-skill/docs/CLI.md +9 -7
  65. package/dist-skill/docs/generated/assembly.md +1 -1
  66. package/dist-skill/docs/generated/core.md +96 -1
  67. package/dist-skill/docs/generated/curves.md +8 -1
  68. package/dist-skill/docs/generated/output.md +0 -64
  69. package/dist-skill/docs/generated/runtime-names.md +6 -6
  70. package/dist-skill/docs/generated/viewport.md +3 -12
  71. package/dist-skill/docs/guides/inspection-bundles.md +1 -1
  72. package/dist-skill/library/README.md +9 -13
  73. package/dist-skill/library/{forgecad-make-a-model → forgecad-build-model}/SKILL.md +16 -6
  74. package/dist-skill/library/forgecad-design-spec/SKILL.md +132 -0
  75. package/dist-skill/library/{forgecad-prepare-prompt → forgecad-design-spec}/references/master-prompt.md +1 -1
  76. package/dist-skill/library/{forgecad-model-grader → forgecad-grade-model}/SKILL.md +6 -4
  77. package/dist-skill/library/forgecad-grade-model/agents/openai.yaml +4 -0
  78. package/dist-skill/library/{forgecad-visual-spec → forgecad-image-prompt}/SKILL.md +5 -5
  79. package/dist-skill/library/forgecad-image-prompt/agents/openai.yaml +4 -0
  80. package/dist-skill/library/{forgecad-render-inspect → forgecad-inspect-model}/SKILL.md +4 -4
  81. package/dist-skill/library/{forgecad-project → forgecad-project-sync}/SKILL.md +3 -3
  82. package/dist-skill/library/{forgecad-3d-reconstruction → forgecad-reconstruct-cad-file}/SKILL.md +5 -5
  83. package/dist-skill/library/forgecad-reconstruct-cad-file/agents/openai.yaml +4 -0
  84. package/dist-skill/library/{forgecad-image-replicator → forgecad-reconstruct-from-images}/SKILL.md +10 -10
  85. package/dist-skill/library/forgecad-reconstruct-from-images/agents/openai.yaml +4 -0
  86. package/dist-skill/library/forgecad-verify-mujoco/SKILL.md +66 -0
  87. package/dist-skill/library/forgecad-verify-mujoco/scripts/mujoco_verify.py +385 -0
  88. package/{dist/docs-raw/skills/forgecad-make-a-model.md → dist-skill/website/skills/forgecad-build-model.md} +18 -8
  89. package/dist-skill/website/skills/forgecad-design-spec.md +145 -0
  90. package/dist-skill/website/skills/{forgecad-model-grader.md → forgecad-grade-model.md} +8 -6
  91. package/{dist/docs-raw/skills/forgecad-visual-spec.md → dist-skill/website/skills/forgecad-image-prompt.md} +7 -7
  92. package/dist-skill/website/skills/{forgecad-render-inspect.md → forgecad-inspect-model.md} +6 -6
  93. package/{dist/docs-raw/skills/forgecad-project.md → dist-skill/website/skills/forgecad-project-sync.md} +5 -5
  94. package/{dist/docs-raw/skills/forgecad-3d-reconstruction.md → dist-skill/website/skills/forgecad-reconstruct-cad-file.md} +7 -7
  95. package/dist-skill/website/skills/{forgecad-image-replicator.md → forgecad-reconstruct-from-images.md} +12 -12
  96. package/dist-skill/website/skills/forgecad-verify-mujoco.md +78 -0
  97. package/dist-skill/website/skills/forgecad.md +24 -24
  98. package/dist-skill/website/skills/index.md +9 -13
  99. package/examples/analysis/clearance-fit.forge.js +31 -0
  100. package/examples/analysis/lever-arm-actuator.forge.js +43 -0
  101. package/examples/analysis/tipping-tripod.forge.js +35 -0
  102. package/examples/api/texture-projection.forge.js +75 -0
  103. package/examples/assets/uv-grid.png +0 -0
  104. package/examples/products/sportscar.forge.js +77 -0
  105. package/package.json +1 -3
  106. package/dist/docs-raw/skills/forgecad-blockout-model.md +0 -49
  107. package/dist/docs-raw/skills/forgecad-component-model.md +0 -53
  108. package/dist/docs-raw/skills/forgecad-high-level-spec.md +0 -101
  109. package/dist/docs-raw/skills/forgecad-lld.md +0 -41
  110. package/dist/docs-raw/skills/forgecad-prepare-prompt.md +0 -63
  111. package/dist/docs-raw/skills/forgecad-reconstruction-benchmark.md +0 -60
  112. package/dist-skill/library/forgecad-3d-reconstruction/agents/openai.yaml +0 -4
  113. package/dist-skill/library/forgecad-blockout-model/SKILL.md +0 -42
  114. package/dist-skill/library/forgecad-component-model/SKILL.md +0 -46
  115. package/dist-skill/library/forgecad-high-level-spec/SKILL.md +0 -94
  116. package/dist-skill/library/forgecad-image-replicator/agents/openai.yaml +0 -4
  117. package/dist-skill/library/forgecad-lld/SKILL.md +0 -34
  118. package/dist-skill/library/forgecad-model-grader/agents/openai.yaml +0 -4
  119. package/dist-skill/library/forgecad-prepare-prompt/SKILL.md +0 -50
  120. package/dist-skill/library/forgecad-reconstruction-benchmark/SKILL.md +0 -48
  121. package/dist-skill/library/forgecad-reconstruction-benchmark/agents/openai.yaml +0 -4
  122. package/dist-skill/library/forgecad-visual-spec/agents/openai.yaml +0 -4
  123. package/dist-skill/website/skills/forgecad-blockout-model.md +0 -49
  124. package/dist-skill/website/skills/forgecad-component-model.md +0 -53
  125. package/dist-skill/website/skills/forgecad-high-level-spec.md +0 -101
  126. package/dist-skill/website/skills/forgecad-lld.md +0 -41
  127. package/dist-skill/website/skills/forgecad-prepare-prompt.md +0 -63
  128. package/dist-skill/website/skills/forgecad-reconstruction-benchmark.md +0 -60
  129. /package/dist/assets/{landing-proof-driven-DiGqdtWa.js → landing-proof-driven-BxZZh5r5.js} +0 -0
  130. /package/dist-skill/library/{forgecad-prepare-prompt → forgecad-design-spec}/references/default-profiles.md +0 -0
  131. /package/dist-skill/library/{forgecad-render-inspect → forgecad-inspect-model}/summarize_manifest.py +0 -0
  132. /package/dist-skill/library/{forgecad-image-replicator → forgecad-reconstruct-from-images}/scripts/compare_images.py +0 -0
@@ -1,17 +1,17 @@
1
- <!-- Generated by scripts/build-forgecad-skill.mjs — do not edit. Edit agent-skill-library/forgecad-make-a-model/SKILL.md instead. -->
1
+ <!-- Generated by scripts/build-forgecad-skill.mjs — do not edit. Edit agent-skill-library/forgecad-build-model/SKILL.md instead. -->
2
2
 
3
- # forgecad-make-a-model
3
+ # forgecad-build-model
4
4
 
5
- Create manufacture-realistic prototype ForgeCAD (.forge.js) models in the active CAD project. Handles file placement, invokes the forgecad skill for API guidance, and validates the result.
5
+ Build or edit a manufacture-realistic `.forge.js` model in a project, then validate it with run, render, inspect, and export evidence.
6
6
 
7
7
  | Field | Value |
8
8
  | --- | --- |
9
9
  | Installed by | `forgecad skill install` |
10
- | Source | `agent-skill-library/forgecad-make-a-model/SKILL.md` |
10
+ | Source | `agent-skill-library/forgecad-build-model/SKILL.md` |
11
11
 
12
12
  ---
13
13
 
14
- ## Make a Model
14
+ ## Build Model
15
15
 
16
16
  Create new ForgeCAD models in the user's active ForgeCAD project.
17
17
 
@@ -86,7 +86,17 @@ For any mechanism (linkage, hinge, slider, suspension, gripper, drawer), the rig
86
86
 
87
87
  A mechanical script is not done when it merely looks assembled. Every visible piece needs a physical reason to be where it is: fused material, contact faces, a screw stack, a pin in a bore, a tab in a slot, a gasket on a land, a bearing in a seat, a cable in a channel, or a named intentional ghost.
88
88
 
89
- - Bespoke fixed assemblies: build each part in local coordinates, pick one root, place every touching part with `matchTo()`, verify each mate with `verify.connectorDistance`. Final `translate()` calls are not assembly contracts.
89
+ For multi-part assemblies, the component model is mandatory:
90
+
91
+ - Parts build at origin in their own local coordinates. They do not know final assembly-space offsets, sibling dimensions, or world placement.
92
+ - A part's public interface is `shape` plus connectors and metadata, e.g. `return { shape, boltPattern, pinionZ }`. Declare mating faces with `.withConnectors({})`; axes point outward, with prismatic slide axes as the explicit exception.
93
+ - The parent assembly chooses the root and positions every structural part through connectors, `connect()`, `match()`, or `matchTo()`. Final `translate()` calls are not assembly contracts.
94
+ - Data flows down through `require('./part.forge.js', params)` overrides and up through returned metadata. Siblings never import each other; the parent routes shared decisions and measured outputs.
95
+ - Default to one file for a project-specific assembly. Split only for cross-project reuse, independent subassemblies, or when a file grows past roughly 300 lines. Never create `shared-dims.js` just to coordinate siblings.
96
+
97
+ Reject these shortcuts on sight: sibling `require()`, assembly-space coordinates inside a part, `translate()` used to position a structural assembly member, `console.log` + `if` validation instead of `verify.*`, and bare `connector.neutral()` outside a reusable component library with compatibility checks.
98
+
99
+ - Bespoke fixed assemblies: build each part in local coordinates, pick one root, place every touching part with `matchTo()`, verify each mate with `verify.connectorDistance`.
90
100
  - Manual joint frames (`addFixed`/`addRevolute`/`addPrismatic` with a hand-built `frame:`) are scaffolding, not contracts. Before delivery, convert mating interfaces to connectors with `connect()`/`match()`, or prove the manual joint with `forgecad debug assembly --fail-on warning` and documented geometry.
91
101
  - A named part must not contain unintentional disconnected bodies: boolean-join manufactured features, model fasteners/seals as separate named parts, or add the receiving holes/lands that explain the separation.
92
102
  - Screws are not decoration: clearance/counterbore in the cover, receiving boss or through stack in the parent, material around both, axes aligned from one shared bolt pattern.
@@ -101,7 +111,7 @@ Treat `fillet()`/`chamfer()` as experimental (Manifold can be incorrect, OCCT sl
101
111
 
102
112
  ### Imported Parts (User-Supplied 3D Files)
103
113
 
104
- When the user supplies mesh or CAD files to design around (a motor, an off-the-shelf housing, a scanned part), the import IS a component of the assembly — keep it, don't rebuild it parametrically (rebuilding is `forgecad-3d-reconstruction`, a different request).
114
+ When the user supplies mesh or CAD files to design around (a motor, an off-the-shelf housing, a scanned part), the import IS a component of the assembly — keep it, don't rebuild it parametrically (rebuilding is `forgecad-reconstruct-cad-file`, a different request).
105
115
 
106
116
  - Wrap each import in its own part file: `Import.mesh()` for STL/OBJ/3MF, `Import.step()` for STEP (OCCT backend), normalize scale and orientation, recenter to a sane local origin, then treat it exactly like a purchased part — connectors at its real mating features, positioned by the assembly via `matchTo()`.
107
117
  - Never trust units. Verify against a known dimension before mating anything: bbox via `forgecad run --details`, or `inspect section --ray` across a bore or face pair. For 3MF, account for every build item printed by `forgecad run` before flattening.
@@ -153,7 +163,7 @@ A manufacture-realistic model must yield a package a shop can consume, not just
153
163
 
154
164
  ### Render and Inspect Cadence
155
165
 
156
- **You are building blind unless you render.** `forgecad run` passing only means the code didn't crash — it cannot tell you a hole is misplaced, a rib pokes through a cover, or a part doesn't fit. Render from angles chosen for the model's actual geometry and read every PNG. For command syntax, evidence selection, and manifest reading, use the `forgecad-render-inspect` skill and the CLI docs — this skill fixes only the cadence and the gates.
166
+ **You are building blind unless you render.** `forgecad run` passing only means the code didn't crash — it cannot tell you a hole is misplaced, a rib pokes through a cover, or a part doesn't fit. Render from angles chosen for the model's actual geometry and read every PNG. For command syntax, evidence selection, and manifest reading, use the `forgecad-inspect-model` skill and the CLI docs — this skill fixes only the cadence and the gates.
157
167
 
158
168
  Render after every feature addition, boolean cut, symmetric copy placement, and the last feature. Inspect after adding hidden geometry a surface render cannot prove, after adding or moving mating parts, ghosts, connectors, thin walls, or screw holes, and before delivery with thresholds set for the material/process.
159
169
 
@@ -0,0 +1,145 @@
1
+ <!-- Generated by scripts/build-forgecad-skill.mjs — do not edit. Edit agent-skill-library/forgecad-design-spec/SKILL.md instead. -->
2
+
3
+ # forgecad-design-spec
4
+
5
+ Create a ForgeCAD design brief, HLD, or LLD before coding by walking through use, assembly, interfaces, decisions, and verification.
6
+
7
+ | Field | Value |
8
+ | --- | --- |
9
+ | Installed by | `forgecad skill install` |
10
+ | Source | `agent-skill-library/forgecad-design-spec/SKILL.md` |
11
+
12
+ ---
13
+
14
+ ## Design Spec
15
+
16
+ The design document — a git-committed, diff-reviewed markdown file — is the source of truth. Not the code, not the chat, not your head. You iterate it by commit-and-review, and the `git diff` is the review artifact.
17
+
18
+ **Validate the design by mentally operating the thing, step by step.** Walk it as someone assembles, uses, or moves it. The step with no answer — *"how does the servo get inside the housing?"* — is the real design gap. A spec that reads complete on the page can still hide a hole that only surfaces when you try to put it together in your head. State each gap falsifiably: not "tolerances might be tight" but "the 12mm arm cantilevers under gripping load, may flex >0.5mm."
19
+
20
+ **Every number has a reason; the narrative comes before the numbers.** Describe the object as if over the phone, then derive each value and show its math: `wallThickness = 2.4mm = 6 × 0.4mm nozzle`. The design is **implementation-blind** — shaped by the object, never by what the ForgeCAD API makes easy. **Manufacturing process is one of those reasons** — a design decision you weigh, never a default you inherit (never assume FDM/printing).
21
+
22
+ **A vague request is a set of decisions you make honestly, not information to extract.** No placeholders ("appropriate motor"); choose a defensible value, show why, continue. The Decisions table fills only after user review, so the loop stays in the document.
23
+
24
+ ### Altitude — three phases, one document trail
25
+
26
+ | Phase | When | Output |
27
+ |-------|------|--------|
28
+ | Intake | request is fuzzy / process unspecified | engineering brief + master prompt |
29
+ | HLD | design is wrong in *approach*, alternatives exist | `<name>-hld.md` |
30
+ | LLD | decisions locked, or a simple single-body part | `<name>-lld.md` |
31
+
32
+ The HLD carries only decision-driving dimensions and genuinely-different alternatives; the LLD carries enough that someone builds from it alone. Speccing every tolerance in an HLD, or revisiting locked decisions in an LLD, is an altitude error — back up. Simple parts skip straight from HLD to code, or from a request to an LLD.
33
+
34
+ ---
35
+
36
+ ### Phase 1 — Intake (fuzzy request → concrete brief)
37
+
38
+ Use when the user wants something physically real but the ask is vague ("make me a robot gripper", "make it production ready", "pick sensible numbers"). This phase owns intake; once the brief is concrete, continue to HLD or hand off to the `forgecad` skill.
39
+
40
+ **Manufacturing is a design decision, not a default.** Derive the process stack from artifact family, load path, scale, safety expectations, material, production intent, and operating story — never assume printing/plastic. If the user names a process, honor it but warn when it is unsafe or dishonest for the duty. Family→process anchors live in `references/default-profiles.md`.
41
+
42
+ **Default posture: manufacture-realistic prototype** — real materials, purchased-part boundaries, assembly logic, validation; no claims of production tooling or certification. Other postures only when justified: `production-realistic`, `printable`, `visual-CAD`, or a specific process posture (`sheet-metal`, `CNC-machined`, `laser-cut`, `welded-tube`, `injection-molded`, `cast`, `hybrid purchased-hardware`). Pick the posture honest for the artifact, not the easiest CAD surface.
43
+
44
+ **Family-scoped numbers.** Every starter assumption is scoped to one artifact family; never reuse numbers across families.
45
+
46
+ Workflow:
47
+ 1. **Normalize the ask** into plain mechanism language ("6 DOF gripper" → standalone gripper, wrist+gripper, or arm+gripper).
48
+ 2. **Build a specific operating story** — invented (non-famous) org, named program, prototype revision, review moment, mission pressure (pilot gate, demo date, investor milestone), and the generic failure mode to avoid. Prefer bold high-agency stories over modest lab exercises. Never assert the user works for a named real company; use real products only as public comparison anchors; never clone proprietary designs.
49
+ 3. **Classify the artifact family** (`references/default-profiles.md`); use the no-family-fits escape rather than forcing one. Rideables route to human-vehicles, never chassis.
50
+ 4. **Choose the process posture** per the taxonomy above.
51
+ 5. **Pick qualitative levers** — duty (`light`/`general`/`sturdy`), scale (`compact`/`medium`/`large`), cost (`cheapest`/`balanced`/`performance-first`) — and translate to family-scoped starter assumptions.
52
+ 6. **Close only critical gaps** — at most 3 grouped questions, always choice menus, never raw engineering inputs unless the architecture truly depends on them. Good: "light desk demo, useful hobby tool, or sturdier bench mechanism?" Bad: "What payload mass?"
53
+ 7. **Write the engineering brief**: artifact + family + normalized interpretation; operating story + production reason + test setting + failure mode to avoid; output posture; intended loads, size envelope, motion/DOF; process stack + material defaults; purchased-part (BOM) boundary; validation standard; variant policy (versions are selectable params, one rendered at a time); file organization (`main.forge.js` entry for multi-file); explicit uncertainty policy.
54
+ 8. **Emit one master prompt** — fill `references/master-prompt.md`; return the finished prompt, not notes about it. It must demand exactly `BUILD-READY` or `BEST-EFFORT BUILD CANDIDATE` (human-bearing furniture and rideables usually end the latter).
55
+
56
+ Defaults if the user stays vague: `general-duty` / `medium` / `balanced`, invent the operating story, use family starter assumptions.
57
+
58
+ ---
59
+
60
+ ### Phase 2 — High-Level Design (HLD)
61
+
62
+ Aligns user and agent on *what* to build before *how*. Brevity is a readability tool, not a metric — include whatever evidence, diagrams, and dimensions a good decision needs. Write the sections top to bottom; the order is the workflow.
63
+
64
+ ```markdown
65
+ # [Name] — High-Level Design
66
+
67
+ ## Problem
68
+ What must this do? Hard requirements (grip 40-90mm objects, fit a 60mm
69
+ housing, use purchased bearings). State the problem without implying a
70
+ solution. Unspecified process choice is an open design dimension.
71
+
72
+ ## Approach
73
+ How it works conceptually. ASCII diagram of key elements and their
74
+ spatial relationships — diagram labels stay in this markdown, never
75
+ carried into CAD geometry unless the real artifact needs markings.
76
+
77
+ ## Key Interfaces
78
+ Every point where this touches another part or the outside world:
79
+ mating surfaces, shared dimensions, coordination points. These are the
80
+ contracts that constrain the design.
81
+
82
+ ## Dictionary
83
+ | Term | What it is |
84
+ Define every domain term in plain words, with dimensions where relevant.
85
+ Write for a developer without a mechanical-engineering background.
86
+
87
+ ## Alternatives
88
+ | Option | Description | Tradeoff |
89
+ 2-3 genuinely different strategies, not minor variations. Mark one
90
+ recommended and say why. If there is honestly one approach, say so.
91
+
92
+ ## Usage Guide
93
+ Work backwards from how someone uses, assembles, or operates the thing,
94
+ step by step. If a step doesn't make sense ("how does the servo get
95
+ inside?"), flag it inline with ⚠️ and promote it to Concerns.
96
+
97
+ ## Concerns
98
+ 1. Numbered, falsifiably specific — a reviewer must be able to say "real
99
+ problem" or "fine, because…".
100
+
101
+ ## Decisions
102
+ | # | Decision | Rationale |
103
+ Filled ONLY after user review — never pre-decide. Each row resolves a
104
+ concern or alternative.
105
+ ```
106
+
107
+ Rules: if you're speccing every part, formula, and tolerance, you're writing an LLD — back up. If you can't draw it, you don't understand it yet.
108
+
109
+ ---
110
+
111
+ ### Phase 3 — Low-Level Design (LLD)
112
+
113
+ Implements the HLD's locked Decisions table; it never revisits those decisions. Simple single-body parts skip the HLD and start here. Complex assemblies split into a numbered directory: overview, global constraints, per-component files, assembly, verification.
114
+
115
+ An LLD is **narrative-first** (reads like describing the object over the phone), **authoritative** (the single source code implements), **implementation-blind**, and shows **every number's rationale**.
116
+
117
+ Required structure:
118
+ 1. **Narrative** — what it is, how it behaves and interacts, why it exists. Concrete comparisons ("about the size of a deck of cards"); no ungrounded vague terms.
119
+ 2. **Technical** — typed parameter table (length / angle / count / boolean / choice / ratio / clearance — design-document vocabulary, not the runtime `Param.*` API), always with units (mm, degrees default) and a rationale for every default and range; derived dimensions shown as math; geometry and constraints, each constraint with a rationale.
120
+ 3. **Verification** — mandatory checklist: dimensional, functional, printability/process checks.
121
+
122
+ Don'ts: never open with a parameter list (story before numbers), never leave a constraint implicit, never skip verification. Completeness gate before presenting: can someone build from this alone? Does it implement every HLD decision? Is every constraint explicit with a rationale?
123
+
124
+ ---
125
+
126
+ ### Review via git
127
+
128
+ HLDs and LLDs iterate through git, not conversation:
129
+ - **Commit every version.** No drafts floating in chat. After writing, commit and tell the user it's ready for review.
130
+ - **Feedback arrives as file edits (inline comments, strikethroughs) or chat — check both.** Read `git diff`: the diff is the review artifact.
131
+ - **Update, commit, repeat** until the Decisions table is filled and the user says "go."
132
+
133
+ ### Pipeline
134
+
135
+ | Stage | This skill's phase | Output | Next |
136
+ |-------|--------------------|--------|------|
137
+ | Explore a fuzzy ask | Intake | engineering brief + master prompt | HLD |
138
+ | Decide *what* to build | HLD | `*-hld.md` (Decisions filled) | LLD |
139
+ | Detail *how* to build | LLD | `*-lld.md` | `forgecad-build-model` + `forgecad` → `.forge.js` |
140
+
141
+
142
+ ## Bundled Files
143
+
144
+ - `references/default-profiles.md`
145
+ - `references/master-prompt.md`
@@ -1,17 +1,17 @@
1
- <!-- Generated by scripts/build-forgecad-skill.mjs — do not edit. Edit agent-skill-library/forgecad-model-grader/SKILL.md instead. -->
1
+ <!-- Generated by scripts/build-forgecad-skill.mjs — do not edit. Edit agent-skill-library/forgecad-grade-model/SKILL.md instead. -->
2
2
 
3
- # forgecad-model-grader
3
+ # forgecad-grade-model
4
4
 
5
- Analyze, verify, and grade ForgeCAD or CAD-as-code models against a user requirement, design brief, prompt, reference, or acceptance criteria. Use when asked to evaluate, judge, QA, benchmark, score, rate, or compare a CAD model; render it from multiple angles, run targeted inspections when needed, visually verify the evidence, and produce a 0-10 score with concise justification.
5
+ Grade a ForgeCAD or CAD-as-code model against a requirement, brief, prompt, reference, or acceptance criteria with evidence and a 0-10 score.
6
6
 
7
7
  | Field | Value |
8
8
  | --- | --- |
9
9
  | Installed by | `forgecad skill install` |
10
- | Source | `agent-skill-library/forgecad-model-grader/SKILL.md` |
10
+ | Source | `agent-skill-library/forgecad-grade-model/SKILL.md` |
11
11
 
12
12
  ---
13
13
 
14
- ## ForgeCAD Model Grader
14
+ ## Grade Model
15
15
 
16
16
  Grade the delivered model against the requirement, not against what could be fixed later. Never edit the model unless the user explicitly requests repairs — then record the baseline grade first, change, and re-grade.
17
17
 
@@ -21,7 +21,7 @@ Grade the delivered model against the requirement, not against what could be fix
21
21
  2. **Run the model**: `forgecad run <model>.forge.js` (in the ForgeCAD repo use the local build, `node dist-cli/forgecad.js run ...`). If it fails to execute, stop and apply the caps.
22
22
  3. **Render** at least `iso`, `front`, `right`, `top` to a scratch dir; add views (back, bottom, close-up, section) when the model is asymmetric, hollow, mechanical, or likely to hide mistakes.
23
23
  4. **Open and look at every PNG** — never score from command output alone. Check silhouette, proportions, required features, part boundaries, interfaces, and whether the model reads as the requested artifact from more than one angle.
24
- 5. **Inspect** whenever hidden internals, fit, wall thickness, or assembly behavior are central to the brief — grading without inspecting them caps the score. Delegate evidence choice, commands, and manifest reading to the `forgecad-render-inspect` skill. Findings (unexpected collisions, thin regions, floating bodies, wrong component counts) are evidence, not warnings to wave away.
24
+ 5. **Inspect** whenever hidden internals, fit, wall thickness, or assembly behavior are central to the brief — grading without inspecting them caps the score. Delegate evidence choice, commands, and manifest reading to the `forgecad-inspect-model` skill. Findings (unexpected collisions, thin regions, floating bodies, wrong component counts) are evidence, not warnings to wave away.
25
25
  6. **Score**: fill the rubric, apply caps, give a final 0-10 in whole or `.5` increments. Unknowns count against the score.
26
26
 
27
27
  ### Rubric
@@ -47,6 +47,7 @@ Maximum scores, applied after the rubric:
47
47
  - A must-have requirement is absent: max `6`.
48
48
  - Visually recognizable but physically impossible for the requested use: max `6`.
49
49
  - Internals, fit, walls, or assembly central to the brief but uninspected: max `7`.
50
+ - Multi-part assembly violates the ForgeCAD component model — sibling imports, assembly-space coordinates inside parts, structural `translate()` placement, missing connector mates, or parent/child data flow confusion: max `7`; max `6` when the violation makes the assembly brittle or mechanically wrong.
50
51
  - Inspection finds unexpected collisions, floating bodies, critical thin walls, or wrong connectivity: max `6`; max `5` when the defect invalidates the main function.
51
52
  - Delivered as a finished product/prototype but presented with default flat lighting (no `scene()` rig), a generically colorful or material-false palette, or teaching-diagram styling: max `8`. Does not apply when the brief asks for a blockout or bare technical study.
52
53
  - Any score relying on an assumption the evidence cannot verify: mark it `Unknown`, never score above `8`.
@@ -73,6 +74,7 @@ Next fixes: the 2-5 highest-leverage improvements.
73
74
  - Grade the default returned model unless the user names a parameter set or variant.
74
75
  - No points for comments, labels, or intentions absent from the geometry.
75
76
  - Decorative screws, floating labels, and teaching-diagram callouts are not real mechanical interfaces.
77
+ - For multi-part assemblies, require the component model: parts build locally at origin, expose connectors/metadata, the parent positions them, and inter-part data flows through parent props and returned metadata.
76
78
  - Cite which render or inspection finding drove the grade.
77
79
  - When comparing models, use identical checklist, cameras, inspection evidence, and caps for all.
78
80
 
@@ -1,25 +1,25 @@
1
- <!-- Generated by scripts/build-forgecad-skill.mjs — do not edit. Edit agent-skill-library/forgecad-visual-spec/SKILL.md instead. -->
1
+ <!-- Generated by scripts/build-forgecad-skill.mjs — do not edit. Edit agent-skill-library/forgecad-image-prompt/SKILL.md instead. -->
2
2
 
3
- # forgecad-visual-spec
3
+ # forgecad-image-prompt
4
4
 
5
- Turn a concrete ForgeCAD artifact, build brief, HLD, or existing model into builder-honest image prompts for AI image models. Use when the user wants visual-spec renders that show the final product while keeping mechanisms, seams, hardware, and build cues visible instead of drifting into concept art.
5
+ Write builder-honest AI image prompts from a concrete ForgeCAD model, build brief, HLD, or LLD without hiding how the artifact is built.
6
6
 
7
7
  | Field | Value |
8
8
  | --- | --- |
9
9
  | Installed by | `forgecad skill install` |
10
- | Source | `agent-skill-library/forgecad-visual-spec/SKILL.md` |
10
+ | Source | `agent-skill-library/forgecad-image-prompt/SKILL.md` |
11
11
 
12
12
  ---
13
13
 
14
- ## ForgeCAD Visual Spec
14
+ ## Image Prompt
15
15
 
16
16
  ### Scope
17
17
 
18
- Only for artifacts already concrete enough to visualize (a specific `.forge.js` model, build brief, or HLD); route vague briefs to `forgecad-prepare-prompt` first. Read minimum context — entry `.forge.js`, one key helper if it delegates geometry, brief/HLD — and capture what must survive the image model: artifact type and scale, major subassemblies, actuation style, visible mechanisms, material and color cues.
18
+ Only for artifacts already concrete enough to visualize (a specific `.forge.js` model, build brief, or HLD); route vague briefs to `forgecad-design-spec` first. Read minimum context — entry `.forge.js`, one key helper if it delegates geometry, brief/HLD — and capture what must survive the image model: artifact type and scale, major subassemblies, actuation style, visible mechanisms, material and color cues.
19
19
 
20
20
  ### Core Rule
21
21
 
22
- Visual-spec prompts, not concept art: show the final artifact clearly, preserve build and subsystem truth, and keep visible the seams, modules, hardware, and mechanical hierarchy that matter.
22
+ Image prompts, not concept art: show the final artifact clearly, preserve build and subsystem truth, and keep visible the seams, modules, hardware, and mechanical hierarchy that matter.
23
23
 
24
24
  Negatives (the only negatives list — reuse it, never restate variants):
25
25
 
@@ -1,21 +1,21 @@
1
- <!-- Generated by scripts/build-forgecad-skill.mjs — do not edit. Edit agent-skill-library/forgecad-render-inspect/SKILL.md instead. -->
1
+ <!-- Generated by scripts/build-forgecad-skill.mjs — do not edit. Edit agent-skill-library/forgecad-inspect-model/SKILL.md instead. -->
2
2
 
3
- # forgecad-render-inspect
3
+ # forgecad-inspect-model
4
4
 
5
- Run and interpret ForgeCAD inspection bundles for model verification. Use when asked to inspect a ForgeCAD model, analyze an inspection bundle, validate collisions, wall thickness, connectivity, floating bodies, sections, masks, depth, normals, or Zebra stripes.
5
+ Select, run, and interpret ForgeCAD inspection evidence for collisions, sections, wall thickness, components, masks, depth, normals, surface continuity, and fit.
6
6
 
7
7
  | Field | Value |
8
8
  | --- | --- |
9
9
  | Installed by | `forgecad skill install` |
10
- | Source | `agent-skill-library/forgecad-render-inspect/SKILL.md` |
10
+ | Source | `agent-skill-library/forgecad-inspect-model/SKILL.md` |
11
11
 
12
12
  ---
13
13
 
14
- ## ForgeCAD Render Inspect
14
+ ## Inspect Model
15
15
 
16
16
  Use `forgecad inspect ...` when a shaded render is too ambiguous and you need structured evidence: a bundle directory with evidence PNGs plus a root `manifest.json` (or, for `inspect section`, a probe directory with `result.json`, `section.svg`, `section.png`). Inspection is not a substitute artifact: look inside with sections, masks, `--focus`/`--hide`, and transparency — never edit the model into a cutaway or exploded default to make inspecting easier. Output dirs: let `inspect` allocate its timestamped directory by default (repeated probes never collide); use `/tmp/<model>-inspect` for throwaway bundles, a project directory only for persistent artifacts.
17
17
 
18
- Routing: authoring/API questions → `forgecad` skill; creating a new model → `forgecad-make-a-model`.
18
+ Routing: authoring/API questions → `forgecad` skill; creating a new model → `forgecad-build-model`.
19
19
 
20
20
  ### Workflow
21
21
 
@@ -1,17 +1,17 @@
1
- <!-- Generated by scripts/build-forgecad-skill.mjs — do not edit. Edit agent-skill-library/forgecad-project/SKILL.md instead. -->
1
+ <!-- Generated by scripts/build-forgecad-skill.mjs — do not edit. Edit agent-skill-library/forgecad-project-sync/SKILL.md instead. -->
2
2
 
3
- # forgecad-project
3
+ # forgecad-project-sync
4
4
 
5
- ForgeCAD project CLI workflow creating, managing, syncing projects and files on forgecad.io. Covers init, push, pull, file operations, member management, publishing, and sharing.
5
+ Manage hosted ForgeCAD project sync from the CLI: init, clone, pull, push, file operations, members, publishing, and shares.
6
6
 
7
7
  | Field | Value |
8
8
  | --- | --- |
9
9
  | Installed by | `forgecad skill install` |
10
- | Source | `agent-skill-library/forgecad-project/SKILL.md` |
10
+ | Source | `agent-skill-library/forgecad-project-sync/SKILL.md` |
11
11
 
12
12
  ---
13
13
 
14
- ## ForgeCAD Project Operating Rules
14
+ ## Project Sync
15
15
 
16
16
  forgecad.io is the hosted ForgeCAD platform; a project is a local folder linked to the server by `forgecad.json`. The full command inventory (project, file, member, share, token commands and flags) lives in `forgecad project --help` and the forgecad skill's `docs/CLI.md` — do not relearn it here.
17
17
 
@@ -1,21 +1,21 @@
1
- <!-- Generated by scripts/build-forgecad-skill.mjs — do not edit. Edit agent-skill-library/forgecad-3d-reconstruction/SKILL.md instead. -->
1
+ <!-- Generated by scripts/build-forgecad-skill.mjs — do not edit. Edit agent-skill-library/forgecad-reconstruct-cad-file/SKILL.md instead. -->
2
2
 
3
- # forgecad-3d-reconstruction
3
+ # forgecad-reconstruct-cad-file
4
4
 
5
- Reconstruct a parametric ForgeCAD model from an existing 3D CAD or mesh file such as STL, OBJ, 3MF, STEP, or STP; inspect the source asset directly, author real ForgeCAD geometry, and iteratively compare the candidate with `forgecad compare 3d`.
5
+ Reconstruct a readable parametric ForgeCAD model from an existing CAD or mesh file such as STL, OBJ, 3MF, STEP, or STP.
6
6
 
7
7
  | Field | Value |
8
8
  | --- | --- |
9
9
  | Installed by | `forgecad skill install` |
10
- | Source | `agent-skill-library/forgecad-3d-reconstruction/SKILL.md` |
10
+ | Source | `agent-skill-library/forgecad-reconstruct-cad-file/SKILL.md` |
11
11
 
12
12
  ---
13
13
 
14
- ## ForgeCAD 3D Reconstruction
14
+ ## Reconstruct CAD File
15
15
 
16
16
  The reference asset is evidence, not the deliverable. The deliverable is a readable, parametric `.forge.js` model that runs, renders, and scores well against the source. Never return `Import.mesh()`/`Import.step()` of the source as the final model unless the user explicitly asks for an import wrapper — imports are for measurement, rendering, and scoring only.
17
17
 
18
- Routing: user wants to KEEP the file as a live component and design around it (bracket, enclosure, mating assembly) → `forgecad-make-a-model` (Imported Parts section), not this skill; benchmark/RL episodes → `forgecad-reconstruction-benchmark`; inspection-bundle interpretation → `forgecad-render-inspect`; independent grading after reconstruction → `forgecad-model-grader`; API and command reference → `forgecad` skill + CLI.md.
18
+ Routing: user wants to KEEP the file as a live component and design around it (bracket, enclosure, mating assembly) → `forgecad-build-model` (Imported Parts section), not this skill; prepared benchmark/RL episodes → use the task-local benchmark instructions, not the public skill library; inspection-bundle interpretation → `forgecad-inspect-model`; independent grading after reconstruction → `forgecad-grade-model`; API and command reference → `forgecad` skill + CLI.md.
19
19
 
20
20
  ### Workflow
21
21
 
@@ -50,7 +50,7 @@ Faceted sources: decide whether tessellation itself is evidence. Matching low-po
50
50
 
51
51
  ### Done Criteria
52
52
 
53
- The final model must run, render, re-compare at `--samples 5000`, and pass an `inspect compare overlay`. Add targeted inspects (`forgecad-render-inspect`) when the object is multi-part, hollow, thin-walled, or surface-sensitive. Report: source and candidate paths, score JSON path, final metrics, and every known mismatch classified as intentional simplification or remaining work.
53
+ The final model must run, render, re-compare at `--samples 5000`, and pass an `inspect compare overlay`. Add targeted inspects (`forgecad-inspect-model`) when the object is multi-part, hollow, thin-walled, or surface-sensitive. Report: source and candidate paths, score JSON path, final metrics, and every known mismatch classified as intentional simplification or remaining work.
54
54
 
55
55
 
56
56
  ## Bundled Files
@@ -1,26 +1,26 @@
1
- <!-- Generated by scripts/build-forgecad-skill.mjs — do not edit. Edit agent-skill-library/forgecad-image-replicator/SKILL.md instead. -->
1
+ <!-- Generated by scripts/build-forgecad-skill.mjs — do not edit. Edit agent-skill-library/forgecad-reconstruct-from-images/SKILL.md instead. -->
2
2
 
3
- # forgecad-image-replicator
3
+ # forgecad-reconstruct-from-images
4
4
 
5
- Build real ForgeCAD geometry from one or more reference images by treating images as evidence, inferring the object, then validating against both reference-matched and canonical views.
5
+ Reconstruct a real parametric ForgeCAD object from reference images by using images as evidence, not as a one-view facade.
6
6
 
7
7
  | Field | Value |
8
8
  | --- | --- |
9
9
  | Installed by | `forgecad skill install` |
10
- | Source | `agent-skill-library/forgecad-image-replicator/SKILL.md` |
10
+ | Source | `agent-skill-library/forgecad-reconstruct-from-images/SKILL.md` |
11
11
 
12
12
  ---
13
13
 
14
- ## ForgeCAD Image Replicator
14
+ ## Reconstruct From Images
15
15
 
16
16
  The reference image is evidence, not the deliverable. The deliverable is a real parametric object that holds up from front, back, side, top, bottom, and reference camera views — a model that matches one image but falls apart from other angles has failed, even if the comparison board looks close. Cutaway, sectioned, exploded, or transparent references are evidence about the complete object: build the closed artifact and recreate explanatory views with viewer/inspection tools (the main `forgecad` skill's closed-artifact rule applies).
17
17
 
18
18
  ### Companion Skills
19
19
 
20
20
  - `forgecad` — API docs, model authoring, renderer behavior.
21
- - `forgecad-prepare-prompt` — when the images underdetermine artifact family, process posture, scale, operating story, or validation boundary.
22
- - `forgecad-make-a-model` — file placement, project structure, decomposition, definition of done.
23
- - `forgecad-render-inspect` — pre-delivery inspection for multi-part, internal, mechanical, thin-wall, or fit-sensitive objects.
21
+ - `forgecad-design-spec` — when the images underdetermine artifact family, process posture, scale, operating story, or validation boundary.
22
+ - `forgecad-build-model` — file placement, project structure, decomposition, definition of done.
23
+ - `forgecad-inspect-model` — pre-delivery inspection for multi-part, internal, mechanical, thin-wall, or fit-sensitive objects.
24
24
 
25
25
  ### Core Rule
26
26
 
@@ -30,19 +30,19 @@ Infer the real object before matching any camera — identity, manufacture, scal
30
30
 
31
31
  1. Stage references in `/tmp/<slug>-replicate/refs`, keeping originals and adding view names where possible (`front`, `side`, `rear-iso`, `top`, `detail`).
32
32
  2. Read each image as evidence, recording: visible facts; scale cues; camera cues; unknowns (hidden/occluded geometry); conflicts across images or stylization.
33
- 3. Write a Real Object Brief — a hard gate before modeling: (a) artifact identity + operating story; (b) assumed scale and units; (c) process posture + part/BOM boundary (real geometry vs purchased vs ghost vs omitted); (d) inferred hidden-side geometry + expected canonical front/back/left/right/top/bottom forms; (e) validation views and inspection evidence. Use `forgecad-prepare-prompt` when these are underdetermined.
34
- 4. Build a coarse 3D blockout — model the object, not the image: large volumes, axes, symmetry, side depth, rear form, underside, hidden continuations. Render canonical views before any reference-camera comparison. Follow `forgecad-make-a-model` for project structure.
33
+ 3. Write a Real Object Brief — a hard gate before modeling: (a) artifact identity + operating story; (b) assumed scale and units; (c) process posture + part/BOM boundary (real geometry vs purchased vs ghost vs omitted); (d) inferred hidden-side geometry + expected canonical front/back/left/right/top/bottom forms; (e) validation views and inspection evidence. Use `forgecad-design-spec` when these are underdetermined.
34
+ 4. Build a coarse 3D blockout — model the object, not the image: large volumes, axes, symmetry, side depth, rear form, underside, hidden continuations. Render canonical views before any reference-camera comparison. Follow `forgecad-build-model` for project structure.
35
35
  5. Calibrate one camera per usable reference, only after the blockout makes sense from canonical views. Use the object center as `target`; estimate azimuth/elevation/distance/FOV from visible faces and perspective cues; use orthographic when parallel edges stay parallel with no perspective convergence.
36
36
  6. Render comparison boards: render the model from each calibrated reference camera and place it next to the original. Never compare from memory.
37
37
  7. Iterate one class of change at a time, in order: object hypothesis → major proportions → canonical geometry → camera → details → presentation. If improving one reference view makes another view or a canonical render worse, the object hypothesis is wrong — fix the model, not the camera illusion.
38
38
  8. Use every image as a constraint. Never pick one target image and ignore the rest: assign each image a camera, evidence list, and confidence; optimize one shared geometry against the whole set; state how distorted or decorative images were weighted.
39
- 9. Validate the final object: `forgecad run`, reference comparison boards, canonical renders, and targeted inspections via `forgecad-render-inspect`.
39
+ 9. Validate the final object: `forgecad run`, reference comparison boards, canonical renders, and targeted inspections via `forgecad-inspect-model`.
40
40
 
41
41
  ### Comparison Boards
42
42
 
43
43
  Render with exact `--camera` specs (see the forgecad CLI doc for supported forms). If exact full camera specs do not render, fix the renderer before continuing — never substitute guesses from default `iso` renders.
44
44
 
45
- Build side-by-side boards with the bundled self-contained `uv` helper (installs Pillow on demand). Resolve `scripts/compare_images.py` relative to the installed `forgecad-image-replicator` skill directory:
45
+ Build side-by-side boards with the bundled self-contained `uv` helper (installs Pillow on demand). Resolve `scripts/compare_images.py` relative to the installed `forgecad-reconstruct-from-images` skill directory:
46
46
 
47
47
  ```bash
48
48
  uv run <skill-dir>/scripts/compare_images.py refs/front.png render-front.png compare-front.png
@@ -0,0 +1,78 @@
1
+ <!-- Generated by scripts/build-forgecad-skill.mjs — do not edit. Edit agent-skill-library/forgecad-verify-mujoco/SKILL.md instead. -->
2
+
3
+ # forgecad-verify-mujoco
4
+
5
+ Verify a ForgeCAD MJCF export in MuJoCo with dynamics, contacts, controls, joint travel, and rendered evidence before calling it simulation-ready.
6
+
7
+ | Field | Value |
8
+ | --- | --- |
9
+ | Installed by | `forgecad skill install` |
10
+ | Source | `agent-skill-library/forgecad-verify-mujoco/SKILL.md` |
11
+
12
+ ---
13
+
14
+ ## Verify MuJoCo
15
+
16
+ Use this when `forgecad export mjcf ...` is part of the deliverable. A model is not sim-ready just because `forgecad check simready` passes or the MJCF file loads: it must be loaded in MuJoCo, stepped under gravity, driven with the intended controls, contact pairs inspected, and rendered from useful views.
17
+
18
+ Routing: geometry-only visual inspection -> `forgecad-inspect-model`; model authoring/API questions -> `forgecad`; building a new model -> `forgecad-build-model`.
19
+
20
+ ### Definition Of Done
21
+
22
+ 1. **Export from the exact source file.**
23
+ ```bash
24
+ rm -rf /tmp/forgecad-mjcf && mkdir -p /tmp/forgecad-mjcf
25
+ forgecad export mjcf path/to/model.forge.js --output /tmp/forgecad-mjcf
26
+ ```
27
+ 2. **Load the generated scene in MuJoCo.** Use `scene.xml`, not only the model XML, so the floor/camera/package context is included.
28
+ 3. **Check the root behavior.** If the model has a free root, it needs real support/contact geometry or an explicit fixed-root export path. Do not hide a floor failure by turning the whole shell into a giant bounding box that blocks moving internals.
29
+ 4. **Check initial poses numerically.** For mechanisms, compute the expected body/link axes from the design source and compare them to MuJoCo `xmat`/`xpos`. Joint `ref`/default and connector frames can disagree with visual intuition.
30
+ 5. **Keep meaningful collisions.** Do not mark moving functional parts `Sim.collider.none(...)` just to make motion pass. If full visual mesh contact is unstable, use a physically defensible simplified collider or proxy and state what physical surface it represents.
31
+ 6. **Run the intended control with numeric acceptance criteria.** Define the expected signed post-settle joint travel before running the test: e.g. "this drive should rotate the drum -0.04 to -0.06 cycles, then stop near zero velocity" or "this wheel should move at least +1 cycle and keep spinning". Use cycles for revolute/indexing mechanisms when that is easier to reason about, and radians for direct MuJoCo qpos checks. A controller that only jitters, moves the wrong direction, overshoots through a stop, or eventually jams after skipping the intended state is a failure even when the process exits 0.
32
+ 7. **Inspect contact pairs.** Contact names should match the physical story: floor/support, card/card, wheel/ground, stop/follower, etc. Contacts against a filled-in AABB, hidden fixture, or unrelated side plate usually indicate bad collider selection.
33
+ 8. **Render evidence.** Save initial, settled, and driven frames from views that actually show the moving parts. If the model orientation is not obvious, generate a labeled camera preview grid first, inspect it, then rerun with the azimuth/elevation that shows the functional face. Do not report GIFs/frames before visually confirming they are not from the back, underside, or an occluded side.
34
+
35
+ ### Helper Script
36
+
37
+ This skill ships a MuJoCo smoke verifier:
38
+
39
+ ```bash
40
+ uv run --python 3.11 --with mujoco --with pillow \
41
+ python <this-skill-dir>/scripts/mujoco_verify.py /tmp/forgecad-mjcf \
42
+ --settle-seconds 2 \
43
+ --seconds 8 \
44
+ --actuator drum_velocity=-0.75 \
45
+ --watch-joint drum_joint \
46
+ --expect-drive-cycles drum_joint=-0.06:-0.03 \
47
+ --expect-final-qvel drum_joint=-0.02:0.02 \
48
+ --render-dir /tmp/forgecad-mjcf/verify \
49
+ --camera-preview-grid
50
+ ```
51
+
52
+ Use `--actuator name=value` more than once for multi-actuator models. Use `--expect-drive-cycles joint=min:max` to assert signed final-minus-settled revolute travel in cycles/turns. Use `--expect-drive-delta joint=min:max` when you want raw MuJoCo qpos units instead. Use `--expect-final-qvel joint=min:max` to assert terminal velocity when the mechanism should stop or continue at a bounded speed. The script prints JSON with root drift, initial-to-final joint delta, post-settle drive delta, derived cycle counts, final velocities, expectation ranges, and top contact pairs, then writes PNG frames if `--render-dir` is supplied.
53
+
54
+ Prefer explicit travel envelopes over loose "it moved" checks:
55
+
56
+ - Stops/latches: assert a signed drive cycle or delta range and a near-zero final velocity range.
57
+ - Continuous drives: assert the signed drive cycle/delta is large enough over the run and final velocity remains in the expected direction/range.
58
+ - Indexing mechanisms: assert the expected cycle step size, not just eventual stall. If the mechanism reaches a stop only after skipping several indices, treat that as failure.
59
+ - Gravity-settling mechanisms: evaluate functional travel with post-settle drive delta, not initial-to-final delta.
60
+
61
+ When rendered orientation matters, start with `--camera-preview-grid`, open `camera_preview_grid.png`, pick the azimuth that shows the mechanism face or contact interface, then rerun with `--camera-azimuth <deg>` and any needed `--camera-lookat`, `--camera-distance`, or `--camera-elevation` adjustment. For mechanism evidence, prefer front/front-quarter views for user-facing GIFs and add a side/contact view only when it explains a collision better.
62
+
63
+ ### Contact Debugging Rules
64
+
65
+ - In MuJoCo UI, enable contact visualization with `Rendering` -> `Contact points` and `Contact forces`; use the right-side perturb/visualization panels if available in your build.
66
+ - If rotation is blocked, list contacts during the stall and sort by repeated pairs. The blocker is usually the pair that appears every step while the driven joint velocity trends to zero.
67
+ - If a body falls through the floor, inspect the exported geoms. Visual geoms have `contype="0" conaffinity="0"` and cannot support anything; collision geoms are usually group 3.
68
+ - Bounding boxes are fast but dangerous for hollow frames, windows, handles, and side plates. They collide as the filled AABB, not the visible object.
69
+ - Mesh collision on complex moving parts can be too exact or solver-hostile. Prefer simple physical proxies for contact-critical moving bodies, such as a slab for a flap card or cylinders for rolling contact, but keep them colliding.
70
+
71
+ ### Reporting
72
+
73
+ Report the exact export command, the MuJoCo command/script, key numeric results, the most important contact pairs, and the rendered image paths. Say what was not verified. Never say "sim-ready" when only `forgecad run`, `forgecad check simready`, or a successful export was executed.
74
+
75
+
76
+ ## Bundled Files
77
+
78
+ - `scripts/mujoco_verify.py`