forgecad 0.9.16 → 0.10.1

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 (162) hide show
  1. package/dist/assets/{AdminPage-CXvls4-J.js → AdminPage-DcCnj0qo.js} +1 -1
  2. package/dist/assets/{BenchmarkPage-B27zk8xL.js → BenchmarkPage-BVEpJSVk.js} +1 -1
  3. package/dist/assets/{BlogPage-CMAVvgQL.js → BlogPage-DHaGP50_.js} +1 -1
  4. package/dist/assets/{DocsPage-knf4I4h7.js → DocsPage-CDoxHkz8.js} +40 -859
  5. package/dist/assets/EditorApp-BJ0Dloyh.js +16446 -0
  6. package/dist/assets/{EmbedViewer-D7ZGlFjx.js → EmbedViewer-CRKZbY0y.js} +2 -2
  7. package/dist/assets/{LandingPageProofDriven-CnevhTE8.js → LandingPageProofDriven-BxHkYRE7.js} +1 -1
  8. package/dist/assets/{LegalPage-BPTUmqeg.js → LegalPage-B-u6FrVv.js} +1 -1
  9. package/dist/assets/{PricingPage-B0D4goG_.js → PricingPage-CzpZ6-Ce.js} +1 -1
  10. package/dist/assets/{SettingsPage-CFF-UgjI.js → SettingsPage-CIZSSAd0.js} +1 -1
  11. package/dist/assets/{app-CE3sYcV7.css → app-CjsbDlb7.css} +143 -0
  12. package/dist/assets/{app-T0pDcSX4.js → app-DaTMg3nH.js} +1310 -290
  13. package/dist/assets/cli/{render-C5pcIISc.js → render-DPf4AYJK.js} +55 -60
  14. package/dist/assets/{constructionHistoryWorker-Ba2Hm58b.js → constructionHistoryWorker-AwMMWSxg.js} +1103 -349
  15. package/dist/assets/{evalWorker-vkx310U2.js → evalWorker-CjZZWRWW.js} +5209 -2643
  16. package/dist/assets/{inspectWorker-BuTJDVX6.js → inspectWorker-CZsCFtQT.js} +1163 -409
  17. package/dist/assets/{jointPose-B_Cgedn9.js → jointPose-DzQOViQH.js} +1 -1
  18. package/dist/assets/{manifold-BWgsjmAM.js → manifold-BYlzU521.js} +1 -1
  19. package/dist/assets/{manifold-D6IFSkhH.js → manifold-DgXo0T5P.js} +2 -2
  20. package/dist/assets/{manifold-rZexZI0G.js → manifold-K1SkarlQ.js} +1 -1
  21. package/dist/assets/{reportWorker-0AGij1Ru.js → reportWorker-B9nWwSrB.js} +8501 -3393
  22. package/dist/assets/{scalar-sampling-budget-J5cuzxT1.js → scalar-sampling-budget-prBw_s8t.js} +6067 -3479
  23. package/dist/assets/{scanProxyWorker-Vl4Wxa1y.js → scanProxyWorker-2GtDLk-R.js} +1 -1
  24. package/dist/assets/{javascript-1kQXfVaz.js → typescript-DBQ6RN5l.js} +874 -22
  25. package/dist/cli/render.html +1 -1
  26. package/dist/docs/index.html +3 -3
  27. package/dist/docs-raw/AI/usage.md +1 -1
  28. package/dist/docs-raw/CLI.md +77 -240
  29. package/dist/docs-raw/README.md +6 -0
  30. package/dist/docs-raw/component-model.md +17 -150
  31. package/dist/docs-raw/generated/assembly.md +188 -582
  32. package/dist/docs-raw/generated/concepts.md +259 -3501
  33. package/dist/docs-raw/generated/core.md +283 -1250
  34. package/dist/docs-raw/generated/curves.md +387 -1608
  35. package/dist/docs-raw/generated/legacy.md +162 -0
  36. package/dist/docs-raw/generated/lib.md +227 -85
  37. package/dist/docs-raw/generated/output.md +35 -99
  38. package/dist/docs-raw/generated/runtime-names.md +23 -23
  39. package/dist/docs-raw/generated/sdf.md +68 -284
  40. package/dist/docs-raw/generated/sheet-metal.md +68 -335
  41. package/dist/docs-raw/generated/sketch.md +240 -1161
  42. package/dist/docs-raw/generated/viewport.md +75 -316
  43. package/dist/docs-raw/generated/wood.md +21 -49
  44. package/dist/docs-raw/guides/coordinate-system.md +4 -42
  45. package/dist/docs-raw/guides/inspection-bundles.md +44 -442
  46. package/dist/docs-raw/guides/joint-design.md +18 -79
  47. package/dist/docs-raw/guides/positioning.md +21 -143
  48. package/dist/docs-raw/guides/scene-presentation.md +89 -0
  49. package/dist/docs-raw/guides/simready-quickstart.md +171 -0
  50. package/dist/docs-raw/simulation-workflow.md +273 -0
  51. package/dist/docs-raw/skills/forgecad-3d-reconstruction.md +25 -111
  52. package/dist/docs-raw/skills/forgecad-blockout-model.md +20 -117
  53. package/dist/docs-raw/skills/forgecad-component-model.md +23 -107
  54. package/dist/docs-raw/skills/forgecad-high-level-spec.md +47 -155
  55. package/dist/docs-raw/skills/forgecad-image-replicator.md +26 -143
  56. package/dist/docs-raw/skills/forgecad-lld.md +19 -113
  57. package/dist/docs-raw/skills/forgecad-make-a-model.md +112 -532
  58. package/dist/docs-raw/skills/forgecad-model-grader.md +38 -108
  59. package/dist/docs-raw/skills/forgecad-prepare-prompt.md +24 -211
  60. package/dist/docs-raw/skills/forgecad-project.md +13 -131
  61. package/dist/docs-raw/skills/forgecad-reconstruction-benchmark.md +42 -134
  62. package/dist/docs-raw/skills/forgecad-render-inspect.md +27 -174
  63. package/dist/docs-raw/skills/forgecad-visual-spec.md +32 -112
  64. package/dist/docs-raw/skills/forgecad.md +19 -18
  65. package/dist/docs-raw/skills/index.md +2 -0
  66. package/dist/docs-raw/welcome.md +2 -2
  67. package/dist/index.html +2 -2
  68. package/dist/llms.txt +1 -2
  69. package/dist/sitemap.xml +25 -13
  70. package/dist-cli/{check-compiler-SYQ2PWOB.js → check-compiler-II7NLPAB.js} +1 -1
  71. package/dist-cli/{check-query-propagation-HIAGV62W.js → check-query-propagation-7462TR3R.js} +1 -1
  72. package/dist-cli/{chunk-SPZE3DUY.js → chunk-UWTJCGXF.js} +5848 -2915
  73. package/dist-cli/forgecad.js +3496 -703
  74. package/dist-skill/CONTEXT.md +1797 -7963
  75. package/dist-skill/SKILL.md +15 -15
  76. package/dist-skill/docs/API/core/concepts.md +27 -157
  77. package/dist-skill/docs/CLI.md +77 -240
  78. package/dist-skill/docs/generated/assembly.md +182 -532
  79. package/dist-skill/docs/generated/core.md +283 -1250
  80. package/dist-skill/docs/generated/curves.md +387 -1609
  81. package/dist-skill/docs/generated/lib.md +227 -85
  82. package/dist-skill/docs/generated/output.md +35 -99
  83. package/dist-skill/docs/generated/runtime-names.md +16 -21
  84. package/dist-skill/docs/generated/sdf.md +68 -284
  85. package/dist-skill/docs/generated/sheet-metal.md +68 -335
  86. package/dist-skill/docs/generated/sketch.md +240 -1160
  87. package/dist-skill/docs/generated/viewport.md +75 -223
  88. package/dist-skill/docs/generated/wood.md +21 -49
  89. package/dist-skill/docs/guides/coordinate-system.md +4 -42
  90. package/dist-skill/docs/guides/inspection-bundles.md +44 -442
  91. package/dist-skill/docs/guides/joint-design.md +18 -79
  92. package/dist-skill/docs/guides/positioning.md +21 -143
  93. package/dist-skill/docs/guides/scene-presentation.md +89 -0
  94. package/dist-skill/docs/guides/surface-members.md +26 -0
  95. package/dist-skill/library/forgecad-3d-reconstruction/SKILL.md +23 -111
  96. package/dist-skill/library/forgecad-blockout-model/SKILL.md +18 -117
  97. package/dist-skill/library/forgecad-component-model/SKILL.md +21 -107
  98. package/dist-skill/library/forgecad-high-level-spec/SKILL.md +45 -155
  99. package/dist-skill/library/forgecad-image-replicator/SKILL.md +24 -143
  100. package/dist-skill/library/forgecad-lld/SKILL.md +17 -113
  101. package/dist-skill/library/forgecad-make-a-model/SKILL.md +110 -532
  102. package/dist-skill/library/forgecad-model-grader/SKILL.md +36 -108
  103. package/dist-skill/library/forgecad-prepare-prompt/SKILL.md +35 -224
  104. package/dist-skill/library/forgecad-prepare-prompt/references/default-profiles.md +43 -271
  105. package/dist-skill/library/forgecad-prepare-prompt/references/master-prompt.md +30 -99
  106. package/dist-skill/library/forgecad-project/SKILL.md +13 -133
  107. package/dist-skill/library/forgecad-reconstruction-benchmark/SKILL.md +29 -123
  108. package/dist-skill/library/forgecad-render-inspect/SKILL.md +25 -174
  109. package/dist-skill/library/forgecad-visual-spec/SKILL.md +30 -111
  110. package/dist-skill/website/skills/forgecad-3d-reconstruction.md +58 -0
  111. package/dist-skill/website/skills/forgecad-blockout-model.md +49 -0
  112. package/dist-skill/website/skills/forgecad-component-model.md +53 -0
  113. package/dist-skill/website/skills/forgecad-high-level-spec.md +101 -0
  114. package/dist-skill/website/skills/forgecad-image-replicator.md +63 -0
  115. package/dist-skill/website/skills/forgecad-lld.md +41 -0
  116. package/dist-skill/website/skills/forgecad-make-a-model.md +186 -0
  117. package/dist-skill/website/skills/forgecad-model-grader.md +82 -0
  118. package/dist-skill/website/skills/forgecad-prepare-prompt.md +63 -0
  119. package/dist-skill/website/skills/forgecad-project.md +26 -0
  120. package/dist-skill/website/skills/forgecad-reconstruction-benchmark.md +60 -0
  121. package/dist-skill/website/skills/forgecad-render-inspect.md +80 -0
  122. package/dist-skill/website/skills/forgecad-visual-spec.md +71 -0
  123. package/dist-skill/website/skills/forgecad.md +122 -0
  124. package/dist-skill/website/skills/index.md +26 -0
  125. package/examples/api/comparison-imported-sphere-candidate.forge.js +1 -1
  126. package/examples/api/conformal-product-ribbon.forge.js +1 -1
  127. package/examples/api/exact-sheet-shell-assembly.forge.js +1 -1
  128. package/examples/api/extrude-options.forge.js +4 -2
  129. package/examples/api/field-loft-drive-tip.forge.js +40 -0
  130. package/examples/api/guided-loft-olive-oil-bottle.forge.js +1 -1
  131. package/examples/api/highlight-debug.forge.js +10 -10
  132. package/examples/api/mesh-import-slats.forge.js +1 -1
  133. package/examples/api/real-product-curves.forge.js +1 -1
  134. package/examples/api/sculpt-box-circle-booleans.forge.js +1 -1
  135. package/examples/api/sdf-shapes.forge.js +2 -5
  136. package/examples/api/sketch-rounding-strategies.forge.js +6 -6
  137. package/examples/api/surface-member-bottle-cage.forge.js +3 -3
  138. package/examples/api/surface-member-conformal-product-ribbon.forge.js +3 -3
  139. package/examples/api/surface-member-razor-inlay.forge.js +1 -1
  140. package/examples/api/variable-sweep-test.forge.js +3 -3
  141. package/examples/mechanical/airplane-propeller.forge.js +74 -39
  142. package/examples/nurbs-surface.forge.js +1 -1
  143. package/examples/products/iphone.forge.js +1 -1
  144. package/examples/robotics/README.md +46 -0
  145. package/examples/robotics/scout-cam-rover-simready/README.md +119 -0
  146. package/examples/robotics/scout-cam-rover-simready/lib/dims.js +140 -0
  147. package/examples/robotics/scout-cam-rover-simready/main.forge.js +343 -0
  148. package/examples/robotics/scout-cam-rover-simready/parts/body.forge.js +304 -0
  149. package/examples/robotics/scout-cam-rover-simready/parts/chassis.forge.js +320 -0
  150. package/examples/robotics/scout-cam-rover-simready/parts/hardware.forge.js +21 -0
  151. package/examples/robotics/scout-cam-rover-simready/parts/turret.forge.js +70 -0
  152. package/examples/robotics/scout-cam-rover-simready/parts/wheel.forge.js +116 -0
  153. package/examples/robotics/simready-asset-crate.forge.js +79 -0
  154. package/examples/robotics/simready-diff-drive-rover.forge.js +141 -0
  155. package/examples/robotics/simready-parallel-gripper.forge.js +102 -0
  156. package/package.json +1 -1
  157. package/dist/assets/EditorApp-BHMQlJ-D.js +0 -14686
  158. package/dist/docs-raw/guides/geometry-conventions.md +0 -52
  159. package/dist/docs-raw/guides/modeling-recipes.md +0 -78
  160. package/dist-skill/docs/guides/geometry-conventions.md +0 -52
  161. package/dist-skill/docs/guides/modeling-recipes.md +0 -78
  162. package/dist-skill/library/forgecad-visual-spec/references/prompt-template.md +0 -79
