forgecad 0.10.4 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (121) hide show
  1. package/dist/assets/{AdminPage-B3L3W1Uo.js → AdminPage-B1nIvqLS.js} +1 -1
  2. package/dist/assets/{BenchmarkPage-DXKVXMrJ.js → BenchmarkPage-YZJbw5nd.js} +2 -2
  3. package/dist/assets/{BlogPage-B7BWxOCg.js → BlogPage-DIWRApKS.js} +1 -1
  4. package/dist/assets/{DocsPage-BPGGwht1.js → DocsPage-ClL6X1hR.js} +8 -22
  5. package/dist/assets/EditorApp-CYBDvSyT.js +17067 -0
  6. package/dist/assets/{EmbedViewer-DygByZS2.js → EmbedViewer-Dmfu_LIw.js} +2 -2
  7. package/dist/assets/{LandingPageProofDriven-BoVE7JGY.js → LandingPageProofDriven-XYTiYxfM.js} +2 -2
  8. package/dist/assets/{LegalPage-Din8wv8d.js → LegalPage-D5Z3CscF.js} +2 -2
  9. package/dist/assets/{PricingPage-C2PMzmDc.js → PricingPage-BP4lIGio.js} +2 -2
  10. package/dist/assets/{SettingsPage-BlJDCRe8.js → SettingsPage-D3bcPBsC.js} +1 -1
  11. package/dist/assets/{app-BsRYSfxY.js → app-BKjogwIZ.js} +3288 -512
  12. package/dist/assets/{backendInit-6C0DLgH0.js → backendInit-6a9-ilom.js} +80498 -74979
  13. package/dist/assets/cli/{render-XXol_ET7.js → render-CMNudGb0.js} +1264 -113
  14. package/dist/assets/{constructionHistoryWorker-cTHWRJEi.js → constructionHistoryWorker-BuZgc606.js} +8369 -6839
  15. package/dist/assets/{evalWorker-BssDYW9u.js → evalWorker-DQ82ueGu.js} +45438 -39996
  16. package/dist/assets/{forgecad_geometry-CZ_IfuvA.js → forgecad_geometry-D8rWX7nQ.js} +1 -1
  17. package/dist/assets/{forgecad_geometry_bg-C3rQHfwg.wasm → forgecad_geometry_bg-ObqfqjJT.wasm} +0 -0
  18. package/dist/assets/{inspectWorker-ymhBV4Ll.js → inspectWorker-Cuby2qfT.js} +4899 -1303
  19. package/dist/assets/{jointPose-B0blBj9A.js → jointPose-CFql5I-u.js} +1 -1
  20. package/dist/assets/{landing-proof-driven-Cpf-MIbI.css → landing-proof-driven-_u4v_xQb.css} +2 -2
  21. package/dist/assets/{manifold-CYlIm-M6.js → manifold-02pmr7O7.js} +2 -2
  22. package/dist/assets/{manifold-B_7QXpGB.js → manifold-C6KU0oII.js} +1 -1
  23. package/dist/assets/{manifold-CNShmpEJ.js → manifold-P1yF3GKn.js} +1 -1
  24. package/dist/assets/{reportWorker-Cb5eyM7D.js → reportWorker-kg065BVL.js} +76583 -65731
  25. package/dist/cli/render.html +1 -1
  26. package/dist/docs/index.html +2 -2
  27. package/dist/docs-raw/AI/usage.md +6 -8
  28. package/dist/docs-raw/CLI.md +14 -12
  29. package/dist/docs-raw/component-model.md +28 -9
  30. package/dist/docs-raw/generated/assembly.md +76 -3
  31. package/dist/docs-raw/generated/concepts.md +43 -7
  32. package/dist/docs-raw/generated/core.md +399 -73
  33. package/dist/docs-raw/generated/curves.md +357 -6
  34. package/dist/docs-raw/generated/runtime-names.md +12 -12
  35. package/dist/docs-raw/generated/sketch.md +16 -3
  36. package/dist/docs-raw/guides/inspection-bundles.md +5 -3
  37. package/dist/docs-raw/guides/structural-fea.md +235 -0
  38. package/dist/docs-raw/skills/forgecad-build-model.md +70 -147
  39. package/dist/docs-raw/skills/forgecad-image-prompt.md +1 -1
  40. package/dist/docs-raw/skills/forgecad-project-sync.md +3 -3
  41. package/dist/docs-raw/skills/forgecad-reconstruct-cad-file.md +2 -2
  42. package/dist/docs-raw/skills/forgecad-reconstruct-from-images.md +4 -5
  43. package/dist/docs-raw/skills/forgecad.md +4 -1
  44. package/dist/docs-raw/skills/index.md +1 -5
  45. package/dist/docs-raw/welcome.md +3 -4
  46. package/dist/index.html +1 -1
  47. package/dist/llms.txt +1 -2
  48. package/dist/sitemap.xml +15 -15
  49. package/dist-cli/{check-compiler-4RPB6SB5.js → check-compiler-UJWUEIDC.js} +1 -1
  50. package/dist-cli/{check-query-propagation-KN3DFQTX.js → check-query-propagation-O2EPDJSY.js} +1 -1
  51. package/dist-cli/{chunk-UHBRMYA6.js → chunk-MNDROM7T.js} +78926 -73392
  52. package/dist-cli/forgecad.js +6306 -1061
  53. package/dist-cli/forgecad_geometry_bg.wasm +0 -0
  54. package/dist-skill/CONTEXT.md +1257 -110
  55. package/dist-skill/SKILL.md +4 -1
  56. package/dist-skill/docs/API/core/concepts.md +31 -4
  57. package/dist-skill/docs/CLI.md +14 -12
  58. package/dist-skill/docs/generated/assembly.md +73 -3
  59. package/dist-skill/docs/generated/core.md +395 -74
  60. package/dist-skill/docs/generated/curves.md +356 -6
  61. package/dist-skill/docs/generated/runtime-names.md +12 -12
  62. package/dist-skill/docs/generated/sketch.md +16 -3
  63. package/dist-skill/docs/guides/inspection-bundles.md +5 -3
  64. package/dist-skill/docs/guides/manual-parameters.md +130 -0
  65. package/dist-skill/docs/guides/structural-fea.md +235 -0
  66. package/dist-skill/library/README.md +0 -4
  67. package/dist-skill/library/forgecad-build-model/SKILL.md +57 -150
  68. package/dist-skill/library/forgecad-build-model/references/inspection-feedback.md +58 -0
  69. package/dist-skill/library/forgecad-build-model/references/module-contracts.md +53 -0
  70. package/dist-skill/library/forgecad-build-model/references/parameter-controls.md +22 -0
  71. package/dist-skill/library/forgecad-build-model/references/readiness-review.md +43 -0
  72. package/dist-skill/library/forgecad-build-model/references/simulation-feedback.md +49 -0
  73. package/dist-skill/library/forgecad-build-model/references/stage-1-design-intent.md +21 -0
  74. package/dist-skill/library/forgecad-build-model/references/stage-2-architecture-plan.md +23 -0
  75. package/dist-skill/library/forgecad-build-model/references/stage-3-build-slices.md +39 -0
  76. package/dist-skill/library/forgecad-build-model/references/stage-4-feedback-iteration.md +24 -0
  77. package/dist-skill/library/forgecad-build-model/references/stage-5-readiness-package.md +34 -0
  78. package/dist-skill/library/forgecad-image-prompt/SKILL.md +1 -1
  79. package/dist-skill/library/forgecad-project-sync/SKILL.md +3 -3
  80. package/dist-skill/library/forgecad-reconstruct-cad-file/SKILL.md +2 -2
  81. package/dist-skill/library/forgecad-reconstruct-from-images/SKILL.md +4 -5
  82. package/dist-skill/website/skills/forgecad-build-model.md +70 -147
  83. package/dist-skill/website/skills/forgecad-image-prompt.md +1 -1
  84. package/dist-skill/website/skills/forgecad-project-sync.md +3 -3
  85. package/dist-skill/website/skills/forgecad-reconstruct-cad-file.md +2 -2
  86. package/dist-skill/website/skills/forgecad-reconstruct-from-images.md +4 -5
  87. package/dist-skill/website/skills/forgecad.md +4 -1
  88. package/dist-skill/website/skills/index.md +1 -5
  89. package/examples/analysis/structural-stress-fea.forge.js +19 -0
  90. package/examples/api/blend-full-round.forge.js +37 -0
  91. package/examples/api/blend-variable-radius.forge.js +51 -0
  92. package/examples/api/curve-project-and-intersect.forge.js +59 -0
  93. package/examples/api/extrude-up-to-face.forge.js +47 -0
  94. package/examples/api/param-path2d.forge.js +65 -0
  95. package/examples/api/param-placement2d.forge.js +80 -0
  96. package/examples/api/param-spline2d-g-continuity.forge.js +57 -0
  97. package/examples/api/spoon-full-tang-handle.forge.js +188 -0
  98. package/examples/api/surface-boundarynet-dished-bowl.forge.js +63 -0
  99. package/examples/api/surface-fill-interior-constraints.forge.js +59 -0
  100. package/examples/api/surface-variable-thickness-panel.forge.js +62 -0
  101. package/examples/mechanical/airplane-propeller.forge.js +81 -28
  102. package/package.json +5 -2
  103. package/dist/assets/EditorApp-BWUGCdD5.js +0 -16610
  104. package/dist/docs-raw/skills/forgecad-design-spec.md +0 -145
  105. package/dist/docs-raw/skills/forgecad-grade-model.md +0 -84
  106. package/dist/docs-raw/skills/forgecad-inspect-model.md +0 -80
  107. package/dist/docs-raw/skills/forgecad-verify-mujoco.md +0 -78
  108. package/dist-skill/library/forgecad-design-spec/SKILL.md +0 -132
  109. package/dist-skill/library/forgecad-design-spec/references/default-profiles.md +0 -99
  110. package/dist-skill/library/forgecad-design-spec/references/master-prompt.md +0 -73
  111. package/dist-skill/library/forgecad-grade-model/SKILL.md +0 -72
  112. package/dist-skill/library/forgecad-grade-model/agents/openai.yaml +0 -4
  113. package/dist-skill/library/forgecad-inspect-model/SKILL.md +0 -68
  114. package/dist-skill/library/forgecad-verify-mujoco/SKILL.md +0 -66
  115. package/dist-skill/website/skills/forgecad-design-spec.md +0 -145
  116. package/dist-skill/website/skills/forgecad-grade-model.md +0 -84
  117. package/dist-skill/website/skills/forgecad-inspect-model.md +0 -80
  118. package/dist-skill/website/skills/forgecad-verify-mujoco.md +0 -78
  119. /package/dist/assets/{landing-proof-driven-BxZZh5r5.js → landing-proof-driven-DNPRKL_p.js} +0 -0
  120. /package/dist-skill/library/{forgecad-verify-mujoco → forgecad-build-model}/scripts/mujoco_verify.py +0 -0
  121. /package/dist-skill/library/{forgecad-inspect-model → forgecad-build-model/scripts}/summarize_manifest.py +0 -0
