forgecad 0.9.15 → 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 (166) hide show
  1. package/dist/assets/{AdminPage-CDyGUinA.js → AdminPage-DwYHz72L.js} +1 -1
  2. package/dist/assets/{BenchmarkPage-DfPMY_-d.js → BenchmarkPage-a9_f-1US.js} +1 -1
  3. package/dist/assets/{BlogPage-kF0fkdJT.js → BlogPage-DodHpvmf.js} +1 -1
  4. package/dist/assets/{DocsPage-B954L3YN.js → DocsPage-B5LePEuj.js} +8 -858
  5. package/dist/assets/{EditorApp-CuDLxKqL.css → EditorApp-BpjZgzk0.css} +148 -0
  6. package/dist/assets/EditorApp-QXsAISLR.js +16307 -0
  7. package/dist/assets/{EmbedViewer-C77B-TrF.js → EmbedViewer-DdEHGUMU.js} +2 -2
  8. package/dist/assets/{LandingPageProofDriven-Cr6fXMDj.js → LandingPageProofDriven-yhhOodbf.js} +2 -2
  9. package/dist/assets/{LegalPage-Dzklqmmg.js → LegalPage-5RbKRGYK.js} +1 -1
  10. package/dist/assets/{PricingPage-zWXkvlwl.js → PricingPage-E3Rma7aV.js} +1 -1
  11. package/dist/assets/{SettingsPage-Bz0of4KQ.js → SettingsPage-BJZcM97j.js} +1 -1
  12. package/dist/assets/{app-D3kDkggg.js → app-DSYrDg0V.js} +1846 -352
  13. package/dist/assets/cli/{render-DSY3mMQa.js → render-ZMHR9HkV.js} +161 -70
  14. package/dist/assets/{constructionHistoryWorker-gpDo-uH2.js → constructionHistoryWorker-AwMMWSxg.js} +1104 -349
  15. package/dist/assets/{evalWorker-CU0Ke6DP.js → evalWorker-DbNs7Dkp.js} +5155 -3772
  16. package/dist/assets/{inspectWorker-COyp8XXA.js → inspectWorker-CZsCFtQT.js} +1415 -439
  17. package/dist/assets/{targets-B9sGB5nB.js → jointPose-DO6mnXn_.js} +71 -3
  18. package/dist/assets/{manifold-DNkrUWpA.js → manifold-BGlQBBH9.js} +1 -1
  19. package/dist/assets/{manifold-BRI5prcH.js → manifold-BU-tJwQh.js} +1 -1
  20. package/dist/assets/{manifold-C-3h2M7p.js → manifold-fy2MV7K1.js} +2 -2
  21. package/dist/assets/{reportWorker-CdBz5bNg.js → reportWorker-DO6hcQbh.js} +8474 -4549
  22. package/dist/assets/{scalar-sampling-budget-wJF98aY9.js → scalar-sampling-budget-o90NSNmF.js} +5347 -3906
  23. package/dist/assets/{scanProxyWorker-B-9VbLIs.js → scanProxyWorker-2GtDLk-R.js} +19 -6
  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 +3 -1
  28. package/dist/docs-raw/CLI.md +65 -239
  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 +159 -520
  32. package/dist/docs-raw/generated/concepts.md +245 -3491
  33. package/dist/docs-raw/generated/core.md +277 -1251
  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 +238 -112
  37. package/dist/docs-raw/generated/output.md +51 -76
  38. package/dist/docs-raw/generated/runtime-names.md +30 -22
  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/skills/forgecad-3d-reconstruction.md +25 -111
  50. package/dist/docs-raw/skills/forgecad-blockout-model.md +20 -117
  51. package/dist/docs-raw/skills/forgecad-component-model.md +23 -107
  52. package/dist/docs-raw/skills/forgecad-high-level-spec.md +47 -155
  53. package/dist/docs-raw/skills/forgecad-image-replicator.md +26 -143
  54. package/dist/docs-raw/skills/forgecad-lld.md +19 -113
  55. package/dist/docs-raw/skills/forgecad-make-a-model.md +113 -532
  56. package/dist/docs-raw/skills/forgecad-model-grader.md +38 -108
  57. package/dist/docs-raw/skills/forgecad-prepare-prompt.md +24 -211
  58. package/dist/docs-raw/skills/forgecad-project.md +13 -129
  59. package/dist/docs-raw/skills/forgecad-reconstruction-benchmark.md +42 -134
  60. package/dist/docs-raw/skills/forgecad-render-inspect.md +27 -174
  61. package/dist/docs-raw/skills/forgecad-visual-spec.md +32 -112
  62. package/dist/docs-raw/skills/forgecad.md +19 -18
  63. package/dist/docs-raw/skills/index.md +2 -0
  64. package/dist/docs-raw/welcome.md +4 -2
  65. package/dist/index.html +1 -1
  66. package/dist/llms.txt +1 -2
  67. package/dist/sitemap.xml +13 -13
  68. package/dist-cli/{check-compiler-SDX5QIXI.js → check-compiler-JTVBITCR.js} +1 -1
  69. package/dist-cli/{check-query-propagation-EAYEFT77.js → check-query-propagation-3FFLSMVN.js} +1 -1
  70. package/dist-cli/{chunk-N4O47JLF.js → chunk-OAN5T4XD.js} +5722 -4287
  71. package/dist-cli/forgecad.js +2195 -656
  72. package/dist-skill/CONTEXT.md +1778 -7912
  73. package/dist-skill/SKILL.md +15 -15
  74. package/dist-skill/docs/API/core/concepts.md +27 -157
  75. package/dist-skill/docs/CLI.md +65 -239
  76. package/dist-skill/docs/generated/assembly.md +160 -493
  77. package/dist-skill/docs/generated/core.md +277 -1251
  78. package/dist-skill/docs/generated/curves.md +387 -1609
  79. package/dist-skill/docs/generated/lib.md +238 -112
  80. package/dist-skill/docs/generated/output.md +51 -76
  81. package/dist-skill/docs/generated/runtime-names.md +16 -22
  82. package/dist-skill/docs/generated/sdf.md +68 -284
  83. package/dist-skill/docs/generated/sheet-metal.md +68 -335
  84. package/dist-skill/docs/generated/sketch.md +240 -1160
  85. package/dist-skill/docs/generated/viewport.md +75 -223
  86. package/dist-skill/docs/generated/wood.md +21 -49
  87. package/dist-skill/docs/guides/coordinate-system.md +4 -42
  88. package/dist-skill/docs/guides/inspection-bundles.md +44 -442
  89. package/dist-skill/docs/guides/joint-design.md +18 -79
  90. package/dist-skill/docs/guides/positioning.md +21 -143
  91. package/dist-skill/docs/guides/scene-presentation.md +89 -0
  92. package/dist-skill/docs/guides/surface-members.md +26 -0
  93. package/dist-skill/library/forgecad-3d-reconstruction/SKILL.md +23 -111
  94. package/dist-skill/library/forgecad-blockout-model/SKILL.md +18 -117
  95. package/dist-skill/library/forgecad-component-model/SKILL.md +21 -107
  96. package/dist-skill/library/forgecad-high-level-spec/SKILL.md +45 -155
  97. package/dist-skill/library/forgecad-image-replicator/SKILL.md +24 -143
  98. package/dist-skill/library/forgecad-lld/SKILL.md +17 -113
  99. package/dist-skill/library/forgecad-make-a-model/SKILL.md +111 -532
  100. package/dist-skill/library/forgecad-model-grader/SKILL.md +36 -108
  101. package/dist-skill/library/forgecad-prepare-prompt/SKILL.md +35 -224
  102. package/dist-skill/library/forgecad-prepare-prompt/references/default-profiles.md +43 -271
  103. package/dist-skill/library/forgecad-prepare-prompt/references/master-prompt.md +30 -99
  104. package/dist-skill/library/forgecad-project/SKILL.md +13 -131
  105. package/dist-skill/library/forgecad-reconstruction-benchmark/SKILL.md +29 -123
  106. package/dist-skill/library/forgecad-render-inspect/SKILL.md +25 -174
  107. package/dist-skill/library/forgecad-visual-spec/SKILL.md +30 -111
  108. package/dist-skill/website/skills/forgecad-3d-reconstruction.md +58 -0
  109. package/dist-skill/website/skills/forgecad-blockout-model.md +49 -0
  110. package/dist-skill/website/skills/forgecad-component-model.md +53 -0
  111. package/dist-skill/website/skills/forgecad-high-level-spec.md +101 -0
  112. package/dist-skill/website/skills/forgecad-image-replicator.md +63 -0
  113. package/dist-skill/website/skills/forgecad-lld.md +41 -0
  114. package/dist-skill/website/skills/forgecad-make-a-model.md +186 -0
  115. package/dist-skill/website/skills/forgecad-model-grader.md +82 -0
  116. package/dist-skill/website/skills/forgecad-prepare-prompt.md +63 -0
  117. package/dist-skill/website/skills/forgecad-project.md +26 -0
  118. package/dist-skill/website/skills/forgecad-reconstruction-benchmark.md +60 -0
  119. package/dist-skill/website/skills/forgecad-render-inspect.md +80 -0
  120. package/dist-skill/website/skills/forgecad-visual-spec.md +71 -0
  121. package/dist-skill/website/skills/forgecad.md +122 -0
  122. package/dist-skill/website/skills/index.md +26 -0
  123. package/examples/api/comparison-imported-sphere-candidate.forge.js +1 -1
  124. package/examples/api/conformal-product-ribbon.forge.js +1 -1
  125. package/examples/api/exact-sheet-shell-assembly.forge.js +1 -1
  126. package/examples/api/extrude-options.forge.js +4 -2
  127. package/examples/api/field-loft-drive-tip.forge.js +40 -0
  128. package/examples/api/guided-loft-olive-oil-bottle.forge.js +1 -1
  129. package/examples/api/helix-basics.forge.js +2 -2
  130. package/examples/api/highlight-debug.forge.js +10 -10
  131. package/examples/api/mesh-import-slats.forge.js +1 -1
  132. package/examples/api/real-product-curves.forge.js +1 -1
  133. package/examples/api/route3d-elbow.forge.js +3 -0
  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 +4 -2
  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/package.json +4 -1
  145. package/dist/assets/EditorApp-Beb-IZ0y.js +0 -14014
  146. package/dist/docs-raw/guides/geometry-conventions.md +0 -52
  147. package/dist/docs-raw/guides/modeling-recipes.md +0 -78
  148. package/dist-skill/docs/guides/geometry-conventions.md +0 -52
  149. package/dist-skill/docs/guides/modeling-recipes.md +0 -78
  150. package/dist-skill/library/forgecad-visual-spec/references/prompt-template.md +0 -79
  151. package/examples/api/bolted-service-cover.forge.js +0 -17
  152. package/examples/api/cable-gland-anchor.forge.js +0 -14
  153. package/examples/api/captured-cartridge-guide.forge.js +0 -14
  154. package/examples/api/captured-linear-slide.forge.js +0 -13
  155. package/examples/api/clevis-pin-joint.forge.js +0 -13
  156. package/examples/api/datum-enclosure.forge.js +0 -16
  157. package/examples/api/hose-barb-port.forge.js +0 -14
  158. package/examples/api/knuckled-hinge-assembly.forge.js +0 -15
  159. package/examples/api/living-hinge-cover.forge.js +0 -14
  160. package/examples/api/pcb-terminal-block.forge.js +0 -22
  161. package/examples/api/pinned-lever-pivot-stack.forge.js +0 -14
  162. package/examples/api/retained-shaft-knob-stack.forge.js +0 -15
  163. package/examples/api/routed-tube-clip.forge.js +0 -15
  164. package/examples/api/seated-bearing-stack.forge.js +0 -30
  165. package/examples/api/snap-latch-cover.forge.js +0 -14
  166. package/examples/api/thumb-screw-clamp.forge.js +0 -15