@@ -1,3 +1,5 @@
1
+ <!-- Generated by scripts/build-forgecad-skill.mjs — do not edit. Edit agent-skill-library/forgecad-reconstruction-benchmark/SKILL.md instead. -->
2
+
1
3
  # forgecad-reconstruction-benchmark
2
4
 
3
5
  Solve ForgeCAD CAD reconstruction benchmark or RL episodes in a prepared workspace by rebuilding a visible reference asset as readable parametric ForgeCAD in the fixed submission path, using visual and geometric self-checks while respecting sandbox limits.
@@ -11,140 +13,46 @@ Solve ForgeCAD CAD reconstruction benchmark or RL episodes in a prepared workspa
11
13
 
12
14
  ## ForgeCAD Reconstruction Benchmark
13
15
 
14
- Use this skill inside a prepared ForgeCAD reconstruction benchmark workspace.
15
- The task is to rebuild the supplied CAD reference as editable ForgeCAD source,
16
- not to wrap, embed, or copy the source asset.
17
-
18
- This is a benchmark adaptation of `forgecad-3d-reconstruction`: same evidence
19
- and coarse-to-fine reconstruction loop, but with a fixed output path, strict
20
- submission rules, and a short wall-clock budget.
21
-
22
- ### Workspace Contract
23
-
24
- Read these first:
25
-
26
- - `AGENTS.md`
27
- - `task/instructions.md`
28
- - this skill
29
- - `agent-home/.agents/skills/forgecad/SKILL.md` for API guidance
30
-
31
- Useful companion skills:
32
-
33
- - `forgecad-3d-reconstruction` for the general reconstruction workflow
34
- - `forgecad-render-inspect` for interpreting inspection bundles
35
- - `forgecad-make-a-model` only for general model quality patterns; do not use
36
- its date-based file-placement workflow in benchmark workspaces
37
-
38
- Common files:
39
-
40
- - reference asset: `task/reference/*`
41
- - final answer: `submission/main.forge.js` unless `task/task.json` says otherwise
42
- - local ForgeCAD wrapper: `./bin/forgecad`
43
- - scratch outputs: `outputs/`
44
-
45
- Stay inside the prepared workspace. Use the local wrappers instead of global
46
- ForgeCAD commands.
47
-
48
- ### Non-Negotiables
49
-
50
- - Final deliverable is readable parametric ForgeCAD source at the required
51
- submission path.
52
- - The reference asset is evidence only. The final source must not call
53
- `importMesh`, `importStep`, `readFile`, `readFileSync`, or equivalent asset
54
- embedding tricks.
55
- - Do not leave `compareWith(...)`, external reference paths, base64 payloads, or
56
- debug probes in the final submission.
57
- - Do not spend the whole budget inspecting. A runnable first candidate is more
58
- valuable than a perfect investigation with no model.
59
- - Use only allowed local tools. Do not rely on web search, broad home-directory
60
- access, subagents, or remote services.
61
-
62
- ### Budget-Aware Workflow
63
-
64
- 1. Orient quickly.
65
- Read `task/instructions.md`, locate the reference file, and inspect the
66
- starter submission. Run the starter once so syntax or runtime problems are
67
- obvious before you edit.
68
-
69
- ```bash
70
- ./bin/forgecad run submission/main.forge.js
71
- ```
72
-
73
- 2. Inspect only the highest-value evidence.
74
- Get dimensions, volume, object count, and at least one visual or sectional
75
- clue when the renderer is available. If a reference command fails or stalls,
76
- continue from task instructions, filename, starter code, and mechanical
77
- inference.
78
-
79
- ```bash
80
- ./bin/forgecad ls task/reference/<asset> --quality live --long
81
- ./bin/forgecad render 3d task/reference/<asset> outputs/reference.png --camera iso --edges thin --size 900
82
- ./bin/forgecad inspect sections sample task/reference/<asset> outputs/reference-sections --count 5 --size 700
83
- ./bin/forgecad inspect section task/reference/<asset> --plane yz --offset 0 --ray width:-50,0:50,0 --size 700
84
- ```
85
-
86
- For 3MF references, the `forgecad run` output includes a source structure
87
- table with stable `3mf:build:...:object:...` refs, automatic item names,
88
- per-item bounding boxes, and triangle counts. Treat that table as part of
89
- the evidence: the final model may be one part or many parts, but you should
90
- account for every substantial 3MF item in the reconstruction brief.
91
-
92
- Use `inspect section` when you need an exact local measurement. It writes a
93
- unique probe directory with `result.json`; later you can replay that probe
94
- against the candidate with `./bin/forgecad inspect replay <result.json>
95
- --source submission/main.forge.js`.
96
- For 3MF references, the `forgecad run` output includes a source structure
97
- table with stable `3mf:build:...:object:...` refs, automatic item names,
98
- per-item bounding boxes, and triangle counts. Treat that table as part of
99
- the evidence: the final model may be one part or many parts, but you should
100
- account for every substantial 3MF item in the reconstruction brief.
101
-
102
- 3. Write a short Reconstruction Brief in your notes or `outputs/brief.md`.
103
- Capture identity, bbox, major primitive families, symmetry, holes/cutouts,
104
- likely manufacturing intent, and the first modeling plan. Keep it short.
105
-
106
- 4. Edit the submission early.
107
- Build a coarse candidate that matches bbox, orientation, and main masses
108
- before adding details. Prefer simple analytic primitives, sketches, booleans,
109
- revolves, patterns, and blueprint-first dimensions over vertex chasing.
110
-
111
- 5. Self-check and iterate.
112
- Use command success, rendered views, details, and section slices as the main
113
- feedback. Improve in this order: bbox and origin, main silhouette, large
114
- holes/cutouts, ribs/bosses, edge treatments, then small details.
115
-
116
- ```bash
117
- ./bin/forgecad run submission/main.forge.js
118
- ./bin/forgecad render 3d submission/main.forge.js outputs/submission.png --camera iso --edges thin --size 900
119
- ./bin/forgecad render section submission/main.forge.js outputs/submission-section.svg --plane XZ --offset 0
120
- ```
121
-
122
- For closer comparison, render corresponding reference and candidate views or
123
- slices into `outputs/` and inspect the images/files side by side:
124
-
125
- ```bash
126
- ./bin/forgecad render 3d task/reference/<asset> outputs/reference.png --camera iso --edges thin --size 900
127
- ./bin/forgecad inspect sections sample task/reference/<asset> outputs/reference-sections --count 5 --size 700
128
- ```
129
-
130
- 6. Final cleanup.
131
- Re-run the candidate and inspect the most useful final views or sections.
132
- Remove temporary imports, `compareWith`, debug-only geometry, scratch paths,
133
- and comments that describe abandoned attempts. Leave the best source at the
134
- required submission path.
135
-
136
- Optimize real geometry and design intent. A clean parametric approximation that
137
- captures the object is preferable to an unreadable mesh mimic.
138
-
139
- ### Done Criteria
140
-
141
- Before exit:
142
-
143
- - `./bin/forgecad run submission/main.forge.js` succeeds.
144
- - Final render or section evidence has been checked after the final meaningful
145
- edit.
146
- - The required submission file contains no banned import/read/embed path.
147
- - The model is recognizable against the reference from the main views.
16
+ Benchmark adaptation of `forgecad-3d-reconstruction`: same reconstruction loop, but with a fixed submission path, a local CLI wrapper, sandbox limits, and a short wall-clock budget. This sheet owns only those deltas — follow `forgecad-3d-reconstruction` for the reconstruction craft.
17
+
18
+ ### Workspace
19
+
20
+ Read first: `AGENTS.md`, `task/instructions.md`, this skill, and `agent-home/.agents/skills/forgecad/SKILL.md` (API + CLI reference).
21
+
22
+ - Reference asset (evidence only): `task/reference/*`
23
+ - Final answer: `submission/main.forge.js`, unless `task/task.json` overrides
24
+ - CLI: the local wrapper `./bin/forgecad`, never global commands
25
+ - Scratch renders/notes: `outputs/`
26
+ - Stay inside the prepared workspace.
27
+
28
+ ```bash
29
+ ./bin/forgecad run submission/main.forge.js
30
+ ```
31
+
32
+ ### Rules and Done Criteria
33
+
34
+ - Deliverable is readable parametric ForgeCAD source at the required submission path. A clean parametric approximation beats an unreadable mesh mimic.
35
+ - The final source must not call `Import.mesh`, `Import.step`, `importMesh`, `importStep`, `readFile`, `readFileSync`, or any equivalent asset-embedding trick, and must contain no `compareWith(...)`, external reference paths, base64 payloads, or debug probes.
36
+ - Sandbox: allowed local tools only — no web search, no broad home-directory access, no subagents, no remote services.
37
+ - Before exit: the run command above succeeds; visual/section evidence checked after the last meaningful edit; model recognizable against the reference from the main views.
38
+
39
+ ### Budget Discipline
40
+
41
+ A runnable first candidate beats a perfect investigation with no model.
42
+
43
+ 1. Run the starter submission once before editing so syntax/runtime problems surface early.
44
+ 2. Inspect only the highest-value reference evidence: dimensions, volume, object count, one visual or sectional view. If a reference render/inspect command fails or stalls, continue from task instructions, filename, starter code, and mechanical inference — do not burn the budget retrying.
45
+ 3. Write a short reconstruction brief in `outputs/brief.md` (fields per `forgecad-3d-reconstruction`).
46
+ 4. Edit the submission early: coarse bbox, orientation, and main masses first, then iterate coarse-to-fine per `forgecad-3d-reconstruction`.
47
+ 5. 3MF references: the `forgecad run` source-structure table is evidence — account for every substantial 3MF item in the reconstruction (the final model may be one part or many).
48
+ 6. `inspect section` probes are replayable against the candidate via `inspect replay` — the cheap way to verify an exact local measurement transfers. Mechanics: `forgecad-render-inspect`.
49
+
50
+ ### Pointers
51
+
52
+ - `forgecad-3d-reconstruction` the evidence brief coarse fine loop and metric diagnosis
53
+ - `forgecad-render-inspect` — inspection bundles, section probes, replay
54
+ - forgecad skill at `agent-home/.agents/skills/forgecad/` API and CLI syntax
55
+ - `forgecad-make-a-model` general quality patterns only; its date-based file-placement workflow does not apply in benchmark workspaces
148
56
 
