Skill Tracer
Skills › Scientific Agent Skills › lab-hardware-cad › validation.md

validation.md

132 lines · skills/lab-hardware-cad/references/validation.md at 5f2bc03

Open on GitHub

Most marks come from matching words in the file, so treat them as pointers.

1# Pre-fabrication validation checklist
2
3Work through this before telling a user a part is ready to fabricate. Each item names the failure
4it catches, because a checklist without consequences gets skipped.
5

Pre-fabrication validation checklist

Work through this before telling a user a part is ready to fabricate. Each item names the failure it catches, because a checklist without consequences gets skipped.

Raw lines 1 to 5
6## 1. Provenance
7
8- [ ] The STEP was produced by `gen.py` from the current model source.
9 *Catches: a stale artifact that no longer matches the code you just edited.*
10- [ ] A `*.manifest.json` exists alongside it, and its `source.sha256` matches the model file.
11 *Catches: silently editing an exported STEP, which makes the design unreproducible.*
12- [ ] The manifest's `interfaces` block lists every dimension a bundled standard covers, and its
13 values are the ones the model computed after any `--param` override. Empty is correct only
14 when nothing on the part mates with a bundled standard — and then every interface dimension
15 is named as unchecked in the report instead.
16 *Catches: a static `INTERFACES` list frozen at import, recording pre-override numbers; and
17 an interface that silently escaped checking.*
18- [ ] Every parameter in the model is named with units.
19 *Catches: the bare `12.7` nobody can later identify as half an inch.*
21```bash
22python scripts/gen.py part_model.py --outdir out/
23```

1. Provenance

  • [ ] The STEP was produced by gen.py from the current model source. Catches: a stale artifact that no longer matches the code you just edited.
  • [ ] A *.manifest.json exists alongside it, and its source.sha256 matches the model file. Catches: silently editing an exported STEP, which makes the design unreproducible.
  • [ ] The manifest's interfaces block lists every dimension a bundled standard covers, and its values are the ones the model computed after any --param override. Empty is correct only when nothing on the part mates with a bundled standard — and then every interface dimension is named as unchecked in the report instead. *Catches: a static INTERFACES list frozen at import, recording pre-override numbers; and an interface that silently escaped checking.*
  • [ ] Every parameter in the model is named with units. *Catches: the bare 12.7 nobody can later identify as half an inch.*
python scripts/gen.py part_model.py --outdir out/
Raw lines 6 to 24
Runs code python scripts/gen.py :22
25## 2. Geometry is sound
27- [ ] `is_valid` is true.
28 *Catches: self-intersecting or non-manifold solids that slicers and CAM silently mangle.*
29- [ ] `solid_count` is what you expect — usually 1.
30 *Catches: a boolean that failed and left two disjoint lumps, or a feature floating free of
31 the body.*
32- [ ] Volume is plausible for the part's size and wall thickness.
33 *Catches: a cavity modelled solid, or a subtract that did nothing.*
34- [ ] Every geometric requirement in the request is declared in `checks()` and passes — clear
35 regions for what must pass through or fit in, material regions for what must remain,
36 bbox bounds for stated size limits.
37 *Catches: a recess that swallowed its screw seat, a pocket the mating part cannot enter,
38 a beam corridor with a wall in it, a feature a fillet silently ate — all invisible to
39 `is_valid` and the bounding box.*
41```bash
42python scripts/check.py facts out/part.step
43python scripts/check.py geometry out/part.step --model part_model.py
44```

2. Geometry is sound

  • [ ] is_valid is true. Catches: self-intersecting or non-manifold solids that slicers and CAM silently mangle.
  • [ ] solid_count is what you expect — usually 1. Catches: a boolean that failed and left two disjoint lumps, or a feature floating free of the body.
  • [ ] Volume is plausible for the part's size and wall thickness. Catches: a cavity modelled solid, or a subtract that did nothing.
  • [ ] Every geometric requirement in the request is declared in checks() and passes — clear regions for what must pass through or fit in, material regions for what must remain, bbox bounds for stated size limits. *Catches: a recess that swallowed its screw seat, a pocket the mating part cannot enter, a beam corridor with a wall in it, a feature a fillet silently ate — all invisible to is_valid and the bounding box.*