@@ -4,134 +4,16 @@ description: ForgeCAD project CLI workflow — creating, managing, syncing proje
4
4
  forgecad-public: true
5
5
  ---
6
6
 
7
- # ForgeCAD Project CLI Workflow
8
-
9
- ## Overview
10
-
11
- **forgecad.io** is the primary platform for ForgeCAD projects. The CLI is the main way AI agents interact with it creating projects, managing files, publishing models, and collaborating. `forgecad studio <project-path> [project-path ...]` opens the installed local editor for users; `forgecad dev <project-path> [project-path ...]` is mainly for ForgeCAD source development.
12
-
13
- ## Authentication
14
-
15
- ```sh
16
- forgecad login # Choose email/password or API token
17
- forgecad login --server http://localhost:5174 # Local dev server
18
- forgecad logout
19
- forgecad whoami # Show user, server, license
20
- ```
21
-
22
- ## Project Lifecycle
23
-
24
- ### Create a project
25
-
26
- ```sh
27
- cd path/to/my-models
28
- forgecad project init "My Project Name"
29
- forgecad project init "My Project" --slug my-project --visibility public
30
- ```
31
-
32
- Creates the project on the server, writes `forgecad.json` locally, and pushes any existing local files.
33
-
34
- ### Clone an existing project
35
-
36
- ```sh
37
- forgecad project clone <slug>
38
- ```
39
-
40
- Downloads into a new local directory.
41
-
42
- ### Sync (push/pull)
43
-
44
- ```sh
45
- forgecad project push [--force] # Upload local changes
46
- forgecad project pull [--force] # Download remote changes
47
- forgecad project status # Show local vs remote diff
48
- ```
49
-
50
- Sync is content-hash-based (SHA-256) — no timestamps, no git. `--force` skips confirmation.
51
-
52
- ### Inspect and modify
53
-
54
- ```sh
55
- forgecad project list # List all your projects
56
- forgecad project info # Name, visibility, files, URL
57
- forgecad project rename "New Name" # Rename
58
- forgecad project set-visibility public # private | shared | public
59
- forgecad project delete [--force] # Permanently delete
60
- forgecad project open # Open in browser
61
- ```
62
-
63
- ## Remote File Management
64
-
65
- Prefer `forgecad project status`, `forgecad project pull`, and `forgecad project push` for normal local sync. Use direct remote file commands only when you need a single hosted file operation without a full push/pull cycle:
66
-
67
- ```sh
68
- forgecad project file list [path] # List remote files
69
- forgecad project file read <path> # Print contents to stdout
70
- forgecad project file save <path> # Upload local file (same relative path)
71
- forgecad project file save <path> --content "const x = box(10, 10, 10); return x;"
72
- cat model.forge.js | forgecad project file save model.forge.js --stdin
73
- forgecad project file delete <path> [--force] # Delete remote file
74
- forgecad project file rename <old> <new> # Rename/move
75
- forgecad project file mkdir <path> # Create directory
76
- forgecad project file copy <source-slug> <path> [--dest <dest-path>] # Copy from another project
77
- ```
78
-
79
- All file commands require being inside an initialized project (has `forgecad.json`).
80
-
81
- ## Member Management
82
-
83
- ```sh
84
- forgecad project members # List members
85
- forgecad project add-member alice@example.com # Add as editor (default)
86
- forgecad project add-member bob@example.com --role viewer
87
- forgecad project remove-member alice@example.com
88
- forgecad project set-role bob@example.com editor
89
- ```
90
-
91
- Roles: **owner** (full control), **editor** (read/write), **viewer** (read-only).
92
-
93
- ## Publishing & Sharing
94
-
95
- ```sh
96
- forgecad project publish model.forge.js --title "My Model" # Publish, get URL
97
- forgecad project publish model.forge.js --no-sync # Skip auto-push
98
- forgecad project shares list # List published models
99
- forgecad project shares delete <share-id> [--force] # Unpublish
100
- forgecad link <gist-url-or-id> # Share from Gist
101
- ```
102
-
103
- Published models are viewable at `forgecad.io/m/<shareId>`. Shares are **live references** to project files — they always show the current version, not a snapshot. Publishing requires a project context.
104
-
105
- ## AI Agent Workflow Example
106
-
107
- ```sh
108
- # 1. Authenticate
109
- forgecad login
110
-
111
- # 2. Create project
112
- mkdir my-gadget && cd my-gadget
113
- forgecad project init "My Gadget" --visibility private
114
-
115
- # 3. Create a model
116
- forgecad new housing --template part
117
-
118
- # 4. Edit and push
119
- # ... edit housing.forge.js ...
120
- forgecad project push --force
121
-
122
- # 5. Or save directly to remote
123
- forgecad project file save housing.forge.js --content "$(cat housing.forge.js)"
124
-
125
- # 6. Validate
126
- forgecad run housing.forge.js
127
-
128
- # 7. Publish
129
- forgecad project publish housing.forge.js --title "Gadget Housing"
130
- ```
131
-
132
- ## How sync works
133
-
134
- - Scans local source files (`.forge.js`, `.js`, `.svg`), hashes each with SHA-256 (16-char prefix)
135
- - Fetches remote files from `/api/projects/:projectId/files`, hashes them the same way
136
- - Diffs: `added` (local only), `deleted` (remote only), `modified` (hash mismatch), `unchanged`
137
- - No timestamps, no git — purely content-based
7
+ # ForgeCAD Project Operating Rules
8
+
9
+ forgecad.io is the hosted ForgeCAD platform; a project is a local folder linked to the server by `forgecad.json`. The full command inventory (project, file, member, share, token commands and flags) lives in `forgecad project --help` and the forgecad skill's `docs/CLI.md` — do not relearn it here.
10
+
11
+ - **One studio process.** Run a single long-running `forgecad studio <folder> [<folder> ...]` naming every active project folder. The user opens the one printed localhost port once; create and edit files only under those folders so the browser live-updates. Never spawn extra servers per project.
12
+ - **studio vs dev.** `forgecad studio` is for users and agents; `forgecad dev` is only for developing ForgeCAD itself.
13
+ - **Login only for hosted commands.** `forgecad login` before any `project`/`publish` command; local work (run, render, studio) needs no auth.
14
+ - **init creates, push syncs.** `project init "Name"` creates the remote project, writes `forgecad.json`, and pushes existing local files. `push` only syncs an already-initialized project. `clone <slug>` is the inverse: remote → new local folder.
15
+ - **Sync is content-hash based.** `status`/`push`/`pull` compare file content hashes — no timestamps, no git; a file is "modified" purely by content difference. Loop: edit → `project status` → `project push`.
16
+ - **Sync vs single-file ops.** Use `status`/`pull`/`push` for normal sync; use `project file <read|save|delete|...>` only for one hosted-file operation without a full push/pull cycle.
17
+ - **Project context required.** All `project file *` and `publish` commands must run inside a folder containing `forgecad.json`.
18
+ - **Shares are live references.** A published model always shows the current project file, never a snapshot — pushing changes silently updates published models. `publish` prints the share URL.
19
+ - **Non-interactive runs.** Pass `--force` to skip confirmation prompts (push, pull, delete) in agent automation.
@@ -6,137 +6,43 @@ forgecad-public: true
6
6
 
