forgecad 0.9.16 → 0.10.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 (147) hide show
  1. package/dist/assets/{AdminPage-CXvls4-J.js → AdminPage-DwYHz72L.js} +1 -1
  2. package/dist/assets/{BenchmarkPage-B27zk8xL.js → BenchmarkPage-a9_f-1US.js} +1 -1
  3. package/dist/assets/{BlogPage-CMAVvgQL.js → BlogPage-DodHpvmf.js} +1 -1
  4. package/dist/assets/{DocsPage-knf4I4h7.js → DocsPage-B5LePEuj.js} +8 -858
  5. package/dist/assets/EditorApp-QXsAISLR.js +16307 -0
  6. package/dist/assets/{EmbedViewer-D7ZGlFjx.js → EmbedViewer-DdEHGUMU.js} +2 -2
  7. package/dist/assets/{LandingPageProofDriven-CnevhTE8.js → LandingPageProofDriven-yhhOodbf.js} +1 -1
  8. package/dist/assets/{LegalPage-BPTUmqeg.js → LegalPage-5RbKRGYK.js} +1 -1
  9. package/dist/assets/{PricingPage-B0D4goG_.js → PricingPage-E3Rma7aV.js} +1 -1
  10. package/dist/assets/{SettingsPage-CFF-UgjI.js → SettingsPage-BJZcM97j.js} +1 -1
  11. package/dist/assets/{app-T0pDcSX4.js → app-DSYrDg0V.js} +733 -205
  12. package/dist/assets/cli/{render-C5pcIISc.js → render-ZMHR9HkV.js} +19 -46
  13. package/dist/assets/{constructionHistoryWorker-Ba2Hm58b.js → constructionHistoryWorker-AwMMWSxg.js} +1103 -349
  14. package/dist/assets/{evalWorker-vkx310U2.js → evalWorker-DbNs7Dkp.js} +3798 -1622
  15. package/dist/assets/{inspectWorker-BuTJDVX6.js → inspectWorker-CZsCFtQT.js} +1163 -409
  16. package/dist/assets/{jointPose-B_Cgedn9.js → jointPose-DO6mnXn_.js} +1 -1
  17. package/dist/assets/{manifold-BWgsjmAM.js → manifold-BGlQBBH9.js} +1 -1
  18. package/dist/assets/{manifold-rZexZI0G.js → manifold-BU-tJwQh.js} +1 -1
  19. package/dist/assets/{manifold-D6IFSkhH.js → manifold-fy2MV7K1.js} +2 -2
  20. package/dist/assets/{reportWorker-0AGij1Ru.js → reportWorker-DO6hcQbh.js} +7155 -2437
  21. package/dist/assets/{scalar-sampling-budget-J5cuzxT1.js → scalar-sampling-budget-o90NSNmF.js} +3940 -1742
  22. package/dist/assets/{scanProxyWorker-Vl4Wxa1y.js → scanProxyWorker-2GtDLk-R.js} +1 -1
  23. package/dist/assets/{javascript-1kQXfVaz.js → typescript-DBQ6RN5l.js} +874 -22
  24. package/dist/cli/render.html +1 -1
  25. package/dist/docs/index.html +3 -3
  26. package/dist/docs-raw/AI/usage.md +1 -1
  27. package/dist/docs-raw/CLI.md +63 -241
  28. package/dist/docs-raw/README.md +6 -0
  29. package/dist/docs-raw/component-model.md +17 -150
  30. package/dist/docs-raw/generated/assembly.md +139 -598
  31. package/dist/docs-raw/generated/concepts.md +245 -3501
  32. package/dist/docs-raw/generated/core.md +277 -1251
  33. package/dist/docs-raw/generated/curves.md +387 -1608
  34. package/dist/docs-raw/generated/legacy.md +162 -0
  35. package/dist/docs-raw/generated/lib.md +227 -85
  36. package/dist/docs-raw/generated/output.md +38 -73
  37. package/dist/docs-raw/generated/runtime-names.md +23 -23
  38. package/dist/docs-raw/generated/sdf.md +68 -284
  39. package/dist/docs-raw/generated/sheet-metal.md +68 -335
  40. package/dist/docs-raw/generated/sketch.md +240 -1161
  41. package/dist/docs-raw/generated/viewport.md +75 -316
  42. package/dist/docs-raw/generated/wood.md +21 -49
  43. package/dist/docs-raw/guides/coordinate-system.md +4 -42
  44. package/dist/docs-raw/guides/inspection-bundles.md +44 -442
  45. package/dist/docs-raw/guides/joint-design.md +18 -79
  46. package/dist/docs-raw/guides/positioning.md +21 -143
  47. package/dist/docs-raw/guides/scene-presentation.md +89 -0
  48. package/dist/docs-raw/skills/forgecad-3d-reconstruction.md +25 -111
  49. package/dist/docs-raw/skills/forgecad-blockout-model.md +20 -117
  50. package/dist/docs-raw/skills/forgecad-component-model.md +23 -107
  51. package/dist/docs-raw/skills/forgecad-high-level-spec.md +47 -155
  52. package/dist/docs-raw/skills/forgecad-image-replicator.md +26 -143
  53. package/dist/docs-raw/skills/forgecad-lld.md +19 -113
  54. package/dist/docs-raw/skills/forgecad-make-a-model.md +112 -532
  55. package/dist/docs-raw/skills/forgecad-model-grader.md +38 -108
  56. package/dist/docs-raw/skills/forgecad-prepare-prompt.md +24 -211
  57. package/dist/docs-raw/skills/forgecad-project.md +13 -131
  58. package/dist/docs-raw/skills/forgecad-reconstruction-benchmark.md +42 -134
  59. package/dist/docs-raw/skills/forgecad-render-inspect.md +27 -174
  60. package/dist/docs-raw/skills/forgecad-visual-spec.md +32 -112
  61. package/dist/docs-raw/skills/forgecad.md +19 -18
  62. package/dist/docs-raw/skills/index.md +2 -0
  63. package/dist/docs-raw/welcome.md +2 -2
  64. package/dist/index.html +1 -1
  65. package/dist/llms.txt +1 -2
  66. package/dist/sitemap.xml +13 -13
  67. package/dist-cli/{check-compiler-SYQ2PWOB.js → check-compiler-JTVBITCR.js} +1 -1
  68. package/dist-cli/{check-query-propagation-HIAGV62W.js → check-query-propagation-3FFLSMVN.js} +1 -1
  69. package/dist-cli/{chunk-SPZE3DUY.js → chunk-OAN5T4XD.js} +4412 -2212
  70. package/dist-cli/forgecad.js +507 -179
  71. package/dist-skill/CONTEXT.md +2172 -8377
  72. package/dist-skill/SKILL.md +15 -15
  73. package/dist-skill/docs/API/core/concepts.md +27 -157
  74. package/dist-skill/docs/CLI.md +63 -241
  75. package/dist-skill/docs/generated/assembly.md +138 -549
  76. package/dist-skill/docs/generated/core.md +277 -1251
  77. package/dist-skill/docs/generated/curves.md +387 -1609
  78. package/dist-skill/docs/generated/lib.md +227 -85
  79. package/dist-skill/docs/generated/output.md +38 -73
  80. package/dist-skill/docs/generated/runtime-names.md +16 -21
  81. package/dist-skill/docs/generated/sdf.md +68 -284
  82. package/dist-skill/docs/generated/sheet-metal.md +68 -335
  83. package/dist-skill/docs/generated/sketch.md +240 -1160
  84. package/dist-skill/docs/generated/viewport.md +75 -223
  85. package/dist-skill/docs/generated/wood.md +21 -49
  86. package/dist-skill/docs/guides/coordinate-system.md +4 -42
  87. package/dist-skill/docs/guides/inspection-bundles.md +44 -442
  88. package/dist-skill/docs/guides/joint-design.md +18 -79
  89. package/dist-skill/docs/guides/positioning.md +21 -143
  90. package/dist-skill/docs/guides/scene-presentation.md +89 -0
  91. package/dist-skill/docs/guides/surface-members.md +26 -0
  92. package/dist-skill/library/forgecad-3d-reconstruction/SKILL.md +23 -111
  93. package/dist-skill/library/forgecad-blockout-model/SKILL.md +18 -117
  94. package/dist-skill/library/forgecad-component-model/SKILL.md +21 -107
  95. package/dist-skill/library/forgecad-high-level-spec/SKILL.md +45 -155
  96. package/dist-skill/library/forgecad-image-replicator/SKILL.md +24 -143
  97. package/dist-skill/library/forgecad-lld/SKILL.md +17 -113
  98. package/dist-skill/library/forgecad-make-a-model/SKILL.md +110 -532
  99. package/dist-skill/library/forgecad-model-grader/SKILL.md +36 -108
  100. package/dist-skill/library/forgecad-prepare-prompt/SKILL.md +35 -224
  101. package/dist-skill/library/forgecad-prepare-prompt/references/default-profiles.md +43 -271
  102. package/dist-skill/library/forgecad-prepare-prompt/references/master-prompt.md +30 -99
  103. package/dist-skill/library/forgecad-project/SKILL.md +13 -133
  104. package/dist-skill/library/forgecad-reconstruction-benchmark/SKILL.md +29 -123
  105. package/dist-skill/library/forgecad-render-inspect/SKILL.md +25 -174
  106. package/dist-skill/library/forgecad-visual-spec/SKILL.md +30 -111
  107. package/dist-skill/website/skills/forgecad-3d-reconstruction.md +58 -0
  108. package/dist-skill/website/skills/forgecad-blockout-model.md +49 -0
  109. package/dist-skill/website/skills/forgecad-component-model.md +53 -0
  110. package/dist-skill/website/skills/forgecad-high-level-spec.md +101 -0
  111. package/dist-skill/website/skills/forgecad-image-replicator.md +63 -0
  112. package/dist-skill/website/skills/forgecad-lld.md +41 -0
  113. package/dist-skill/website/skills/forgecad-make-a-model.md +186 -0
  114. package/dist-skill/website/skills/forgecad-model-grader.md +82 -0
  115. package/dist-skill/website/skills/forgecad-prepare-prompt.md +63 -0
  116. package/dist-skill/website/skills/forgecad-project.md +26 -0
  117. package/dist-skill/website/skills/forgecad-reconstruction-benchmark.md +60 -0
  118. package/dist-skill/website/skills/forgecad-render-inspect.md +80 -0
  119. package/dist-skill/website/skills/forgecad-visual-spec.md +71 -0
  120. package/dist-skill/website/skills/forgecad.md +122 -0
  121. package/dist-skill/website/skills/index.md +26 -0
  122. package/examples/api/comparison-imported-sphere-candidate.forge.js +1 -1
  123. package/examples/api/conformal-product-ribbon.forge.js +1 -1
  124. package/examples/api/exact-sheet-shell-assembly.forge.js +1 -1
  125. package/examples/api/extrude-options.forge.js +4 -2
  126. package/examples/api/field-loft-drive-tip.forge.js +40 -0
  127. package/examples/api/guided-loft-olive-oil-bottle.forge.js +1 -1
  128. package/examples/api/highlight-debug.forge.js +10 -10
  129. package/examples/api/mesh-import-slats.forge.js +1 -1
  130. package/examples/api/real-product-curves.forge.js +1 -1
  131. package/examples/api/sculpt-box-circle-booleans.forge.js +1 -1
  132. package/examples/api/sdf-shapes.forge.js +2 -5
  133. package/examples/api/sketch-rounding-strategies.forge.js +6 -6
  134. package/examples/api/surface-member-bottle-cage.forge.js +3 -3
  135. package/examples/api/surface-member-conformal-product-ribbon.forge.js +3 -3
  136. package/examples/api/surface-member-razor-inlay.forge.js +1 -1
  137. package/examples/api/variable-sweep-test.forge.js +3 -3
  138. package/examples/mechanical/airplane-propeller.forge.js +74 -39
  139. package/examples/nurbs-surface.forge.js +1 -1
  140. package/examples/products/iphone.forge.js +1 -1
  141. package/package.json +1 -1
  142. package/dist/assets/EditorApp-BHMQlJ-D.js +0 -14686
  143. package/dist/docs-raw/guides/geometry-conventions.md +0 -52
  144. package/dist/docs-raw/guides/modeling-recipes.md +0 -78
  145. package/dist-skill/docs/guides/geometry-conventions.md +0 -52
  146. package/dist-skill/docs/guides/modeling-recipes.md +0 -78
  147. 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-image-replicator/SKILL.md instead. -->