149
57
 
150
58
  ## Bundled Files
@@ -1,3 +1,5 @@
1
+ <!-- Generated by scripts/build-forgecad-skill.mjs — do not edit. Edit agent-skill-library/forgecad-render-inspect/SKILL.md instead. -->
2
+
1
3
  # forgecad-render-inspect
2
4
 
3
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.
@@ -11,82 +13,25 @@ Run and interpret ForgeCAD inspection bundles for model verification. Use when a
11
13
 
12
14
  ## ForgeCAD Render Inspect
13
15
 
14
- Use `forgecad inspect ...` when a shaded viewport render is too ambiguous and you need structured evidence about a ForgeCAD model. Most inspection commands write a deterministic directory bundle containing evidence PNGs plus a root `manifest.json`; `inspect section` writes a one-off probe directory with `result.json`, `section.svg`, and `section.png`.
15
-
16
- This skill owns the inspection workflow: choosing evidence, generating the bundle, reading the manifest, visually inspecting the relevant PNGs, and turning the findings into model fixes or a verification report.
17
-
18
- Inspection is not a substitute artifact. Use sections, object masks, transparency, focus, and hide controls to look inside a real model; do not edit the model into a cutaway or exploded default just to make the inspection easier.
19
-
20
- ### Trigger Boundary
21
-
22
- Use this skill for:
23
-
24
- - inspecting an existing `.forge.js` model
25
- - analyzing a previously generated inspection bundle
26
- - validating collisions, wall thickness, section cuts, connectivity, floating bodies, distance, object masks, depth, normals, or Zebra stripes
27
- - deciding which inspection evidence to run
28
- - producing evidence before calling a model complete
29
-
30
- Routing:
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.
31
17
 
