{
  "answers": {
    "c00": {
      "noul": 0.99,
      "type": "noul"
    },
    "c01": {
      "noul": 0.79,
      "type": "noul"
    },
    "c02": {
      "noul": 0.99,
      "type": "noul"
    },
    "c03": {
      "noul": 0.99,
      "type": "noul"
    },
    "c04": {
      "noul": 0.26,
      "type": "noul"
    },
    "c05": {
      "noul": 0.98,
      "type": "noul"
    },
    "c06": {
      "noul": 0.77,
      "type": "noul"
    },
    "c07": {
      "noul": 0.98,
      "type": "noul"
    },
    "c08": {
      "noul": 0.39,
      "type": "noul"
    },
    "c09": {
      "noul": 0.99,
      "type": "noul"
    },
    "c10": {
      "noul": 0.36,
      "type": "noul"
    },
    "c11": {
      "noul": 0.93,
      "type": "noul"
    },
    "c12": {
      "noul": 0.9,
      "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.02,
      "type": "noul"
    },
    "w07": {
      "noul": 0.02,
      "type": "noul"
    },
    "w08": {
      "noul": 0.02,
      "type": "noul"
    }
  },
  "asked_at": "2026-11-23T00:25:19Z",
  "endpoint": "https://api.typesafe.ai/v1/systemone",
  "errors_helpful": [
    {
      "call": 0,
      "noul": 0.99,
      "question": "c00"
    },
    {
      "call": 1,
      "noul": 0.79,
      "question": "c01"
    },
    {
      "call": 2,
      "noul": 0.99,
      "question": "c02"
    },
    {
      "call": 3,
      "noul": 0.99,
      "question": "c03"
    },
    {
      "call": 4,
      "noul": 0.26,
      "question": "c04"
    },
    {
      "call": 5,
      "noul": 0.98,
      "question": "c05"
    },
    {
      "call": 6,
      "noul": 0.77,
      "question": "c06"
    },
    {
      "call": 7,
      "noul": 0.98,
      "question": "c07"
    },
    {
      "call": 8,
      "noul": 0.39,
      "question": "c08"
    },
    {
      "call": 9,
      "noul": 0.99,
      "question": "c09"
    },
    {
      "call": 10,
      "noul": 0.36,
      "question": "c10"
    },
    {
      "call": 11,
      "noul": 0.93,
      "question": "c11"
    },
    {
      "call": 12,
      "noul": 0.9,
      "question": "c12"
    }
  ],
  "format": "didrun.judgments.v1",
  "input_tokens": 37277,
  "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 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": "edit: `code` (string) is required.",
          "tool": "edit"
        },
        "type": "noul"
      },
      "c01": {
        "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": {
            "code": {}
          },
          "parameter": "code",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "edit: `code` (string) is required.",
          "tool": "edit"
        },
        "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": {
            "blockIds": "not an array"
          },
          "parameter": "blockIds",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "preview: `blockIds` must be an array of block ids (integers) — e.g. `blockIds: [<pageId>]`. Omit it to preview every page.",
          "tool": "preview"
        },
        "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": "open: `uri` is required — the handle of a saved design.",
          "tool": "open"
        },
        "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": {
            "uri": {}
          },
          "parameter": "uri",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "open: `uri` is required — the handle of a saved design.",
          "tool": "open"
        },
        "type": "noul"
      },
      "c05": {
        "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": "scorecard: `verdict` ('pass' | 'fail') is required.",
          "tool": "scorecard"
        },
        "type": "noul"
      },
      "c06": {
        "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": {
            "verdict": {}
          },
          "parameter": "verdict",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "scorecard: `verdict` ('pass' | 'fail') is required.",
          "tool": "scorecard"
        },
        "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": {
            "items": "not an array"
          },
          "parameter": "items",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "checklist: `items` must be an array of at most 64 items.",
          "tool": "checklist"
        },
        "type": "noul"
      },
      "c08": {
        "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": {
            "groups": "not an array"
          },
          "parameter": "groups",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "asset_search: `groups` is a list of group ids.",
          "tool": "asset_search"
        },
        "type": "noul"
      },
      "c09": {
        "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": "asset_add: provide `source.path` (an absolute path to a local media file).",
          "tool": "asset_add"
        },
        "type": "noul"
      },
      "c10": {
        "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": {
            "source": "not an object"
          },
          "parameter": "source",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "asset_add: provide `source.path` (an absolute path to a local media file).",
          "tool": "asset_add"
        },
        "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": {
            "action": {}
          },
          "parameter": "action",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "diagnostics: unknown action \"[object Object]\" (use status|summary|open)",
          "tool": "diagnostics"
        },
        "type": "noul"
      },
      "c12": {
        "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": "MCP error -32602: Unknown tool: didrun_unknown_tool",
          "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 import the bundled cybernews design, so I couldn’t preview its pages or export `/tmp/cybernews.pdf`.\n\nThe design engine failed to start: its native addon doesn’t support this environment’s Linux ARM64 platform, and the fallback engine couldn’t reach the license activation service.",
          "done_when": "The transcript shows a successful demo import, at least one page preview, and a successful PDF export reporting /tmp/cybernews.pdf.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {
                "source": {
                  "demo": "cybernews"
                }
              },
              "reply": "error: the engine process could not start its engine: the native engine failed: Failed to load the @cesdk/node-native addon for linux-arm64. Your platform/arch 'linux-arm64' is not supported by @cesdk/node-native. Use @cesdk/node (WASM) for broader platform coverage; the WASM engine it falls back to failed too: CE.SDK licence activation could not reach api.img.ly (ECONNRESET); starting the engine needs a working connection to it",
              "tool": "import"
            }
          ],
          "task": "Import the bundled cybernews demo design, preview its pages, and export it as a PDF to /tmp/cybernews.pdf."
        },
        "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 import the Cybernews demo, so I couldn’t preview its pages or export `/tmp/cybernews.pdf`.\n\nThe design engine failed to start: its native addon doesn’t support this environment’s Linux ARM64 architecture, and its WebAssembly fallback couldn’t reach the license activation service.",
          "done_when": "The transcript shows a successful demo import, at least one page preview, and a successful PDF export reporting /tmp/cybernews.pdf.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {
                "source": {
                  "demo": "cybernews"
                }
              },
              "reply": "error: the engine process could not start its engine: the native engine failed: Failed to load the @cesdk/node-native addon for linux-arm64. Your platform/arch 'linux-arm64' is not supported by @cesdk/node-native. Use @cesdk/node (WASM) for broader platform coverage; the WASM engine it falls back to failed too: CE.SDK licence activation could not reach api.img.ly (ECONNRESET); starting the engine needs a working connection to it",
              "tool": "import"
            }
          ],
          "task": "Import the bundled cybernews demo design, preview its pages, and export it as a PDF to /tmp/cybernews.pdf."
        },
        "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 import, preview, or export the Cybernews demo. The design engine failed to start: the native engine doesn’t support this platform, and the fallback engine couldn’t reach the license activation service. No PDF was created.",
          "done_when": "The transcript shows a successful demo import, at least one page preview, and a successful PDF export reporting /tmp/cybernews.pdf.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {
                "source": {
                  "demo": "cybernews"
                }
              },
              "reply": "error: the engine process could not start its engine: the native engine failed: Failed to load the @cesdk/node-native addon for linux-arm64. Your platform/arch 'linux-arm64' is not supported by @cesdk/node-native. Use @cesdk/node (WASM) for broader platform coverage; the WASM engine it falls back to failed too: CE.SDK licence activation could not reach api.img.ly (ECONNRESET); starting the engine needs a working connection to it",
              "tool": "import"
            }
          ],
          "task": "Import the bundled cybernews demo design, preview its pages, and export it as a PDF to /tmp/cybernews.pdf."
        },
        "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 import the Cybernews demo or rename it. The design engine failed to start: the native engine doesn’t support this environment’s `linux-arm64` platform, and the fallback couldn’t reach the license activation service.\n\nThe saved-designs list currently says **“No saved designs yet.”**",
          "done_when": "The rename response and the designs listing both show the title Cybernews Review.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {
                "source": {
                  "demo": "cybernews"
                }
              },
              "reply": "error: the engine process could not start its engine: the native engine failed: Failed to load the @cesdk/node-native addon for linux-arm64. Your platform/arch 'linux-arm64' is not supported by @cesdk/node-native. Use @cesdk/node (WASM) for broader platform coverage; the WASM engine it falls back to failed too: CE.SDK licence activation could not reach api.img.ly (ECONNRESET); starting the engine needs a working connection to it",
              "tool": "import"
            },
            {
              "arguments": {},
              "reply": "No saved designs yet.",
              "tool": "designs"
            }
          ],
          "task": "Import the bundled cybernews demo, rename the design to 'Cybernews Review', and list the saved designs so I can see its new name."
        },
        "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 import or rename the Cybernews demo. The design engine failed to start: its native component doesn’t support this platform, and its fallback couldn’t reach the license activation service.\n\nThe saved-designs list currently shows **no saved designs**.",
          "done_when": "The rename response and the designs listing both show the title Cybernews Review.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {
                "source": {
                  "demo": "cybernews"
                }
              },
              "reply": "error: the engine process could not start its engine: the native engine failed: Failed to load the @cesdk/node-native addon for linux-arm64. Your platform/arch 'linux-arm64' is not supported by @cesdk/node-native. Use @cesdk/node (WASM) for broader platform coverage; the WASM engine it falls back to failed too: CE.SDK licence activation could not reach api.img.ly (ECONNRESET); starting the engine needs a working connection to it",
              "tool": "import"
            },
            {
              "arguments": {},
              "reply": "No saved designs yet.",
              "tool": "designs"
            }
          ],
          "task": "Import the bundled cybernews demo, rename the design to 'Cybernews Review', and list the saved designs so I can see its new name."
        },
        "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 import or rename the Cybernews demo. The design engine failed to start: its native addon doesn’t support the sandbox’s Linux ARM64 platform, and the fallback engine couldn’t reach the license activation service.\n\nThe saved-designs list returned **“No saved designs yet.”**",
          "done_when": "The rename response and the designs listing both show the title Cybernews Review.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {
                "source": {
                  "demo": "cybernews"
                }
              },
              "reply": "error: the engine process could not start its engine: the native engine failed: Failed to load the @cesdk/node-native addon for linux-arm64. Your platform/arch 'linux-arm64' is not supported by @cesdk/node-native. Use @cesdk/node (WASM) for broader platform coverage; the WASM engine it falls back to failed too: CE.SDK licence activation could not reach api.img.ly (ECONNRESET); starting the engine needs a working connection to it",
              "tool": "import"
            },
            {
              "arguments": {},
              "reply": "No saved designs yet.",
              "tool": "designs"
            }
          ],
          "task": "Import the bundled cybernews demo, rename the design to 'Cybernews Review', and list the saved designs so I can see its new name."
        },
        "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": "I couldn’t create, preview, or export the announcement. The design engine couldn’t start: its native component doesn’t support the sandbox’s Linux ARM64 platform, and its fallback couldn’t reach the license activation service. No PNG was created at `/tmp/garden.png`.",
          "done_when": "The preview visibly shows the square announcement and its exact headline, and the export response reports /tmp/garden.png.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {
                "items": [
                  {
                    "kind": "copy",
                    "text": "Community Garden Day"
                  },
                  {
                    "kind": "output",
                    "path": "/tmp/garden.png"
                  },
                  {
                    "kind": "note",
                    "text": "Square announcement with a pale background; preview before delivery."
                  }
                ]
              },
              "reply": "{\"itemCount\":3}",
              "tool": "checklist"
            },
            {
              "arguments": {
                "uri": "skill://codesign/api/SKILL.md"
              },
              "reply": "---\nname: api\ndescription: |\n  Authoritative TypeScript signatures for `engine.design`, the only API edit\n  code uses. Use this skill whenever you need the exact signature, prop path,\n  or return type — especially before calling a member you haven't used yet.\n  Generated from the running engine's own `.d.ts`: THE source of truth.\n\n  Its entry document carries the whole edit-code API inline, in one read.\n\n  The sub-file \"signatures.d.ts\" adds the upstream CE.SDK core as reference\n  only (edit code never calls it), every vocabulary type flattened to its\n  literal union.\n---\n\n## Start here: `engine.design` (inside `edit` code)\n\nEdit code uses `engine.design` only (the edit gate refuses every other\nengine namespace). One nested-props dialect, one call per block:\n\n```js\nconst [scene] = await engine.design.findByType('scene');\nconst page = await engine.design.create(\n  { type: 'page', props: { width: 1080, height: 1920 } },\n  { parent: scene } // a page goes into the scene's stack\n);\nconst chip = await engine.design.create(\n  {\n    type: 'text',\n    name: 'chip',\n    props: {\n      backgroundColor: {\n        enabled: true,\n        color: ACCENT,\n        paddingLeft: 24,\n        cornerRadius: 999\n      }\n    }\n  },\n  { parent: page }\n);\nawait engine.design.setProps(title, {\n  opacity: 0.9,\n  stroke: { enabled: true, width: 2 }\n});\nconst { width } = await engine.design.getProps(page, ['width']);\n```\n\n- `create(spec, { parent?, index? })` (await it!) is THE constructor — one\n  block or a whole subtree, the same spec shape at every level. It folds\n  create, appendChild and property writes into one call and rolls back on\n  failure. Returns the root block id.\n- A spec node carries exactly `type`, `name`, `props` and `children` (nested,\n  same shape). Everything else IS props — including the font: naming a\n  family (`text: { font: { family, weight } }`) makes `create` — and\n  `setProps` — look the family up in this deployment's typeface sources and\n  pick that weight's file. Every `engine.design` member, `findText(copy)`\n  and `findAllText(copy)` return a Promise: always `await` it (a Promise as\n  a block id is refused).\n  `text: { string, ranges }` (style ranges replayed reshape-safe), inline\n  `fill: { type, ... }` / `shape` / `blur` / `effects: [...]` / `animations`\n  specs all sit under `props`.\n- `name` on any node is written onto the block itself:\n  `const [chip] = await engine.design.findByName('chip')` resolves it in this edit\n  and in every later one. Name every block you may touch again.\n- No `describe`: identity IS props — `getProps(id)` for everything valued,\n  `getProps(id, ['type'])` for what a block is, `getCapabilities(idOrType)`\n  for what it supports.\n- Text is all props too: `setProps(id, { text: { string, font, weight,\ncase, ranges, path, decoration } })` (a range also takes\n  `scriptStyle: 'Superscript' | 'Subscript'`) — leaves apply in a safe order and\n  a string-only write auto-preserves style ranges. Read back via\n  `getProps(id, ['text.ranges'])` / `['text.paragraphs']`.\n- A font size (`text.fontSize`, a range's `size`) requires a unit (`'32pt'`).\n- `setProps` validates **every** leaf before touching the scene: a bad leaf\n  throws listing all bad paths with suggestions, and nothing is applied.\n- On a group, only colours (`fill`/`stroke`/`dropShadow`/`text` `.color`)\n  reach the descendants that take them.\n- `getProps(id, ['position', 'stroke'])` reads leaves or whole subtrees; an\n  unknown selector throws — it never answers a typo with `undefined`.\n- Attachment state is a discriminated union: assign `{ type, ...props }` to\n  `fill`/`shape`/`blur`/`effects`/`animations`/`transition`. The type picks\n  the arm and the arm names every prop it carries. A type MATCHING what is\n  attached edits it in place; a different type replaces it; `null` detaches\n  (except `effects`, replaced wholesale — `[]` clears). Reads answer in the\n  same shape, so `getProps` output feeds straight back in; attachment ids\n  never circulate. Tree/layout verbs\n  live on `engine.design` (group, appendChild, align); saving and exporting\n  are the `export` tool.\n- Where each prop is taught: `shape.modifiers`, compound `subshapes` and\n  `stroke.fill` (angles in **radians**) → `skill://codesign/api/shapes.md`; `masks`\n  and `matte` (`source` is a name or uuid) → `skill://codesign/formats/print.md`;\n  `variables` and `bindings` → `skill://codesign/templates/SKILL.md`; `baselineShift` →\n  design-rules §6.1.9.\n- `transform` bends a block in place around `transform.anchor` (design\n  units from the frame's top-left): `scale: { x, y }` is a factor, `skew` a\n  shear in **radians** (shown up to ±1.48, 85°) along `skewAxis` in radians\n  (0 shears along x, π/2 along y), like the block's own `rotation`. Every\n  angle is radians but motion blur's `shutterAngle`/`shutterPhase` (degrees).\n  Keep `scene.angleUnit` at `Radian`: everything here assumes it.\n  Without an anchor the skew pivots on an edge and the block slides, so give\n  it the centre. A shear widens a block by its height × tan|skew|; a slanted\n  400 × 300 board that stays within its width:\n  `setProps(board, { transform: { anchor: { x: 200, y: 150 }, skew: -0.35, scale: { x: 0.7 } } })`.\n- Document state is on the scene block (`variables`, `spotColors`,\n  `markers`, `scene.*`); a new document is `create({ type: 'scene', children })`.\n- Any design can become a video: add timed content to the scene you have,\n  never rebuild it. `playback`, `animations`, `audio` and `track` props; read\n  `skill://codesign/api/video.md` before any timeline work. `keyframes` (on a block\n  and in every spec, `at` in seconds of the block), `transform`,\n  `transformParent` and `text.animators` (kinetic type) →\n  `skill://codesign/api/animation.md`.\n- Scalar wrappers (`setOpacity`, …), `is*`/`supports*` predicates and\n  editor-UI methods are in `signatures-extended.d.ts`, for reference only.\n\n## Reference: `signatures.d.ts`\n\n`skill://codesign/api/signatures.d.ts`: the upstream CE.SDK surface `engine.design`\nwraps (~2000 lines) — read it to understand a prop or enum, never to call\nit. Types are flattened to their values. Class start lines:\n\n| Class        | Start line |\n| ------------ | ---------- |\n| AssetAPI     | 825        |\n| **BlockAPI** | **1137**   |\n| EditorAPI    | 1365       |\n| EventAPI     | 1511       |\n| **SceneAPI** | **1641**   |\n| VariableAPI  | 1872       |\n\n## What is NOT in this file\n\n- **Parameter semantics**: colour channels are 0–1, never 0–255; for what\n  a bare `number`/`string` leaves open, check the topic page.\n- On demand, `skill://codesign/api/recipes.md`: read its section as you reach the\n  call (\"Fonts\", \"Custom shapes\", \"Z-order\", \"Group blocks\"), or \"Known\n  engine defects\" on a cryptic error. Print: `skill://codesign/formats/print.md`.\n  Templates: `skill://codesign/templates/SKILL.md`.\n- Timeline, captions, animations: `skill://codesign/api/video.md`,\n  `skill://codesign/api/animation.md`.\n\n\n---\n\n# The edit-code API surface (docs/api/signatures.d.ts)\n\nEverything edit code uses, inline below. The upstream CE.SDK core it wraps is the rest of that file — `skill://codesign/api/signatures.d.ts` — reference only.\n\n```typescript\n// ============================================================================\n// codesign extension: engine.design — the ONLY API `edit` code uses.\n// engine.block/scene/variable/editor/asset/event are refused by the edit\n// gate, which names the engine.design equivalent; the upstream classes after\n// this section are reference only. Scene-wide state (variables,\n// spotColors, scene.*) lives on the scene block.\n//\n// Length: design-unit number or '3mm'/'0.1in'/'32pt'/'40px'; reads answer\n// numbers. '50%' also sets '<leaf>Mode' to 'Percent'. letterSpacing is a FACTOR, never a length. lineHeight: write { visual: n }\n// (CSS-style x fontSize, converted per font); a bare number is the ENGINE\n// scale and renders looser. paragraphSpacing: write { px: n } or { em: n }.\n// Text glyph color is per-charac",
              "tool": "read_skill_resource"
            },
            {
              "arguments": {
                "uri": "skill://codesign/judge/SKILL.md"
              },
              "reply": "---\nname: judge\ndescription: >-\n  The quality gate and the rules every design is built to. Read it, with its\n  design-rules.md, before the first `edit` of any design: the rules are what you\n  build to, and the gate is the mandatory step before reporting a design done.\n  Also when the user asks for a design review, score, audit, or QA, or when a design\n  needs remediation after a failed review. The axes, the gate, the scorecard format\n  and the remediation loop are defined in this skill's body — do not judge from\n  memory of this description.\n---\n\n# judge — the build → judge → remediate loop\n\n**Before the first `edit` of a design, read `skill://codesign/judge/design-rules.md`** (in the same message as the `api` skill): the full rubric — typography, colour, hierarchy, composition, craft — with the numeric thresholds every axis below is scored against. Build to it; scoring a design against rules you read only afterwards means rebuilding it.\n\nYou are the design's QA judge. Judging is scored against what you SEE in `preview` renders of the **session's current state** — never against the code that produced it, and never from memory. `preview` always renders that current state, so there is nothing to re-ground: if you are unsure what the design looks like now, call `preview` again.\n\n## The 8 axes\n\nScore each axis 0–10 against the render. `baseline` is the execution floor; the other seven map to the sections of `design-rules.md`:\n\n| Axis             | What it scores                                                                                                                                                                                                              | Rubric                       |\n| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------- |\n| **baseline**     | Nothing broken: no overflow, no blank/placeholder text, no tofu (□), no clipped ascenders/descenders, nothing off-canvas, no unintended overlap                                                                             | §6.1.7, §6.4                 |\n| **hierarchy**    | One dominant element; unambiguous reading order; ≈3 (≤4) levels; rank carried by size > weight > color > spacing > position; structure expressed as a grouped block hierarchy (nested where nested)                         | §6.3                         |\n| **typography**   | Families/weights, scale bands, leading (incl. the content-area conversion and diacritic/non-Latin rules), measure, rag, tracking, micro-typography, lists & paragraph structure, inline style ranges                        | §6.1 (checklist §6.1.11)     |\n| **color**        | Palette ≤ 3 + neutrals; exactly one consistent accent; contrast on the actual background                                                                                                                                    | §6.2                         |\n| **composition**  | Margins 8–12% of the shortest dimension; shared grid; spacing ladder; balanced whitespace — no dead void; nothing off-canvas                                                                                                | §6.4                         |\n| **craft**        | Chips/pills/badges built per the chip system; intentional crops; clean decoration; consistent component geometry                                                                                                            | §6.5 (checklist §6.5.2)      |\n| **copy**         | The words say something only this business/occasion could say: no nothing-tagline, transformation claim, uncheckable superlative, upbeat closer or abstract-noun padding; trade idiom and specifics left intact             | §6.8 (Copy rules, below) |\n| **localization** | Localized variants only: correct per-language typography, no drift from the source layout, RTL mirrored, script-correct fonts; **source-parity** (appearance/weight/element/decoration match the source render — see below) | §6.6 + the `localize` skill  |\n\n**Some axes cannot be judged from a single PNG.** Nine checks below are **instrumented** — they read a measured value, the scene graph, or a second render, not an eyeball — because the naked render either hides the defect or can't reveal the cause. Five of them (chip construction, curved type, list construction, inline emphasis, paragraph structure) catch **construction** defects that render pixel-identically to the correct build: scoring the image alone passes them every time.\n\n- **Leading (typography):** read `getProps(id, ['text.lineHeightVisual'])` and judge the **rendered** gap against §6.1.3, not the raw `text/lineHeight`. Required on every headline/display block and on every text block of a localized variant — the most common defect, and it survives a clean-looking PNG.\n- **Grouping (hierarchy):** walk `getChildren` from the page; each cluster (eyebrow+headline, label+value, icon+text) must be a group block, not loose siblings (§6.3). Ungrouped RTL icons also break on mirror.\n- **Chip construction (craft):** every text-only chip's field is the text block's own `backgroundColor/*`, not a sibling shape behind it; a text block centred on a same-size rect is the tell (§6.5.1).\n- **Curved type (craft):** every arced text is one block whose `(await engine.design.getProps(id, ['text.path'])).text.path` is non-null; single-glyph blocks at stepped rotations are the tell (§6.5.4, and §6.3).\n- **List construction (typography):** every list is one block whose `getProps(id, ['text.paragraphs'])` paragraphs each carry a `listStyle` ≠ `'None'`. Tells: a typed `\"• \"`/`\"1. \"`, a lone marker-glyph block, one block per item (§6.1.8; the last two fail §6.3 too).\n- **Inline emphasis (typography):** emphasis inside a line is a range on one block (`getProps(id, ['text.ranges'])` has more than one); two blocks on one baseline and face, differing only in colour or weight, are the tell (§6.1.9). Capitals typed into the string with no `case` range are frozen caps (§6.1.9).\n- **Paragraph structure (typography):** a string with `\\n\\n` and `text/paragraphSpacing == 0`, or N stacked one-paragraph blocks that read as one passage, fail §6.1.8.\n- **Copy (copy):** score the words, not their setting. Read every string from the walk below in render order, as one voice, and ask whether a competitor could paste the lines onto their own page unchanged (§6.8, bundled at the end). Bias hard toward leaving copy alone: specifics and trade idiom are not tells, and em dashes and curly quotes are correct typography (§6.1.7). **A thin brief does not license inventing:** generic but true passes this axis; a name, price, date, place or claim the brief did not give fails. On a source-derived edition, a re-worded string fails **baseline** (Copy parity below), not this axis.\n- **Source-parity (localization + composition + craft + typography):** a variant is judged against **its source**, not in isolation — see the next section. Applies to every design derived from another: a **localization**, a **resize**, and a **brand restyle**. For a localized variant, also confirm the source's **style ranges survived**: if the source block has multiple runs and the variant has one, the translation flattened the accent (`localize`), which fails **localization** even when the render looks clean.\n\n## The gate\n\n**Every applicable axis ≥ 8. No averaging. N/A = 10.** One axis at 7 fails the design. An axis is N/A only when it genuinely cannot apply (e.g. `localization` on a single-language design) — score it 10 and mark it N/A in the scorecard.\n\nThe caller may override the default: narrow the axes (\"judge typography and composition only\") or move the threshold (\"pass ≥ 9\"). Apply the override for that run; otherwise the full gate is the default.\n\n**This skill never asks.** Its two parameters — the axis set and",
              "tool": "read_skill_resource"
            },
            {
              "arguments": {
                "uri": "skill://codesign/judge/design-rules.md"
              },
              "reply": "# Design rules (the full rubric)\n\nThe enforceable design best practices this server's designs are built to and the `judge` skill scores against. Read it before the first `edit` of a design. Section numbers here are canonical: `§6.x` references in every skill resolve to this file.\n\n- **Web vs print** — where the two media diverge (line height, minimum sizes) the rules are split **Web** / **Print**; \"web\" values apply to screen-destined canvases (social posts, banners). An unqualified rule applies to both.\n- **N/A = 10** — a rule that cannot apply to a given design scores N/A, i.e. 10.\n- **Defaults fill silence** — where the brief gives an explicit value, use it; where it is silent, apply this file's defined **default** rather than leaving it unset or letting the engine default stand. Every numeric rule below that names a _default_ (line-height §6.1.3, type scale §6.1.2, measure §6.1.4, all-caps tracking §6.1.6, margins §6.4) is that fallback. A brief value that violates a hard threshold is clamped to it — except line-height, judged by the rendered gap after conversion, never by the raw number (§6.1.3).\n\n### 6.1 Typography\n\nExpands **Axis 3 — Typography** (\"≤3 font families, correct pairing, sizes in band, sane line-spacing and leading, no tofu\"). Every subsection below must hold for Axis 3 to score ≥ 8.\n\n#### 6.1.1 Font families & pairing\n\n- Use **≤3 font families** per design (≤2 preferred); no more than **4 weights** total. Every extra family/weight dilutes hierarchy and reads as inconsistency.\n- Pair by **contrast**, not similarity — e.g. a serif display against a sans body, or one superfamily used across roles. Never pair two families that are almost alike (two humanist sans, two geometric sans).\n- Give every family a defined fallback: an **embedded/outlined** font (print) — and verify glyph coverage for every character in the copy (web/canvas). System substitution silently changes metrics and breaks leading and measure.\n- **Pass:** ≤3 families, ≤4 weights, pairing is by intentional contrast/superfamily, every family verified to cover the copy (print: embedded/outlined).\n\n#### 6.1.2 Type scale & size bands\n\n- Derive all sizes from **one modular scale** (ratio 1.2–1.618; 1.25 is a safe default). No arbitrary one-off sizes.\n- Keep text in clear **bands** — Display/Headline, Subhead, Body, Caption, Fine print — each separated by **≥1 scale step** so the hierarchy is unambiguous (supports Axis 2).\n- Minimum legible sizes:\n  - **Web** — body ≥ **16px**, caption ≥ **12px**, never below **11px**.\n  - **Print** — body **9–12pt**, caption ≥ **7pt**, never below **5pt**.\n- **Pass:** every size snaps to one modular scale; body ≥ 16px (web) / ≥ 9pt (print); bands are ≥1 step apart and visually distinct.\n\n**Canvas guidance — sizes as % of page height:**\n\n| Role        | % of page height | Example for 1080 px page |\n| ----------- | ---------------- | ------------------------ |\n| Headline    | 3 – 5 %          | 32 – 54 px               |\n| Body        | 1.5 – 2 %        | 16 – 22 px               |\n| Caption     | 1.2 – 1.5 %      | 13 – 16 px               |\n| Min legible | —                | 14 px                    |\n\n#### 6.1.3 Line height / leading — the headline rule\n\nLine spacing is the top driver of the \"inconsistent typography\" complaint. Three principles govern it: **explicitness** (every text block carries a deliberately set line-height — never an inherited default), the **inverse rule** (small text needs more line-height; large display needs less), and **consistency** (identical leading across same-band text within one design).\n\n- **Set line-height explicitly on every text block** — including single-line labels, captions, and all-caps titles, not just multi-line body copy. An unset line-height (the engine/CSS default) is a defect even when the block is one line: it silently tracks the font's default metrics, can't be verified against the bands below, and defeats both the consistency and all-caps rules. A one-line all-caps label still takes the tighter all-caps multiplier (**0.9–1.0**); the value is judged by band + intent, not by whether the text happens to wrap. Same-band single-line blocks (e.g. an attribution and a caption in the same face) share their leading just as body blocks do.\n\n> **Authoring in CoDesign / CE.SDK — write line-heights as `{ visual }`.** Every line-height figure in this section is a _visual_ CSS-style multiplier of the font size. The engine's raw `text/lineHeight` is a different scale (it multiplies the font's per-face content area), so a raw number renders looser than it reads. The facade converts for you — write the band value directly:\n>\n> ```js\n> await engine.design.setProps(block, {\n>   text: { lineHeight: { visual: 1.2 } }\n> });\n> // read back in the same terms:\n> await engine.design.getProps(block, ['text.lineHeightVisual']); // → 1.2\n> ```\n>\n> The conversion loads the face's metrics itself. A `{ visual }` (or font/size) write reshapes and replays every per-character style range for you. If you ever reshape via the raw APIs instead: **⚠ re-setting the string wipes every per-character style range** — capture with `getProps(id, ['text.ranges'])` and replay (§6.1.9). The judge scores the _rendered_ gap (§6.1.6), and reads it back via `text.lineHeightVisual` — same numbers as the bands below.\n>\n> **⚠ An explicit line-height from the user's brief is a visual target too** — write it as `{ visual }` and judge the rendered gap, never the raw engine number. A prompt asking for all-caps line-height **1.15** is not \"too loose for the 0.9–1.0 band\" until the _rendered_ gap violates §6.1.6; when the prompt names a line-height, the default is to use it.\n\n- **Web (unitless multipliers):**\n  - Body **1.4–1.6** (default **1.5**); long-form reading up to **1.65**.\n  - Headlines **1.1–1.25** (default **1.1**); large display **≤1.1** (default **1.1**).\n  - **All-caps display / headlines** take a **tighter** multiplier than mixed-case — **0.9–1.0** for multi-line — because caps fill only the cap-height band (~70% of the em) and use no descender space; a value that looks tight for mixed-case leaves a descender-sized void between all-caps lines. Judge by the **visual gap** (target ~0.15–0.25× cap height), not the number.\n  - **WCAG:** body line-height ≥ **1.5**; paragraph spacing ≥ **2×** the font size.\n- **Print (leading as a unitless multiplier of point size):**\n  - Body **1.2–1.45** (default **1.2**). Push toward the low end for dense or large-x-height faces, toward the high end for airy or small type.\n  - Headlines **1.0–1.2** (default **1.05**); tight display setting may go slightly negative (**0.95–1.0**).\n  - **All-caps titles: 0.9–1.0** (tighter than mixed-case display's 1.0–1.2) — same cap-height reason.\n- **Localized / non-Latin copy — the per-script rules live in the `localize` skill.** Per-script leading bands and diacritic rules — the capital-diacritic all-caps loosening, the marked-capital mixed-case nudge, the localized-display default, and the CJK / Arabic-Naskh / Vietnamese bands — live in the `localize` skill's `reference/` family files (`latin-expansion.md`, `arabic.md`, `cjk.md`, `vietnamese.md`, `cyrillic.md`). All values there are **visual multipliers** — apply this section's content-area conversion like every value here (§6.6).\n- **Tune leading to measure** — longer measure needs more leading; short measure needs less. Never set leading in isolation from line length (§6.1.4).\n- **Consistency** — every body block in one design shares the same leading; every same-band heading shares the same leading.\n- **Pass:** **every text block carries an explicit line-height (incl. single-line & all-caps labels)**; body line-height **1.4–1.6** (web) / **1.2–1.45** (print); headline leading tighter than body; **all-caps titles tighter still (0.9–1.0, web & print), no descender-void between lines**; leading uniform across same-band text; **localized / non-Latin leading set per the `localize` skill's family files**; WCAG body ≥ 1.5 (w",
              "tool": "read_skill_resource"
            },
            {
              "arguments": {
                "uri": "skill://codesign/api/recipes.md"
              },
              "reply": "# Recipes — the constructs edit code uses, and the engine's known defects\n\nWorked examples next to the signatures in this skill's entry document: how a\npage is built, which construct each design rule calls for, fonts, custom\nshapes, stacking and grouping. The rules that choose between them are\n`skill://codesign/judge/design-rules.md`; the last sections are the engine's known\ndefects and what to check when text does not render.\n\n## Build ONE complete page per `edit`\n\nThe unit of work is the **page**: each `edit` emits one complete page — one\n`engine.design.create` with every block, font and size (it awaits resource\nloads itself), then positioning. Do **not** split one page's build across\ncalls: each tool call costs 20–200 s of streaming, so one ~10000-character\ncall beats three ~3000-character ones.\n\n```js\n// 1. Structure + every block of the page — ONE awaited create call\nconst scene = await engine.design.create({ type: 'scene' });\nconst page = await engine.design.create(\n  {\n    type: 'page',\n    props: { width: 720, height: 1008 },\n    children: [\n      {\n        type: 'text',\n        name: 'title',\n        props: {\n          text: {\n            // A FAMILY name makes create look the family up and pick\n            // that weight's file — no findAssets/fonts[0] hairline trap.\n            font: { family: 'Playfair Display', weight: 'bold' },\n            string: 'Alex & Jordan',\n            fontSize: '48px'\n          },\n          widthMode: 'Auto',\n          heightMode: 'Auto'\n        }\n      }\n      // ... every other block — all of it in props: ranges via\n      // text: { string, ranges: [{ from, to, color }] } (reshape-safe),\n      // solid panels via fill: { type: 'color', color: { value } }\n    ]\n  },\n  { parent: scene } // the page lands in the scene's stack\n);\n// create() awaited the subtree's font/image loads — measurements are live.\n\n// 2. Position with measured frame dims\nconst [title] = await engine.design.findByName('title');\nconst { width: w } = await engine.design.measure(title);\nawait engine.design.setProps(title, {\n  position: { x: (720 - w) / 2, y: 250 }\n});\n// ... position everything ...\n\nreturn { type: 'text', text: `page=${page} ready` };\n```\n\n**A new scene replaces the design you edit.** `create({ type: 'scene' })` is\nfor an empty design; continue a design that is already open with `edit`.\n\n**Name every block you may touch again**: `findByName` finds it in every\nlater edit, where matching copy breaks on an NBSP, a line break or shared text.\n\n**Text frames: Auto + measure.** Build text Auto-sized and position it by\n`measure`; body copy at a fixed column is `widthMode: 'Absolute'` with an Auto\nheight. `create`, `measure`, rendering and saving load fonts and images\nthemselves: never add a wait-for-fonts edit.\n\n**Editing an existing multi-page design:** a mechanical change applied\nuniformly (swap a font everywhere, recolour a brand accent) is one `edit`\nlooping over `await engine.design.findByType('page')`. Substantial per-page\nrework goes page by page, like a build.\n\n**Fix in place, never wipe and rebuild.** Identify the block and change it\nwith a targeted `setProps` — position, `fontSize`, the string. A new\n`create({ type: 'scene' })` is for a scene graph that is genuinely\nunrecoverable, which is rare: a rebuild costs about ten extra calls.\n\n## Which construct, by design rule\n\n- **A text-only chip** (pill, eyebrow, badge, tag, button) is a native text\n  background on the text block, never a rect behind floating text (design\n  rules §6.5.1):\n\n```js\n// A panel is a graphic; a text-only chip/pill/badge is NOT (next call).\nawait engine.design.create(\n  { type: 'graphic', props: { shape: 'rect', fill: { type: 'color', color: { value: c } } } },\n  { parent: page }\n);\nawait engine.design.setProps(text, {\n  backgroundColor: {\n    enabled: true,\n    color: c,\n    cornerRadius: 'pill',\n    paddingLeft: 16, // horizontal ~1.5–2.5× vertical\n    paddingRight: 16,\n    paddingTop: 8,\n    paddingBottom: 8\n  }\n});\n```\n\n- **Rich text** (an accent word, a bold lead-in, a price, ®/™) is `text.ranges`\n  in one block, never a second block beside the first (§6.1.9).\n- **All caps** is `text.case: 'Uppercase'`, never typed capitals (§6.1.6).\n- **Multi-paragraph copy and lists** are ONE block: one paragraph per item,\n  `listStyle` markers with a hanging indent, never \"• \" typed, a marker block\n  or a block per item (§6.1.8).\n- **Curved type** is ONE text block on `text.path` (`{ shape: 'circle',\n  diameter }` for a ring), never a block per letter; on a custom arc\n  `pathOffset` is a 0..1 fraction from the path's own `M` (§6.5.4).\n- **Fonts** are named by family, `text.font: { family, weight }`; a hand-built\n  `{ typeface, uri }` only for a font file you hold a uri for (below).\n\n## Fonts\n\nSet a font by family name inside `edit` code, `text: { font: { family, weight } }`: the API looks the family up in `ly.img.gfonts` (~2,000 Google families), picks the weight's file and loads it. Never hardcode font URLs or fetch font CSS yourself; pick an available family rather than guessing a URI. Which families to pair: design rules §6.7.\n`asset_search({ source: 'ly.img.gfonts', query })` shows what exists: each hit carries `typeface: { name, weights, styles }` and no font URIs.\n\nA font file on the user's machine (brand kit, purchased face) is imported first: `asset_add({ source: { path } })` returns a `uri`; use it verbatim as `text.font`'s `uri` and in `typeface.fonts[].uri`. A font a saved style's `tokens.json` names by URI is already in the store: use that URI as it is, no `asset_add`.\n\n## Custom shapes — `vector_path`, not a pile of rects\n\n**Any mark with a diagonal, a curve or a hole is one `vector_path` block.** The\nprimitives cannot express those, so approximating a mark out of rects and\nellipses produces stepped edges where a slope should be, and costs one block per\nstep: a windowed facade drawn that way came to 79 blocks and still rendered as a\nstaircase. The same mark as a path is one block with clean geometry.\nCutouts from primitives (`compound`), repeats, rounding, zigzags, draw-on\ntrims (`modifiers`) and gradient strokes (`stroke.fill`): `skill://codesign/api/shapes.md`.\n\n```js\nconst graphic = await engine.design.create(\n  {\n    type: 'graphic',\n    props: {\n      shape: {\n        type: 'vector_path',\n        vector_path: { path: d, width: 100, height: 100 }\n      },\n      fill: { type: 'color', color: { value: INK } },\n      width: 420, // on-canvas size, independent of the frame\n      height: 460\n    }\n  },\n  { parent: page }\n);\n```\n\n`vector_path` fills `NonZero` unless you name `fillRule`, so solid subpaths that\ncross union instead of knocking a hole where they meet. Put cut-outs in\n`vector_path: { path, holes: [d, …] }` — the facade winds them, whichever way\nthey are drawn.\n\n```js\nshape: { type: 'vector_path', vector_path: { path: body, holes: [windowD], width: 100, height: 100 } }\n```\n\n**Prefer four cubic Béziers to an SVG arc** for circles and rounded caps — it\nsidesteps `A` command largeArc/sweep flag handling entirely. Control points sit\nat `k = 0.5522847498 * r`.\n\n**Holes are real holes.** A `vector_path` hole shows whatever is behind the\nblock — page ground, another graphic, a photograph. Over a flat ground that is\nwhat you want; over a photograph it reads as a hard-edged cut-out rather than a\nprinted mark, so emit the solid subpaths only and drop the holes. Never fake a\nhole with a ground-coloured shape on top: it only matches a flat, known ground.\n\n## Z-order via child order (no z-index property)\n\nLater children paint on top. **Build pages back-to-front** — a default stack\nfor a designed page:\n\n1. page background — `setProps(page, { background: color })`\n2. full-bleed photo / image (first child, index 0)\n3. scrim / vignette / gradient overlay\n4. structural rules — grid hairlines, dividers, frames\n5. accent shapes — pills, badges, accent bars, icons\n6. body text\n7. headline / display text\n8. foreground decoration (corner brackets, stickers)\n\nIf ",
              "tool": "read_skill_resource"
            },
            {
              "arguments": {
                "code": "const scene = await engine.design.create({type:'scene'}); const page = await engine.design.create({type:'page',name:'Garden announcement',props:{width:1080,height:1080,background:{r:0.95,g:0.96,b:0.91,a:1}},children:[{type:'graphic',name:'Botanical motif',props:{position:{x:410,y:140},width:260,height:250,shape:{type:'vector_path',vector_path:{width:260,height:250,path:'M 125 245 C 126 188 130 140 132 75 L 140 75 C 138 142 136 196 134 245 Z M 132 155 C 75 156 48 126 42 91 C 90 91 122 111 132 155 Z M 137 122 C 145 71 174 43 222 39 C 220 78 188 112 137 122 Z M 131 91 C 100 68 96 35 111 10 C 142 25 151 57 131 91 Z'}},fill:{type:'color',color:{value:{r:0.28,g:0.43,b:0.30,a:1}}}}},{type:'text',name:'Headline',props:{position:{x:130,y:443},width:820,height:250,text:{string:'Community Garden Day',font:{family:'Playfair Display',weight:'bold'},fontSize:'76px',lineHeight:{visual:1.1},color:{r:0.15,g:0.25,b:0.17,a:1},horizontalAlignment:'Center'}}},{type:'graphic',name:'Rule',props:{position:{x:455,y:765},width:170,height:3,shape:'rect',fill:{type:'color',color:{value:{r:0.55,g:0.65,b:0.49,a:1}}}}}]},{parent:scene}); return {page};",
                "note": "Created a square pale garden announcement with a botanical motif and the exact headline.",
                "skills": "api,judge"
              },
              "reply": "error: the engine process could not start its engine: the native engine failed: Failed to load the @cesdk/node-native addon for linux-arm64. Your platform/arch 'linux-arm64' is not supported by @cesdk/node-native. Use @cesdk/node (WASM) for broader platform coverage; the WASM engine it falls back to failed too: CE.SDK licence activation could not reach api.img.ly (ECONNRESET); starting the engine needs a working connection to it",
              "tool": "edit"
            }
          ],
          "task": "Create a simple square announcement design with a pale background and the exact headline 'Community Garden Day', preview it, and export it as a PNG to /tmp/garden.png."
        },
        "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": "I couldn’t create, preview, or export the announcement. The design engine failed to start: its native component doesn’t support the sandbox’s architecture, and its fallback couldn’t reach the license-activation service.\n\nNo PNG was created at `/tmp/garden.png`.",
          "done_when": "The preview visibly shows the square announcement and its exact headline, and the export response reports /tmp/garden.png.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {
                "items": [
                  {
                    "kind": "copy",
                    "text": "Community Garden Day"
                  },
                  {
                    "kind": "output",
                    "path": "/tmp/garden.png"
                  },
                  {
                    "kind": "note",
                    "text": "Square announcement with pale background; preview before delivery."
                  }
                ]
              },
              "reply": "{\"itemCount\":3}",
              "tool": "checklist"
            },
            {
              "arguments": {
                "uri": "skill://codesign/api/SKILL.md"
              },
              "reply": "---\nname: api\ndescription: |\n  Authoritative TypeScript signatures for `engine.design`, the only API edit\n  code uses. Use this skill whenever you need the exact signature, prop path,\n  or return type — especially before calling a member you haven't used yet.\n  Generated from the running engine's own `.d.ts`: THE source of truth.\n\n  Its entry document carries the whole edit-code API inline, in one read.\n\n  The sub-file \"signatures.d.ts\" adds the upstream CE.SDK core as reference\n  only (edit code never calls it), every vocabulary type flattened to its\n  literal union.\n---\n\n## Start here: `engine.design` (inside `edit` code)\n\nEdit code uses `engine.design` only (the edit gate refuses every other\nengine namespace). One nested-props dialect, one call per block:\n\n```js\nconst [scene] = await engine.design.findByType('scene');\nconst page = await engine.design.create(\n  { type: 'page', props: { width: 1080, height: 1920 } },\n  { parent: scene } // a page goes into the scene's stack\n);\nconst chip = await engine.design.create(\n  {\n    type: 'text',\n    name: 'chip',\n    props: {\n      backgroundColor: {\n        enabled: true,\n        color: ACCENT,\n        paddingLeft: 24,\n        cornerRadius: 999\n      }\n    }\n  },\n  { parent: page }\n);\nawait engine.design.setProps(title, {\n  opacity: 0.9,\n  stroke: { enabled: true, width: 2 }\n});\nconst { width } = await engine.design.getProps(page, ['width']);\n```\n\n- `create(spec, { parent?, index? })` (await it!) is THE constructor — one\n  block or a whole subtree, the same spec shape at every level. It folds\n  create, appendChild and property writes into one call and rolls back on\n  failure. Returns the root block id.\n- A spec node carries exactly `type`, `name`, `props` and `children` (nested,\n  same shape). Everything else IS props — including the font: naming a\n  family (`text: { font: { family, weight } }`) makes `create` — and\n  `setProps` — look the family up in this deployment's typeface sources and\n  pick that weight's file. Every `engine.design` member, `findText(copy)`\n  and `findAllText(copy)` return a Promise: always `await` it (a Promise as\n  a block id is refused).\n  `text: { string, ranges }` (style ranges replayed reshape-safe), inline\n  `fill: { type, ... }` / `shape` / `blur` / `effects: [...]` / `animations`\n  specs all sit under `props`.\n- `name` on any node is written onto the block itself:\n  `const [chip] = await engine.design.findByName('chip')` resolves it in this edit\n  and in every later one. Name every block you may touch again.\n- No `describe`: identity IS props — `getProps(id)` for everything valued,\n  `getProps(id, ['type'])` for what a block is, `getCapabilities(idOrType)`\n  for what it supports.\n- Text is all props too: `setProps(id, { text: { string, font, weight,\ncase, ranges, path, decoration } })` (a range also takes\n  `scriptStyle: 'Superscript' | 'Subscript'`) — leaves apply in a safe order and\n  a string-only write auto-preserves style ranges. Read back via\n  `getProps(id, ['text.ranges'])` / `['text.paragraphs']`.\n- A font size (`text.fontSize`, a range's `size`) requires a unit (`'32pt'`).\n- `setProps` validates **every** leaf before touching the scene: a bad leaf\n  throws listing all bad paths with suggestions, and nothing is applied.\n- On a group, only colours (`fill`/`stroke`/`dropShadow`/`text` `.color`)\n  reach the descendants that take them.\n- `getProps(id, ['position', 'stroke'])` reads leaves or whole subtrees; an\n  unknown selector throws — it never answers a typo with `undefined`.\n- Attachment state is a discriminated union: assign `{ type, ...props }` to\n  `fill`/`shape`/`blur`/`effects`/`animations`/`transition`. The type picks\n  the arm and the arm names every prop it carries. A type MATCHING what is\n  attached edits it in place; a different type replaces it; `null` detaches\n  (except `effects`, replaced wholesale — `[]` clears). Reads answer in the\n  same shape, so `getProps` output feeds straight back in; attachment ids\n  never circulate. Tree/layout verbs\n  live on `engine.design` (group, appendChild, align); saving and exporting\n  are the `export` tool.\n- Where each prop is taught: `shape.modifiers`, compound `subshapes` and\n  `stroke.fill` (angles in **radians**) → `skill://codesign/api/shapes.md`; `masks`\n  and `matte` (`source` is a name or uuid) → `skill://codesign/formats/print.md`;\n  `variables` and `bindings` → `skill://codesign/templates/SKILL.md`; `baselineShift` →\n  design-rules §6.1.9.\n- `transform` bends a block in place around `transform.anchor` (design\n  units from the frame's top-left): `scale: { x, y }` is a factor, `skew` a\n  shear in **radians** (shown up to ±1.48, 85°) along `skewAxis` in radians\n  (0 shears along x, π/2 along y), like the block's own `rotation`. Every\n  angle is radians but motion blur's `shutterAngle`/`shutterPhase` (degrees).\n  Keep `scene.angleUnit` at `Radian`: everything here assumes it.\n  Without an anchor the skew pivots on an edge and the block slides, so give\n  it the centre. A shear widens a block by its height × tan|skew|; a slanted\n  400 × 300 board that stays within its width:\n  `setProps(board, { transform: { anchor: { x: 200, y: 150 }, skew: -0.35, scale: { x: 0.7 } } })`.\n- Document state is on the scene block (`variables`, `spotColors`,\n  `markers`, `scene.*`); a new document is `create({ type: 'scene', children })`.\n- Any design can become a video: add timed content to the scene you have,\n  never rebuild it. `playback`, `animations`, `audio` and `track` props; read\n  `skill://codesign/api/video.md` before any timeline work. `keyframes` (on a block\n  and in every spec, `at` in seconds of the block), `transform`,\n  `transformParent` and `text.animators` (kinetic type) →\n  `skill://codesign/api/animation.md`.\n- Scalar wrappers (`setOpacity`, …), `is*`/`supports*` predicates and\n  editor-UI methods are in `signatures-extended.d.ts`, for reference only.\n\n## Reference: `signatures.d.ts`\n\n`skill://codesign/api/signatures.d.ts`: the upstream CE.SDK surface `engine.design`\nwraps (~2000 lines) — read it to understand a prop or enum, never to call\nit. Types are flattened to their values. Class start lines:\n\n| Class        | Start line |\n| ------------ | ---------- |\n| AssetAPI     | 825        |\n| **BlockAPI** | **1137**   |\n| EditorAPI    | 1365       |\n| EventAPI     | 1511       |\n| **SceneAPI** | **1641**   |\n| VariableAPI  | 1872       |\n\n## What is NOT in this file\n\n- **Parameter semantics**: colour channels are 0–1, never 0–255; for what\n  a bare `number`/`string` leaves open, check the topic page.\n- On demand, `skill://codesign/api/recipes.md`: read its section as you reach the\n  call (\"Fonts\", \"Custom shapes\", \"Z-order\", \"Group blocks\"), or \"Known\n  engine defects\" on a cryptic error. Print: `skill://codesign/formats/print.md`.\n  Templates: `skill://codesign/templates/SKILL.md`.\n- Timeline, captions, animations: `skill://codesign/api/video.md`,\n  `skill://codesign/api/animation.md`.\n\n\n---\n\n# The edit-code API surface (docs/api/signatures.d.ts)\n\nEverything edit code uses, inline below. The upstream CE.SDK core it wraps is the rest of that file — `skill://codesign/api/signatures.d.ts` — reference only.\n\n```typescript\n// ============================================================================\n// codesign extension: engine.design — the ONLY API `edit` code uses.\n// engine.block/scene/variable/editor/asset/event are refused by the edit\n// gate, which names the engine.design equivalent; the upstream classes after\n// this section are reference only. Scene-wide state (variables,\n// spotColors, scene.*) lives on the scene block.\n//\n// Length: design-unit number or '3mm'/'0.1in'/'32pt'/'40px'; reads answer\n// numbers. '50%' also sets '<leaf>Mode' to 'Percent'. letterSpacing is a FACTOR, never a length. lineHeight: write { visual: n }\n// (CSS-style x fontSize, converted per font); a bare number is the ENGINE\n// scale and renders looser. paragraphSpacing: write { px: n } or { em: n }.\n// Text glyph color is per-charac",
              "tool": "read_skill_resource"
            },
            {
              "arguments": {
                "uri": "skill://codesign/judge/SKILL.md"
              },
              "reply": "---\nname: judge\ndescription: >-\n  The quality gate and the rules every design is built to. Read it, with its\n  design-rules.md, before the first `edit` of any design: the rules are what you\n  build to, and the gate is the mandatory step before reporting a design done.\n  Also when the user asks for a design review, score, audit, or QA, or when a design\n  needs remediation after a failed review. The axes, the gate, the scorecard format\n  and the remediation loop are defined in this skill's body — do not judge from\n  memory of this description.\n---\n\n# judge — the build → judge → remediate loop\n\n**Before the first `edit` of a design, read `skill://codesign/judge/design-rules.md`** (in the same message as the `api` skill): the full rubric — typography, colour, hierarchy, composition, craft — with the numeric thresholds every axis below is scored against. Build to it; scoring a design against rules you read only afterwards means rebuilding it.\n\nYou are the design's QA judge. Judging is scored against what you SEE in `preview` renders of the **session's current state** — never against the code that produced it, and never from memory. `preview` always renders that current state, so there is nothing to re-ground: if you are unsure what the design looks like now, call `preview` again.\n\n## The 8 axes\n\nScore each axis 0–10 against the render. `baseline` is the execution floor; the other seven map to the sections of `design-rules.md`:\n\n| Axis             | What it scores                                                                                                                                                                                                              | Rubric                       |\n| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------- |\n| **baseline**     | Nothing broken: no overflow, no blank/placeholder text, no tofu (□), no clipped ascenders/descenders, nothing off-canvas, no unintended overlap                                                                             | §6.1.7, §6.4                 |\n| **hierarchy**    | One dominant element; unambiguous reading order; ≈3 (≤4) levels; rank carried by size > weight > color > spacing > position; structure expressed as a grouped block hierarchy (nested where nested)                         | §6.3                         |\n| **typography**   | Families/weights, scale bands, leading (incl. the content-area conversion and diacritic/non-Latin rules), measure, rag, tracking, micro-typography, lists & paragraph structure, inline style ranges                        | §6.1 (checklist §6.1.11)     |\n| **color**        | Palette ≤ 3 + neutrals; exactly one consistent accent; contrast on the actual background                                                                                                                                    | §6.2                         |\n| **composition**  | Margins 8–12% of the shortest dimension; shared grid; spacing ladder; balanced whitespace — no dead void; nothing off-canvas                                                                                                | §6.4                         |\n| **craft**        | Chips/pills/badges built per the chip system; intentional crops; clean decoration; consistent component geometry                                                                                                            | §6.5 (checklist §6.5.2)      |\n| **copy**         | The words say something only this business/occasion could say: no nothing-tagline, transformation claim, uncheckable superlative, upbeat closer or abstract-noun padding; trade idiom and specifics left intact             | §6.8 (Copy rules, below) |\n| **localization** | Localized variants only: correct per-language typography, no drift from the source layout, RTL mirrored, script-correct fonts; **source-parity** (appearance/weight/element/decoration match the source render — see below) | §6.6 + the `localize` skill  |\n\n**Some axes cannot be judged from a single PNG.** Nine checks below are **instrumented** — they read a measured value, the scene graph, or a second render, not an eyeball — because the naked render either hides the defect or can't reveal the cause. Five of them (chip construction, curved type, list construction, inline emphasis, paragraph structure) catch **construction** defects that render pixel-identically to the correct build: scoring the image alone passes them every time.\n\n- **Leading (typography):** read `getProps(id, ['text.lineHeightVisual'])` and judge the **rendered** gap against §6.1.3, not the raw `text/lineHeight`. Required on every headline/display block and on every text block of a localized variant — the most common defect, and it survives a clean-looking PNG.\n- **Grouping (hierarchy):** walk `getChildren` from the page; each cluster (eyebrow+headline, label+value, icon+text) must be a group block, not loose siblings (§6.3). Ungrouped RTL icons also break on mirror.\n- **Chip construction (craft):** every text-only chip's field is the text block's own `backgroundColor/*`, not a sibling shape behind it; a text block centred on a same-size rect is the tell (§6.5.1).\n- **Curved type (craft):** every arced text is one block whose `(await engine.design.getProps(id, ['text.path'])).text.path` is non-null; single-glyph blocks at stepped rotations are the tell (§6.5.4, and §6.3).\n- **List construction (typography):** every list is one block whose `getProps(id, ['text.paragraphs'])` paragraphs each carry a `listStyle` ≠ `'None'`. Tells: a typed `\"• \"`/`\"1. \"`, a lone marker-glyph block, one block per item (§6.1.8; the last two fail §6.3 too).\n- **Inline emphasis (typography):** emphasis inside a line is a range on one block (`getProps(id, ['text.ranges'])` has more than one); two blocks on one baseline and face, differing only in colour or weight, are the tell (§6.1.9). Capitals typed into the string with no `case` range are frozen caps (§6.1.9).\n- **Paragraph structure (typography):** a string with `\\n\\n` and `text/paragraphSpacing == 0`, or N stacked one-paragraph blocks that read as one passage, fail §6.1.8.\n- **Copy (copy):** score the words, not their setting. Read every string from the walk below in render order, as one voice, and ask whether a competitor could paste the lines onto their own page unchanged (§6.8, bundled at the end). Bias hard toward leaving copy alone: specifics and trade idiom are not tells, and em dashes and curly quotes are correct typography (§6.1.7). **A thin brief does not license inventing:** generic but true passes this axis; a name, price, date, place or claim the brief did not give fails. On a source-derived edition, a re-worded string fails **baseline** (Copy parity below), not this axis.\n- **Source-parity (localization + composition + craft + typography):** a variant is judged against **its source**, not in isolation — see the next section. Applies to every design derived from another: a **localization**, a **resize**, and a **brand restyle**. For a localized variant, also confirm the source's **style ranges survived**: if the source block has multiple runs and the variant has one, the translation flattened the accent (`localize`), which fails **localization** even when the render looks clean.\n\n## The gate\n\n**Every applicable axis ≥ 8. No averaging. N/A = 10.** One axis at 7 fails the design. An axis is N/A only when it genuinely cannot apply (e.g. `localization` on a single-language design) — score it 10 and mark it N/A in the scorecard.\n\nThe caller may override the default: narrow the axes (\"judge typography and composition only\") or move the threshold (\"pass ≥ 9\"). Apply the override for that run; otherwise the full gate is the default.\n\n**This skill never asks.** Its two parameters — the axis set and",
              "tool": "read_skill_resource"
            },
            {
              "arguments": {
                "uri": "skill://codesign/judge/design-rules.md"
              },
              "reply": "# Design rules (the full rubric)\n\nThe enforceable design best practices this server's designs are built to and the `judge` skill scores against. Read it before the first `edit` of a design. Section numbers here are canonical: `§6.x` references in every skill resolve to this file.\n\n- **Web vs print** — where the two media diverge (line height, minimum sizes) the rules are split **Web** / **Print**; \"web\" values apply to screen-destined canvases (social posts, banners). An unqualified rule applies to both.\n- **N/A = 10** — a rule that cannot apply to a given design scores N/A, i.e. 10.\n- **Defaults fill silence** — where the brief gives an explicit value, use it; where it is silent, apply this file's defined **default** rather than leaving it unset or letting the engine default stand. Every numeric rule below that names a _default_ (line-height §6.1.3, type scale §6.1.2, measure §6.1.4, all-caps tracking §6.1.6, margins §6.4) is that fallback. A brief value that violates a hard threshold is clamped to it — except line-height, judged by the rendered gap after conversion, never by the raw number (§6.1.3).\n\n### 6.1 Typography\n\nExpands **Axis 3 — Typography** (\"≤3 font families, correct pairing, sizes in band, sane line-spacing and leading, no tofu\"). Every subsection below must hold for Axis 3 to score ≥ 8.\n\n#### 6.1.1 Font families & pairing\n\n- Use **≤3 font families** per design (≤2 preferred); no more than **4 weights** total. Every extra family/weight dilutes hierarchy and reads as inconsistency.\n- Pair by **contrast**, not similarity — e.g. a serif display against a sans body, or one superfamily used across roles. Never pair two families that are almost alike (two humanist sans, two geometric sans).\n- Give every family a defined fallback: an **embedded/outlined** font (print) — and verify glyph coverage for every character in the copy (web/canvas). System substitution silently changes metrics and breaks leading and measure.\n- **Pass:** ≤3 families, ≤4 weights, pairing is by intentional contrast/superfamily, every family verified to cover the copy (print: embedded/outlined).\n\n#### 6.1.2 Type scale & size bands\n\n- Derive all sizes from **one modular scale** (ratio 1.2–1.618; 1.25 is a safe default). No arbitrary one-off sizes.\n- Keep text in clear **bands** — Display/Headline, Subhead, Body, Caption, Fine print — each separated by **≥1 scale step** so the hierarchy is unambiguous (supports Axis 2).\n- Minimum legible sizes:\n  - **Web** — body ≥ **16px**, caption ≥ **12px**, never below **11px**.\n  - **Print** — body **9–12pt**, caption ≥ **7pt**, never below **5pt**.\n- **Pass:** every size snaps to one modular scale; body ≥ 16px (web) / ≥ 9pt (print); bands are ≥1 step apart and visually distinct.\n\n**Canvas guidance — sizes as % of page height:**\n\n| Role        | % of page height | Example for 1080 px page |\n| ----------- | ---------------- | ------------------------ |\n| Headline    | 3 – 5 %          | 32 – 54 px               |\n| Body        | 1.5 – 2 %        | 16 – 22 px               |\n| Caption     | 1.2 – 1.5 %      | 13 – 16 px               |\n| Min legible | —                | 14 px                    |\n\n#### 6.1.3 Line height / leading — the headline rule\n\nLine spacing is the top driver of the \"inconsistent typography\" complaint. Three principles govern it: **explicitness** (every text block carries a deliberately set line-height — never an inherited default), the **inverse rule** (small text needs more line-height; large display needs less), and **consistency** (identical leading across same-band text within one design).\n\n- **Set line-height explicitly on every text block** — including single-line labels, captions, and all-caps titles, not just multi-line body copy. An unset line-height (the engine/CSS default) is a defect even when the block is one line: it silently tracks the font's default metrics, can't be verified against the bands below, and defeats both the consistency and all-caps rules. A one-line all-caps label still takes the tighter all-caps multiplier (**0.9–1.0**); the value is judged by band + intent, not by whether the text happens to wrap. Same-band single-line blocks (e.g. an attribution and a caption in the same face) share their leading just as body blocks do.\n\n> **Authoring in CoDesign / CE.SDK — write line-heights as `{ visual }`.** Every line-height figure in this section is a _visual_ CSS-style multiplier of the font size. The engine's raw `text/lineHeight` is a different scale (it multiplies the font's per-face content area), so a raw number renders looser than it reads. The facade converts for you — write the band value directly:\n>\n> ```js\n> await engine.design.setProps(block, {\n>   text: { lineHeight: { visual: 1.2 } }\n> });\n> // read back in the same terms:\n> await engine.design.getProps(block, ['text.lineHeightVisual']); // → 1.2\n> ```\n>\n> The conversion loads the face's metrics itself. A `{ visual }` (or font/size) write reshapes and replays every per-character style range for you. If you ever reshape via the raw APIs instead: **⚠ re-setting the string wipes every per-character style range** — capture with `getProps(id, ['text.ranges'])` and replay (§6.1.9). The judge scores the _rendered_ gap (§6.1.6), and reads it back via `text.lineHeightVisual` — same numbers as the bands below.\n>\n> **⚠ An explicit line-height from the user's brief is a visual target too** — write it as `{ visual }` and judge the rendered gap, never the raw engine number. A prompt asking for all-caps line-height **1.15** is not \"too loose for the 0.9–1.0 band\" until the _rendered_ gap violates §6.1.6; when the prompt names a line-height, the default is to use it.\n\n- **Web (unitless multipliers):**\n  - Body **1.4–1.6** (default **1.5**); long-form reading up to **1.65**.\n  - Headlines **1.1–1.25** (default **1.1**); large display **≤1.1** (default **1.1**).\n  - **All-caps display / headlines** take a **tighter** multiplier than mixed-case — **0.9–1.0** for multi-line — because caps fill only the cap-height band (~70% of the em) and use no descender space; a value that looks tight for mixed-case leaves a descender-sized void between all-caps lines. Judge by the **visual gap** (target ~0.15–0.25× cap height), not the number.\n  - **WCAG:** body line-height ≥ **1.5**; paragraph spacing ≥ **2×** the font size.\n- **Print (leading as a unitless multiplier of point size):**\n  - Body **1.2–1.45** (default **1.2**). Push toward the low end for dense or large-x-height faces, toward the high end for airy or small type.\n  - Headlines **1.0–1.2** (default **1.05**); tight display setting may go slightly negative (**0.95–1.0**).\n  - **All-caps titles: 0.9–1.0** (tighter than mixed-case display's 1.0–1.2) — same cap-height reason.\n- **Localized / non-Latin copy — the per-script rules live in the `localize` skill.** Per-script leading bands and diacritic rules — the capital-diacritic all-caps loosening, the marked-capital mixed-case nudge, the localized-display default, and the CJK / Arabic-Naskh / Vietnamese bands — live in the `localize` skill's `reference/` family files (`latin-expansion.md`, `arabic.md`, `cjk.md`, `vietnamese.md`, `cyrillic.md`). All values there are **visual multipliers** — apply this section's content-area conversion like every value here (§6.6).\n- **Tune leading to measure** — longer measure needs more leading; short measure needs less. Never set leading in isolation from line length (§6.1.4).\n- **Consistency** — every body block in one design shares the same leading; every same-band heading shares the same leading.\n- **Pass:** **every text block carries an explicit line-height (incl. single-line & all-caps labels)**; body line-height **1.4–1.6** (web) / **1.2–1.45** (print); headline leading tighter than body; **all-caps titles tighter still (0.9–1.0, web & print), no descender-void between lines**; leading uniform across same-band text; **localized / non-Latin leading set per the `localize` skill's family files**; WCAG body ≥ 1.5 (w",
              "tool": "read_skill_resource"
            },
            {
              "arguments": {
                "uri": "skill://codesign/api/recipes.md"
              },
              "reply": "# Recipes — the constructs edit code uses, and the engine's known defects\n\nWorked examples next to the signatures in this skill's entry document: how a\npage is built, which construct each design rule calls for, fonts, custom\nshapes, stacking and grouping. The rules that choose between them are\n`skill://codesign/judge/design-rules.md`; the last sections are the engine's known\ndefects and what to check when text does not render.\n\n## Build ONE complete page per `edit`\n\nThe unit of work is the **page**: each `edit` emits one complete page — one\n`engine.design.create` with every block, font and size (it awaits resource\nloads itself), then positioning. Do **not** split one page's build across\ncalls: each tool call costs 20–200 s of streaming, so one ~10000-character\ncall beats three ~3000-character ones.\n\n```js\n// 1. Structure + every block of the page — ONE awaited create call\nconst scene = await engine.design.create({ type: 'scene' });\nconst page = await engine.design.create(\n  {\n    type: 'page',\n    props: { width: 720, height: 1008 },\n    children: [\n      {\n        type: 'text',\n        name: 'title',\n        props: {\n          text: {\n            // A FAMILY name makes create look the family up and pick\n            // that weight's file — no findAssets/fonts[0] hairline trap.\n            font: { family: 'Playfair Display', weight: 'bold' },\n            string: 'Alex & Jordan',\n            fontSize: '48px'\n          },\n          widthMode: 'Auto',\n          heightMode: 'Auto'\n        }\n      }\n      // ... every other block — all of it in props: ranges via\n      // text: { string, ranges: [{ from, to, color }] } (reshape-safe),\n      // solid panels via fill: { type: 'color', color: { value } }\n    ]\n  },\n  { parent: scene } // the page lands in the scene's stack\n);\n// create() awaited the subtree's font/image loads — measurements are live.\n\n// 2. Position with measured frame dims\nconst [title] = await engine.design.findByName('title');\nconst { width: w } = await engine.design.measure(title);\nawait engine.design.setProps(title, {\n  position: { x: (720 - w) / 2, y: 250 }\n});\n// ... position everything ...\n\nreturn { type: 'text', text: `page=${page} ready` };\n```\n\n**A new scene replaces the design you edit.** `create({ type: 'scene' })` is\nfor an empty design; continue a design that is already open with `edit`.\n\n**Name every block you may touch again**: `findByName` finds it in every\nlater edit, where matching copy breaks on an NBSP, a line break or shared text.\n\n**Text frames: Auto + measure.** Build text Auto-sized and position it by\n`measure`; body copy at a fixed column is `widthMode: 'Absolute'` with an Auto\nheight. `create`, `measure`, rendering and saving load fonts and images\nthemselves: never add a wait-for-fonts edit.\n\n**Editing an existing multi-page design:** a mechanical change applied\nuniformly (swap a font everywhere, recolour a brand accent) is one `edit`\nlooping over `await engine.design.findByType('page')`. Substantial per-page\nrework goes page by page, like a build.\n\n**Fix in place, never wipe and rebuild.** Identify the block and change it\nwith a targeted `setProps` — position, `fontSize`, the string. A new\n`create({ type: 'scene' })` is for a scene graph that is genuinely\nunrecoverable, which is rare: a rebuild costs about ten extra calls.\n\n## Which construct, by design rule\n\n- **A text-only chip** (pill, eyebrow, badge, tag, button) is a native text\n  background on the text block, never a rect behind floating text (design\n  rules §6.5.1):\n\n```js\n// A panel is a graphic; a text-only chip/pill/badge is NOT (next call).\nawait engine.design.create(\n  { type: 'graphic', props: { shape: 'rect', fill: { type: 'color', color: { value: c } } } },\n  { parent: page }\n);\nawait engine.design.setProps(text, {\n  backgroundColor: {\n    enabled: true,\n    color: c,\n    cornerRadius: 'pill',\n    paddingLeft: 16, // horizontal ~1.5–2.5× vertical\n    paddingRight: 16,\n    paddingTop: 8,\n    paddingBottom: 8\n  }\n});\n```\n\n- **Rich text** (an accent word, a bold lead-in, a price, ®/™) is `text.ranges`\n  in one block, never a second block beside the first (§6.1.9).\n- **All caps** is `text.case: 'Uppercase'`, never typed capitals (§6.1.6).\n- **Multi-paragraph copy and lists** are ONE block: one paragraph per item,\n  `listStyle` markers with a hanging indent, never \"• \" typed, a marker block\n  or a block per item (§6.1.8).\n- **Curved type** is ONE text block on `text.path` (`{ shape: 'circle',\n  diameter }` for a ring), never a block per letter; on a custom arc\n  `pathOffset` is a 0..1 fraction from the path's own `M` (§6.5.4).\n- **Fonts** are named by family, `text.font: { family, weight }`; a hand-built\n  `{ typeface, uri }` only for a font file you hold a uri for (below).\n\n## Fonts\n\nSet a font by family name inside `edit` code, `text: { font: { family, weight } }`: the API looks the family up in `ly.img.gfonts` (~2,000 Google families), picks the weight's file and loads it. Never hardcode font URLs or fetch font CSS yourself; pick an available family rather than guessing a URI. Which families to pair: design rules §6.7.\n`asset_search({ source: 'ly.img.gfonts', query })` shows what exists: each hit carries `typeface: { name, weights, styles }` and no font URIs.\n\nA font file on the user's machine (brand kit, purchased face) is imported first: `asset_add({ source: { path } })` returns a `uri`; use it verbatim as `text.font`'s `uri` and in `typeface.fonts[].uri`. A font a saved style's `tokens.json` names by URI is already in the store: use that URI as it is, no `asset_add`.\n\n## Custom shapes — `vector_path`, not a pile of rects\n\n**Any mark with a diagonal, a curve or a hole is one `vector_path` block.** The\nprimitives cannot express those, so approximating a mark out of rects and\nellipses produces stepped edges where a slope should be, and costs one block per\nstep: a windowed facade drawn that way came to 79 blocks and still rendered as a\nstaircase. The same mark as a path is one block with clean geometry.\nCutouts from primitives (`compound`), repeats, rounding, zigzags, draw-on\ntrims (`modifiers`) and gradient strokes (`stroke.fill`): `skill://codesign/api/shapes.md`.\n\n```js\nconst graphic = await engine.design.create(\n  {\n    type: 'graphic',\n    props: {\n      shape: {\n        type: 'vector_path',\n        vector_path: { path: d, width: 100, height: 100 }\n      },\n      fill: { type: 'color', color: { value: INK } },\n      width: 420, // on-canvas size, independent of the frame\n      height: 460\n    }\n  },\n  { parent: page }\n);\n```\n\n`vector_path` fills `NonZero` unless you name `fillRule`, so solid subpaths that\ncross union instead of knocking a hole where they meet. Put cut-outs in\n`vector_path: { path, holes: [d, …] }` — the facade winds them, whichever way\nthey are drawn.\n\n```js\nshape: { type: 'vector_path', vector_path: { path: body, holes: [windowD], width: 100, height: 100 } }\n```\n\n**Prefer four cubic Béziers to an SVG arc** for circles and rounded caps — it\nsidesteps `A` command largeArc/sweep flag handling entirely. Control points sit\nat `k = 0.5522847498 * r`.\n\n**Holes are real holes.** A `vector_path` hole shows whatever is behind the\nblock — page ground, another graphic, a photograph. Over a flat ground that is\nwhat you want; over a photograph it reads as a hard-edged cut-out rather than a\nprinted mark, so emit the solid subpaths only and drop the holes. Never fake a\nhole with a ground-coloured shape on top: it only matches a flat, known ground.\n\n## Z-order via child order (no z-index property)\n\nLater children paint on top. **Build pages back-to-front** — a default stack\nfor a designed page:\n\n1. page background — `setProps(page, { background: color })`\n2. full-bleed photo / image (first child, index 0)\n3. scrim / vignette / gradient overlay\n4. structural rules — grid hairlines, dividers, frames\n5. accent shapes — pills, badges, accent bars, icons\n6. body text\n7. headline / display text\n8. foreground decoration (corner brackets, stickers)\n\nIf ",
              "tool": "read_skill_resource"
            },
            {
              "arguments": {
                "code": "const scene = await engine.design.create({type:'scene'}); const page = await engine.design.create({type:'page',name:'Garden announcement',props:{width:1080,height:1080},children:[{type:'graphic',name:'Pale background',props:{position:{x:0,y:0},width:1080,height:1080,shape:'rect',fill:{type:'color',color:{value:{r:0.95,g:0.96,b:0.91,a:1}}}}},{type:'graphic',name:'Garden sprout',props:{position:{x:440,y:180},width:200,height:230,shape:{type:'vector_path',vector_path:{width:200,height:230,path:'M 97 226 L 97 104 C 62 105 29 86 23 38 C 62 35 91 53 100 88 C 110 51 139 25 180 26 C 177 73 146 102 104 108 L 104 226 Z'}},fill:{type:'color',color:{value:{r:0.24,g:0.39,b:0.29,a:1}}}}},{type:'text',name:'Headline',props:{position:{x:100,y:470},width:880,heightMode:'Auto',text:{string:'Community Garden Day',font:{family:'Playfair Display',weight:'bold'},fontSize:'76px',lineHeight:{visual:1.1},color:{r:0.16,g:0.25,b:0.18,a:1},horizontalAlignment:'Center'}}},{type:'graphic',name:'Ground line',props:{position:{x:390,y:760},width:300,height:3,shape:'rect',fill:{type:'color',color:{value:{r:0.55,g:0.65,b:0.49,a:1}}}}}]},{parent:scene}); return {page};",
                "note": "Created a square pale garden announcement with a botanical sprout and exact headline.",
                "skills": "api,judge"
              },
              "reply": "error: the engine process could not start its engine: the native engine failed: Failed to load the @cesdk/node-native addon for linux-arm64. Your platform/arch 'linux-arm64' is not supported by @cesdk/node-native. Use @cesdk/node (WASM) for broader platform coverage; the WASM engine it falls back to failed too: CE.SDK licence activation could not reach api.img.ly (ECONNRESET); starting the engine needs a working connection to it",
              "tool": "edit"
            }
          ],
          "task": "Create a simple square announcement design with a pale background and the exact headline 'Community Garden Day', preview it, and export it as a PNG to /tmp/garden.png."
        },
        "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": "I couldn’t create, preview, or export the announcement. The design engine failed to start: its native component doesn’t support this environment, and its fallback couldn’t reach the license activation service.\n\nNo PNG was created at `/tmp/garden.png`.",
          "done_when": "The preview visibly shows the square announcement and its exact headline, and the export response reports /tmp/garden.png.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {
                "uri": "skill://codesign/api/SKILL.md"
              },
              "reply": "---\nname: api\ndescription: |\n  Authoritative TypeScript signatures for `engine.design`, the only API edit\n  code uses. Use this skill whenever you need the exact signature, prop path,\n  or return type — especially before calling a member you haven't used yet.\n  Generated from the running engine's own `.d.ts`: THE source of truth.\n\n  Its entry document carries the whole edit-code API inline, in one read.\n\n  The sub-file \"signatures.d.ts\" adds the upstream CE.SDK core as reference\n  only (edit code never calls it), every vocabulary type flattened to its\n  literal union.\n---\n\n## Start here: `engine.design` (inside `edit` code)\n\nEdit code uses `engine.design` only (the edit gate refuses every other\nengine namespace). One nested-props dialect, one call per block:\n\n```js\nconst [scene] = await engine.design.findByType('scene');\nconst page = await engine.design.create(\n  { type: 'page', props: { width: 1080, height: 1920 } },\n  { parent: scene } // a page goes into the scene's stack\n);\nconst chip = await engine.design.create(\n  {\n    type: 'text',\n    name: 'chip',\n    props: {\n      backgroundColor: {\n        enabled: true,\n        color: ACCENT,\n        paddingLeft: 24,\n        cornerRadius: 999\n      }\n    }\n  },\n  { parent: page }\n);\nawait engine.design.setProps(title, {\n  opacity: 0.9,\n  stroke: { enabled: true, width: 2 }\n});\nconst { width } = await engine.design.getProps(page, ['width']);\n```\n\n- `create(spec, { parent?, index? })` (await it!) is THE constructor — one\n  block or a whole subtree, the same spec shape at every level. It folds\n  create, appendChild and property writes into one call and rolls back on\n  failure. Returns the root block id.\n- A spec node carries exactly `type`, `name`, `props` and `children` (nested,\n  same shape). Everything else IS props — including the font: naming a\n  family (`text: { font: { family, weight } }`) makes `create` — and\n  `setProps` — look the family up in this deployment's typeface sources and\n  pick that weight's file. Every `engine.design` member, `findText(copy)`\n  and `findAllText(copy)` return a Promise: always `await` it (a Promise as\n  a block id is refused).\n  `text: { string, ranges }` (style ranges replayed reshape-safe), inline\n  `fill: { type, ... }` / `shape` / `blur` / `effects: [...]` / `animations`\n  specs all sit under `props`.\n- `name` on any node is written onto the block itself:\n  `const [chip] = await engine.design.findByName('chip')` resolves it in this edit\n  and in every later one. Name every block you may touch again.\n- No `describe`: identity IS props — `getProps(id)` for everything valued,\n  `getProps(id, ['type'])` for what a block is, `getCapabilities(idOrType)`\n  for what it supports.\n- Text is all props too: `setProps(id, { text: { string, font, weight,\ncase, ranges, path, decoration } })` (a range also takes\n  `scriptStyle: 'Superscript' | 'Subscript'`) — leaves apply in a safe order and\n  a string-only write auto-preserves style ranges. Read back via\n  `getProps(id, ['text.ranges'])` / `['text.paragraphs']`.\n- A font size (`text.fontSize`, a range's `size`) requires a unit (`'32pt'`).\n- `setProps` validates **every** leaf before touching the scene: a bad leaf\n  throws listing all bad paths with suggestions, and nothing is applied.\n- On a group, only colours (`fill`/`stroke`/`dropShadow`/`text` `.color`)\n  reach the descendants that take them.\n- `getProps(id, ['position', 'stroke'])` reads leaves or whole subtrees; an\n  unknown selector throws — it never answers a typo with `undefined`.\n- Attachment state is a discriminated union: assign `{ type, ...props }` to\n  `fill`/`shape`/`blur`/`effects`/`animations`/`transition`. The type picks\n  the arm and the arm names every prop it carries. A type MATCHING what is\n  attached edits it in place; a different type replaces it; `null` detaches\n  (except `effects`, replaced wholesale — `[]` clears). Reads answer in the\n  same shape, so `getProps` output feeds straight back in; attachment ids\n  never circulate. Tree/layout verbs\n  live on `engine.design` (group, appendChild, align); saving and exporting\n  are the `export` tool.\n- Where each prop is taught: `shape.modifiers`, compound `subshapes` and\n  `stroke.fill` (angles in **radians**) → `skill://codesign/api/shapes.md`; `masks`\n  and `matte` (`source` is a name or uuid) → `skill://codesign/formats/print.md`;\n  `variables` and `bindings` → `skill://codesign/templates/SKILL.md`; `baselineShift` →\n  design-rules §6.1.9.\n- `transform` bends a block in place around `transform.anchor` (design\n  units from the frame's top-left): `scale: { x, y }` is a factor, `skew` a\n  shear in **radians** (shown up to ±1.48, 85°) along `skewAxis` in radians\n  (0 shears along x, π/2 along y), like the block's own `rotation`. Every\n  angle is radians but motion blur's `shutterAngle`/`shutterPhase` (degrees).\n  Keep `scene.angleUnit` at `Radian`: everything here assumes it.\n  Without an anchor the skew pivots on an edge and the block slides, so give\n  it the centre. A shear widens a block by its height × tan|skew|; a slanted\n  400 × 300 board that stays within its width:\n  `setProps(board, { transform: { anchor: { x: 200, y: 150 }, skew: -0.35, scale: { x: 0.7 } } })`.\n- Document state is on the scene block (`variables`, `spotColors`,\n  `markers`, `scene.*`); a new document is `create({ type: 'scene', children })`.\n- Any design can become a video: add timed content to the scene you have,\n  never rebuild it. `playback`, `animations`, `audio` and `track` props; read\n  `skill://codesign/api/video.md` before any timeline work. `keyframes` (on a block\n  and in every spec, `at` in seconds of the block), `transform`,\n  `transformParent` and `text.animators` (kinetic type) →\n  `skill://codesign/api/animation.md`.\n- Scalar wrappers (`setOpacity`, …), `is*`/`supports*` predicates and\n  editor-UI methods are in `signatures-extended.d.ts`, for reference only.\n\n## Reference: `signatures.d.ts`\n\n`skill://codesign/api/signatures.d.ts`: the upstream CE.SDK surface `engine.design`\nwraps (~2000 lines) — read it to understand a prop or enum, never to call\nit. Types are flattened to their values. Class start lines:\n\n| Class        | Start line |\n| ------------ | ---------- |\n| AssetAPI     | 825        |\n| **BlockAPI** | **1137**   |\n| EditorAPI    | 1365       |\n| EventAPI     | 1511       |\n| **SceneAPI** | **1641**   |\n| VariableAPI  | 1872       |\n\n## What is NOT in this file\n\n- **Parameter semantics**: colour channels are 0–1, never 0–255; for what\n  a bare `number`/`string` leaves open, check the topic page.\n- On demand, `skill://codesign/api/recipes.md`: read its section as you reach the\n  call (\"Fonts\", \"Custom shapes\", \"Z-order\", \"Group blocks\"), or \"Known\n  engine defects\" on a cryptic error. Print: `skill://codesign/formats/print.md`.\n  Templates: `skill://codesign/templates/SKILL.md`.\n- Timeline, captions, animations: `skill://codesign/api/video.md`,\n  `skill://codesign/api/animation.md`.\n\n\n---\n\n# The edit-code API surface (docs/api/signatures.d.ts)\n\nEverything edit code uses, inline below. The upstream CE.SDK core it wraps is the rest of that file — `skill://codesign/api/signatures.d.ts` — reference only.\n\n```typescript\n// ============================================================================\n// codesign extension: engine.design — the ONLY API `edit` code uses.\n// engine.block/scene/variable/editor/asset/event are refused by the edit\n// gate, which names the engine.design equivalent; the upstream classes after\n// this section are reference only. Scene-wide state (variables,\n// spotColors, scene.*) lives on the scene block.\n//\n// Length: design-unit number or '3mm'/'0.1in'/'32pt'/'40px'; reads answer\n// numbers. '50%' also sets '<leaf>Mode' to 'Percent'. letterSpacing is a FACTOR, never a length. lineHeight: write { visual: n }\n// (CSS-style x fontSize, converted per font); a bare number is the ENGINE\n// scale and renders looser. paragraphSpacing: write { px: n } or { em: n }.\n// Text glyph color is per-charac",
              "tool": "read_skill_resource"
            },
            {
              "arguments": {
                "uri": "skill://codesign/judge/SKILL.md"
              },
              "reply": "---\nname: judge\ndescription: >-\n  The quality gate and the rules every design is built to. Read it, with its\n  design-rules.md, before the first `edit` of any design: the rules are what you\n  build to, and the gate is the mandatory step before reporting a design done.\n  Also when the user asks for a design review, score, audit, or QA, or when a design\n  needs remediation after a failed review. The axes, the gate, the scorecard format\n  and the remediation loop are defined in this skill's body — do not judge from\n  memory of this description.\n---\n\n# judge — the build → judge → remediate loop\n\n**Before the first `edit` of a design, read `skill://codesign/judge/design-rules.md`** (in the same message as the `api` skill): the full rubric — typography, colour, hierarchy, composition, craft — with the numeric thresholds every axis below is scored against. Build to it; scoring a design against rules you read only afterwards means rebuilding it.\n\nYou are the design's QA judge. Judging is scored against what you SEE in `preview` renders of the **session's current state** — never against the code that produced it, and never from memory. `preview` always renders that current state, so there is nothing to re-ground: if you are unsure what the design looks like now, call `preview` again.\n\n## The 8 axes\n\nScore each axis 0–10 against the render. `baseline` is the execution floor; the other seven map to the sections of `design-rules.md`:\n\n| Axis             | What it scores                                                                                                                                                                                                              | Rubric                       |\n| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------- |\n| **baseline**     | Nothing broken: no overflow, no blank/placeholder text, no tofu (□), no clipped ascenders/descenders, nothing off-canvas, no unintended overlap                                                                             | §6.1.7, §6.4                 |\n| **hierarchy**    | One dominant element; unambiguous reading order; ≈3 (≤4) levels; rank carried by size > weight > color > spacing > position; structure expressed as a grouped block hierarchy (nested where nested)                         | §6.3                         |\n| **typography**   | Families/weights, scale bands, leading (incl. the content-area conversion and diacritic/non-Latin rules), measure, rag, tracking, micro-typography, lists & paragraph structure, inline style ranges                        | §6.1 (checklist §6.1.11)     |\n| **color**        | Palette ≤ 3 + neutrals; exactly one consistent accent; contrast on the actual background                                                                                                                                    | §6.2                         |\n| **composition**  | Margins 8–12% of the shortest dimension; shared grid; spacing ladder; balanced whitespace — no dead void; nothing off-canvas                                                                                                | §6.4                         |\n| **craft**        | Chips/pills/badges built per the chip system; intentional crops; clean decoration; consistent component geometry                                                                                                            | §6.5 (checklist §6.5.2)      |\n| **copy**         | The words say something only this business/occasion could say: no nothing-tagline, transformation claim, uncheckable superlative, upbeat closer or abstract-noun padding; trade idiom and specifics left intact             | §6.8 (Copy rules, below) |\n| **localization** | Localized variants only: correct per-language typography, no drift from the source layout, RTL mirrored, script-correct fonts; **source-parity** (appearance/weight/element/decoration match the source render — see below) | §6.6 + the `localize` skill  |\n\n**Some axes cannot be judged from a single PNG.** Nine checks below are **instrumented** — they read a measured value, the scene graph, or a second render, not an eyeball — because the naked render either hides the defect or can't reveal the cause. Five of them (chip construction, curved type, list construction, inline emphasis, paragraph structure) catch **construction** defects that render pixel-identically to the correct build: scoring the image alone passes them every time.\n\n- **Leading (typography):** read `getProps(id, ['text.lineHeightVisual'])` and judge the **rendered** gap against §6.1.3, not the raw `text/lineHeight`. Required on every headline/display block and on every text block of a localized variant — the most common defect, and it survives a clean-looking PNG.\n- **Grouping (hierarchy):** walk `getChildren` from the page; each cluster (eyebrow+headline, label+value, icon+text) must be a group block, not loose siblings (§6.3). Ungrouped RTL icons also break on mirror.\n- **Chip construction (craft):** every text-only chip's field is the text block's own `backgroundColor/*`, not a sibling shape behind it; a text block centred on a same-size rect is the tell (§6.5.1).\n- **Curved type (craft):** every arced text is one block whose `(await engine.design.getProps(id, ['text.path'])).text.path` is non-null; single-glyph blocks at stepped rotations are the tell (§6.5.4, and §6.3).\n- **List construction (typography):** every list is one block whose `getProps(id, ['text.paragraphs'])` paragraphs each carry a `listStyle` ≠ `'None'`. Tells: a typed `\"• \"`/`\"1. \"`, a lone marker-glyph block, one block per item (§6.1.8; the last two fail §6.3 too).\n- **Inline emphasis (typography):** emphasis inside a line is a range on one block (`getProps(id, ['text.ranges'])` has more than one); two blocks on one baseline and face, differing only in colour or weight, are the tell (§6.1.9). Capitals typed into the string with no `case` range are frozen caps (§6.1.9).\n- **Paragraph structure (typography):** a string with `\\n\\n` and `text/paragraphSpacing == 0`, or N stacked one-paragraph blocks that read as one passage, fail §6.1.8.\n- **Copy (copy):** score the words, not their setting. Read every string from the walk below in render order, as one voice, and ask whether a competitor could paste the lines onto their own page unchanged (§6.8, bundled at the end). Bias hard toward leaving copy alone: specifics and trade idiom are not tells, and em dashes and curly quotes are correct typography (§6.1.7). **A thin brief does not license inventing:** generic but true passes this axis; a name, price, date, place or claim the brief did not give fails. On a source-derived edition, a re-worded string fails **baseline** (Copy parity below), not this axis.\n- **Source-parity (localization + composition + craft + typography):** a variant is judged against **its source**, not in isolation — see the next section. Applies to every design derived from another: a **localization**, a **resize**, and a **brand restyle**. For a localized variant, also confirm the source's **style ranges survived**: if the source block has multiple runs and the variant has one, the translation flattened the accent (`localize`), which fails **localization** even when the render looks clean.\n\n## The gate\n\n**Every applicable axis ≥ 8. No averaging. N/A = 10.** One axis at 7 fails the design. An axis is N/A only when it genuinely cannot apply (e.g. `localization` on a single-language design) — score it 10 and mark it N/A in the scorecard.\n\nThe caller may override the default: narrow the axes (\"judge typography and composition only\") or move the threshold (\"pass ≥ 9\"). Apply the override for that run; otherwise the full gate is the default.\n\n**This skill never asks.** Its two parameters — the axis set and",
              "tool": "read_skill_resource"
            },
            {
              "arguments": {
                "uri": "skill://codesign/judge/design-rules.md"
              },
              "reply": "# Design rules (the full rubric)\n\nThe enforceable design best practices this server's designs are built to and the `judge` skill scores against. Read it before the first `edit` of a design. Section numbers here are canonical: `§6.x` references in every skill resolve to this file.\n\n- **Web vs print** — where the two media diverge (line height, minimum sizes) the rules are split **Web** / **Print**; \"web\" values apply to screen-destined canvases (social posts, banners). An unqualified rule applies to both.\n- **N/A = 10** — a rule that cannot apply to a given design scores N/A, i.e. 10.\n- **Defaults fill silence** — where the brief gives an explicit value, use it; where it is silent, apply this file's defined **default** rather than leaving it unset or letting the engine default stand. Every numeric rule below that names a _default_ (line-height §6.1.3, type scale §6.1.2, measure §6.1.4, all-caps tracking §6.1.6, margins §6.4) is that fallback. A brief value that violates a hard threshold is clamped to it — except line-height, judged by the rendered gap after conversion, never by the raw number (§6.1.3).\n\n### 6.1 Typography\n\nExpands **Axis 3 — Typography** (\"≤3 font families, correct pairing, sizes in band, sane line-spacing and leading, no tofu\"). Every subsection below must hold for Axis 3 to score ≥ 8.\n\n#### 6.1.1 Font families & pairing\n\n- Use **≤3 font families** per design (≤2 preferred); no more than **4 weights** total. Every extra family/weight dilutes hierarchy and reads as inconsistency.\n- Pair by **contrast**, not similarity — e.g. a serif display against a sans body, or one superfamily used across roles. Never pair two families that are almost alike (two humanist sans, two geometric sans).\n- Give every family a defined fallback: an **embedded/outlined** font (print) — and verify glyph coverage for every character in the copy (web/canvas). System substitution silently changes metrics and breaks leading and measure.\n- **Pass:** ≤3 families, ≤4 weights, pairing is by intentional contrast/superfamily, every family verified to cover the copy (print: embedded/outlined).\n\n#### 6.1.2 Type scale & size bands\n\n- Derive all sizes from **one modular scale** (ratio 1.2–1.618; 1.25 is a safe default). No arbitrary one-off sizes.\n- Keep text in clear **bands** — Display/Headline, Subhead, Body, Caption, Fine print — each separated by **≥1 scale step** so the hierarchy is unambiguous (supports Axis 2).\n- Minimum legible sizes:\n  - **Web** — body ≥ **16px**, caption ≥ **12px**, never below **11px**.\n  - **Print** — body **9–12pt**, caption ≥ **7pt**, never below **5pt**.\n- **Pass:** every size snaps to one modular scale; body ≥ 16px (web) / ≥ 9pt (print); bands are ≥1 step apart and visually distinct.\n\n**Canvas guidance — sizes as % of page height:**\n\n| Role        | % of page height | Example for 1080 px page |\n| ----------- | ---------------- | ------------------------ |\n| Headline    | 3 – 5 %          | 32 – 54 px               |\n| Body        | 1.5 – 2 %        | 16 – 22 px               |\n| Caption     | 1.2 – 1.5 %      | 13 – 16 px               |\n| Min legible | —                | 14 px                    |\n\n#### 6.1.3 Line height / leading — the headline rule\n\nLine spacing is the top driver of the \"inconsistent typography\" complaint. Three principles govern it: **explicitness** (every text block carries a deliberately set line-height — never an inherited default), the **inverse rule** (small text needs more line-height; large display needs less), and **consistency** (identical leading across same-band text within one design).\n\n- **Set line-height explicitly on every text block** — including single-line labels, captions, and all-caps titles, not just multi-line body copy. An unset line-height (the engine/CSS default) is a defect even when the block is one line: it silently tracks the font's default metrics, can't be verified against the bands below, and defeats both the consistency and all-caps rules. A one-line all-caps label still takes the tighter all-caps multiplier (**0.9–1.0**); the value is judged by band + intent, not by whether the text happens to wrap. Same-band single-line blocks (e.g. an attribution and a caption in the same face) share their leading just as body blocks do.\n\n> **Authoring in CoDesign / CE.SDK — write line-heights as `{ visual }`.** Every line-height figure in this section is a _visual_ CSS-style multiplier of the font size. The engine's raw `text/lineHeight` is a different scale (it multiplies the font's per-face content area), so a raw number renders looser than it reads. The facade converts for you — write the band value directly:\n>\n> ```js\n> await engine.design.setProps(block, {\n>   text: { lineHeight: { visual: 1.2 } }\n> });\n> // read back in the same terms:\n> await engine.design.getProps(block, ['text.lineHeightVisual']); // → 1.2\n> ```\n>\n> The conversion loads the face's metrics itself. A `{ visual }` (or font/size) write reshapes and replays every per-character style range for you. If you ever reshape via the raw APIs instead: **⚠ re-setting the string wipes every per-character style range** — capture with `getProps(id, ['text.ranges'])` and replay (§6.1.9). The judge scores the _rendered_ gap (§6.1.6), and reads it back via `text.lineHeightVisual` — same numbers as the bands below.\n>\n> **⚠ An explicit line-height from the user's brief is a visual target too** — write it as `{ visual }` and judge the rendered gap, never the raw engine number. A prompt asking for all-caps line-height **1.15** is not \"too loose for the 0.9–1.0 band\" until the _rendered_ gap violates §6.1.6; when the prompt names a line-height, the default is to use it.\n\n- **Web (unitless multipliers):**\n  - Body **1.4–1.6** (default **1.5**); long-form reading up to **1.65**.\n  - Headlines **1.1–1.25** (default **1.1**); large display **≤1.1** (default **1.1**).\n  - **All-caps display / headlines** take a **tighter** multiplier than mixed-case — **0.9–1.0** for multi-line — because caps fill only the cap-height band (~70% of the em) and use no descender space; a value that looks tight for mixed-case leaves a descender-sized void between all-caps lines. Judge by the **visual gap** (target ~0.15–0.25× cap height), not the number.\n  - **WCAG:** body line-height ≥ **1.5**; paragraph spacing ≥ **2×** the font size.\n- **Print (leading as a unitless multiplier of point size):**\n  - Body **1.2–1.45** (default **1.2**). Push toward the low end for dense or large-x-height faces, toward the high end for airy or small type.\n  - Headlines **1.0–1.2** (default **1.05**); tight display setting may go slightly negative (**0.95–1.0**).\n  - **All-caps titles: 0.9–1.0** (tighter than mixed-case display's 1.0–1.2) — same cap-height reason.\n- **Localized / non-Latin copy — the per-script rules live in the `localize` skill.** Per-script leading bands and diacritic rules — the capital-diacritic all-caps loosening, the marked-capital mixed-case nudge, the localized-display default, and the CJK / Arabic-Naskh / Vietnamese bands — live in the `localize` skill's `reference/` family files (`latin-expansion.md`, `arabic.md`, `cjk.md`, `vietnamese.md`, `cyrillic.md`). All values there are **visual multipliers** — apply this section's content-area conversion like every value here (§6.6).\n- **Tune leading to measure** — longer measure needs more leading; short measure needs less. Never set leading in isolation from line length (§6.1.4).\n- **Consistency** — every body block in one design shares the same leading; every same-band heading shares the same leading.\n- **Pass:** **every text block carries an explicit line-height (incl. single-line & all-caps labels)**; body line-height **1.4–1.6** (web) / **1.2–1.45** (print); headline leading tighter than body; **all-caps titles tighter still (0.9–1.0, web & print), no descender-void between lines**; leading uniform across same-band text; **localized / non-Latin leading set per the `localize` skill's family files**; WCAG body ≥ 1.5 (w",
              "tool": "read_skill_resource"
            },
            {
              "arguments": {
                "items": [
                  {
                    "kind": "output",
                    "path": "/tmp/garden.png"
                  },
                  {
                    "kind": "copy",
                    "text": "Community Garden Day"
                  },
                  {
                    "kind": "note",
                    "text": "Square announcement with a pale background; preview before delivery."
                  }
                ]
              },
              "reply": "{\"itemCount\":3}",
              "tool": "checklist"
            },
            {
              "arguments": {
                "uri": "skill://codesign/api/recipes.md"
              },
              "reply": "# Recipes — the constructs edit code uses, and the engine's known defects\n\nWorked examples next to the signatures in this skill's entry document: how a\npage is built, which construct each design rule calls for, fonts, custom\nshapes, stacking and grouping. The rules that choose between them are\n`skill://codesign/judge/design-rules.md`; the last sections are the engine's known\ndefects and what to check when text does not render.\n\n## Build ONE complete page per `edit`\n\nThe unit of work is the **page**: each `edit` emits one complete page — one\n`engine.design.create` with every block, font and size (it awaits resource\nloads itself), then positioning. Do **not** split one page's build across\ncalls: each tool call costs 20–200 s of streaming, so one ~10000-character\ncall beats three ~3000-character ones.\n\n```js\n// 1. Structure + every block of the page — ONE awaited create call\nconst scene = await engine.design.create({ type: 'scene' });\nconst page = await engine.design.create(\n  {\n    type: 'page',\n    props: { width: 720, height: 1008 },\n    children: [\n      {\n        type: 'text',\n        name: 'title',\n        props: {\n          text: {\n            // A FAMILY name makes create look the family up and pick\n            // that weight's file — no findAssets/fonts[0] hairline trap.\n            font: { family: 'Playfair Display', weight: 'bold' },\n            string: 'Alex & Jordan',\n            fontSize: '48px'\n          },\n          widthMode: 'Auto',\n          heightMode: 'Auto'\n        }\n      }\n      // ... every other block — all of it in props: ranges via\n      // text: { string, ranges: [{ from, to, color }] } (reshape-safe),\n      // solid panels via fill: { type: 'color', color: { value } }\n    ]\n  },\n  { parent: scene } // the page lands in the scene's stack\n);\n// create() awaited the subtree's font/image loads — measurements are live.\n\n// 2. Position with measured frame dims\nconst [title] = await engine.design.findByName('title');\nconst { width: w } = await engine.design.measure(title);\nawait engine.design.setProps(title, {\n  position: { x: (720 - w) / 2, y: 250 }\n});\n// ... position everything ...\n\nreturn { type: 'text', text: `page=${page} ready` };\n```\n\n**A new scene replaces the design you edit.** `create({ type: 'scene' })` is\nfor an empty design; continue a design that is already open with `edit`.\n\n**Name every block you may touch again**: `findByName` finds it in every\nlater edit, where matching copy breaks on an NBSP, a line break or shared text.\n\n**Text frames: Auto + measure.** Build text Auto-sized and position it by\n`measure`; body copy at a fixed column is `widthMode: 'Absolute'` with an Auto\nheight. `create`, `measure`, rendering and saving load fonts and images\nthemselves: never add a wait-for-fonts edit.\n\n**Editing an existing multi-page design:** a mechanical change applied\nuniformly (swap a font everywhere, recolour a brand accent) is one `edit`\nlooping over `await engine.design.findByType('page')`. Substantial per-page\nrework goes page by page, like a build.\n\n**Fix in place, never wipe and rebuild.** Identify the block and change it\nwith a targeted `setProps` — position, `fontSize`, the string. A new\n`create({ type: 'scene' })` is for a scene graph that is genuinely\nunrecoverable, which is rare: a rebuild costs about ten extra calls.\n\n## Which construct, by design rule\n\n- **A text-only chip** (pill, eyebrow, badge, tag, button) is a native text\n  background on the text block, never a rect behind floating text (design\n  rules §6.5.1):\n\n```js\n// A panel is a graphic; a text-only chip/pill/badge is NOT (next call).\nawait engine.design.create(\n  { type: 'graphic', props: { shape: 'rect', fill: { type: 'color', color: { value: c } } } },\n  { parent: page }\n);\nawait engine.design.setProps(text, {\n  backgroundColor: {\n    enabled: true,\n    color: c,\n    cornerRadius: 'pill',\n    paddingLeft: 16, // horizontal ~1.5–2.5× vertical\n    paddingRight: 16,\n    paddingTop: 8,\n    paddingBottom: 8\n  }\n});\n```\n\n- **Rich text** (an accent word, a bold lead-in, a price, ®/™) is `text.ranges`\n  in one block, never a second block beside the first (§6.1.9).\n- **All caps** is `text.case: 'Uppercase'`, never typed capitals (§6.1.6).\n- **Multi-paragraph copy and lists** are ONE block: one paragraph per item,\n  `listStyle` markers with a hanging indent, never \"• \" typed, a marker block\n  or a block per item (§6.1.8).\n- **Curved type** is ONE text block on `text.path` (`{ shape: 'circle',\n  diameter }` for a ring), never a block per letter; on a custom arc\n  `pathOffset` is a 0..1 fraction from the path's own `M` (§6.5.4).\n- **Fonts** are named by family, `text.font: { family, weight }`; a hand-built\n  `{ typeface, uri }` only for a font file you hold a uri for (below).\n\n## Fonts\n\nSet a font by family name inside `edit` code, `text: { font: { family, weight } }`: the API looks the family up in `ly.img.gfonts` (~2,000 Google families), picks the weight's file and loads it. Never hardcode font URLs or fetch font CSS yourself; pick an available family rather than guessing a URI. Which families to pair: design rules §6.7.\n`asset_search({ source: 'ly.img.gfonts', query })` shows what exists: each hit carries `typeface: { name, weights, styles }` and no font URIs.\n\nA font file on the user's machine (brand kit, purchased face) is imported first: `asset_add({ source: { path } })` returns a `uri`; use it verbatim as `text.font`'s `uri` and in `typeface.fonts[].uri`. A font a saved style's `tokens.json` names by URI is already in the store: use that URI as it is, no `asset_add`.\n\n## Custom shapes — `vector_path`, not a pile of rects\n\n**Any mark with a diagonal, a curve or a hole is one `vector_path` block.** The\nprimitives cannot express those, so approximating a mark out of rects and\nellipses produces stepped edges where a slope should be, and costs one block per\nstep: a windowed facade drawn that way came to 79 blocks and still rendered as a\nstaircase. The same mark as a path is one block with clean geometry.\nCutouts from primitives (`compound`), repeats, rounding, zigzags, draw-on\ntrims (`modifiers`) and gradient strokes (`stroke.fill`): `skill://codesign/api/shapes.md`.\n\n```js\nconst graphic = await engine.design.create(\n  {\n    type: 'graphic',\n    props: {\n      shape: {\n        type: 'vector_path',\n        vector_path: { path: d, width: 100, height: 100 }\n      },\n      fill: { type: 'color', color: { value: INK } },\n      width: 420, // on-canvas size, independent of the frame\n      height: 460\n    }\n  },\n  { parent: page }\n);\n```\n\n`vector_path` fills `NonZero` unless you name `fillRule`, so solid subpaths that\ncross union instead of knocking a hole where they meet. Put cut-outs in\n`vector_path: { path, holes: [d, …] }` — the facade winds them, whichever way\nthey are drawn.\n\n```js\nshape: { type: 'vector_path', vector_path: { path: body, holes: [windowD], width: 100, height: 100 } }\n```\n\n**Prefer four cubic Béziers to an SVG arc** for circles and rounded caps — it\nsidesteps `A` command largeArc/sweep flag handling entirely. Control points sit\nat `k = 0.5522847498 * r`.\n\n**Holes are real holes.** A `vector_path` hole shows whatever is behind the\nblock — page ground, another graphic, a photograph. Over a flat ground that is\nwhat you want; over a photograph it reads as a hard-edged cut-out rather than a\nprinted mark, so emit the solid subpaths only and drop the holes. Never fake a\nhole with a ground-coloured shape on top: it only matches a flat, known ground.\n\n## Z-order via child order (no z-index property)\n\nLater children paint on top. **Build pages back-to-front** — a default stack\nfor a designed page:\n\n1. page background — `setProps(page, { background: color })`\n2. full-bleed photo / image (first child, index 0)\n3. scrim / vignette / gradient overlay\n4. structural rules — grid hairlines, dividers, frames\n5. accent shapes — pills, badges, accent bars, icons\n6. body text\n7. headline / display text\n8. foreground decoration (corner brackets, stickers)\n\nIf ",
              "tool": "read_skill_resource"
            },
            {
              "arguments": {
                "code": "const scene = await engine.design.create({type:'scene'});\nconst page = await engine.design.create({type:'page',name:'Garden announcement',props:{width:1080,height:1080},children:[\n{type:'graphic',name:'Background',props:{position:{x:0,y:0},width:1080,height:1080,shape:'rect',fill:{type:'color',color:{value:{r:0.961,g:0.969,b:0.929,a:1}}}}},\n{type:'graphic',name:'Stem and leaves',props:{position:{x:390,y:145},width:300,height:290,shape:{type:'vector_path',vector_path:{width:300,height:290,path:'M 145 280 C 145 203 144 125 150 45 L 157 45 C 151 131 153 205 153 280 Z M 149 190 C 83 190 43 157 36 105 C 94 106 137 134 149 190 Z M 153 146 C 170 91 211 66 267 70 C 259 120 219 151 153 153 Z M 151 88 C 119 68 113 32 151 0 C 187 30 184 65 151 88 Z'}},fill:{type:'color',color:{value:{r:0.24,g:0.39,b:0.28,a:1}}}}},\n{type:'text',name:'Headline',props:{position:{x:115,y:500},width:850,heightMode:'Auto',text:{string:'Community Garden Day',font:{family:'Playfair Display',weight:'bold'},fontSize:'83px',lineHeight:{visual:1.1},color:{r:0.16,g:0.25,b:0.18,a:1},horizontalAlignment:'Center'}}},\n{type:'graphic',name:'Accent line',props:{position:{x:470,y:823},width:140,height:4,shape:'rect',fill:{type:'color',color:{value:{r:0.61,g:0.45,b:0.30,a:1}}}}}\n]}, {parent:scene});\nreturn {page};",
                "note": "Created a square pale garden announcement with an illustrated sprout and the requested headline.",
                "skills": "api,judge"
              },
              "reply": "error: the engine process could not start its engine: the native engine failed: Failed to load the @cesdk/node-native addon for linux-arm64. Your platform/arch 'linux-arm64' is not supported by @cesdk/node-native. Use @cesdk/node (WASM) for broader platform coverage; the WASM engine it falls back to failed too: CE.SDK licence activation could not reach api.img.ly (ECONNRESET); starting the engine needs a working connection to it",
              "tool": "edit"
            }
          ],
          "task": "Create a simple square announcement design with a pale background and the exact headline 'Community Garden Day', preview it, and export it as a PNG to /tmp/garden.png."
        },
        "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": "01M82SCRZKP59XY5AJKHTEJ5T1",
  "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.02,
      "question": "w06"
    },
    {
      "attempt": 7,
      "noul": 0.02,
      "question": "w07"
    },
    {
      "attempt": 8,
      "noul": 0.02,
      "question": "w08"
    }
  ]
}
