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
@@ -6,164 +6,45 @@ forgecad-public: true
6
6
 
7
7
  # ForgeCAD Image Replicator
8
8
 
9
- Use this skill when the user provides one or more images and wants a ForgeCAD model of the object shown.
9
+ 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).
10
10
 
11
- The reference image is evidence. It is not the deliverable.
11
+ ## Companion Skills
12
12
 
13
- 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.
14
-
15
- 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.
16
-
17
- ## Required Companion Skills
18
-
19
- - Use `forgecad` for API docs, model authoring, and renderer behavior.
20
- - Use `forgecad-prepare-prompt` when the image does not fully determine the artifact family, process posture, scale, operating story, or validation boundary.
21
- - Use `forgecad-make-a-model` for file placement, decomposition, parametric modeling, and definition of done.
22
- - Use `forgecad-render-inspect` before final delivery when the object has multiple parts, internal geometry, mechanisms, thin walls, or fit-sensitive features.
13
+ - `forgecad` API docs, model authoring, renderer behavior.
14
+ - `forgecad-prepare-prompt` — when the images underdetermine artifact family, process posture, scale, operating story, or validation boundary.
15
+ - `forgecad-make-a-model` file placement, project structure, decomposition, definition of done.
16
+ - `forgecad-render-inspect` — pre-delivery inspection for multi-part, internal, mechanical, thin-wall, or fit-sensitive objects.
23
17
 
24
18
  ## Core Rule
25
19
 
26
- Infer the real object before matching the camera.
27
-
28
- 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.
29
-
30
- Reference matching is a validation step after the object exists.
20
+ 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.
31
21
 
32
22
  ## Workflow
33
23
 
34
- 1. Save the references.
35
- 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.
36
-
37
- 2. Read the images as evidence.
38
- For each image, record:
39
- - visible facts: silhouette, view direction, visible faces, major masses, feature counts, color and material boundaries, seams, holes, fasteners, labels, repeated spacing
40
- - scale cues: hands, hardware, wheels, ports, boards, screws, wall thickness, known product proportions
41
- - camera cues: perspective strength, parallel edges, lens distortion, crop, object center, likely elevation and azimuth
42
- - unknowns: hidden sides, occluded parts, ambiguous thickness, missing rear or underside geometry
43
- - conflicts: details that disagree across images or appear stylized, distorted, cropped, or shadow-hidden
44
-
45
- 3. Write a Real Object Brief.
46
- This is a hard gate before modeling. Include:
47
- - artifact identity and family
48
- - likely purpose or operating story
49
- - assumed scale and units
50
- - manufacturing/process posture and material cues
51
- - part and BOM boundary: what is modeled as real geometry, purchased hardware, ghost geometry, or omitted context
52
- - visible facts from the reference set
53
- - inferred hidden-side geometry
54
- - expected canonical front, back, left, right, top, and bottom forms
55
- - required internal, interface, or fit geometry
56
- - validation views and inspection evidence
57
-
58
- 4. Choose the modeling structure.
59
- 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.
60
-
61
- 5. Build a coarse 3D blockout.
62
- 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.
24
+ 1. Stage references in `/tmp/<slug>-replicate/refs`, keeping originals and adding view names where possible (`front`, `side`, `rear-iso`, `top`, `detail`).
25
+ 2. Read each image as evidence, recording: visible facts; scale cues; camera cues; unknowns (hidden/occluded geometry); conflicts across images or stylization.
26
+ 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.
27
+ 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.
28
+ 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.
29
+ 6. Render comparison boards: render the model from each calibrated reference camera and place it next to the original. Never compare from memory.
30
+ 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.
31
+ 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.
32
+ 9. Validate the final object: `forgecad run`, reference comparison boards, canonical renders, and targeted inspections via `forgecad-render-inspect`.
63
33
 
64
- 6. Calibrate one camera per usable reference.
65
- 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.
34
+ ## Comparison Boards
66
35
 
67
- 7. Render comparison boards.
68
- Render the model from each calibrated reference camera and place the result next to the original image. Do not compare from memory.
36
+ 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.
69
37
 
70
- 8. Iterate in the right order.
71
- Change one class of thing at a time:
72
- - object hypothesis: identity, scale, symmetry, hidden-side assumptions, process logic
73
- - major proportions: width, depth, height, taper, curvature, radius families
74
- - canonical geometry: rear, underside, side depth, internal clearances, part interfaces
75
- - camera: azimuth, elevation, target, distance, FOV, orthographic zoom
76
- - details: holes, seams, fasteners, labels, vents, edge treatments, small hardware
77
- - presentation: colors, materials, lighting, background, edge style
78
-
79
- 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.
80
-
81
- 9. Use every image as a constraint.
82
- 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.
83
-
84
- 10. Inspect the final object.
85
- 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.
86
-
87
- ## Renderer Camera Support
88
-
89
- ForgeCAD `render 3d` supports explicit camera control:
38
+ 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:
90
39
 