32
- | Need | Skill |
33
- |------|-------|
34
- | Learn or use ForgeCAD APIs while authoring geometry | `forgecad` |
35
- | Create a new model in the personal model repo | `forgecad-make-a-model` |
36
- | Run and interpret inspection bundles | `forgecad-render-inspect` |
37
- | Debug the inspection command implementation itself | `forgecad` plus this skill's source map |
18
+ Routing: authoring/API questions `forgecad` skill; creating a new model → `forgecad-make-a-model`.
38
19
 
39
20
  ### Workflow
40
21
 
41
- 1. Identify the inspection question.
42
- Decide what would make the model wrong: unexpected overlap, too-thin walls, missing parts, hidden cavity failure, disconnected bodies, unintentionally fused bodies, orientation artifacts, or object identity confusion.
43
-
44
- 2. Choose output persistence.
45
- Let `inspect section` allocate its timestamped output directory by default so repeated probes never collide. Use `/tmp/<model-name>-inspect` for temporary bundle outputs, or a project output directory only when the user wants a persistent artifact.
46
-
47
- 3. Pick the evidence.
48
- Prefer one targeted evidence command at a time. Use `forgecad inspect evidence`
49
- to list the available commands.
50
-
51
- 4. Run the command.
52
- In the ForgeCAD repo, prefer the built CLI when you want the current checkout:
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:
53
26
 