python scripts/check.py facts out/part.step
python scripts/check.py geometry out/part.step --model part_model.py
Raw lines 25 to 45
Runs code python scripts/check.py :42
46## 3. Interfaces
48- [ ] Every interface dimension has a written source: a standard ID, a vendor drawing, or a user
49 measurement. **None came from memory.**
50 *Catches: the single most expensive failure mode in this skill.*
51- [ ] Every interface covered by a standard is declared in the model's `interfaces()` and passes
52 `check.py interfaces`.
53 *Catches: an interface nobody checked because the outer bounding box could not see it.*
54- [ ] Features that receive a standardised component use `intent: "envelope"`.
55 *Catches: a pocket sized to nominal, which does not guarantee clearance for conforming parts.*
56- [ ] Any standard entry marked `verified: false` was confirmed against the primary document, or
57 the user was told it is unconfirmed.
58 *Catches: propagating a derived number as if it were read from the standard.*
59- [ ] Metric vs imperial is confirmed where both exist, and no expression mixes them.
60 *Catches: the 25.0 vs 25.4 mm grid error, which accumulates to 1.6 mm over four pitches (five hole centres).*
61- [ ] Interfaces not covered by any bundled standard — a vendor drawing, a measurement — were
62 reported to the user as unchecked, with the number and its source.
63 *Catches: a silent gap where the automatic check simply had nothing to say.*
65```bash
66python scripts/check.py interfaces out/part.manifest.json
68# one dimension by hand, when it is not declared in the model
69python scripts/check.py fit --standard <id> --intent envelope --clearance <mm> --value <dim>=<mm>
70```

3. Interfaces

  • [ ] Every interface dimension has a written source: a standard ID, a vendor drawing, or a user measurement. None came from memory. Catches: the single most expensive failure mode in this skill.
  • [ ] Every interface covered by a standard is declared in the model's interfaces() and passes check.py interfaces. Catches: an interface nobody checked because the outer bounding box could not see it.
  • [ ] Features that receive a standardised component use intent: "envelope". Catches: a pocket sized to nominal, which does not guarantee clearance for conforming parts.
  • [ ] Any standard entry marked verified: false was confirmed against the primary document, or the user was told it is unconfirmed. Catches: propagating a derived number as if it were read from the standard.
  • [ ] Metric vs imperial is confirmed where both exist, and no expression mixes them. Catches: the 25.0 vs 25.4 mm grid error, which accumulates to 1.6 mm over four pitches (five hole centres).
  • [ ] Interfaces not covered by any bundled standard — a vendor drawing, a measurement — were reported to the user as unchecked, with the number and its source. Catches: a silent gap where the automatic check simply had nothing to say.
python scripts/check.py interfaces out/part.manifest.json

# one dimension by hand, when it is not declared in the model
python scripts/check.py fit --standard <id> --intent envelope --clearance <mm> --value <dim>=<mm>
Raw lines 46 to 71
Runs code python scripts/check.py :66
72## 4. Fits and assembly
74- [ ] Every mating dimension has a deliberate clearance chosen for the process.
75 *Catches: nominal-to-nominal fits, which do not assemble.*
76- [ ] Multi-part assemblies were checked for interference.
77 *Catches: parts that overlap in CAD and therefore cannot exist together.*
78- [ ] Rigid multi-hole mounting patterns have at least one slot.
79 *Catches: a four-hole bolt pattern binding on accumulated tolerance.*
81```bash
82python scripts/check.py clearance out/a.step out/b.step --min 0.3
83```

4. Fits and assembly

  • [ ] Every mating dimension has a deliberate clearance chosen for the process. Catches: nominal-to-nominal fits, which do not assemble.
  • [ ] Multi-part assemblies were checked for interference. Catches: parts that overlap in CAD and therefore cannot exist together.
  • [ ] Rigid multi-hole mounting patterns have at least one slot. Catches: a four-hole bolt pattern binding on accumulated tolerance.
python scripts/check.py clearance out/a.step out/b.step --min 0.3
Raw lines 72 to 84
Runs code python scripts/check.py :82
85## 5. Manufacturability
87- [ ] Minimum wall and feature sizes are within the chosen process (`fabrication-limits.md`).
88- [ ] Print or machining orientation is stated, and load runs along layers, not across them.
89- [ ] Threads use inserts or captive nuts rather than printed threads, unless coarse.
90- [ ] Enclosed cavities have a drain path for resin, and support-free access where possible.
91- [ ] Milled internal corners have relief for the tool radius.