7
7
  # ForgeCAD Reconstruction Benchmark
8
8
 
9
- Use this skill inside a prepared ForgeCAD reconstruction benchmark workspace.
10
- The task is to rebuild the supplied CAD reference as editable ForgeCAD source,
11
- not to wrap, embed, or copy the source asset.
9
+ 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.
12
10
 
13
- This is a benchmark adaptation of `forgecad-3d-reconstruction`: same evidence
14
- and coarse-to-fine reconstruction loop, but with a fixed output path, strict
15
- submission rules, and a short wall-clock budget.
11
+ ## Workspace
16
12
 
17
- ## Workspace Contract
13
+ Read first: `AGENTS.md`, `task/instructions.md`, this skill, and `agent-home/.agents/skills/forgecad/SKILL.md` (API + CLI reference).
18
14
 
19
- Read these first:
15
+ - Reference asset (evidence only): `task/reference/*`
16
+ - Final answer: `submission/main.forge.js`, unless `task/task.json` overrides
17
+ - CLI: the local wrapper `./bin/forgecad`, never global commands
18
+ - Scratch renders/notes: `outputs/`
19
+ - Stay inside the prepared workspace.
20
20
 
21
- - `AGENTS.md`
22
- - `task/instructions.md`
23
- - this skill
24
- - `agent-home/.agents/skills/forgecad/SKILL.md` for API guidance
21
+ ```bash
22
+ ./bin/forgecad run submission/main.forge.js
23
+ ```
25
24
 
