{
  "answers": {
    "c00": {
      "noul": 0.99,
      "type": "noul"
    },
    "c01": {
      "noul": 0.99,
      "type": "noul"
    },
    "c02": {
      "noul": 0.99,
      "type": "noul"
    },
    "c03": {
      "noul": 0.99,
      "type": "noul"
    },
    "c04": {
      "noul": 0.99,
      "type": "noul"
    },
    "c05": {
      "noul": 0.99,
      "type": "noul"
    },
    "c06": {
      "noul": 0.21,
      "type": "noul"
    },
    "c07": {
      "noul": 0.97,
      "type": "noul"
    },
    "c08": {
      "noul": 0.98,
      "type": "noul"
    },
    "c09": {
      "noul": 0.99,
      "type": "noul"
    },
    "c10": {
      "noul": 0.99,
      "type": "noul"
    },
    "c11": {
      "noul": 0.93,
      "type": "noul"
    },
    "w00": {
      "noul": 0.02,
      "type": "noul"
    },
    "w01": {
      "noul": 0.03,
      "type": "noul"
    },
    "w02": {
      "noul": 0.02,
      "type": "noul"
    },
    "w03": {
      "noul": 0.96,
      "type": "noul"
    },
    "w04": {
      "noul": 0.96,
      "type": "noul"
    },
    "w05": {
      "noul": 0.95,
      "type": "noul"
    },
    "w06": {
      "noul": 0.95,
      "type": "noul"
    },
    "w07": {
      "noul": 0.98,
      "type": "noul"
    },
    "w08": {
      "noul": 0.98,
      "type": "noul"
    }
  },
  "asked_at": "2026-11-23T01:26:58Z",
  "endpoint": "https://api.typesafe.ai/v1/systemone",
  "errors_helpful": [
    {
      "call": 0,
      "noul": 0.99,
      "question": "c00"
    },
    {
      "call": 1,
      "noul": 0.99,
      "question": "c01"
    },
    {
      "call": 2,
      "noul": 0.99,
      "question": "c02"
    },
    {
      "call": 3,
      "noul": 0.99,
      "question": "c03"
    },
    {
      "call": 4,
      "noul": 0.99,
      "question": "c04"
    },
    {
      "call": 5,
      "noul": 0.99,
      "question": "c05"
    },
    {
      "call": 6,
      "noul": 0.21,
      "question": "c06"
    },
    {
      "call": 7,
      "noul": 0.97,
      "question": "c07"
    },
    {
      "call": 8,
      "noul": 0.98,
      "question": "c08"
    },
    {
      "call": 9,
      "noul": 0.99,
      "question": "c09"
    },
    {
      "call": 10,
      "noul": 0.99,
      "question": "c10"
    },
    {
      "call": 11,
      "noul": 0.93,
      "question": "c11"
    }
  ],
  "format": "didrun.judgments.v1",
  "input_tokens": 58192,
  "method": "0.15.0",
  "model": "jev-1.14.0",
  "model_asked": "jev-1.14.0",
  "request": {
    "model": "jev-1.14.0",
    "questions": {
      "c00": {
        "criteria": {
          "false": "The reply does not point to `parameter`: for example a generic failure, an error about another argument, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply points to `parameter` or to its value and says the value has the wrong type or is not accepted."
        },
        "instructions": {
          "arguments_sent": {
            "config": {}
          },
          "parameter": "config",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "MCP error -32602: Input validation error: Invalid arguments for tool tdc_check: Invalid input: expected string, received object at config",
          "tool": "tdc_check"
        },
        "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": {
            "config": {}
          },
          "parameter": "config",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "MCP error -32602: Input validation error: Invalid arguments for tool tdc_generate: Invalid input: expected string, received object at config",
          "tool": "tdc_generate"
        },
        "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": "MCP error -32602: Input validation error: Invalid arguments for tool tdc_find_packs: Invalid input: expected string, received undefined at query",
          "tool": "tdc_find_packs"
        },
        "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": {
            "query": {}
          },
          "parameter": "query",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "MCP error -32602: Input validation error: Invalid arguments for tool tdc_find_packs: Invalid input: expected string, received object at query",
          "tool": "tdc_find_packs"
        },
        "type": "noul"
      },
      "c04": {
        "criteria": {
          "false": "The reply names no argument of the tool: for example a generic failure, a stack trace with no argument named, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply names at least one argument of the tool that the call left out or got wrong, and so tells the caller what to change."
        },
        "instructions": {
          "arguments_sent": {},
          "question": "Does `reply` name an argument that the call must add or fix?",
          "reply": "MCP error -32602: Input validation error: Invalid arguments for tool tdc_pack_add: Invalid input: expected array, received undefined at ids",
          "tool": "tdc_pack_add"
        },
        "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": {
            "ids": "not an array"
          },
          "parameter": "ids",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "MCP error -32602: Input validation error: Invalid arguments for tool tdc_pack_add: Invalid input: expected array, received string at ids",
          "tool": "tdc_pack_add"
        },
        "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": "MCP error -32602: Input validation error: Invalid arguments for tool tdc_peek: Invalid input: expected string, received undefined at path",
          "tool": "tdc_peek"
        },
        "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": {
            "path": {}
          },
          "parameter": "path",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "MCP error -32602: Input validation error: Invalid arguments for tool tdc_peek: Invalid input: expected string, received object at path",
          "tool": "tdc_peek"
        },
        "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": {
            "offset": "not a number"
          },
          "parameter": "offset",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "MCP error -32602: Input validation error: Invalid arguments for tool tdc_read_docs: Invalid input: expected number, received string at offset",
          "tool": "tdc_read_docs"
        },
        "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": "MCP error -32602: Input validation error: Invalid arguments for tool tdc_format: Invalid input: expected string, received undefined at config",
          "tool": "tdc_format"
        },
        "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": {
            "config": {}
          },
          "parameter": "config",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "MCP error -32602: Input validation error: Invalid arguments for tool tdc_format: Invalid input: expected string, received object at config",
          "tool": "tdc_format"
        },
        "type": "noul"
      },
      "c11": {
        "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: Tool didrun_unknown_tool not found",
          "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 read the TDC guide and validated the config successfully. An in-memory generation with seed 42 produced the requested five consecutive IDs:\n\n```csv\nID\n1\n2\n3\n4\n5\n```\n\n**The file was not created or inspected.** Writing `fixture.csv` failed because the project directory (`/opt/server`) is read-only. The tool also rejected `/tmp/fixture.csv` because output must be inside the project directory.\n\nThe validated config is:\n\n```xml\n<tdc>\n  <env count=\"5\" seed=\"42\">\n    <before><line><data>ID</data></line></before>\n    <sequence name=\"ID\"><gen type=\"increment\" value=\"1\"/></sequence>\n    <assert each=\"ID >= 1 && ID <= 5\" says=\"ID is between 1 and 5\"/>\n  </env>\n  <block><line><data>${{ID}}</data></line></block>\n</tdc>\n```",
          "done_when": "The transcript shows a clean config check, the generated CSV preview, and a file inspection confirming five rows with IDs 1 through 5.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {
                "page": "guide"
              },
              "reply": "> **Using this through the tdcv2 MCP server.** The guide below was written for agents with a\n> terminal. Here, use the tools instead:\n> `npx -y tdcv2@0.4.0 check` → **tdc_check** · `npx -y tdcv2@0.4.0 <file> --count 5` → **tdc_generate** (preview) ·\n> `npx -y tdcv2@0.4.0 <file> -o <out>` → **tdc_generate** with `output` · `npx -y tdcv2@0.4.0 pack add <locale>` (and its\n> `init`) → **tdc_pack_add** · `scripts/find-packs.mjs` →\n> **tdc_find_packs** · `scripts/peek.mjs` → **tdc_peek** · pages under `<skill>/` and `reference/` →\n> **tdc_read_docs**. Write the config into a `.tdc` file in the project with your file tools and pass its\n> `path` — the config is the deliverable, handed over with the data. Everything runs on this machine;\n> nothing is sent anywhere.\n\n# TDCv2 — test data from a config\n\nTDCv2 is a deterministic test-data engine. You write a small `.tdc` config; the engine\ngenerates the rows **locally**. Same config, same `seed` → the same file, byte for byte.\nThe config is the deliverable — hand it over with the data.\n\nThis skill is instructions only; the engine runs in the terminal — `npx -y tdcv2@0.4.0 …`\n(Node ≥ 20). Invoking the skill again runs nothing.\n`<skill>` below means this skill's own folder.\n\nCommands here run the same in bash, zsh, PowerShell and cmd. Keep yours so: one command\nat a time (Windows PowerShell 5.1 has no && chaining); look into files with\n`node <skill>/scripts/peek.mjs <file>`, not `cut`, `grep`, `sort`, `wc`. PowerShell\nrefusing `npx` (\"running scripts is disabled\") → `npx.cmd`, same arguments.\n\n## The engine makes the rows — not you\n\nThe delivered file is exactly what `npx -y tdcv2@0.4.0 <name>.tdc -o <file>` wrote. Nothing\nelse produces or touches it:\n\n- no script (JS, Python, shell) that imports `tdcv2` and picks values itself;\n- no name, city or diagnosis lists typed into code — lists belong in the config or come\n  from packs;\n- no fixing rows afterwards with `sed`, Python or by hand.\n\nIf the config cannot express a requirement (see `reference/INDEX.md`), say plainly what\nis missing — a hand-made file reported as \"generated with TDCv2\" is worse than none.\n\n**Red flags — back to the config:** \"a quick generator around tdcv2\", \"I'll\npost-process the output\", \"easier to make this column in Python\".\n\n## Workflow\n\n**First: who reads the rows?**\n\n- **Code in the project** — a test, a fixture, a seed script. Write the config (steps\n  1–5), then the code loads it itself — no JSON or CSV in between, it would drift from\n  the config:\n\n  ```js\n  // TypeScript / JS — npm i -D tdcv2@0.4.0\n  import { TDC } from \"tdcv2\";\n  const users = new TDC({ configFile: \"test/users.tdc\" }).toArray(); // objects, values are strings\n  ```\n\n  ```python\n  # Python — pip install tdcv2==0.4.0 (into the project's environment)\n  from tdcv2 import TDC\n  users = TDC(config_file=\"tests/users.tdc\").to_array()\n  ```\n\n  Java, C#, Rust, and the traps of each: `<skill>/from-code.md`.\n\n  **Red flag:** `npx -y tdcv2@0.4.0 users.tdc -o users.json` (or `.csv`) so that a test can\n  read it — that is the fixture to avoid; the test calls the loader above. If adding the\n  library to the project fails, say so before falling back to a generated file.\n- **A person or another tool** wants a file — steps 1–7.\n\n1. **Turn every requirement into config or an `<assert>`.** \"Age 18–90\" is the range\n   *and* `<assert each=\"Age >= 18 && Age <= 90\" says=\"…\"/>`; the engine then checks it on\n   every row and stops with the row number if it fails.\n2. **Find data before writing a `template` path:**\n   `node <skill>/scripts/find-packs.mjs <words>` (`last name`, `email`). Never guess a\n   path; the script lists the ones installed here.\n3. **Write `<name>.tdc`** next to the output file, with `count` and `seed` inside `<env>`.\n4. **Check:** `npx -y tdcv2@0.4.0 check --brief <name>.tdc`. Fix every line it prints — a\n   `help: did you mean …` part names the right spelling.\n5. **Look at a few rows:** `npx -y tdcv2@0.4.0 <name>.tdc --count 5`.\n6. **Generate** (only when the rows go to a file): `npx -y tdcv2@0.4.0 <name>.tdc -o <file>` — no `--count`/`--seed` flags, so the\n   config alone reproduces the file.\n7. **Prove it from the file, then report.** `node <skill>/scripts/peek.mjs <file>` —\n   row count, and per column the distinct values, the split, the range; add\n   `--column <name>` for one column in full. Say \"generated\" only if step 6 ran in this\n   turn and succeeded. Report the file, the config and the command that regenerates it.\n\nEditing an existing config: change only what was asked, then run steps 4–7 again.\n\n## The shape of a config\n\n```xml\n<tdc>\n  <env count=\"100\" seed=\"clinic\" local=\"en\">\n    <before><line><data>id,gender,first_name,age,diagnosis</data></line></before>\n    <sequence name=\"Id\"><gen type=\"increment\" value=\"1\"/></sequence>\n    <sequence name=\"Gender\"><gen type=\"text\" value=\"M,F\" percent=\"50,50\"/></sequence>\n    <sequence name=\"MaleName\" parent=\"Gender.M\"><gen type=\"template\" value=\"person.male.firstName\"/></sequence>\n    <sequence name=\"FemaleName\" parent=\"Gender.F\"><gen type=\"template\" value=\"person.female.firstName\"/></sequence>\n    <sequence name=\"Age\"><gen type=\"number\" value=\"18..90\"/></sequence>\n    <sequence name=\"MaleDx\" parent=\"Gender.M\"><gen type=\"template\" value=\"person.male.diagnosis\"/></sequence>\n    <sequence name=\"FemaleDx\" parent=\"Gender.F\"><gen type=\"template\" value=\"person.female.diagnosis\"/></sequence>\n    <assert each=\"Age >= 18 && Age <= 90\" says=\"every patient is an adult under 91\"/>\n  </env>\n  <block>\n    <line><data>${{Id}},${{Gender}},${{MaleName}}${{FemaleName}},${{Age}},${{MaleDx}}${{FemaleDx}}</data></line>\n  </block>\n</tdc>\n```\n\n- `<sequence>` is a column; `<gen>` says where its values come from. `<block>` is the\n  template of **one** output record; `${{Name}}` prints a column.\n- `parent=\"Gender.M\"` draws a column **only** on rows where `Gender` is `M`; elsewhere it\n  is empty. Mirrored columns printed side by side give one value per row that fits the\n  parent — that is how fields agree.\n- `<before>` / `<after>` print once around the whole run (CSV header, JSON `[` `]`).\n- **It looks like XML and is not: nothing is escaped or expanded.** Write operators as\n  they are — `if=\"Age < 18 || Age >= 65\"`, `each=\"A >= 1 && A <= 9\"`, `!=`, `!_last` —\n  and `\"`, `<`, `>`, `&` as plain characters in `<data>`.\n\n## Generators you need most\n\n| need | write |\n| :--- | :--- |\n| pick from a list | `<gen type=\"text\" value=\"a,b,c\"/>` — no `percent`: equal shares, exactly |\n| exact shares | `<gen type=\"text\" value=\"shipped,pending\" percent=\"70,30\"/>` — 70 % exactly, not \"about\" |\n| integer / decimal range | `<gen type=\"number\" value=\"5..500\"/>`, `decimals=\"2\"` for `12.30` |\n| date in a range | `<gen type=\"date\" from=\"2025-01-01\" to=\"2025-12-31\" format=\"YYYY-MM-DD\"/>` |\n| running id | `<gen type=\"increment\" value=\"1\"/>` |\n| shaped string | `<gen type=\"regex\" value=\"[A-Z]{2}[0-9]{9}\"/>` |\n| real-world data | `<gen type=\"template\" value=\"person.lastName\"/>` — paths from `find-packs.mjs` |\n\nIn `<data>`: `${{Name | lower}}`, `| upper`; `| csv` quotes a CSV field, `| sql` a SQL\nliteral, `| json` writes a JSON string (empty → `null`). Built-ins: `${{_count}}` (row\nnumber), `_last` (`<data if=\"!_last\">,</data>` for JSON commas), `_total`.\n\n## Checks and whole-run rules (inside `<env>`)\n\n- `<assert each=\"Amount >= 5 && Amount <= 500\" says=\"…\"/>` — every row.\n- `<assert that=\"…\" says=\"…\"/>` — once, over whole-run numbers from\n  `<gen type=\"stat\" of=\"Col\" op=\"count\"/>` columns or `_total`.\n- Unique by construction — the cheap way: put the running id in it,\n  `${{First | lower}}.${{Last | lower}}${{Id}}@example.com`.\n- One drawn column unique: `uniq=\"true\"` on its `<sequence>` — lists, packs, number\n  ranges, `regex` (`<sequence name=\"Code\" uniq=\"true\"><gen type=\"number\" value=\"1000..9999\"/></sequence>`);\n  not computed templates like `common.internet.email` (refused — use the counter).\n- A combination unique across rows: wrap its sequences in `<uniq>…</uniq>`",
              "tool": "tdc_read_docs"
            },
            {
              "arguments": {
                "config": "<tdc>\n  <env count=\"5\" seed=\"42\">\n    <before><line><data>ID</data></line></before>\n    <sequence name=\"ID\"><gen type=\"increment\" value=\"1\"/></sequence>\n    <assert each=\"ID >= 1 && ID <= 5\" says=\"ID is between 1 and 5\"/>\n  </env>\n  <block><line><data>${{ID}}</data></line></block>\n</tdc>"
              },
              "reply": "Valid (tdcv2 0.4.0), 5 records.",
              "tool": "tdc_check"
            },
            {
              "arguments": {
                "config": "<tdc>\n  <env count=\"5\" seed=\"42\">\n    <before><line><data>ID</data></line></before>\n    <sequence name=\"ID\"><gen type=\"increment\" value=\"1\"/></sequence>\n    <assert each=\"ID >= 1 && ID <= 5\" says=\"ID is between 1 and 5\"/>\n  </env>\n  <block><line><data>${{ID}}</data></line></block>\n</tdc>",
                "output": "fixture.csv"
              },
              "reply": "The engine refused: EROFS: read-only file system, open '/opt/server/fixture.csv'\nfixture.csv was not written.",
              "tool": "tdc_generate"
            },
            {
              "arguments": {
                "config": "<tdc>\n  <env count=\"5\" seed=\"42\">\n    <before><line><data>ID</data></line></before>\n    <sequence name=\"ID\"><gen type=\"increment\" value=\"1\"/></sequence>\n    <assert each=\"ID >= 1 && ID <= 5\" says=\"ID is between 1 and 5\"/>\n  </env>\n  <block><line><data>${{ID}}</data></line></block>\n</tdc>",
                "output": "/tmp/fixture.csv"
              },
              "reply": "error: output must be inside the project folder (/opt/server); got /tmp/fixture.csv",
              "tool": "tdc_generate"
            },
            {
              "arguments": {
                "config": "<tdc>\n  <env count=\"5\" seed=\"42\">\n    <before><line><data>ID</data></line></before>\n    <sequence name=\"ID\"><gen type=\"increment\" value=\"1\"/></sequence>\n    <assert each=\"ID >= 1 && ID <= 5\" says=\"ID is between 1 and 5\"/>\n  </env>\n  <block><line><data>${{ID}}</data></line></block>\n</tdc>"
              },
              "reply": "5 records, 6 lines (tdcv2 0.4.0, seed 42). Nothing written — give `output` to write the file.\n\nFirst 6 lines:\nID\n1\n2\n3\n4\n5",
              "tool": "tdc_generate"
            }
          ],
          "task": "Create a reproducible CSV fixture with 5 rows, using seed 42, and an integer ID column containing consecutive values 1 through 5. Read the TDC guide, validate the config, generate it to fixture.csv, and inspect the resulting file."
        },
        "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": "The TDC config validated successfully, and an in-memory preview produced the requested five IDs with seed 42.\n\n**The file was not created or inspected:** the project folder is read-only, and the tool does not allow output outside it. Writing `fixture.csv` failed with `EROFS`.\n\nThe validated config was:\n\n```xml\n<tdc>\n  <env count=\"5\" seed=\"42\">\n    <before><line><data>id</data></line></before>\n    <sequence name=\"Id\"><gen type=\"increment\" value=\"1\"/></sequence>\n    <assert each=\"Id == _count\" says=\"IDs are consecutive from 1\"/>\n  </env>\n  <block><line><data>${{Id}}</data></line></block>\n</tdc>\n```\n\nThe preview was:\n\n```csv\nid\n1\n2\n3\n4\n5\n```",
          "done_when": "The transcript shows a clean config check, the generated CSV preview, and a file inspection confirming five rows with IDs 1 through 5.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {
                "page": "guide"
              },
              "reply": "> **Using this through the tdcv2 MCP server.** The guide below was written for agents with a\n> terminal. Here, use the tools instead:\n> `npx -y tdcv2@0.4.0 check` → **tdc_check** · `npx -y tdcv2@0.4.0 <file> --count 5` → **tdc_generate** (preview) ·\n> `npx -y tdcv2@0.4.0 <file> -o <out>` → **tdc_generate** with `output` · `npx -y tdcv2@0.4.0 pack add <locale>` (and its\n> `init`) → **tdc_pack_add** · `scripts/find-packs.mjs` →\n> **tdc_find_packs** · `scripts/peek.mjs` → **tdc_peek** · pages under `<skill>/` and `reference/` →\n> **tdc_read_docs**. Write the config into a `.tdc` file in the project with your file tools and pass its\n> `path` — the config is the deliverable, handed over with the data. Everything runs on this machine;\n> nothing is sent anywhere.\n\n# TDCv2 — test data from a config\n\nTDCv2 is a deterministic test-data engine. You write a small `.tdc` config; the engine\ngenerates the rows **locally**. Same config, same `seed` → the same file, byte for byte.\nThe config is the deliverable — hand it over with the data.\n\nThis skill is instructions only; the engine runs in the terminal — `npx -y tdcv2@0.4.0 …`\n(Node ≥ 20). Invoking the skill again runs nothing.\n`<skill>` below means this skill's own folder.\n\nCommands here run the same in bash, zsh, PowerShell and cmd. Keep yours so: one command\nat a time (Windows PowerShell 5.1 has no && chaining); look into files with\n`node <skill>/scripts/peek.mjs <file>`, not `cut`, `grep`, `sort`, `wc`. PowerShell\nrefusing `npx` (\"running scripts is disabled\") → `npx.cmd`, same arguments.\n\n## The engine makes the rows — not you\n\nThe delivered file is exactly what `npx -y tdcv2@0.4.0 <name>.tdc -o <file>` wrote. Nothing\nelse produces or touches it:\n\n- no script (JS, Python, shell) that imports `tdcv2` and picks values itself;\n- no name, city or diagnosis lists typed into code — lists belong in the config or come\n  from packs;\n- no fixing rows afterwards with `sed`, Python or by hand.\n\nIf the config cannot express a requirement (see `reference/INDEX.md`), say plainly what\nis missing — a hand-made file reported as \"generated with TDCv2\" is worse than none.\n\n**Red flags — back to the config:** \"a quick generator around tdcv2\", \"I'll\npost-process the output\", \"easier to make this column in Python\".\n\n## Workflow\n\n**First: who reads the rows?**\n\n- **Code in the project** — a test, a fixture, a seed script. Write the config (steps\n  1–5), then the code loads it itself — no JSON or CSV in between, it would drift from\n  the config:\n\n  ```js\n  // TypeScript / JS — npm i -D tdcv2@0.4.0\n  import { TDC } from \"tdcv2\";\n  const users = new TDC({ configFile: \"test/users.tdc\" }).toArray(); // objects, values are strings\n  ```\n\n  ```python\n  # Python — pip install tdcv2==0.4.0 (into the project's environment)\n  from tdcv2 import TDC\n  users = TDC(config_file=\"tests/users.tdc\").to_array()\n  ```\n\n  Java, C#, Rust, and the traps of each: `<skill>/from-code.md`.\n\n  **Red flag:** `npx -y tdcv2@0.4.0 users.tdc -o users.json` (or `.csv`) so that a test can\n  read it — that is the fixture to avoid; the test calls the loader above. If adding the\n  library to the project fails, say so before falling back to a generated file.\n- **A person or another tool** wants a file — steps 1–7.\n\n1. **Turn every requirement into config or an `<assert>`.** \"Age 18–90\" is the range\n   *and* `<assert each=\"Age >= 18 && Age <= 90\" says=\"…\"/>`; the engine then checks it on\n   every row and stops with the row number if it fails.\n2. **Find data before writing a `template` path:**\n   `node <skill>/scripts/find-packs.mjs <words>` (`last name`, `email`). Never guess a\n   path; the script lists the ones installed here.\n3. **Write `<name>.tdc`** next to the output file, with `count` and `seed` inside `<env>`.\n4. **Check:** `npx -y tdcv2@0.4.0 check --brief <name>.tdc`. Fix every line it prints — a\n   `help: did you mean …` part names the right spelling.\n5. **Look at a few rows:** `npx -y tdcv2@0.4.0 <name>.tdc --count 5`.\n6. **Generate** (only when the rows go to a file): `npx -y tdcv2@0.4.0 <name>.tdc -o <file>` — no `--count`/`--seed` flags, so the\n   config alone reproduces the file.\n7. **Prove it from the file, then report.** `node <skill>/scripts/peek.mjs <file>` —\n   row count, and per column the distinct values, the split, the range; add\n   `--column <name>` for one column in full. Say \"generated\" only if step 6 ran in this\n   turn and succeeded. Report the file, the config and the command that regenerates it.\n\nEditing an existing config: change only what was asked, then run steps 4–7 again.\n\n## The shape of a config\n\n```xml\n<tdc>\n  <env count=\"100\" seed=\"clinic\" local=\"en\">\n    <before><line><data>id,gender,first_name,age,diagnosis</data></line></before>\n    <sequence name=\"Id\"><gen type=\"increment\" value=\"1\"/></sequence>\n    <sequence name=\"Gender\"><gen type=\"text\" value=\"M,F\" percent=\"50,50\"/></sequence>\n    <sequence name=\"MaleName\" parent=\"Gender.M\"><gen type=\"template\" value=\"person.male.firstName\"/></sequence>\n    <sequence name=\"FemaleName\" parent=\"Gender.F\"><gen type=\"template\" value=\"person.female.firstName\"/></sequence>\n    <sequence name=\"Age\"><gen type=\"number\" value=\"18..90\"/></sequence>\n    <sequence name=\"MaleDx\" parent=\"Gender.M\"><gen type=\"template\" value=\"person.male.diagnosis\"/></sequence>\n    <sequence name=\"FemaleDx\" parent=\"Gender.F\"><gen type=\"template\" value=\"person.female.diagnosis\"/></sequence>\n    <assert each=\"Age >= 18 && Age <= 90\" says=\"every patient is an adult under 91\"/>\n  </env>\n  <block>\n    <line><data>${{Id}},${{Gender}},${{MaleName}}${{FemaleName}},${{Age}},${{MaleDx}}${{FemaleDx}}</data></line>\n  </block>\n</tdc>\n```\n\n- `<sequence>` is a column; `<gen>` says where its values come from. `<block>` is the\n  template of **one** output record; `${{Name}}` prints a column.\n- `parent=\"Gender.M\"` draws a column **only** on rows where `Gender` is `M`; elsewhere it\n  is empty. Mirrored columns printed side by side give one value per row that fits the\n  parent — that is how fields agree.\n- `<before>` / `<after>` print once around the whole run (CSV header, JSON `[` `]`).\n- **It looks like XML and is not: nothing is escaped or expanded.** Write operators as\n  they are — `if=\"Age < 18 || Age >= 65\"`, `each=\"A >= 1 && A <= 9\"`, `!=`, `!_last` —\n  and `\"`, `<`, `>`, `&` as plain characters in `<data>`.\n\n## Generators you need most\n\n| need | write |\n| :--- | :--- |\n| pick from a list | `<gen type=\"text\" value=\"a,b,c\"/>` — no `percent`: equal shares, exactly |\n| exact shares | `<gen type=\"text\" value=\"shipped,pending\" percent=\"70,30\"/>` — 70 % exactly, not \"about\" |\n| integer / decimal range | `<gen type=\"number\" value=\"5..500\"/>`, `decimals=\"2\"` for `12.30` |\n| date in a range | `<gen type=\"date\" from=\"2025-01-01\" to=\"2025-12-31\" format=\"YYYY-MM-DD\"/>` |\n| running id | `<gen type=\"increment\" value=\"1\"/>` |\n| shaped string | `<gen type=\"regex\" value=\"[A-Z]{2}[0-9]{9}\"/>` |\n| real-world data | `<gen type=\"template\" value=\"person.lastName\"/>` — paths from `find-packs.mjs` |\n\nIn `<data>`: `${{Name | lower}}`, `| upper`; `| csv` quotes a CSV field, `| sql` a SQL\nliteral, `| json` writes a JSON string (empty → `null`). Built-ins: `${{_count}}` (row\nnumber), `_last` (`<data if=\"!_last\">,</data>` for JSON commas), `_total`.\n\n## Checks and whole-run rules (inside `<env>`)\n\n- `<assert each=\"Amount >= 5 && Amount <= 500\" says=\"…\"/>` — every row.\n- `<assert that=\"…\" says=\"…\"/>` — once, over whole-run numbers from\n  `<gen type=\"stat\" of=\"Col\" op=\"count\"/>` columns or `_total`.\n- Unique by construction — the cheap way: put the running id in it,\n  `${{First | lower}}.${{Last | lower}}${{Id}}@example.com`.\n- One drawn column unique: `uniq=\"true\"` on its `<sequence>` — lists, packs, number\n  ranges, `regex` (`<sequence name=\"Code\" uniq=\"true\"><gen type=\"number\" value=\"1000..9999\"/></sequence>`);\n  not computed templates like `common.internet.email` (refused — use the counter).\n- A combination unique across rows: wrap its sequences in `<uniq>…</uniq>`",
              "tool": "tdc_read_docs"
            },
            {
              "arguments": {
                "config": "<tdc>\n  <env count=\"5\" seed=\"42\">\n    <before><line><data>id</data></line></before>\n    <sequence name=\"Id\"><gen type=\"increment\" value=\"1\"/></sequence>\n    <assert each=\"Id == _count\" says=\"IDs are consecutive from 1\"/>\n  </env>\n  <block><line><data>${{Id}}</data></line></block>\n</tdc>"
              },
              "reply": "Valid (tdcv2 0.4.0), 5 records.",
              "tool": "tdc_check"
            },
            {
              "arguments": {
                "config": "<tdc>\n  <env count=\"5\" seed=\"42\">\n    <before><line><data>id</data></line></before>\n    <sequence name=\"Id\"><gen type=\"increment\" value=\"1\"/></sequence>\n    <assert each=\"Id == _count\" says=\"IDs are consecutive from 1\"/>\n  </env>\n  <block><line><data>${{Id}}</data></line></block>\n</tdc>",
                "output": "fixture.csv"
              },
              "reply": "The engine refused: EROFS: read-only file system, open '/opt/server/fixture.csv'\nfixture.csv was not written.",
              "tool": "tdc_generate"
            },
            {
              "arguments": {
                "config": "<tdc>\n  <env count=\"5\" seed=\"42\">\n    <before><line><data>id</data></line></before>\n    <sequence name=\"Id\"><gen type=\"increment\" value=\"1\"/></sequence>\n    <assert each=\"Id == _count\" says=\"IDs are consecutive from 1\"/>\n  </env>\n  <block><line><data>${{Id}}</data></line></block>\n</tdc>",
                "output": "../../tmp/fixture.csv"
              },
              "reply": "error: output must be inside the project folder (/opt/server); got ../../tmp/fixture.csv",
              "tool": "tdc_generate"
            },
            {
              "arguments": {
                "config": "<tdc>\n  <env count=\"5\" seed=\"42\">\n    <before><line><data>id</data></line></before>\n    <sequence name=\"Id\"><gen type=\"increment\" value=\"1\"/></sequence>\n    <assert each=\"Id == _count\" says=\"IDs are consecutive from 1\"/>\n  </env>\n  <block><line><data>${{Id}}</data></line></block>\n</tdc>",
                "preview": 10
              },
              "reply": "5 records, 6 lines (tdcv2 0.4.0, seed 42). Nothing written — give `output` to write the file.\n\nFirst 6 lines:\nid\n1\n2\n3\n4\n5",
              "tool": "tdc_generate"
            }
          ],
          "task": "Create a reproducible CSV fixture with 5 rows, using seed 42, and an integer ID column containing consecutive values 1 through 5. Read the TDC guide, validate the config, generate it to fixture.csv, and inspect the resulting file."
        },
        "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 read the TDC guide and validated the config successfully. A generation preview returned five records with seed 42:\n\n```csv\nID\n1\n2\n3\n4\n5\n```\n\n**The file was not created.** Writing `fixture.csv` failed because the project filesystem is read-only (`EROFS`), so I could not inspect the resulting file.\n\nThe validated config is:\n\n```xml\n<tdc>\n  <env count=\"5\" seed=\"42\">\n    <before><line><data>ID</data></line></before>\n    <sequence name=\"Id\"><gen type=\"increment\" value=\"1\"/></sequence>\n    <assert each=\"Id >= 1 && Id <= 5\" says=\"ID is between 1 and 5\"/>\n  </env>\n  <block><line><data>${{Id}}</data></line></block>\n</tdc>\n```",
          "done_when": "The transcript shows a clean config check, the generated CSV preview, and a file inspection confirming five rows with IDs 1 through 5.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {
                "page": "guide"
              },
              "reply": "> **Using this through the tdcv2 MCP server.** The guide below was written for agents with a\n> terminal. Here, use the tools instead:\n> `npx -y tdcv2@0.4.0 check` → **tdc_check** · `npx -y tdcv2@0.4.0 <file> --count 5` → **tdc_generate** (preview) ·\n> `npx -y tdcv2@0.4.0 <file> -o <out>` → **tdc_generate** with `output` · `npx -y tdcv2@0.4.0 pack add <locale>` (and its\n> `init`) → **tdc_pack_add** · `scripts/find-packs.mjs` →\n> **tdc_find_packs** · `scripts/peek.mjs` → **tdc_peek** · pages under `<skill>/` and `reference/` →\n> **tdc_read_docs**. Write the config into a `.tdc` file in the project with your file tools and pass its\n> `path` — the config is the deliverable, handed over with the data. Everything runs on this machine;\n> nothing is sent anywhere.\n\n# TDCv2 — test data from a config\n\nTDCv2 is a deterministic test-data engine. You write a small `.tdc` config; the engine\ngenerates the rows **locally**. Same config, same `seed` → the same file, byte for byte.\nThe config is the deliverable — hand it over with the data.\n\nThis skill is instructions only; the engine runs in the terminal — `npx -y tdcv2@0.4.0 …`\n(Node ≥ 20). Invoking the skill again runs nothing.\n`<skill>` below means this skill's own folder.\n\nCommands here run the same in bash, zsh, PowerShell and cmd. Keep yours so: one command\nat a time (Windows PowerShell 5.1 has no && chaining); look into files with\n`node <skill>/scripts/peek.mjs <file>`, not `cut`, `grep`, `sort`, `wc`. PowerShell\nrefusing `npx` (\"running scripts is disabled\") → `npx.cmd`, same arguments.\n\n## The engine makes the rows — not you\n\nThe delivered file is exactly what `npx -y tdcv2@0.4.0 <name>.tdc -o <file>` wrote. Nothing\nelse produces or touches it:\n\n- no script (JS, Python, shell) that imports `tdcv2` and picks values itself;\n- no name, city or diagnosis lists typed into code — lists belong in the config or come\n  from packs;\n- no fixing rows afterwards with `sed`, Python or by hand.\n\nIf the config cannot express a requirement (see `reference/INDEX.md`), say plainly what\nis missing — a hand-made file reported as \"generated with TDCv2\" is worse than none.\n\n**Red flags — back to the config:** \"a quick generator around tdcv2\", \"I'll\npost-process the output\", \"easier to make this column in Python\".\n\n## Workflow\n\n**First: who reads the rows?**\n\n- **Code in the project** — a test, a fixture, a seed script. Write the config (steps\n  1–5), then the code loads it itself — no JSON or CSV in between, it would drift from\n  the config:\n\n  ```js\n  // TypeScript / JS — npm i -D tdcv2@0.4.0\n  import { TDC } from \"tdcv2\";\n  const users = new TDC({ configFile: \"test/users.tdc\" }).toArray(); // objects, values are strings\n  ```\n\n  ```python\n  # Python — pip install tdcv2==0.4.0 (into the project's environment)\n  from tdcv2 import TDC\n  users = TDC(config_file=\"tests/users.tdc\").to_array()\n  ```\n\n  Java, C#, Rust, and the traps of each: `<skill>/from-code.md`.\n\n  **Red flag:** `npx -y tdcv2@0.4.0 users.tdc -o users.json` (or `.csv`) so that a test can\n  read it — that is the fixture to avoid; the test calls the loader above. If adding the\n  library to the project fails, say so before falling back to a generated file.\n- **A person or another tool** wants a file — steps 1–7.\n\n1. **Turn every requirement into config or an `<assert>`.** \"Age 18–90\" is the range\n   *and* `<assert each=\"Age >= 18 && Age <= 90\" says=\"…\"/>`; the engine then checks it on\n   every row and stops with the row number if it fails.\n2. **Find data before writing a `template` path:**\n   `node <skill>/scripts/find-packs.mjs <words>` (`last name`, `email`). Never guess a\n   path; the script lists the ones installed here.\n3. **Write `<name>.tdc`** next to the output file, with `count` and `seed` inside `<env>`.\n4. **Check:** `npx -y tdcv2@0.4.0 check --brief <name>.tdc`. Fix every line it prints — a\n   `help: did you mean …` part names the right spelling.\n5. **Look at a few rows:** `npx -y tdcv2@0.4.0 <name>.tdc --count 5`.\n6. **Generate** (only when the rows go to a file): `npx -y tdcv2@0.4.0 <name>.tdc -o <file>` — no `--count`/`--seed` flags, so the\n   config alone reproduces the file.\n7. **Prove it from the file, then report.** `node <skill>/scripts/peek.mjs <file>` —\n   row count, and per column the distinct values, the split, the range; add\n   `--column <name>` for one column in full. Say \"generated\" only if step 6 ran in this\n   turn and succeeded. Report the file, the config and the command that regenerates it.\n\nEditing an existing config: change only what was asked, then run steps 4–7 again.\n\n## The shape of a config\n\n```xml\n<tdc>\n  <env count=\"100\" seed=\"clinic\" local=\"en\">\n    <before><line><data>id,gender,first_name,age,diagnosis</data></line></before>\n    <sequence name=\"Id\"><gen type=\"increment\" value=\"1\"/></sequence>\n    <sequence name=\"Gender\"><gen type=\"text\" value=\"M,F\" percent=\"50,50\"/></sequence>\n    <sequence name=\"MaleName\" parent=\"Gender.M\"><gen type=\"template\" value=\"person.male.firstName\"/></sequence>\n    <sequence name=\"FemaleName\" parent=\"Gender.F\"><gen type=\"template\" value=\"person.female.firstName\"/></sequence>\n    <sequence name=\"Age\"><gen type=\"number\" value=\"18..90\"/></sequence>\n    <sequence name=\"MaleDx\" parent=\"Gender.M\"><gen type=\"template\" value=\"person.male.diagnosis\"/></sequence>\n    <sequence name=\"FemaleDx\" parent=\"Gender.F\"><gen type=\"template\" value=\"person.female.diagnosis\"/></sequence>\n    <assert each=\"Age >= 18 && Age <= 90\" says=\"every patient is an adult under 91\"/>\n  </env>\n  <block>\n    <line><data>${{Id}},${{Gender}},${{MaleName}}${{FemaleName}},${{Age}},${{MaleDx}}${{FemaleDx}}</data></line>\n  </block>\n</tdc>\n```\n\n- `<sequence>` is a column; `<gen>` says where its values come from. `<block>` is the\n  template of **one** output record; `${{Name}}` prints a column.\n- `parent=\"Gender.M\"` draws a column **only** on rows where `Gender` is `M`; elsewhere it\n  is empty. Mirrored columns printed side by side give one value per row that fits the\n  parent — that is how fields agree.\n- `<before>` / `<after>` print once around the whole run (CSV header, JSON `[` `]`).\n- **It looks like XML and is not: nothing is escaped or expanded.** Write operators as\n  they are — `if=\"Age < 18 || Age >= 65\"`, `each=\"A >= 1 && A <= 9\"`, `!=`, `!_last` —\n  and `\"`, `<`, `>`, `&` as plain characters in `<data>`.\n\n## Generators you need most\n\n| need | write |\n| :--- | :--- |\n| pick from a list | `<gen type=\"text\" value=\"a,b,c\"/>` — no `percent`: equal shares, exactly |\n| exact shares | `<gen type=\"text\" value=\"shipped,pending\" percent=\"70,30\"/>` — 70 % exactly, not \"about\" |\n| integer / decimal range | `<gen type=\"number\" value=\"5..500\"/>`, `decimals=\"2\"` for `12.30` |\n| date in a range | `<gen type=\"date\" from=\"2025-01-01\" to=\"2025-12-31\" format=\"YYYY-MM-DD\"/>` |\n| running id | `<gen type=\"increment\" value=\"1\"/>` |\n| shaped string | `<gen type=\"regex\" value=\"[A-Z]{2}[0-9]{9}\"/>` |\n| real-world data | `<gen type=\"template\" value=\"person.lastName\"/>` — paths from `find-packs.mjs` |\n\nIn `<data>`: `${{Name | lower}}`, `| upper`; `| csv` quotes a CSV field, `| sql` a SQL\nliteral, `| json` writes a JSON string (empty → `null`). Built-ins: `${{_count}}` (row\nnumber), `_last` (`<data if=\"!_last\">,</data>` for JSON commas), `_total`.\n\n## Checks and whole-run rules (inside `<env>`)\n\n- `<assert each=\"Amount >= 5 && Amount <= 500\" says=\"…\"/>` — every row.\n- `<assert that=\"…\" says=\"…\"/>` — once, over whole-run numbers from\n  `<gen type=\"stat\" of=\"Col\" op=\"count\"/>` columns or `_total`.\n- Unique by construction — the cheap way: put the running id in it,\n  `${{First | lower}}.${{Last | lower}}${{Id}}@example.com`.\n- One drawn column unique: `uniq=\"true\"` on its `<sequence>` — lists, packs, number\n  ranges, `regex` (`<sequence name=\"Code\" uniq=\"true\"><gen type=\"number\" value=\"1000..9999\"/></sequence>`);\n  not computed templates like `common.internet.email` (refused — use the counter).\n- A combination unique across rows: wrap its sequences in `<uniq>…</uniq>`",
              "tool": "tdc_read_docs"
            },
            {
              "arguments": {
                "config": "<tdc>\n  <env count=\"5\" seed=\"42\">\n    <before><line><data>ID</data></line></before>\n    <sequence name=\"Id\"><gen type=\"increment\" value=\"1\"/></sequence>\n    <assert each=\"Id >= 1 && Id <= 5\" says=\"ID is between 1 and 5\"/>\n  </env>\n  <block><line><data>${{Id}}</data></line></block>\n</tdc>"
              },
              "reply": "Valid (tdcv2 0.4.0), 5 records.",
              "tool": "tdc_check"
            },
            {
              "arguments": {
                "config": "<tdc>\n  <env count=\"5\" seed=\"42\">\n    <before><line><data>ID</data></line></before>\n    <sequence name=\"Id\"><gen type=\"increment\" value=\"1\"/></sequence>\n    <assert each=\"Id >= 1 && Id <= 5\" says=\"ID is between 1 and 5\"/>\n  </env>\n  <block><line><data>${{Id}}</data></line></block>\n</tdc>",
                "output": "fixture.csv"
              },
              "reply": "The engine refused: EROFS: read-only file system, open '/opt/server/fixture.csv'\nfixture.csv was not written.",
              "tool": "tdc_generate"
            },
            {
              "arguments": {
                "config": "<tdc>\n  <env count=\"5\" seed=\"42\">\n    <before><line><data>ID</data></line></before>\n    <sequence name=\"Id\"><gen type=\"increment\" value=\"1\"/></sequence>\n    <assert each=\"Id >= 1 && Id <= 5\" says=\"ID is between 1 and 5\"/>\n  </env>\n  <block><line><data>${{Id}}</data></line></block>\n</tdc>",
                "preview": 10
              },
              "reply": "5 records, 6 lines (tdcv2 0.4.0, seed 42). Nothing written — give `output` to write the file.\n\nFirst 6 lines:\nID\n1\n2\n3\n4\n5",
              "tool": "tdc_generate"
            }
          ],
          "task": "Create a reproducible CSV fixture with 5 rows, using seed 42, and an integer ID column containing consecutive values 1 through 5. Read the TDC guide, validate the config, generate it to fixture.csv, and inspect the resulting file."
        },
        "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 config passed TDC validation. With seed `123`, TDC generated this JSON preview:\n\n```json\n[\n  {\"status\": \"active\"},\n  {\"status\": \"active\"},\n  {\"status\": \"active\"},\n  {\"status\": \"active\"}\n]\n```\n\nThe output was rendered in memory; no file was written.",
          "done_when": "The transcript shows a successful config check and a JSON preview containing four records with status set to \"active\".",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {},
              "reply": "> **Using this through the tdcv2 MCP server.** The guide below was written for agents with a\n> terminal. Here, use the tools instead:\n> `npx -y tdcv2@0.4.0 check` → **tdc_check** · `npx -y tdcv2@0.4.0 <file> --count 5` → **tdc_generate** (preview) ·\n> `npx -y tdcv2@0.4.0 <file> -o <out>` → **tdc_generate** with `output` · `npx -y tdcv2@0.4.0 pack add <locale>` (and its\n> `init`) → **tdc_pack_add** · `scripts/find-packs.mjs` →\n> **tdc_find_packs** · `scripts/peek.mjs` → **tdc_peek** · pages under `<skill>/` and `reference/` →\n> **tdc_read_docs**. Write the config into a `.tdc` file in the project with your file tools and pass its\n> `path` — the config is the deliverable, handed over with the data. Everything runs on this machine;\n> nothing is sent anywhere.\n\n# TDCv2 — test data from a config\n\nTDCv2 is a deterministic test-data engine. You write a small `.tdc` config; the engine\ngenerates the rows **locally**. Same config, same `seed` → the same file, byte for byte.\nThe config is the deliverable — hand it over with the data.\n\nThis skill is instructions only; the engine runs in the terminal — `npx -y tdcv2@0.4.0 …`\n(Node ≥ 20). Invoking the skill again runs nothing.\n`<skill>` below means this skill's own folder.\n\nCommands here run the same in bash, zsh, PowerShell and cmd. Keep yours so: one command\nat a time (Windows PowerShell 5.1 has no && chaining); look into files with\n`node <skill>/scripts/peek.mjs <file>`, not `cut`, `grep`, `sort`, `wc`. PowerShell\nrefusing `npx` (\"running scripts is disabled\") → `npx.cmd`, same arguments.\n\n## The engine makes the rows — not you\n\nThe delivered file is exactly what `npx -y tdcv2@0.4.0 <name>.tdc -o <file>` wrote. Nothing\nelse produces or touches it:\n\n- no script (JS, Python, shell) that imports `tdcv2` and picks values itself;\n- no name, city or diagnosis lists typed into code — lists belong in the config or come\n  from packs;\n- no fixing rows afterwards with `sed`, Python or by hand.\n\nIf the config cannot express a requirement (see `reference/INDEX.md`), say plainly what\nis missing — a hand-made file reported as \"generated with TDCv2\" is worse than none.\n\n**Red flags — back to the config:** \"a quick generator around tdcv2\", \"I'll\npost-process the output\", \"easier to make this column in Python\".\n\n## Workflow\n\n**First: who reads the rows?**\n\n- **Code in the project** — a test, a fixture, a seed script. Write the config (steps\n  1–5), then the code loads it itself — no JSON or CSV in between, it would drift from\n  the config:\n\n  ```js\n  // TypeScript / JS — npm i -D tdcv2@0.4.0\n  import { TDC } from \"tdcv2\";\n  const users = new TDC({ configFile: \"test/users.tdc\" }).toArray(); // objects, values are strings\n  ```\n\n  ```python\n  # Python — pip install tdcv2==0.4.0 (into the project's environment)\n  from tdcv2 import TDC\n  users = TDC(config_file=\"tests/users.tdc\").to_array()\n  ```\n\n  Java, C#, Rust, and the traps of each: `<skill>/from-code.md`.\n\n  **Red flag:** `npx -y tdcv2@0.4.0 users.tdc -o users.json` (or `.csv`) so that a test can\n  read it — that is the fixture to avoid; the test calls the loader above. If adding the\n  library to the project fails, say so before falling back to a generated file.\n- **A person or another tool** wants a file — steps 1–7.\n\n1. **Turn every requirement into config or an `<assert>`.** \"Age 18–90\" is the range\n   *and* `<assert each=\"Age >= 18 && Age <= 90\" says=\"…\"/>`; the engine then checks it on\n   every row and stops with the row number if it fails.\n2. **Find data before writing a `template` path:**\n   `node <skill>/scripts/find-packs.mjs <words>` (`last name`, `email`). Never guess a\n   path; the script lists the ones installed here.\n3. **Write `<name>.tdc`** next to the output file, with `count` and `seed` inside `<env>`.\n4. **Check:** `npx -y tdcv2@0.4.0 check --brief <name>.tdc`. Fix every line it prints — a\n   `help: did you mean …` part names the right spelling.\n5. **Look at a few rows:** `npx -y tdcv2@0.4.0 <name>.tdc --count 5`.\n6. **Generate** (only when the rows go to a file): `npx -y tdcv2@0.4.0 <name>.tdc -o <file>` — no `--count`/`--seed` flags, so the\n   config alone reproduces the file.\n7. **Prove it from the file, then report.** `node <skill>/scripts/peek.mjs <file>` —\n   row count, and per column the distinct values, the split, the range; add\n   `--column <name>` for one column in full. Say \"generated\" only if step 6 ran in this\n   turn and succeeded. Report the file, the config and the command that regenerates it.\n\nEditing an existing config: change only what was asked, then run steps 4–7 again.\n\n## The shape of a config\n\n```xml\n<tdc>\n  <env count=\"100\" seed=\"clinic\" local=\"en\">\n    <before><line><data>id,gender,first_name,age,diagnosis</data></line></before>\n    <sequence name=\"Id\"><gen type=\"increment\" value=\"1\"/></sequence>\n    <sequence name=\"Gender\"><gen type=\"text\" value=\"M,F\" percent=\"50,50\"/></sequence>\n    <sequence name=\"MaleName\" parent=\"Gender.M\"><gen type=\"template\" value=\"person.male.firstName\"/></sequence>\n    <sequence name=\"FemaleName\" parent=\"Gender.F\"><gen type=\"template\" value=\"person.female.firstName\"/></sequence>\n    <sequence name=\"Age\"><gen type=\"number\" value=\"18..90\"/></sequence>\n    <sequence name=\"MaleDx\" parent=\"Gender.M\"><gen type=\"template\" value=\"person.male.diagnosis\"/></sequence>\n    <sequence name=\"FemaleDx\" parent=\"Gender.F\"><gen type=\"template\" value=\"person.female.diagnosis\"/></sequence>\n    <assert each=\"Age >= 18 && Age <= 90\" says=\"every patient is an adult under 91\"/>\n  </env>\n  <block>\n    <line><data>${{Id}},${{Gender}},${{MaleName}}${{FemaleName}},${{Age}},${{MaleDx}}${{FemaleDx}}</data></line>\n  </block>\n</tdc>\n```\n\n- `<sequence>` is a column; `<gen>` says where its values come from. `<block>` is the\n  template of **one** output record; `${{Name}}` prints a column.\n- `parent=\"Gender.M\"` draws a column **only** on rows where `Gender` is `M`; elsewhere it\n  is empty. Mirrored columns printed side by side give one value per row that fits the\n  parent — that is how fields agree.\n- `<before>` / `<after>` print once around the whole run (CSV header, JSON `[` `]`).\n- **It looks like XML and is not: nothing is escaped or expanded.** Write operators as\n  they are — `if=\"Age < 18 || Age >= 65\"`, `each=\"A >= 1 && A <= 9\"`, `!=`, `!_last` —\n  and `\"`, `<`, `>`, `&` as plain characters in `<data>`.\n\n## Generators you need most\n\n| need | write |\n| :--- | :--- |\n| pick from a list | `<gen type=\"text\" value=\"a,b,c\"/>` — no `percent`: equal shares, exactly |\n| exact shares | `<gen type=\"text\" value=\"shipped,pending\" percent=\"70,30\"/>` — 70 % exactly, not \"about\" |\n| integer / decimal range | `<gen type=\"number\" value=\"5..500\"/>`, `decimals=\"2\"` for `12.30` |\n| date in a range | `<gen type=\"date\" from=\"2025-01-01\" to=\"2025-12-31\" format=\"YYYY-MM-DD\"/>` |\n| running id | `<gen type=\"increment\" value=\"1\"/>` |\n| shaped string | `<gen type=\"regex\" value=\"[A-Z]{2}[0-9]{9}\"/>` |\n| real-world data | `<gen type=\"template\" value=\"person.lastName\"/>` — paths from `find-packs.mjs` |\n\nIn `<data>`: `${{Name | lower}}`, `| upper`; `| csv` quotes a CSV field, `| sql` a SQL\nliteral, `| json` writes a JSON string (empty → `null`). Built-ins: `${{_count}}` (row\nnumber), `_last` (`<data if=\"!_last\">,</data>` for JSON commas), `_total`.\n\n## Checks and whole-run rules (inside `<env>`)\n\n- `<assert each=\"Amount >= 5 && Amount <= 500\" says=\"…\"/>` — every row.\n- `<assert that=\"…\" says=\"…\"/>` — once, over whole-run numbers from\n  `<gen type=\"stat\" of=\"Col\" op=\"count\"/>` columns or `_total`.\n- Unique by construction — the cheap way: put the running id in it,\n  `${{First | lower}}.${{Last | lower}}${{Id}}@example.com`.\n- One drawn column unique: `uniq=\"true\"` on its `<sequence>` — lists, packs, number\n  ranges, `regex` (`<sequence name=\"Code\" uniq=\"true\"><gen type=\"number\" value=\"1000..9999\"/></sequence>`);\n  not computed templates like `common.internet.email` (refused — use the counter).\n- A combination unique across rows: wrap its sequences in `<uniq>…</uniq>`",
              "tool": "tdc_read_docs"
            },
            {
              "arguments": {
                "config": "<tdc>\n  <env count=\"4\" seed=\"123\">\n    <before><line><data>[</data></line></before>\n    <after><line><data>]</data></line></after>\n    <sequence name=\"Status\"><gen type=\"text\" value=\"active\"/></sequence>\n    <assert each=\"Status == 'active'\" says=\"status is active\"/>\n  </env>\n  <block><line><data>  {\"status\": ${{Status | json}}}</data><data if=\"!_last\">,</data></line></block>\n</tdc>"
              },
              "reply": "Valid (tdcv2 0.4.0), 4 records.",
              "tool": "tdc_check"
            },
            {
              "arguments": {
                "config": "<tdc>\n  <env count=\"4\" seed=\"123\">\n    <before><line><data>[</data></line></before>\n    <after><line><data>]</data></line></after>\n    <sequence name=\"Status\"><gen type=\"text\" value=\"active\"/></sequence>\n    <assert each=\"Status == 'active'\" says=\"status is active\"/>\n  </env>\n  <block><line><data>  {\"status\": ${{Status | json}}}</data><data if=\"!_last\">,</data></line></block>\n</tdc>",
                "preview": 10
              },
              "reply": "4 records, 6 lines (tdcv2 0.4.0, seed 123). Nothing written — give `output` to write the file.\n\nFirst 6 lines:\n[\n  {\"status\": \"active\"},\n  {\"status\": \"active\"},\n  {\"status\": \"active\"},\n  {\"status\": \"active\"}\n]",
              "tool": "tdc_generate"
            }
          ],
          "task": "Using TDC, generate a JSON fixture with 4 records, each with a status field whose value is \"active\", and show the generated output in the tool reply. Use a fixed seed of 123 and check the config before generating."
        },
        "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 TDC config passed validation. Generation with seed `123` returned this JSON fixture in the tool reply; no file was written.\n\n```json\n[\n  {\"status\": \"active\"},\n  {\"status\": \"active\"},\n  {\"status\": \"active\"},\n  {\"status\": \"active\"}\n]\n```",
          "done_when": "The transcript shows a successful config check and a JSON preview containing four records with status set to \"active\".",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {
                "page": "guide"
              },
              "reply": "> **Using this through the tdcv2 MCP server.** The guide below was written for agents with a\n> terminal. Here, use the tools instead:\n> `npx -y tdcv2@0.4.0 check` → **tdc_check** · `npx -y tdcv2@0.4.0 <file> --count 5` → **tdc_generate** (preview) ·\n> `npx -y tdcv2@0.4.0 <file> -o <out>` → **tdc_generate** with `output` · `npx -y tdcv2@0.4.0 pack add <locale>` (and its\n> `init`) → **tdc_pack_add** · `scripts/find-packs.mjs` →\n> **tdc_find_packs** · `scripts/peek.mjs` → **tdc_peek** · pages under `<skill>/` and `reference/` →\n> **tdc_read_docs**. Write the config into a `.tdc` file in the project with your file tools and pass its\n> `path` — the config is the deliverable, handed over with the data. Everything runs on this machine;\n> nothing is sent anywhere.\n\n# TDCv2 — test data from a config\n\nTDCv2 is a deterministic test-data engine. You write a small `.tdc` config; the engine\ngenerates the rows **locally**. Same config, same `seed` → the same file, byte for byte.\nThe config is the deliverable — hand it over with the data.\n\nThis skill is instructions only; the engine runs in the terminal — `npx -y tdcv2@0.4.0 …`\n(Node ≥ 20). Invoking the skill again runs nothing.\n`<skill>` below means this skill's own folder.\n\nCommands here run the same in bash, zsh, PowerShell and cmd. Keep yours so: one command\nat a time (Windows PowerShell 5.1 has no && chaining); look into files with\n`node <skill>/scripts/peek.mjs <file>`, not `cut`, `grep`, `sort`, `wc`. PowerShell\nrefusing `npx` (\"running scripts is disabled\") → `npx.cmd`, same arguments.\n\n## The engine makes the rows — not you\n\nThe delivered file is exactly what `npx -y tdcv2@0.4.0 <name>.tdc -o <file>` wrote. Nothing\nelse produces or touches it:\n\n- no script (JS, Python, shell) that imports `tdcv2` and picks values itself;\n- no name, city or diagnosis lists typed into code — lists belong in the config or come\n  from packs;\n- no fixing rows afterwards with `sed`, Python or by hand.\n\nIf the config cannot express a requirement (see `reference/INDEX.md`), say plainly what\nis missing — a hand-made file reported as \"generated with TDCv2\" is worse than none.\n\n**Red flags — back to the config:** \"a quick generator around tdcv2\", \"I'll\npost-process the output\", \"easier to make this column in Python\".\n\n## Workflow\n\n**First: who reads the rows?**\n\n- **Code in the project** — a test, a fixture, a seed script. Write the config (steps\n  1–5), then the code loads it itself — no JSON or CSV in between, it would drift from\n  the config:\n\n  ```js\n  // TypeScript / JS — npm i -D tdcv2@0.4.0\n  import { TDC } from \"tdcv2\";\n  const users = new TDC({ configFile: \"test/users.tdc\" }).toArray(); // objects, values are strings\n  ```\n\n  ```python\n  # Python — pip install tdcv2==0.4.0 (into the project's environment)\n  from tdcv2 import TDC\n  users = TDC(config_file=\"tests/users.tdc\").to_array()\n  ```\n\n  Java, C#, Rust, and the traps of each: `<skill>/from-code.md`.\n\n  **Red flag:** `npx -y tdcv2@0.4.0 users.tdc -o users.json` (or `.csv`) so that a test can\n  read it — that is the fixture to avoid; the test calls the loader above. If adding the\n  library to the project fails, say so before falling back to a generated file.\n- **A person or another tool** wants a file — steps 1–7.\n\n1. **Turn every requirement into config or an `<assert>`.** \"Age 18–90\" is the range\n   *and* `<assert each=\"Age >= 18 && Age <= 90\" says=\"…\"/>`; the engine then checks it on\n   every row and stops with the row number if it fails.\n2. **Find data before writing a `template` path:**\n   `node <skill>/scripts/find-packs.mjs <words>` (`last name`, `email`). Never guess a\n   path; the script lists the ones installed here.\n3. **Write `<name>.tdc`** next to the output file, with `count` and `seed` inside `<env>`.\n4. **Check:** `npx -y tdcv2@0.4.0 check --brief <name>.tdc`. Fix every line it prints — a\n   `help: did you mean …` part names the right spelling.\n5. **Look at a few rows:** `npx -y tdcv2@0.4.0 <name>.tdc --count 5`.\n6. **Generate** (only when the rows go to a file): `npx -y tdcv2@0.4.0 <name>.tdc -o <file>` — no `--count`/`--seed` flags, so the\n   config alone reproduces the file.\n7. **Prove it from the file, then report.** `node <skill>/scripts/peek.mjs <file>` —\n   row count, and per column the distinct values, the split, the range; add\n   `--column <name>` for one column in full. Say \"generated\" only if step 6 ran in this\n   turn and succeeded. Report the file, the config and the command that regenerates it.\n\nEditing an existing config: change only what was asked, then run steps 4–7 again.\n\n## The shape of a config\n\n```xml\n<tdc>\n  <env count=\"100\" seed=\"clinic\" local=\"en\">\n    <before><line><data>id,gender,first_name,age,diagnosis</data></line></before>\n    <sequence name=\"Id\"><gen type=\"increment\" value=\"1\"/></sequence>\n    <sequence name=\"Gender\"><gen type=\"text\" value=\"M,F\" percent=\"50,50\"/></sequence>\n    <sequence name=\"MaleName\" parent=\"Gender.M\"><gen type=\"template\" value=\"person.male.firstName\"/></sequence>\n    <sequence name=\"FemaleName\" parent=\"Gender.F\"><gen type=\"template\" value=\"person.female.firstName\"/></sequence>\n    <sequence name=\"Age\"><gen type=\"number\" value=\"18..90\"/></sequence>\n    <sequence name=\"MaleDx\" parent=\"Gender.M\"><gen type=\"template\" value=\"person.male.diagnosis\"/></sequence>\n    <sequence name=\"FemaleDx\" parent=\"Gender.F\"><gen type=\"template\" value=\"person.female.diagnosis\"/></sequence>\n    <assert each=\"Age >= 18 && Age <= 90\" says=\"every patient is an adult under 91\"/>\n  </env>\n  <block>\n    <line><data>${{Id}},${{Gender}},${{MaleName}}${{FemaleName}},${{Age}},${{MaleDx}}${{FemaleDx}}</data></line>\n  </block>\n</tdc>\n```\n\n- `<sequence>` is a column; `<gen>` says where its values come from. `<block>` is the\n  template of **one** output record; `${{Name}}` prints a column.\n- `parent=\"Gender.M\"` draws a column **only** on rows where `Gender` is `M`; elsewhere it\n  is empty. Mirrored columns printed side by side give one value per row that fits the\n  parent — that is how fields agree.\n- `<before>` / `<after>` print once around the whole run (CSV header, JSON `[` `]`).\n- **It looks like XML and is not: nothing is escaped or expanded.** Write operators as\n  they are — `if=\"Age < 18 || Age >= 65\"`, `each=\"A >= 1 && A <= 9\"`, `!=`, `!_last` —\n  and `\"`, `<`, `>`, `&` as plain characters in `<data>`.\n\n## Generators you need most\n\n| need | write |\n| :--- | :--- |\n| pick from a list | `<gen type=\"text\" value=\"a,b,c\"/>` — no `percent`: equal shares, exactly |\n| exact shares | `<gen type=\"text\" value=\"shipped,pending\" percent=\"70,30\"/>` — 70 % exactly, not \"about\" |\n| integer / decimal range | `<gen type=\"number\" value=\"5..500\"/>`, `decimals=\"2\"` for `12.30` |\n| date in a range | `<gen type=\"date\" from=\"2025-01-01\" to=\"2025-12-31\" format=\"YYYY-MM-DD\"/>` |\n| running id | `<gen type=\"increment\" value=\"1\"/>` |\n| shaped string | `<gen type=\"regex\" value=\"[A-Z]{2}[0-9]{9}\"/>` |\n| real-world data | `<gen type=\"template\" value=\"person.lastName\"/>` — paths from `find-packs.mjs` |\n\nIn `<data>`: `${{Name | lower}}`, `| upper`; `| csv` quotes a CSV field, `| sql` a SQL\nliteral, `| json` writes a JSON string (empty → `null`). Built-ins: `${{_count}}` (row\nnumber), `_last` (`<data if=\"!_last\">,</data>` for JSON commas), `_total`.\n\n## Checks and whole-run rules (inside `<env>`)\n\n- `<assert each=\"Amount >= 5 && Amount <= 500\" says=\"…\"/>` — every row.\n- `<assert that=\"…\" says=\"…\"/>` — once, over whole-run numbers from\n  `<gen type=\"stat\" of=\"Col\" op=\"count\"/>` columns or `_total`.\n- Unique by construction — the cheap way: put the running id in it,\n  `${{First | lower}}.${{Last | lower}}${{Id}}@example.com`.\n- One drawn column unique: `uniq=\"true\"` on its `<sequence>` — lists, packs, number\n  ranges, `regex` (`<sequence name=\"Code\" uniq=\"true\"><gen type=\"number\" value=\"1000..9999\"/></sequence>`);\n  not computed templates like `common.internet.email` (refused — use the counter).\n- A combination unique across rows: wrap its sequences in `<uniq>…</uniq>`",
              "tool": "tdc_read_docs"
            },
            {
              "arguments": {
                "config": "<tdc>\n  <env count=\"4\" seed=\"123\">\n    <before><line><data>[</data></line></before>\n    <after><line><data>]</data></line></after>\n    <sequence name=\"Status\"><gen type=\"text\" value=\"active\"/></sequence>\n    <assert each=\"Status == 'active'\" says=\"status is active\"/>\n  </env>\n  <block><line><data>  {\"status\": ${{Status | json}}}</data><data if=\"!_last\">,</data></line></block>\n</tdc>"
              },
              "reply": "Valid (tdcv2 0.4.0), 4 records.",
              "tool": "tdc_check"
            },
            {
              "arguments": {
                "config": "<tdc>\n  <env count=\"4\" seed=\"123\">\n    <before><line><data>[</data></line></before>\n    <after><line><data>]</data></line></after>\n    <sequence name=\"Status\"><gen type=\"text\" value=\"active\"/></sequence>\n    <assert each=\"Status == 'active'\" says=\"status is active\"/>\n  </env>\n  <block><line><data>  {\"status\": ${{Status | json}}}</data><data if=\"!_last\">,</data></line></block>\n</tdc>",
                "preview": 10
              },
              "reply": "4 records, 6 lines (tdcv2 0.4.0, seed 123). Nothing written — give `output` to write the file.\n\nFirst 6 lines:\n[\n  {\"status\": \"active\"},\n  {\"status\": \"active\"},\n  {\"status\": \"active\"},\n  {\"status\": \"active\"}\n]",
              "tool": "tdc_generate"
            }
          ],
          "task": "Using TDC, generate a JSON fixture with 4 records, each with a status field whose value is \"active\", and show the generated output in the tool reply. Use a fixed seed of 123 and check the config before generating."
        },
        "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 TDC config passed validation, then generated this in-memory fixture with seed `123`:\n\n```json\n[\n  {\"status\": \"active\"},\n  {\"status\": \"active\"},\n  {\"status\": \"active\"},\n  {\"status\": \"active\"}\n]\n```\n\nNo file was written.",
          "done_when": "The transcript shows a successful config check and a JSON preview containing four records with status set to \"active\".",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {
                "page": "guide"
              },
              "reply": "> **Using this through the tdcv2 MCP server.** The guide below was written for agents with a\n> terminal. Here, use the tools instead:\n> `npx -y tdcv2@0.4.0 check` → **tdc_check** · `npx -y tdcv2@0.4.0 <file> --count 5` → **tdc_generate** (preview) ·\n> `npx -y tdcv2@0.4.0 <file> -o <out>` → **tdc_generate** with `output` · `npx -y tdcv2@0.4.0 pack add <locale>` (and its\n> `init`) → **tdc_pack_add** · `scripts/find-packs.mjs` →\n> **tdc_find_packs** · `scripts/peek.mjs` → **tdc_peek** · pages under `<skill>/` and `reference/` →\n> **tdc_read_docs**. Write the config into a `.tdc` file in the project with your file tools and pass its\n> `path` — the config is the deliverable, handed over with the data. Everything runs on this machine;\n> nothing is sent anywhere.\n\n# TDCv2 — test data from a config\n\nTDCv2 is a deterministic test-data engine. You write a small `.tdc` config; the engine\ngenerates the rows **locally**. Same config, same `seed` → the same file, byte for byte.\nThe config is the deliverable — hand it over with the data.\n\nThis skill is instructions only; the engine runs in the terminal — `npx -y tdcv2@0.4.0 …`\n(Node ≥ 20). Invoking the skill again runs nothing.\n`<skill>` below means this skill's own folder.\n\nCommands here run the same in bash, zsh, PowerShell and cmd. Keep yours so: one command\nat a time (Windows PowerShell 5.1 has no && chaining); look into files with\n`node <skill>/scripts/peek.mjs <file>`, not `cut`, `grep`, `sort`, `wc`. PowerShell\nrefusing `npx` (\"running scripts is disabled\") → `npx.cmd`, same arguments.\n\n## The engine makes the rows — not you\n\nThe delivered file is exactly what `npx -y tdcv2@0.4.0 <name>.tdc -o <file>` wrote. Nothing\nelse produces or touches it:\n\n- no script (JS, Python, shell) that imports `tdcv2` and picks values itself;\n- no name, city or diagnosis lists typed into code — lists belong in the config or come\n  from packs;\n- no fixing rows afterwards with `sed`, Python or by hand.\n\nIf the config cannot express a requirement (see `reference/INDEX.md`), say plainly what\nis missing — a hand-made file reported as \"generated with TDCv2\" is worse than none.\n\n**Red flags — back to the config:** \"a quick generator around tdcv2\", \"I'll\npost-process the output\", \"easier to make this column in Python\".\n\n## Workflow\n\n**First: who reads the rows?**\n\n- **Code in the project** — a test, a fixture, a seed script. Write the config (steps\n  1–5), then the code loads it itself — no JSON or CSV in between, it would drift from\n  the config:\n\n  ```js\n  // TypeScript / JS — npm i -D tdcv2@0.4.0\n  import { TDC } from \"tdcv2\";\n  const users = new TDC({ configFile: \"test/users.tdc\" }).toArray(); // objects, values are strings\n  ```\n\n  ```python\n  # Python — pip install tdcv2==0.4.0 (into the project's environment)\n  from tdcv2 import TDC\n  users = TDC(config_file=\"tests/users.tdc\").to_array()\n  ```\n\n  Java, C#, Rust, and the traps of each: `<skill>/from-code.md`.\n\n  **Red flag:** `npx -y tdcv2@0.4.0 users.tdc -o users.json` (or `.csv`) so that a test can\n  read it — that is the fixture to avoid; the test calls the loader above. If adding the\n  library to the project fails, say so before falling back to a generated file.\n- **A person or another tool** wants a file — steps 1–7.\n\n1. **Turn every requirement into config or an `<assert>`.** \"Age 18–90\" is the range\n   *and* `<assert each=\"Age >= 18 && Age <= 90\" says=\"…\"/>`; the engine then checks it on\n   every row and stops with the row number if it fails.\n2. **Find data before writing a `template` path:**\n   `node <skill>/scripts/find-packs.mjs <words>` (`last name`, `email`). Never guess a\n   path; the script lists the ones installed here.\n3. **Write `<name>.tdc`** next to the output file, with `count` and `seed` inside `<env>`.\n4. **Check:** `npx -y tdcv2@0.4.0 check --brief <name>.tdc`. Fix every line it prints — a\n   `help: did you mean …` part names the right spelling.\n5. **Look at a few rows:** `npx -y tdcv2@0.4.0 <name>.tdc --count 5`.\n6. **Generate** (only when the rows go to a file): `npx -y tdcv2@0.4.0 <name>.tdc -o <file>` — no `--count`/`--seed` flags, so the\n   config alone reproduces the file.\n7. **Prove it from the file, then report.** `node <skill>/scripts/peek.mjs <file>` —\n   row count, and per column the distinct values, the split, the range; add\n   `--column <name>` for one column in full. Say \"generated\" only if step 6 ran in this\n   turn and succeeded. Report the file, the config and the command that regenerates it.\n\nEditing an existing config: change only what was asked, then run steps 4–7 again.\n\n## The shape of a config\n\n```xml\n<tdc>\n  <env count=\"100\" seed=\"clinic\" local=\"en\">\n    <before><line><data>id,gender,first_name,age,diagnosis</data></line></before>\n    <sequence name=\"Id\"><gen type=\"increment\" value=\"1\"/></sequence>\n    <sequence name=\"Gender\"><gen type=\"text\" value=\"M,F\" percent=\"50,50\"/></sequence>\n    <sequence name=\"MaleName\" parent=\"Gender.M\"><gen type=\"template\" value=\"person.male.firstName\"/></sequence>\n    <sequence name=\"FemaleName\" parent=\"Gender.F\"><gen type=\"template\" value=\"person.female.firstName\"/></sequence>\n    <sequence name=\"Age\"><gen type=\"number\" value=\"18..90\"/></sequence>\n    <sequence name=\"MaleDx\" parent=\"Gender.M\"><gen type=\"template\" value=\"person.male.diagnosis\"/></sequence>\n    <sequence name=\"FemaleDx\" parent=\"Gender.F\"><gen type=\"template\" value=\"person.female.diagnosis\"/></sequence>\n    <assert each=\"Age >= 18 && Age <= 90\" says=\"every patient is an adult under 91\"/>\n  </env>\n  <block>\n    <line><data>${{Id}},${{Gender}},${{MaleName}}${{FemaleName}},${{Age}},${{MaleDx}}${{FemaleDx}}</data></line>\n  </block>\n</tdc>\n```\n\n- `<sequence>` is a column; `<gen>` says where its values come from. `<block>` is the\n  template of **one** output record; `${{Name}}` prints a column.\n- `parent=\"Gender.M\"` draws a column **only** on rows where `Gender` is `M`; elsewhere it\n  is empty. Mirrored columns printed side by side give one value per row that fits the\n  parent — that is how fields agree.\n- `<before>` / `<after>` print once around the whole run (CSV header, JSON `[` `]`).\n- **It looks like XML and is not: nothing is escaped or expanded.** Write operators as\n  they are — `if=\"Age < 18 || Age >= 65\"`, `each=\"A >= 1 && A <= 9\"`, `!=`, `!_last` —\n  and `\"`, `<`, `>`, `&` as plain characters in `<data>`.\n\n## Generators you need most\n\n| need | write |\n| :--- | :--- |\n| pick from a list | `<gen type=\"text\" value=\"a,b,c\"/>` — no `percent`: equal shares, exactly |\n| exact shares | `<gen type=\"text\" value=\"shipped,pending\" percent=\"70,30\"/>` — 70 % exactly, not \"about\" |\n| integer / decimal range | `<gen type=\"number\" value=\"5..500\"/>`, `decimals=\"2\"` for `12.30` |\n| date in a range | `<gen type=\"date\" from=\"2025-01-01\" to=\"2025-12-31\" format=\"YYYY-MM-DD\"/>` |\n| running id | `<gen type=\"increment\" value=\"1\"/>` |\n| shaped string | `<gen type=\"regex\" value=\"[A-Z]{2}[0-9]{9}\"/>` |\n| real-world data | `<gen type=\"template\" value=\"person.lastName\"/>` — paths from `find-packs.mjs` |\n\nIn `<data>`: `${{Name | lower}}`, `| upper`; `| csv` quotes a CSV field, `| sql` a SQL\nliteral, `| json` writes a JSON string (empty → `null`). Built-ins: `${{_count}}` (row\nnumber), `_last` (`<data if=\"!_last\">,</data>` for JSON commas), `_total`.\n\n## Checks and whole-run rules (inside `<env>`)\n\n- `<assert each=\"Amount >= 5 && Amount <= 500\" says=\"…\"/>` — every row.\n- `<assert that=\"…\" says=\"…\"/>` — once, over whole-run numbers from\n  `<gen type=\"stat\" of=\"Col\" op=\"count\"/>` columns or `_total`.\n- Unique by construction — the cheap way: put the running id in it,\n  `${{First | lower}}.${{Last | lower}}${{Id}}@example.com`.\n- One drawn column unique: `uniq=\"true\"` on its `<sequence>` — lists, packs, number\n  ranges, `regex` (`<sequence name=\"Code\" uniq=\"true\"><gen type=\"number\" value=\"1000..9999\"/></sequence>`);\n  not computed templates like `common.internet.email` (refused — use the counter).\n- A combination unique across rows: wrap its sequences in `<uniq>…</uniq>`",
              "tool": "tdc_read_docs"
            },
            {
              "arguments": {
                "config": "<tdc>\n  <env count=\"4\" seed=\"123\">\n    <before><line><data>[</data></line></before>\n    <after><line><data>]</data></line></after>\n    <sequence name=\"Status\"><gen type=\"text\" value=\"active\"/></sequence>\n    <assert each=\"Status == 'active'\" says=\"status is active\"/>\n  </env>\n  <block><line><data>  {\"status\": ${{Status | json}}}</data><data if=\"!_last\">,</data></line></block>\n</tdc>"
              },
              "reply": "Valid (tdcv2 0.4.0), 4 records.",
              "tool": "tdc_check"
            },
            {
              "arguments": {
                "config": "<tdc>\n  <env count=\"4\" seed=\"123\">\n    <before><line><data>[</data></line></before>\n    <after><line><data>]</data></line></after>\n    <sequence name=\"Status\"><gen type=\"text\" value=\"active\"/></sequence>\n    <assert each=\"Status == 'active'\" says=\"status is active\"/>\n  </env>\n  <block><line><data>  {\"status\": ${{Status | json}}}</data><data if=\"!_last\">,</data></line></block>\n</tdc>",
                "preview": 10
              },
              "reply": "4 records, 6 lines (tdcv2 0.4.0, seed 123). Nothing written — give `output` to write the file.\n\nFirst 6 lines:\n[\n  {\"status\": \"active\"},\n  {\"status\": \"active\"},\n  {\"status\": \"active\"},\n  {\"status\": \"active\"}\n]",
              "tool": "tdc_generate"
            }
          ],
          "task": "Using TDC, generate a JSON fixture with 4 records, each with a status field whose value is \"active\", and show the generated output in the tool reply. Use a fixed seed of 123 and check the config before generating."
        },
        "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": "The documentation index identifies **`generators/date.md` — Date** as the reference page for date generators. I opened it with `tdc_read_docs` using `page=\"generators/date\"`.\n\nThe tool returned the beginning of a longer page, rather than its complete contents. Here is what it showed:\n\n## The `date` generator\n\n> Use it when you need a date or a date-time — a birthday, a document date, an event timestamp — inside a range and printed in a specific format.\n>\n> Dates run on TDC's own portable date runtime: a strict parser, a UTC calendar, and a localized formatter, with no dependency on moment.js. The same config is designed to produce the same dates in every implementation.\n\n### Attributes at a glance\n\n| Attribute | Purpose |\n|---|---|\n| `value` | `birth`, `today`, `now`, a single date, or a range `START..END` |\n| `range` | A range `START..END`, an alternative spelling |\n| `from` / `to` | Range endpoints given separately |\n| `order` | `sequential` walks the range instead of drawing from it |\n| `step` | Distance between rows on a walked axis, such as `15m`, `1h30m`, `2d`, `3mo`, or `1y` |\n| `weekdays` | Weekdays retained on a walked axis, such as `mon..fri` or `sun,wed` |\n| `cycle` | `false` refuses to loop when a bounded walked range runs out |\n| `format` | Output format; default `L` |\n| `local` | Locale for formatting, inherited from `<env>` if omitted |\n| `oldest` / `youngest` | Age window for `value=\"birth\"`; defaults are `80` and `10` years |\n| `precision` | `day`, `second`, or `millisecond` |\n| `of` | Measure from another date column |\n| `plus` | Offset from that column, such as `7d`, `3..10d`, or `1..3mo` |\n\n### Random dates\n\nA range draws uniformly between **inclusive** endpoints:\n\n```xml\n<gen type=\"date\" value=\"2020-01-01..2025-12-31\" format=\"YYYY-MM-DD\"/>\n```\n\n`range=\"START..END\"` is equivalent, or the endpoints can be supplied separately:\n\n```xml\n<gen type=\"date\"\n     from=\"2026-05-02T09:00:00\"\n     to=\"2026-05-02T09:00:05\"\n     format=\"YYYY-MM-DDTHH:mm:ss\"/>\n",
          "done_when": "The transcript shows the documentation index or search result identifying the date-generator reference and a nonempty reply containing that reference page.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {
                "page": "index"
              },
              "reply": "# TDCv2 reference — index\n\nBuilt from the engine's docs at v0.4.0 (2026-11-09); they say they cover TDC 0.4.0 (updated 9 November 2026).\nOpen a page with the Read tool: `reference/<path>`. Pages link to each other by relative path.\nFor another engine version (the one the project itself uses), the same page of that version:\n`https://raw.githubusercontent.com/NickLiapin/tdcv2/v<version>/docs/<path>`. What `check` says beats any page.\nFor data-pack addresses, run `scripts/find-packs.mjs` — it reads what is installed.\n\n- `intro.md` — **Introduction.** TDC generates internally consistent test data. Within each row, names match gender categories, cities belong to the correct countries, and diagnoses fit patient profiles. Run TDC again with the same seed and core version, and it produces the same rows, byte for byte.\n- `whats-new.md` — **What's new.** What changed in TDC that you can see — a new command or flag, a new check, something that now works differently — newest first, each with a link to where the docs explain it now. Changes inside the engine that alter nothing you write or read are left out; every change is in the changelog.\n\n## Getting Started\n\n- `getting-started/installation.md` — **Installation.** TDC targets five ecosystems — npm (Node.js / TypeScript), pip (Python), Maven (Java), NuGet (.NET) and Cargo (Rust) — all producing byte-for-byte identical output from the same config, seed, version and output mode (see Determinism & proportions).\n- `getting-started/quick-api.md` — **Quick API — one value at a time.** Sometimes you don't want a dataset. You want a surname, here, on this line of a test — the job a faker library does. TDC answers that from the same data packs its configs draw on, so the name in your unit test and the name in your million-row fixture come from one list.\n- `getting-started/first-data.md` — **Your first dataset.** You describe what a row is made of, and the engine builds as many rows as you ask for. The same seed always returns the same output, and the shape of that output — plain text, CSV, JSON, SQL — is yours to define with a row template.\n- `getting-started/editor-support.md` — **Editor support.** The npm package ships two executables. tdcv2 generates data; tdcv2-lsp is a language server that gives any LSP-speaking editor live error checking, completion, hover, go-to-definition, find-references, rename and formatting for .tdc files.\n\n## AI Agents\n\n- `ai-agents/overview.md` — **TDC for AI agents.** A coding agent can write TDC configs for you. You ask in plain words — \"500 customers from 20 countries as CSV\", \"a pytest test for validateuser on 50 different users\" — and the agent writes the .tdc config, checks it with the engine, generates the file on your machine, and hands you the data together with the config that reproduces it.\n- `ai-agents/claude-code.md` — **Claude Code.** The plugin brings both parts at once: the skill, and the MCP server, which Claude Code starts on its own whenever a session needs it. It comes from two places — Anthropic's plugin directory or the project's GitHub marketplace. Pick one: installed both ways, the plugin is there twice, so the skill loads twice and two servers start.\n- `ai-agents/other-agents.md` — **Other agents.** Each of these agents reads skills, so one command makes TDC available in all of them. The MCP server is optional on top of it.\n- `ai-agents/working-with-the-agent.md` — **Working with the agent.** Describe the data the way you would to a colleague:\n\n## Core Concepts\n\n- `core-concepts/configuration.md` — **Configuration structure.** Every TDC config is a single <tdc> root element. It holds two things: an optional <env> (generation parameters, sequences, and fixtures) and a required <block> (the layout of each output record).\n- `core-concepts/sequences.md` — **Sequences.** A <sequence> declares a named column of values, count rows long. Think of it as a finished column that exists before rendering starts: the generator fills every row, and as each output row is rendered you pull a value out by name, either with interpolation ${{Name}} or inside an if condition.\n- `core-concepts/output-formatting.md` — **Output & formatting.** Once you've declared your data as sequences, the output block turns it into text in whatever shape you want: CSV, JSON, SQL, a log line, a config file. It's three nested tags — <block> → <line> → <data> — plus interpolation and a few optional pieces (fixtures, filters, conditions).\n- `core-concepts/determinism.md` — **Determinism & proportions.** Two properties make TDC's data trustworthy: the same seed reproduces the same data byte for byte, and every share comes out at its exact proportion. The promise is precise about what has to match — the same config, the same seed, the same core version and the same output mode.\n\n## Generators\n\n- `generators/overview.md` — **Overview.** A <gen> produces the values of a sequence. Its type attribute chooses which generator to use, and every other attribute is a parameter of that generator:\n- `generators/text.md` — **Text.** Use it when you have a short, fixed list of options to pick from — gender, status, category, payment type, tier. If you need exact shares of each (say, 60% one, 40% the other), that's a single extra attribute.\n- `generators/number.md` — **Number.** Use it when you need an integer — an id, a code, a price, an age — inside a range; or a string of exactly N digits (even hundreds or thousands of them, far past what an ordinary number type can hold).\n- `generators/template.md` — **Template.** Use it when you need realistic real-world data (names, birthdays, countries) or technical identifiers (UUIDs, emails, IBANs, tax numbers) that you don't want to invent by hand. type=\"template\" pulls the value from a built-in source; the value attribute is a dotted path that selects which one, and many templates respect the locale.\n- `generators/file.md` — **File.** Use it when the values already live in a file — a list of cities, an export, a CSV — and you don't want to paste them into the config. The src attribute tells the generator where to read them from, and one more attribute, column, decides whether that file is a plain list or a table.\n- `generators/date.md` — **Date.** Use it when you need a date or a date-time — a birthday, a document date, an event timestamp — inside a range and printed in a specific format.\n- `generators/symbol.md` — **Symbol.** Use it when you need a string of a given length built from a specific set of characters — a token, a coupon code, a random suffix, or \"noise\" in a particular script. symbol picks one character at a time out of a set you define. (For a whole word from a list, use text instead.)\n- `generators/regex.md` — **Regex.** Use it when a value has a strict shape — a phone number, a SKU, a license plate, a token, an order code. There are too many possibilities for a list, and too much internal structure for number: letters, digits, and separators in specific places.\n- `generators/advanced-regex.md` — **Advanced Regex.** Use it when you need everything regex does, but the shape of the string itself carries a statistical distribution of variants — say, exactly 70% of the codes start with RU, 20% with US, 10% with DE.\n- `generators/counters.md` — **Increment & Decrement.** Use them when you need a running counter instead of a random value — a sequential id or row number (1, 2, 3…), an SKU series that climbs by a fixed step, or a countdown that falls to zero.\n- `generators/timeseries.md` — **Time series.** Use it when you need values that move like a real signal over time — daily sales, sensor readings, web traffic. Real series aren't flat noise or a single distribution: they're layers — an overall trend (rising or falling), a repeating season (weekly, yearly), and random noise on top. timeseries builds a row's value exactly that way:\n- `generators/pattern.md` — **Pattern.** Use it when a signal has a shape you can't describe with a formula — demand by hour, a demograph",
              "tool": "tdc_read_docs"
            },
            {
              "arguments": {
                "page": "generators/date"
              },
              "reply": "# The `date` generator\n\n**Use it when** you need a date or a date-time — a birthday, a document date, an\nevent timestamp — inside a range and printed in a specific format.\n\nDates run on TDC's own portable date runtime: a strict parser, a UTC calendar, and\na localized formatter, with no dependency on moment.js. The same config is designed\nto produce the same dates in every implementation.\n\nExample outputs below are illustrative — the exact values depend on the seed and\ncan differ by core version. What stays fixed is the shape and the format.\n\n## At a glance\n\n| Attribute             | What it does                                                                                                                                                                                                                                                                                                                                                                                                                                                   |\n| :-------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `value`               | `birth`, `today`, `now`, a single date, or a range `START..END`                                                                                                                                                                                                                                                                                                                                                                                                |\n| `range`               | A range `START..END` — a newer spelling of the same idea                                                                                                                                                                                                                                                                                                                                                                                                       |\n| `from` / `to`         | The two endpoints of a range, given separately                                                                                                                                                                                                                                                                                                                                                                                                                 |\n| `order`               | `sequential` walks the range instead of drawing from it — see [A date axis](#a-date-axis-walking-the-range-instead-of-drawing-from-it)                                                                                                                                                                                                                                                                                                                         |\n| `step`                | How far each row moves on a walked axis: `15m`, `1h30m`, `2d`, `3mo`, `1y`                                                                                                                                                                                                                                                                                                                                                                                     |\n| `weekdays`            | Which weekdays a walked axis keeps: `mon..fri`, `sun,wed`                                                                                                                                                                                                                                                                                                                                                                                                      |\n| `cycle`               | `false` refuses instead of looping when a walked BOUNDED range runs out                                                                                                                                                                                                                                                                                                                                                                                        |\n| `format`              | Output format (see [Formatting the output](#formatting-the-output)); default `L`                                                                                                                                                                                                                                                                                                                                                                               |\n| `local`               | Twenty-five: `ar`, `cs`, `de`, `el`, `en`, `es`, `fi`, `fr`, `hi`, `hu`, `id`, `it`, `ja`, `ko`, `nl`, `pl`, `pt`, `ru`, `sv`, `th`, `tr`, `uk`, `vi`, `zh-cn`, `zh-tw`. Nineteen also answer to a three-letter alias — `ara`, `ces`, `deu`, `ell`, `eng`, `spa`, `fin`, `fra`, `hun`, `ind`, `ita`, `jpn`, `kor`, `nld`, `pol`, `por`, `tur`, `ukr`, `vie` — and `hi`, `ru`, `sv`, `th`, `zh-cn`, `zh-tw` have none (bare `zh` is accepted and reads the Traditional table). Inherited from [`<env>`](../reference/tags.md) if omitted |\n| `oldest` / `youngest` | Age window in years for `value=\"birth\"` (defaults `80` and `10`)                                                                                                                                                                                                                                                                                                                                                                                               |\n| `precision`           | `day`, `second`, or `millisecond`                                                                                                                                                                                                                                                                                                                                                                                                                              |\n| `of`                  | Measure from another date column instead of drawing — see [An interval](#an-interval-a-date-measured-from-another-date)                                                                                                                                                                                                                                                                                                                                        |\n| `plus`                | How far from it: `7d`, `3..10d`, `1..3mo`, `-10..-3d`                                                                                                                                                                                                                                                                                                                                                                                                          |\n\nUse only one of `value`, `range`, or the `from`/`to` pair to describe a range — they\nare three spellings of the same thing. Give none of them and the range runs from\n`1970-01-01` to the current moment; see\n[No bounds at all](#no-bounds-a",
              "tool": "tdc_read_docs"
            },
            {
              "arguments": {
                "offset": 4000,
                "page": "generators/date"
              },
              "reply": "                                                                                                                                                                                                                                                                                                                                                                          |\n| `cycle`               | `false` refuses instead of looping when a walked BOUNDED range runs out                                                                                                                                                                                                                                                                                                                                                                                        |\n| `format`              | Output format (see [Formatting the output](#formatting-the-output)); default `L`                                                                                                                                                                                                                                                                                                                                                                               |\n| `local`               | Twenty-five: `ar`, `cs`, `de`, `el`, `en`, `es`, `fi`, `fr`, `hi`, `hu`, `id`, `it`, `ja`, `ko`, `nl`, `pl`, `pt`, `ru`, `sv`, `th`, `tr`, `uk`, `vi`, `zh-cn`, `zh-tw`. Nineteen also answer to a three-letter alias — `ara`, `ces`, `deu`, `ell`, `eng`, `spa`, `fin`, `fra`, `hun`, `ind`, `ita`, `jpn`, `kor`, `nld`, `pol`, `por`, `tur`, `ukr`, `vie` — and `hi`, `ru`, `sv`, `th`, `zh-cn`, `zh-tw` have none (bare `zh` is accepted and reads the Traditional table). Inherited from [`<env>`](../reference/tags.md) if omitted |\n| `oldest` / `youngest` | Age window in years for `value=\"birth\"` (defaults `80` and `10`)                                                                                                                                                                                                                                                                                                                                                                                               |\n| `precision`           | `day`, `second`, or `millisecond`                                                                                                                                                                                                                                                                                                                                                                                                                              |\n| `of`                  | Measure from another date column instead of drawing — see [An interval](#an-interval-a-date-measured-from-another-date)                                                                                                                                                                                                                                                                                                                                        |\n| `plus`                | How far from it: `7d`, `3..10d`, `1..3mo`, `-10..-3d`                                                                                                                                                                                                                                                                                                                                                                                                          |\n\nUse only one of `value`, `range`, or the `from`/`to` pair to describe a range — they\nare three spellings of the same thing. Give none of them and the range runs from\n`1970-01-01` to the current moment; see\n[No bounds at all](#no-bounds-at-all--the-clock-closes-the-range).\n\nThe last four attributes belong to a **walked** range and are read only alongside\n`order=\"sequential\"`. On a drawn date `step` or `weekdays` would be silently ignored, so\nthey are refused instead (`TDC248`).\n\n## A random date in a range\n\nGive `value` a range as `START..END` (both ends **inclusive**) and you get a random\ndate drawn uniformly inside it.\n\n```xml\n<gen type=\"date\" value=\"2020-01-01..2025-12-31\" format=\"YYYY-MM-DD\"/>\n```\n\n`./run demo.tdc (5 rows)`\n\n```\n2024-08-15\n2022-02-04\n2020-06-21\n2025-10-04\n2021-03-31\n```\n\nThe endpoints are part of the window. A one-week range makes that easy to see —\nover enough rows, both `2024-06-01` and `2024-06-07` show up:\n\n```xml\n<gen type=\"date\" value=\"2024-06-01..2024-06-07\" format=\"YYYY-MM-DD\"/>\n```\n\n`./run demo.tdc (6 rows)`\n\n```\n2024-06-06\n2024-06-03\n2024-06-01\n2024-06-07\n2024-06-02\n2024-06-02\n```\n\nInput dates are parsed **strictly**, in one of these forms:\n\n- date: `YYYY-MM-DD`, `YYYY.MM.DD`, or `YYYY/MM/DD`;\n- date-time: `YYYY-MM-DDTHH:mm`, `YYYY-MM-DDTHH:mm:ss`, or `YYYY-MM-DDTHH:mm:ss.SSS`;\n- range: `START..END`.\n\nFree text (`June 6th`, `06/06/24`) is **not** accepted — use one of the strict forms\nabove.\n\n### The `range` attribute — the same window, a newer spelling\n\n`range=\"START..END\"` means exactly what `value=\"START..END\"` does. It reads better\nwhen `value` would otherwise look like a keyword, and it's the spelling shared with\nthe [`date.range`](../generators/template.md) template.\n\n```xml\n<gen type=\"date\" range=\"2020-01-01..2024-12-31\" format=\"YYYY-MM-DD\"/>\n```\n\n`./run demo.tdc (5 rows)`\n\n```\n2023-11-08\n2021-09-30\n2020-05-23\n2024-10-19\n2021-01-14\n```\n\nThe [`format`](../reference/attributes.md) attribute only controls how the date is\nwritten — it never changes the window, and the window never depends on the format.\n\n### `from` and `to` — the endpoints given separately\n\nWhen it's clearer to name the two ends separately, use `from` and `to`. This is the\nmost natural spelling for date-time windows, where the range would otherwise be one\nlong string.\n\n```xml\n<gen type=\"date\"\n     from=\"2026-05-02T09:00:00\"\n     to=\"2026-05-02T09:00:05\"\n     format=\"YYYY-MM-DDTHH:mm:ss\"/>\n```\n\n`./run demo.tdc (5 rows)`\n\n```\n2026-05-02T09:00:04\n2026-05-02T09:00:01\n2026-05-02T09:00:03\n2026-05-02T09:00:00\n2026-05-02T09:00:02\n```\n\n### No bounds at all — the clock closes the range\n\nA `date` generator given **neither** end still produces a date. The window runs from\n`1970-01-01` to the current moment, so the generator reads the clock even though nothing\nin the config mentions a date:\n\n```xml\n<gen type=\"date\" format=\"YYYY-MM-DD\"/>\n```\n\n`./run demo.tdc  —  the same seed, a year apart`\n\n```\n--now 2026-04-23    --now 2027-04-23\n1972-06-01          1972-06-17\n1994-11-20          1995-04-30\n1972-05-06          1972-05-21\n```\n\nThis is the easiest way to lose reproducibility by accident. Give the generator two ends,\nor pin the clock with [`--now`](../reference/cli.md#--now--pin-the-clock).\n\n**One** end is not a third option for a range you DRAW from: `from` without `to` is\n`TDC150`, and `range=\"2020-01-01..\"` is `TDC151`. Where a value is sampled, a single end\nsays nothing about what to sample. One end IS enough when the range is\n[walked](#a-date-axis-walking-the-range-instead-of-drawing-from-it) — that is the next\nsection.\n\n## A date axis: walking the range instead of drawing from it\n\nEverything above **draws**: each row picks a date at random from the window. Ask for a\nrow per day for a year and you get repeats and gaps, because that is what drawing means.\n\nAdd `order=\"sequential\"` and the range is **walked** instead. Row 0 is the start, row 1\nis one step on, row _i_ is `start + i × step`. This is the time axis a run needs when the\ndata is a series rather than a sample: readings, transactions, a log.\n\n### `from` alone — an axis with no end\n\nA walked axis takes only a start. Its last row is `start + (count − 1) × step` — row 0 is\nthe start itself — which is a consequence o",
              "tool": "tdc_read_docs"
            },
            {
              "arguments": {
                "offset": 8000,
                "page": "generators/date"
              },
              "reply": "t-all--the-clock-closes-the-range).\n\nThe last four attributes belong to a **walked** range and are read only alongside\n`order=\"sequential\"`. On a drawn date `step` or `weekdays` would be silently ignored, so\nthey are refused instead (`TDC248`).\n\n## A random date in a range\n\nGive `value` a range as `START..END` (both ends **inclusive**) and you get a random\ndate drawn uniformly inside it.\n\n```xml\n<gen type=\"date\" value=\"2020-01-01..2025-12-31\" format=\"YYYY-MM-DD\"/>\n```\n\n`./run demo.tdc (5 rows)`\n\n```\n2024-08-15\n2022-02-04\n2020-06-21\n2025-10-04\n2021-03-31\n```\n\nThe endpoints are part of the window. A one-week range makes that easy to see —\nover enough rows, both `2024-06-01` and `2024-06-07` show up:\n\n```xml\n<gen type=\"date\" value=\"2024-06-01..2024-06-07\" format=\"YYYY-MM-DD\"/>\n```\n\n`./run demo.tdc (6 rows)`\n\n```\n2024-06-06\n2024-06-03\n2024-06-01\n2024-06-07\n2024-06-02\n2024-06-02\n```\n\nInput dates are parsed **strictly**, in one of these forms:\n\n- date: `YYYY-MM-DD`, `YYYY.MM.DD`, or `YYYY/MM/DD`;\n- date-time: `YYYY-MM-DDTHH:mm`, `YYYY-MM-DDTHH:mm:ss`, or `YYYY-MM-DDTHH:mm:ss.SSS`;\n- range: `START..END`.\n\nFree text (`June 6th`, `06/06/24`) is **not** accepted — use one of the strict forms\nabove.\n\n### The `range` attribute — the same window, a newer spelling\n\n`range=\"START..END\"` means exactly what `value=\"START..END\"` does. It reads better\nwhen `value` would otherwise look like a keyword, and it's the spelling shared with\nthe [`date.range`](../generators/template.md) template.\n\n```xml\n<gen type=\"date\" range=\"2020-01-01..2024-12-31\" format=\"YYYY-MM-DD\"/>\n```\n\n`./run demo.tdc (5 rows)`\n\n```\n2023-11-08\n2021-09-30\n2020-05-23\n2024-10-19\n2021-01-14\n```\n\nThe [`format`](../reference/attributes.md) attribute only controls how the date is\nwritten — it never changes the window, and the window never depends on the format.\n\n### `from` and `to` — the endpoints given separately\n\nWhen it's clearer to name the two ends separately, use `from` and `to`. This is the\nmost natural spelling for date-time windows, where the range would otherwise be one\nlong string.\n\n```xml\n<gen type=\"date\"\n     from=\"2026-05-02T09:00:00\"\n     to=\"2026-05-02T09:00:05\"\n     format=\"YYYY-MM-DDTHH:mm:ss\"/>\n```\n\n`./run demo.tdc (5 rows)`\n\n```\n2026-05-02T09:00:04\n2026-05-02T09:00:01\n2026-05-02T09:00:03\n2026-05-02T09:00:00\n2026-05-02T09:00:02\n```\n\n### No bounds at all — the clock closes the range\n\nA `date` generator given **neither** end still produces a date. The window runs from\n`1970-01-01` to the current moment, so the generator reads the clock even though nothing\nin the config mentions a date:\n\n```xml\n<gen type=\"date\" format=\"YYYY-MM-DD\"/>\n```\n\n`./run demo.tdc  —  the same seed, a year apart`\n\n```\n--now 2026-04-23    --now 2027-04-23\n1972-06-01          1972-06-17\n1994-11-20          1995-04-30\n1972-05-06          1972-05-21\n```\n\nThis is the easiest way to lose reproducibility by accident. Give the generator two ends,\nor pin the clock with [`--now`](../reference/cli.md#--now--pin-the-clock).\n\n**One** end is not a third option for a range you DRAW from: `from` without `to` is\n`TDC150`, and `range=\"2020-01-01..\"` is `TDC151`. Where a value is sampled, a single end\nsays nothing about what to sample. One end IS enough when the range is\n[walked](#a-date-axis-walking-the-range-instead-of-drawing-from-it) — that is the next\nsection.\n\n## A date axis: walking the range instead of drawing from it\n\nEverything above **draws**: each row picks a date at random from the window. Ask for a\nrow per day for a year and you get repeats and gaps, because that is what drawing means.\n\nAdd `order=\"sequential\"` and the range is **walked** instead. Row 0 is the start, row 1\nis one step on, row _i_ is `start + i × step`. This is the time axis a run needs when the\ndata is a series rather than a sample: readings, transactions, a log.\n\n### `from` alone — an axis with no end\n\nA walked axis takes only a start. Its last row is `start + (count − 1) × step` — row 0 is\nthe start itself — which is a consequence of the run's length rather than something you\nwork out and write down:\n\n```xml\n<gen type=\"date\" from=\"2026-01-01\" order=\"sequential\" format=\"YYYY-MM-DD\"/>\n```\n\n`./run axis.tdc (count=5)`\n\n```\n2026-01-01\n2026-01-02\n2026-01-03\n2026-01-04\n2026-01-05\n```\n\nRaise `count` to a million and the axis simply runs a million days. Nothing is expanded\ninto a list, so the range costs no memory however long it is.\n\n### `step` — how far each row moves\n\nThe default is one day. `step` takes a number and a unit, and units add up:\n\n| Written     | Means              | Group    |\n| :---------- | :----------------- | :------- |\n| `15m`       | 15 minutes         | fixed    |\n| `1h30m`     | 90 minutes         | fixed    |\n| `2` or `2d` | 2 days             | fixed    |\n| `1w`        | 7 days             | fixed    |\n| `3mo`       | 3 calendar months  | calendar |\n| `1y6mo`     | 18 calendar months | calendar |\n\n`m` is the **minute**, as it is in every notation of this shape. The month is `mo`,\nbecause `m` is taken — and not `M`, since a difference of forty-four thousand between\nthree minutes and three months should not rest on the case of one letter.\n\n```xml\n<gen type=\"date\" from=\"2026-01-01T09:00:00\" order=\"sequential\"\n     step=\"15m\" format=\"YYYY-MM-DD HH:mm\"/>\n```\n\n`./run axis.tdc (count=4)`\n\n```\n2026-01-01 09:00\n2026-01-01 09:15\n2026-01-01 09:30\n2026-01-01 09:45\n```\n\nA step is EITHER fixed or calendar, never both. `15m` is always 900,000 milliseconds; a\nmonth is 28 to 31 days. They add up within their own group and `step=\"1mo15d\"` is refused\n(`TDC247`), because \"a month and fifteen days\" is 43, 44, 45 or 46 days depending on which\nhalf you apply first, and a config whose meaning turns on an invisible ordering is worse\nthan one that will not parse. Write `45d`, or `1mo`.\n\n### A calendar step keeps the day of the month\n\nEach step is measured **from the start**, never accumulated. That distinction is invisible\non days and decides the answer on months:\n\n```xml\n<gen type=\"date\" from=\"2026-01-31\" order=\"sequential\" step=\"1mo\" format=\"YYYY-MM-DD\"/>\n```\n\n`./run axis.tdc (count=4)`\n\n```\n2026-01-31\n2026-02-28\n2026-03-31\n2026-04-30\n```\n\nFebruary clamps to the 28th, and March goes back to the 31st. Stepping on from the clamped\nFebruary would have given 28 March and dragged every later month with it.\n\n### `weekdays` — keeping only some days\n\nA filter, not a step:\n\n```xml\n<gen type=\"date\" from=\"2026-01-01\" order=\"sequential\"\n     weekdays=\"mon..fri\" format=\"ddd YYYY-MM-DD\"/>\n```\n\n`./run axis.tdc (count=6)`\n\n```\nThu 2026-01-01\nFri 2026-01-02\nMon 2026-01-05\nTue 2026-01-06\nWed 2026-01-07\nThu 2026-01-08\n```\n\nFriday to Monday is a three-day jump, which is exactly why this is not a step: a step\nkeeps the spacing even, and a filter breaks it. Keeping them apart is what lets them\ncombine — \"every 12 hours, working days only\" needs both words:\n\n```xml\n<gen type=\"date\" from=\"2026-01-02T00:00:00\" order=\"sequential\"\n     step=\"12h\" weekdays=\"mon..fri\" format=\"ddd YYYY-MM-DD HH:mm\"/>\n```\n\n`./run axis.tdc (count=6)`\n\n```\nFri 2026-01-02 00:00\nFri 2026-01-02 12:00\nMon 2026-01-05 00:00\nMon 2026-01-05 12:00\nTue 2026-01-06 00:00\nTue 2026-01-06 12:00\n```\n\nSpans use `..`, like every other range in TDC, and a list uses commas: `weekdays=\"sun,wed\"`.\nA span **wraps**, so `fri..mon` is Friday, Saturday, Sunday, Monday — a week is a circle,\nand refusing to go round it would make half the spans unwritable.\n\nTwo kinds of step refuse `weekdays` (`TDC250`), for two different reasons.\n\nA **whole number of weeks** lands on the same weekday every time, so the filter would\nmatch every row or none of them — a full column or an empty one, with nothing said either\nway. That is measured on the step's length, so `14d` is refused exactly as `2w` is, while\n`10d` is fine.\n\nA **calendar step** — `1mo`, `3mo`, `1y` — is refused for the opposite reason: it does\n_not_ fix the weekday. The 15th walks Thursday, Sunday, Sunday, Wednesday, Friday, Monday\nacross the first half of 2026. Which rows survive a wee",
              "tool": "tdc_read_docs"
            }
          ],
          "task": "Look up the TDC documentation page index and identify the available reference page for date generators; then open that reference page and show its contents."
        },
        "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": "The index identifies **`generators/date.md` — “Date”** as the reference page. I opened it with `tdc_read_docs(page=\"generators/date\")`. The reference is from the documentation for TDC **v0.4.0**.\n\nBelow is a condensed rendering of its contents; it is not the full verbatim page.\n\n# The `date` generator\n\nUse the date generator for a date or date-time—such as a birthday, document date, or event timestamp—inside a range and printed in a specified format. It uses a portable date runtime with strict parsing, a UTC calendar, and localized formatting.\n\n## Attributes\n\n| Attribute | Purpose |\n|---|---|\n| `value` | `birth`, `today`, `now`, a single date, or a range `START..END` |\n| `range` | A range `START..END`, an alternative to `value` |\n| `from`, `to` | Range endpoints given separately |\n| `order` | `sequential` walks a range rather than drawing randomly |\n| `step` | Distance between rows on a sequential axis, e.g. `15m`, `2d`, `3mo` |\n| `weekdays` | Weekdays retained on a sequential axis, e.g. `mon..fri` |\n| `cycle` | `false` refuses to loop when a bounded sequential range runs out |\n| `format` | Output format; default `L` |\n| `local` | Locale for names and locale-aware formats; inherited from `<env>` if omitted |\n| `oldest`, `youngest` | Age bounds in years for `value=\"birth\"`; defaults 80 and 10 |\n| `precision` | `day`, `second`, or `millisecond` |\n| `of`, `plus` | Generate a date relative to another date column |\n\nUse only one of `value`, `range`, or the `from`/`to` pair to describe a range.\n\n## Random dates and ranges\n\nRanges are **inclusive** at both ends:\n\n```xml\n<gen type=\"date\" value=\"2020-01-01..2025-12-31\" format=\"YYYY-MM-DD\"/>\n```\n\nEquivalent range spellings include:\n\n```xml\n<gen type=\"date\" range=\"2020-01-01..2024-12-31\" format=\"YYYY-MM-DD\"/>\n\n<gen type=\"date\"\n     from=\"2026-05-02T09:00:00\"\n     to=\"2026-05-02T09:00:05\"\n     format=\"YYYY-MM-DDTHH:mm:ss\"/>\n```\n\nInput is parsed strictly. Date forms are `YYYY-MM-DD`, `YYYY.MM.DD`, or `YYYY/MM/DD`; date-time form",
          "done_when": "The transcript shows the documentation index or search result identifying the date-generator reference and a nonempty reply containing that reference page.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {
                "page": "index"
              },
              "reply": "# TDCv2 reference — index\n\nBuilt from the engine's docs at v0.4.0 (2026-11-09); they say they cover TDC 0.4.0 (updated 9 November 2026).\nOpen a page with the Read tool: `reference/<path>`. Pages link to each other by relative path.\nFor another engine version (the one the project itself uses), the same page of that version:\n`https://raw.githubusercontent.com/NickLiapin/tdcv2/v<version>/docs/<path>`. What `check` says beats any page.\nFor data-pack addresses, run `scripts/find-packs.mjs` — it reads what is installed.\n\n- `intro.md` — **Introduction.** TDC generates internally consistent test data. Within each row, names match gender categories, cities belong to the correct countries, and diagnoses fit patient profiles. Run TDC again with the same seed and core version, and it produces the same rows, byte for byte.\n- `whats-new.md` — **What's new.** What changed in TDC that you can see — a new command or flag, a new check, something that now works differently — newest first, each with a link to where the docs explain it now. Changes inside the engine that alter nothing you write or read are left out; every change is in the changelog.\n\n## Getting Started\n\n- `getting-started/installation.md` — **Installation.** TDC targets five ecosystems — npm (Node.js / TypeScript), pip (Python), Maven (Java), NuGet (.NET) and Cargo (Rust) — all producing byte-for-byte identical output from the same config, seed, version and output mode (see Determinism & proportions).\n- `getting-started/quick-api.md` — **Quick API — one value at a time.** Sometimes you don't want a dataset. You want a surname, here, on this line of a test — the job a faker library does. TDC answers that from the same data packs its configs draw on, so the name in your unit test and the name in your million-row fixture come from one list.\n- `getting-started/first-data.md` — **Your first dataset.** You describe what a row is made of, and the engine builds as many rows as you ask for. The same seed always returns the same output, and the shape of that output — plain text, CSV, JSON, SQL — is yours to define with a row template.\n- `getting-started/editor-support.md` — **Editor support.** The npm package ships two executables. tdcv2 generates data; tdcv2-lsp is a language server that gives any LSP-speaking editor live error checking, completion, hover, go-to-definition, find-references, rename and formatting for .tdc files.\n\n## AI Agents\n\n- `ai-agents/overview.md` — **TDC for AI agents.** A coding agent can write TDC configs for you. You ask in plain words — \"500 customers from 20 countries as CSV\", \"a pytest test for validateuser on 50 different users\" — and the agent writes the .tdc config, checks it with the engine, generates the file on your machine, and hands you the data together with the config that reproduces it.\n- `ai-agents/claude-code.md` — **Claude Code.** The plugin brings both parts at once: the skill, and the MCP server, which Claude Code starts on its own whenever a session needs it. It comes from two places — Anthropic's plugin directory or the project's GitHub marketplace. Pick one: installed both ways, the plugin is there twice, so the skill loads twice and two servers start.\n- `ai-agents/other-agents.md` — **Other agents.** Each of these agents reads skills, so one command makes TDC available in all of them. The MCP server is optional on top of it.\n- `ai-agents/working-with-the-agent.md` — **Working with the agent.** Describe the data the way you would to a colleague:\n\n## Core Concepts\n\n- `core-concepts/configuration.md` — **Configuration structure.** Every TDC config is a single <tdc> root element. It holds two things: an optional <env> (generation parameters, sequences, and fixtures) and a required <block> (the layout of each output record).\n- `core-concepts/sequences.md` — **Sequences.** A <sequence> declares a named column of values, count rows long. Think of it as a finished column that exists before rendering starts: the generator fills every row, and as each output row is rendered you pull a value out by name, either with interpolation ${{Name}} or inside an if condition.\n- `core-concepts/output-formatting.md` — **Output & formatting.** Once you've declared your data as sequences, the output block turns it into text in whatever shape you want: CSV, JSON, SQL, a log line, a config file. It's three nested tags — <block> → <line> → <data> — plus interpolation and a few optional pieces (fixtures, filters, conditions).\n- `core-concepts/determinism.md` — **Determinism & proportions.** Two properties make TDC's data trustworthy: the same seed reproduces the same data byte for byte, and every share comes out at its exact proportion. The promise is precise about what has to match — the same config, the same seed, the same core version and the same output mode.\n\n## Generators\n\n- `generators/overview.md` — **Overview.** A <gen> produces the values of a sequence. Its type attribute chooses which generator to use, and every other attribute is a parameter of that generator:\n- `generators/text.md` — **Text.** Use it when you have a short, fixed list of options to pick from — gender, status, category, payment type, tier. If you need exact shares of each (say, 60% one, 40% the other), that's a single extra attribute.\n- `generators/number.md` — **Number.** Use it when you need an integer — an id, a code, a price, an age — inside a range; or a string of exactly N digits (even hundreds or thousands of them, far past what an ordinary number type can hold).\n- `generators/template.md` — **Template.** Use it when you need realistic real-world data (names, birthdays, countries) or technical identifiers (UUIDs, emails, IBANs, tax numbers) that you don't want to invent by hand. type=\"template\" pulls the value from a built-in source; the value attribute is a dotted path that selects which one, and many templates respect the locale.\n- `generators/file.md` — **File.** Use it when the values already live in a file — a list of cities, an export, a CSV — and you don't want to paste them into the config. The src attribute tells the generator where to read them from, and one more attribute, column, decides whether that file is a plain list or a table.\n- `generators/date.md` — **Date.** Use it when you need a date or a date-time — a birthday, a document date, an event timestamp — inside a range and printed in a specific format.\n- `generators/symbol.md` — **Symbol.** Use it when you need a string of a given length built from a specific set of characters — a token, a coupon code, a random suffix, or \"noise\" in a particular script. symbol picks one character at a time out of a set you define. (For a whole word from a list, use text instead.)\n- `generators/regex.md` — **Regex.** Use it when a value has a strict shape — a phone number, a SKU, a license plate, a token, an order code. There are too many possibilities for a list, and too much internal structure for number: letters, digits, and separators in specific places.\n- `generators/advanced-regex.md` — **Advanced Regex.** Use it when you need everything regex does, but the shape of the string itself carries a statistical distribution of variants — say, exactly 70% of the codes start with RU, 20% with US, 10% with DE.\n- `generators/counters.md` — **Increment & Decrement.** Use them when you need a running counter instead of a random value — a sequential id or row number (1, 2, 3…), an SKU series that climbs by a fixed step, or a countdown that falls to zero.\n- `generators/timeseries.md` — **Time series.** Use it when you need values that move like a real signal over time — daily sales, sensor readings, web traffic. Real series aren't flat noise or a single distribution: they're layers — an overall trend (rising or falling), a repeating season (weekly, yearly), and random noise on top. timeseries builds a row's value exactly that way:\n- `generators/pattern.md` — **Pattern.** Use it when a signal has a shape you can't describe with a formula — demand by hour, a demograph",
              "tool": "tdc_read_docs"
            },
            {
              "arguments": {
                "page": "generators/date"
              },
              "reply": "# The `date` generator\n\n**Use it when** you need a date or a date-time — a birthday, a document date, an\nevent timestamp — inside a range and printed in a specific format.\n\nDates run on TDC's own portable date runtime: a strict parser, a UTC calendar, and\na localized formatter, with no dependency on moment.js. The same config is designed\nto produce the same dates in every implementation.\n\nExample outputs below are illustrative — the exact values depend on the seed and\ncan differ by core version. What stays fixed is the shape and the format.\n\n## At a glance\n\n| Attribute             | What it does                                                                                                                                                                                                                                                                                                                                                                                                                                                   |\n| :-------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `value`               | `birth`, `today`, `now`, a single date, or a range `START..END`                                                                                                                                                                                                                                                                                                                                                                                                |\n| `range`               | A range `START..END` — a newer spelling of the same idea                                                                                                                                                                                                                                                                                                                                                                                                       |\n| `from` / `to`         | The two endpoints of a range, given separately                                                                                                                                                                                                                                                                                                                                                                                                                 |\n| `order`               | `sequential` walks the range instead of drawing from it — see [A date axis](#a-date-axis-walking-the-range-instead-of-drawing-from-it)                                                                                                                                                                                                                                                                                                                         |\n| `step`                | How far each row moves on a walked axis: `15m`, `1h30m`, `2d`, `3mo`, `1y`                                                                                                                                                                                                                                                                                                                                                                                     |\n| `weekdays`            | Which weekdays a walked axis keeps: `mon..fri`, `sun,wed`                                                                                                                                                                                                                                                                                                                                                                                                      |\n| `cycle`               | `false` refuses instead of looping when a walked BOUNDED range runs out                                                                                                                                                                                                                                                                                                                                                                                        |\n| `format`              | Output format (see [Formatting the output](#formatting-the-output)); default `L`                                                                                                                                                                                                                                                                                                                                                                               |\n| `local`               | Twenty-five: `ar`, `cs`, `de`, `el`, `en`, `es`, `fi`, `fr`, `hi`, `hu`, `id`, `it`, `ja`, `ko`, `nl`, `pl`, `pt`, `ru`, `sv`, `th`, `tr`, `uk`, `vi`, `zh-cn`, `zh-tw`. Nineteen also answer to a three-letter alias — `ara`, `ces`, `deu`, `ell`, `eng`, `spa`, `fin`, `fra`, `hun`, `ind`, `ita`, `jpn`, `kor`, `nld`, `pol`, `por`, `tur`, `ukr`, `vie` — and `hi`, `ru`, `sv`, `th`, `zh-cn`, `zh-tw` have none (bare `zh` is accepted and reads the Traditional table). Inherited from [`<env>`](../reference/tags.md) if omitted |\n| `oldest` / `youngest` | Age window in years for `value=\"birth\"` (defaults `80` and `10`)                                                                                                                                                                                                                                                                                                                                                                                               |\n| `precision`           | `day`, `second`, or `millisecond`                                                                                                                                                                                                                                                                                                                                                                                                                              |\n| `of`                  | Measure from another date column instead of drawing — see [An interval](#an-interval-a-date-measured-from-another-date)                                                                                                                                                                                                                                                                                                                                        |\n| `plus`                | How far from it: `7d`, `3..10d`, `1..3mo`, `-10..-3d`                                                                                                                                                                                                                                                                                                                                                                                                          |\n\nUse only one of `value`, `range`, or the `from`/`to` pair to describe a range — they\nare three spellings of the same thing. Give none of them and the range runs from\n`1970-01-01` to the current moment; see\n[No bounds at all](#no-bounds-a",
              "tool": "tdc_read_docs"
            },
            {
              "arguments": {
                "offset": 5000,
                "page": "generators/date"
              },
              "reply": "                                                                                                                                                                                                                                                                                                                        |\n| `local`               | Twenty-five: `ar`, `cs`, `de`, `el`, `en`, `es`, `fi`, `fr`, `hi`, `hu`, `id`, `it`, `ja`, `ko`, `nl`, `pl`, `pt`, `ru`, `sv`, `th`, `tr`, `uk`, `vi`, `zh-cn`, `zh-tw`. Nineteen also answer to a three-letter alias — `ara`, `ces`, `deu`, `ell`, `eng`, `spa`, `fin`, `fra`, `hun`, `ind`, `ita`, `jpn`, `kor`, `nld`, `pol`, `por`, `tur`, `ukr`, `vie` — and `hi`, `ru`, `sv`, `th`, `zh-cn`, `zh-tw` have none (bare `zh` is accepted and reads the Traditional table). Inherited from [`<env>`](../reference/tags.md) if omitted |\n| `oldest` / `youngest` | Age window in years for `value=\"birth\"` (defaults `80` and `10`)                                                                                                                                                                                                                                                                                                                                                                                               |\n| `precision`           | `day`, `second`, or `millisecond`                                                                                                                                                                                                                                                                                                                                                                                                                              |\n| `of`                  | Measure from another date column instead of drawing — see [An interval](#an-interval-a-date-measured-from-another-date)                                                                                                                                                                                                                                                                                                                                        |\n| `plus`                | How far from it: `7d`, `3..10d`, `1..3mo`, `-10..-3d`                                                                                                                                                                                                                                                                                                                                                                                                          |\n\nUse only one of `value`, `range`, or the `from`/`to` pair to describe a range — they\nare three spellings of the same thing. Give none of them and the range runs from\n`1970-01-01` to the current moment; see\n[No bounds at all](#no-bounds-at-all--the-clock-closes-the-range).\n\nThe last four attributes belong to a **walked** range and are read only alongside\n`order=\"sequential\"`. On a drawn date `step` or `weekdays` would be silently ignored, so\nthey are refused instead (`TDC248`).\n\n## A random date in a range\n\nGive `value` a range as `START..END` (both ends **inclusive**) and you get a random\ndate drawn uniformly inside it.\n\n```xml\n<gen type=\"date\" value=\"2020-01-01..2025-12-31\" format=\"YYYY-MM-DD\"/>\n```\n\n`./run demo.tdc (5 rows)`\n\n```\n2024-08-15\n2022-02-04\n2020-06-21\n2025-10-04\n2021-03-31\n```\n\nThe endpoints are part of the window. A one-week range makes that easy to see —\nover enough rows, both `2024-06-01` and `2024-06-07` show up:\n\n```xml\n<gen type=\"date\" value=\"2024-06-01..2024-06-07\" format=\"YYYY-MM-DD\"/>\n```\n\n`./run demo.tdc (6 rows)`\n\n```\n2024-06-06\n2024-06-03\n2024-06-01\n2024-06-07\n2024-06-02\n2024-06-02\n```\n\nInput dates are parsed **strictly**, in one of these forms:\n\n- date: `YYYY-MM-DD`, `YYYY.MM.DD`, or `YYYY/MM/DD`;\n- date-time: `YYYY-MM-DDTHH:mm`, `YYYY-MM-DDTHH:mm:ss`, or `YYYY-MM-DDTHH:mm:ss.SSS`;\n- range: `START..END`.\n\nFree text (`June 6th`, `06/06/24`) is **not** accepted — use one of the strict forms\nabove.\n\n### The `range` attribute — the same window, a newer spelling\n\n`range=\"START..END\"` means exactly what `value=\"START..END\"` does. It reads better\nwhen `value` would otherwise look like a keyword, and it's the spelling shared with\nthe [`date.range`](../generators/template.md) template.\n\n```xml\n<gen type=\"date\" range=\"2020-01-01..2024-12-31\" format=\"YYYY-MM-DD\"/>\n```\n\n`./run demo.tdc (5 rows)`\n\n```\n2023-11-08\n2021-09-30\n2020-05-23\n2024-10-19\n2021-01-14\n```\n\nThe [`format`](../reference/attributes.md) attribute only controls how the date is\nwritten — it never changes the window, and the window never depends on the format.\n\n### `from` and `to` — the endpoints given separately\n\nWhen it's clearer to name the two ends separately, use `from` and `to`. This is the\nmost natural spelling for date-time windows, where the range would otherwise be one\nlong string.\n\n```xml\n<gen type=\"date\"\n     from=\"2026-05-02T09:00:00\"\n     to=\"2026-05-02T09:00:05\"\n     format=\"YYYY-MM-DDTHH:mm:ss\"/>\n```\n\n`./run demo.tdc (5 rows)`\n\n```\n2026-05-02T09:00:04\n2026-05-02T09:00:01\n2026-05-02T09:00:03\n2026-05-02T09:00:00\n2026-05-02T09:00:02\n```\n\n### No bounds at all — the clock closes the range\n\nA `date` generator given **neither** end still produces a date. The window runs from\n`1970-01-01` to the current moment, so the generator reads the clock even though nothing\nin the config mentions a date:\n\n```xml\n<gen type=\"date\" format=\"YYYY-MM-DD\"/>\n```\n\n`./run demo.tdc  —  the same seed, a year apart`\n\n```\n--now 2026-04-23    --now 2027-04-23\n1972-06-01          1972-06-17\n1994-11-20          1995-04-30\n1972-05-06          1972-05-21\n```\n\nThis is the easiest way to lose reproducibility by accident. Give the generator two ends,\nor pin the clock with [`--now`](../reference/cli.md#--now--pin-the-clock).\n\n**One** end is not a third option for a range you DRAW from: `from` without `to` is\n`TDC150`, and `range=\"2020-01-01..\"` is `TDC151`. Where a value is sampled, a single end\nsays nothing about what to sample. One end IS enough when the range is\n[walked](#a-date-axis-walking-the-range-instead-of-drawing-from-it) — that is the next\nsection.\n\n## A date axis: walking the range instead of drawing from it\n\nEverything above **draws**: each row picks a date at random from the window. Ask for a\nrow per day for a year and you get repeats and gaps, because that is what drawing means.\n\nAdd `order=\"sequential\"` and the range is **walked** instead. Row 0 is the start, row 1\nis one step on, row _i_ is `start + i × step`. This is the time axis a run needs when the\ndata is a series rather than a sample: readings, transactions, a log.\n\n### `from` alone — an axis with no end\n\nA walked axis takes only a start. Its last row is `start + (count − 1) × step` — row 0 is\nthe start itself — which is a consequence of the run's length rather than something you\nwork out and write down:\n\n```xml\n<gen type=\"date\" from=\"2026-01-01\" order=\"sequential\" format=\"YYYY-MM-DD\"/>\n```\n\n`./run axis.tdc (count=5)`\n\n```\n2026-01-01\n2026-01-02\n2026-01-03\n2026-01-04\n2026-01-05\n```\n\nRaise `count` to a million and the axis simply runs a million days. Nothing is expanded\ninto a list, so the range costs no memory however long it is.\n\n### `step` — how far each row moves\n\nThe default is one day. `step` takes a number and a unit, and units add up:\n\n| Written     | Means              | Group    |\n| :---------- | :----------------- | :------- |\n| `15m`       | 15 minutes         | fixed    |\n| `1h30m`     | 90 minutes         | fixed    |\n| `2` or `2d` | 2 days             | fixed    |\n| `1w`        | 7 days             | fixed    |\n| `3mo`       | 3 calendar months  | calendar |\n| `1y6mo`     | 18 calendar months | calendar |\n\n`m` is the **minute**, as it is in every notation of this shape. The month is `mo`,\nbecause `m` is ",
              "tool": "tdc_read_docs"
            },
            {
              "arguments": {
                "offset": 10000,
                "page": "generators/date"
              },
              "reply": "date-time windows, where the range would otherwise be one\nlong string.\n\n```xml\n<gen type=\"date\"\n     from=\"2026-05-02T09:00:00\"\n     to=\"2026-05-02T09:00:05\"\n     format=\"YYYY-MM-DDTHH:mm:ss\"/>\n```\n\n`./run demo.tdc (5 rows)`\n\n```\n2026-05-02T09:00:04\n2026-05-02T09:00:01\n2026-05-02T09:00:03\n2026-05-02T09:00:00\n2026-05-02T09:00:02\n```\n\n### No bounds at all — the clock closes the range\n\nA `date` generator given **neither** end still produces a date. The window runs from\n`1970-01-01` to the current moment, so the generator reads the clock even though nothing\nin the config mentions a date:\n\n```xml\n<gen type=\"date\" format=\"YYYY-MM-DD\"/>\n```\n\n`./run demo.tdc  —  the same seed, a year apart`\n\n```\n--now 2026-04-23    --now 2027-04-23\n1972-06-01          1972-06-17\n1994-11-20          1995-04-30\n1972-05-06          1972-05-21\n```\n\nThis is the easiest way to lose reproducibility by accident. Give the generator two ends,\nor pin the clock with [`--now`](../reference/cli.md#--now--pin-the-clock).\n\n**One** end is not a third option for a range you DRAW from: `from` without `to` is\n`TDC150`, and `range=\"2020-01-01..\"` is `TDC151`. Where a value is sampled, a single end\nsays nothing about what to sample. One end IS enough when the range is\n[walked](#a-date-axis-walking-the-range-instead-of-drawing-from-it) — that is the next\nsection.\n\n## A date axis: walking the range instead of drawing from it\n\nEverything above **draws**: each row picks a date at random from the window. Ask for a\nrow per day for a year and you get repeats and gaps, because that is what drawing means.\n\nAdd `order=\"sequential\"` and the range is **walked** instead. Row 0 is the start, row 1\nis one step on, row _i_ is `start + i × step`. This is the time axis a run needs when the\ndata is a series rather than a sample: readings, transactions, a log.\n\n### `from` alone — an axis with no end\n\nA walked axis takes only a start. Its last row is `start + (count − 1) × step` — row 0 is\nthe start itself — which is a consequence of the run's length rather than something you\nwork out and write down:\n\n```xml\n<gen type=\"date\" from=\"2026-01-01\" order=\"sequential\" format=\"YYYY-MM-DD\"/>\n```\n\n`./run axis.tdc (count=5)`\n\n```\n2026-01-01\n2026-01-02\n2026-01-03\n2026-01-04\n2026-01-05\n```\n\nRaise `count` to a million and the axis simply runs a million days. Nothing is expanded\ninto a list, so the range costs no memory however long it is.\n\n### `step` — how far each row moves\n\nThe default is one day. `step` takes a number and a unit, and units add up:\n\n| Written     | Means              | Group    |\n| :---------- | :----------------- | :------- |\n| `15m`       | 15 minutes         | fixed    |\n| `1h30m`     | 90 minutes         | fixed    |\n| `2` or `2d` | 2 days             | fixed    |\n| `1w`        | 7 days             | fixed    |\n| `3mo`       | 3 calendar months  | calendar |\n| `1y6mo`     | 18 calendar months | calendar |\n\n`m` is the **minute**, as it is in every notation of this shape. The month is `mo`,\nbecause `m` is taken — and not `M`, since a difference of forty-four thousand between\nthree minutes and three months should not rest on the case of one letter.\n\n```xml\n<gen type=\"date\" from=\"2026-01-01T09:00:00\" order=\"sequential\"\n     step=\"15m\" format=\"YYYY-MM-DD HH:mm\"/>\n```\n\n`./run axis.tdc (count=4)`\n\n```\n2026-01-01 09:00\n2026-01-01 09:15\n2026-01-01 09:30\n2026-01-01 09:45\n```\n\nA step is EITHER fixed or calendar, never both. `15m` is always 900,000 milliseconds; a\nmonth is 28 to 31 days. They add up within their own group and `step=\"1mo15d\"` is refused\n(`TDC247`), because \"a month and fifteen days\" is 43, 44, 45 or 46 days depending on which\nhalf you apply first, and a config whose meaning turns on an invisible ordering is worse\nthan one that will not parse. Write `45d`, or `1mo`.\n\n### A calendar step keeps the day of the month\n\nEach step is measured **from the start**, never accumulated. That distinction is invisible\non days and decides the answer on months:\n\n```xml\n<gen type=\"date\" from=\"2026-01-31\" order=\"sequential\" step=\"1mo\" format=\"YYYY-MM-DD\"/>\n```\n\n`./run axis.tdc (count=4)`\n\n```\n2026-01-31\n2026-02-28\n2026-03-31\n2026-04-30\n```\n\nFebruary clamps to the 28th, and March goes back to the 31st. Stepping on from the clamped\nFebruary would have given 28 March and dragged every later month with it.\n\n### `weekdays` — keeping only some days\n\nA filter, not a step:\n\n```xml\n<gen type=\"date\" from=\"2026-01-01\" order=\"sequential\"\n     weekdays=\"mon..fri\" format=\"ddd YYYY-MM-DD\"/>\n```\n\n`./run axis.tdc (count=6)`\n\n```\nThu 2026-01-01\nFri 2026-01-02\nMon 2026-01-05\nTue 2026-01-06\nWed 2026-01-07\nThu 2026-01-08\n```\n\nFriday to Monday is a three-day jump, which is exactly why this is not a step: a step\nkeeps the spacing even, and a filter breaks it. Keeping them apart is what lets them\ncombine — \"every 12 hours, working days only\" needs both words:\n\n```xml\n<gen type=\"date\" from=\"2026-01-02T00:00:00\" order=\"sequential\"\n     step=\"12h\" weekdays=\"mon..fri\" format=\"ddd YYYY-MM-DD HH:mm\"/>\n```\n\n`./run axis.tdc (count=6)`\n\n```\nFri 2026-01-02 00:00\nFri 2026-01-02 12:00\nMon 2026-01-05 00:00\nMon 2026-01-05 12:00\nTue 2026-01-06 00:00\nTue 2026-01-06 12:00\n```\n\nSpans use `..`, like every other range in TDC, and a list uses commas: `weekdays=\"sun,wed\"`.\nA span **wraps**, so `fri..mon` is Friday, Saturday, Sunday, Monday — a week is a circle,\nand refusing to go round it would make half the spans unwritable.\n\nTwo kinds of step refuse `weekdays` (`TDC250`), for two different reasons.\n\nA **whole number of weeks** lands on the same weekday every time, so the filter would\nmatch every row or none of them — a full column or an empty one, with nothing said either\nway. That is measured on the step's length, so `14d` is refused exactly as `2w` is, while\n`10d` is fine.\n\nA **calendar step** — `1mo`, `3mo`, `1y` — is refused for the opposite reason: it does\n_not_ fix the weekday. The 15th walks Thursday, Sunday, Sunday, Wednesday, Friday, Monday\nacross the first half of 2026. Which rows survive a weekday filter would follow the\ncalendar rather than anything written in the config, so the step and the filter are asked\nto be one or the other.\n\nIf what you wanted was a **monthly date moved onto the next working day** — the way a\nbilling system moves an invoice off a Sunday — that is not expressible today, and the\nfilter would not do it: it would drop February entirely rather than move it. A\n**working-day calendar** is a different thing and does work: `step=\"1d\"` with\n`weekdays=\"mon..fri\"`, as above.\n\n### A bounded range wraps\n\nGive a walked range both ends and it loops when it runs out, the way a short list does:\n\n```xml\n<gen type=\"date\" range=\"2026-01-01..2026-01-03\" order=\"sequential\" format=\"YYYY-MM-DD\"/>\n```\n\n`./run axis.tdc (count=7)`\n\n```\n2026-01-01\n2026-01-02\n2026-01-03\n2026-01-01\n2026-01-02\n2026-01-03\n2026-01-01\n```\n\n`cycle=\"false\"` turns running out into a refusal instead:\n\n`./run axis.tdc (range of 2 days, count=4, cycle=false)`\n\n```\ntdcv2: order=\"sequential\" cycle=\"false\": the source has only 2 values, so row 3 has none — shorten count= or lengthen the source\n```\n\nAn **open** axis has no end to wrap at, so `cycle` means nothing there.\n\n## A birthday with `value=\"birth\"`\n\n`value=\"birth\"` produces a date of birth relative to the current date, bounded by an\nage window. `youngest` and `oldest` are ages **in years** (defaults `10` and `80`),\nso `youngest=\"18\" oldest=\"65\"` gives working-age adults.\n\n```xml\n<gen type=\"date\" value=\"birth\" youngest=\"18\" oldest=\"65\" format=\"MM/DD/YYYY\"/>\n```\n\n`./run demo.tdc (5 rows)`\n\n```\n07/05/1997\n11/23/1985\n02/14/2003\n09/30/1971\n06/18/1990\n```\n\n**Why use it instead of a fixed range:** the window follows \"now\", so the same config\nstill produces plausible ages next year, with no dates to go back and edit. For a\nbirthday tied to a whole synthetic person, the\n[`person.b_day`](../generators/template.md) template takes the same\n`oldest`/`youngest`/`format` attributes.\n\nThat is also why the dates move. The window slides forward with ",
              "tool": "tdc_read_docs"
            },
            {
              "arguments": {
                "offset": 18000,
                "page": "generators/date"
              },
              "reply": "the clock, so the same\nseed gives a different birth date tomorrow — the age holds, the date does not. Where the\noutput has to stay put — a snapshot test, a fixture, a bug report — pin the clock with\n[`--now`](../reference/cli.md#--now--pin-the-clock).\n\n## `today` and `now`\n\n`value=\"today\"` is the current date; `value=\"now\"` is the current date **and** time.\nBoth read from the runtime clock, so they're the natural stamps for \"generated on\"\nor \"as of\" fields.\n\n```xml\n<gen type=\"date\" value=\"today\" format=\"LL\"/>\n<gen type=\"date\" value=\"now\"   format=\"YYYY-MM-DDTHH:mm:ss.SSS\"/>\n```\n\n`./run demo.tdc`\n\n```\nvalue=\"today\" format=\"LL\"                       April 23, 2026\nvalue=\"now\"   format=\"YYYY-MM-DDTHH:mm:ss.SSS\"   2026-04-23T12:00:00.000\n```\n\nReading the clock is the point of both, and it is what makes them non-reproducible: the\nseed has no say in what \"today\" is. Pin the clock with\n[`--now`](../reference/cli.md#--now--pin-the-clock) and `today` and `now` return the\ninstant you named, in every run.\n\n## `precision` — the step for date-time ranges\n\n`precision` sets the smallest step a range moves in: `day`, `second`, or\n`millisecond`. For a five-second window stepped by whole seconds:\n\n```xml\n<gen type=\"date\"\n     from=\"2026-05-02T09:00:00\"\n     to=\"2026-05-02T09:00:05\"\n     precision=\"second\"\n     format=\"YYYY-MM-DDTHH:mm:ss\"/>\n```\n\n`./run demo.tdc (5 rows)`\n\n```\n2026-05-02T09:00:04\n2026-05-02T09:00:01\n2026-05-02T09:00:03\n2026-05-02T09:00:00\n2026-05-02T09:00:02\n```\n\nWhen `precision` is omitted, the default follows the range type:\n\n| Range type               | Default step        | What `precision` changes                              |\n| :----------------------- | :------------------ | :---------------------------------------------------- |\n| date-only (`YYYY-MM-DD`) | one **day**         | rarely needed — the range already steps in whole days |\n| date-time                | one **millisecond** | `precision=\"second\"` zeros the milliseconds           |\n\nUse `precision=\"second\"` whenever you want clean, human-looking timestamps instead of\nmillisecond noise; use `precision=\"millisecond\"` (the date-time default) when you need\nsub-second resolution.\n\n## An interval: a date measured from another date\n\nReal records are full of pairs: admitted and discharged, ordered and shipped,\nissued and expires, the start and the end of a shift. The second date is not\nindependent of the first — it is the first plus a length — and two separate\nranges cannot say so. They put the discharge _before_ the admission on a good\nshare of the rows.\n\n`of` names the column to measure from and `plus` says how far:\n\n```xml\n<sequence name=\"Admitted\">\n  <gen type=\"date\" from=\"2026-01-01\" to=\"2026-03-01\" format=\"YYYY-MM-DD\"/>\n</sequence>\n<sequence name=\"Discharged\">\n  <gen type=\"date\" of=\"Admitted\" plus=\"2..14d\" format=\"YYYY-MM-DD\"/>\n</sequence>\n```\n\n`./run stay.tdc (6 rows)`\n\n```\n2026-02-06  2026-02-16\n2026-02-14  2026-02-23\n2026-01-11  2026-01-16\n2026-01-11  2026-01-24\n2026-02-27  2026-03-06\n2026-01-08  2026-01-14\n```\n\nEvery discharge is after its own admission, by 2 to 14 days — and the _length_\nof each stay is drawn per row, which is the thing two independent ranges throw\naway.\n\n### `plus` — the distance\n\n| Written as | Means                                                  |\n| :--------- | :----------------------------------------------------- |\n| `7d`       | exactly seven days, on every row                       |\n| `3..10d`   | three to ten days, drawn per row (both ends inclusive) |\n| `1..3mo`   | one to three months, by the calendar                   |\n| `-10..-3d` | three to ten days **before** the source                |\n| `45`       | a bare number means days                               |\n| `Length m` | the number in the column `Length`, in minutes, per row |\n\nThe units are the ones [`step`](#step--how-far-each-row-moves) already uses:\n`s`, `m`, `h`, `d`, `w`, `mo`, `y` — and as there, `m` is the minute and `mo` is\nthe month.\n\nA single value is the same distance on every row:\n\n```xml\n<sequence name=\"Shipped\">\n  <gen type=\"date\" of=\"Ordered\" plus=\"1d\" format=\"YYYY-MM-DD\"/>\n</sequence>\n```\n\n`./run ship.tdc (4 rows)`\n\n```\n2026-05-23  2026-05-24\n2026-05-06  2026-05-07\n2026-05-13  2026-05-14\n2026-05-21  2026-05-22\n```\n\nWrite the smaller bound first, as in every other range. To count **backwards**,\nmake both bounds negative — `plus=\"-10..-3d\"` is three to ten days earlier.\n`plus=\"10..3d\"` is a typo and is refused (`TDC264`) rather than quietly swapped.\n\nMonths and years move by the calendar rather than by a fixed number of days, so\n`2026-01-31` plus one month is `2026-02-28` — the same clamping\n[`step`](#a-calendar-step-keeps-the-day-of-the-month) does.\n\n### A distance read from another column\n\nThe end of an appointment is its start plus **its own** length, and the length belongs to the\nrow: a literal is the same distance everywhere, and a range is drawn rather than read. Write a\ncolumn name and a unit, and the distance is read from that column, row by row:\n\n```xml\n<sequence name=\"Start\">\n  <gen type=\"date\" from=\"2026-03-02T08:00\" to=\"2026-03-02T17:00\" format=\"HH:mm\"/>\n</sequence>\n<sequence name=\"Length\"><gen type=\"text\" value=\"15,30,45,60\"/></sequence>\n<sequence name=\"End\">\n  <gen type=\"date\" of=\"Start\" plus=\"Length m\" format=\"HH:mm\"/>\n</sequence>\n```\n\n`./run appointments.tdc (4 rows)`\n\n```\n09:26–10:11  (45 min)\n09:45–10:45  (60 min)\n15:37–15:52  (15 min)\n11:39–12:09  (30 min)\n```\n\nA leading minus measures backwards — `plus=\"-Length m\"` is the time to start preparing — and a\nbare name means days, as a bare number does. A field of a [pool](../pools/overview.md)\nreference is a column like any other: `plus=\"Room.turnover m\"`. The column has to be declared\nabove this one, as `of` does, and hold one number per row (`TDC240`). Nothing is drawn, so\nadding it moves no other column.\n\nEach cell has to be a whole number. A row whose cell is empty — one that\n[`missing`](../guides/missing-data.md) blanked — gets no date, as a row with no source date\ndoes. A fraction stops the run with the row named: `1.5` hours is ninety minutes, and rounding\nit to one or two hours would put a wrong time in a cell that looks right. Count in the smaller\nunit instead.\n\n### The offset reads the value, not the printed text\n\nA date column prints a _rendering_ of its date. `03/02/2026` is the 3rd of\nFebruary under `local=\"en\"` and the 2nd of March under `local=\"ru\"`, and\n`format=\"MMMM D\"` throws the year away entirely. So the offset does not read the\ncell at all: the column it measures from keeps the date it generated, and the\narithmetic runs on that. Any `format` works, under any locale.\n\n```xml\n<env count=\"4\" seed=\"visit\" local=\"ru\">\n  <sequence name=\"Visit\"><gen type=\"date\" from=\"2026-03-01\" to=\"2026-03-31\"/></sequence>\n  <sequence name=\"Followup\"><gen type=\"date\" of=\"Visit\" plus=\"2w\"/></sequence>\n</env>\n```\n\n`./run visit.tdc (4 rows)`\n\n```\n20.03.2026  03.04.2026\n22.03.2026  05.04.2026\n27.03.2026  10.04.2026\n09.03.2026  23.03.2026\n```\n\nThe one case with nothing to read from is a date TDC did not generate — a column\nloaded by [`file`](./file.md), for instance. There only the text exists, so it\nmust be in ISO form (`YYYY-MM-DD`), which means one thing in every locale.\nAnything else is refused rather than guessed at.\n\n### The source may be walked, drawn, or another offset\n\n`of=` reads whatever the named column produced. A **walked** source is the pairing real\nrecords ask for most — orders march down the calendar day by day, and delivery is a few\ndays after **its own** order:\n\n```xml\n<sequence name=\"Ordered\">\n  <gen type=\"date\" from=\"2026-01-01\" order=\"sequential\" step=\"1d\" format=\"YYYY-MM-DD\"/>\n</sequence>\n<sequence name=\"Delivered\">\n  <gen type=\"date\" of=\"Ordered\" plus=\"2..9d\" format=\"YYYY-MM-DD\"/>\n</sequence>\n```\n\n`./run orders.tdc (4 rows)`\n\n```\n2026-01-01  2026-01-06\n2026-01-02  2026-01-06\n2026-01-03  2026-01-12\n2026-01-04  2026-01-11\n```\n\nThe one source that has no single date to measure from is a **repeating** o",
              "tool": "tdc_read_docs"
            },
            {
              "note": "later steps left out for length"
            }
          ],
          "task": "Look up the TDC documentation page index and identify the available reference page for date generators; then open that reference page and show its contents."
        },
        "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": "The index lists **`generators/date.md` — “Date”** as the reference page for date generators. I opened it as `generators/date`. The page is part of the TDCv2 v0.4.0 documentation; the index notes that the project’s engine may use a different version.\n\nThe page is lengthy. Its contents are summarized below, with representative examples; the complete source is available at:\n\n[**TDCv2 date generator reference — `generators/date.md`**](https://raw.githubusercontent.com/NickLiapin/tdcv2/v0.4.0/docs/generators/date.md)\n\n## The `date` generator\n\nThe generator produces a date or date-time inside a range, printed in a chosen format. It uses a strict parser, a UTC calendar and a localized formatter.\n\n### Attributes\n\n| Attribute | Purpose |\n|---|---|\n| `value` | `birth`, `today`, `now`, a single date, or `START..END` |\n| `range` | A range written `START..END` |\n| `from`, `to` | Separate range endpoints |\n| `order` | `sequential` walks the range instead of randomly drawing dates |\n| `step` | Distance between rows on a sequential axis, such as `15m`, `2d` or `3mo` |\n| `weekdays` | Weekdays retained on a sequential axis, such as `mon..fri` |\n| `cycle` | `false` refuses to wrap when a bounded sequential range runs out |\n| `format` | Output format; defaults to `L` |\n| `local` | Locale for localized date formatting |\n| `oldest`, `youngest` | Age window for `value=\"birth\"`; defaults are 80 and 10 years |\n| `precision` | `day`, `second` or `millisecond` |\n| `of`, `plus` | Calculate a date relative to another date column |\n\n### Random dates and ranges\n\nBoth endpoints are inclusive. Use **one** of `value`, `range`, or the `from`/`to` pair:\n\n```xml\n<gen type=\"date\" value=\"2020-01-01..2025-12-31\" format=\"YYYY-MM-DD\"/>\n<gen type=\"date\" range=\"2020-01-01..2024-12-31\" format=\"YYYY-MM-DD\"/>\n<gen type=\"date\" from=\"2026-05-02T09:00:00\"\n     to=\"2026-05-02T09:00:05\" format=\"YYYY-MM-DDTHH:mm:ss\"/>\n```\n\nInput is parsed strictly: dates use `YYYY-MM-DD`, `YYYY.MM.DD` or `YYYY/MM/DD`; date-times use I",
          "done_when": "The transcript shows the documentation index or search result identifying the date-generator reference and a nonempty reply containing that reference page.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {
                "page": "index"
              },
              "reply": "# TDCv2 reference — index\n\nBuilt from the engine's docs at v0.4.0 (2026-11-09); they say they cover TDC 0.4.0 (updated 9 November 2026).\nOpen a page with the Read tool: `reference/<path>`. Pages link to each other by relative path.\nFor another engine version (the one the project itself uses), the same page of that version:\n`https://raw.githubusercontent.com/NickLiapin/tdcv2/v<version>/docs/<path>`. What `check` says beats any page.\nFor data-pack addresses, run `scripts/find-packs.mjs` — it reads what is installed.\n\n- `intro.md` — **Introduction.** TDC generates internally consistent test data. Within each row, names match gender categories, cities belong to the correct countries, and diagnoses fit patient profiles. Run TDC again with the same seed and core version, and it produces the same rows, byte for byte.\n- `whats-new.md` — **What's new.** What changed in TDC that you can see — a new command or flag, a new check, something that now works differently — newest first, each with a link to where the docs explain it now. Changes inside the engine that alter nothing you write or read are left out; every change is in the changelog.\n\n## Getting Started\n\n- `getting-started/installation.md` — **Installation.** TDC targets five ecosystems — npm (Node.js / TypeScript), pip (Python), Maven (Java), NuGet (.NET) and Cargo (Rust) — all producing byte-for-byte identical output from the same config, seed, version and output mode (see Determinism & proportions).\n- `getting-started/quick-api.md` — **Quick API — one value at a time.** Sometimes you don't want a dataset. You want a surname, here, on this line of a test — the job a faker library does. TDC answers that from the same data packs its configs draw on, so the name in your unit test and the name in your million-row fixture come from one list.\n- `getting-started/first-data.md` — **Your first dataset.** You describe what a row is made of, and the engine builds as many rows as you ask for. The same seed always returns the same output, and the shape of that output — plain text, CSV, JSON, SQL — is yours to define with a row template.\n- `getting-started/editor-support.md` — **Editor support.** The npm package ships two executables. tdcv2 generates data; tdcv2-lsp is a language server that gives any LSP-speaking editor live error checking, completion, hover, go-to-definition, find-references, rename and formatting for .tdc files.\n\n## AI Agents\n\n- `ai-agents/overview.md` — **TDC for AI agents.** A coding agent can write TDC configs for you. You ask in plain words — \"500 customers from 20 countries as CSV\", \"a pytest test for validateuser on 50 different users\" — and the agent writes the .tdc config, checks it with the engine, generates the file on your machine, and hands you the data together with the config that reproduces it.\n- `ai-agents/claude-code.md` — **Claude Code.** The plugin brings both parts at once: the skill, and the MCP server, which Claude Code starts on its own whenever a session needs it. It comes from two places — Anthropic's plugin directory or the project's GitHub marketplace. Pick one: installed both ways, the plugin is there twice, so the skill loads twice and two servers start.\n- `ai-agents/other-agents.md` — **Other agents.** Each of these agents reads skills, so one command makes TDC available in all of them. The MCP server is optional on top of it.\n- `ai-agents/working-with-the-agent.md` — **Working with the agent.** Describe the data the way you would to a colleague:\n\n## Core Concepts\n\n- `core-concepts/configuration.md` — **Configuration structure.** Every TDC config is a single <tdc> root element. It holds two things: an optional <env> (generation parameters, sequences, and fixtures) and a required <block> (the layout of each output record).\n- `core-concepts/sequences.md` — **Sequences.** A <sequence> declares a named column of values, count rows long. Think of it as a finished column that exists before rendering starts: the generator fills every row, and as each output row is rendered you pull a value out by name, either with interpolation ${{Name}} or inside an if condition.\n- `core-concepts/output-formatting.md` — **Output & formatting.** Once you've declared your data as sequences, the output block turns it into text in whatever shape you want: CSV, JSON, SQL, a log line, a config file. It's three nested tags — <block> → <line> → <data> — plus interpolation and a few optional pieces (fixtures, filters, conditions).\n- `core-concepts/determinism.md` — **Determinism & proportions.** Two properties make TDC's data trustworthy: the same seed reproduces the same data byte for byte, and every share comes out at its exact proportion. The promise is precise about what has to match — the same config, the same seed, the same core version and the same output mode.\n\n## Generators\n\n- `generators/overview.md` — **Overview.** A <gen> produces the values of a sequence. Its type attribute chooses which generator to use, and every other attribute is a parameter of that generator:\n- `generators/text.md` — **Text.** Use it when you have a short, fixed list of options to pick from — gender, status, category, payment type, tier. If you need exact shares of each (say, 60% one, 40% the other), that's a single extra attribute.\n- `generators/number.md` — **Number.** Use it when you need an integer — an id, a code, a price, an age — inside a range; or a string of exactly N digits (even hundreds or thousands of them, far past what an ordinary number type can hold).\n- `generators/template.md` — **Template.** Use it when you need realistic real-world data (names, birthdays, countries) or technical identifiers (UUIDs, emails, IBANs, tax numbers) that you don't want to invent by hand. type=\"template\" pulls the value from a built-in source; the value attribute is a dotted path that selects which one, and many templates respect the locale.\n- `generators/file.md` — **File.** Use it when the values already live in a file — a list of cities, an export, a CSV — and you don't want to paste them into the config. The src attribute tells the generator where to read them from, and one more attribute, column, decides whether that file is a plain list or a table.\n- `generators/date.md` — **Date.** Use it when you need a date or a date-time — a birthday, a document date, an event timestamp — inside a range and printed in a specific format.\n- `generators/symbol.md` — **Symbol.** Use it when you need a string of a given length built from a specific set of characters — a token, a coupon code, a random suffix, or \"noise\" in a particular script. symbol picks one character at a time out of a set you define. (For a whole word from a list, use text instead.)\n- `generators/regex.md` — **Regex.** Use it when a value has a strict shape — a phone number, a SKU, a license plate, a token, an order code. There are too many possibilities for a list, and too much internal structure for number: letters, digits, and separators in specific places.\n- `generators/advanced-regex.md` — **Advanced Regex.** Use it when you need everything regex does, but the shape of the string itself carries a statistical distribution of variants — say, exactly 70% of the codes start with RU, 20% with US, 10% with DE.\n- `generators/counters.md` — **Increment & Decrement.** Use them when you need a running counter instead of a random value — a sequential id or row number (1, 2, 3…), an SKU series that climbs by a fixed step, or a countdown that falls to zero.\n- `generators/timeseries.md` — **Time series.** Use it when you need values that move like a real signal over time — daily sales, sensor readings, web traffic. Real series aren't flat noise or a single distribution: they're layers — an overall trend (rising or falling), a repeating season (weekly, yearly), and random noise on top. timeseries builds a row's value exactly that way:\n- `generators/pattern.md` — **Pattern.** Use it when a signal has a shape you can't describe with a formula — demand by hour, a demograph",
              "tool": "tdc_read_docs"
            },
            {
              "arguments": {
                "page": "generators/date"
              },
              "reply": "# The `date` generator\n\n**Use it when** you need a date or a date-time — a birthday, a document date, an\nevent timestamp — inside a range and printed in a specific format.\n\nDates run on TDC's own portable date runtime: a strict parser, a UTC calendar, and\na localized formatter, with no dependency on moment.js. The same config is designed\nto produce the same dates in every implementation.\n\nExample outputs below are illustrative — the exact values depend on the seed and\ncan differ by core version. What stays fixed is the shape and the format.\n\n## At a glance\n\n| Attribute             | What it does                                                                                                                                                                                                                                                                                                                                                                                                                                                   |\n| :-------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `value`               | `birth`, `today`, `now`, a single date, or a range `START..END`                                                                                                                                                                                                                                                                                                                                                                                                |\n| `range`               | A range `START..END` — a newer spelling of the same idea                                                                                                                                                                                                                                                                                                                                                                                                       |\n| `from` / `to`         | The two endpoints of a range, given separately                                                                                                                                                                                                                                                                                                                                                                                                                 |\n| `order`               | `sequential` walks the range instead of drawing from it — see [A date axis](#a-date-axis-walking-the-range-instead-of-drawing-from-it)                                                                                                                                                                                                                                                                                                                         |\n| `step`                | How far each row moves on a walked axis: `15m`, `1h30m`, `2d`, `3mo`, `1y`                                                                                                                                                                                                                                                                                                                                                                                     |\n| `weekdays`            | Which weekdays a walked axis keeps: `mon..fri`, `sun,wed`                                                                                                                                                                                                                                                                                                                                                                                                      |\n| `cycle`               | `false` refuses instead of looping when a walked BOUNDED range runs out                                                                                                                                                                                                                                                                                                                                                                                        |\n| `format`              | Output format (see [Formatting the output](#formatting-the-output)); default `L`                                                                                                                                                                                                                                                                                                                                                                               |\n| `local`               | Twenty-five: `ar`, `cs`, `de`, `el`, `en`, `es`, `fi`, `fr`, `hi`, `hu`, `id`, `it`, `ja`, `ko`, `nl`, `pl`, `pt`, `ru`, `sv`, `th`, `tr`, `uk`, `vi`, `zh-cn`, `zh-tw`. Nineteen also answer to a three-letter alias — `ara`, `ces`, `deu`, `ell`, `eng`, `spa`, `fin`, `fra`, `hun`, `ind`, `ita`, `jpn`, `kor`, `nld`, `pol`, `por`, `tur`, `ukr`, `vie` — and `hi`, `ru`, `sv`, `th`, `zh-cn`, `zh-tw` have none (bare `zh` is accepted and reads the Traditional table). Inherited from [`<env>`](../reference/tags.md) if omitted |\n| `oldest` / `youngest` | Age window in years for `value=\"birth\"` (defaults `80` and `10`)                                                                                                                                                                                                                                                                                                                                                                                               |\n| `precision`           | `day`, `second`, or `millisecond`                                                                                                                                                                                                                                                                                                                                                                                                                              |\n| `of`                  | Measure from another date column instead of drawing — see [An interval](#an-interval-a-date-measured-from-another-date)                                                                                                                                                                                                                                                                                                                                        |\n| `plus`                | How far from it: `7d`, `3..10d`, `1..3mo`, `-10..-3d`                                                                                                                                                                                                                                                                                                                                                                                                          |\n\nUse only one of `value`, `range`, or the `from`/`to` pair to describe a range — they\nare three spellings of the same thing. Give none of them and the range runs from\n`1970-01-01` to the current moment; see\n[No bounds at all](#no-bounds-a",
              "tool": "tdc_read_docs"
            },
            {
              "arguments": {
                "offset": 4000,
                "page": "generators/date"
              },
              "reply": "                                                                                                                                                                                                                                                                                                                                                                          |\n| `cycle`               | `false` refuses instead of looping when a walked BOUNDED range runs out                                                                                                                                                                                                                                                                                                                                                                                        |\n| `format`              | Output format (see [Formatting the output](#formatting-the-output)); default `L`                                                                                                                                                                                                                                                                                                                                                                               |\n| `local`               | Twenty-five: `ar`, `cs`, `de`, `el`, `en`, `es`, `fi`, `fr`, `hi`, `hu`, `id`, `it`, `ja`, `ko`, `nl`, `pl`, `pt`, `ru`, `sv`, `th`, `tr`, `uk`, `vi`, `zh-cn`, `zh-tw`. Nineteen also answer to a three-letter alias — `ara`, `ces`, `deu`, `ell`, `eng`, `spa`, `fin`, `fra`, `hun`, `ind`, `ita`, `jpn`, `kor`, `nld`, `pol`, `por`, `tur`, `ukr`, `vie` — and `hi`, `ru`, `sv`, `th`, `zh-cn`, `zh-tw` have none (bare `zh` is accepted and reads the Traditional table). Inherited from [`<env>`](../reference/tags.md) if omitted |\n| `oldest` / `youngest` | Age window in years for `value=\"birth\"` (defaults `80` and `10`)                                                                                                                                                                                                                                                                                                                                                                                               |\n| `precision`           | `day`, `second`, or `millisecond`                                                                                                                                                                                                                                                                                                                                                                                                                              |\n| `of`                  | Measure from another date column instead of drawing — see [An interval](#an-interval-a-date-measured-from-another-date)                                                                                                                                                                                                                                                                                                                                        |\n| `plus`                | How far from it: `7d`, `3..10d`, `1..3mo`, `-10..-3d`                                                                                                                                                                                                                                                                                                                                                                                                          |\n\nUse only one of `value`, `range`, or the `from`/`to` pair to describe a range — they\nare three spellings of the same thing. Give none of them and the range runs from\n`1970-01-01` to the current moment; see\n[No bounds at all](#no-bounds-at-all--the-clock-closes-the-range).\n\nThe last four attributes belong to a **walked** range and are read only alongside\n`order=\"sequential\"`. On a drawn date `step` or `weekdays` would be silently ignored, so\nthey are refused instead (`TDC248`).\n\n## A random date in a range\n\nGive `value` a range as `START..END` (both ends **inclusive**) and you get a random\ndate drawn uniformly inside it.\n\n```xml\n<gen type=\"date\" value=\"2020-01-01..2025-12-31\" format=\"YYYY-MM-DD\"/>\n```\n\n`./run demo.tdc (5 rows)`\n\n```\n2024-08-15\n2022-02-04\n2020-06-21\n2025-10-04\n2021-03-31\n```\n\nThe endpoints are part of the window. A one-week range makes that easy to see —\nover enough rows, both `2024-06-01` and `2024-06-07` show up:\n\n```xml\n<gen type=\"date\" value=\"2024-06-01..2024-06-07\" format=\"YYYY-MM-DD\"/>\n```\n\n`./run demo.tdc (6 rows)`\n\n```\n2024-06-06\n2024-06-03\n2024-06-01\n2024-06-07\n2024-06-02\n2024-06-02\n```\n\nInput dates are parsed **strictly**, in one of these forms:\n\n- date: `YYYY-MM-DD`, `YYYY.MM.DD`, or `YYYY/MM/DD`;\n- date-time: `YYYY-MM-DDTHH:mm`, `YYYY-MM-DDTHH:mm:ss`, or `YYYY-MM-DDTHH:mm:ss.SSS`;\n- range: `START..END`.\n\nFree text (`June 6th`, `06/06/24`) is **not** accepted — use one of the strict forms\nabove.\n\n### The `range` attribute — the same window, a newer spelling\n\n`range=\"START..END\"` means exactly what `value=\"START..END\"` does. It reads better\nwhen `value` would otherwise look like a keyword, and it's the spelling shared with\nthe [`date.range`](../generators/template.md) template.\n\n```xml\n<gen type=\"date\" range=\"2020-01-01..2024-12-31\" format=\"YYYY-MM-DD\"/>\n```\n\n`./run demo.tdc (5 rows)`\n\n```\n2023-11-08\n2021-09-30\n2020-05-23\n2024-10-19\n2021-01-14\n```\n\nThe [`format`](../reference/attributes.md) attribute only controls how the date is\nwritten — it never changes the window, and the window never depends on the format.\n\n### `from` and `to` — the endpoints given separately\n\nWhen it's clearer to name the two ends separately, use `from` and `to`. This is the\nmost natural spelling for date-time windows, where the range would otherwise be one\nlong string.\n\n```xml\n<gen type=\"date\"\n     from=\"2026-05-02T09:00:00\"\n     to=\"2026-05-02T09:00:05\"\n     format=\"YYYY-MM-DDTHH:mm:ss\"/>\n```\n\n`./run demo.tdc (5 rows)`\n\n```\n2026-05-02T09:00:04\n2026-05-02T09:00:01\n2026-05-02T09:00:03\n2026-05-02T09:00:00\n2026-05-02T09:00:02\n```\n\n### No bounds at all — the clock closes the range\n\nA `date` generator given **neither** end still produces a date. The window runs from\n`1970-01-01` to the current moment, so the generator reads the clock even though nothing\nin the config mentions a date:\n\n```xml\n<gen type=\"date\" format=\"YYYY-MM-DD\"/>\n```\n\n`./run demo.tdc  —  the same seed, a year apart`\n\n```\n--now 2026-04-23    --now 2027-04-23\n1972-06-01          1972-06-17\n1994-11-20          1995-04-30\n1972-05-06          1972-05-21\n```\n\nThis is the easiest way to lose reproducibility by accident. Give the generator two ends,\nor pin the clock with [`--now`](../reference/cli.md#--now--pin-the-clock).\n\n**One** end is not a third option for a range you DRAW from: `from` without `to` is\n`TDC150`, and `range=\"2020-01-01..\"` is `TDC151`. Where a value is sampled, a single end\nsays nothing about what to sample. One end IS enough when the range is\n[walked](#a-date-axis-walking-the-range-instead-of-drawing-from-it) — that is the next\nsection.\n\n## A date axis: walking the range instead of drawing from it\n\nEverything above **draws**: each row picks a date at random from the window. Ask for a\nrow per day for a year and you get repeats and gaps, because that is what drawing means.\n\nAdd `order=\"sequential\"` and the range is **walked** instead. Row 0 is the start, row 1\nis one step on, row _i_ is `start + i × step`. This is the time axis a run needs when the\ndata is a series rather than a sample: readings, transactions, a log.\n\n### `from` alone — an axis with no end\n\nA walked axis takes only a start. Its last row is `start + (count − 1) × step` — row 0 is\nthe start itself — which is a consequence o",
              "tool": "tdc_read_docs"
            },
            {
              "arguments": {
                "offset": 8000,
                "page": "generators/date"
              },
              "reply": "t-all--the-clock-closes-the-range).\n\nThe last four attributes belong to a **walked** range and are read only alongside\n`order=\"sequential\"`. On a drawn date `step` or `weekdays` would be silently ignored, so\nthey are refused instead (`TDC248`).\n\n## A random date in a range\n\nGive `value` a range as `START..END` (both ends **inclusive**) and you get a random\ndate drawn uniformly inside it.\n\n```xml\n<gen type=\"date\" value=\"2020-01-01..2025-12-31\" format=\"YYYY-MM-DD\"/>\n```\n\n`./run demo.tdc (5 rows)`\n\n```\n2024-08-15\n2022-02-04\n2020-06-21\n2025-10-04\n2021-03-31\n```\n\nThe endpoints are part of the window. A one-week range makes that easy to see —\nover enough rows, both `2024-06-01` and `2024-06-07` show up:\n\n```xml\n<gen type=\"date\" value=\"2024-06-01..2024-06-07\" format=\"YYYY-MM-DD\"/>\n```\n\n`./run demo.tdc (6 rows)`\n\n```\n2024-06-06\n2024-06-03\n2024-06-01\n2024-06-07\n2024-06-02\n2024-06-02\n```\n\nInput dates are parsed **strictly**, in one of these forms:\n\n- date: `YYYY-MM-DD`, `YYYY.MM.DD`, or `YYYY/MM/DD`;\n- date-time: `YYYY-MM-DDTHH:mm`, `YYYY-MM-DDTHH:mm:ss`, or `YYYY-MM-DDTHH:mm:ss.SSS`;\n- range: `START..END`.\n\nFree text (`June 6th`, `06/06/24`) is **not** accepted — use one of the strict forms\nabove.\n\n### The `range` attribute — the same window, a newer spelling\n\n`range=\"START..END\"` means exactly what `value=\"START..END\"` does. It reads better\nwhen `value` would otherwise look like a keyword, and it's the spelling shared with\nthe [`date.range`](../generators/template.md) template.\n\n```xml\n<gen type=\"date\" range=\"2020-01-01..2024-12-31\" format=\"YYYY-MM-DD\"/>\n```\n\n`./run demo.tdc (5 rows)`\n\n```\n2023-11-08\n2021-09-30\n2020-05-23\n2024-10-19\n2021-01-14\n```\n\nThe [`format`](../reference/attributes.md) attribute only controls how the date is\nwritten — it never changes the window, and the window never depends on the format.\n\n### `from` and `to` — the endpoints given separately\n\nWhen it's clearer to name the two ends separately, use `from` and `to`. This is the\nmost natural spelling for date-time windows, where the range would otherwise be one\nlong string.\n\n```xml\n<gen type=\"date\"\n     from=\"2026-05-02T09:00:00\"\n     to=\"2026-05-02T09:00:05\"\n     format=\"YYYY-MM-DDTHH:mm:ss\"/>\n```\n\n`./run demo.tdc (5 rows)`\n\n```\n2026-05-02T09:00:04\n2026-05-02T09:00:01\n2026-05-02T09:00:03\n2026-05-02T09:00:00\n2026-05-02T09:00:02\n```\n\n### No bounds at all — the clock closes the range\n\nA `date` generator given **neither** end still produces a date. The window runs from\n`1970-01-01` to the current moment, so the generator reads the clock even though nothing\nin the config mentions a date:\n\n```xml\n<gen type=\"date\" format=\"YYYY-MM-DD\"/>\n```\n\n`./run demo.tdc  —  the same seed, a year apart`\n\n```\n--now 2026-04-23    --now 2027-04-23\n1972-06-01          1972-06-17\n1994-11-20          1995-04-30\n1972-05-06          1972-05-21\n```\n\nThis is the easiest way to lose reproducibility by accident. Give the generator two ends,\nor pin the clock with [`--now`](../reference/cli.md#--now--pin-the-clock).\n\n**One** end is not a third option for a range you DRAW from: `from` without `to` is\n`TDC150`, and `range=\"2020-01-01..\"` is `TDC151`. Where a value is sampled, a single end\nsays nothing about what to sample. One end IS enough when the range is\n[walked](#a-date-axis-walking-the-range-instead-of-drawing-from-it) — that is the next\nsection.\n\n## A date axis: walking the range instead of drawing from it\n\nEverything above **draws**: each row picks a date at random from the window. Ask for a\nrow per day for a year and you get repeats and gaps, because that is what drawing means.\n\nAdd `order=\"sequential\"` and the range is **walked** instead. Row 0 is the start, row 1\nis one step on, row _i_ is `start + i × step`. This is the time axis a run needs when the\ndata is a series rather than a sample: readings, transactions, a log.\n\n### `from` alone — an axis with no end\n\nA walked axis takes only a start. Its last row is `start + (count − 1) × step` — row 0 is\nthe start itself — which is a consequence of the run's length rather than something you\nwork out and write down:\n\n```xml\n<gen type=\"date\" from=\"2026-01-01\" order=\"sequential\" format=\"YYYY-MM-DD\"/>\n```\n\n`./run axis.tdc (count=5)`\n\n```\n2026-01-01\n2026-01-02\n2026-01-03\n2026-01-04\n2026-01-05\n```\n\nRaise `count` to a million and the axis simply runs a million days. Nothing is expanded\ninto a list, so the range costs no memory however long it is.\n\n### `step` — how far each row moves\n\nThe default is one day. `step` takes a number and a unit, and units add up:\n\n| Written     | Means              | Group    |\n| :---------- | :----------------- | :------- |\n| `15m`       | 15 minutes         | fixed    |\n| `1h30m`     | 90 minutes         | fixed    |\n| `2` or `2d` | 2 days             | fixed    |\n| `1w`        | 7 days             | fixed    |\n| `3mo`       | 3 calendar months  | calendar |\n| `1y6mo`     | 18 calendar months | calendar |\n\n`m` is the **minute**, as it is in every notation of this shape. The month is `mo`,\nbecause `m` is taken — and not `M`, since a difference of forty-four thousand between\nthree minutes and three months should not rest on the case of one letter.\n\n```xml\n<gen type=\"date\" from=\"2026-01-01T09:00:00\" order=\"sequential\"\n     step=\"15m\" format=\"YYYY-MM-DD HH:mm\"/>\n```\n\n`./run axis.tdc (count=4)`\n\n```\n2026-01-01 09:00\n2026-01-01 09:15\n2026-01-01 09:30\n2026-01-01 09:45\n```\n\nA step is EITHER fixed or calendar, never both. `15m` is always 900,000 milliseconds; a\nmonth is 28 to 31 days. They add up within their own group and `step=\"1mo15d\"` is refused\n(`TDC247`), because \"a month and fifteen days\" is 43, 44, 45 or 46 days depending on which\nhalf you apply first, and a config whose meaning turns on an invisible ordering is worse\nthan one that will not parse. Write `45d`, or `1mo`.\n\n### A calendar step keeps the day of the month\n\nEach step is measured **from the start**, never accumulated. That distinction is invisible\non days and decides the answer on months:\n\n```xml\n<gen type=\"date\" from=\"2026-01-31\" order=\"sequential\" step=\"1mo\" format=\"YYYY-MM-DD\"/>\n```\n\n`./run axis.tdc (count=4)`\n\n```\n2026-01-31\n2026-02-28\n2026-03-31\n2026-04-30\n```\n\nFebruary clamps to the 28th, and March goes back to the 31st. Stepping on from the clamped\nFebruary would have given 28 March and dragged every later month with it.\n\n### `weekdays` — keeping only some days\n\nA filter, not a step:\n\n```xml\n<gen type=\"date\" from=\"2026-01-01\" order=\"sequential\"\n     weekdays=\"mon..fri\" format=\"ddd YYYY-MM-DD\"/>\n```\n\n`./run axis.tdc (count=6)`\n\n```\nThu 2026-01-01\nFri 2026-01-02\nMon 2026-01-05\nTue 2026-01-06\nWed 2026-01-07\nThu 2026-01-08\n```\n\nFriday to Monday is a three-day jump, which is exactly why this is not a step: a step\nkeeps the spacing even, and a filter breaks it. Keeping them apart is what lets them\ncombine — \"every 12 hours, working days only\" needs both words:\n\n```xml\n<gen type=\"date\" from=\"2026-01-02T00:00:00\" order=\"sequential\"\n     step=\"12h\" weekdays=\"mon..fri\" format=\"ddd YYYY-MM-DD HH:mm\"/>\n```\n\n`./run axis.tdc (count=6)`\n\n```\nFri 2026-01-02 00:00\nFri 2026-01-02 12:00\nMon 2026-01-05 00:00\nMon 2026-01-05 12:00\nTue 2026-01-06 00:00\nTue 2026-01-06 12:00\n```\n\nSpans use `..`, like every other range in TDC, and a list uses commas: `weekdays=\"sun,wed\"`.\nA span **wraps**, so `fri..mon` is Friday, Saturday, Sunday, Monday — a week is a circle,\nand refusing to go round it would make half the spans unwritable.\n\nTwo kinds of step refuse `weekdays` (`TDC250`), for two different reasons.\n\nA **whole number of weeks** lands on the same weekday every time, so the filter would\nmatch every row or none of them — a full column or an empty one, with nothing said either\nway. That is measured on the step's length, so `14d` is refused exactly as `2w` is, while\n`10d` is fine.\n\nA **calendar step** — `1mo`, `3mo`, `1y` — is refused for the opposite reason: it does\n_not_ fix the weekday. The 15th walks Thursday, Sunday, Sunday, Wednesday, Friday, Monday\nacross the first half of 2026. Which rows survive a wee",
              "tool": "tdc_read_docs"
            },
            {
              "arguments": {
                "offset": 16000,
                "page": "generators/date"
              },
              "reply": "kday filter would follow the\ncalendar rather than anything written in the config, so the step and the filter are asked\nto be one or the other.\n\nIf what you wanted was a **monthly date moved onto the next working day** — the way a\nbilling system moves an invoice off a Sunday — that is not expressible today, and the\nfilter would not do it: it would drop February entirely rather than move it. A\n**working-day calendar** is a different thing and does work: `step=\"1d\"` with\n`weekdays=\"mon..fri\"`, as above.\n\n### A bounded range wraps\n\nGive a walked range both ends and it loops when it runs out, the way a short list does:\n\n```xml\n<gen type=\"date\" range=\"2026-01-01..2026-01-03\" order=\"sequential\" format=\"YYYY-MM-DD\"/>\n```\n\n`./run axis.tdc (count=7)`\n\n```\n2026-01-01\n2026-01-02\n2026-01-03\n2026-01-01\n2026-01-02\n2026-01-03\n2026-01-01\n```\n\n`cycle=\"false\"` turns running out into a refusal instead:\n\n`./run axis.tdc (range of 2 days, count=4, cycle=false)`\n\n```\ntdcv2: order=\"sequential\" cycle=\"false\": the source has only 2 values, so row 3 has none — shorten count= or lengthen the source\n```\n\nAn **open** axis has no end to wrap at, so `cycle` means nothing there.\n\n## A birthday with `value=\"birth\"`\n\n`value=\"birth\"` produces a date of birth relative to the current date, bounded by an\nage window. `youngest` and `oldest` are ages **in years** (defaults `10` and `80`),\nso `youngest=\"18\" oldest=\"65\"` gives working-age adults.\n\n```xml\n<gen type=\"date\" value=\"birth\" youngest=\"18\" oldest=\"65\" format=\"MM/DD/YYYY\"/>\n```\n\n`./run demo.tdc (5 rows)`\n\n```\n07/05/1997\n11/23/1985\n02/14/2003\n09/30/1971\n06/18/1990\n```\n\n**Why use it instead of a fixed range:** the window follows \"now\", so the same config\nstill produces plausible ages next year, with no dates to go back and edit. For a\nbirthday tied to a whole synthetic person, the\n[`person.b_day`](../generators/template.md) template takes the same\n`oldest`/`youngest`/`format` attributes.\n\nThat is also why the dates move. The window slides forward with the clock, so the same\nseed gives a different birth date tomorrow — the age holds, the date does not. Where the\noutput has to stay put — a snapshot test, a fixture, a bug report — pin the clock with\n[`--now`](../reference/cli.md#--now--pin-the-clock).\n\n## `today` and `now`\n\n`value=\"today\"` is the current date; `value=\"now\"` is the current date **and** time.\nBoth read from the runtime clock, so they're the natural stamps for \"generated on\"\nor \"as of\" fields.\n\n```xml\n<gen type=\"date\" value=\"today\" format=\"LL\"/>\n<gen type=\"date\" value=\"now\"   format=\"YYYY-MM-DDTHH:mm:ss.SSS\"/>\n```\n\n`./run demo.tdc`\n\n```\nvalue=\"today\" format=\"LL\"                       April 23, 2026\nvalue=\"now\"   format=\"YYYY-MM-DDTHH:mm:ss.SSS\"   2026-04-23T12:00:00.000\n```\n\nReading the clock is the point of both, and it is what makes them non-reproducible: the\nseed has no say in what \"today\" is. Pin the clock with\n[`--now`](../reference/cli.md#--now--pin-the-clock) and `today` and `now` return the\ninstant you named, in every run.\n\n## `precision` — the step for date-time ranges\n\n`precision` sets the smallest step a range moves in: `day`, `second`, or\n`millisecond`. For a five-second window stepped by whole seconds:\n\n```xml\n<gen type=\"date\"\n     from=\"2026-05-02T09:00:00\"\n     to=\"2026-05-02T09:00:05\"\n     precision=\"second\"\n     format=\"YYYY-MM-DDTHH:mm:ss\"/>\n```\n\n`./run demo.tdc (5 rows)`\n\n```\n2026-05-02T09:00:04\n2026-05-02T09:00:01\n2026-05-02T09:00:03\n2026-05-02T09:00:00\n2026-05-02T09:00:02\n```\n\nWhen `precision` is omitted, the default follows the range type:\n\n| Range type               | Default step        | What `precision` changes                              |\n| :----------------------- | :------------------ | :---------------------------------------------------- |\n| date-only (`YYYY-MM-DD`) | one **day**         | rarely needed — the range already steps in whole days |\n| date-time                | one **millisecond** | `precision=\"second\"` zeros the milliseconds           |\n\nUse `precision=\"second\"` whenever you want clean, human-looking timestamps instead of\nmillisecond noise; use `precision=\"millisecond\"` (the date-time default) when you need\nsub-second resolution.\n\n## An interval: a date measured from another date\n\nReal records are full of pairs: admitted and discharged, ordered and shipped,\nissued and expires, the start and the end of a shift. The second date is not\nindependent of the first — it is the first plus a length — and two separate\nranges cannot say so. They put the discharge _before_ the admission on a good\nshare of the rows.\n\n`of` names the column to measure from and `plus` says how far:\n\n```xml\n<sequence name=\"Admitted\">\n  <gen type=\"date\" from=\"2026-01-01\" to=\"2026-03-01\" format=\"YYYY-MM-DD\"/>\n</sequence>\n<sequence name=\"Discharged\">\n  <gen type=\"date\" of=\"Admitted\" plus=\"2..14d\" format=\"YYYY-MM-DD\"/>\n</sequence>\n```\n\n`./run stay.tdc (6 rows)`\n\n```\n2026-02-06  2026-02-16\n2026-02-14  2026-02-23\n2026-01-11  2026-01-16\n2026-01-11  2026-01-24\n2026-02-27  2026-03-06\n2026-01-08  2026-01-14\n```\n\nEvery discharge is after its own admission, by 2 to 14 days — and the _length_\nof each stay is drawn per row, which is the thing two independent ranges throw\naway.\n\n### `plus` — the distance\n\n| Written as | Means                                                  |\n| :--------- | :----------------------------------------------------- |\n| `7d`       | exactly seven days, on every row                       |\n| `3..10d`   | three to ten days, drawn per row (both ends inclusive) |\n| `1..3mo`   | one to three months, by the calendar                   |\n| `-10..-3d` | three to ten days **before** the source                |\n| `45`       | a bare number means days                               |\n| `Length m` | the number in the column `Length`, in minutes, per row |\n\nThe units are the ones [`step`](#step--how-far-each-row-moves) already uses:\n`s`, `m`, `h`, `d`, `w`, `mo`, `y` — and as there, `m` is the minute and `mo` is\nthe month.\n\nA single value is the same distance on every row:\n\n```xml\n<sequence name=\"Shipped\">\n  <gen type=\"date\" of=\"Ordered\" plus=\"1d\" format=\"YYYY-MM-DD\"/>\n</sequence>\n```\n\n`./run ship.tdc (4 rows)`\n\n```\n2026-05-23  2026-05-24\n2026-05-06  2026-05-07\n2026-05-13  2026-05-14\n2026-05-21  2026-05-22\n```\n\nWrite the smaller bound first, as in every other range. To count **backwards**,\nmake both bounds negative — `plus=\"-10..-3d\"` is three to ten days earlier.\n`plus=\"10..3d\"` is a typo and is refused (`TDC264`) rather than quietly swapped.\n\nMonths and years move by the calendar rather than by a fixed number of days, so\n`2026-01-31` plus one month is `2026-02-28` — the same clamping\n[`step`](#a-calendar-step-keeps-the-day-of-the-month) does.\n\n### A distance read from another column\n\nThe end of an appointment is its start plus **its own** length, and the length belongs to the\nrow: a literal is the same distance everywhere, and a range is drawn rather than read. Write a\ncolumn name and a unit, and the distance is read from that column, row by row:\n\n```xml\n<sequence name=\"Start\">\n  <gen type=\"date\" from=\"2026-03-02T08:00\" to=\"2026-03-02T17:00\" format=\"HH:mm\"/>\n</sequence>\n<sequence name=\"Length\"><gen type=\"text\" value=\"15,30,45,60\"/></sequence>\n<sequence name=\"End\">\n  <gen type=\"date\" of=\"Start\" plus=\"Length m\" format=\"HH:mm\"/>\n</sequence>\n```\n\n`./run appointments.tdc (4 rows)`\n\n```\n09:26–10:11  (45 min)\n09:45–10:45  (60 min)\n15:37–15:52  (15 min)\n11:39–12:09  (30 min)\n```\n\nA leading minus measures backwards — `plus=\"-Length m\"` is the time to start preparing — and a\nbare name means days, as a bare number does. A field of a [pool](../pools/overview.md)\nreference is a column like any other: `plus=\"Room.turnover m\"`. The column has to be declared\nabove this one, as `of` does, and hold one number per row (`TDC240`). Nothing is drawn, so\nadding it moves no other column.\n\nEach cell has to be a whole number. A row whose cell is empty — one that\n[`missing`](../guides/missing-data.md) blanked — gets no date, as a row with",
              "tool": "tdc_read_docs"
            },
            {
              "note": "later steps left out for length"
            }
          ],
          "task": "Look up the TDC documentation page index and identify the available reference page for date generators; then open that reference page and show its contents."
        },
        "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": "01M82WNW0D38JEQ6V9RD7SYF1X",
  "works_done": [
    {
      "attempt": 0,
      "noul": 0.02,
      "question": "w00"
    },
    {
      "attempt": 1,
      "noul": 0.03,
      "question": "w01"
    },
    {
      "attempt": 2,
      "noul": 0.02,
      "question": "w02"
    },
    {
      "attempt": 3,
      "noul": 0.96,
      "question": "w03"
    },
    {
      "attempt": 4,
      "noul": 0.96,
      "question": "w04"
    },
    {
      "attempt": 5,
      "noul": 0.95,
      "question": "w05"
    },
    {
      "attempt": 6,
      "noul": 0.95,
      "question": "w06"
    },
    {
      "attempt": 7,
      "noul": 0.98,
      "question": "w07"
    },
    {
      "attempt": 8,
      "noul": 0.98,
      "question": "w08"
    }
  ]
}
