agentleFS
BaratiLabBaratiLab/mechanical-engineering-skills/skills/cadsmith-text-to-cad/references/agents.md

mechanical-engineering-skills / references

AGENTS.md16 starsChanged 16 days agoMITView on GitHub

Use null for a bbox axis that can't be stated exactly. volume_range is optional. Judge inputs: (1) the original prompt, (2) the code, (3) kernel metrics plus the check result, (4) the three-view image. Rules: - Cross-reference ALL evidence: code logic, kernel measurements, rendered views. - Count holes, bolts and mounting points visible in the renders and compare against the prompt. - Check bbox dimensions against the prompt. - Catch false convergence: metrics can look right while the shape is…

The file

We split this agents.md into the rules it gives an agent

3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use null for a bbox axis that can't be stated exactly.

    line 13
  2. Distinctive:

    Check bbox dimensions against the prompt.

    line 28
  3. Very specific:

    Look closely at joints: gaps between arms and a hub can pass both the metrics and a coarse render.

    line 30

≈ “Common” is an estimate: at least 1 in 5 of the 42,283 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
agents.md

Agent roles and prompts (condensed from the CADSmith paper)

Planner (no code)

Input: the user prompt. Output plan.json:

{"components": [{"name": "bottom flange", "shape": "disc", "dims_mm": {"d": 50, "t": 10}, "z_range": [0, 10]}],
 "target_bbox": [50, 50, 60],
 "holes": [{"diameter": 6.5, "count": 6, "pattern": "PCD 38"}, {"diameter": 14, "count": 1}],
 "n_solids": 1,
 "constraints": ["coaxial about Z", "keyway 5x2.5 on +X bore wall"],
 "notes_for_coder": "build as one revolve or 3 stacked cylinders; cut bore last"}

Use null for a bbox axis that can't be stated exactly. volume_range is optional.

Coder

Input: plan + KB1 entries retrieved with cadsmith.py kb "<keywords from plan>". Output: a CadQuery script ending with result = .... Use named dimensions at the top. Comment each feature with the plan component it implements.

Error Refiner (inner loop, ≤3)

Input: failing code + traceback + KB1 + KB2 (cadsmith.py kb "<keywords>" --errors traceback.txt). Fix only what the traceback implicates.

Validator / Judge (outer loop): use an INDEPENDENT judge

CADSmith used a stronger, separate model as the judge to avoid self-confirmation bias. Here, spawn a separate subagent with a fresh context when the harness allows it. Otherwise judge yourself strictly against this rubric and say that the judge wasn't independent.

Judge inputs: (1) the original prompt, (2) the code, (3) kernel metrics plus the check result, (4) the three-view image. Rules:

  • Cross-reference ALL evidence: code logic, kernel measurements, rendered views.
  • Count holes, bolts and mounting points visible in the renders and compare against the prompt.
  • Check bbox dimensions against the prompt.
  • Catch false convergence: metrics can look right while the shape is wrong (feature on the wrong side, missing keyway, flipped direction).
  • Look closely at joints: gaps between arms and a hub can pass both the metrics and a coarse render. Require n_solids == 1 for parts meant to be one piece.
  • Escalation: if you gave the same feedback before, recommend a fundamentally different construction approach instead.
  • Output: {"passed": bool, "feedback": "specific numeric discrepancies and the fix"}.
  • A hard kernel failure (invalid / not watertight) is a FAIL regardless of appearance.

Refiner (outer loop, ≤5)

Input: current code, judge feedback, plan, prompt, and the ledger history. Make targeted changes. From outer iteration 3 on (the ledger sets escalate: true), change the construction strategy instead of tweaking parameters.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.