26
- Useful companion skills:
25
+ ## Rules and Done Criteria
27
26
 
28
- - `forgecad-3d-reconstruction` for the general reconstruction workflow
29
- - `forgecad-render-inspect` for interpreting inspection bundles
30
- - `forgecad-make-a-model` only for general model quality patterns; do not use
31
- its date-based file-placement workflow in benchmark workspaces
27
+ - Deliverable is readable parametric ForgeCAD source at the required submission path. A clean parametric approximation beats an unreadable mesh mimic.
28
+ - 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.
29
+ - Sandbox: allowed local tools only no web search, no broad home-directory access, no subagents, no remote services.
30
+ - 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.
32
31
 
33
- Common files:
32
+ ## Budget Discipline
34
33
 
35
- - reference asset: `task/reference/*`
36
- - final answer: `submission/main.forge.js` unless `task/task.json` says otherwise
37
- - local ForgeCAD wrapper: `./bin/forgecad`
38
- - scratch outputs: `outputs/`
34
+ A runnable first candidate beats a perfect investigation with no model.
39
35
 
40
- Stay inside the prepared workspace. Use the local wrappers instead of global
41
- ForgeCAD commands.
36
+ 1. Run the starter submission once before editing so syntax/runtime problems surface early.
37
+ 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.
38
+ 3. Write a short reconstruction brief in `outputs/brief.md` (fields per `forgecad-3d-reconstruction`).
39
+ 4. Edit the submission early: coarse bbox, orientation, and main masses first, then iterate coarse-to-fine per `forgecad-3d-reconstruction`.
40
+ 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).
41
+ 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`.
42
42
 
43
- ## Non-Negotiables
43
+ ## Pointers
44
44
 
45
- - Final deliverable is readable parametric ForgeCAD source at the required
46
- submission path.
47
- - The reference asset is evidence only. The final source must not call
48
- `importMesh`, `importStep`, `readFile`, `readFileSync`, or equivalent asset
49
- embedding tricks.
50
- - Do not leave `compareWith(...)`, external reference paths, base64 payloads, or
51
- debug probes in the final submission.
52
- - Do not spend the whole budget inspecting. A runnable first candidate is more
53
- valuable than a perfect investigation with no model.
54
- - Use only allowed local tools. Do not rely on web search, broad home-directory
55
- access, subagents, or remote services.
56
-
57
- ## Budget-Aware Workflow
58
-
59
- 1. Orient quickly.
60
- Read `task/instructions.md`, locate the reference file, and inspect the
61
- starter submission. Run the starter once so syntax or runtime problems are
62
- obvious before you edit.
63
-
64
- ```bash
65
- ./bin/forgecad run submission/main.forge.js
66
- ```
67
-
68
- 2. Inspect only the highest-value evidence.
69
- Get dimensions, volume, object count, and at least one visual or sectional
70
- clue when the renderer is available. If a reference command fails or stalls,
71
- continue from task instructions, filename, starter code, and mechanical
72
- inference.
73
-
74
- ```bash
75
- ./bin/forgecad ls task/reference/<asset> --quality live --long
76
- ./bin/forgecad render 3d task/reference/<asset> outputs/reference.png --camera iso --edges thin --size 900
77
- ./bin/forgecad inspect sections sample task/reference/<asset> outputs/reference-sections --count 5 --size 700
78
- ./bin/forgecad inspect section task/reference/<asset> --plane yz --offset 0 --ray width:-50,0:50,0 --size 700
79
- ```
80
-
81
- For 3MF references, the `forgecad run` output includes a source structure
82
- table with stable `3mf:build:...:object:...` refs, automatic item names,
83
- per-item bounding boxes, and triangle counts. Treat that table as part of
84
- the evidence: the final model may be one part or many parts, but you should
85
- account for every substantial 3MF item in the reconstruction brief.
86
-
87
- Use `inspect section` when you need an exact local measurement. It writes a
88
- unique probe directory with `result.json`; later you can replay that probe
89
- against the candidate with `./bin/forgecad inspect replay <result.json>
90
- --source submission/main.forge.js`.
91
- For 3MF references, the `forgecad run` output includes a source structure
92
- table with stable `3mf:build:...:object:...` refs, automatic item names,
93
- per-item bounding boxes, and triangle counts. Treat that table as part of
94
- the evidence: the final model may be one part or many parts, but you should
95
- account for every substantial 3MF item in the reconstruction brief.
96
-
97
- 3. Write a short Reconstruction Brief in your notes or `outputs/brief.md`.
98
- Capture identity, bbox, major primitive families, symmetry, holes/cutouts,
99
- likely manufacturing intent, and the first modeling plan. Keep it short.
100
-
101
- 4. Edit the submission early.
102
- Build a coarse candidate that matches bbox, orientation, and main masses
103
- before adding details. Prefer simple analytic primitives, sketches, booleans,
104
- revolves, patterns, and blueprint-first dimensions over vertex chasing.
105
-
106
- 5. Self-check and iterate.
107
- Use command success, rendered views, details, and section slices as the main
108
- feedback. Improve in this order: bbox and origin, main silhouette, large
109
- holes/cutouts, ribs/bosses, edge treatments, then small details.
110
-
111
- ```bash
112
- ./bin/forgecad run submission/main.forge.js
113
- ./bin/forgecad render 3d submission/main.forge.js outputs/submission.png --camera iso --edges thin --size 900
114
- ./bin/forgecad render section submission/main.forge.js outputs/submission-section.svg --plane XZ --offset 0
115
- ```
116
-
117
- For closer comparison, render corresponding reference and candidate views or
118
- slices into `outputs/` and inspect the images/files side by side:
119
-
120
- ```bash
121
- ./bin/forgecad render 3d task/reference/<asset> outputs/reference.png --camera iso --edges thin --size 900
122
- ./bin/forgecad inspect sections sample task/reference/<asset> outputs/reference-sections --count 5 --size 700
123
- ```
124
-
125
- 6. Final cleanup.
126
- Re-run the candidate and inspect the most useful final views or sections.
127
- Remove temporary imports, `compareWith`, debug-only geometry, scratch paths,
128
- and comments that describe abandoned attempts. Leave the best source at the
129
- required submission path.
130
-
131
- Optimize real geometry and design intent. A clean parametric approximation that
132
- captures the object is preferable to an unreadable mesh mimic.
133
-
134
- ## Done Criteria
135
-
136
- Before exit:
137
-
138
- - `./bin/forgecad run submission/main.forge.js` succeeds.
139
- - Final render or section evidence has been checked after the final meaningful
140
- edit.
141
- - The required submission file contains no banned import/read/embed path.
142
- - The model is recognizable against the reference from the main views.
45
+ - `forgecad-3d-reconstruction` the evidence brief coarse fine loop and metric diagnosis
46
+ - `forgecad-render-inspect` — inspection bundles, section probes, replay
47
+ - forgecad skill at `agent-home/.agents/skills/forgecad/` API and CLI syntax
48
+ - `forgecad-make-a-model` general quality patterns only; its date-based file-placement workflow does not apply in benchmark workspaces
@@ -6,82 +6,25 @@ forgecad-public: true
6
6
 
7
7
  # ForgeCAD Render Inspect
8
8
 
9
- 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`.
9
+ Use `forgecad inspect ...` when a shaded render is too ambiguous and you need structured evidence: a bundle directory with evidence PNGs plus a root `manifest.json` (or, for `inspect section`, a probe directory with `result.json`, `section.svg`, `section.png`). Inspection is not a substitute artifact: look inside with sections, masks, `--focus`/`--hide`, and transparency — never edit the model into a cutaway or exploded default to make inspecting easier. Output dirs: let `inspect` allocate its timestamped directory by default (repeated probes never collide); use `/tmp/<model>-inspect` for throwaway bundles, a project directory only for persistent artifacts.
10
10
 
