Files
cadSet/cad-experience-plugin/skills/cad-experience-builder/references/case-input-contract.md
T

2.9 KiB

Case JSON input contract

Case JSON is private evidence used only during induction. It may contain exact parameters, but the inducer never copies those fields into published experience. Store source STEP files in cad-experience-plugin/parser/input and generated case JSON in cad-experience-plugin/parser/output.

Do not pass either folder or a case JSON to cad-router or a CAD backend. Creation, modification, and reconstruction may consume only the promoted public experience library.

Supported fields:

{
  "provenance": {"source_sha256": "..."},
  "design_ir": {
    "part_family": "flanged_hub_adapter",
    "features": [{"type": "base_flange"}, {"type": "hollow_sleeve"}],
    "constraints": [{"id": "coaxial_stack", "type": "coaxial"}],
    "reconstruction_evidence": {
      "parameter_roles": ["overall_long_span", "coaxial_diameter_roles"],
      "datum_roles": ["part_center", "primary_axis"],
      "feature_roles": ["rotational_body", "coaxial_cylindrical_stack"],
      "relation_roles": ["coaxial_stack"],
      "canonical_stages": [
        {
          "id": "establish_reference_frame",
          "operation": "define_datums",
          "feature_roles": [],
          "reference_roles": ["part_center", "primary_axis"]
        }
      ],
      "private_cardinality_evidence": {
        "feature_role_count": 5,
        "feature_role_count_class": "repeated"
      },
      "validation_roles": ["closed_solid", "coaxial_stack"]
    },
    "normalized_observations": [
      {
        "name": "sleeve_od_to_base_od",
        "value": 0.35,
        "numerator_role": "sleeve_outer_diameter",
        "denominator_role": "base_outer_diameter"
      }
    ]
  },
  "experience": {
    "rules": [
      {
        "id": "bound_counterbore_to_host",
        "scope": ["counterbore"],
        "statement": "Terminate a counterbore at its host boundary.",
        "repair": "Bind the cutter extent to the host feature."
      }
    ],
    "validation_targets": [
      {
        "id": "counterbore_host_boundary",
        "check": "A counterbore does not cross an unrelated adjacent feature."
      }
    ]
  }
}

Rules and checks containing numeric literals are rejected because they are likely instance answers. Ratios are accepted only through normalized_observations, with an explicit numerator and denominator role.

Legacy distilled JSON can be used when it contains the fields above. Exact parameters, evidence, centers, axes, and surface references are ignored.

V3 extractor output should also provide several independent semantic signals per case: body-aspect class, topology-complexity role, analytic feature networks, part family, relationship candidates, and role-named dimensionless observations. It additionally provides symbolic reconstruction roles, canonical reconstruction stages, and private exact cardinality evidence. Sanitization converts exact counts into qualitative classes before LLM review. Do not encode an absolute source dimension as a feature token.