54
27
  ```bash
55
- node dist-cli/forgecad.js inspect fit interference model.forge.js --camera iso --size 700
28
+ python <this-skill-dir>/summarize_manifest.py /tmp/model-inspect
56
29
  ```
57
30
 
58
- Outside the ForgeCAD repo, use the installed CLI:
59
-
60
- ```bash
61
- forgecad inspect fit interference model.forge.js --camera iso --size 700
62
- ```
63
-
64
- If the model may not execute, run `forgecad run model.forge.js` first. If imports are suspect, add `--debug-imports` to the run command.
65
-
66
- 5. Summarize the manifest.
67
- Run the bundled helper:
68
-
69
- ```bash
70
- python agent-skill-library/forgecad-render-inspect/summarize_manifest.py /tmp/model-inspect
71
- ```
72
-
73
- Use `jq` for targeted follow-up when needed:
74
-
75
- ```bash
76
- jq '.evidence.collisions | {collisionCount, collisions, warnings}' /tmp/model-inspect/manifest.json
77
- jq '.evidence.thickness.objects[] | {name, minThickness, p05Thickness, criticalAreaPercent, warningAreaPercent, unresolvedAreaPercent}' /tmp/model-inspect/manifest.json
78
- jq '.evidence.connectivity | {componentCount, edges, warnings}' /tmp/model-inspect/manifest.json
79
- jq '.evidence.floating | {floatingBodyCount, floatingObjectCount, warnings}' /tmp/model-inspect/manifest.json
80
- ```
81
-
82
- 6. Inspect the PNGs, not only the JSON.
83
- Always look at the view PNGs that match the risk. Use the manifest paths instead of assuming layout when writing automation; custom cameras may not use canonical filenames.
84
-
85
- 7. Decide whether findings are bugs.
86
- Treat unexpected collision findings, critical thin regions, high unresolved thickness, missing sections, wrong object names, wrong component count, or surprising distance gaps as model bugs. If an overlap is intentional, isolate the check with `--focus` or `--hide` so the remaining report is meaningful.
87
-
88
- 8. Report evidence.
89
- Include the exact command, bundle path, evidence emitted, manifest highlights, PNG views inspected, and any residual limits. Do not say the geometry is verified if you only ran `forgecad run`.
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`.
90
35
 
91
36
  ### Evidence Selection
92
37
 
@@ -96,9 +41,9 @@ Routing:
96
41
  | Kinematic rig, joints, axes, and links | `inspect visual rig` |
97
42
  | Object naming and identity | `inspect visual objects` |
98
43
  | Exact local section measurement, bore widths, rib thickness through a chosen line | `inspect section --ray ...` |
99
- | Hidden internals, cavities, pockets, screw paths, captured components | `inspect sections at|stack|sample` |
44
+ | Hidden internals, cavities, pockets, screw paths, captured components | `inspect sections at\|stack\|sample` |
100
45
  | Multi-part interference, fit checks, ghost parts, moving clearances | `inspect fit interference` |
101
- | Printability, shell walls, ribs, bosses, snaps, slots | `inspect manufacture thickness` plus `inspect sections at|stack|sample` when internals matter |
46
+ | Printability, shell walls, ribs, bosses, snaps, slots | `inspect manufacture thickness` plus `inspect sections at\|stack\|sample` when internals matter |
102
47
  | Parts without a mesh-contact path to the ground | `inspect physical floating` |
103
48
  | Accidental fusion, connected solids | `inspect physical components` |
104
49
  | Air gaps between physical components | `inspect physical gaps` |
@@ -106,120 +51,28 @@ Routing:
106
51
  | Loft, fillet, skin, and sweep surface continuity | `inspect surface zebra` or `inspect visual normals` |
107
52
  | Reference-vs-candidate reconstruction comparison | `inspect compare overlay --with reference.3mf` |
108
53
 
109
- ### Command Patterns
54
+ ### Section Probe + Replay
110
55
 
111
- Explicit fast bundle:
56
+ The agent-native measure-then-recheck loop:
112
57
 
113
58
  ```bash