11
- 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.
12
-
13
- 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.
14
-
15
- ## Trigger Boundary
16
-
17
- Use this skill for:
18
-
19
- - inspecting an existing `.forge.js` model
20
- - analyzing a previously generated inspection bundle
21
- - validating collisions, wall thickness, section cuts, connectivity, floating bodies, distance, object masks, depth, normals, or Zebra stripes
22
- - deciding which inspection evidence to run
23
- - producing evidence before calling a model complete
24
-
25
- Routing:
26
-
27
- | Need | Skill |
28
- |------|-------|
29
- | Learn or use ForgeCAD APIs while authoring geometry | `forgecad` |
30
- | Create a new model in the personal model repo | `forgecad-make-a-model` |
31
- | Run and interpret inspection bundles | `forgecad-render-inspect` |
32
- | Debug the inspection command implementation itself | `forgecad` plus this skill's source map |
11
+ Routing: authoring/API questions `forgecad` skill; creating a new model `forgecad-make-a-model`.
33
12
 
34
13
  ## Workflow
35
14
 
36
- 1. Identify the inspection question.
37
- 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.
38
-
39
- 2. Choose output persistence.
40
- 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.
41
-
42
- 3. Pick the evidence.
43
- Prefer one targeted evidence command at a time. Use `forgecad inspect evidence`
44
- to list the available commands.
45
-
46
- 4. Run the command.
47
- In the ForgeCAD repo, prefer the built CLI when you want the current checkout:
48
-
49
- ```bash
50
- node dist-cli/forgecad.js inspect fit interference model.forge.js --camera iso --size 700
51
- ```
52
-
53
- Outside the ForgeCAD repo, use the installed CLI:
54
-
55
- ```bash
56
- forgecad inspect fit interference model.forge.js --camera iso --size 700
57
- ```
58
-
59
- If the model may not execute, run `forgecad run model.forge.js` first. If imports are suspect, add `--debug-imports` to the run command.
60
-
61
- 5. Summarize the manifest.
62
- Run the bundled helper:
15
+ 1. **Identify the failure question.** What would make the model wrong: overlap, thin walls, hidden cavity failure, disconnected or accidentally fused bodies, floating parts, orientation artifacts, identity confusion?
16
+ 2. **Confirm the model executes.** If in doubt, run `forgecad run model.forge.js` first; add `--debug-imports` for suspect imports.
17
+ 3. **Pick ONE targeted evidence command** from the table below. `forgecad inspect evidence` lists everything available.
18
+ 4. **Summarize the manifest first**, then use `jq` against `manifest.json` for targeted follow-up. The helper ships beside this SKILL.md — invoke it skill-dir-relative; it accepts the bundle directory or a `manifest.json` path:
63
19
 