2
+
1
3
  # forgecad-image-replicator
2
4
 
3
5
  Build real ForgeCAD geometry from one or more reference images by treating images as evidence, inferring the object, then validating against both reference-matched and canonical views.
@@ -11,167 +13,48 @@ Build real ForgeCAD geometry from one or more reference images by treating image
11
13
 
12
14
  ## ForgeCAD Image Replicator
13
15
 
14
- Use this skill when the user provides one or more images and wants a ForgeCAD model of the object shown.
15
-
16
- The reference image is evidence. It is not the deliverable.
17
-
18
- The deliverable is a real parametric object that remains believable from front, back, side, top, bottom, and reference camera views. A model that matches one image but falls apart from other angles has failed, even if the comparison board looks close.
16
+ The reference image is evidence, not the deliverable. The deliverable is a real parametric object that holds up from front, back, side, top, bottom, and reference camera views — a model that matches one image but falls apart from other angles has failed, even if the comparison board looks close. Cutaway, sectioned, exploded, or transparent references are evidence about the complete object: build the closed artifact and recreate explanatory views with viewer/inspection tools (the main `forgecad` skill's closed-artifact rule applies).
19
17
 
20
- If a reference image is cutaway, sectioned, exploded, partly hidden, or transparent, treat that as evidence about the complete object. Do not make the default ForgeCAD result a permanently cutaway or exploded display unless the user explicitly asked for a teaching/display model. Build the closed artifact first, then use ForgeCAD viewer/inspection tools to recreate explanatory views.
18
+ ### Companion Skills
21
19
 
22
- ### Required Companion Skills
23
-
24
- - Use `forgecad` for API docs, model authoring, and renderer behavior.
25
- - Use `forgecad-prepare-prompt` when the image does not fully determine the artifact family, process posture, scale, operating story, or validation boundary.
26
- - Use `forgecad-make-a-model` for file placement, decomposition, parametric modeling, and definition of done.
27
- - Use `forgecad-render-inspect` before final delivery when the object has multiple parts, internal geometry, mechanisms, thin walls, or fit-sensitive features.
20
+ - `forgecad` API docs, model authoring, renderer behavior.
21
+ - `forgecad-prepare-prompt` — when the images underdetermine artifact family, process posture, scale, operating story, or validation boundary.
22
+ - `forgecad-make-a-model` file placement, project structure, decomposition, definition of done.
23
+ - `forgecad-render-inspect` pre-delivery inspection for multi-part, internal, mechanical, thin-wall, or fit-sensitive objects.
28
24
 
29
25
  ### Core Rule
30
26
 
31
- Infer the real object before matching the camera.
32
-
33
- Do not begin by chasing pixels, silhouettes, or the prettiest view. First form a 3D object hypothesis: what the artifact is, how it is made, what hidden sides must contain, what scale it likely has, and what geometry must exist for it to be physically coherent.
34
-
35
- Reference matching is a validation step after the object exists.
27
+ Infer the real object before matching any camera — identity, manufacture, scale, what hidden sides must contain, what geometry must exist for physical coherence. Reference matching is a validation step after the object exists; never start by chasing pixels or the prettiest view.
36
28
 
37
29
  ### Workflow
38
30
 
39
- 1. Save the references.
40
- Put all provided images in `/tmp/<slug>-replicate/refs`. Keep the original filenames. If there are multiple views, add clear view names when possible: `front`, `side`, `rear-iso`, `top`, `detail`, and so on.
41
-
42
- 2. Read the images as evidence.
43
- For each image, record:
44
- - visible facts: silhouette, view direction, visible faces, major masses, feature counts, color and material boundaries, seams, holes, fasteners, labels, repeated spacing
45
- - scale cues: hands, hardware, wheels, ports, boards, screws, wall thickness, known product proportions
46
- - camera cues: perspective strength, parallel edges, lens distortion, crop, object center, likely elevation and azimuth
47
- - unknowns: hidden sides, occluded parts, ambiguous thickness, missing rear or underside geometry
48
- - conflicts: details that disagree across images or appear stylized, distorted, cropped, or shadow-hidden
49
-
50
- 3. Write a Real Object Brief.
51
- This is a hard gate before modeling. Include:
52
- - artifact identity and family
53
- - likely purpose or operating story
54
- - assumed scale and units
55
- - manufacturing/process posture and material cues
56
- - part and BOM boundary: what is modeled as real geometry, purchased hardware, ghost geometry, or omitted context
57
- - visible facts from the reference set
58
- - inferred hidden-side geometry
59
- - expected canonical front, back, left, right, top, and bottom forms
60
- - required internal, interface, or fit geometry
61
- - validation views and inspection evidence
62
-
63
- 4. Choose the modeling structure.
64
- Use a multi-file `main.forge.js` project when the object has distinct parts, repeated feature families, internals, purchased hardware, variants, or meaningful manufacturing assumptions. Put renderable/importable parts and sub-assemblies in neighboring `.forge.js` files; keep only pure dimensions, materials, math helpers, and lookup tables in plain `.js` files.
65
-
66
- 5. Build a coarse 3D blockout.
67
- Model the object, not the image. Start with the large volumes, axes, symmetry, side depth, rear form, underside, and hidden continuations. Render canonical views before doing reference-camera comparison.
68
-
69
- 6. Calibrate one camera per usable reference.
70
- Match camera after the blockout makes sense from canonical views. Use the object center as `target`. Estimate azimuth, elevation, distance, and FOV from visible faces and perspective cues. Use orthographic when parallel edges stay parallel and there is no visible perspective convergence.
71
-
72
- 7. Render comparison boards.
73
- Render the model from each calibrated reference camera and place the result next to the original image. Do not compare from memory.
74
-
75
- 8. Iterate in the right order.
76
- Change one class of thing at a time:
77
- - object hypothesis: identity, scale, symmetry, hidden-side assumptions, process logic
78
- - major proportions: width, depth, height, taper, curvature, radius families
79
- - canonical geometry: rear, underside, side depth, internal clearances, part interfaces
80
- - camera: azimuth, elevation, target, distance, FOV, orthographic zoom
81
- - details: holes, seams, fasteners, labels, vents, edge treatments, small hardware
82
- - presentation: colors, materials, lighting, background, edge style
83
-
84
- If improving one reference view makes another view or canonical render worse, the object hypothesis is probably wrong. Fix the model, not the camera illusion.
85
-
86
- 9. Use every image as a constraint.
87
- When multiple images are attached, do not choose one as the target and ignore the rest. Assign each image a camera, evidence list, and confidence level. Optimize one shared geometry against the whole set. If an image is decorative, distorted, or contradictory, state how it was weighted.
88
-
89
- 10. Inspect the final object.
90
- Run `forgecad run`, render the reference comparison boards, render canonical views, and use targeted `forgecad inspect <family> <mode>` commands. For multi-part, mechanical, internal, or fit-sensitive models, include `inspect fit interference` and the appropriate `inspect sections at|stack|sample` mode, but keep the delivered model as the complete closed artifact.
91
-
92
- ### Renderer Camera Support
93
-
94
- ForgeCAD `render 3d` supports explicit camera control:
31
+ 1. Stage references in `/tmp/<slug>-replicate/refs`, keeping originals and adding view names where possible (`front`, `side`, `rear-iso`, `top`, `detail`).
32
+ 2. Read each image as evidence, recording: visible facts; scale cues; camera cues; unknowns (hidden/occluded geometry); conflicts across images or stylization.
33
+ 3. Write a Real Object Brief — a hard gate before modeling: (a) artifact identity + operating story; (b) assumed scale and units; (c) process posture + part/BOM boundary (real geometry vs purchased vs ghost vs omitted); (d) inferred hidden-side geometry + expected canonical front/back/left/right/top/bottom forms; (e) validation views and inspection evidence. Use `forgecad-prepare-prompt` when these are underdetermined.
34
+ 4. Build a coarse 3D blockout — model the object, not the image: large volumes, axes, symmetry, side depth, rear form, underside, hidden continuations. Render canonical views before any reference-camera comparison. Follow `forgecad-make-a-model` for project structure.
35
+ 5. Calibrate one camera per usable reference, only after the blockout makes sense from canonical views. Use the object center as `target`; estimate azimuth/elevation/distance/FOV from visible faces and perspective cues; use orthographic when parallel edges stay parallel with no perspective convergence.
36
+ 6. Render comparison boards: render the model from each calibrated reference camera and place it next to the original. Never compare from memory.
37
+ 7. Iterate one class of change at a time, in order: object hypothesis → major proportions → canonical geometry → camera → details → presentation. If improving one reference view makes another view or a canonical render worse, the object hypothesis is wrong — fix the model, not the camera illusion.
38
+ 8. Use every image as a constraint. Never pick one target image and ignore the rest: assign each image a camera, evidence list, and confidence; optimize one shared geometry against the whole set; state how distorted or decorative images were weighted.
39
+ 9. Validate the final object: `forgecad run`, reference comparison boards, canonical renders, and targeted inspections via `forgecad-render-inspect`.
95
40
 
96
- ```bash
97
- forgecad render 3d model.forge.js /tmp/render.png \
98
- --camera "proj=perspective;pos=200,-160,120;target=0,0,20;up=0,0,1;fov=38" \
99
- --size 1000
100
- ```
101
-
102
- Supported camera forms:
103
-
104
- - `--camera front`, `top`, `side`, `right`, `iso`
105
- - `--camera 45:25` for azimuth/elevation in degrees
106
- - `--camera 45:25:260` for azimuth/elevation/distance
107
- - `--camera "proj=perspective;pos=x,y,z;target=x,y,z;up=0,0,1;fov=42"`
108
- - `--camera "proj=orthographic;pos=x,y,z;target=x,y,z;up=0,0,1;zoom=4"`
109
-
110
- If exact full camera specs do not render in the current checkout, fix the renderer before continuing. Do not work around missing camera control by guessing from default `iso` renders.
111
-
112
- ### Rendering And Comparison
113
-
114
- Prefer the built CLI from the repo checkout when available:
115
-
116
- ```bash
117
- node dist-cli/forgecad.js render 3d path/to/model.forge.js /tmp/<slug>-replicate/render-front.png \
118
- --camera "proj=perspective;pos=200,-160,120;target=0,0,20;up=0,0,1;fov=38" \
119
- --size 1000 --edges thin
120
- ```
41
+ ### Comparison Boards
121
42
 
122
- Build side-by-side boards with the bundled helper. It is a self-contained `uv` script that installs Pillow on demand and does not require Chrome. The examples use the ForgeCAD source-checkout path; if the skill is installed elsewhere, resolve `scripts/compare_images.py` relative to the `forgecad-image-replicator` skill directory.
43
+ Render with exact `--camera` specs (see the forgecad CLI doc for supported forms). If exact full camera specs do not render, fix the renderer before continuing never substitute guesses from default `iso` renders.
123
44
 
124
- ```bash
125
- uv run agent-skill-library/forgecad-image-replicator/scripts/compare_images.py \
126
- /tmp/<slug>-replicate/refs/front.png \
127
- /tmp/<slug>-replicate/render-front.png \
128
- /tmp/<slug>-replicate/compare-front.png \
129
- --height 900 --labels "Reference,ForgeCAD"
130
- ```
131
-
132
- Common helper options:
45
+ Build side-by-side boards with the bundled self-contained `uv` helper (installs Pillow on demand). Resolve `scripts/compare_images.py` relative to the installed `forgecad-image-replicator` skill directory:
133
46
 
134
47
  ```bash
135
- uv run agent-skill-library/forgecad-image-replicator/scripts/compare_images.py ref.png render.png compare.png
136
- uv run agent-skill-library/forgecad-image-replicator/scripts/compare_images.py ref.jpg render.png compare.png --height 1200 --fit contain
137
- uv run agent-skill-library/forgecad-image-replicator/scripts/compare_images.py ref.png render.png compare.png --fit cover --labels "Target,Current"
138
- uv run agent-skill-library/forgecad-image-replicator/scripts/compare_images.py ref.png render.png compare.png --no-labels
48
+ uv run <skill-dir>/scripts/compare_images.py refs/front.png render-front.png compare-front.png
139
49
  ```
140
50
 
141
- Use `--fit contain` by default. Use `--fit cover` only when both images already share the same crop and aspect.
142
-
143
- ### Acceptance Standard
144
-
145
- A successful result:
146
-
147
- - has a written Real Object Brief
148
- - has parametric ForgeCAD geometry, not a billboard, facade, pasted texture, or one-view shell
149
- - makes sense from canonical views before reference matching
150
- - matches each usable reference image as closely as the evidence allows
151
- - includes honest hidden-side assumptions where the images are silent
152
- - includes internal, interface, purchased, or hardware geometry when the artifact calls for it
153
- - passes `forgecad run`
154
- - includes final reference comparison boards and canonical renders
155
- - includes inspection results for the risk evidence that matters
156
-
157
- A result fails if it only works from the original camera.
158
-
159
- ### Output Contract
51
+ Use `--fit contain` (default); use `--fit cover` only when both images already share the same crop and aspect. Run with `--help` for other options.
160
52
 
161
- When finished, report:
53
+ ### Done and Report
162
54
 
163
- - model file path
164
- - reference images used
165
- - Real Object Brief summary
166
- - hidden-side and scale assumptions
167
- - final camera spec for each reference image
168
- - comparison board path for each usable reference image
169
- - canonical render paths
170
- - inspection bundle path, when used
171
- - validation commands run
172
- - remaining mismatches, unknowns, or downgraded confidence
55
+ Done means: a written Real Object Brief; real parametric geometry (not a billboard, facade, or one-view shell) that makes sense from all canonical views; honest hidden-side assumptions where images are silent; passes `forgecad run`; comparison boards plus canonical renders exist. The result fails if it only works from the original camera — one render is never enough; expect several render/compare/inspect iterations.
173
56
 
174
- For non-trivial references, expect several render, compare, canonical-view, and inspect iterations. One render is not enough.
57
+ Report: model path; Real Object Brief summary + assumptions; per-reference camera spec, weighting, and board path; canonical render paths; inspection evidence; remaining mismatches or downgraded confidence.
175
58
 
176
59
 
177
60
  ## Bundled Files
@@ -1,3 +1,5 @@
1
+ <!-- Generated by scripts/build-forgecad-skill.mjs — do not edit. Edit agent-skill-library/forgecad-lld/SKILL.md instead. -->
2
+
1
3
  # forgecad-lld
2
4
 
3
5
  Write a Low-Level Design (LLD) for a CAD model — exact dimensions, constraints, parameters, and verification criteria. Use after a High-Level Design (HLD) exists and decisions are locked, or for simple parts that don't need an HLD. The detailed design document that code implements.
@@ -11,125 +13,29 @@ Write a Low-Level Design (LLD) for a CAD model — exact dimensions, constraints
11
13
 
12
14
  ## Low-Level Design (LLD)
13
15
 
14
- Create detailed, authoritative design documents for ForgeCAD models. This is the construction document — exact dimensions, constraints, parameters, and verification criteria.
15
-
16
- ### Prerequisites
17
-
18
- Before writing an LLD, a High-Level Design (`/forgecad-high-level-spec`) should exist with its Decisions table filled. The HLD defines *what* to build and *why*. The LLD defines *exactly how*.
19
-
20
- For simple parts (single body, no alternatives to explore), skip the HLD and write the LLD directly.
21
-
22
- ### Philosophy
23
-
24
- An LLD should read like you're describing the object to someone over the phone — vivid, narrative, conveying shape, behavior, purpose, and intent. But it must also be **authoritative** — the single source of truth that code will implement.
25
-
26
- **Key principles:**
27
- - **Story-first**: Lead with the "what it is" narrative before technical details
28
- - **Sensory richness**: Describe appearance, proportions, materials, feel
29
- - **Behavioral clarity**: How it functions, moves, interacts
30
- - **Technical precision**: Exact constraints, dimensions, and relationships
31
- - **No implementation assumptions**: The LLD knows nothing about ForgeCAD's capabilities
32
-
33
- ### Output Location
34
-
35
- LLDs go next to the model files. Name: `<name>-lld.md`. For complex assemblies, use a directory:
36
-
37
- ```
38
- <project>-lld/
39
- ├── 00-overview.md
40
- ├── 01-global-constraints.md
41
- ├── 02-components/
42
- │ ├── base.md
43
- │ └── bracket.md
44
- ├── 03-assembly.md
45
- └── 04-verification.md
46
- ```
47
-
48
- ### Document Template
49
-
50
- #### 1. Narrative Section
51
-
52
- Lead with vivid description — what it is, purpose, visual character, how it behaves.
53
-
54
- #### 2. Technical Section
55
-
56
- Parameters table, derived dimensions, geometry description, constraints with rationale.
57
-
58
- #### 3. Verification
59
-
60
- Dimensional checks, functional checks, printability checks — as a checklist.
61
-
62
- (See examples in the sections below.)
63
-
64
- ### Workflow
65
-
66
- #### Phase 1: Verify HLD decisions are locked
67
-
68
- If an HLD exists, check that its Decisions table is filled. The LLD implements the decisions — it doesn't revisit them.
69
-
70
- #### Phase 2: Write the document
71
-
72
- 1. Capture the narrative (what it is, how it works)
73
- 2. Extract parameters and constraints
74
- 3. Define verification criteria
75
-
76
- #### Phase 3: Commit and present for review
77
-
78
- Commit the LLD to git. Tell the user it's ready for review.
79
-
80
- #### Phase 4: Iterate via git
81
-
82
- Same as HLD: user reviews the file (edits or verbal feedback), agent reads the diff, updates, commits, repeats.
83
-
84
- ```
85
- Agent writes LLD → git commit → User reviews
86
- → Agent reads diff → updates LLD → git commit → repeat until approved
87
- ```
88
-
89
- #### Phase 5: Review for completeness
90
-
91
- - Can someone build from this alone?
92
- - Does it implement every HLD decision?
93
- - Are all constraints explicit with rationale?
94
-
95
- ### Git Workflow
96
-
97
- LLDs iterate through git, not conversation. The document is the single source of truth.
16
+ ### When and prerequisites
98
17
 
99
- - **Every version gets committed.** No unsaved drafts in conversation.
100
- - **User feedback goes in the file** (inline comments, strikethroughs) or in chat agent checks both.
101
- - **The diff is the review artifact.**
18
+ - An HLD (`/forgecad-high-level-spec`) with a filled Decisions table must exist. The LLD implements those decisions — it never revisits them.
19
+ - Simple parts (single body, no alternatives to explore) skip the HLD and go straight to the LLD.
20
+ - Output: `<name>-lld.md` next to the model files. Complex assemblies split into a numbered directory: overview, global constraints, per-component files, assembly, verification.
102
21
 
103
- ### Writing Guidelines
22
+ ### What an LLD is
104
23
 
105
- **Do:**
106
- - Use concrete comparisons ("about the size of a deck of cards")
107
- - Show the math: `wallThickness = 2.4mm`
108
- - Provide rationale for every constraint
109
- - Start with the story, then the numbers
24
+ - **Narrative first** — reads like describing the object over the phone: shape, behavior, purpose, proportions, feel.
25
+ - **Authoritative** the single source of truth that code implements.
26
+ - **Implementation-blind** the LLD knows nothing about ForgeCAD's capabilities; never let API convenience shape the design.
27
+ - **Every number has a rationale** each constraint and each parameter default/range gets an explicit reason; show the math (e.g. `wallThickness = 2.4mm = 6 × 0.4mm nozzle`).
110
28
 
111
- **Don't:**
112
- - Start with a parameter list
113
- - Leave constraints implicit
114
- - Skip verification criteria
115
- - Use vague terms without grounding
29
+ ### Required structure
116
30
 
117
- ### Parameter Types
31
+ 1. **Narrative** — what it is, how it behaves and interacts, why it exists. Concrete comparisons ("about the size of a deck of cards"); no vague terms without grounding.
32
+ 2. **Technical** — typed parameter table (length / angle / count / boolean / choice / ratio / clearance — this is design-document vocabulary, not the runtime `Param.*` API), always with units (mm and degrees are the defaults) and a rationale for every default and range; derived dimensions shown as math; geometry and constraints, each constraint with rationale.
33
+ 3. **Verification** — mandatory checklist: dimensional checks, functional checks, printability checks.
118
34
 
119
- - `length` mm default
120
- - `angle` — degrees default
121
- - `count` — integer
122
- - `boolean` — true/false
123
- - `choice` — enumerated options
124
- - `ratio` — dimensionless
125
- - `clearance` — fit tolerances, mm default
35
+ Don'ts: never open with a parameter list (story before numbers), never leave a constraint implicit, never skip verification.
126
36
 
127
- Always specify units. Always provide rationale for defaults and ranges.
37
+ ### Process
128
38
 
129
- ### Relationship to Other Skills
39
+ Iterate via git exactly as in `/forgecad-high-level-spec`: commit every version; the diff, not the conversation, is the review artifact.
130
40
 
131
- | Stage | Skill | Output |
132
- |-------|-------|--------|
133
- | 1. Explore the problem space | `/forgecad-high-level-spec` | `*-hld.md` |
134
- | 2. Detailed design | `/forgecad-lld` (this skill) | `*-lld.md` |
135
- | 3. Implementation | `/forgecad-make-a-model` + `/forgecad` | `.forge.js` files |
41
+ Completeness gate before presenting: Can someone build from this alone? Does it implement every HLD decision? Is every constraint explicit with rationale?