114
- forgecad inspect visual objects model.forge.js --camera iso --size 700
115
- forgecad inspect visual rig model.forge.js --camera iso --size 700
116
- forgecad inspect sections at model.forge.js --plane yz --offset 12.5 --size 700
117
- forgecad inspect sections stack model.forge.js --plane yz --every 1 --size 700
118
- forgecad inspect sections sample model.forge.js --count 5 --size 700
119
- ```
120
-
121
- Agent-native one-off section probe:
122
-
123
- ```bash
124
- forgecad inspect section model.forge.js --plane yz --ray bore:-20,0:20,0 --size 700
59
+ forgecad inspect section model.forge.js --plane yz --ray bore:-20,0:20,0
125
60
  forgecad inspect replay outputs/inspect/<probe>/result.json --source candidate.forge.js
126
61
  ```
127
62
 
128
- Reference-vs-candidate comparison bundle:
129
-
130
- ```bash
131
- forgecad inspect compare overlay candidate.forge.js --with reference.3mf --compare-samples 3000 --size 700
132
- ```
133
-
134
- Final fit/interference check:
135
-
136
- ```bash
137
- forgecad inspect fit interference model.forge.js --camera iso --size 700
138
- ```
139
-
140
- Collision-focused isolation:
63
+ The probe's `result.json` field contract (frames, rulers, gaps, replaySpec) is documented in the forgecad skill's `docs/guides/inspection-bundles.md`.
141
64
 
142
- ```bash
143
- forgecad inspect fit interference model.forge.js --focus "Bracket,Screw Ghost" --camera iso
144
- ```
145
-
146
- Thickness check with process-aware thresholds:
147
-
148
- ```bash
149
- forgecad inspect manufacture thickness model.forge.js --min 1.6 --warn 2.4 --camera iso
150
- ```
65
+ ### Misread Traps
151
66
 
152
- Hide known clutter or mock geometry:
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.
153
72
 
154
- ```bash
155
- forgecad inspect fit interference model.forge.js --hide "Fixture Ghost,Debug Envelope" --camera iso
156
- ```
157
-
158
- Use bare `--focus` to hide mock objects while keeping real scene objects:
159
-
160
- ```bash
161
- forgecad inspect fit interference model.forge.js --focus --camera iso
162
- ```
73
+ ### Reference
163
74
 
164
- ### Reading Results
165
-
166
- Manifest fields to check first:
167
-
168
- - `bundle.evidenceRequested` / `bundle.evidenceEmitted`: confirm you inspected what you intended.
169
- - `bundle.filters`: confirm focus/hide did not accidentally exclude relevant geometry.
170
- - `scene.bbox` and `scene.volume`: catch absurd scale, missing geometry, or bad units.
171
- - `scene.objects`: confirm expected part names and mock flags.
172
- - `evidence.objects.objects`: map object colors to names; do not rely on object order alone.
173
- - `evidence.collisions.collisionCount`: investigate every unexpected positive-volume overlap.
174
- - `evidence.thickness.objects`: inspect `minThickness`, `p05Thickness`, critical/warning percentages, and unresolved area.
175
- - `evidence.connectivity.componentCount`: compare to the expected number of physical components.
176
- - `evidence.floating.floatingBodyCount`: investigate every body without a mesh-contact path to the ground plane, especially body entries from one unioned object.
177
- - `evidence.distance.maxRootDistance` and per-object `nearestGap`: check suspicious isolation or spacing.
178
- - `evidence.sections.slicingPolicy`: confirm whether the bundle used exact, count-based, or physical-spacing slices.
179
- - `evidence.sections.planes`: look for missing slices, wrong path counts, empty internal cuts, plane normals, spacing, and slice counts. These are inspection views, not instructions to section the returned production geometry.
180
-
181
- `inspect section` result fields to check first:
182
-
183
- - `section.frame`: use `u` and `v` to understand the section-local coordinate system for rulers.
184
- - `section.objects`: inspect per-object areas, bounds, and loop counts. Use `section.svg` for the actual section outlines.
185
- - `rulers[].insideSegments`: exact intervals where the ray is inside any sectioned object.
186
- - `rulers[].gaps`: exact intervals between solid spans along the ray, including end gaps.
187
- - `comparison.rulers`: replay deltas against the original probe when using `inspect replay`.
188
- - `replaySpec`: the recipe an agent can rerun against a candidate model.
189
-
190
- PNG review order:
191
-
192
- 1. Image evidence for human shape sanity when needed.
193
- 2. Object evidence and one orthogonal object view for identity when needed.
194
- 3. The risk evidence's chosen view.
195
- 4. Orthogonal cameras (`front`, `right`, `top`) when the iso view hides the issue.
196
- 5. Section slices around the suspected feature when internals matter.
197
-
198
- ### Interpretation Rules
199
-
200
- - Collision findings are positive-volume boolean overlaps. Face-touching is not a collision.
201
- - Connectivity uses bbox as a broadphase, then shared physical-contact detection for component grouping: mesh surfaces within contact tolerance count as connected, exact positive-volume overlap is used when needed, and bbox-only contact does not merge separate scene objects by default. Use collisions evidence for positive-volume overlap defects.
202
- - Floating uses the same shared physical-contact detection plus scene-ground reachability. Mesh gaps within contact tolerance count as connected, bbox overlap or bbox face contact alone does not, and every component without a contact path to ground is reported. Disconnected mesh islands inside one object are inspected separately.
203
- - Distance is a bbox-gap metric between physical components, not exact closest surface distance.
204
- - Thickness is a contact-aware mesh/raycast approximation. It uses the same physical-contact edges as connectivity/floating, so rays jump over direct-neighbor contact seams within contact tolerance before measuring the next surface. Gray or high unresolved area means the visual heatmap is incomplete, not that the model is safe.
205
- - Depth is a visual heatmap, not raw floating-point depth data.
206
- - Normals are camera-view normals, not world-space normals.
207
- - Zebra is a reflective stripe shader for visual continuity inspection, not an exact curvature-continuity proof.
208
- - Mask colors are stable within a bundle and resolved through the manifest.
209
-
210
- ### Source Map
211
-
212
- Read these only when needed:
213
-
214
- | Need | Source |
215
- |------|--------|
216
- | Bundle contract and evidence semantics | `docs/permanent/guides/inspection-bundles.md` |
217
- | CLI reference and options | `docs/permanent/CLI.md` |
218
- | CLI parser, bundle writer, manifest generation | `cli/forge-render.mjs` |
219
- | Browser-side evidence rendering | `cli/render.ts` |
220
- | Collision semantics | `cli/collision-inspection.ts` |
221
- | Thickness semantics | `cli/thickness-inspection.ts` |
222
- | Connectivity, floating, and distance semantics | `cli/physical-connectivity.ts`, `cli/floating-inspection.ts`, and `cli/distance-inspection.ts` |
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`.
223
76
 
