Files
cadSet/text-to-cad/skills/cad-router/references/designir-2.0.md
T
2026-07-27 17:24:04 +08:00

59 lines
1.9 KiB
Markdown

# DesignIR 2.0 contract
Every generated, reconstructed, or modified part owns one executable
`*.designir.json`. It records design intent rather than source faces or a copied
solid.
Required sections:
- `coordinate_system`
- `datums`
- `parameters`
- `expressions`
- `sketches`
- `constraints`
- `features`
- `patterns`
- `attachments`
- `construction_stages`
- `edit_interface`
- `validation_contract`
The compiler translates this backend-neutral representation to build123d or
SimpleCADAPI and exports STEP.
## Uploaded STEP boundary
The uploaded STEP is teacher and acceptance truth only:
1. A deterministic ingestion process extracts private geometric evidence.
2. The reconstruction agent sees evidence and promoted experience, not the
teacher STEP.
3. It authors complete DesignIR and records uncertainty or missing vocabulary.
4. The compiler rebuilds STEP in a sandbox containing no teacher STEP.
5. A separate acceptance agent compares the teacher and rebuilt STEP and runs
parameter perturbations.
Reject DesignIR or generators that:
- import or reference the teacher STEP;
- embed STEP text, B-Rep bytes, meshes, vertices, triangles, or topology refs;
- retain teacher face, edge, or surface identifiers;
- use the teacher as a base feature;
- fail to rebuild after the teacher is removed.
If the operation vocabulary is insufficient, set
`reconstruction_status` to `unsupported_feature_vocabulary` and enumerate
`missing_capabilities`. Never hide the gap with teacher geometry.
## Acceptance
Keep geometry, semantic, editability, and stability metrics separate. At
minimum report bounding-box error, volume error, center-of-mass error,
symmetric-difference volume, topology deltas, declared feature/constraint
coverage, editable parameter coverage, and perturbation rebuild success.
Only deterministic policy code may move a method from candidate to
`replay_validated` and then promoted experience after several independent cases
pass.