@@ -1,73 +0,0 @@
1
- # ForgeCAD Manufacture-Realistic Prototype Master Prompt
2
-
3
- Fill the placeholders and return the finished prompt as one block.
4
-
5
- ```text
6
- You are producing a ForgeCAD manufacture-realistic prototype package, not a concept sketch — a credible internal engineering package for a real build candidate, not a generic maker example. Use the specific operating story below to drive engineering choices; do not flatten it into a vague domain label.
7
-
8
- Target artifact:
9
- - artifact: {artifact}
10
- - request summary: {request_summary}
11
- - normalized interpretation: {normalized_interpretation}
12
-
13
- Specific operating story:
14
- - organization / team: {organization_team}
15
- - project / prototype revision: {project_revision}
16
- - milestone / review moment: {milestone_review}
17
- - domain context: {domain_context}
18
- - production reason: {production_reason}
19
- - test setting: {test_setting}
20
- - generic-output failure mode to avoid: {generic_failure_mode}
21
- - public comparison anchor, if useful: {benchmark_class}
22
-
23
- Chosen intake classification:
24
- - output posture: {output_posture} (manufacture-realistic prototype unless the user selected another)
25
- - artifact family: {artifact_family}
26
- - duty level: {duty_level}
27
- - scale level: {scale_level}
28
- - cost posture: {cost_posture}
29
- - manufacturing / process stack: {manufacturing_process_stack}
30
- - variant policy: {variant_policy}
31
-
32
- Working assumptions chosen to close missing inputs (provisional, scoped to `{artifact_family}` only):
33
- - {assumption_1}
34
- - {assumption_2}
35
- - {assumption_3}
36
- - {assumption_4}
37
-
38
- Hard constraints:
39
- - Use ForgeCAD. Any moving mechanism uses a real `assembly()` with honest joints, limits, axes, and operating ranges per the forgecad skill quality bar. Make the result runnable with `forgecad run`.
40
- - Default posture is manufacture-realistic prototype: real prototype materials, fabrication cues, purchased parts, assembly logic, serviceability, and validation — without claiming production certification or release readiness.
41
- - Choose processes that fit the artifact, load path, scale, safety, and operating story. Do not assume FDM/3D printing/"printable" unless the user asked or the selected process stack includes printed parts. Prefer metal shafts, bearings, fasteners, inserts, pins, tube, sheet goods, castings, molded/machined parts, or composite/wood members where honest, with process-appropriate clearances.
42
- - Include a BOM concrete enough to buy and assemble from, registered in-model with `bom()` entries — not only prose.
43
- - Model the physical artifact, not an educational diagram: no explanatory text labels, callouts, arrows, legends, axes, or part-name slabs unless the user explicitly asks for a teaching view. Include only markings the real artifact would carry (serial plates, connector labels, gauge ticks, alignment/warning marks, branding), sparse and process-appropriate.
44
- - Do not hide uncertainty; choose defaults and continue.
45
- - Do not claim the user works for a named company unless they said so; the invented org is a design scenario, not a factual claim. Do not clone proprietary named products — use public-domain patterns and first-principles engineering.
46
-
47
- Acceptable final states:
48
- 1. `BUILD-READY` — specific enough that a competent builder could start fabricating, buying, assembling, and testing immediately without inventing missing details.
49
- 2. `BEST-EFFORT BUILD CANDIDATE` — still the strongest concrete design possible, plus an explicit statement of the smallest unavoidable validation loop that remains.
50
-
51
- Non-negotiable rules:
52
- - No high-level concepts, visions, or wishlists; no generic category solution that could have been written without the operating story.
53
- - No placeholders like "appropriate motor", "standard hardware", or "adjust as needed". If a number is missing, choose a defensible value, state it, continue.
54
- - Prefer a complete best-effort design over an incomplete discussion. If the user's wording is physically confused, normalize it and proceed.
55
- - Do not import numeric assumptions from unrelated artifact families.
56
- - Do not ask follow-up questions unless the architecture would materially change and no safe assumption bundle exists.
57
- - Make the CAD legible through part boundaries, hardware, interfaces, and materials — not labels.
58
-
59
- Required outputs:
60
-
61
- 0. Operating story and anti-generic bar — restate the org, revision, milestone, test setting; name the generic failure mode avoided and the domain-specific details that make the design credible.
62
- 1. Problem normalization — what is being built, what it does, what "done" means physically.
63
- 2. Assumption bundle — every chosen assumption with units and why it is reasonable.
64
- 3. Architecture choice — one mechanism architecture; briefly name the rejected alternatives and why they lost.
65
- 4. Detailed mechanical design — exact dimensions or formulas for major parts; subassemblies, interfaces, motion ranges, stops, load paths; for articulated mechanisms, concrete finger/link/jaw geometry and all joints.
66
- 5. Actuation and transmission — actuator class, approximate torque/force, transmission approach, fit to the chosen profile.
67
- 6. Manufacturing package — per critical part: material, process, prototype setup/orientation/tooling/finish assumptions, serviceability, process-accuracy-sensitive features. For printed parts (only if printing is selected): orientation, support strategy, print-sensitive features.
68
- 7. Bill of materials — manufactured, printed (if any), and purchased parts; per line: name, exact spec or part class, quantity, purpose, key dimensions/ratings; mirrored in-model with `bom()` so `forgecad export report` reproduces it.
69
- 8. Assembly package — assembly order, jointing method, insert/bearing/pin usage, fastening notes, failure-prone steps.
70
- 9. Validation package — motion range, likely collisions, stiffness/load risks, manufacturability, tolerance stacks, wear points; check printability only for printed parts; check moving designs through their operating range, not just at rest pose.
71
- 10. ForgeCAD implementation package — the actual file structure; in a writable workspace, write the `.forge.js` files instead of stopping at prose, with `main.forge.js` as the runnable entry point for multi-file projects; `dim()` annotations on the dimensions a builder must hit, and the process-appropriate export proven to run (per the forgecad-build-model Manufacturing Outputs bar).
72
- 11. Final verdict — end with exactly one of `BUILD-READY` or `BEST-EFFORT BUILD CANDIDATE`.
73
- ```
@@ -1,72 +0,0 @@
1
- ---
2
- name: forgecad-grade-model
3
- description: Grade a ForgeCAD or CAD-as-code model against a requirement, brief, prompt, reference, or acceptance criteria with evidence and a 0-10 score.
4
- forgecad-public: true
5
- ---
6
-
7
- # Grade Model
8
-
9
- 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.
10
-
11
- ## Workflow
12
-
13
- 1. **Extract the requirement** into a checklist, must-haves separate from nice-to-haves. If the brief is vague, grade the most reasonable literal interpretation and mark unverifiable items `Unknown`.
14
- 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.
15
- 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.
16
- 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.
17
- 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.
18
- 6. **Score**: fill the rubric, apply caps, give a final 0-10 in whole or `.5` increments. Unknowns count against the score.
19
-
20
- ## Rubric
21
-
22
- | Dimension | Points | What To Look For |
23
- | --- | ---: | --- |
24
- | Requirement fit | 4 | Satisfies the stated must-haves, captures the intended object/function, no drift into a generic substitute. |
25
- | Geometric completeness | 2 | Correct silhouette, proportions, visible details, part boundaries, internal structure when required, no missing major components. |
26
- | Mechanical/manufacturing plausibility | 2 | Believable materials/process, real interfaces, clear load paths, fasteners/seats/clearances where needed, no impossible assembly. |
27
- | Validation health | 1 | Runs cleanly, renders from multiple views, targeted inspections reveal no major unaddressed issues. |
28
- | Code/model quality | 1 | Parametric clarity, readable organization, meaningful names, no debug junk, appropriate ForgeCAD APIs. |
29
-
30
- Anchors: 9-10 = evidence-backed match for the brief; 7-8 = recognizable and mostly complete, fixable gaps; 5-6 = main idea only; below 5 = broken or loosely related.
31
-
32
- ## Evidence Caps
33
-
34
- Maximum scores, applied after the rubric:
35
-
36
- - Model does not execute: max `2`.
37
- - Executes but cannot be rendered: max `4`.
38
- - No rendered images visually inspected: max `5`.
39
- - Only one flattering view inspected: max `6`.
40
- - A must-have requirement is absent: max `6`.
41
- - Visually recognizable but physically impossible for the requested use: max `6`.
42
- - Internals, fit, walls, or assembly central to the brief but uninspected: max `7`.
43
- - 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.
44
- - Inspection finds unexpected collisions, floating bodies, critical thin walls, or wrong connectivity: max `6`; max `5` when the defect invalidates the main function.
45
- - 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.
46
- - Any score relying on an assumption the evidence cannot verify: mark it `Unknown`, never score above `8`.
47
-
48
- ## Report Format
49
-
50
- ```markdown
51
- Score: N / 10
52
-
53
- Requirement checklist:
54
- | Item | Result | Evidence |
55
- | --- | --- | --- |
56
- | ... | Pass/Partial/Fail/Unknown | render/inspection/file evidence |
57
-
58
- Evidence reviewed: run outcome; views inspected; inspection highlights.
59
- Why this score: decisive strengths and defects.
60
- Caps applied: list, or `None`.
61
- Next fixes: the 2-5 highest-leverage improvements.
62
- ```
63
-
64
- ## Grading Rules
65
-
66
- - A beautiful render with missing functional geometry is not a high score.
67
- - Grade the default returned model unless the user names a parameter set or variant.
68
- - No points for comments, labels, or intentions absent from the geometry.
69
- - Decorative screws, floating labels, and teaching-diagram callouts are not real mechanical interfaces.
70
- - 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.
71
- - Cite which render or inspection finding drove the grade.
72
- - When comparing models, use identical checklist, cameras, inspection evidence, and caps for all.
@@ -1,4 +0,0 @@
1
- interface:
2
- display_name: "ForgeCAD Grade Model"
3
- short_description: "Grade CAD models against a brief"
4
- default_prompt: "Use $forgecad-grade-model to evaluate this ForgeCAD model against the requirement and give a 0-10 score with evidence."
@@ -1,68 +0,0 @@
1
- ---
2
- name: forgecad-inspect-model
3
- description: Select, run, and interpret ForgeCAD inspection evidence for collisions, sections, wall thickness, components, masks, depth, normals, surface continuity, and fit.
4
- forgecad-public: true
5
- ---
6
-
7
- # Inspect Model
8
-
9
- 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.
10
-
11
- Routing: authoring/API questions → `forgecad` skill; creating a new model → `forgecad-build-model`.
12
-
13
- ## Workflow
14
-
15
- 1. **Identify the failure question.** What would make the model wrong: overlap, thin walls, hidden cavity failure, disconnected or accidentally fused bodies, floating parts, orientation artifacts, identity confusion?
16
- 2. **Confirm the model executes.** If in doubt, run `forgecad run model.forge.js` first; add `--debug-imports` for suspect imports.
17
- 3. **Pick ONE targeted evidence command** from the table below. `forgecad inspect evidence` lists everything available.
18
- 4. **Summarize the manifest first**, then use `jq` against `manifest.json` for targeted follow-up. The helper ships beside this SKILL.md — invoke it skill-dir-relative; it accepts the bundle directory or a `manifest.json` path:
19
-
20
- ```bash
21
- python <this-skill-dir>/summarize_manifest.py /tmp/model-inspect
22
- ```
23
-
24
- 5. **Inspect the PNGs, not only the JSON.** View identity/context images first, then the risk evidence's view, then orthogonal cameras (`front`, `right`, `top`) when iso hides the issue, sections only when internals matter. In automation, resolve file paths through the manifest — custom cameras break canonical filenames.
25
- 6. **Isolate intentional overlaps** with `--focus "A,B"` or `--hide "C"` so the remaining report stays meaningful.
26
- 7. **Treat findings as model bugs**: unexpected collisions, critical thin regions, high unresolved thickness area, wrong component counts, floating bodies, or surprising gaps mean fix the model and reinspect.
27
- 8. **Report honestly.** Include the exact command, bundle path, manifest highlights, and the PNG views actually inspected. Never claim geometry is verified if you only ran `forgecad run`.
28
-
29
- ## Evidence Selection
30
-
31
- | Question | Evidence command |
32
- |----------|------------------|
33
- | Quick visual sanity | `inspect visual image` |
34
- | Kinematic rig, joints, axes, and links | `inspect visual rig` |
35
- | Object naming and identity | `inspect visual objects` |
36
- | Exact local section measurement, bore widths, rib thickness through a chosen line | `inspect section --ray ...` |
37
- | Hidden internals, cavities, pockets, screw paths, captured components | `inspect sections at\|stack\|sample` |
38
- | Multi-part interference, fit checks, ghost parts, moving clearances | `inspect fit interference` |
39
- | Printability, shell walls, ribs, bosses, snaps, slots | `inspect manufacture thickness` plus `inspect sections at\|stack\|sample` when internals matter |
40
- | Parts without a mesh-contact path to the ground | `inspect physical floating` |
41
- | Accidental fusion, connected solids | `inspect physical components` |
42
- | Air gaps between physical components | `inspect physical gaps` |
43
- | Surface orientation, occlusion, faceting, strange protrusions | `inspect visual depth` or `inspect visual normals` |
44
- | Loft, fillet, skin, and sweep surface continuity | `inspect surface zebra` or `inspect visual normals` |
45
- | Reference-vs-candidate reconstruction comparison | `inspect compare overlay --with reference.3mf` |
46
-
47
- ## Section Probe + Replay
48
-
49
- The agent-native measure-then-recheck loop:
50
-
51
- ```bash
52
- forgecad inspect section model.forge.js --plane yz --ray bore:-20,0:20,0
53
- forgecad inspect replay outputs/inspect/<probe>/result.json --source candidate.forge.js
54
- ```
55
-
56
- The probe's `result.json` field contract (frames, rulers, gaps, replaySpec) is documented in the forgecad skill's `docs/guides/inspection-bundles.md`.
57
-
58
- ## Misread Traps
59
-
60
- - Face-touching is not a collision; collision findings are positive-volume overlaps.
61
- - Gray/unresolved thickness area means the evidence is incomplete, not that the model is safe.
62
- - Distance/gap figures are bbox-gap metrics between components, not closest-surface distances.
63
- - Depth, normals, and zebra are visual aids (heatmap, camera-view normals, stripe shader), not exact measurements or curvature proofs.
64
- - Resolve mask colors through the manifest's object list, never by object order.
65
-
66
- ## Reference
67
-
68
- Bundle/manifest contract, evidence semantics, and current limits: the forgecad skill's `docs/guides/inspection-bundles.md`. CLI flags and command tree: its `docs/CLI.md`.
@@ -1,66 +0,0 @@
1
- ---
2
- name: forgecad-verify-mujoco
3
- description: Verify a ForgeCAD MJCF export in MuJoCo with dynamics, contacts, controls, joint travel, and rendered evidence before calling it simulation-ready.
4
- forgecad-public: true
5
- ---
6
-
7
- # Verify MuJoCo
8
-
9
- 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.
10
-
11
- Routing: geometry-only visual inspection -> `forgecad-inspect-model`; model authoring/API questions -> `forgecad`; building a new model -> `forgecad-build-model`.
12
-
13
- ## Definition Of Done
14
-
15
- 1. **Export from the exact source file.**
16
- ```bash
17
- rm -rf /tmp/forgecad-mjcf && mkdir -p /tmp/forgecad-mjcf
18
- forgecad export mjcf path/to/model.forge.js --output /tmp/forgecad-mjcf
19
- ```
20
- 2. **Load the generated scene in MuJoCo.** Use `scene.xml`, not only the model XML, so the floor/camera/package context is included.
21
- 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.
22
- 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.
23
- 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.
24
- 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.
25
- 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.
26
- 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.
27
-
28
- ## Helper Script
29
-
30
- This skill ships a MuJoCo smoke verifier:
31
-
32
- ```bash
33
- uv run --python 3.11 --with mujoco --with pillow \
34
- python <this-skill-dir>/scripts/mujoco_verify.py /tmp/forgecad-mjcf \
35
- --settle-seconds 2 \
36
- --seconds 8 \
37
- --actuator drum_velocity=-0.75 \
38
- --watch-joint drum_joint \
39
- --expect-drive-cycles drum_joint=-0.06:-0.03 \
40
- --expect-final-qvel drum_joint=-0.02:0.02 \
41
- --render-dir /tmp/forgecad-mjcf/verify \
42
- --camera-preview-grid
43
- ```
44
-
45
- 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.
46
-
47
- Prefer explicit travel envelopes over loose "it moved" checks:
48
-
49
- - Stops/latches: assert a signed drive cycle or delta range and a near-zero final velocity range.
50
- - Continuous drives: assert the signed drive cycle/delta is large enough over the run and final velocity remains in the expected direction/range.
51
- - 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.
52
- - Gravity-settling mechanisms: evaluate functional travel with post-settle drive delta, not initial-to-final delta.
53
-
54
- 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.
55
-
56
- ## Contact Debugging Rules
57
-
58
- - 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.
59
- - 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.
60
- - 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.
61
- - Bounding boxes are fast but dangerous for hollow frames, windows, handles, and side plates. They collide as the filled AABB, not the visible object.
62
- - 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.
63
-
64
- ## Reporting
65
-
66
- 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.
@@ -1,145 +0,0 @@
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,84 +0,0 @@
1
- <!-- Generated by scripts/build-forgecad-skill.mjs — do not edit. Edit agent-skill-library/forgecad-grade-model/SKILL.md instead. -->
2
-
3
- # forgecad-grade-model
4
-
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
-
7
- | Field | Value |
8
- | --- | --- |
9
- | Installed by | `forgecad skill install` |
10
- | Source | `agent-skill-library/forgecad-grade-model/SKILL.md` |
11
-
12
- ---
13
-
14
- ## Grade Model
15
-
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
-
18
- ### Workflow
19
-
20
- 1. **Extract the requirement** into a checklist, must-haves separate from nice-to-haves. If the brief is vague, grade the most reasonable literal interpretation and mark unverifiable items `Unknown`.
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
- 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
- 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-inspect-model` skill. Findings (unexpected collisions, thin regions, floating bodies, wrong component counts) are evidence, not warnings to wave away.
25
- 6. **Score**: fill the rubric, apply caps, give a final 0-10 in whole or `.5` increments. Unknowns count against the score.
26
-
27
- ### Rubric
28
-
29
- | Dimension | Points | What To Look For |
30
- | --- | ---: | --- |
31
- | Requirement fit | 4 | Satisfies the stated must-haves, captures the intended object/function, no drift into a generic substitute. |
32
- | Geometric completeness | 2 | Correct silhouette, proportions, visible details, part boundaries, internal structure when required, no missing major components. |
33
- | Mechanical/manufacturing plausibility | 2 | Believable materials/process, real interfaces, clear load paths, fasteners/seats/clearances where needed, no impossible assembly. |
34
- | Validation health | 1 | Runs cleanly, renders from multiple views, targeted inspections reveal no major unaddressed issues. |
35
- | Code/model quality | 1 | Parametric clarity, readable organization, meaningful names, no debug junk, appropriate ForgeCAD APIs. |
36
-
37
- Anchors: 9-10 = evidence-backed match for the brief; 7-8 = recognizable and mostly complete, fixable gaps; 5-6 = main idea only; below 5 = broken or loosely related.
38
-
39
- ### Evidence Caps
40
-
41
- Maximum scores, applied after the rubric:
42
-
43
- - Model does not execute: max `2`.
44
- - Executes but cannot be rendered: max `4`.
45
- - No rendered images visually inspected: max `5`.
46
- - Only one flattering view inspected: max `6`.
47
- - A must-have requirement is absent: max `6`.
48
- - Visually recognizable but physically impossible for the requested use: max `6`.
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.
51
- - Inspection finds unexpected collisions, floating bodies, critical thin walls, or wrong connectivity: max `6`; max `5` when the defect invalidates the main function.
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.
53
- - Any score relying on an assumption the evidence cannot verify: mark it `Unknown`, never score above `8`.
54
-
55
- ### Report Format
56
-
57
- ```markdown
58
- Score: N / 10
59
-
60
- Requirement checklist:
61
- | Item | Result | Evidence |
62
- | --- | --- | --- |
63
- | ... | Pass/Partial/Fail/Unknown | render/inspection/file evidence |
64
-
65
- Evidence reviewed: run outcome; views inspected; inspection highlights.
66
- Why this score: decisive strengths and defects.
67
- Caps applied: list, or `None`.
68
- Next fixes: the 2-5 highest-leverage improvements.
69
- ```
70
-
71
- ### Grading Rules
72
-
73
- - A beautiful render with missing functional geometry is not a high score.
74
- - Grade the default returned model unless the user names a parameter set or variant.
75
- - No points for comments, labels, or intentions absent from the geometry.
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.
78
- - Cite which render or inspection finding drove the grade.
79
- - When comparing models, use identical checklist, cameras, inspection evidence, and caps for all.
80
-
81
-
82
- ## Bundled Files
83
-
84
- - `agents/openai.yaml`
@@ -1,80 +0,0 @@
1
- <!-- Generated by scripts/build-forgecad-skill.mjs — do not edit. Edit agent-skill-library/forgecad-inspect-model/SKILL.md instead. -->
2
-
3
- # forgecad-inspect-model
4
-
5
- Select, run, and interpret ForgeCAD inspection evidence for collisions, sections, wall thickness, components, masks, depth, normals, surface continuity, and fit.
6
-
7
- | Field | Value |
8
- | --- | --- |
9
- | Installed by | `forgecad skill install` |
10
- | Source | `agent-skill-library/forgecad-inspect-model/SKILL.md` |
11
-
12
- ---
13
-
14
- ## Inspect Model
15
-
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
-
18
- Routing: authoring/API questions → `forgecad` skill; creating a new model → `forgecad-build-model`.
19
-
20
- ### Workflow
21
-
22
- 1. **Identify the failure question.** What would make the model wrong: overlap, thin walls, hidden cavity failure, disconnected or accidentally fused bodies, floating parts, orientation artifacts, identity confusion?
23
- 2. **Confirm the model executes.** If in doubt, run `forgecad run model.forge.js` first; add `--debug-imports` for suspect imports.
24
- 3. **Pick ONE targeted evidence command** from the table below. `forgecad inspect evidence` lists everything available.
25
- 4. **Summarize the manifest first**, then use `jq` against `manifest.json` for targeted follow-up. The helper ships beside this SKILL.md — invoke it skill-dir-relative; it accepts the bundle directory or a `manifest.json` path:
26
-
27
- ```bash
28
- python <this-skill-dir>/summarize_manifest.py /tmp/model-inspect
29
- ```
30
-
31
- 5. **Inspect the PNGs, not only the JSON.** View identity/context images first, then the risk evidence's view, then orthogonal cameras (`front`, `right`, `top`) when iso hides the issue, sections only when internals matter. In automation, resolve file paths through the manifest — custom cameras break canonical filenames.
32
- 6. **Isolate intentional overlaps** with `--focus "A,B"` or `--hide "C"` so the remaining report stays meaningful.
33
- 7. **Treat findings as model bugs**: unexpected collisions, critical thin regions, high unresolved thickness area, wrong component counts, floating bodies, or surprising gaps mean fix the model and reinspect.
34
- 8. **Report honestly.** Include the exact command, bundle path, manifest highlights, and the PNG views actually inspected. Never claim geometry is verified if you only ran `forgecad run`.
35
-
36
- ### Evidence Selection
37
-
38
- | Question | Evidence command |
39
- |----------|------------------|
40
- | Quick visual sanity | `inspect visual image` |
41
- | Kinematic rig, joints, axes, and links | `inspect visual rig` |
42
- | Object naming and identity | `inspect visual objects` |
43
- | Exact local section measurement, bore widths, rib thickness through a chosen line | `inspect section --ray ...` |
44
- | Hidden internals, cavities, pockets, screw paths, captured components | `inspect sections at\|stack\|sample` |
45
- | Multi-part interference, fit checks, ghost parts, moving clearances | `inspect fit interference` |
46
- | Printability, shell walls, ribs, bosses, snaps, slots | `inspect manufacture thickness` plus `inspect sections at\|stack\|sample` when internals matter |
47
- | Parts without a mesh-contact path to the ground | `inspect physical floating` |
48
- | Accidental fusion, connected solids | `inspect physical components` |
49
- | Air gaps between physical components | `inspect physical gaps` |
50
- | Surface orientation, occlusion, faceting, strange protrusions | `inspect visual depth` or `inspect visual normals` |
51
- | Loft, fillet, skin, and sweep surface continuity | `inspect surface zebra` or `inspect visual normals` |
52
- | Reference-vs-candidate reconstruction comparison | `inspect compare overlay --with reference.3mf` |
53
-
54
- ### Section Probe + Replay
55
-
56
- The agent-native measure-then-recheck loop:
57
-
58
- ```bash
59
- forgecad inspect section model.forge.js --plane yz --ray bore:-20,0:20,0
60
- forgecad inspect replay outputs/inspect/<probe>/result.json --source candidate.forge.js
61
- ```
62
-
63
- The probe's `result.json` field contract (frames, rulers, gaps, replaySpec) is documented in the forgecad skill's `docs/guides/inspection-bundles.md`.
64
-
65
- ### Misread Traps
66
-
67
- - Face-touching is not a collision; collision findings are positive-volume overlaps.
68
- - Gray/unresolved thickness area means the evidence is incomplete, not that the model is safe.
69
- - Distance/gap figures are bbox-gap metrics between components, not closest-surface distances.
70
- - Depth, normals, and zebra are visual aids (heatmap, camera-view normals, stripe shader), not exact measurements or curvature proofs.
71
- - Resolve mask colors through the manifest's object list, never by object order.
72
-
73
- ### Reference
74
-
75
- Bundle/manifest contract, evidence semantics, and current limits: the forgecad skill's `docs/guides/inspection-bundles.md`. CLI flags and command tree: its `docs/CLI.md`.
76
-
77
-
78
- ## Bundled Files
79
-
80
- - `summarize_manifest.py`