{
  "answers": {
    "c00": {
      "noul": 0.02,
      "type": "noul"
    },
    "c01": {
      "noul": 0.02,
      "type": "noul"
    },
    "c02": {
      "noul": 0.98,
      "type": "noul"
    },
    "c03": {
      "noul": 0.26,
      "type": "noul"
    },
    "c04": {
      "noul": 0.02,
      "type": "noul"
    },
    "c05": {
      "noul": 0.02,
      "type": "noul"
    },
    "c06": {
      "noul": 0.55,
      "type": "noul"
    },
    "c07": {
      "noul": 0.77,
      "type": "noul"
    },
    "c08": {
      "noul": 0.48,
      "type": "noul"
    },
    "c09": {
      "noul": 0.76,
      "type": "noul"
    },
    "c10": {
      "noul": 0.45,
      "type": "noul"
    },
    "c11": {
      "noul": 0.76,
      "type": "noul"
    },
    "c12": {
      "noul": 0.63,
      "type": "noul"
    },
    "c13": {
      "noul": 0.55,
      "type": "noul"
    },
    "c14": {
      "noul": 0.93,
      "type": "noul"
    },
    "w00": {
      "noul": 0.99,
      "type": "noul"
    },
    "w01": {
      "noul": 0.98,
      "type": "noul"
    },
    "w02": {
      "noul": 0.98,
      "type": "noul"
    },
    "w03": {
      "noul": 0.91,
      "type": "noul"
    },
    "w04": {
      "noul": 0.83,
      "type": "noul"
    },
    "w05": {
      "noul": 0.9,
      "type": "noul"
    }
  },
  "asked_at": "2026-11-23T04:48:45Z",
  "endpoint": "https://api.typesafe.ai/v1/systemone",
  "errors_helpful": [
    {
      "call": 0,
      "noul": 0.02,
      "question": "c00"
    },
    {
      "call": 1,
      "noul": 0.02,
      "question": "c01"
    },
    {
      "call": 2,
      "noul": 0.98,
      "question": "c02"
    },
    {
      "call": 3,
      "noul": 0.26,
      "question": "c03"
    },
    {
      "call": 4,
      "noul": 0.02,
      "question": "c04"
    },
    {
      "call": 5,
      "noul": 0.02,
      "question": "c05"
    },
    {
      "call": 6,
      "noul": 0.55,
      "question": "c06"
    },
    {
      "call": 7,
      "noul": 0.77,
      "question": "c07"
    },
    {
      "call": 8,
      "noul": 0.48,
      "question": "c08"
    },
    {
      "call": 9,
      "noul": 0.76,
      "question": "c09"
    },
    {
      "call": 10,
      "noul": 0.45,
      "question": "c10"
    },
    {
      "call": 11,
      "noul": 0.76,
      "question": "c11"
    },
    {
      "call": 12,
      "noul": 0.63,
      "question": "c12"
    },
    {
      "call": 13,
      "noul": 0.55,
      "question": "c13"
    },
    {
      "call": 14,
      "noul": 0.93,
      "question": "c14"
    }
  ],
  "format": "didrun.judgments.v1",
  "input_tokens": 12682,
  "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": "Error: 0 Network error: fetch failed\n{}",
          "tool": "generate_code"
        },
        "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": {
            "language": {}
          },
          "parameter": "language",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "Error: 0 Network error: fetch failed\n{}",
          "tool": "generate_code"
        },
        "type": "noul"
      },
      "c02": {
        "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": "Error loading spec from file: The \"paths[0]\" argument must be of type string. Received undefined",
          "tool": "load_spec_from_file"
        },
        "type": "noul"
      },
      "c03": {
        "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": {
            "specFilePath": {}
          },
          "parameter": "specFilePath",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "Error loading spec from file: The \"paths[0]\" argument must be of type string. Received an instance of Object",
          "tool": "load_spec_from_file"
        },
        "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": {
            "dryRun": "not a boolean"
          },
          "parameter": "dryRun",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "Recipe error: arguments: supply exactly one of recipe or recipeFilePath",
          "tool": "generate_from_recipe"
        },
        "type": "noul"
      },
      "c05": {
        "criteria": {
          "false": "The reply does not point to `parameter`: for example a generic failure, an error about another argument, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply points to `parameter` or to its value and says the value has the wrong type or is not accepted."
        },
        "instructions": {
          "arguments_sent": {
            "language": {}
          },
          "parameter": "language",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "# MetaEngine MCP — generation guide\n\nMetaEngine generates source files from structured type definitions and target-language code. Type and model generation supports TypeScript, Python, Go, C#, Java, Kotlin, Groovy, Scala, Swift, PHP, and Rust.\n\n## Choose a tool\n\n- `generate_from_recipe`: compact property maps, explicit references, reusable parameter templates, and local JSON data rows. Start with [RECIPES.md](./RECIPES.md), also available as `metaengine://guide/recipes`.\n- `generate_code`: the existing complete native JSON payload.\n- `load_spec_from_file`: the same native payload read from a local file.\n- `generate_openapi`, `generate_graphql`, `generate_protobuf`, `generate_sql`: convert an existing schema using their tool-specific options.\n\nThe three type-graph tools share the hosted generation API and local file writer. `dryRun` previews source without writing it; `skipExisting` defaults to true. The hosted request limit is 250 counted types, with the existing counting rule documented in the recipe guide.\n\n## References and batch boundaries\n\nGenerate related types together. IDs resolve within a single request. A class or interface declares `typeIdentifier`; a property refers to it with the same field. Recipes also accept the compact aliases `id` on definitions and `ref` on map properties.\n\nUse `templateRefs` wherever target-language text refers to an internal type:\n\n```json\n{\n  \"code\": \"read(): Promise<$item>;\",\n  \"templateRefs\": [{ \"placeholder\": \"$item\", \"typeIdentifier\": \"item\" }]\n}\n```\n\nThe reference resolves the type name and supports import generation. Merely writing an internal type's name in a raw code string does not create a graph reference. `templateRefs` are supported on custom code, native property type expressions, constructor parameter type expressions, and decorators; properties also support `commentTemplateRefs`.\n\nExternal types use `customImports` with the target language's import path and names. The generator handles recognized standard-library",
          "tool": "metaengine_initialize"
        },
        "type": "noul"
      },
      "c06": {
        "criteria": {
          "false": "The reply names no argument of the tool: for example a generic failure, a stack trace with no argument named, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply names at least one argument of the tool that the call left out or got wrong, and so tells the caller what to change."
        },
        "instructions": {
          "arguments_sent": {},
          "question": "Does `reply` name an argument that the call must add or fix?",
          "reply": "Error calling OpenAPI generation API: dispatch[framework] is not a function",
          "tool": "generate_openapi"
        },
        "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": {
            "framework": {}
          },
          "parameter": "framework",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "Error calling OpenAPI generation API: dispatch[framework] is not a function",
          "tool": "generate_openapi"
        },
        "type": "noul"
      },
      "c08": {
        "criteria": {
          "false": "The reply names no argument of the tool: for example a generic failure, a stack trace with no argument named, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply names at least one argument of the tool that the call left out or got wrong, and so tells the caller what to change."
        },
        "instructions": {
          "arguments_sent": {},
          "question": "Does `reply` name an argument that the call must add or fix?",
          "reply": "Error calling MetaEngine API: dispatch[framework] is not a function",
          "tool": "generate_graphql"
        },
        "type": "noul"
      },
      "c09": {
        "criteria": {
          "false": "The reply does not point to `parameter`: for example a generic failure, an error about another argument, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply points to `parameter` or to its value and says the value has the wrong type or is not accepted."
        },
        "instructions": {
          "arguments_sent": {
            "framework": {},
            "graphQLSchema": "didrun"
          },
          "parameter": "framework",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "Error calling MetaEngine API: dispatch[framework] is not a function",
          "tool": "generate_graphql"
        },
        "type": "noul"
      },
      "c10": {
        "criteria": {
          "false": "The reply names no argument of the tool: for example a generic failure, a stack trace with no argument named, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply names at least one argument of the tool that the call left out or got wrong, and so tells the caller what to change."
        },
        "instructions": {
          "arguments_sent": {},
          "question": "Does `reply` name an argument that the call must add or fix?",
          "reply": "Error calling MetaEngine API: dispatch[framework] is not a function",
          "tool": "generate_protobuf"
        },
        "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": {
            "framework": {},
            "protoSource": "didrun"
          },
          "parameter": "framework",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "Error calling MetaEngine API: dispatch[framework] is not a function",
          "tool": "generate_protobuf"
        },
        "type": "noul"
      },
      "c12": {
        "criteria": {
          "false": "The reply names no argument of the tool: for example a generic failure, a stack trace with no argument named, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply names at least one argument of the tool that the call left out or got wrong, and so tells the caller what to change."
        },
        "instructions": {
          "arguments_sent": {},
          "question": "Does `reply` name an argument that the call must add or fix?",
          "reply": "Error calling MetaEngine API: dispatch[language] is not a function",
          "tool": "generate_sql"
        },
        "type": "noul"
      },
      "c13": {
        "criteria": {
          "false": "The reply does not point to `parameter`: for example a generic failure, an error about another argument, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply points to `parameter` or to its value and says the value has the wrong type or is not accepted."
        },
        "instructions": {
          "arguments_sent": {
            "ddlSource": "didrun",
            "language": {}
          },
          "parameter": "language",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "Error calling MetaEngine API: dispatch[language] is not a function",
          "tool": "generate_sql"
        },
        "type": "noul"
      },
      "c14": {
        "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": "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": "## MetaEngine initialization guidance for TypeScript\n\nI requested MetaEngine’s TypeScript initialization guidance. The tool returned these main patterns and resources.\n\n### Choose a generation tool\n\n- **`generate_from_recipe`** — compact property maps, explicit references, reusable templates, and local JSON data rows.\n- **`generate_code`** — a complete native JSON payload.\n- **`load_spec_from_file`** — a native JSON payload read from a local file.\n- **`generate_openapi`, `generate_graphql`, `generate_protobuf`, `generate_sql`** — generate from an existing schema using tool-specific options.\n\nThe type-graph tools support `dryRun` to preview source without writing files. `skipExisting` defaults to `true`. The hosted request limit is **250 counted types**; the recipe guide documents the counting rule.\n\n### Main patterns\n\n1. **Generate related types together.** IDs resolve within one request. Declare a `typeIdentifier` on a class or interface and use it to reference the type. Recipes also support `id` and `ref` aliases.\n\n2. **Make references in raw code explicit with `templateRefs`.** This resolves the rendered type name and supports import generation:\n   ```json\n   {\n     \"code\": \"read(): Promise<$item>;\",\n     \"templateRefs\": [\n       { \"placeholder\": \"$item\", \"typeIdentifier\": \"item\" }\n     ]\n   }\n   ```\n   Writing a type’s name directly in a raw code string does not create a graph reference.\n\n3. **Separate declarations from behavior.** Use `properties` for typed declarations and `customCode` for methods, initialized fields, constructors with bodies, and other target-language members. Keep each member in its own code block. Use `customFiles` for content without a class wrapper, such as functions and aliases.\n\n4. **Use `customImports` for external types.** The generator does not install external packages. Custom-file identifiers are for import resolution, not regular type-graph references.\n\n5. **Avoid duplicate constructor properties.** Constructor parameters can crea",
          "done_when": "The tool reply provides MetaEngine guidance or documentation references relevant to TypeScript.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {
                "language": "typescript"
              },
              "reply": "# MetaEngine MCP — generation guide\n\nMetaEngine generates source files from structured type definitions and target-language code. Type and model generation supports TypeScript, Python, Go, C#, Java, Kotlin, Groovy, Scala, Swift, PHP, and Rust.\n\n## Choose a tool\n\n- `generate_from_recipe`: compact property maps, explicit references, reusable parameter templates, and local JSON data rows. Start with [RECIPES.md](./RECIPES.md), also available as `metaengine://guide/recipes`.\n- `generate_code`: the existing complete native JSON payload.\n- `load_spec_from_file`: the same native payload read from a local file.\n- `generate_openapi`, `generate_graphql`, `generate_protobuf`, `generate_sql`: convert an existing schema using their tool-specific options.\n\nThe three type-graph tools share the hosted generation API and local file writer. `dryRun` previews source without writing it; `skipExisting` defaults to true. The hosted request limit is 250 counted types, with the existing counting rule documented in the recipe guide.\n\n## References and batch boundaries\n\nGenerate related types together. IDs resolve within a single request. A class or interface declares `typeIdentifier`; a property refers to it with the same field. Recipes also accept the compact aliases `id` on definitions and `ref` on map properties.\n\nUse `templateRefs` wherever target-language text refers to an internal type:\n\n```json\n{\n  \"code\": \"read(): Promise<$item>;\",\n  \"templateRefs\": [{ \"placeholder\": \"$item\", \"typeIdentifier\": \"item\" }]\n}\n```\n\nThe reference resolves the type name and supports import generation. Merely writing an internal type's name in a raw code string does not create a graph reference. `templateRefs` are supported on custom code, native property type expressions, constructor parameter type expressions, and decorators; properties also support `commentTemplateRefs`.\n\nExternal types use `customImports` with the target language's import path and names. The generator handles recognized standard-library imports. It does not install external packages.\n\nCustom-file identifiers belong to import resolution, not the regular type graph. Where supported, refer to one with `customImports.path`; for C#, use the custom file's namespace. Do not target a custom-file identifier with `ref` or `templateRefs.typeIdentifier`. Code inside a custom file can still use `templateRefs` to refer to ordinary generated types.\n\n## Declarations and custom code\n\nUse `properties` for typed declarations. Use `customCode` for methods, initialized fields, constructors with bodies, and other target-language members. Keep each member in its own code block. `customFiles` produce files without a class wrapper and can hold functions, aliases, or other source content.\n\nUse interface method signatures in `customCode` when classes will implement those methods. A function-typed property and a method are different declarations.\n\nConstructor parameters can create properties in the selected language. Do not repeat a constructor parameter as an additional property. For a constructor with custom logic, supply the constructor code and any fields explicitly in `customCode`.\n\nThe generator renders your supplied structure and code. Compile the result in its real project to check method bodies, dependencies, language rules, and compiler options.\n\n## Native features retained by recipes\n\n| Feature | Native fields |\n| --- | --- |\n| Named types | `classes`, `interfaces`, `enums`, `typeIdentifier`, `name`, `path`, `fileName` |\n| Properties | `name`, `primitiveType`, `typeIdentifier`, `type`, `isOptional`, `isInitializer`, comments and decorators |\n| Inheritance | `baseClassTypeIdentifier`, `interfaceTypeIdentifiers` |\n| Generic definitions | `genericArguments` with name, constraint, and optional property metadata |\n| Concrete generic references | `concreteGenericClasses`, `concreteGenericInterfaces`, `identifier`, `genericClassIdentifier`, `genericArguments` |\n| Collection references | `arrayTypes`, `dictionaryTypes` |\n| Target-language content | `customCode`, `customFiles`, `customImports`, `templateRefs` |\n| Generation settings | `initialize`, `packageName`, `typeScriptOptions`, `skipEnumMembersValidation` |\n\nArray, dictionary, and concrete generic definitions are virtual types: they can be referenced but do not generate files of their own. A concrete generic's `genericClassIdentifier` refers to its generic declaration, including for interfaces; keep that existing field name.\n\n## Language notes\n\n### TypeScript\n\nFor Node16/NodeNext ESM, use `typeScriptOptions: {\"relativeImportExtension\":\"js\"}` so generated `.ts` source imports runtime `.js` paths. The default uses extensionless relative imports.\n\nNative primitives `String`, `Number`, `Boolean`, `Date`, and `Any` render as `string`, `number`, `boolean`, `Date`, and `unknown`. Recipes spell those primitive choices in lowercase. For native expressions such as `Map<string, $item>`, use `type` plus `templateRefs`.\n\nThe engine can normalize interface names. Use references to obtain the rendered name, and explicit `fileName` values when an interface and class would otherwise share a file name.\n\n### C#\n\n`packageName` sets the root namespace; type paths contribute namespace segments. Omit the package name when you want no root namespace. Do not put namespace wrappers in individual custom members.\n\n`Number` selects `int`. Use native `type: \"decimal\"` or `type: \"double\"` for those numeric types. Optional properties use the language's nullable representation. Configure nullable reference types and the language version in the consuming project.\n\nUse `templateRefs` for internal cross-namespace types in custom code. For a specific collection such as `List<T>`, use `type: \"List<$item>\"` with a reference. The language emitter chooses the collection spelling for a virtual `arrayTypes` definition.\n\n### Other languages\n\nKeep method bodies and native type expressions in the selected language. Python bodies need valid indentation. Go multi-file output needs a package/module layout appropriate to the consuming project. Add the generated code's required libraries to the target project.\n\n## Before generation\n\n1. Include every internally referenced type in the same batch.\n2. Use structured properties for declarations and custom code for behavior.\n3. Make every internal reference in a raw type expression or code block explicit with `templateRefs`.\n4. Choose output paths, native imports, package/namespace names, and compiler options deliberately.\n5. Review and compile the generated output.\n\n[Complete examples](./EXAMPLES.md) · [Recipe syntax and limits](./RECIPES.md)\n",
              "tool": "metaengine_initialize"
            }
          ],
          "task": "Show me MetaEngine's initialization guidance for TypeScript, including its main patterns and documentation resources."
        },
        "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": "## MetaEngine initialization guidance for TypeScript\n\nI called MetaEngine’s initialization tool for TypeScript. It returned the following main patterns and documentation resources.\n\n### Choose a generation tool\n\n- **`generate_from_recipe`** — compact property maps, explicit references, reusable templates, and local JSON data rows.\n- **`generate_code`** — a complete native JSON payload.\n- **`load_spec_from_file`** — a native payload read from a local file.\n- **`generate_openapi`, `generate_graphql`, `generate_protobuf`, `generate_sql`** — generate from an existing schema.\n\nFor type-graph generation, `dryRun` previews source without writing it, and `skipExisting` defaults to `true`. The hosted request limit is **250 counted types**; the recipe guide documents the counting rule.\n\n### Main patterns\n\n1. **Generate related types together.** Type identifiers resolve within a single request. A definition declares a `typeIdentifier`, and a property references that identifier. Recipes also accept `id` and `ref` aliases.\n\n2. **Make references in raw code explicit.** Use `templateRefs` when target-language code or a native type expression refers to a generated type. This lets MetaEngine resolve the rendered name and generate imports:\n\n   ```json\n   {\n     \"code\": \"read(): Promise<$item>;\",\n     \"templateRefs\": [\n       { \"placeholder\": \"$item\", \"typeIdentifier\": \"item\" }\n     ]\n   }\n   ```\n\n   Writing a generated type’s name directly in a raw string does not create a graph reference. Use `customImports` for external types; the generator does not install external packages.\n\n3. **Separate declarations from behavior.** Use `properties` for typed declarations and `customCode` for methods, initialized fields, constructors with bodies, and other members. Keep each member in its own code block. Use `customFiles` for source without a class wrapper, such as functions or type aliases.\n\n4. **Avoid duplicating constructor properties.** Constructor parameters can create properties; don’t al",
          "done_when": "The tool reply provides MetaEngine guidance or documentation references relevant to TypeScript.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {
                "language": "typescript"
              },
              "reply": "# MetaEngine MCP — generation guide\n\nMetaEngine generates source files from structured type definitions and target-language code. Type and model generation supports TypeScript, Python, Go, C#, Java, Kotlin, Groovy, Scala, Swift, PHP, and Rust.\n\n## Choose a tool\n\n- `generate_from_recipe`: compact property maps, explicit references, reusable parameter templates, and local JSON data rows. Start with [RECIPES.md](./RECIPES.md), also available as `metaengine://guide/recipes`.\n- `generate_code`: the existing complete native JSON payload.\n- `load_spec_from_file`: the same native payload read from a local file.\n- `generate_openapi`, `generate_graphql`, `generate_protobuf`, `generate_sql`: convert an existing schema using their tool-specific options.\n\nThe three type-graph tools share the hosted generation API and local file writer. `dryRun` previews source without writing it; `skipExisting` defaults to true. The hosted request limit is 250 counted types, with the existing counting rule documented in the recipe guide.\n\n## References and batch boundaries\n\nGenerate related types together. IDs resolve within a single request. A class or interface declares `typeIdentifier`; a property refers to it with the same field. Recipes also accept the compact aliases `id` on definitions and `ref` on map properties.\n\nUse `templateRefs` wherever target-language text refers to an internal type:\n\n```json\n{\n  \"code\": \"read(): Promise<$item>;\",\n  \"templateRefs\": [{ \"placeholder\": \"$item\", \"typeIdentifier\": \"item\" }]\n}\n```\n\nThe reference resolves the type name and supports import generation. Merely writing an internal type's name in a raw code string does not create a graph reference. `templateRefs` are supported on custom code, native property type expressions, constructor parameter type expressions, and decorators; properties also support `commentTemplateRefs`.\n\nExternal types use `customImports` with the target language's import path and names. The generator handles recognized standard-library imports. It does not install external packages.\n\nCustom-file identifiers belong to import resolution, not the regular type graph. Where supported, refer to one with `customImports.path`; for C#, use the custom file's namespace. Do not target a custom-file identifier with `ref` or `templateRefs.typeIdentifier`. Code inside a custom file can still use `templateRefs` to refer to ordinary generated types.\n\n## Declarations and custom code\n\nUse `properties` for typed declarations. Use `customCode` for methods, initialized fields, constructors with bodies, and other target-language members. Keep each member in its own code block. `customFiles` produce files without a class wrapper and can hold functions, aliases, or other source content.\n\nUse interface method signatures in `customCode` when classes will implement those methods. A function-typed property and a method are different declarations.\n\nConstructor parameters can create properties in the selected language. Do not repeat a constructor parameter as an additional property. For a constructor with custom logic, supply the constructor code and any fields explicitly in `customCode`.\n\nThe generator renders your supplied structure and code. Compile the result in its real project to check method bodies, dependencies, language rules, and compiler options.\n\n## Native features retained by recipes\n\n| Feature | Native fields |\n| --- | --- |\n| Named types | `classes`, `interfaces`, `enums`, `typeIdentifier`, `name`, `path`, `fileName` |\n| Properties | `name`, `primitiveType`, `typeIdentifier`, `type`, `isOptional`, `isInitializer`, comments and decorators |\n| Inheritance | `baseClassTypeIdentifier`, `interfaceTypeIdentifiers` |\n| Generic definitions | `genericArguments` with name, constraint, and optional property metadata |\n| Concrete generic references | `concreteGenericClasses`, `concreteGenericInterfaces`, `identifier`, `genericClassIdentifier`, `genericArguments` |\n| Collection references | `arrayTypes`, `dictionaryTypes` |\n| Target-language content | `customCode`, `customFiles`, `customImports`, `templateRefs` |\n| Generation settings | `initialize`, `packageName`, `typeScriptOptions`, `skipEnumMembersValidation` |\n\nArray, dictionary, and concrete generic definitions are virtual types: they can be referenced but do not generate files of their own. A concrete generic's `genericClassIdentifier` refers to its generic declaration, including for interfaces; keep that existing field name.\n\n## Language notes\n\n### TypeScript\n\nFor Node16/NodeNext ESM, use `typeScriptOptions: {\"relativeImportExtension\":\"js\"}` so generated `.ts` source imports runtime `.js` paths. The default uses extensionless relative imports.\n\nNative primitives `String`, `Number`, `Boolean`, `Date`, and `Any` render as `string`, `number`, `boolean`, `Date`, and `unknown`. Recipes spell those primitive choices in lowercase. For native expressions such as `Map<string, $item>`, use `type` plus `templateRefs`.\n\nThe engine can normalize interface names. Use references to obtain the rendered name, and explicit `fileName` values when an interface and class would otherwise share a file name.\n\n### C#\n\n`packageName` sets the root namespace; type paths contribute namespace segments. Omit the package name when you want no root namespace. Do not put namespace wrappers in individual custom members.\n\n`Number` selects `int`. Use native `type: \"decimal\"` or `type: \"double\"` for those numeric types. Optional properties use the language's nullable representation. Configure nullable reference types and the language version in the consuming project.\n\nUse `templateRefs` for internal cross-namespace types in custom code. For a specific collection such as `List<T>`, use `type: \"List<$item>\"` with a reference. The language emitter chooses the collection spelling for a virtual `arrayTypes` definition.\n\n### Other languages\n\nKeep method bodies and native type expressions in the selected language. Python bodies need valid indentation. Go multi-file output needs a package/module layout appropriate to the consuming project. Add the generated code's required libraries to the target project.\n\n## Before generation\n\n1. Include every internally referenced type in the same batch.\n2. Use structured properties for declarations and custom code for behavior.\n3. Make every internal reference in a raw type expression or code block explicit with `templateRefs`.\n4. Choose output paths, native imports, package/namespace names, and compiler options deliberately.\n5. Review and compile the generated output.\n\n[Complete examples](./EXAMPLES.md) · [Recipe syntax and limits](./RECIPES.md)\n",
              "tool": "metaengine_initialize"
            }
          ],
          "task": "Show me MetaEngine's initialization guidance for TypeScript, including its main patterns and documentation resources."
        },
        "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": "## MetaEngine initialization guidance for TypeScript\n\nI called MetaEngine’s initialization helper with `language: \"typescript\"`. It returned the following guidance.\n\n### Choose a generation tool\n\n- **`generate_from_recipe`**: compact property maps, explicit references, reusable templates, and local JSON data rows.\n- **`generate_code`**: a complete native JSON generation payload.\n- **`load_spec_from_file`**: a native payload read from a local file.\n- **`generate_openapi`**, **`generate_graphql`**, **`generate_protobuf`**, and **`generate_sql`**: generate from an existing schema.\n\nThe type-graph tools share a hosted generation API and local file writer. Use `dryRun` to preview without writing files; `skipExisting` defaults to `true`. The hosted request limit is **250 counted types**, using the counting rule documented in the recipe guide.\n\n### Main patterns\n\n1. **Generate related types together.** Type IDs resolve within a single request. Definitions declare a `typeIdentifier`; properties reference it using the same field. Recipes also support `id` and `ref` aliases.\n\n2. **Use explicit references in custom code and type expressions.** A raw type name alone does not establish a graph reference or generate an import:\n\n   ```json\n   {\n     \"code\": \"read(): Promise<$item>;\",\n     \"templateRefs\": [\n       { \"placeholder\": \"$item\", \"typeIdentifier\": \"item\" }\n     ]\n   }\n   ```\n\n   `templateRefs` also work in native property and constructor parameter type expressions and decorators. External types instead use `customImports`.\n\n3. **Separate declarations from behavior.** Use `properties` for typed declarations and `customCode` for methods, initialized fields, and constructors with bodies. Keep each member in its own code block. Use `customFiles` for source without a class wrapper, such as functions or type aliases.\n\n4. **Avoid duplicate constructor properties.** Constructor parameters can create properties; don’t also declare the same property separately. For a constructor wi",
          "done_when": "The tool reply provides MetaEngine guidance or documentation references relevant to TypeScript.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {
                "language": "typescript"
              },
              "reply": "# MetaEngine MCP — generation guide\n\nMetaEngine generates source files from structured type definitions and target-language code. Type and model generation supports TypeScript, Python, Go, C#, Java, Kotlin, Groovy, Scala, Swift, PHP, and Rust.\n\n## Choose a tool\n\n- `generate_from_recipe`: compact property maps, explicit references, reusable parameter templates, and local JSON data rows. Start with [RECIPES.md](./RECIPES.md), also available as `metaengine://guide/recipes`.\n- `generate_code`: the existing complete native JSON payload.\n- `load_spec_from_file`: the same native payload read from a local file.\n- `generate_openapi`, `generate_graphql`, `generate_protobuf`, `generate_sql`: convert an existing schema using their tool-specific options.\n\nThe three type-graph tools share the hosted generation API and local file writer. `dryRun` previews source without writing it; `skipExisting` defaults to true. The hosted request limit is 250 counted types, with the existing counting rule documented in the recipe guide.\n\n## References and batch boundaries\n\nGenerate related types together. IDs resolve within a single request. A class or interface declares `typeIdentifier`; a property refers to it with the same field. Recipes also accept the compact aliases `id` on definitions and `ref` on map properties.\n\nUse `templateRefs` wherever target-language text refers to an internal type:\n\n```json\n{\n  \"code\": \"read(): Promise<$item>;\",\n  \"templateRefs\": [{ \"placeholder\": \"$item\", \"typeIdentifier\": \"item\" }]\n}\n```\n\nThe reference resolves the type name and supports import generation. Merely writing an internal type's name in a raw code string does not create a graph reference. `templateRefs` are supported on custom code, native property type expressions, constructor parameter type expressions, and decorators; properties also support `commentTemplateRefs`.\n\nExternal types use `customImports` with the target language's import path and names. The generator handles recognized standard-library imports. It does not install external packages.\n\nCustom-file identifiers belong to import resolution, not the regular type graph. Where supported, refer to one with `customImports.path`; for C#, use the custom file's namespace. Do not target a custom-file identifier with `ref` or `templateRefs.typeIdentifier`. Code inside a custom file can still use `templateRefs` to refer to ordinary generated types.\n\n## Declarations and custom code\n\nUse `properties` for typed declarations. Use `customCode` for methods, initialized fields, constructors with bodies, and other target-language members. Keep each member in its own code block. `customFiles` produce files without a class wrapper and can hold functions, aliases, or other source content.\n\nUse interface method signatures in `customCode` when classes will implement those methods. A function-typed property and a method are different declarations.\n\nConstructor parameters can create properties in the selected language. Do not repeat a constructor parameter as an additional property. For a constructor with custom logic, supply the constructor code and any fields explicitly in `customCode`.\n\nThe generator renders your supplied structure and code. Compile the result in its real project to check method bodies, dependencies, language rules, and compiler options.\n\n## Native features retained by recipes\n\n| Feature | Native fields |\n| --- | --- |\n| Named types | `classes`, `interfaces`, `enums`, `typeIdentifier`, `name`, `path`, `fileName` |\n| Properties | `name`, `primitiveType`, `typeIdentifier`, `type`, `isOptional`, `isInitializer`, comments and decorators |\n| Inheritance | `baseClassTypeIdentifier`, `interfaceTypeIdentifiers` |\n| Generic definitions | `genericArguments` with name, constraint, and optional property metadata |\n| Concrete generic references | `concreteGenericClasses`, `concreteGenericInterfaces`, `identifier`, `genericClassIdentifier`, `genericArguments` |\n| Collection references | `arrayTypes`, `dictionaryTypes` |\n| Target-language content | `customCode`, `customFiles`, `customImports`, `templateRefs` |\n| Generation settings | `initialize`, `packageName`, `typeScriptOptions`, `skipEnumMembersValidation` |\n\nArray, dictionary, and concrete generic definitions are virtual types: they can be referenced but do not generate files of their own. A concrete generic's `genericClassIdentifier` refers to its generic declaration, including for interfaces; keep that existing field name.\n\n## Language notes\n\n### TypeScript\n\nFor Node16/NodeNext ESM, use `typeScriptOptions: {\"relativeImportExtension\":\"js\"}` so generated `.ts` source imports runtime `.js` paths. The default uses extensionless relative imports.\n\nNative primitives `String`, `Number`, `Boolean`, `Date`, and `Any` render as `string`, `number`, `boolean`, `Date`, and `unknown`. Recipes spell those primitive choices in lowercase. For native expressions such as `Map<string, $item>`, use `type` plus `templateRefs`.\n\nThe engine can normalize interface names. Use references to obtain the rendered name, and explicit `fileName` values when an interface and class would otherwise share a file name.\n\n### C#\n\n`packageName` sets the root namespace; type paths contribute namespace segments. Omit the package name when you want no root namespace. Do not put namespace wrappers in individual custom members.\n\n`Number` selects `int`. Use native `type: \"decimal\"` or `type: \"double\"` for those numeric types. Optional properties use the language's nullable representation. Configure nullable reference types and the language version in the consuming project.\n\nUse `templateRefs` for internal cross-namespace types in custom code. For a specific collection such as `List<T>`, use `type: \"List<$item>\"` with a reference. The language emitter chooses the collection spelling for a virtual `arrayTypes` definition.\n\n### Other languages\n\nKeep method bodies and native type expressions in the selected language. Python bodies need valid indentation. Go multi-file output needs a package/module layout appropriate to the consuming project. Add the generated code's required libraries to the target project.\n\n## Before generation\n\n1. Include every internally referenced type in the same batch.\n2. Use structured properties for declarations and custom code for behavior.\n3. Make every internal reference in a raw type expression or code block explicit with `templateRefs`.\n4. Choose output paths, native imports, package/namespace names, and compiler options deliberately.\n5. Review and compile the generated output.\n\n[Complete examples](./EXAMPLES.md) · [Recipe syntax and limits](./RECIPES.md)\n",
              "tool": "metaengine_initialize"
            }
          ],
          "task": "Show me MetaEngine's initialization guidance for TypeScript, including its main patterns and documentation resources."
        },
        "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": "The recipe cannot be expanded because `instances[0]` references the template **`MissingModel`**, but the `templates` object is empty. Define that template or change the instance to reference an existing one.\n\nThe validation tool returned: `instances[0].template: unknown template MissingModel`. No files were written.",
          "done_when": "The tool reply reports that the instance references an undefined or unknown MissingModel template, without requiring hosted generation.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {
                "dryRun": true,
                "recipe": {
                  "instances": [
                    {
                      "template": "MissingModel",
                      "values": [
                        {
                          "name": "User"
                        }
                      ]
                    }
                  ],
                  "language": "typescript",
                  "recipeVersion": 1,
                  "templates": {}
                }
              },
              "reply": "error: Recipe error: instances[0].template: unknown template MissingModel",
              "tool": "generate_from_recipe"
            }
          ],
          "task": "Validate this recipe without writing files: {\"recipeVersion\":1,\"language\":\"typescript\",\"templates\":{},\"instances\":[{\"template\":\"MissingModel\",\"values\":[{\"name\":\"User\"}]}]}. Tell me why it cannot be expanded."
        },
        "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": "The recipe cannot be expanded because `instances[0]` references the template **`MissingModel`**, but the `templates` object is empty.\n\nValidation returned: `instances[0].template: unknown template MissingModel`. No files were written.",
          "done_when": "The tool reply reports that the instance references an undefined or unknown MissingModel template, without requiring hosted generation.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {
                "dryRun": true,
                "recipe": {
                  "instances": [
                    {
                      "template": "MissingModel",
                      "values": [
                        {
                          "name": "User"
                        }
                      ]
                    }
                  ],
                  "language": "typescript",
                  "recipeVersion": 1,
                  "templates": {}
                }
              },
              "reply": "error: Recipe error: instances[0].template: unknown template MissingModel",
              "tool": "generate_from_recipe"
            }
          ],
          "task": "Validate this recipe without writing files: {\"recipeVersion\":1,\"language\":\"typescript\",\"templates\":{},\"instances\":[{\"template\":\"MissingModel\",\"values\":[{\"name\":\"User\"}]}]}. Tell me why it cannot be expanded."
        },
        "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": "The recipe cannot be expanded because `instances[0]` references the template **`MissingModel`**, but the `templates` object is empty. The tool reported:\n\n> `instances[0].template: unknown template MissingModel`\n\nDefine `MissingModel` in `templates`, or change the instance to reference an existing template. No files were written.",
          "done_when": "The tool reply reports that the instance references an undefined or unknown MissingModel template, without requiring hosted generation.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {
                "dryRun": true,
                "recipe": {
                  "instances": [
                    {
                      "template": "MissingModel",
                      "values": [
                        {
                          "name": "User"
                        }
                      ]
                    }
                  ],
                  "language": "typescript",
                  "recipeVersion": 1,
                  "templates": {}
                }
              },
              "reply": "error: Recipe error: instances[0].template: unknown template MissingModel",
              "tool": "generate_from_recipe"
            }
          ],
          "task": "Validate this recipe without writing files: {\"recipeVersion\":1,\"language\":\"typescript\",\"templates\":{},\"instances\":[{\"template\":\"MissingModel\",\"values\":[{\"name\":\"User\"}]}]}. Tell me why it cannot be expanded."
        },
        "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": "01M838ZMPCQ6VBP08C9ZPQGJTV",
  "works_done": [
    {
      "attempt": 0,
      "noul": 0.99,
      "question": "w00"
    },
    {
      "attempt": 1,
      "noul": 0.98,
      "question": "w01"
    },
    {
      "attempt": 2,
      "noul": 0.98,
      "question": "w02"
    },
    {
      "attempt": 3,
      "noul": 0.91,
      "question": "w03"
    },
    {
      "attempt": 4,
      "noul": 0.83,
      "question": "w04"
    },
    {
      "attempt": 5,
      "noul": 0.9,
      "question": "w05"
    }
  ]
}
