{
  "answers": {
    "c00": {
      "noul": 0.98,
      "type": "noul"
    },
    "c01": {
      "noul": 0.99,
      "type": "noul"
    },
    "c02": {
      "noul": 0.78,
      "type": "noul"
    },
    "c03": {
      "noul": 0.99,
      "type": "noul"
    },
    "c04": {
      "noul": 0.79,
      "type": "noul"
    },
    "c05": {
      "noul": 0.81,
      "type": "noul"
    },
    "c06": {
      "noul": 0.99,
      "type": "noul"
    },
    "c07": {
      "noul": 0.77,
      "type": "noul"
    },
    "c08": {
      "noul": 0.99,
      "type": "noul"
    },
    "c09": {
      "noul": 0.76,
      "type": "noul"
    },
    "c10": {
      "noul": 0.99,
      "type": "noul"
    },
    "c11": {
      "noul": 0.77,
      "type": "noul"
    },
    "c12": {
      "noul": 0.99,
      "type": "noul"
    },
    "c13": {
      "noul": 0.77,
      "type": "noul"
    },
    "c14": {
      "noul": 0.97,
      "type": "noul"
    },
    "c15": {
      "noul": 0.98,
      "type": "noul"
    },
    "c16": {
      "noul": 0.99,
      "type": "noul"
    },
    "c17": {
      "noul": 0.07,
      "type": "noul"
    },
    "w00": {
      "noul": 0.01,
      "type": "noul"
    },
    "w01": {
      "noul": 0.01,
      "type": "noul"
    },
    "w02": {
      "noul": 0.01,
      "type": "noul"
    },
    "w03": {
      "noul": 0.01,
      "type": "noul"
    },
    "w04": {
      "noul": 0.01,
      "type": "noul"
    },
    "w05": {
      "noul": 0.01,
      "type": "noul"
    },
    "w06": {
      "noul": 0.93,
      "type": "noul"
    },
    "w07": {
      "noul": 0.85,
      "type": "noul"
    },
    "w08": {
      "noul": 0.91,
      "type": "noul"
    }
  },
  "asked_at": "2026-11-23T01:25:53Z",
  "endpoint": "https://api.typesafe.ai/v1/systemone",
  "errors_helpful": [
    {
      "call": 0,
      "noul": 0.98,
      "question": "c00"
    },
    {
      "call": 1,
      "noul": 0.99,
      "question": "c01"
    },
    {
      "call": 2,
      "noul": 0.78,
      "question": "c02"
    },
    {
      "call": 3,
      "noul": 0.99,
      "question": "c03"
    },
    {
      "call": 4,
      "noul": 0.79,
      "question": "c04"
    },
    {
      "call": 5,
      "noul": 0.81,
      "question": "c05"
    },
    {
      "call": 6,
      "noul": 0.99,
      "question": "c06"
    },
    {
      "call": 7,
      "noul": 0.77,
      "question": "c07"
    },
    {
      "call": 8,
      "noul": 0.99,
      "question": "c08"
    },
    {
      "call": 9,
      "noul": 0.76,
      "question": "c09"
    },
    {
      "call": 10,
      "noul": 0.99,
      "question": "c10"
    },
    {
      "call": 11,
      "noul": 0.77,
      "question": "c11"
    },
    {
      "call": 12,
      "noul": 0.99,
      "question": "c12"
    },
    {
      "call": 13,
      "noul": 0.77,
      "question": "c13"
    },
    {
      "call": 14,
      "noul": 0.97,
      "question": "c14"
    },
    {
      "call": 15,
      "noul": 0.98,
      "question": "c15"
    },
    {
      "call": 16,
      "noul": 0.99,
      "question": "c16"
    },
    {
      "call": 17,
      "noul": 0.07,
      "question": "c17"
    }
  ],
  "format": "didrun.judgments.v1",
  "input_tokens": 33498,
  "method": "0.15.0",
  "model": "jev-1.14.0",
  "model_asked": "jev-1.14.0",
  "request": {
    "model": "jev-1.14.0",
    "questions": {
      "c00": {
        "criteria": {
          "false": "The reply does not point to `parameter`: for example a generic failure, an error about another argument, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply points to `parameter` or to its value and says the value has the wrong type or is not accepted."
        },
        "instructions": {
          "arguments_sent": {
            "logout": "not a boolean"
          },
          "parameter": "logout",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "MCP error -32602: Input validation error: Invalid arguments for tool login: Invalid input: expected boolean, received string at logout",
          "tool": "login"
        },
        "type": "noul"
      },
      "c01": {
        "criteria": {
          "false": "The reply names no argument of the tool: for example a generic failure, a stack trace with no argument named, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply names at least one argument of the tool that the call left out or got wrong, and so tells the caller what to change."
        },
        "instructions": {
          "arguments_sent": {},
          "question": "Does `reply` name an argument that the call must add or fix?",
          "reply": "`view` works on a drawing: pass drawing: \"<id>\" with the id an earlier answer of this conversation named, or \"new\" for a new, empty one. Nothing was done.",
          "tool": "view"
        },
        "type": "noul"
      },
      "c02": {
        "criteria": {
          "false": "The reply does not point to `parameter`: for example a generic failure, an error about another argument, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply points to `parameter` or to its value and says the value has the wrong type or is not accepted."
        },
        "instructions": {
          "arguments_sent": {
            "drawing": {}
          },
          "parameter": "drawing",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "`view` works on a drawing: pass drawing: \"<id>\" with the id an earlier answer of this conversation named, or \"new\" for a new, empty one. Nothing was done.",
          "tool": "view"
        },
        "type": "noul"
      },
      "c03": {
        "criteria": {
          "false": "The reply names no argument of the tool: for example a generic failure, a stack trace with no argument named, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply names at least one argument of the tool that the call left out or got wrong, and so tells the caller what to change."
        },
        "instructions": {
          "arguments_sent": {},
          "question": "Does `reply` name an argument that the call must add or fix?",
          "reply": "`get_selection` works on a drawing: pass drawing: \"<id>\" with the id an earlier answer of this conversation named, or \"new\" for a new, empty one. Nothing was done.",
          "tool": "get_selection"
        },
        "type": "noul"
      },
      "c04": {
        "criteria": {
          "false": "The reply does not point to `parameter`: for example a generic failure, an error about another argument, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply points to `parameter` or to its value and says the value has the wrong type or is not accepted."
        },
        "instructions": {
          "arguments_sent": {
            "drawing": {}
          },
          "parameter": "drawing",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "`get_selection` works on a drawing: pass drawing: \"<id>\" with the id an earlier answer of this conversation named, or \"new\" for a new, empty one. Nothing was done.",
          "tool": "get_selection"
        },
        "type": "noul"
      },
      "c05": {
        "criteria": {
          "false": "The reply does not point to `parameter`: for example a generic failure, an error about another argument, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply points to `parameter` or to its value and says the value has the wrong type or is not accepted."
        },
        "instructions": {
          "arguments_sent": {
            "drawing": {}
          },
          "parameter": "drawing",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "`session_info` works on a drawing: pass drawing: \"<id>\" with the id an earlier answer of this conversation named, or \"new\" for a new, empty one. Nothing was done.",
          "tool": "session_info"
        },
        "type": "noul"
      },
      "c06": {
        "criteria": {
          "false": "The reply names no argument of the tool: for example a generic failure, a stack trace with no argument named, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply names at least one argument of the tool that the call left out or got wrong, and so tells the caller what to change."
        },
        "instructions": {
          "arguments_sent": {},
          "question": "Does `reply` name an argument that the call must add or fix?",
          "reply": "`clear` works on a drawing: pass drawing: \"<id>\" with the id an earlier answer of this conversation named, or \"new\" for a new, empty one. Nothing was done.",
          "tool": "clear"
        },
        "type": "noul"
      },
      "c07": {
        "criteria": {
          "false": "The reply does not point to `parameter`: for example a generic failure, an error about another argument, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply points to `parameter` or to its value and says the value has the wrong type or is not accepted."
        },
        "instructions": {
          "arguments_sent": {
            "drawing": {}
          },
          "parameter": "drawing",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "`clear` works on a drawing: pass drawing: \"<id>\" with the id an earlier answer of this conversation named, or \"new\" for a new, empty one. Nothing was done.",
          "tool": "clear"
        },
        "type": "noul"
      },
      "c08": {
        "criteria": {
          "false": "The reply names no argument of the tool: for example a generic failure, a stack trace with no argument named, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply names at least one argument of the tool that the call left out or got wrong, and so tells the caller what to change."
        },
        "instructions": {
          "arguments_sent": {},
          "question": "Does `reply` name an argument that the call must add or fix?",
          "reply": "`load` works on a drawing: pass drawing: \"<id>\" with the id an earlier answer of this conversation named, or \"new\" for a new, empty one. Nothing was done.",
          "tool": "load"
        },
        "type": "noul"
      },
      "c09": {
        "criteria": {
          "false": "The reply does not point to `parameter`: for example a generic failure, an error about another argument, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply points to `parameter` or to its value and says the value has the wrong type or is not accepted."
        },
        "instructions": {
          "arguments_sent": {
            "drawing": {},
            "format": "OFB"
          },
          "parameter": "drawing",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "`load` works on a drawing: pass drawing: \"<id>\" with the id an earlier answer of this conversation named, or \"new\" for a new, empty one. Nothing was done.",
          "tool": "load"
        },
        "type": "noul"
      },
      "c10": {
        "criteria": {
          "false": "The reply names no argument of the tool: for example a generic failure, a stack trace with no argument named, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply names at least one argument of the tool that the call left out or got wrong, and so tells the caller what to change."
        },
        "instructions": {
          "arguments_sent": {},
          "question": "Does `reply` name an argument that the call must add or fix?",
          "reply": "`restore` works on a drawing: pass drawing: \"<id>\" with the id an earlier answer of this conversation named, or \"new\" for a new, empty one. Nothing was done.",
          "tool": "restore"
        },
        "type": "noul"
      },
      "c11": {
        "criteria": {
          "false": "The reply does not point to `parameter`: for example a generic failure, an error about another argument, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply points to `parameter` or to its value and says the value has the wrong type or is not accepted."
        },
        "instructions": {
          "arguments_sent": {
            "drawing": {}
          },
          "parameter": "drawing",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "`restore` works on a drawing: pass drawing: \"<id>\" with the id an earlier answer of this conversation named, or \"new\" for a new, empty one. Nothing was done.",
          "tool": "restore"
        },
        "type": "noul"
      },
      "c12": {
        "criteria": {
          "false": "The reply names no argument of the tool: for example a generic failure, a stack trace with no argument named, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply names at least one argument of the tool that the call left out or got wrong, and so tells the caller what to change."
        },
        "instructions": {
          "arguments_sent": {},
          "question": "Does `reply` name an argument that the call must add or fix?",
          "reply": "`find` works on a drawing: pass drawing: \"<id>\" with the id an earlier answer of this conversation named, or \"new\" for a new, empty one. Nothing was done.",
          "tool": "find"
        },
        "type": "noul"
      },
      "c13": {
        "criteria": {
          "false": "The reply does not point to `parameter`: for example a generic failure, an error about another argument, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply points to `parameter` or to its value and says the value has the wrong type or is not accepted."
        },
        "instructions": {
          "arguments_sent": {
            "drawing": {}
          },
          "parameter": "drawing",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "`find` works on a drawing: pass drawing: \"<id>\" with the id an earlier answer of this conversation named, or \"new\" for a new, empty one. Nothing was done.",
          "tool": "find"
        },
        "type": "noul"
      },
      "c14": {
        "criteria": {
          "false": "The reply does not point to `parameter`: for example a generic failure, an error about another argument, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply points to `parameter` or to its value and says the value has the wrong type or is not accepted."
        },
        "instructions": {
          "arguments_sent": {
            "domain": {}
          },
          "parameter": "domain",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "MCP error -32602: Input validation error: Invalid arguments for tool list_methods: Invalid option: expected one of \"assembly\"|\"common\"|\"curve\"|\"drawing2d\"|\"part\"|\"sketch\"|\"solid\" at domain",
          "tool": "list_methods"
        },
        "type": "noul"
      },
      "c15": {
        "criteria": {
          "false": "The reply names no argument of the tool: for example a generic failure, a stack trace with no argument named, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply names at least one argument of the tool that the call left out or got wrong, and so tells the caller what to change."
        },
        "instructions": {
          "arguments_sent": {},
          "question": "Does `reply` name an argument that the call must add or fix?",
          "reply": "MCP error -32602: Input validation error: Invalid arguments for tool describe_method: Invalid input: expected string, received undefined at method",
          "tool": "describe_method"
        },
        "type": "noul"
      },
      "c16": {
        "criteria": {
          "false": "The reply does not point to `parameter`: for example a generic failure, an error about another argument, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply points to `parameter` or to its value and says the value has the wrong type or is not accepted."
        },
        "instructions": {
          "arguments_sent": {
            "method": {}
          },
          "parameter": "method",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "MCP error -32602: Input validation error: Invalid arguments for tool describe_method: Invalid input: expected string, received object at method",
          "tool": "describe_method"
        },
        "type": "noul"
      },
      "c17": {
        "criteria": {
          "false": "The reply does not say the tool is missing: for example a generic failure, a crash, or a normal answer.",
          "true": "The reply says the tool is unknown, not found, or does not exist."
        },
        "instructions": {
          "arguments_sent": {},
          "question": "Does `reply` tell the caller that there is no tool named `tool`?",
          "reply": "`didrun_unknown_tool` works on a drawing: pass drawing: \"<id>\" with the id an earlier answer of this conversation named, or \"new\" for a new, empty one. Nothing was done.",
          "tool": "didrun_unknown_tool"
        },
        "type": "noul"
      },
      "w00": {
        "criteria": {
          "false": "The tool replies show an error, a missing or different result, or nothing about the task; or only the agent's final answer claims the task was done.",
          "true": "The tool replies in `steps` show the result that `done_when` describes. The result came from the server's tools, not only from the agent's own words."
        },
        "instructions": {
          "agent_final_answer": "I couldn’t create or render the solid: the local WASM engine requires a ClassCAD sign-in, and this sandbox has no network or account access.\n\nThe requested solid would have dimensions **40 × 30 × 10 mm** and a calculated volume of **12,000 mm³**, but I couldn’t verify those properties in the CAD engine.",
          "done_when": "The tool replies show a solid with dimensions 40 × 30 × 10 mm, a volume of 12,000 mm³, and a rendered image.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {
                "drawing": "new",
                "engine": "wasm"
              },
              "reply": "error: Sign-in required: the ClassCAD MCP works with a free classcad.ch account (Google, GitHub or email; one click if they already have one).\n\nShow the user this link, as a clickable link on its own line, in case they need to open it:\n\nhttps://classcad.ch/connect?port=40765&state=nOXysVXmozKPV_NRwRwoxjL09alUS6kp&exp=1795397160840&client=didrun-lab\n\nThen call the `login` tool: it waits and returns as soon as the sign-in has arrived. After that, repeat the call that needed it.\nDrawing \"d-mfp9u7yi\" is new and belongs to this conversation. Pass drawing: \"d-mfp9u7yi\" in every further call about this model; \"new\" again only for another, separate model (it starts empty).",
              "tool": "use_session"
            }
          ],
          "task": "Using the local WASM engine, make a rectangular solid 40 mm long, 30 mm wide, and 10 mm high. Verify its dimensions and volume, and show a rendered view."
        },
        "type": "noul"
      },
      "w01": {
        "criteria": {
          "false": "The tool replies show an error, a missing or different result, or nothing about the task; or only the agent's final answer claims the task was done.",
          "true": "The tool replies in `steps` show the result that `done_when` describes. The result came from the server's tools, not only from the agent's own words."
        },
        "instructions": {
          "agent_final_answer": "I couldn’t create or verify the solid: the ClassCAD tool requires sign-in even when using the local WASM engine, and this sandbox has no network access or accounts.\n\nThe requested dimensions imply a volume of **40 × 30 × 10 = 12,000 mm³**, but that is a calculation, not a verification of a created model. No rendered view is available.",
          "done_when": "The tool replies show a solid with dimensions 40 × 30 × 10 mm, a volume of 12,000 mm³, and a rendered image.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {
                "drawing": "new",
                "engine": "wasm"
              },
              "reply": "error: Sign-in required: the ClassCAD MCP works with a free classcad.ch account (Google, GitHub or email; one click if they already have one).\n\nShow the user this link, as a clickable link on its own line, in case they need to open it:\n\nhttps://classcad.ch/connect?port=36003&state=5Uvz5OAMQi9BwsoihWWb_pW_IY1B2tai&exp=1795397166990&client=didrun-lab\n\nThen call the `login` tool: it waits and returns as soon as the sign-in has arrived. After that, repeat the call that needed it.\nDrawing \"d-k5jhhkxe\" is new and belongs to this conversation. Pass drawing: \"d-k5jhhkxe\" in every further call about this model; \"new\" again only for another, separate model (it starts empty).",
              "tool": "use_session"
            }
          ],
          "task": "Using the local WASM engine, make a rectangular solid 40 mm long, 30 mm wide, and 10 mm high. Verify its dimensions and volume, and show a rendered view."
        },
        "type": "noul"
      },
      "w02": {
        "criteria": {
          "false": "The tool replies show an error, a missing or different result, or nothing about the task; or only the agent's final answer claims the task was done.",
          "true": "The tool replies in `steps` show the result that `done_when` describes. The result came from the server's tools, not only from the agent's own words."
        },
        "instructions": {
          "agent_final_answer": "I couldn’t create or render the solid: the ClassCAD tool requires sign-in even when using the local WASM engine, and this sandbox has no account or network access.\n\nFor the requested dimensions, the calculated volume would be **40 × 30 × 10 = 12,000 mm³**, but I couldn’t verify it against a model.",
          "done_when": "The tool replies show a solid with dimensions 40 × 30 × 10 mm, a volume of 12,000 mm³, and a rendered image.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {
                "drawing": "new",
                "engine": "wasm"
              },
              "reply": "error: Sign-in required: the ClassCAD MCP works with a free classcad.ch account (Google, GitHub or email; one click if they already have one).\n\nShow the user this link, as a clickable link on its own line, in case they need to open it:\n\nhttps://classcad.ch/connect?port=46749&state=jvjhcg_sNCYMMj0--O7PvGOAzMC8Ioo9&exp=1795397173898&client=didrun-lab\n\nThen call the `login` tool: it waits and returns as soon as the sign-in has arrived. After that, repeat the call that needed it.\nDrawing \"d-qhziqvfm\" is new and belongs to this conversation. Pass drawing: \"d-qhziqvfm\" in every further call about this model; \"new\" again only for another, separate model (it starts empty).",
              "tool": "use_session"
            }
          ],
          "task": "Using the local WASM engine, make a rectangular solid 40 mm long, 30 mm wide, and 10 mm high. Verify its dimensions and volume, and show a rendered view."
        },
        "type": "noul"
      },
      "w03": {
        "criteria": {
          "false": "The tool replies show an error, a missing or different result, or nothing about the task; or only the agent's final answer claims the task was done.",
          "true": "The tool replies in `steps` show the result that `done_when` describes. The result came from the server's tools, not only from the agent's own words."
        },
        "instructions": {
          "agent_final_answer": "I couldn’t create the cube or save `/tmp/cube.ofb`: the CAD engine requires a ClassCAD sign-in, and this sandbox has no network or accounts. Consequently, there is no reloaded drawing tree to show.",
          "done_when": "The transcript shows the OFB file saved, the drawing cleared and reloaded, and a refreshed tree containing the restored cube.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {
                "search": [
                  "create part",
                  "box"
                ]
              },
              "reply": "{\"count\":110,\"groups\":[{\"search\":\"create part\",\"count\":107,\"methods\":[{\"method\":\"v1.part.create\",\"summary\":\"Clears the drawing and creates a new part\"},{\"method\":\"v1.sketch.create\",\"summary\":\"Creates a new sketch and places it optionally on a face or work plane - if planeId is a…\"},{\"method\":\"v1.assembly.create\",\"summary\":\"Creates a new root assembly.\"},{\"method\":\"v1.assembly.partTemplate\",\"summary\":\"Creates a new part and adds it as template to the product container.\"},{\"method\":\"v1.part.createUncommitedObject\",\"summary\":\"Attention: This method should only be used, if the intention is very clear.\"},{\"method\":\"v1.part.fillet\",\"summary\":\"Creates a fillet feature.\"},{\"method\":\"v1.part.mirror\",\"summary\":\"Creates a mirror feature.\"},{\"method\":\"v1.part.boolean\",\"summary\":\"Creates a boolean feature.\"}],\"note\":\"showing 8 of 107\"},{\"search\":\"box\",\"count\":5,\"methods\":[{\"method\":\"v1.part.box\",\"summary\":\"Creates or updates a box feature.\"},{\"method\":\"v1.solid.box\",\"summary\":\"Creates a box\"},{\"method\":\"v1.part.updateBox\",\"summary\":\"Updates a box feature.\"},{\"method\":\"v1.drawing2d.centerView\",\"summary\":\"This method centers all given views to origin, depending on each view's boundary box.\"},{\"method\":\"v1.drawing2d.getBoundaryBoxFromView\",\"summary\":\"This method returns min and max point for each given view.\"}]}],\"note\":\"One group per search entry, each ranked on its own (BM25 over name + summary, CAD synonyms expanded), top 8 per group. `seeAbove` = already listed under that entry. Use describeMethod for exact params.\",\"docs\":[{\"key\":\"recipes/verification\",\"title\":\"Recipe — verification (mandatory for every build)\",\"chars\":17143,\"pages\":1,\"headings\":[\"Tier 2 — bounds / bounding box (position/extent claims)\"]},{\"key\":\"recipes/assembly-parameters\",\"title\":\"Shared parameters across the parts of an assembly\",\"chars\":7370,\"pages\":1,\"headings\":[]},{\"key\":\"recipes/clean-construction\",\"title\":\"Clean construction — one template per shape, one feature per operation (parts and assembly models without clutter, duplication or feature creep)\",\"chars\":23620,\"pages\":1,\"headings\":[]},{\"key\":\"recipes/constrained-sketching\",\"title\":\"Sketching Guide — Reproducing Technical Drawings in ClassCAD\",\"chars\":44296,\"pages\":1,\"headings\":[]},{\"key\":\"recipes/direct-modeling-eif\",\"title\":\"Direct modeling with solid.\\\\* inside an Entity Injection Feature (EIF)\",\"chars\":4847,\"pages\":1,\"headings\":[]},{\"key\":\"part/brep-access-pattern\",\"title\":\"Brep Geometry Access Pattern\",\"chars\":6808,\"pages\":1,\"headings\":[\"Box Edge Midpoints (box at origin, L×W×H)\"]}],\"docsNote\":\"Workflow documents matching the search — fetch with docs([...keys]).\"}",
              "tool": "list_methods"
            },
            {
              "arguments": {
                "keys": [
                  "recipes/verification",
                  "v1.part.create",
                  "v1.part.box"
                ]
              },
              "reply": "# ═══ recipes/verification ═══\n\n# Recipe — verification (mandatory for every build)\n\nClassCAD reports success (maxLevel 31) for several operations that silently\ndid nothing or produced wrong geometry — frozen unmerged patterns, no-op\nexpression forms, dead solvers on planeless sketches. And a rendered view\nauto-scales, so a wrong size can look identical. Correctness therefore has\ntwo halves, and both need proof:\n\n- **Execution** — the model matches your plan → numeric verification (Part II).\n- **Interpretation** — your plan matches the input → perception discipline\n  (Part I). Green numbers cannot save a mirrored reading: six independent\n  runs built the same part with a C-cut facing the wrong way, each with a\n  full suite of passing probes, because every probe target was derived from\n  the same misread image.\n\n## Which regime? — the INPUT TYPE decides\n\n| Input                                                 | Regime                                                                                                                                                                                        |\n| ----------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| **Plain-text spec** (numbers in the prompt)           | Part II only — no perception phase                                                                                                                                                            |\n| **Technical drawing** (image WITH dimension callouts) | Part I in full, then Part II; the frozen record drives the probes. Build path: recipes/constrained-sketching — dimension checklist → constraints + dimensions; the solver lays out the sketch |\n| **Image/photo WITHOUT dimensions**                    | Part I in full; Part II verifies proportions, feature counts and topology instead of absolutes — state your assumed scale explicitly                                                          |\n| **Dynamic/iterative prompts** (user steers as you go) | Part II per increment; re-run the Part I questions whenever the wording implies a side, direction, or handedness                                                                              |\n\n---\n\n# Part I — perception first (any input reference)\n\nThe measured differentiator: the same model that\nmisreads a part's handedness while planning a build reads it correctly when\nasked in isolation — wrong 6/6 with a build task in context, right 9/9\nwithout one. Perception is not the bottleneck; build-task context is, and\nin-task probes then VALIDATE a misreading because every probe target\nderives from it. This phase therefore (a) converts handedness questions\ninto LOCAL alignment questions, and (b) moves the reading outside the\nbuild context wherever the host allows.\n\n## Phase 0 — the REFERENCE RECORD (before any modeling)\n\nWrite the record down (notes tool / your plan) BEFORE the first build call.\nIt is the contract the final verification tests against, and it is FROZEN:\nthe later holistic reading may add facts but may not overturn them — a\ndisagreement marks the fact LOW CONFIDENCE for the mirror check, never a\nsilent revision.\n\n1. **Inventory** — which views the reference shows (iso, front, top, …),\n   and the image resolution. Below ~800 px, fine features — especially\n   handedness — are LOW CONFIDENCE: say so in the record. For a multi-view\n   technical drawing also record the **projection method** — it decides\n   which side each view looks from, so a wrong one mirrors the part (see\n   recipes/constrained-sketching, \"Projection method\").\n2. **Callout anchors** — for every dimension callout, write what its\n   leader/arrows physically TOUCH (\"Ø30 leader enters upper-right, lands\n   on the inner arc\") and whether the leader CROSSES the part's material\n   on the way — a leader that reaches an inner feature without crossing\n   the surrounding material tells you the gap is on its approach side.\n   Callouts outrank silhouette impressions; at low resolution a silhouette\n   impression alone is inadmissible for handedness. (Photo without\n   callouts: anchor on shadows, contact lines and feature counts; verify\n   proportions rather than absolutes.)\n3. **List every side/direction/handedness fact** — every asymmetry the\n   part cannot be mirrored across, whatever the part is. ALL of them, not\n   just the ones that feel uncertain: for handedness, confidence and\n   accuracy are uncorrelated — the confident readings were the wrong ones.\n4. **Resolve by COINCIDENCE before rotation.** Hunt for alignments first:\n   flush faces, tangencies, shared centrelines, collinear silhouette\n   edges, features lining up across views. \"Is this face flush with that\n   one?\" is local and objective; \"which way does it open?\" needs the\n   mental rotation that is measurably unreliable — and one found\n   coincidence usually pins the whole orientation for free.\n5. **Remaining facts get a TWO-HYPOTHESIS test with a pre-registered\n   observable** — write BOTH mirror readings and what each PREDICTS for\n   one concrete pixel observable (material/void sequence along a line, an\n   edge count, what a leader touches); only THEN read the observable off\n   the image (magnified crop if one was supplied) and let it decide.\n   Prediction before observation: collected afterwards, the observable\n   bends to fit the favored reading.\n6. **Have fresh readers answer the open questions when the host provides\n   them** (buerli-ai: `delegate` with `agent: \"perception\", withImages:\ntrue`) — a fresh reader has no build task in context, which is the\n   measured differentiator. ONE question per reader, several readers\n   fanned out in parallel in the same response (one question per reader →\n   6/6 correct; seven questions in one reader → handedness wrong).\n   Readers answer what is VISIBLE, nothing else: what a dimension MEANS,\n   what is hidden, how deep a bore goes are USER questions — asked anyway,\n   a reader fabricates confident detail. Reader disagrees with you ⇒ LOW\n   CONFIDENCE, record it.\n7. **Write the verdicts + evidence into the record**, then freeze it.\n\nBounds on the whole phase:\n\n- The supplied image(s) ARE the evidence base. Do not manufacture crop\n  batteries — self-cropping runs took 25–50 min against ~12 for plain\n  reads, with no accuracy gain.\n- **Mechanical plausibility is a PRIOR, not evidence** — it describes\n  typical parts, not this part (real parts DO have ribs meeting curved\n  walls and cuts opening off the plate). Tie-breaker when every image\n  channel is silent; never an override of a callout reading.\n- **\"Symmetric about a plane\" exempts nothing** — symmetry about one\n  plane says nothing about asymmetries along the other axes, and the\n  feature at risk is usually on one of those.\n- **Never invent geometry to explain a reading.** A reader answer that\n  implies an otherwise unevidenced feature (a gap, a slot, a cut) is a USER\n  question, not a record fact — one misread \"ring gap\" became an invented\n  cut that every probe then validated.\n- Every dimension, axis and relation must be traceable to something you\n  can point at in THIS image. \"I recognize this part\" is recall, not\n  reading — the remembered variant differs.\n\n**Stopping rule — bounded inquiry, then ASK or DECLARE.** One\ndiscriminating observation plus the reader round is the whole budget per\nfact. Not settled ⇒ the fact is UNDECIDABLE from the input, which is a\nRESULT, not a failure:\n\n- **Interactive host: ASK the user.** Once, all open questions batched,\n  each with your best reading as the default so a one-word reply unblocks\n  you (\"I read the 70 as centre→far end; the bore looks through — confirm\n  or correct?\"). Every handedness fact goes into the batch\n  UNCONDITIONALLY — confidence does not filter the list. One batched\n  question is the fast path; the wrong part is the stall.\n- **Headle",
              "tool": "docs"
            },
            {
              "arguments": {
                "drawing": "new",
                "engine": "wasm"
              },
              "reply": "error: Sign-in required: the ClassCAD MCP works with a free classcad.ch account (Google, GitHub or email; one click if they already have one).\n\nShow the user this link, as a clickable link on its own line, in case they need to open it:\n\nhttps://classcad.ch/connect?port=39289&state=WNkCqOC0fR92skhPFxfO2wWEfbUYitpd&exp=1795397184168&client=didrun-lab\n\nThen call the `login` tool: it waits and returns as soon as the sign-in has arrived. After that, repeat the call that needed it.\nDrawing \"d-x87idwyu\" is new and belongs to this conversation. Pass drawing: \"d-x87idwyu\" in every further call about this model; \"new\" again only for another, separate model (it starts empty).",
              "tool": "use_session"
            }
          ],
          "task": "Create a 20 mm cube in a new local drawing, save it as /tmp/cube.ofb, clear the drawing, and reload the file. Show the drawing tree after reloading to confirm the cube was restored."
        },
        "type": "noul"
      },
      "w04": {
        "criteria": {
          "false": "The tool replies show an error, a missing or different result, or nothing about the task; or only the agent's final answer claims the task was done.",
          "true": "The tool replies in `steps` show the result that `done_when` describes. The result came from the server's tools, not only from the agent's own words."
        },
        "instructions": {
          "agent_final_answer": "I couldn’t create the cube: the CAD tool requires a ClassCAD sign-in even for a local drawing, and this sandbox has no network or accounts available.\n\nThe tool allocated a new drawing, but the cube was not created, saved, or reloaded. I therefore can’t show a restored drawing tree.",
          "done_when": "The transcript shows the OFB file saved, the drawing cleared and reloaded, and a refreshed tree containing the restored cube.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {
                "search": [
                  "create part",
                  "box"
                ]
              },
              "reply": "{\"count\":110,\"groups\":[{\"search\":\"create part\",\"count\":107,\"methods\":[{\"method\":\"v1.part.create\",\"summary\":\"Clears the drawing and creates a new part\"},{\"method\":\"v1.sketch.create\",\"summary\":\"Creates a new sketch and places it optionally on a face or work plane - if planeId is a…\"},{\"method\":\"v1.assembly.create\",\"summary\":\"Creates a new root assembly.\"},{\"method\":\"v1.assembly.partTemplate\",\"summary\":\"Creates a new part and adds it as template to the product container.\"},{\"method\":\"v1.part.createUncommitedObject\",\"summary\":\"Attention: This method should only be used, if the intention is very clear.\"},{\"method\":\"v1.part.fillet\",\"summary\":\"Creates a fillet feature.\"},{\"method\":\"v1.part.mirror\",\"summary\":\"Creates a mirror feature.\"},{\"method\":\"v1.part.boolean\",\"summary\":\"Creates a boolean feature.\"}],\"note\":\"showing 8 of 107\"},{\"search\":\"box\",\"count\":5,\"methods\":[{\"method\":\"v1.part.box\",\"summary\":\"Creates or updates a box feature.\"},{\"method\":\"v1.solid.box\",\"summary\":\"Creates a box\"},{\"method\":\"v1.part.updateBox\",\"summary\":\"Updates a box feature.\"},{\"method\":\"v1.drawing2d.centerView\",\"summary\":\"This method centers all given views to origin, depending on each view's boundary box.\"},{\"method\":\"v1.drawing2d.getBoundaryBoxFromView\",\"summary\":\"This method returns min and max point for each given view.\"}]}],\"note\":\"One group per search entry, each ranked on its own (BM25 over name + summary, CAD synonyms expanded), top 8 per group. `seeAbove` = already listed under that entry. Use describeMethod for exact params.\",\"docs\":[{\"key\":\"recipes/verification\",\"title\":\"Recipe — verification (mandatory for every build)\",\"chars\":17143,\"pages\":1,\"headings\":[\"Tier 2 — bounds / bounding box (position/extent claims)\"]},{\"key\":\"recipes/assembly-parameters\",\"title\":\"Shared parameters across the parts of an assembly\",\"chars\":7370,\"pages\":1,\"headings\":[]},{\"key\":\"recipes/clean-construction\",\"title\":\"Clean construction — one template per shape, one feature per operation (parts and assembly models without clutter, duplication or feature creep)\",\"chars\":23620,\"pages\":1,\"headings\":[]},{\"key\":\"recipes/constrained-sketching\",\"title\":\"Sketching Guide — Reproducing Technical Drawings in ClassCAD\",\"chars\":44296,\"pages\":1,\"headings\":[]},{\"key\":\"recipes/direct-modeling-eif\",\"title\":\"Direct modeling with solid.\\\\* inside an Entity Injection Feature (EIF)\",\"chars\":4847,\"pages\":1,\"headings\":[]},{\"key\":\"part/brep-access-pattern\",\"title\":\"Brep Geometry Access Pattern\",\"chars\":6808,\"pages\":1,\"headings\":[\"Box Edge Midpoints (box at origin, L×W×H)\"]}],\"docsNote\":\"Workflow documents matching the search — fetch with docs([...keys]).\"}",
              "tool": "list_methods"
            },
            {
              "arguments": {
                "keys": [
                  "recipes/verification",
                  "v1.part.create",
                  "v1.part.box"
                ]
              },
              "reply": "# ═══ recipes/verification ═══\n\n# Recipe — verification (mandatory for every build)\n\nClassCAD reports success (maxLevel 31) for several operations that silently\ndid nothing or produced wrong geometry — frozen unmerged patterns, no-op\nexpression forms, dead solvers on planeless sketches. And a rendered view\nauto-scales, so a wrong size can look identical. Correctness therefore has\ntwo halves, and both need proof:\n\n- **Execution** — the model matches your plan → numeric verification (Part II).\n- **Interpretation** — your plan matches the input → perception discipline\n  (Part I). Green numbers cannot save a mirrored reading: six independent\n  runs built the same part with a C-cut facing the wrong way, each with a\n  full suite of passing probes, because every probe target was derived from\n  the same misread image.\n\n## Which regime? — the INPUT TYPE decides\n\n| Input                                                 | Regime                                                                                                                                                                                        |\n| ----------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| **Plain-text spec** (numbers in the prompt)           | Part II only — no perception phase                                                                                                                                                            |\n| **Technical drawing** (image WITH dimension callouts) | Part I in full, then Part II; the frozen record drives the probes. Build path: recipes/constrained-sketching — dimension checklist → constraints + dimensions; the solver lays out the sketch |\n| **Image/photo WITHOUT dimensions**                    | Part I in full; Part II verifies proportions, feature counts and topology instead of absolutes — state your assumed scale explicitly                                                          |\n| **Dynamic/iterative prompts** (user steers as you go) | Part II per increment; re-run the Part I questions whenever the wording implies a side, direction, or handedness                                                                              |\n\n---\n\n# Part I — perception first (any input reference)\n\nThe measured differentiator: the same model that\nmisreads a part's handedness while planning a build reads it correctly when\nasked in isolation — wrong 6/6 with a build task in context, right 9/9\nwithout one. Perception is not the bottleneck; build-task context is, and\nin-task probes then VALIDATE a misreading because every probe target\nderives from it. This phase therefore (a) converts handedness questions\ninto LOCAL alignment questions, and (b) moves the reading outside the\nbuild context wherever the host allows.\n\n## Phase 0 — the REFERENCE RECORD (before any modeling)\n\nWrite the record down (notes tool / your plan) BEFORE the first build call.\nIt is the contract the final verification tests against, and it is FROZEN:\nthe later holistic reading may add facts but may not overturn them — a\ndisagreement marks the fact LOW CONFIDENCE for the mirror check, never a\nsilent revision.\n\n1. **Inventory** — which views the reference shows (iso, front, top, …),\n   and the image resolution. Below ~800 px, fine features — especially\n   handedness — are LOW CONFIDENCE: say so in the record. For a multi-view\n   technical drawing also record the **projection method** — it decides\n   which side each view looks from, so a wrong one mirrors the part (see\n   recipes/constrained-sketching, \"Projection method\").\n2. **Callout anchors** — for every dimension callout, write what its\n   leader/arrows physically TOUCH (\"Ø30 leader enters upper-right, lands\n   on the inner arc\") and whether the leader CROSSES the part's material\n   on the way — a leader that reaches an inner feature without crossing\n   the surrounding material tells you the gap is on its approach side.\n   Callouts outrank silhouette impressions; at low resolution a silhouette\n   impression alone is inadmissible for handedness. (Photo without\n   callouts: anchor on shadows, contact lines and feature counts; verify\n   proportions rather than absolutes.)\n3. **List every side/direction/handedness fact** — every asymmetry the\n   part cannot be mirrored across, whatever the part is. ALL of them, not\n   just the ones that feel uncertain: for handedness, confidence and\n   accuracy are uncorrelated — the confident readings were the wrong ones.\n4. **Resolve by COINCIDENCE before rotation.** Hunt for alignments first:\n   flush faces, tangencies, shared centrelines, collinear silhouette\n   edges, features lining up across views. \"Is this face flush with that\n   one?\" is local and objective; \"which way does it open?\" needs the\n   mental rotation that is measurably unreliable — and one found\n   coincidence usually pins the whole orientation for free.\n5. **Remaining facts get a TWO-HYPOTHESIS test with a pre-registered\n   observable** — write BOTH mirror readings and what each PREDICTS for\n   one concrete pixel observable (material/void sequence along a line, an\n   edge count, what a leader touches); only THEN read the observable off\n   the image (magnified crop if one was supplied) and let it decide.\n   Prediction before observation: collected afterwards, the observable\n   bends to fit the favored reading.\n6. **Have fresh readers answer the open questions when the host provides\n   them** (buerli-ai: `delegate` with `agent: \"perception\", withImages:\ntrue`) — a fresh reader has no build task in context, which is the\n   measured differentiator. ONE question per reader, several readers\n   fanned out in parallel in the same response (one question per reader →\n   6/6 correct; seven questions in one reader → handedness wrong).\n   Readers answer what is VISIBLE, nothing else: what a dimension MEANS,\n   what is hidden, how deep a bore goes are USER questions — asked anyway,\n   a reader fabricates confident detail. Reader disagrees with you ⇒ LOW\n   CONFIDENCE, record it.\n7. **Write the verdicts + evidence into the record**, then freeze it.\n\nBounds on the whole phase:\n\n- The supplied image(s) ARE the evidence base. Do not manufacture crop\n  batteries — self-cropping runs took 25–50 min against ~12 for plain\n  reads, with no accuracy gain.\n- **Mechanical plausibility is a PRIOR, not evidence** — it describes\n  typical parts, not this part (real parts DO have ribs meeting curved\n  walls and cuts opening off the plate). Tie-breaker when every image\n  channel is silent; never an override of a callout reading.\n- **\"Symmetric about a plane\" exempts nothing** — symmetry about one\n  plane says nothing about asymmetries along the other axes, and the\n  feature at risk is usually on one of those.\n- **Never invent geometry to explain a reading.** A reader answer that\n  implies an otherwise unevidenced feature (a gap, a slot, a cut) is a USER\n  question, not a record fact — one misread \"ring gap\" became an invented\n  cut that every probe then validated.\n- Every dimension, axis and relation must be traceable to something you\n  can point at in THIS image. \"I recognize this part\" is recall, not\n  reading — the remembered variant differs.\n\n**Stopping rule — bounded inquiry, then ASK or DECLARE.** One\ndiscriminating observation plus the reader round is the whole budget per\nfact. Not settled ⇒ the fact is UNDECIDABLE from the input, which is a\nRESULT, not a failure:\n\n- **Interactive host: ASK the user.** Once, all open questions batched,\n  each with your best reading as the default so a one-word reply unblocks\n  you (\"I read the 70 as centre→far end; the bore looks through — confirm\n  or correct?\"). Every handedness fact goes into the batch\n  UNCONDITIONALLY — confidence does not filter the list. One batched\n  question is the fast path; the wrong part is the stall.\n- **Headle",
              "tool": "docs"
            },
            {
              "arguments": {
                "drawing": "new",
                "engine": "wasm"
              },
              "reply": "error: Sign-in required: the ClassCAD MCP works with a free classcad.ch account (Google, GitHub or email; one click if they already have one).\n\nShow the user this link, as a clickable link on its own line, in case they need to open it:\n\nhttps://classcad.ch/connect?port=38369&state=_RePKz6UYzPQS4OZ22IyNMJu0zZ5cEo4&exp=1795397193890&client=didrun-lab\n\nThen call the `login` tool: it waits and returns as soon as the sign-in has arrived. After that, repeat the call that needed it.\nDrawing \"d-kp88ieh3\" is new and belongs to this conversation. Pass drawing: \"d-kp88ieh3\" in every further call about this model; \"new\" again only for another, separate model (it starts empty).",
              "tool": "use_session"
            }
          ],
          "task": "Create a 20 mm cube in a new local drawing, save it as /tmp/cube.ofb, clear the drawing, and reload the file. Show the drawing tree after reloading to confirm the cube was restored."
        },
        "type": "noul"
      },
      "w05": {
        "criteria": {
          "false": "The tool replies show an error, a missing or different result, or nothing about the task; or only the agent's final answer claims the task was done.",
          "true": "The tool replies in `steps` show the result that `done_when` describes. The result came from the server's tools, not only from the agent's own words."
        },
        "instructions": {
          "agent_final_answer": "I couldn’t create the cube because the CAD tool requires a ClassCAD sign-in, and this sandbox has no network access or accounts.\n\nThe new drawing was allocated, but `/tmp/cube.ofb` was not created, so there is no reloaded drawing tree to show.",
          "done_when": "The transcript shows the OFB file saved, the drawing cleared and reloaded, and a refreshed tree containing the restored cube.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {
                "drawing": "new",
                "engine": "wasm"
              },
              "reply": "error: Sign-in required: the ClassCAD MCP works with a free classcad.ch account (Google, GitHub or email; one click if they already have one).\n\nShow the user this link, as a clickable link on its own line, in case they need to open it:\n\nhttps://classcad.ch/connect?port=39397&state=_MJApDshkLXCyOjdNXp4ZSQ2M3NrVRU-&exp=1795397199514&client=didrun-lab\n\nThen call the `login` tool: it waits and returns as soon as the sign-in has arrived. After that, repeat the call that needed it.\nDrawing \"d-ymf5sqtv\" is new and belongs to this conversation. Pass drawing: \"d-ymf5sqtv\" in every further call about this model; \"new\" again only for another, separate model (it starts empty).",
              "tool": "use_session"
            }
          ],
          "task": "Create a 20 mm cube in a new local drawing, save it as /tmp/cube.ofb, clear the drawing, and reload the file. Show the drawing tree after reloading to confirm the cube was restored."
        },
        "type": "noul"
      },
      "w06": {
        "criteria": {
          "false": "The tool replies show an error, a missing or different result, or nothing about the task; or only the agent's final answer claims the task was done.",
          "true": "The tool replies in `steps` show the result that `done_when` describes. The result came from the server's tools, not only from the agent's own words."
        },
        "instructions": {
          "agent_final_answer": "## `v1.part.box`\n\nCreates a **parametric box feature** in a part’s feature tree.\n\n```js\nconst boxId = (await api.v1.part.box({\n  id: partId,\n  name: \"Box1\",\n  length: 60,\n  width: 40,\n  height: 30,\n  // references: [workCSysId],\n})).result;\n```\n\n| Parameter | Description |\n|---|---|\n| `id` | Part ID—not an entity-injection ID. |\n| `name` | Feature name; defaults to `\"Box\"`. |\n| `length`, `width`, `height` | X, Y, Z dimensions; each defaults to 100. Numbers and expression strings are supported. |\n| `references` | Optional array of work-coordinate-system IDs for placement. If omitted, the box starts at the drawing origin. |\n\n**Returns:** A numeric feature ID. The box is corner-aligned: without a placement reference, it extends from `(0, 0, 0)` to `(length, width, height)`. Dimensions must be positive.\n\nFor direct geometry rather than a parametric feature, the API also has `v1.solid.box`; unlike `part.box`, it creates a centered box inside an entity injection.\n\n## `v1.part.calculateMassProperties`\n\nCalculates the **volume and center of gravity** of a part, assembly, instance, or single solid.\n\n```js\nconst { result } = await api.v1.part.calculateMassProperties({ id: partId });\n\nconsole.log(result.volume);\nconsole.log(result.cog.x, result.cog.y, result.cog.z);\n```\n\n| Parameter | Description |\n|---|---|\n| `id` | A part/assembly, instance, or solid ID. Feature IDs—including the ID returned by `part.box`—are not accepted. |\n\n**Return shape:**\n\n```js\n{\n  result: {\n    cog: { x, y, z },\n    volume: 72000\n  },\n  messages: [],\n  maxLevel: 31\n}\n```\n\nVolume is in mm³. For a part, the result covers its contained solids and the COG is in part-local coordinates; assembly and instance results use assembly coordinates. Ensure geometry exists before measuring: the documentation warns that measuring an empty part can cause an internal error.\n\n## `recipes/verification` — documentation summary\n\nThe verification recipe distinguishes **execution**—whether the model matches the plan—from **i",
          "done_when": "Tool replies identify the relevant box and mass-properties methods and provide their documentation along with the verification recipe.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {
                "search": [
                  "box",
                  "mass properties"
                ]
              },
              "reply": "{\"count\":7,\"groups\":[{\"search\":\"box\",\"count\":5,\"methods\":[{\"method\":\"v1.part.box\",\"summary\":\"Creates or updates a box feature.\"},{\"method\":\"v1.solid.box\",\"summary\":\"Creates a box\"},{\"method\":\"v1.part.updateBox\",\"summary\":\"Updates a box feature.\"},{\"method\":\"v1.drawing2d.centerView\",\"summary\":\"This method centers all given views to origin, depending on each view's boundary box.\"},{\"method\":\"v1.drawing2d.getBoundaryBoxFromView\",\"summary\":\"This method returns min and max point for each given view.\"}]},{\"search\":\"mass properties\",\"count\":2,\"methods\":[{\"method\":\"v1.part.calculateMassProperties\",\"summary\":\"Calculates the center of gravity (cog) and the volume of the given object.\"},{\"method\":\"v1.assembly.calculateMassProperties\",\"summary\":\"Calculates the center of gravity (cog) and the volume of the given object.\"}]}],\"note\":\"One group per search entry, each ranked on its own (BM25 over name + summary, CAD synonyms expanded), top 8 per group. `seeAbove` = already listed under that entry. Use describeMethod for exact params.\",\"docs\":[{\"key\":\"recipes/verification\",\"title\":\"Recipe — verification (mandatory for every build)\",\"chars\":17143,\"pages\":1,\"headings\":[\"Tier 2 — bounds / bounding box (position/extent claims)\",\"Tier 1 — mass properties (cheap, catches most wrongness)\"]},{\"key\":\"recipes/assembly-parameters\",\"title\":\"Shared parameters across the parts of an assembly\",\"chars\":7370,\"pages\":1,\"headings\":[]},{\"key\":\"recipes/clean-construction\",\"title\":\"Clean construction — one template per shape, one feature per operation (parts and assembly models without clutter, duplication or feature creep)\",\"chars\":23620,\"pages\":1,\"headings\":[]},{\"key\":\"recipes/direct-modeling-eif\",\"title\":\"Direct modeling with solid.\\\\* inside an Entity Injection Feature (EIF)\",\"chars\":4847,\"pages\":1,\"headings\":[]},{\"key\":\"assembly/generic\",\"title\":\"Assembly: Template vs Instance Paradigm\",\"chars\":6333,\"pages\":1,\"headings\":[]},{\"key\":\"common/generic\",\"title\":\"Protocol Envelope\",\"chars\":11732,\"pages\":1,\"headings\":[]}],\"docsNote\":\"Workflow documents matching the search — fetch with docs([...keys]).\"}",
              "tool": "list_methods"
            },
            {
              "arguments": {
                "keys": [
                  "v1.part.box",
                  "v1.part.calculateMassProperties",
                  "recipes/verification"
                ]
              },
              "reply": "# ═══ v1.part.box ═══\n\n# v1.part.box\n\n**Summary**: Creates or updates a box feature. If optional parameters are not set, the default values will be used, see (default=xy).\n\n**Parameters**:\n- `param`: object containing the parameters\n- Described in the notes below: `id`, `name`, `references`, `length`, `width`, `height`\n\n---\n\n# Detailed notes\n\n# part.box\n\nParametric box feature in a part's feature tree (unlike `solid.box`, direct geometry in an entity injection). Supports `updateBox`, expression-driven dimensions, and workCSys placement via `references`.\n\n## Key Parameters\n\n- `id` — **part ID** (not entity injection ID — that's `solid.box`)\n- `name` — feature name (default: \"Box\")\n- `length`, `width`, `height` — X, Y, Z dimensions. Default 100 each. Numbers or expression strings: `'@expr.W'`, inline math `'3*25'`, `'sqrt(100)'`. With `@expr.` references, `part.updateExpression` updates the box at once (no recalc).\n- `references` — array of **workCSys IDs only**; box placed at the csys origin. Empty/omitted = drawing origin\n\n## Return Value\n\nFeature ID (numeric), maxLevel 31. Pass it to `updateBox`, `openFeature`, `closeFeature`, etc.\n\n## Alignment\n\n**Corner-aligned at the origin**: extends from `(0,0,0)` to `(+length, +width, +height)`, COG at `(L/2, W/2, H/2)`. Measured with 100×80×60: vertex 0 at `(0,0,0)`, COG `(50,40,30)`.\n\n**Differs from `solid.box`**, which is centered (corners at `±L/2, ±W/2, ±H/2`). When mixing both families in one part, translate one to overlay them. See `feature-vs-direct.md`.\n\n## Gotchas\n\n- **Unknown parameters are SILENTLY IGNORED**: `xPosition`/`zPosition`/`translation` do not exist — box lands at the origin with no warning. Position only via `references: [workCSysId]`.\n- **`references` only accepts `workcsys` IDs** (\"reference of the work coordinate system\" means literally a workCSys). Work plane/axis/point ID → error 1001.\n- **Zero/negative dimensions create degenerate features**: returns a feature ID with maxLevel 51 and error 1122; the feature exists but has no valid geometry. Validate dims > 0.\n- Multiple boxes in one part are fine — each is a separate feature with its own body (renderer colors each body distinctly).\n- `updateBox({ name })` renames the feature node; the internal body child keeps the original name suffixed `_0`.\n\n## Common Errors\n\n| Code | Message | Cause |\n|------|---------|-------|\n| 1122 | \"Value for [param] must be greater than 0\" | Zero or negative dimension |\n| 1001 | \"wrong id type! Provide only following id types: ['workcsys']\" | Non-workCSys ID in `references` |\n\n## updateBox\n\nFull details: `updateBox.md`. Wrap in `openFeature`/`closeFeature` (without `openFeature`: null + errors 1200 + 1004). `id` = feature ID; returns feature ID on success, null on failure (not VOID). Omitted params keep values; multiple calls within one open/close all apply; `@expr.`/inline math supported; `references: [wcsId]` adds, `[]` removes placement; geometry regenerates on `closeFeature` (no `recalc` needed).\n\n## Working Example\n\n```js\nconst partId = (await api.v1.part.create({ name: 'MyPart' })).result\nconst wcsId = (await api.v1.part.workCSys({ id: partId, name: 'WCS1', offset: [50, 0, 0] })).result\n\nconst boxId = (await api.v1.part.box({\n  id: partId, name: 'Box1', references: [wcsId],\n  length: 60, width: 40, height: 30,\n})).result\nawait api.v1.part.box({ id: partId, length: '3*25', height: 'sqrt(2500)' }) // inline math\n\nawait api.v1.part.openFeature({ id: boxId })\nawait api.v1.part.updateBox({ id: boxId, height: 80 })\nawait api.v1.part.closeFeature({ id: boxId })\n```\n\n## part.box vs solid.box\n\n| | `part.box` | `solid.box` |\n|---|---|---|\n| Container | Part (feature tree) | Entity injection |\n| `id` param | Part ID | Entity injection ID |\n| ID type returned | feature | solid |\n| Update API | `updateBox` (via open/close) | None (use `solid.translation`/`rotation`/`scale`) |\n| Positioning | `references` (workCSys) | `translation`, `rotation`, `rotateFirst` |\n| Expressions | `@expr.` syntax in dims | ❌ strictly `real` only |\n| Boolean system | `part.boolean` (feature IDs only) | `solid.*` booleans (solid IDs only) |\n| Mass properties | Via part ID (feature ID rejected) | Via solid ID or part ID |\n| Feature tree | Yes — full parametric history | No — flat inside EIF |\n| Cross-paradigm | Cannot mix in booleans | Cannot mix in booleans |\n\nSee `feature-vs-direct.md` for a full comparison.\n\n## Related\n\n`part.updateBox` · `part.openFeature` / `part.closeFeature` · `part.workCSys` · `solid.box`\n\n\n# ═══ v1.part.calculateMassProperties ═══\n\n# v1.part.calculateMassProperties\n\n**Summary**: Calculates the center of gravity (cog) and the volume of the given object. Depending on the input parameter the calculations were made on a single solid, a part, a subassembly, the whole model, ... E.g. the center of gravity of a root assembly, will be the sum of all solid's center of gravity over the whole assembly structure. If a solid is given, the center of gravity will be local to its part.\n\n**Parameters**:\n- `param`: object containing the parameters\n- Described in the notes below: `id`\n\n---\n\n# Detailed notes\n\n# part.calculateMassProperties\n\nCalculates center of gravity (COG) and volume of a part, assembly, instance, or single solid. On a part/assembly, sums all contained solids and returns the volume-weighted COG.\n\n## Key Parameters\n\n- **`id`** — accepted types: `part/assembly`, `instance`, `solid`\n  - **Part ID** → all solids in the part, COG in part-local coordinates\n  - **Assembly ID** → all instances across the assembly tree, COG in assembly coordinates\n  - **Instance ID** → that instance, COG in assembly coordinates (includes instance transformation)\n  - **Solid ID** (from `solid.box`, `solid.sphere`, …) → single solid, COG in part-local coordinates\n  - **NOT accepted:** feature IDs (`part.box`, `part.extrusion`, …), sketch IDs, work geometry IDs, entity injection feature IDs → error 1001\n\n## Return Value\n\n```js\n{ result: { cog: { x, y, z }, volume: number } | null, messages: [], maxLevel: 31 }\n```\n\n- **`cog`** — `{ x, y, z }` **object**, NOT an `[x, y, z]` array (despite docs saying \"point\"). Use `result.cog.x`, not `result.cog[0]`.\n- **`volume`** — mm³\n- On error: `result: null`, `maxLevel: 51`\n\n## Volume Accuracy\n\n- **Box:** exact (72000 for 60×40×30)\n- **Curved solids:** ~0.01–0.02% B-rep integration error\n  - Sphere r=25: 65458.95 vs analytical 65449.85 (0.014%)\n  - Cylinder d=30 h=50: 35342.21 vs 35342.92 (0.002%)\n  - Truncated cone: ~0.002%\n\n## COG Behavior\n\n- Single symmetric solid: geometric center\n- Multiple solids / assembly: volume-weighted average (assembly: instance COGs in assembly coordinates)\n- Reflects post-boolean and post-fillet/chamfer geometry\n\n## Gotchas\n\n- **Feature IDs don't work** — most common mistake. Pass the part ID, not the ID returned by `part.box()` etc. Error: `\"The parameter 'id' has a wrong id type! Provide only following id types: ['part/assembly','instance','solid']\"`\n- **Empty parts crash** — a part with no solid returns an internal NullMem server error, not a graceful zero volume. Ensure geometry exists first.\n- **Never measure an instance in a model you will save.** An instance ID materializes every instance of the assembly (own `geometryIdList`); after an OFB save/load the apps no longer draw them. Measure the template and the root; compute instance COGs as transform · template COG — see `assembly/calculateMassProperties`.\n- **Enclosed voids are measured correctly** — a solid with an inner void shell reports outer − void (box 100×60×40 with an enclosed 80×40×20 void: exactly 176000).\n- **Unchanged volume after a subtraction = the boolean left a sheet body**, not a measurement glitch: the call still answers with the pre-cut volume once, and the next call fails with `GetVolumeAndCOG: Division by zero!` plus a NullMem type error. See `boolean.md` → Gotchas.\n- **Cone top diameter must be > 0** — `tDiameter: 0` is rejected at creation (\"Value for top diameter must be greater than 0\"). `0.0",
              "tool": "docs"
            },
            {
              "arguments": {
                "method": "recipes/verification"
              },
              "reply": "# ═══ recipes/verification ═══\n\n# Recipe — verification (mandatory for every build)\n\nClassCAD reports success (maxLevel 31) for several operations that silently\ndid nothing or produced wrong geometry — frozen unmerged patterns, no-op\nexpression forms, dead solvers on planeless sketches. And a rendered view\nauto-scales, so a wrong size can look identical. Correctness therefore has\ntwo halves, and both need proof:\n\n- **Execution** — the model matches your plan → numeric verification (Part II).\n- **Interpretation** — your plan matches the input → perception discipline\n  (Part I). Green numbers cannot save a mirrored reading: six independent\n  runs built the same part with a C-cut facing the wrong way, each with a\n  full suite of passing probes, because every probe target was derived from\n  the same misread image.\n\n## Which regime? — the INPUT TYPE decides\n\n| Input                                                 | Regime                                                                                                                                                                                        |\n| ----------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| **Plain-text spec** (numbers in the prompt)           | Part II only — no perception phase                                                                                                                                                            |\n| **Technical drawing** (image WITH dimension callouts) | Part I in full, then Part II; the frozen record drives the probes. Build path: recipes/constrained-sketching — dimension checklist → constraints + dimensions; the solver lays out the sketch |\n| **Image/photo WITHOUT dimensions**                    | Part I in full; Part II verifies proportions, feature counts and topology instead of absolutes — state your assumed scale explicitly                                                          |\n| **Dynamic/iterative prompts** (user steers as you go) | Part II per increment; re-run the Part I questions whenever the wording implies a side, direction, or handedness                                                                              |\n\n---\n\n# Part I — perception first (any input reference)\n\nThe measured differentiator: the same model that\nmisreads a part's handedness while planning a build reads it correctly when\nasked in isolation — wrong 6/6 with a build task in context, right 9/9\nwithout one. Perception is not the bottleneck; build-task context is, and\nin-task probes then VALIDATE a misreading because every probe target\nderives from it. This phase therefore (a) converts handedness questions\ninto LOCAL alignment questions, and (b) moves the reading outside the\nbuild context wherever the host allows.\n\n## Phase 0 — the REFERENCE RECORD (before any modeling)\n\nWrite the record down (notes tool / your plan) BEFORE the first build call.\nIt is the contract the final verification tests against, and it is FROZEN:\nthe later holistic reading may add facts but may not overturn them — a\ndisagreement marks the fact LOW CONFIDENCE for the mirror check, never a\nsilent revision.\n\n1. **Inventory** — which views the reference shows (iso, front, top, …),\n   and the image resolution. Below ~800 px, fine features — especially\n   handedness — are LOW CONFIDENCE: say so in the record. For a multi-view\n   technical drawing also record the **projection method** — it decides\n   which side each view looks from, so a wrong one mirrors the part (see\n   recipes/constrained-sketching, \"Projection method\").\n2. **Callout anchors** — for every dimension callout, write what its\n   leader/arrows physically TOUCH (\"Ø30 leader enters upper-right, lands\n   on the inner arc\") and whether the leader CROSSES the part's material\n   on the way — a leader that reaches an inner feature without crossing\n   the surrounding material tells you the gap is on its approach side.\n   Callouts outrank silhouette impressions; at low resolution a silhouette\n   impression alone is inadmissible for handedness. (Photo without\n   callouts: anchor on shadows, contact lines and feature counts; verify\n   proportions rather than absolutes.)\n3. **List every side/direction/handedness fact** — every asymmetry the\n   part cannot be mirrored across, whatever the part is. ALL of them, not\n   just the ones that feel uncertain: for handedness, confidence and\n   accuracy are uncorrelated — the confident readings were the wrong ones.\n4. **Resolve by COINCIDENCE before rotation.** Hunt for alignments first:\n   flush faces, tangencies, shared centrelines, collinear silhouette\n   edges, features lining up across views. \"Is this face flush with that\n   one?\" is local and objective; \"which way does it open?\" needs the\n   mental rotation that is measurably unreliable — and one found\n   coincidence usually pins the whole orientation for free.\n5. **Remaining facts get a TWO-HYPOTHESIS test with a pre-registered\n   observable** — write BOTH mirror readings and what each PREDICTS for\n   one concrete pixel observable (material/void sequence along a line, an\n   edge count, what a leader touches); only THEN read the observable off\n   the image (magnified crop if one was supplied) and let it decide.\n   Prediction before observation: collected afterwards, the observable\n   bends to fit the favored reading.\n6. **Have fresh readers answer the open questions when the host provides\n   them** (buerli-ai: `delegate` with `agent: \"perception\", withImages:\ntrue`) — a fresh reader has no build task in context, which is the\n   measured differentiator. ONE question per reader, several readers\n   fanned out in parallel in the same response (one question per reader →\n   6/6 correct; seven questions in one reader → handedness wrong).\n   Readers answer what is VISIBLE, nothing else: what a dimension MEANS,\n   what is hidden, how deep a bore goes are USER questions — asked anyway,\n   a reader fabricates confident detail. Reader disagrees with you ⇒ LOW\n   CONFIDENCE, record it.\n7. **Write the verdicts + evidence into the record**, then freeze it.\n\nBounds on the whole phase:\n\n- The supplied image(s) ARE the evidence base. Do not manufacture crop\n  batteries — self-cropping runs took 25–50 min against ~12 for plain\n  reads, with no accuracy gain.\n- **Mechanical plausibility is a PRIOR, not evidence** — it describes\n  typical parts, not this part (real parts DO have ribs meeting curved\n  walls and cuts opening off the plate). Tie-breaker when every image\n  channel is silent; never an override of a callout reading.\n- **\"Symmetric about a plane\" exempts nothing** — symmetry about one\n  plane says nothing about asymmetries along the other axes, and the\n  feature at risk is usually on one of those.\n- **Never invent geometry to explain a reading.** A reader answer that\n  implies an otherwise unevidenced feature (a gap, a slot, a cut) is a USER\n  question, not a record fact — one misread \"ring gap\" became an invented\n  cut that every probe then validated.\n- Every dimension, axis and relation must be traceable to something you\n  can point at in THIS image. \"I recognize this part\" is recall, not\n  reading — the remembered variant differs.\n\n**Stopping rule — bounded inquiry, then ASK or DECLARE.** One\ndiscriminating observation plus the reader round is the whole budget per\nfact. Not settled ⇒ the fact is UNDECIDABLE from the input, which is a\nRESULT, not a failure:\n\n- **Interactive host: ASK the user.** Once, all open questions batched,\n  each with your best reading as the default so a one-word reply unblocks\n  you (\"I read the 70 as centre→far end; the bore looks through — confirm\n  or correct?\"). Every handedness fact goes into the batch\n  UNCONDITIONALLY — confidence does not filter the list. One batched\n  question is the fast path; the wrong part is the stall.\n- **Headle",
              "tool": "describe_method"
            }
          ],
          "task": "Find the ClassCAD API methods for creating a box and measuring mass properties, and show the documentation for both methods and the verification recipe."
        },
        "type": "noul"
      },
      "w07": {
        "criteria": {
          "false": "The tool replies show an error, a missing or different result, or nothing about the task; or only the agent's final answer claims the task was done.",
          "true": "The tool replies in `steps` show the result that `done_when` describes. The result came from the server's tools, not only from the agent's own words."
        },
        "instructions": {
          "agent_final_answer": "## Box creation: `v1.part.box`\n\nCreates a **parametric box feature** in a part’s feature tree.\n\n```js\nconst boxId = (await api.v1.part.box({\n  id: partId,\n  name: \"Box1\",\n  length: 60,\n  width: 40,\n  height: 30,\n  // references: [workCSysId],\n})).result;\n```\n\n| Parameter | Meaning |\n|---|---|\n| `id` | **Part ID**, not an entity-injection ID |\n| `name` | Feature name; defaults to `\"Box\"` |\n| `length`, `width`, `height` | X, Y and Z dimensions; each defaults to 100. Numbers and expression strings are supported. |\n| `references` | Optional array of work-coordinate-system IDs for placement. Omit it to use the drawing origin. |\n\nThe return value is a **feature ID**. By default, the box is corner-aligned: it extends from `(0, 0, 0)` to `(length, width, height)`. Dimensions must be positive. Unknown placement parameters such as `translation` are silently ignored; use a work coordinate system in `references` instead.\n\nFor comparison, `v1.solid.box` creates direct geometry in an entity injection and is centered rather than corner-aligned.\n\n## Mass properties: `v1.part.calculateMassProperties`\n\nCalculates **volume and center of gravity** for a part, assembly, instance or solid.\n\n```js\nconst response = await api.v1.part.calculateMassProperties({ id: partId });\n\nconst { volume, cog } = response.result;\n// cog.x, cog.y, cog.z\n```\n\nThe result has this form:\n\n```js\n{\n  result: {\n    cog: { x, y, z },\n    volume: number\n  },\n  messages: [],\n  maxLevel: 31\n}\n```\n\n- `volume` is in **mm³**; `cog` is an object, not an array.\n- For a part or solid, the COG is in part-local coordinates. For an assembly or instance, it is in assembly coordinates.\n- A **feature ID is not accepted**. For a box created with `part.box`, pass the part ID—not `boxId`.\n- Do not measure an empty part; the documentation warns that it can cause an internal error.\n- The method reports volume and COG, not mass in a specified unit. For a uniform material, mass can be calculated from volume and density using consistent",
          "done_when": "Tool replies identify the relevant box and mass-properties methods and provide their documentation along with the verification recipe.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {
                "search": [
                  "box",
                  "mass properties"
                ]
              },
              "reply": "{\"count\":7,\"groups\":[{\"search\":\"box\",\"count\":5,\"methods\":[{\"method\":\"v1.part.box\",\"summary\":\"Creates or updates a box feature.\"},{\"method\":\"v1.solid.box\",\"summary\":\"Creates a box\"},{\"method\":\"v1.part.updateBox\",\"summary\":\"Updates a box feature.\"},{\"method\":\"v1.drawing2d.centerView\",\"summary\":\"This method centers all given views to origin, depending on each view's boundary box.\"},{\"method\":\"v1.drawing2d.getBoundaryBoxFromView\",\"summary\":\"This method returns min and max point for each given view.\"}]},{\"search\":\"mass properties\",\"count\":2,\"methods\":[{\"method\":\"v1.part.calculateMassProperties\",\"summary\":\"Calculates the center of gravity (cog) and the volume of the given object.\"},{\"method\":\"v1.assembly.calculateMassProperties\",\"summary\":\"Calculates the center of gravity (cog) and the volume of the given object.\"}]}],\"note\":\"One group per search entry, each ranked on its own (BM25 over name + summary, CAD synonyms expanded), top 8 per group. `seeAbove` = already listed under that entry. Use describeMethod for exact params.\",\"docs\":[{\"key\":\"recipes/verification\",\"title\":\"Recipe — verification (mandatory for every build)\",\"chars\":17143,\"pages\":1,\"headings\":[\"Tier 2 — bounds / bounding box (position/extent claims)\",\"Tier 1 — mass properties (cheap, catches most wrongness)\"]},{\"key\":\"recipes/assembly-parameters\",\"title\":\"Shared parameters across the parts of an assembly\",\"chars\":7370,\"pages\":1,\"headings\":[]},{\"key\":\"recipes/clean-construction\",\"title\":\"Clean construction — one template per shape, one feature per operation (parts and assembly models without clutter, duplication or feature creep)\",\"chars\":23620,\"pages\":1,\"headings\":[]},{\"key\":\"recipes/direct-modeling-eif\",\"title\":\"Direct modeling with solid.\\\\* inside an Entity Injection Feature (EIF)\",\"chars\":4847,\"pages\":1,\"headings\":[]},{\"key\":\"assembly/generic\",\"title\":\"Assembly: Template vs Instance Paradigm\",\"chars\":6333,\"pages\":1,\"headings\":[]},{\"key\":\"common/generic\",\"title\":\"Protocol Envelope\",\"chars\":11732,\"pages\":1,\"headings\":[]}],\"docsNote\":\"Workflow documents matching the search — fetch with docs([...keys]).\"}",
              "tool": "list_methods"
            },
            {
              "arguments": {
                "keys": [
                  "recipes/verification",
                  "v1.part.box",
                  "v1.part.calculateMassProperties"
                ]
              },
              "reply": "# ═══ recipes/verification ═══\n\n# Recipe — verification (mandatory for every build)\n\nClassCAD reports success (maxLevel 31) for several operations that silently\ndid nothing or produced wrong geometry — frozen unmerged patterns, no-op\nexpression forms, dead solvers on planeless sketches. And a rendered view\nauto-scales, so a wrong size can look identical. Correctness therefore has\ntwo halves, and both need proof:\n\n- **Execution** — the model matches your plan → numeric verification (Part II).\n- **Interpretation** — your plan matches the input → perception discipline\n  (Part I). Green numbers cannot save a mirrored reading: six independent\n  runs built the same part with a C-cut facing the wrong way, each with a\n  full suite of passing probes, because every probe target was derived from\n  the same misread image.\n\n## Which regime? — the INPUT TYPE decides\n\n| Input                                                 | Regime                                                                                                                                                                                        |\n| ----------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| **Plain-text spec** (numbers in the prompt)           | Part II only — no perception phase                                                                                                                                                            |\n| **Technical drawing** (image WITH dimension callouts) | Part I in full, then Part II; the frozen record drives the probes. Build path: recipes/constrained-sketching — dimension checklist → constraints + dimensions; the solver lays out the sketch |\n| **Image/photo WITHOUT dimensions**                    | Part I in full; Part II verifies proportions, feature counts and topology instead of absolutes — state your assumed scale explicitly                                                          |\n| **Dynamic/iterative prompts** (user steers as you go) | Part II per increment; re-run the Part I questions whenever the wording implies a side, direction, or handedness                                                                              |\n\n---\n\n# Part I — perception first (any input reference)\n\nThe measured differentiator: the same model that\nmisreads a part's handedness while planning a build reads it correctly when\nasked in isolation — wrong 6/6 with a build task in context, right 9/9\nwithout one. Perception is not the bottleneck; build-task context is, and\nin-task probes then VALIDATE a misreading because every probe target\nderives from it. This phase therefore (a) converts handedness questions\ninto LOCAL alignment questions, and (b) moves the reading outside the\nbuild context wherever the host allows.\n\n## Phase 0 — the REFERENCE RECORD (before any modeling)\n\nWrite the record down (notes tool / your plan) BEFORE the first build call.\nIt is the contract the final verification tests against, and it is FROZEN:\nthe later holistic reading may add facts but may not overturn them — a\ndisagreement marks the fact LOW CONFIDENCE for the mirror check, never a\nsilent revision.\n\n1. **Inventory** — which views the reference shows (iso, front, top, …),\n   and the image resolution. Below ~800 px, fine features — especially\n   handedness — are LOW CONFIDENCE: say so in the record. For a multi-view\n   technical drawing also record the **projection method** — it decides\n   which side each view looks from, so a wrong one mirrors the part (see\n   recipes/constrained-sketching, \"Projection method\").\n2. **Callout anchors** — for every dimension callout, write what its\n   leader/arrows physically TOUCH (\"Ø30 leader enters upper-right, lands\n   on the inner arc\") and whether the leader CROSSES the part's material\n   on the way — a leader that reaches an inner feature without crossing\n   the surrounding material tells you the gap is on its approach side.\n   Callouts outrank silhouette impressions; at low resolution a silhouette\n   impression alone is inadmissible for handedness. (Photo without\n   callouts: anchor on shadows, contact lines and feature counts; verify\n   proportions rather than absolutes.)\n3. **List every side/direction/handedness fact** — every asymmetry the\n   part cannot be mirrored across, whatever the part is. ALL of them, not\n   just the ones that feel uncertain: for handedness, confidence and\n   accuracy are uncorrelated — the confident readings were the wrong ones.\n4. **Resolve by COINCIDENCE before rotation.** Hunt for alignments first:\n   flush faces, tangencies, shared centrelines, collinear silhouette\n   edges, features lining up across views. \"Is this face flush with that\n   one?\" is local and objective; \"which way does it open?\" needs the\n   mental rotation that is measurably unreliable — and one found\n   coincidence usually pins the whole orientation for free.\n5. **Remaining facts get a TWO-HYPOTHESIS test with a pre-registered\n   observable** — write BOTH mirror readings and what each PREDICTS for\n   one concrete pixel observable (material/void sequence along a line, an\n   edge count, what a leader touches); only THEN read the observable off\n   the image (magnified crop if one was supplied) and let it decide.\n   Prediction before observation: collected afterwards, the observable\n   bends to fit the favored reading.\n6. **Have fresh readers answer the open questions when the host provides\n   them** (buerli-ai: `delegate` with `agent: \"perception\", withImages:\ntrue`) — a fresh reader has no build task in context, which is the\n   measured differentiator. ONE question per reader, several readers\n   fanned out in parallel in the same response (one question per reader →\n   6/6 correct; seven questions in one reader → handedness wrong).\n   Readers answer what is VISIBLE, nothing else: what a dimension MEANS,\n   what is hidden, how deep a bore goes are USER questions — asked anyway,\n   a reader fabricates confident detail. Reader disagrees with you ⇒ LOW\n   CONFIDENCE, record it.\n7. **Write the verdicts + evidence into the record**, then freeze it.\n\nBounds on the whole phase:\n\n- The supplied image(s) ARE the evidence base. Do not manufacture crop\n  batteries — self-cropping runs took 25–50 min against ~12 for plain\n  reads, with no accuracy gain.\n- **Mechanical plausibility is a PRIOR, not evidence** — it describes\n  typical parts, not this part (real parts DO have ribs meeting curved\n  walls and cuts opening off the plate). Tie-breaker when every image\n  channel is silent; never an override of a callout reading.\n- **\"Symmetric about a plane\" exempts nothing** — symmetry about one\n  plane says nothing about asymmetries along the other axes, and the\n  feature at risk is usually on one of those.\n- **Never invent geometry to explain a reading.** A reader answer that\n  implies an otherwise unevidenced feature (a gap, a slot, a cut) is a USER\n  question, not a record fact — one misread \"ring gap\" became an invented\n  cut that every probe then validated.\n- Every dimension, axis and relation must be traceable to something you\n  can point at in THIS image. \"I recognize this part\" is recall, not\n  reading — the remembered variant differs.\n\n**Stopping rule — bounded inquiry, then ASK or DECLARE.** One\ndiscriminating observation plus the reader round is the whole budget per\nfact. Not settled ⇒ the fact is UNDECIDABLE from the input, which is a\nRESULT, not a failure:\n\n- **Interactive host: ASK the user.** Once, all open questions batched,\n  each with your best reading as the default so a one-word reply unblocks\n  you (\"I read the 70 as centre→far end; the bore looks through — confirm\n  or correct?\"). Every handedness fact goes into the batch\n  UNCONDITIONALLY — confidence does not filter the list. One batched\n  question is the fast path; the wrong part is the stall.\n- **Headle",
              "tool": "docs"
            },
            {
              "arguments": {
                "keys": [
                  "v1.part.box",
                  "v1.part.calculateMassProperties"
                ]
              },
              "reply": "# ═══ v1.part.box ═══\n\n# v1.part.box\n\n**Summary**: Creates or updates a box feature. If optional parameters are not set, the default values will be used, see (default=xy).\n\n**Parameters**:\n- `param`: object containing the parameters\n- Described in the notes below: `id`, `name`, `references`, `length`, `width`, `height`\n\n---\n\n# Detailed notes\n\n# part.box\n\nParametric box feature in a part's feature tree (unlike `solid.box`, direct geometry in an entity injection). Supports `updateBox`, expression-driven dimensions, and workCSys placement via `references`.\n\n## Key Parameters\n\n- `id` — **part ID** (not entity injection ID — that's `solid.box`)\n- `name` — feature name (default: \"Box\")\n- `length`, `width`, `height` — X, Y, Z dimensions. Default 100 each. Numbers or expression strings: `'@expr.W'`, inline math `'3*25'`, `'sqrt(100)'`. With `@expr.` references, `part.updateExpression` updates the box at once (no recalc).\n- `references` — array of **workCSys IDs only**; box placed at the csys origin. Empty/omitted = drawing origin\n\n## Return Value\n\nFeature ID (numeric), maxLevel 31. Pass it to `updateBox`, `openFeature`, `closeFeature`, etc.\n\n## Alignment\n\n**Corner-aligned at the origin**: extends from `(0,0,0)` to `(+length, +width, +height)`, COG at `(L/2, W/2, H/2)`. Measured with 100×80×60: vertex 0 at `(0,0,0)`, COG `(50,40,30)`.\n\n**Differs from `solid.box`**, which is centered (corners at `±L/2, ±W/2, ±H/2`). When mixing both families in one part, translate one to overlay them. See `feature-vs-direct.md`.\n\n## Gotchas\n\n- **Unknown parameters are SILENTLY IGNORED**: `xPosition`/`zPosition`/`translation` do not exist — box lands at the origin with no warning. Position only via `references: [workCSysId]`.\n- **`references` only accepts `workcsys` IDs** (\"reference of the work coordinate system\" means literally a workCSys). Work plane/axis/point ID → error 1001.\n- **Zero/negative dimensions create degenerate features**: returns a feature ID with maxLevel 51 and error 1122; the feature exists but has no valid geometry. Validate dims > 0.\n- Multiple boxes in one part are fine — each is a separate feature with its own body (renderer colors each body distinctly).\n- `updateBox({ name })` renames the feature node; the internal body child keeps the original name suffixed `_0`.\n\n## Common Errors\n\n| Code | Message | Cause |\n|------|---------|-------|\n| 1122 | \"Value for [param] must be greater than 0\" | Zero or negative dimension |\n| 1001 | \"wrong id type! Provide only following id types: ['workcsys']\" | Non-workCSys ID in `references` |\n\n## updateBox\n\nFull details: `updateBox.md`. Wrap in `openFeature`/`closeFeature` (without `openFeature`: null + errors 1200 + 1004). `id` = feature ID; returns feature ID on success, null on failure (not VOID). Omitted params keep values; multiple calls within one open/close all apply; `@expr.`/inline math supported; `references: [wcsId]` adds, `[]` removes placement; geometry regenerates on `closeFeature` (no `recalc` needed).\n\n## Working Example\n\n```js\nconst partId = (await api.v1.part.create({ name: 'MyPart' })).result\nconst wcsId = (await api.v1.part.workCSys({ id: partId, name: 'WCS1', offset: [50, 0, 0] })).result\n\nconst boxId = (await api.v1.part.box({\n  id: partId, name: 'Box1', references: [wcsId],\n  length: 60, width: 40, height: 30,\n})).result\nawait api.v1.part.box({ id: partId, length: '3*25', height: 'sqrt(2500)' }) // inline math\n\nawait api.v1.part.openFeature({ id: boxId })\nawait api.v1.part.updateBox({ id: boxId, height: 80 })\nawait api.v1.part.closeFeature({ id: boxId })\n```\n\n## part.box vs solid.box\n\n| | `part.box` | `solid.box` |\n|---|---|---|\n| Container | Part (feature tree) | Entity injection |\n| `id` param | Part ID | Entity injection ID |\n| ID type returned | feature | solid |\n| Update API | `updateBox` (via open/close) | None (use `solid.translation`/`rotation`/`scale`) |\n| Positioning | `references` (workCSys) | `translation`, `rotation`, `rotateFirst` |\n| Expressions | `@expr.` syntax in dims | ❌ strictly `real` only |\n| Boolean system | `part.boolean` (feature IDs only) | `solid.*` booleans (solid IDs only) |\n| Mass properties | Via part ID (feature ID rejected) | Via solid ID or part ID |\n| Feature tree | Yes — full parametric history | No — flat inside EIF |\n| Cross-paradigm | Cannot mix in booleans | Cannot mix in booleans |\n\nSee `feature-vs-direct.md` for a full comparison.\n\n## Related\n\n`part.updateBox` · `part.openFeature` / `part.closeFeature` · `part.workCSys` · `solid.box`\n\n\n# ═══ v1.part.calculateMassProperties ═══\n\n# v1.part.calculateMassProperties\n\n**Summary**: Calculates the center of gravity (cog) and the volume of the given object. Depending on the input parameter the calculations were made on a single solid, a part, a subassembly, the whole model, ... E.g. the center of gravity of a root assembly, will be the sum of all solid's center of gravity over the whole assembly structure. If a solid is given, the center of gravity will be local to its part.\n\n**Parameters**:\n- `param`: object containing the parameters\n- Described in the notes below: `id`\n\n---\n\n# Detailed notes\n\n# part.calculateMassProperties\n\nCalculates center of gravity (COG) and volume of a part, assembly, instance, or single solid. On a part/assembly, sums all contained solids and returns the volume-weighted COG.\n\n## Key Parameters\n\n- **`id`** — accepted types: `part/assembly`, `instance`, `solid`\n  - **Part ID** → all solids in the part, COG in part-local coordinates\n  - **Assembly ID** → all instances across the assembly tree, COG in assembly coordinates\n  - **Instance ID** → that instance, COG in assembly coordinates (includes instance transformation)\n  - **Solid ID** (from `solid.box`, `solid.sphere`, …) → single solid, COG in part-local coordinates\n  - **NOT accepted:** feature IDs (`part.box`, `part.extrusion`, …), sketch IDs, work geometry IDs, entity injection feature IDs → error 1001\n\n## Return Value\n\n```js\n{ result: { cog: { x, y, z }, volume: number } | null, messages: [], maxLevel: 31 }\n```\n\n- **`cog`** — `{ x, y, z }` **object**, NOT an `[x, y, z]` array (despite docs saying \"point\"). Use `result.cog.x`, not `result.cog[0]`.\n- **`volume`** — mm³\n- On error: `result: null`, `maxLevel: 51`\n\n## Volume Accuracy\n\n- **Box:** exact (72000 for 60×40×30)\n- **Curved solids:** ~0.01–0.02% B-rep integration error\n  - Sphere r=25: 65458.95 vs analytical 65449.85 (0.014%)\n  - Cylinder d=30 h=50: 35342.21 vs 35342.92 (0.002%)\n  - Truncated cone: ~0.002%\n\n## COG Behavior\n\n- Single symmetric solid: geometric center\n- Multiple solids / assembly: volume-weighted average (assembly: instance COGs in assembly coordinates)\n- Reflects post-boolean and post-fillet/chamfer geometry\n\n## Gotchas\n\n- **Feature IDs don't work** — most common mistake. Pass the part ID, not the ID returned by `part.box()` etc. Error: `\"The parameter 'id' has a wrong id type! Provide only following id types: ['part/assembly','instance','solid']\"`\n- **Empty parts crash** — a part with no solid returns an internal NullMem server error, not a graceful zero volume. Ensure geometry exists first.\n- **Never measure an instance in a model you will save.** An instance ID materializes every instance of the assembly (own `geometryIdList`); after an OFB save/load the apps no longer draw them. Measure the template and the root; compute instance COGs as transform · template COG — see `assembly/calculateMassProperties`.\n- **Enclosed voids are measured correctly** — a solid with an inner void shell reports outer − void (box 100×60×40 with an enclosed 80×40×20 void: exactly 176000).\n- **Unchanged volume after a subtraction = the boolean left a sheet body**, not a measurement glitch: the call still answers with the pre-cut volume once, and the next call fails with `GetVolumeAndCOG: Division by zero!` plus a NullMem type error. See `boolean.md` → Gotchas.\n- **Cone top diameter must be > 0** — `tDiameter: 0` is rejected at creation (\"Value for top diameter must be greater than 0\"). `0.0",
              "tool": "docs"
            }
          ],
          "task": "Find the ClassCAD API methods for creating a box and measuring mass properties, and show the documentation for both methods and the verification recipe."
        },
        "type": "noul"
      },
      "w08": {
        "criteria": {
          "false": "The tool replies show an error, a missing or different result, or nothing about the task; or only the agent's final answer claims the task was done.",
          "true": "The tool replies in `steps` show the result that `done_when` describes. The result came from the server's tools, not only from the agent's own words."
        },
        "instructions": {
          "agent_final_answer": "## Creating a box: `v1.part.box`\n\nCreates a **parametric box feature** in a part’s feature tree.\n\n| Parameter | Meaning |\n|---|---|\n| `id` | Part ID |\n| `name` | Feature name; defaults to `\"Box\"` |\n| `length`, `width`, `height` | X, Y and Z dimensions; each defaults to 100. Accept numbers or expression strings. |\n| `references` | Optional array of work-coordinate-system IDs. If omitted, the box is placed at the drawing origin. |\n\nThe method returns a numeric **feature ID**. The box is corner-aligned: without a placement reference, it extends from `(0, 0, 0)` to `(length, width, height)`. Dimensions must be positive.\n\nThis differs from `v1.solid.box`, which creates centered direct geometry rather than a parametric part feature.\n\n## Measuring properties: `v1.part.calculateMassProperties`\n\nCalculates **volume and center of gravity** for a part, assembly, instance or solid:\n\n```js\napi.v1.part.calculateMassProperties({ id })\n```\n\nThe `id` can identify a part, assembly, instance or solid—but **not a feature**. In particular, pass the part ID, not the feature ID returned by `part.box`.\n\nThe documented result has this shape:\n\n```js\n{\n  result: {\n    cog: { x, y, z },\n    volume: 72000\n  },\n  messages: [],\n  maxLevel: 31\n}\n```\n\nVolume is in mm³. The COG is part-local for a part or solid, and in assembly coordinates for an assembly or instance. For multiple solids, it is volume-weighted. The method reports volume and COG, not density-derived mass.\n\n### Example\n\n```js\nconst partId = (await api.v1.part.create({ name: \"MyPart\" })).result;\n\nconst boxId = (await api.v1.part.box({\n  id: partId,\n  name: \"Box1\",\n  length: 60,\n  width: 40,\n  height: 30\n})).result;\n\n// Measure the part, not boxId.\nconst properties =\n  (await api.v1.part.calculateMassProperties({ id: partId })).result;\n\n// Expected: volume 72000 mm³; cog { x: 30, y: 20, z: 15 }.\n```\n\n## Verification recipe: `recipes/verification`\n\nThe recipe is **mandatory for every build**. Its central warning is that a successful API ",
          "done_when": "Tool replies identify the relevant box and mass-properties methods and provide their documentation along with the verification recipe.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {
                "search": [
                  "box",
                  "mass properties"
                ]
              },
              "reply": "{\"count\":7,\"groups\":[{\"search\":\"box\",\"count\":5,\"methods\":[{\"method\":\"v1.part.box\",\"summary\":\"Creates or updates a box feature.\"},{\"method\":\"v1.solid.box\",\"summary\":\"Creates a box\"},{\"method\":\"v1.part.updateBox\",\"summary\":\"Updates a box feature.\"},{\"method\":\"v1.drawing2d.centerView\",\"summary\":\"This method centers all given views to origin, depending on each view's boundary box.\"},{\"method\":\"v1.drawing2d.getBoundaryBoxFromView\",\"summary\":\"This method returns min and max point for each given view.\"}]},{\"search\":\"mass properties\",\"count\":2,\"methods\":[{\"method\":\"v1.part.calculateMassProperties\",\"summary\":\"Calculates the center of gravity (cog) and the volume of the given object.\"},{\"method\":\"v1.assembly.calculateMassProperties\",\"summary\":\"Calculates the center of gravity (cog) and the volume of the given object.\"}]}],\"note\":\"One group per search entry, each ranked on its own (BM25 over name + summary, CAD synonyms expanded), top 8 per group. `seeAbove` = already listed under that entry. Use describeMethod for exact params.\",\"docs\":[{\"key\":\"recipes/verification\",\"title\":\"Recipe — verification (mandatory for every build)\",\"chars\":17143,\"pages\":1,\"headings\":[\"Tier 2 — bounds / bounding box (position/extent claims)\",\"Tier 1 — mass properties (cheap, catches most wrongness)\"]},{\"key\":\"recipes/assembly-parameters\",\"title\":\"Shared parameters across the parts of an assembly\",\"chars\":7370,\"pages\":1,\"headings\":[]},{\"key\":\"recipes/clean-construction\",\"title\":\"Clean construction — one template per shape, one feature per operation (parts and assembly models without clutter, duplication or feature creep)\",\"chars\":23620,\"pages\":1,\"headings\":[]},{\"key\":\"recipes/direct-modeling-eif\",\"title\":\"Direct modeling with solid.\\\\* inside an Entity Injection Feature (EIF)\",\"chars\":4847,\"pages\":1,\"headings\":[]},{\"key\":\"assembly/generic\",\"title\":\"Assembly: Template vs Instance Paradigm\",\"chars\":6333,\"pages\":1,\"headings\":[]},{\"key\":\"common/generic\",\"title\":\"Protocol Envelope\",\"chars\":11732,\"pages\":1,\"headings\":[]}],\"docsNote\":\"Workflow documents matching the search — fetch with docs([...keys]).\"}",
              "tool": "list_methods"
            },
            {
              "arguments": {
                "keys": [
                  "recipes/verification",
                  "v1.part.box",
                  "v1.part.calculateMassProperties"
                ]
              },
              "reply": "# ═══ recipes/verification ═══\n\n# Recipe — verification (mandatory for every build)\n\nClassCAD reports success (maxLevel 31) for several operations that silently\ndid nothing or produced wrong geometry — frozen unmerged patterns, no-op\nexpression forms, dead solvers on planeless sketches. And a rendered view\nauto-scales, so a wrong size can look identical. Correctness therefore has\ntwo halves, and both need proof:\n\n- **Execution** — the model matches your plan → numeric verification (Part II).\n- **Interpretation** — your plan matches the input → perception discipline\n  (Part I). Green numbers cannot save a mirrored reading: six independent\n  runs built the same part with a C-cut facing the wrong way, each with a\n  full suite of passing probes, because every probe target was derived from\n  the same misread image.\n\n## Which regime? — the INPUT TYPE decides\n\n| Input                                                 | Regime                                                                                                                                                                                        |\n| ----------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| **Plain-text spec** (numbers in the prompt)           | Part II only — no perception phase                                                                                                                                                            |\n| **Technical drawing** (image WITH dimension callouts) | Part I in full, then Part II; the frozen record drives the probes. Build path: recipes/constrained-sketching — dimension checklist → constraints + dimensions; the solver lays out the sketch |\n| **Image/photo WITHOUT dimensions**                    | Part I in full; Part II verifies proportions, feature counts and topology instead of absolutes — state your assumed scale explicitly                                                          |\n| **Dynamic/iterative prompts** (user steers as you go) | Part II per increment; re-run the Part I questions whenever the wording implies a side, direction, or handedness                                                                              |\n\n---\n\n# Part I — perception first (any input reference)\n\nThe measured differentiator: the same model that\nmisreads a part's handedness while planning a build reads it correctly when\nasked in isolation — wrong 6/6 with a build task in context, right 9/9\nwithout one. Perception is not the bottleneck; build-task context is, and\nin-task probes then VALIDATE a misreading because every probe target\nderives from it. This phase therefore (a) converts handedness questions\ninto LOCAL alignment questions, and (b) moves the reading outside the\nbuild context wherever the host allows.\n\n## Phase 0 — the REFERENCE RECORD (before any modeling)\n\nWrite the record down (notes tool / your plan) BEFORE the first build call.\nIt is the contract the final verification tests against, and it is FROZEN:\nthe later holistic reading may add facts but may not overturn them — a\ndisagreement marks the fact LOW CONFIDENCE for the mirror check, never a\nsilent revision.\n\n1. **Inventory** — which views the reference shows (iso, front, top, …),\n   and the image resolution. Below ~800 px, fine features — especially\n   handedness — are LOW CONFIDENCE: say so in the record. For a multi-view\n   technical drawing also record the **projection method** — it decides\n   which side each view looks from, so a wrong one mirrors the part (see\n   recipes/constrained-sketching, \"Projection method\").\n2. **Callout anchors** — for every dimension callout, write what its\n   leader/arrows physically TOUCH (\"Ø30 leader enters upper-right, lands\n   on the inner arc\") and whether the leader CROSSES the part's material\n   on the way — a leader that reaches an inner feature without crossing\n   the surrounding material tells you the gap is on its approach side.\n   Callouts outrank silhouette impressions; at low resolution a silhouette\n   impression alone is inadmissible for handedness. (Photo without\n   callouts: anchor on shadows, contact lines and feature counts; verify\n   proportions rather than absolutes.)\n3. **List every side/direction/handedness fact** — every asymmetry the\n   part cannot be mirrored across, whatever the part is. ALL of them, not\n   just the ones that feel uncertain: for handedness, confidence and\n   accuracy are uncorrelated — the confident readings were the wrong ones.\n4. **Resolve by COINCIDENCE before rotation.** Hunt for alignments first:\n   flush faces, tangencies, shared centrelines, collinear silhouette\n   edges, features lining up across views. \"Is this face flush with that\n   one?\" is local and objective; \"which way does it open?\" needs the\n   mental rotation that is measurably unreliable — and one found\n   coincidence usually pins the whole orientation for free.\n5. **Remaining facts get a TWO-HYPOTHESIS test with a pre-registered\n   observable** — write BOTH mirror readings and what each PREDICTS for\n   one concrete pixel observable (material/void sequence along a line, an\n   edge count, what a leader touches); only THEN read the observable off\n   the image (magnified crop if one was supplied) and let it decide.\n   Prediction before observation: collected afterwards, the observable\n   bends to fit the favored reading.\n6. **Have fresh readers answer the open questions when the host provides\n   them** (buerli-ai: `delegate` with `agent: \"perception\", withImages:\ntrue`) — a fresh reader has no build task in context, which is the\n   measured differentiator. ONE question per reader, several readers\n   fanned out in parallel in the same response (one question per reader →\n   6/6 correct; seven questions in one reader → handedness wrong).\n   Readers answer what is VISIBLE, nothing else: what a dimension MEANS,\n   what is hidden, how deep a bore goes are USER questions — asked anyway,\n   a reader fabricates confident detail. Reader disagrees with you ⇒ LOW\n   CONFIDENCE, record it.\n7. **Write the verdicts + evidence into the record**, then freeze it.\n\nBounds on the whole phase:\n\n- The supplied image(s) ARE the evidence base. Do not manufacture crop\n  batteries — self-cropping runs took 25–50 min against ~12 for plain\n  reads, with no accuracy gain.\n- **Mechanical plausibility is a PRIOR, not evidence** — it describes\n  typical parts, not this part (real parts DO have ribs meeting curved\n  walls and cuts opening off the plate). Tie-breaker when every image\n  channel is silent; never an override of a callout reading.\n- **\"Symmetric about a plane\" exempts nothing** — symmetry about one\n  plane says nothing about asymmetries along the other axes, and the\n  feature at risk is usually on one of those.\n- **Never invent geometry to explain a reading.** A reader answer that\n  implies an otherwise unevidenced feature (a gap, a slot, a cut) is a USER\n  question, not a record fact — one misread \"ring gap\" became an invented\n  cut that every probe then validated.\n- Every dimension, axis and relation must be traceable to something you\n  can point at in THIS image. \"I recognize this part\" is recall, not\n  reading — the remembered variant differs.\n\n**Stopping rule — bounded inquiry, then ASK or DECLARE.** One\ndiscriminating observation plus the reader round is the whole budget per\nfact. Not settled ⇒ the fact is UNDECIDABLE from the input, which is a\nRESULT, not a failure:\n\n- **Interactive host: ASK the user.** Once, all open questions batched,\n  each with your best reading as the default so a one-word reply unblocks\n  you (\"I read the 70 as centre→far end; the bore looks through — confirm\n  or correct?\"). Every handedness fact goes into the batch\n  UNCONDITIONALLY — confidence does not filter the list. One batched\n  question is the fast path; the wrong part is the stall.\n- **Headle",
              "tool": "docs"
            },
            {
              "arguments": {
                "keys": [
                  "v1.part.box",
                  "v1.part.calculateMassProperties"
                ]
              },
              "reply": "# ═══ v1.part.box ═══\n\n# v1.part.box\n\n**Summary**: Creates or updates a box feature. If optional parameters are not set, the default values will be used, see (default=xy).\n\n**Parameters**:\n- `param`: object containing the parameters\n- Described in the notes below: `id`, `name`, `references`, `length`, `width`, `height`\n\n---\n\n# Detailed notes\n\n# part.box\n\nParametric box feature in a part's feature tree (unlike `solid.box`, direct geometry in an entity injection). Supports `updateBox`, expression-driven dimensions, and workCSys placement via `references`.\n\n## Key Parameters\n\n- `id` — **part ID** (not entity injection ID — that's `solid.box`)\n- `name` — feature name (default: \"Box\")\n- `length`, `width`, `height` — X, Y, Z dimensions. Default 100 each. Numbers or expression strings: `'@expr.W'`, inline math `'3*25'`, `'sqrt(100)'`. With `@expr.` references, `part.updateExpression` updates the box at once (no recalc).\n- `references` — array of **workCSys IDs only**; box placed at the csys origin. Empty/omitted = drawing origin\n\n## Return Value\n\nFeature ID (numeric), maxLevel 31. Pass it to `updateBox`, `openFeature`, `closeFeature`, etc.\n\n## Alignment\n\n**Corner-aligned at the origin**: extends from `(0,0,0)` to `(+length, +width, +height)`, COG at `(L/2, W/2, H/2)`. Measured with 100×80×60: vertex 0 at `(0,0,0)`, COG `(50,40,30)`.\n\n**Differs from `solid.box`**, which is centered (corners at `±L/2, ±W/2, ±H/2`). When mixing both families in one part, translate one to overlay them. See `feature-vs-direct.md`.\n\n## Gotchas\n\n- **Unknown parameters are SILENTLY IGNORED**: `xPosition`/`zPosition`/`translation` do not exist — box lands at the origin with no warning. Position only via `references: [workCSysId]`.\n- **`references` only accepts `workcsys` IDs** (\"reference of the work coordinate system\" means literally a workCSys). Work plane/axis/point ID → error 1001.\n- **Zero/negative dimensions create degenerate features**: returns a feature ID with maxLevel 51 and error 1122; the feature exists but has no valid geometry. Validate dims > 0.\n- Multiple boxes in one part are fine — each is a separate feature with its own body (renderer colors each body distinctly).\n- `updateBox({ name })` renames the feature node; the internal body child keeps the original name suffixed `_0`.\n\n## Common Errors\n\n| Code | Message | Cause |\n|------|---------|-------|\n| 1122 | \"Value for [param] must be greater than 0\" | Zero or negative dimension |\n| 1001 | \"wrong id type! Provide only following id types: ['workcsys']\" | Non-workCSys ID in `references` |\n\n## updateBox\n\nFull details: `updateBox.md`. Wrap in `openFeature`/`closeFeature` (without `openFeature`: null + errors 1200 + 1004). `id` = feature ID; returns feature ID on success, null on failure (not VOID). Omitted params keep values; multiple calls within one open/close all apply; `@expr.`/inline math supported; `references: [wcsId]` adds, `[]` removes placement; geometry regenerates on `closeFeature` (no `recalc` needed).\n\n## Working Example\n\n```js\nconst partId = (await api.v1.part.create({ name: 'MyPart' })).result\nconst wcsId = (await api.v1.part.workCSys({ id: partId, name: 'WCS1', offset: [50, 0, 0] })).result\n\nconst boxId = (await api.v1.part.box({\n  id: partId, name: 'Box1', references: [wcsId],\n  length: 60, width: 40, height: 30,\n})).result\nawait api.v1.part.box({ id: partId, length: '3*25', height: 'sqrt(2500)' }) // inline math\n\nawait api.v1.part.openFeature({ id: boxId })\nawait api.v1.part.updateBox({ id: boxId, height: 80 })\nawait api.v1.part.closeFeature({ id: boxId })\n```\n\n## part.box vs solid.box\n\n| | `part.box` | `solid.box` |\n|---|---|---|\n| Container | Part (feature tree) | Entity injection |\n| `id` param | Part ID | Entity injection ID |\n| ID type returned | feature | solid |\n| Update API | `updateBox` (via open/close) | None (use `solid.translation`/`rotation`/`scale`) |\n| Positioning | `references` (workCSys) | `translation`, `rotation`, `rotateFirst` |\n| Expressions | `@expr.` syntax in dims | ❌ strictly `real` only |\n| Boolean system | `part.boolean` (feature IDs only) | `solid.*` booleans (solid IDs only) |\n| Mass properties | Via part ID (feature ID rejected) | Via solid ID or part ID |\n| Feature tree | Yes — full parametric history | No — flat inside EIF |\n| Cross-paradigm | Cannot mix in booleans | Cannot mix in booleans |\n\nSee `feature-vs-direct.md` for a full comparison.\n\n## Related\n\n`part.updateBox` · `part.openFeature` / `part.closeFeature` · `part.workCSys` · `solid.box`\n\n\n# ═══ v1.part.calculateMassProperties ═══\n\n# v1.part.calculateMassProperties\n\n**Summary**: Calculates the center of gravity (cog) and the volume of the given object. Depending on the input parameter the calculations were made on a single solid, a part, a subassembly, the whole model, ... E.g. the center of gravity of a root assembly, will be the sum of all solid's center of gravity over the whole assembly structure. If a solid is given, the center of gravity will be local to its part.\n\n**Parameters**:\n- `param`: object containing the parameters\n- Described in the notes below: `id`\n\n---\n\n# Detailed notes\n\n# part.calculateMassProperties\n\nCalculates center of gravity (COG) and volume of a part, assembly, instance, or single solid. On a part/assembly, sums all contained solids and returns the volume-weighted COG.\n\n## Key Parameters\n\n- **`id`** — accepted types: `part/assembly`, `instance`, `solid`\n  - **Part ID** → all solids in the part, COG in part-local coordinates\n  - **Assembly ID** → all instances across the assembly tree, COG in assembly coordinates\n  - **Instance ID** → that instance, COG in assembly coordinates (includes instance transformation)\n  - **Solid ID** (from `solid.box`, `solid.sphere`, …) → single solid, COG in part-local coordinates\n  - **NOT accepted:** feature IDs (`part.box`, `part.extrusion`, …), sketch IDs, work geometry IDs, entity injection feature IDs → error 1001\n\n## Return Value\n\n```js\n{ result: { cog: { x, y, z }, volume: number } | null, messages: [], maxLevel: 31 }\n```\n\n- **`cog`** — `{ x, y, z }` **object**, NOT an `[x, y, z]` array (despite docs saying \"point\"). Use `result.cog.x`, not `result.cog[0]`.\n- **`volume`** — mm³\n- On error: `result: null`, `maxLevel: 51`\n\n## Volume Accuracy\n\n- **Box:** exact (72000 for 60×40×30)\n- **Curved solids:** ~0.01–0.02% B-rep integration error\n  - Sphere r=25: 65458.95 vs analytical 65449.85 (0.014%)\n  - Cylinder d=30 h=50: 35342.21 vs 35342.92 (0.002%)\n  - Truncated cone: ~0.002%\n\n## COG Behavior\n\n- Single symmetric solid: geometric center\n- Multiple solids / assembly: volume-weighted average (assembly: instance COGs in assembly coordinates)\n- Reflects post-boolean and post-fillet/chamfer geometry\n\n## Gotchas\n\n- **Feature IDs don't work** — most common mistake. Pass the part ID, not the ID returned by `part.box()` etc. Error: `\"The parameter 'id' has a wrong id type! Provide only following id types: ['part/assembly','instance','solid']\"`\n- **Empty parts crash** — a part with no solid returns an internal NullMem server error, not a graceful zero volume. Ensure geometry exists first.\n- **Never measure an instance in a model you will save.** An instance ID materializes every instance of the assembly (own `geometryIdList`); after an OFB save/load the apps no longer draw them. Measure the template and the root; compute instance COGs as transform · template COG — see `assembly/calculateMassProperties`.\n- **Enclosed voids are measured correctly** — a solid with an inner void shell reports outer − void (box 100×60×40 with an enclosed 80×40×20 void: exactly 176000).\n- **Unchanged volume after a subtraction = the boolean left a sheet body**, not a measurement glitch: the call still answers with the pre-cut volume once, and the next call fails with `GetVolumeAndCOG: Division by zero!` plus a NullMem type error. See `boolean.md` → Gotchas.\n- **Cone top diameter must be > 0** — `tDiameter: 0` is rejected at creation (\"Value for top diameter must be greater than 0\"). `0.0",
              "tool": "docs"
            },
            {
              "arguments": {
                "method": "recipes/verification"
              },
              "reply": "# ═══ recipes/verification ═══\n\n# Recipe — verification (mandatory for every build)\n\nClassCAD reports success (maxLevel 31) for several operations that silently\ndid nothing or produced wrong geometry — frozen unmerged patterns, no-op\nexpression forms, dead solvers on planeless sketches. And a rendered view\nauto-scales, so a wrong size can look identical. Correctness therefore has\ntwo halves, and both need proof:\n\n- **Execution** — the model matches your plan → numeric verification (Part II).\n- **Interpretation** — your plan matches the input → perception discipline\n  (Part I). Green numbers cannot save a mirrored reading: six independent\n  runs built the same part with a C-cut facing the wrong way, each with a\n  full suite of passing probes, because every probe target was derived from\n  the same misread image.\n\n## Which regime? — the INPUT TYPE decides\n\n| Input                                                 | Regime                                                                                                                                                                                        |\n| ----------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| **Plain-text spec** (numbers in the prompt)           | Part II only — no perception phase                                                                                                                                                            |\n| **Technical drawing** (image WITH dimension callouts) | Part I in full, then Part II; the frozen record drives the probes. Build path: recipes/constrained-sketching — dimension checklist → constraints + dimensions; the solver lays out the sketch |\n| **Image/photo WITHOUT dimensions**                    | Part I in full; Part II verifies proportions, feature counts and topology instead of absolutes — state your assumed scale explicitly                                                          |\n| **Dynamic/iterative prompts** (user steers as you go) | Part II per increment; re-run the Part I questions whenever the wording implies a side, direction, or handedness                                                                              |\n\n---\n\n# Part I — perception first (any input reference)\n\nThe measured differentiator: the same model that\nmisreads a part's handedness while planning a build reads it correctly when\nasked in isolation — wrong 6/6 with a build task in context, right 9/9\nwithout one. Perception is not the bottleneck; build-task context is, and\nin-task probes then VALIDATE a misreading because every probe target\nderives from it. This phase therefore (a) converts handedness questions\ninto LOCAL alignment questions, and (b) moves the reading outside the\nbuild context wherever the host allows.\n\n## Phase 0 — the REFERENCE RECORD (before any modeling)\n\nWrite the record down (notes tool / your plan) BEFORE the first build call.\nIt is the contract the final verification tests against, and it is FROZEN:\nthe later holistic reading may add facts but may not overturn them — a\ndisagreement marks the fact LOW CONFIDENCE for the mirror check, never a\nsilent revision.\n\n1. **Inventory** — which views the reference shows (iso, front, top, …),\n   and the image resolution. Below ~800 px, fine features — especially\n   handedness — are LOW CONFIDENCE: say so in the record. For a multi-view\n   technical drawing also record the **projection method** — it decides\n   which side each view looks from, so a wrong one mirrors the part (see\n   recipes/constrained-sketching, \"Projection method\").\n2. **Callout anchors** — for every dimension callout, write what its\n   leader/arrows physically TOUCH (\"Ø30 leader enters upper-right, lands\n   on the inner arc\") and whether the leader CROSSES the part's material\n   on the way — a leader that reaches an inner feature without crossing\n   the surrounding material tells you the gap is on its approach side.\n   Callouts outrank silhouette impressions; at low resolution a silhouette\n   impression alone is inadmissible for handedness. (Photo without\n   callouts: anchor on shadows, contact lines and feature counts; verify\n   proportions rather than absolutes.)\n3. **List every side/direction/handedness fact** — every asymmetry the\n   part cannot be mirrored across, whatever the part is. ALL of them, not\n   just the ones that feel uncertain: for handedness, confidence and\n   accuracy are uncorrelated — the confident readings were the wrong ones.\n4. **Resolve by COINCIDENCE before rotation.** Hunt for alignments first:\n   flush faces, tangencies, shared centrelines, collinear silhouette\n   edges, features lining up across views. \"Is this face flush with that\n   one?\" is local and objective; \"which way does it open?\" needs the\n   mental rotation that is measurably unreliable — and one found\n   coincidence usually pins the whole orientation for free.\n5. **Remaining facts get a TWO-HYPOTHESIS test with a pre-registered\n   observable** — write BOTH mirror readings and what each PREDICTS for\n   one concrete pixel observable (material/void sequence along a line, an\n   edge count, what a leader touches); only THEN read the observable off\n   the image (magnified crop if one was supplied) and let it decide.\n   Prediction before observation: collected afterwards, the observable\n   bends to fit the favored reading.\n6. **Have fresh readers answer the open questions when the host provides\n   them** (buerli-ai: `delegate` with `agent: \"perception\", withImages:\ntrue`) — a fresh reader has no build task in context, which is the\n   measured differentiator. ONE question per reader, several readers\n   fanned out in parallel in the same response (one question per reader →\n   6/6 correct; seven questions in one reader → handedness wrong).\n   Readers answer what is VISIBLE, nothing else: what a dimension MEANS,\n   what is hidden, how deep a bore goes are USER questions — asked anyway,\n   a reader fabricates confident detail. Reader disagrees with you ⇒ LOW\n   CONFIDENCE, record it.\n7. **Write the verdicts + evidence into the record**, then freeze it.\n\nBounds on the whole phase:\n\n- The supplied image(s) ARE the evidence base. Do not manufacture crop\n  batteries — self-cropping runs took 25–50 min against ~12 for plain\n  reads, with no accuracy gain.\n- **Mechanical plausibility is a PRIOR, not evidence** — it describes\n  typical parts, not this part (real parts DO have ribs meeting curved\n  walls and cuts opening off the plate). Tie-breaker when every image\n  channel is silent; never an override of a callout reading.\n- **\"Symmetric about a plane\" exempts nothing** — symmetry about one\n  plane says nothing about asymmetries along the other axes, and the\n  feature at risk is usually on one of those.\n- **Never invent geometry to explain a reading.** A reader answer that\n  implies an otherwise unevidenced feature (a gap, a slot, a cut) is a USER\n  question, not a record fact — one misread \"ring gap\" became an invented\n  cut that every probe then validated.\n- Every dimension, axis and relation must be traceable to something you\n  can point at in THIS image. \"I recognize this part\" is recall, not\n  reading — the remembered variant differs.\n\n**Stopping rule — bounded inquiry, then ASK or DECLARE.** One\ndiscriminating observation plus the reader round is the whole budget per\nfact. Not settled ⇒ the fact is UNDECIDABLE from the input, which is a\nRESULT, not a failure:\n\n- **Interactive host: ASK the user.** Once, all open questions batched,\n  each with your best reading as the default so a one-word reply unblocks\n  you (\"I read the 70 as centre→far end; the bore looks through — confirm\n  or correct?\"). Every handedness fact goes into the batch\n  UNCONDITIONALLY — confidence does not filter the list. One batched\n  question is the fast path; the wrong part is the stall.\n- **Headle",
              "tool": "describe_method"
            }
          ],
          "task": "Find the ClassCAD API methods for creating a box and measuring mass properties, and show the documentation for both methods and the verification recipe."
        },
        "type": "noul"
      }
    },
    "state": {
      "about": "Replies of an MCP server to tool calls that were sent with bad input on purpose, to see whether its error messages help a caller fix the call."
    }
  },
  "run_id": "01M82WNVZ7S4QH1TK1EKGA3AFQ",
  "works_done": [
    {
      "attempt": 0,
      "noul": 0.01,
      "question": "w00"
    },
    {
      "attempt": 1,
      "noul": 0.01,
      "question": "w01"
    },
    {
      "attempt": 2,
      "noul": 0.01,
      "question": "w02"
    },
    {
      "attempt": 3,
      "noul": 0.01,
      "question": "w03"
    },
    {
      "attempt": 4,
      "noul": 0.01,
      "question": "w04"
    },
    {
      "attempt": 5,
      "noul": 0.01,
      "question": "w05"
    },
    {
      "attempt": 6,
      "noul": 0.93,
      "question": "w06"
    },
    {
      "attempt": 7,
      "noul": 0.85,
      "question": "w07"
    },
    {
      "attempt": 8,
      "noul": 0.91,
      "question": "w08"
    }
  ]
}