91
40
  ```bash
92
- forgecad render 3d model.forge.js /tmp/render.png \
93
- --camera "proj=perspective;pos=200,-160,120;target=0,0,20;up=0,0,1;fov=38" \
94
- --size 1000
41
+ uv run <skill-dir>/scripts/compare_images.py refs/front.png render-front.png compare-front.png
95
42
  ```
96
43
 
97
- Supported camera forms:
98
-
99
- - `--camera front`, `top`, `side`, `right`, `iso`
100
- - `--camera 45:25` for azimuth/elevation in degrees
101
- - `--camera 45:25:260` for azimuth/elevation/distance
102
- - `--camera "proj=perspective;pos=x,y,z;target=x,y,z;up=0,0,1;fov=42"`
103
- - `--camera "proj=orthographic;pos=x,y,z;target=x,y,z;up=0,0,1;zoom=4"`
104
-
105
- 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.
106
-
107
- ## Rendering And Comparison
108
-
109
- Prefer the built CLI from the repo checkout when available:
110
-
111
- ```bash
112
- node dist-cli/forgecad.js render 3d path/to/model.forge.js /tmp/<slug>-replicate/render-front.png \
113
- --camera "proj=perspective;pos=200,-160,120;target=0,0,20;up=0,0,1;fov=38" \
114
- --size 1000 --edges thin
115
- ```
116
-
117
- 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.
118
-
119
- ```bash
120
- uv run agent-skill-library/forgecad-image-replicator/scripts/compare_images.py \
121
- /tmp/<slug>-replicate/refs/front.png \
122
- /tmp/<slug>-replicate/render-front.png \
123
- /tmp/<slug>-replicate/compare-front.png \
124
- --height 900 --labels "Reference,ForgeCAD"
125
- ```
126
-
127
- Common helper options:
128
-
129
- ```bash
130
- uv run agent-skill-library/forgecad-image-replicator/scripts/compare_images.py ref.png render.png compare.png
131
- uv run agent-skill-library/forgecad-image-replicator/scripts/compare_images.py ref.jpg render.png compare.png --height 1200 --fit contain
132
- uv run agent-skill-library/forgecad-image-replicator/scripts/compare_images.py ref.png render.png compare.png --fit cover --labels "Target,Current"
133
- uv run agent-skill-library/forgecad-image-replicator/scripts/compare_images.py ref.png render.png compare.png --no-labels
134
- ```
135
-
136
- Use `--fit contain` by default. Use `--fit cover` only when both images already share the same crop and aspect.
137
-
138
- ## Acceptance Standard
139
-
140
- A successful result:
141
-
142
- - has a written Real Object Brief
143
- - has parametric ForgeCAD geometry, not a billboard, facade, pasted texture, or one-view shell
144
- - makes sense from canonical views before reference matching
145
- - matches each usable reference image as closely as the evidence allows
146
- - includes honest hidden-side assumptions where the images are silent
147
- - includes internal, interface, purchased, or hardware geometry when the artifact calls for it
148
- - passes `forgecad run`
149
- - includes final reference comparison boards and canonical renders
150
- - includes inspection results for the risk evidence that matters
151
-
152
- A result fails if it only works from the original camera.
153
-
154
- ## Output Contract
44
+ Use `--fit contain` (default); use `--fit cover` only when both images already share the same crop and aspect. Run with `--help` for other options.
155
45
 
156
- When finished, report:
46
+ ## Done and Report
157
47
 
158
- - model file path
159
- - reference images used
160
- - Real Object Brief summary
161
- - hidden-side and scale assumptions
162
- - final camera spec for each reference image
163
- - comparison board path for each usable reference image
164
- - canonical render paths
165
- - inspection bundle path, when used
166
- - validation commands run
167
- - remaining mismatches, unknowns, or downgraded confidence
48
+ 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.
168
49
 
169
- For non-trivial references, expect several render, compare, canonical-view, and inspect iterations. One render is not enough.
50
+ 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.
@@ -6,125 +6,29 @@ forgecad-public: true
6
6
 
7
7
  # Low-Level Design (LLD)
8
8
 
9
- Create detailed, authoritative design documents for ForgeCAD models. This is the construction document — exact dimensions, constraints, parameters, and verification criteria.
9
+ ## When and prerequisites
10
10
 
11
- ## Prerequisites
11
+ - An HLD (`/forgecad-high-level-spec`) with a filled Decisions table must exist. The LLD implements those decisions — it never revisits them.
12
+ - Simple parts (single body, no alternatives to explore) skip the HLD and go straight to the LLD.
13
+ - Output: `<name>-lld.md` next to the model files. Complex assemblies split into a numbered directory: overview, global constraints, per-component files, assembly, verification.
12
14
 
13
- 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*.
15
+ ## What an LLD is
14
16
 