5. Manufacturability

  • [ ] Minimum wall and feature sizes are within the chosen process (fabrication-limits.md).
  • [ ] Print or machining orientation is stated, and load runs along layers, not across them.
  • [ ] Threads use inserts or captive nuts rather than printed threads, unless coarse.
  • [ ] Enclosed cavities have a drain path for resin, and support-free access where possible.
  • [ ] Milled internal corners have relief for the tool radius.
Raw lines 85 to 92
93## 6. Material
95- [ ] Material is compatible with the **cleaning agent**, not only the sample.
96 *Catches: acrylic crazing on 70% ethanol; PLA distorting in an autoclave.*
97- [ ] Sterilisation method is stated and the material actually survives it.
98- [ ] Anything contacting cells, tissue, or animals has a justified material, or contact is
99 designed out.
100 *Catches: assuming a printed resin part is cell-safe.*
101- [ ] Optical requirements — autofluorescence, scatter, transmission — are addressed if the part is
102 near a beam or a detector.

6. Material

  • [ ] Material is compatible with the cleaning agent, not only the sample. Catches: acrylic crazing on 70% ethanol; PLA distorting in an autoclave.
  • [ ] Sterilisation method is stated and the material actually survives it.
  • [ ] Anything contacting cells, tissue, or animals has a justified material, or contact is designed out. Catches: assuming a printed resin part is cell-safe.
  • [ ] Optical requirements — autofluorescence, scatter, transmission — are addressed if the part is near a beam or a detector.
Raw lines 93 to 103
104## 7. Visual review — mandatory
106- [ ] A snapshot was rendered **and read** after the most recent generation.
107- [ ] Confirmed in the image: features on the intended faces; mold/chip polarity where resolvable; every
108 port, bore, and boss present, inside the body, and passing through; nothing consumed by a
109 fillet; clear apertures unobstructed.
111```bash
112python scripts/snapshot.py out/part.step --out out/part.png
113```
115**This step is never waived by the numeric checks passing.** `is_valid: true` with a correct
116bounding box is fully consistent with a pocket cut on the wrong face or an inverted mold. Some errors are visible in the picture; small relief and hidden passages need
117measured gauges or sections. Never infer connectivity or fit from an outline alone.

7. Visual review — mandatory

  • [ ] A snapshot was rendered and read after the most recent generation.
  • [ ] Confirmed in the image: features on the intended faces; mold/chip polarity where resolvable; every port, bore, and boss present, inside the body, and passing through; nothing consumed by a fillet; clear apertures unobstructed.
python scripts/snapshot.py out/part.step --out out/part.png

This step is never waived by the numeric checks passing. is_valid: true with a correct bounding box is fully consistent with a pocket cut on the wrong face or an inverted mold. Some errors are visible in the picture; small relief and hidden passages need measured gauges or sections. Never infer connectivity or fit from an outline alone.

Raw lines 104 to 118
Runs code python scripts/snapshot.py :112
119## 8. Report
121Give the user, explicitly:
1231. Process and material, and why.
1242. Every interface dimension with its source and tolerance.
1253. Clearances chosen, and the fit class they came from.
1264. What the snapshot showed — described, not merely "a snapshot was generated".
1275. Every check that did not pass, and every dimension you could not verify.
1286. A recommendation to print a test coupon of the critical interface before committing to the full
129 part, whenever the design depends on a fit.
131State the unverified items plainly. A part list with one honest "this dimension needs
132confirmation" is far more useful than a confident one that is silently wrong.

8. Report

Give the user, explicitly:

  1. Process and material, and why.
  2. Every interface dimension with its source and tolerance.
  3. Clearances chosen, and the fit class they came from.
  4. What the snapshot showed — described, not merely "a snapshot was generated".
  5. Every check that did not pass, and every dimension you could not verify.
  6. A recommendation to print a test coupon of the critical interface before committing to the full part, whenever the design depends on a fit.

State the unverified items plainly. A part list with one honest "this dimension needs confirmation" is far more useful than a confident one that is silently wrong.

Raw lines 119 to 132