2.4 KiB
2.4 KiB
Backend and artifact contract
Router input
Capture these fields when known:
- Natural-language request and normalized part family.
- Units and dimensions.
- Manufacturing intent: machining, printing, laser cutting, simulation, or concept.
- Required primary and secondary output formats.
- New model versus modification, and existing source/artifact paths.
- Part versus assembly, standard components, mating requirements, and motion relationships.
- Required parameter controls, replay, semantic tags, or FreeCAD interchange.
- Geometry and visual validation targets.
Route decision
Record:
selected_backend:build123d,simplecadapi, orcadam.- Origin project and optional executable adapter.
runner_skill: installed Skill responsible for generation.- Ranked backend scores and human-readable reasons.
- Fallback order.
- Workflow profiles such as
requirement_refinementandvisual_repair. - Focused downstream Skills.
- Any explicit override and its reason.
Task manifest
Write cad-task.json beside the task artifacts with this minimum shape:
{
"schema_version": "1.0",
"request": "Create a 120 mm connecting rod",
"route": {
"selected_backend": "build123d",
"runner_skill": "cad",
"project": "text-to-cad",
"fallback_order": ["simplecadapi", "cadam"],
"workflow_profiles": ["caddesigner_ecip"]
},
"source": {
"path": "connecting_rod.py",
"format": "python",
"backend": "build123d"
},
"artifacts": [
{"path": "connecting_rod.step", "role": "primary"},
{"path": "connecting_rod.stl", "role": "secondary"}
],
"parameters": {},
"assumptions": [],
"validation": [],
"viewer_links": []
}
Paths are relative to the task directory unless an external input must remain absolute.
Backend adapter requirements
Any future executable adapter must:
- Accept an explicit task directory and explicit source/output paths.
- Never scan or generate an entire workspace implicitly.
- Preserve a human-editable source of truth.
- Report backend name and version.
- Return nonzero on generation failure.
- Emit machine-readable artifact paths and validation facts.
- Avoid importing code from sibling Skill directories; call installed tools or self-contained runtimes.
- Keep permanent CAD artifacts under the repository
models/root when working inside this repository. - Start CAD Viewer at the task directory, not the repository-wide examples directory.