@rulecad/cad 0.7.42 → 0.7.44

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.
package/AGENTS.md CHANGED
@@ -107,6 +107,27 @@ variable says which rule it comes from. Follow these steps; they're what makes a
107
107
  design aid and the material values are data-sheet figures: such a part needs testing, recorded under
108
108
  `"verification"`, not just a check.
109
109
 
110
+ ## Machines
111
+ A machine is an assembly with a `task` at the top: the tool, the sheet or volume it works in, how fast and how accurately.
112
+ EXAMPLES chapter 12 builds one from start to finish.
113
+ - **Task first.** Write the `task` before any part: what the tool must reach, at what speed, to what accuracy. The checks
114
+ (`task.reach`, `task.speed`, `task.accuracy`) report margins against it, in every pose and across the sheet.
115
+ - **Reach before shape.** Find the link lengths from the far and near corners of the work, keeping away from full stretch
116
+ (the speed check finds that) and from the fold (the hole near the base). Write down why; the parts come after.
117
+ - **Bench before trusting a budget.** The error budget stacks what each joint adds. A gearbox's play and twist are
118
+ guesses until bench tests 14, 15 and 17 have measured them: give them as rules of `"kind": "estimate"`, read the
119
+ sentence that says what the figure rests on, and use `npx cad measured` to replace them. A passing budget on estimates
120
+ is a target, not a prediction. Report it that way.
121
+ - **Never set a driver's current from memory.** Give the motor item a `driver` and a `current`, and take the trimmer's
122
+ voltage from what `cad check` says for that board and its sense resistors; read the resistors on your own board first.
123
+ State why the current is what it is: the torque it needs, the driver's rating without a heat sink, the motor's heat.
124
+ - **Everything bought is an item.** Motors, drivers, bearings, switches, the supply: `bought` items and `wires` make the
125
+ shopping list (`cad list`), the wiring sheet (`cad wires`) and the firmware's settings (`cad machine`) from one assembly.
126
+ - Before moving anything: `cad plot` the drawing and watch the preview. It refuses a stroke that leaves the sheet.
127
+ - **A gait is the same idea for a body.** Give an assembly a `gait` (`legs`, `pattern`, `stride`, `lift`, `period`, `height`, `mass`): the body at the world origin, the hips at z = 0, the feet as anchors. One leg on a stand is a gait of one leg (`"pattern": { "duty": 0.6, "phase": [0] }`). Anchor a round foot at its centre, so the contact rolls with the shin and the height stays true. Report a gait's numbers as they are: quasi-static, the torque from the weight alone, no dynamics.
128
+ - **Say what the machine weighs.** A robot built from these parts is heavier than the first sizing said it was: list `cad list`'s grams and set the gait's `mass` to that, and report the torque margin at the real mass.
129
+ - Start a machine from a template rather than from an empty assembly: `npm create rulecad my-arm --machine arm --sheet a5 --accuracy 0.3`, or `--machine leg`.
130
+
110
131
  ## Talking to the person
111
132
  - Give links as one labelled line (`npx cad link <project>/<object> --md`), never a raw URL. If it says
112
133
  "(not a release)", say so. If it says the link is too long for chat, don't paste it: tell the person, and offer