224
77
 
225
78
  ## Bundled Files
@@ -1,3 +1,5 @@
1
+ <!-- Generated by scripts/build-forgecad-skill.mjs — do not edit. Edit agent-skill-library/forgecad-visual-spec/SKILL.md instead. -->
2
+
1
3
  # forgecad-visual-spec
2
4
 
3
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.
@@ -11,141 +13,59 @@ Turn a concrete ForgeCAD artifact, build brief, HLD, or existing model into buil
11
13
 
12
14
  ## ForgeCAD Visual Spec
13
15
 
14
- Use this skill after the artifact is already concrete enough to visualize.
15
-
16
- Good triggers:
16
+ ### Scope
17
17
 
18
- - a specific `.forge.js` model or project folder
19
- - a build brief or HLD that already defines the object
20
- - a request like "write image prompts for this model"
21
- - a request to show the final product without hiding how it is built
22
-
23
- Do not use this skill for a vague artifact brief. If the object is still underspecified, use `forgecad-prepare-prompt` first.
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.
24
19
 
25
20
  ### Core Rule
26
21
 
27
- These prompts are not concept art prompts. They are visual-spec prompts.
28
-
29
- The image should:
30
-
31
- - show the final artifact clearly
32
- - preserve build truth and subsystem truth
33
- - keep visible the seams, modules, hardware, and mechanical hierarchy that matter
34
-
35
- The image should not:
36
-
37
- - smooth away the mechanism into a fake consumer shell
38
- - invent flashy sci-fi styling that hides how it works
39
- - pretend to be a CAD drawing, dimensioned blueprint, or engineering diagram
40
- - turn the artifact into a cutaway, sectioned shell, or exploded teaching view unless the user explicitly asks for that representation
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.
41
23
 
42
- ### Default Strategy
24
+ Negatives (the only negatives list — reuse it, never restate variants):
43
25
 
44
- Default to one `honest hero render`.
26
+ - no fake sleek consumer shell, no hidden mechanics
27
+ - no over-smoothed geometry, no sci-fi styling
28
+ - no CAD-drawing, blueprint, or dimension-arrow pretense
29
+ - no cutaway, sectioned, or exploded teaching view unless the user explicitly asks
30
+ - no text, labels, or humans
45
31
 
46
- That is the best first image for most ForgeCAD artifacts because it balances:
32
+ ### Prompt Skeleton
47
33
 
48
- - final-product readability
49
- - mechanical honesty
50
- - visual appeal
34
+ Block order: identity → mechanism truth → materials/color truth → pose/state → shot/camera/lighting → negatives. Fill in, don't copy:
51
35
 
52
- Only add more prompts if the user wants them. The most useful support prompts are:
36
+ ```text
37
+ A [artifact identity and scale], designed as a real buildable CAD-driven object, not a fantasy concept. [Major subassemblies and mechanism truth]. [Materials, colors, finish, visible hardware]. Show it in [pose / state]. [Shot, camera, background, lighting]. It should look physically buildable and mechanically honest, with visible part boundaries and serviceable architecture. No [negative 1], no [negative 2], no [negative 3].
38
+ ```
53
39
 