15
- For simple parts (single body, no alternatives to explore), skip the HLD and write the LLD directly.
17
+ - **Narrative first** reads like describing the object over the phone: shape, behavior, purpose, proportions, feel.
18
+ - **Authoritative** — the single source of truth that code implements.
19
+ - **Implementation-blind** — the LLD knows nothing about ForgeCAD's capabilities; never let API convenience shape the design.
20
+ - **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`).
16
21
 
17
- ## Philosophy
22
+ ## Required structure
18
23
 
19
- 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.
24
+ 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.
25
+ 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.
26
+ 3. **Verification** — mandatory checklist: dimensional checks, functional checks, printability checks.
20
27
 
21
- **Key principles:**
22
- - **Story-first**: Lead with the "what it is" narrative before technical details
23
- - **Sensory richness**: Describe appearance, proportions, materials, feel
24
- - **Behavioral clarity**: How it functions, moves, interacts
25
- - **Technical precision**: Exact constraints, dimensions, and relationships
26
- - **No implementation assumptions**: The LLD knows nothing about ForgeCAD's capabilities
28
+ Don'ts: never open with a parameter list (story before numbers), never leave a constraint implicit, never skip verification.
27
29
 
28
- ## Output Location
30
+ ## Process
29
31
 
30
- LLDs go next to the model files. Name: `<name>-lld.md`. For complex assemblies, use a directory:
32
+ Iterate via git exactly as in `/forgecad-high-level-spec`: commit every version; the diff, not the conversation, is the review artifact.
31
33
 
32
- ```
33
- <project>-lld/
34
- ├── 00-overview.md
35
- ├── 01-global-constraints.md
36
- ├── 02-components/
37
- │ ├── base.md
38
- │ └── bracket.md
39
- ├── 03-assembly.md
40
- └── 04-verification.md
41
- ```
42
-
43
- ## Document Template
44
-
45
- ### 1. Narrative Section
46
-
47
- Lead with vivid description — what it is, purpose, visual character, how it behaves.
48
-
49
- ### 2. Technical Section
50
-
51
- Parameters table, derived dimensions, geometry description, constraints with rationale.
52
-
53
- ### 3. Verification
54
-
55
- Dimensional checks, functional checks, printability checks — as a checklist.
56
-
57
- (See examples in the sections below.)
58
-
59
- ## Workflow
60
-
61
- ### Phase 1: Verify HLD decisions are locked
62
-
63
- If an HLD exists, check that its Decisions table is filled. The LLD implements the decisions — it doesn't revisit them.
64
-
65
- ### Phase 2: Write the document
66
-
67
- 1. Capture the narrative (what it is, how it works)
68
- 2. Extract parameters and constraints
69
- 3. Define verification criteria
70
-
71
- ### Phase 3: Commit and present for review
72
-
73
- Commit the LLD to git. Tell the user it's ready for review.
74
-
75
- ### Phase 4: Iterate via git
76
-
77
- Same as HLD: user reviews the file (edits or verbal feedback), agent reads the diff, updates, commits, repeats.
78
-
79
- ```
80
- Agent writes LLD → git commit → User reviews
81
- → Agent reads diff → updates LLD → git commit → repeat until approved
82
- ```
83
-
84
- ### Phase 5: Review for completeness
85
-
86
- - Can someone build from this alone?
87
- - Does it implement every HLD decision?
88
- - Are all constraints explicit with rationale?
89
-
90
- ## Git Workflow
91
-
92
- LLDs iterate through git, not conversation. The document is the single source of truth.
93
-
94
- - **Every version gets committed.** No unsaved drafts in conversation.
95
- - **User feedback goes in the file** (inline comments, strikethroughs) or in chat — agent checks both.
96
- - **The diff is the review artifact.**
97
-
98
- ## Writing Guidelines
99
-
100
- **Do:**
101
- - Use concrete comparisons ("about the size of a deck of cards")
102
- - Show the math: `wallThickness = 2.4mm`
103
- - Provide rationale for every constraint
104
- - Start with the story, then the numbers
105
-
106
- **Don't:**
107
- - Start with a parameter list
108
- - Leave constraints implicit
109
- - Skip verification criteria
110
- - Use vague terms without grounding
111
-
112
- ## Parameter Types
113
-
114
- - `length` — mm default
115
- - `angle` — degrees default
116
- - `count` — integer
117
- - `boolean` — true/false
118
- - `choice` — enumerated options
119
- - `ratio` — dimensionless
120
- - `clearance` — fit tolerances, mm default
121
-
122
- Always specify units. Always provide rationale for defaults and ranges.
123
-
124
- ## Relationship to Other Skills
125
-
126
- | Stage | Skill | Output |
127
- |-------|-------|--------|
128
- | 1. Explore the problem space | `/forgecad-high-level-spec` | `*-hld.md` |
129
- | 2. Detailed design | `/forgecad-lld` (this skill) | `*-lld.md` |
130
- | 3. Implementation | `/forgecad-make-a-model` + `/forgecad` | `.forge.js` files |
34
+ Completeness gate before presenting: Can someone build from this alone? Does it implement every HLD decision? Is every constraint explicit with rationale?