64
20
  ```bash
65
- python agent-skill-library/forgecad-render-inspect/summarize_manifest.py /tmp/model-inspect
21
+ python <this-skill-dir>/summarize_manifest.py /tmp/model-inspect
66
22
  ```
67
23
 
68
- Use `jq` for targeted follow-up when needed:
69
-
70
- ```bash
71
- jq '.evidence.collisions | {collisionCount, collisions, warnings}' /tmp/model-inspect/manifest.json
72
- jq '.evidence.thickness.objects[] | {name, minThickness, p05Thickness, criticalAreaPercent, warningAreaPercent, unresolvedAreaPercent}' /tmp/model-inspect/manifest.json
73
- jq '.evidence.connectivity | {componentCount, edges, warnings}' /tmp/model-inspect/manifest.json
74
- jq '.evidence.floating | {floatingBodyCount, floatingObjectCount, warnings}' /tmp/model-inspect/manifest.json
75
- ```
76
-
77
- 6. Inspect the PNGs, not only the JSON.
78
- 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.
79
-
80
- 7. Decide whether findings are bugs.
81
- 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.
82
-
83
- 8. Report evidence.
84
- 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`.
24
+ 5. **Inspect the PNGs, not only the JSON.** View identity/context images first, then the risk evidence's view, then orthogonal cameras (`front`, `right`, `top`) when iso hides the issue, sections only when internals matter. In automation, resolve file paths through the manifest — custom cameras break canonical filenames.
25
+ 6. **Isolate intentional overlaps** with `--focus "A,B"` or `--hide "C"` so the remaining report stays meaningful.
26
+ 7. **Treat findings as model bugs**: unexpected collisions, critical thin regions, high unresolved thickness area, wrong component counts, floating bodies, or surprising gaps mean fix the model and reinspect.
27
+ 8. **Report honestly.** Include the exact command, bundle path, manifest highlights, and the PNG views actually inspected. Never claim geometry is verified if you only ran `forgecad run`.
85
28
 
86
29
  ## Evidence Selection
87
30
 
@@ -91,9 +34,9 @@ Routing:
91
34
  | Kinematic rig, joints, axes, and links | `inspect visual rig` |
92
35
  | Object naming and identity | `inspect visual objects` |
93
36
  | Exact local section measurement, bore widths, rib thickness through a chosen line | `inspect section --ray ...` |
94
- | Hidden internals, cavities, pockets, screw paths, captured components | `inspect sections at|stack|sample` |
37
+ | Hidden internals, cavities, pockets, screw paths, captured components | `inspect sections at\|stack\|sample` |
95
38
  | Multi-part interference, fit checks, ghost parts, moving clearances | `inspect fit interference` |
96
- | Printability, shell walls, ribs, bosses, snaps, slots | `inspect manufacture thickness` plus `inspect sections at|stack|sample` when internals matter |
39
+ | Printability, shell walls, ribs, bosses, snaps, slots | `inspect manufacture thickness` plus `inspect sections at\|stack\|sample` when internals matter |
97
40
  | Parts without a mesh-contact path to the ground | `inspect physical floating` |
98
41
  | Accidental fusion, connected solids | `inspect physical components` |
99
42
  | Air gaps between physical components | `inspect physical gaps` |
@@ -101,117 +44,25 @@ Routing:
101
44
  | Loft, fillet, skin, and sweep surface continuity | `inspect surface zebra` or `inspect visual normals` |
102
45
  | Reference-vs-candidate reconstruction comparison | `inspect compare overlay --with reference.3mf` |
103
46
 
104
- ## Command Patterns
47
+ ## Section Probe + Replay
105
48
 
106
- Explicit fast bundle:
49
+ The agent-native measure-then-recheck loop:
107
50
 
108
51
  ```bash