54
- - `builder-first mechanical render`
55
- - `mild exploded assembly render`
56
- - `workshop prototype realism`
57
- - `gripper / end-effector close-up`
40
+ Default shot: `front-left three-quarter hero view, eye-level product camera`. Alternate: `rear-right three-quarter view showing motor placement and belt routing`.
58
41
 
59
- Prefer separate images over one collage. Multi-view boards are acceptable, but single-purpose images are usually more reliable.
42
+ ### Modes
60
43
 
61
- ### Workflow
44
+ Default to ONE honest hero render; add support prompts only when the user asks. Prefer separate single-purpose images over collages or multi-view boards.
62
45
 
63
- 1. Gather artifact truth.
64
- Read only the minimum context needed:
65
- - top-level `.forge.js` entry
66
- - key helper/module file if the entry delegates the geometry
67
- - build brief / HLD if they exist
46
+ | Mode | Job | Signature phrases |
47
+ |------|-----|-------------------|
48
+ | Honest hero render (default) | Final object clearly, still reads as buildable | `clean premium studio product render`, `physically buildable and mechanically honest` |
49
+ | Builder-first mechanical | Teach the build; bias to interfaces, seams, mounted actuators | `clear visibility of interfaces, seams, and subsystem boundaries`, `serious prototype, not a polished consumer shell` |
50
+ | Mild exploded | Assembly logic; major modules only, no per-screw chaos. Image-only the CAD model stays the complete assembled product | `major modules separated by small clean gaps`, `no tiny floating fragments` |
51
+ | Workshop prototype realism | Feel like a real first prototype | `visible print lines and honest surface texture`, `uncluttered engineering bench background` |
52
+ | End-effector close-up | Wrist/gripper mechanism detail | `close-up on the wrist and end effector showing the mechanism clearly` |
68
53
 
69
- 2. Extract the truths that must survive the image model.
70
- Capture:
71
- - artifact type and scale
72
- - major subassemblies
73
- - actuation style
74
- - visible mechanisms
75
- - material cues
76
- - color cues if already established
77
- - what must stay visible for build understanding
78
-
79
- 3. Choose the representation mode.
80
- Default: `honest hero render`
81
- Switch only if the user explicitly wants a support view or image pack.
82
-
83
- 4. Write the prompt in blocks.
84
- Use the template in `references/prompt-template.md`.
85
- Keep the wording concrete and artifact-specific.
86
-
87
- 5. Add negative constraints inline.
88
- Tell the model what to avoid, especially:
89
- - hidden mechanics
90
- - fake sleek shelling
91
- - over-smoothed geometry
92
- - unreadable clutter
93
- - text, labels, or dimension arrows unless explicitly requested
94
-
95
- 6. Return the prompt pack.
96
- If the user asked for "a prompt", return one prompt.
97
- If the user asked to compare approaches, return 2-4 prompts with clearly different jobs.
98
-
99
- ### Prompt Writing Rules
54
+ ### Writing Rules
100
55
 
101
56
  - Use real artifact language: base, turntable, shoulder, rails, bearings, gripper, belt, pulley, shaft.
102
57
  - Prefer visible subsystem truth over poetic adjectives.
103
58
  - Keep exact dimensions out unless they matter visually and are already known.
104
- - If a detail is uncertain, stay honest at the subsystem level instead of inventing internals.
105
- - Ask for "physically buildable", "mechanically honest", and "visible part boundaries" when that is central.
106
- - For robots and mechanisms, mention motors, belts, pulleys, shafts, guide rods, fasteners, or service covers only if they are genuinely part of the artifact.
107
- - Avoid long style dumps. A short strong prompt beats a bloated one.
108
-
109
- ### Mode Guide
110
-
111
- #### Honest Hero Render
112
-
113
- Use by default.
114
-
115
- Best when the user wants one image that shows the final object clearly while still reading as something that could actually be built.
116
-
117
- #### Builder-First Mechanical Render
118
-
119
- Use when the user wants the image to teach the build more directly.
120
-
121
- Bias harder toward interfaces, seams, mounted actuators, and subsystem boundaries.
122
-
123
- #### Mild Exploded Assembly Render
124
-
125
- Use when the user wants assembly logic or modular breakdown.
126
-
127
- Keep the explosion restrained. Separate only major modules, not every screw.
128
- This is a visual-spec support image, not a default ForgeCAD modeling instruction; the CAD artifact should still be the complete assembled product.
129
-
130
- #### Workshop Prototype Realism
131
-
132
- Use when the user wants the artifact to feel like a real first prototype rather than a clean studio render.
133
-
134
- Bias toward print texture, honest materials, and believable workshop context.
59
+ - If a detail is uncertain, stay honest at the subsystem level never invent internals.
60
+ - Ask for "physically buildable", "mechanically honest", "visible part boundaries" when central.
61
+ - Mention motors, belts, pulleys, shafts, guide rods, fasteners, or service covers only if genuinely part of the artifact.
62
+ - A short strong prompt beats a style dump.
135
63
 
136
64
  ### Output Contract
137
65
 
138
- When using this skill, the answer should usually contain:
139
-
140
- 1. one sentence interpreting the artifact
141
- 2. one primary prompt, usually the `honest hero render`
142
- 3. optional support prompts only if useful
143
- 4. a short note on which prompt to try first
144
-
145
- Do not bury the prompts under theory.
66
+ Return: one sentence interpreting the artifact, the primary prompt first (usually the honest hero render), optional support prompts, and a short which-to-try-first note. Never bury the prompts under theory.
146
67
 
147
68
 
148
69
  ## Bundled Files
149
70
 
150
71
  - `agents/openai.yaml`
151
- - `references/prompt-template.md`