109
- forgecad inspect visual objects model.forge.js --camera iso --size 700
110
- forgecad inspect visual rig model.forge.js --camera iso --size 700
111
- forgecad inspect sections at model.forge.js --plane yz --offset 12.5 --size 700
112
- forgecad inspect sections stack model.forge.js --plane yz --every 1 --size 700
113
- forgecad inspect sections sample model.forge.js --count 5 --size 700
114
- ```
115
-
116
- Agent-native one-off section probe:
117
-
118
- ```bash
119
- forgecad inspect section model.forge.js --plane yz --ray bore:-20,0:20,0 --size 700
52
+ forgecad inspect section model.forge.js --plane yz --ray bore:-20,0:20,0
120
53
  forgecad inspect replay outputs/inspect/<probe>/result.json --source candidate.forge.js
121
54
  ```
122
55
 
123
- Reference-vs-candidate comparison bundle:
124
-
125
- ```bash
126
- forgecad inspect compare overlay candidate.forge.js --with reference.3mf --compare-samples 3000 --size 700
127
- ```
128
-
129
- Final fit/interference check:
130
-
131
- ```bash
132
- forgecad inspect fit interference model.forge.js --camera iso --size 700
133
- ```
134
-
135
- Collision-focused isolation:
56
+ The probe's `result.json` field contract (frames, rulers, gaps, replaySpec) is documented in the forgecad skill's `docs/guides/inspection-bundles.md`.
136
57
 
137
- ```bash
138
- forgecad inspect fit interference model.forge.js --focus "Bracket,Screw Ghost" --camera iso
139
- ```
140
-
141
- Thickness check with process-aware thresholds:
142
-
143
- ```bash
144
- forgecad inspect manufacture thickness model.forge.js --min 1.6 --warn 2.4 --camera iso
145
- ```
58
+ ## Misread Traps
146
59
 
147
- Hide known clutter or mock geometry:
60
+ - Face-touching is not a collision; collision findings are positive-volume overlaps.
61
+ - Gray/unresolved thickness area means the evidence is incomplete, not that the model is safe.
62
+ - Distance/gap figures are bbox-gap metrics between components, not closest-surface distances.
63
+ - Depth, normals, and zebra are visual aids (heatmap, camera-view normals, stripe shader), not exact measurements or curvature proofs.
64
+ - Resolve mask colors through the manifest's object list, never by object order.
148
65
 
149
- ```bash
150
- forgecad inspect fit interference model.forge.js --hide "Fixture Ghost,Debug Envelope" --camera iso
151
- ```
152
-
153
- Use bare `--focus` to hide mock objects while keeping real scene objects:
154
-
155
- ```bash
156
- forgecad inspect fit interference model.forge.js --focus --camera iso
157
- ```
66
+ ## Reference
158
67
 
159
- ## Reading Results
160
-
161
- Manifest fields to check first:
162
-
163
- - `bundle.evidenceRequested` / `bundle.evidenceEmitted`: confirm you inspected what you intended.
164
- - `bundle.filters`: confirm focus/hide did not accidentally exclude relevant geometry.
165
- - `scene.bbox` and `scene.volume`: catch absurd scale, missing geometry, or bad units.
166
- - `scene.objects`: confirm expected part names and mock flags.
167
- - `evidence.objects.objects`: map object colors to names; do not rely on object order alone.
168
- - `evidence.collisions.collisionCount`: investigate every unexpected positive-volume overlap.
169
- - `evidence.thickness.objects`: inspect `minThickness`, `p05Thickness`, critical/warning percentages, and unresolved area.
170
- - `evidence.connectivity.componentCount`: compare to the expected number of physical components.
171
- - `evidence.floating.floatingBodyCount`: investigate every body without a mesh-contact path to the ground plane, especially body entries from one unioned object.
172
- - `evidence.distance.maxRootDistance` and per-object `nearestGap`: check suspicious isolation or spacing.
173
- - `evidence.sections.slicingPolicy`: confirm whether the bundle used exact, count-based, or physical-spacing slices.
174
- - `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.
175
-
176
- `inspect section` result fields to check first:
177
-
178
- - `section.frame`: use `u` and `v` to understand the section-local coordinate system for rulers.
179
- - `section.objects`: inspect per-object areas, bounds, and loop counts. Use `section.svg` for the actual section outlines.
180
- - `rulers[].insideSegments`: exact intervals where the ray is inside any sectioned object.
181
- - `rulers[].gaps`: exact intervals between solid spans along the ray, including end gaps.
182
- - `comparison.rulers`: replay deltas against the original probe when using `inspect replay`.
183
- - `replaySpec`: the recipe an agent can rerun against a candidate model.
184
-
185
- PNG review order:
186
-
187
- 1. Image evidence for human shape sanity when needed.
188
- 2. Object evidence and one orthogonal object view for identity when needed.
189
- 3. The risk evidence's chosen view.
190
- 4. Orthogonal cameras (`front`, `right`, `top`) when the iso view hides the issue.
191
- 5. Section slices around the suspected feature when internals matter.
192
-
193
- ## Interpretation Rules
194
-
195
- - Collision findings are positive-volume boolean overlaps. Face-touching is not a collision.
196
- - 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.
197
- - 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.
198
- - Distance is a bbox-gap metric between physical components, not exact closest surface distance.
199
- - 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.
200
- - Depth is a visual heatmap, not raw floating-point depth data.
201
- - Normals are camera-view normals, not world-space normals.
202
- - Zebra is a reflective stripe shader for visual continuity inspection, not an exact curvature-continuity proof.
203
- - Mask colors are stable within a bundle and resolved through the manifest.
204
-
205
- ## Source Map
206
-
207
- Read these only when needed:
208
-
209
- | Need | Source |
210
- |------|--------|
211
- | Bundle contract and evidence semantics | `docs/permanent/guides/inspection-bundles.md` |
212
- | CLI reference and options | `docs/permanent/CLI.md` |
213
- | CLI parser, bundle writer, manifest generation | `cli/forge-render.mjs` |
214
- | Browser-side evidence rendering | `cli/render.ts` |
215
- | Collision semantics | `cli/collision-inspection.ts` |
216
- | Thickness semantics | `cli/thickness-inspection.ts` |
217
- | Connectivity, floating, and distance semantics | `cli/physical-connectivity.ts`, `cli/floating-inspection.ts`, and `cli/distance-inspection.ts` |
68
+ Bundle/manifest contract, evidence semantics, and current limits: the forgecad skill's `docs/guides/inspection-bundles.md`. CLI flags and command tree: its `docs/CLI.md`.