> Call the `diagnose` tool first. Full index: /llms.txt. Errors: /reference/problems.

# Scenarios, knowledge and test data

## `scenarios`

Discover flows in an app, then list, write and organise its scenarios and test plans.

Annotations: can change or delete data.

### `scenarios create`

Write new scenarios for an app.

| Argument     | Type                     | Required | What it is                     |
| ------------ | ------------------------ | -------- | ------------------------------ |
| `project_id` | `string`                 | yes      | The project the call is about. |
| `app_id`     | `string`                 | yes      |                                |
| `scenarios`  | `array of ScenarioInput` | yes      |                                |
| `suite_id`   | `string \| null`         | no       |                                |
| `claim_mids` | `array of string`        | no       |                                |

### `scenarios create_suite`

Create a test plan from existing scenarios.

| Argument       | Type              | Required | What it is                     |
| -------------- | ----------------- | -------- | ------------------------------ |
| `project_id`   | `string`          | yes      | The project the call is about. |
| `app_id`       | `string`          | yes      |                                |
| `name`         | `string`          | yes      |                                |
| `scenario_ids` | `array of string` | yes      |                                |

### `scenarios delete`

Delete a scenario.

| Argument      | Type     | Required | What it is                     |
| ------------- | -------- | -------- | ------------------------------ |
| `project_id`  | `string` | yes      | The project the call is about. |
| `app_id`      | `string` | yes      |                                |
| `scenario_id` | `string` | yes      |                                |

### `scenarios discovery_status`

Check how far a flow discovery has got.

| Argument     | Type     | Required | What it is                     |
| ------------ | -------- | -------- | ------------------------------ |
| `project_id` | `string` | yes      | The project the call is about. |
| `app_id`     | `string` | yes      |                                |
| `request_id` | `string` | yes      |                                |

### `scenarios list`

List an app's scenarios, or those of one test plan.

| Argument     | Type             | Required | What it is                     |
| ------------ | ---------------- | -------- | ------------------------------ |
| `project_id` | `string`         | yes      | The project the call is about. |
| `app_id`     | `string`         | yes      |                                |
| `suite_id`   | `string \| null` | no       |                                |
| `limit`      | `integer`        | no       |                                |
| `offset`     | `integer`        | no       |                                |

### `scenarios list_flows`

List the flows of a project.

| Argument     | Type     | Required | What it is                     |
| ------------ | -------- | -------- | ------------------------------ |
| `project_id` | `string` | yes      | The project the call is about. |

### `scenarios list_suites`

List an app's test plans.

| Argument     | Type     | Required | What it is                     |
| ------------ | -------- | -------- | ------------------------------ |
| `project_id` | `string` | yes      | The project the call is about. |
| `app_id`     | `string` | yes      |                                |

### `scenarios set_suite`

Replace the scenarios of a test plan.

| Argument       | Type              | Required | What it is                     |
| -------------- | ----------------- | -------- | ------------------------------ |
| `project_id`   | `string`          | yes      | The project the call is about. |
| `suite_id`     | `string`          | yes      |                                |
| `scenario_ids` | `array of string` | yes      |                                |

### `scenarios start_flow_discovery`

Ask TaloTrace to explore the app and find its flows.

| Argument         | Type              | Required | What it is                     |
| ---------------- | ----------------- | -------- | ------------------------------ |
| `project_id`     | `string`          | yes      | The project the call is about. |
| `app_id`         | `string`          | yes      |                                |
| `language`       | `string`          | yes      |                                |
| `request`        | `string`          | no       |                                |
| `account_ids`    | `array of string` | no       |                                |
| `constraints`    | `string`          | no       |                                |
| `device_profile` | `string`          | no       |                                |
| `request_id`     | `string`          | yes      |                                |

### `scenarios update`

Change a scenario.

| Argument        | Type                                      | Required | What it is                     |
| --------------- | ----------------------------------------- | -------- | ------------------------------ |
| `project_id`    | `string`                                  | yes      | The project the call is about. |
| `app_id`        | `string`                                  | yes      |                                |
| `scenario_id`   | `string`                                  | yes      |                                |
| `title`         | `string \| null`                          | no       |                                |
| `goal`          | `string \| null`                          | no       |                                |
| `preconditions` | `array of string \| null`                 | no       |                                |
| `setup_steps`   | `array of string \| null`                 | no       |                                |
| `steps`         | `array of Step \| null`                   | no       |                                |
| `requirement`   | `ScenarioRequirement \| null`             | no       |                                |
| `needs`         | `array of Need \| null`                   | no       |                                |
| `applies_to`    | `"all" \| array of Configuration \| null` | no       |                                |

```json
{
  "$defs": {
    "Configuration": {
      "description": "One platform+viewport target a scenario claims and a run records a result for.",
      "properties": {
        "height": {
          "exclusiveMinimum": 0,
          "maximum": 5120,
          "title": "Height",
          "type": "integer"
        },
        "platform": {
          "$ref": "#/$defs/WebPlatform"
        },
        "width": {
          "maximum": 2560,
          "minimum": 320,
          "title": "Width",
          "type": "integer"
        }
      },
      "required": [
        "platform",
        "width",
        "height"
      ],
      "title": "Configuration",
      "type": "object"
    },
    "FieldKind": {
      "description": "How a field's value reaches the Navigator and the Explorer (5.2).",
      "enum": [
        "text",
        "secret",
        "file",
        "code"
      ],
      "title": "FieldKind",
      "type": "string"
    },
    "Need": {
      "description": "What a scenario names, and what would satisfy it (5.5).\n\nA scenario may name several needs (\"qa-sender\", \"qa-recipient\"), each resolved to its own\nitem.",
      "properties": {
        "added": {
          "default": false,
          "title": "Added",
          "type": "boolean"
        },
        "item_id": {
          "anyOf": [
            {
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Item Id"
        },
        "match": {
          "additionalProperties": {
            "type": "string"
          },
          "title": "Match",
          "type": "object"
        },
        "name": {
          "title": "Name",
          "type": "string"
        },
        "needed_fields": {
          "additionalProperties": {
            "$ref": "#/$defs/NeededField"
          },
          "title": "Needed Fields",
          "type": "object"
        },
        "step": {
          "anyOf": [
            {
              "exclusiveMinimum": 0,
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Step"
        }
      },
      "required": [
        "name"
      ],
      "title": "Need",
      "type": "object"
    },
    "NeededField": {
      "description": "The fields the steps use, with kind and key, as the item names them (5.5).\n\nPlain ``BaseModel``, like its sibling :class:`~talotrace_contracts.scenarios.\naccount_requirement.ScenarioRequirement`: it is embedded both in a stored scenario\nrevision's ``Need`` and in a live ``ask_customer`` call, and neither boundary owns it.",
      "properties": {
        "key": {
          "default": false,
          "title": "Key",
          "type": "boolean"
        },
        "kind": {
          "$ref": "#/$defs/FieldKind"
        }
      },
      "required": [
        "kind"
      ],
      "title": "NeededField",
      "type": "object"
    },
    "ScenarioInput": {
      "description": "One hand-authored scenario for ``create``.",
      "properties": {
        "goal": {
          "description": "One-sentence goal the agent should achieve, in inline markdown",
          "minLength": 1,
          "title": "Goal",
          "type": "string"
        },
        "needs": {
          "items": {
            "$ref": "#/$defs/Need"
          },
          "title": "Needs",
          "type": "array"
        },
        "preconditions": {
          "items": {
            "type": "string"
          },
          "title": "Preconditions",
          "type": "array"
        },
        "setup_steps": {
          "items": {
            "type": "string"
          },
          "title": "Setup Steps",
          "type": "array"
        },
        "steps": {
          "description": "Ordered, concrete, replayable steps, one action per entry, each with the result that action must show (or null when it has none), e.g. [{\"action\": \"Tap Skip\", \"expected\": \"Home is shown\"}]. Replay starts from a FRESH session (new profile, logged out, empty cart), so the steps must be self-contained: any state a later step relies on must be CREATED by an earlier step in this same list. Write the setup steps out explicitly — e.g. instead of \"Open the cart with an item in it\", write the three actions \"Open the product page\", \"Tap Add to cart\" and \"Open the cart\".",
          "items": {
            "$ref": "#/$defs/Step"
          },
          "minItems": 1,
          "title": "Steps",
          "type": "array"
        },
        "title": {
          "description": "Short human-readable scenario name, in inline markdown",
          "minLength": 1,
          "title": "Title",
          "type": "string"
        }
      },
      "required": [
        "title",
        "goal",
        "steps",
        "needs"
      ],
      "title": "ScenarioInput",
      "type": "object"
    },
    "ScenarioRequirement": {
      "description": "The environment a scenario needs. Its data needs live in ``needs`` (5.5).",
      "properties": {
        "env_capability": {
          "default": "",
          "title": "Env Capability",
          "type": "string"
        }
      },
      "title": "ScenarioRequirement",
      "type": "object"
    },
    "ScenariosCreateCall": {
      "additionalProperties": false,
      "properties": {
        "action": {
          "const": "create",
          "title": "Action",
          "type": "string"
        },
        "app_id": {
          "minLength": 1,
          "title": "App Id",
          "type": "string"
        },
        "claim_mids": {
          "default": [],
          "items": {
            "minLength": 1,
            "type": "string"
          },
          "title": "Claim Mids",
          "type": "array"
        },
        "project_id": {
          "description": "The project the call is about.",
          "minLength": 1,
          "title": "Project Id",
          "type": "string"
        },
        "scenarios": {
          "items": {
            "$ref": "#/$defs/ScenarioInput"
          },
          "minItems": 1,
          "title": "Scenarios",
          "type": "array"
        },
        "suite_id": {
          "anyOf": [
            {
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Suite Id"
        }
      },
      "required": [
        "action",
        "project_id",
        "app_id",
        "scenarios"
      ],
      "title": "ScenariosCreateCall",
      "type": "object"
    },
    "ScenariosCreateSuiteCall": {
      "additionalProperties": false,
      "properties": {
        "action": {
          "const": "create_suite",
          "title": "Action",
          "type": "string"
        },
        "app_id": {
          "minLength": 1,
          "title": "App Id",
          "type": "string"
        },
        "name": {
          "minLength": 1,
          "title": "Name",
          "type": "string"
        },
        "project_id": {
          "description": "The project the call is about.",
          "minLength": 1,
          "title": "Project Id",
          "type": "string"
        },
        "scenario_ids": {
          "items": {
            "minLength": 1,
            "type": "string"
          },
          "title": "Scenario Ids",
          "type": "array"
        }
      },
      "required": [
        "action",
        "project_id",
        "app_id",
        "name",
        "scenario_ids"
      ],
      "title": "ScenariosCreateSuiteCall",
      "type": "object"
    },
    "ScenariosDeleteCall": {
      "additionalProperties": false,
      "properties": {
        "action": {
          "const": "delete",
          "title": "Action",
          "type": "string"
        },
        "app_id": {
          "minLength": 1,
          "title": "App Id",
          "type": "string"
        },
        "project_id": {
          "description": "The project the call is about.",
          "minLength": 1,
          "title": "Project Id",
          "type": "string"
        },
        "scenario_id": {
          "minLength": 1,
          "title": "Scenario Id",
          "type": "string"
        }
      },
      "required": [
        "action",
        "project_id",
        "app_id",
        "scenario_id"
      ],
      "title": "ScenariosDeleteCall",
      "type": "object"
    },
    "ScenariosDiscoveryStatusCall": {
      "additionalProperties": false,
      "properties": {
        "action": {
          "const": "discovery_status",
          "title": "Action",
          "type": "string"
        },
        "app_id": {
          "minLength": 1,
          "title": "App Id",
          "type": "string"
        },
        "project_id": {
          "description": "The project the call is about.",
          "minLength": 1,
          "title": "Project Id",
          "type": "string"
        },
        "request_id": {
          "maxLength": 128,
          "minLength": 1,
          "title": "Request Id",
          "type": "string"
        }
      },
      "required": [
        "action",
        "project_id",
        "app_id",
        "request_id"
      ],
      "title": "ScenariosDiscoveryStatusCall",
      "type": "object"
    },
    "ScenariosListCall": {
      "additionalProperties": false,
      "properties": {
        "action": {
          "const": "list",
          "title": "Action",
          "type": "string"
        },
        "app_id": {
          "minLength": 1,
          "title": "App Id",
          "type": "string"
        },
        "limit": {
          "default": 50,
          "maximum": 200,
          "minimum": 1,
          "title": "Limit",
          "type": "integer"
        },
        "offset": {
          "default": 0,
          "minimum": 0,
          "title": "Offset",
          "type": "integer"
        },
        "project_id": {
          "description": "The project the call is about.",
          "minLength": 1,
          "title": "Project Id",
          "type": "string"
        },
        "suite_id": {
          "anyOf": [
            {
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Suite Id"
        }
      },
      "required": [
        "action",
        "project_id",
        "app_id"
      ],
      "title": "ScenariosListCall",
      "type": "object"
    },
    "ScenariosListFlowsCall": {
      "additionalProperties": false,
      "properties": {
        "action": {
          "const": "list_flows",
          "title": "Action",
          "type": "string"
        },
        "project_id": {
          "description": "The project the call is about.",
          "minLength": 1,
          "title": "Project Id",
          "type": "string"
        }
      },
      "required": [
        "action",
        "project_id"
      ],
      "title": "ScenariosListFlowsCall",
      "type": "object"
    },
    "ScenariosListSuitesCall": {
      "additionalProperties": false,
      "properties": {
        "action": {
          "const": "list_suites",
          "title": "Action",
          "type": "string"
        },
        "app_id": {
          "minLength": 1,
          "title": "App Id",
          "type": "string"
        },
        "project_id": {
          "description": "The project the call is about.",
          "minLength": 1,
          "title": "Project Id",
          "type": "string"
        }
      },
      "required": [
        "action",
        "project_id",
        "app_id"
      ],
      "title": "ScenariosListSuitesCall",
      "type": "object"
    },
    "ScenariosSetSuiteCall": {
      "additionalProperties": false,
      "properties": {
        "action": {
          "const": "set_suite",
          "title": "Action",
          "type": "string"
        },
        "project_id": {
          "description": "The project the call is about.",
          "minLength": 1,
          "title": "Project Id",
          "type": "string"
        },
        "scenario_ids": {
          "items": {
            "minLength": 1,
            "type": "string"
          },
          "title": "Scenario Ids",
          "type": "array"
        },
        "suite_id": {
          "minLength": 1,
          "title": "Suite Id",
          "type": "string"
        }
      },
      "required": [
        "action",
        "project_id",
        "suite_id",
        "scenario_ids"
      ],
      "title": "ScenariosSetSuiteCall",
      "type": "object"
    },
    "ScenariosStartDiscoveryCall": {
      "additionalProperties": false,
      "properties": {
        "account_ids": {
          "default": [],
          "items": {
            "minLength": 1,
            "type": "string"
          },
          "title": "Account Ids",
          "type": "array"
        },
        "action": {
          "const": "start_flow_discovery",
          "title": "Action",
          "type": "string"
        },
        "app_id": {
          "minLength": 1,
          "title": "App Id",
          "type": "string"
        },
        "constraints": {
          "default": "",
          "title": "Constraints",
          "type": "string"
        },
        "device_profile": {
          "default": "",
          "title": "Device Profile",
          "type": "string"
        },
        "language": {
          "maxLength": 35,
          "pattern": "^[a-z]{2,3}(-[A-Z][a-z]{3})?(-([A-Z]{2}|[0-9]{3}))?$",
          "title": "Language",
          "type": "string"
        },
        "project_id": {
          "description": "The project the call is about.",
          "minLength": 1,
          "title": "Project Id",
          "type": "string"
        },
        "request": {
          "default": "",
          "title": "Request",
          "type": "string"
        },
        "request_id": {
          "maxLength": 128,
          "minLength": 1,
          "title": "Request Id",
          "type": "string"
        }
      },
      "required": [
        "action",
        "project_id",
        "app_id",
        "language",
        "request_id"
      ],
      "title": "ScenariosStartDiscoveryCall",
      "type": "object"
    },
    "ScenariosUpdateCall": {
      "additionalProperties": false,
      "properties": {
        "action": {
          "const": "update",
          "title": "Action",
          "type": "string"
        },
        "app_id": {
          "minLength": 1,
          "title": "App Id",
          "type": "string"
        },
        "applies_to": {
          "anyOf": [
            {
              "const": "all",
              "type": "string"
            },
            {
              "items": {
                "$ref": "#/$defs/Configuration"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Applies To"
        },
        "goal": {
          "anyOf": [
            {
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Goal"
        },
        "needs": {
          "anyOf": [
            {
              "items": {
                "$ref": "#/$defs/Need"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Needs"
        },
        "preconditions": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Preconditions"
        },
        "project_id": {
          "description": "The project the call is about.",
          "minLength": 1,
          "title": "Project Id",
          "type": "string"
        },
        "requirement": {
          "anyOf": [
            {
              "$ref": "#/$defs/ScenarioRequirement"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "scenario_id": {
          "minLength": 1,
          "title": "Scenario Id",
          "type": "string"
        },
        "setup_steps": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Setup Steps"
        },
        "steps": {
          "anyOf": [
            {
              "items": {
                "$ref": "#/$defs/Step"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Steps"
        },
        "title": {
          "anyOf": [
            {
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Title"
        }
      },
      "required": [
        "action",
        "project_id",
        "app_id",
        "scenario_id"
      ],
      "title": "ScenariosUpdateCall",
      "type": "object"
    },
    "Step": {
      "description": "One replayable action and the result that action must show.\n\n``expected`` is the step's own expected result, in markdown, kept word for word from the suite it was\nimported from. Absent or ``None`` means the source named no result for this step; it is never filled\nin from another step or from a scenario-wide outcome.",
      "properties": {
        "action": {
          "title": "Action",
          "type": "string"
        },
        "expected": {
          "anyOf": [
            {
              "maxLength": 4000,
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Expected"
        }
      },
      "required": [
        "action"
      ],
      "title": "Step",
      "type": "object"
    },
    "WebPlatform": {
      "description": "The OS a browser run presents itself as — the first half of a web run's device\nidentity (``web:<platform>-<browser>:<W>x<H>``).\n\nChosen explicitly in the Run picker rather than inferred from the viewport width, so\na 1024px viewport can be an iPad or a small desktop window and the run says which.",
      "enum": [
        "desktop",
        "android",
        "ios"
      ],
      "title": "WebPlatform",
      "type": "string"
    }
  },
  "discriminator": {
    "mapping": {
      "create": "#/$defs/ScenariosCreateCall",
      "create_suite": "#/$defs/ScenariosCreateSuiteCall",
      "delete": "#/$defs/ScenariosDeleteCall",
      "discovery_status": "#/$defs/ScenariosDiscoveryStatusCall",
      "list": "#/$defs/ScenariosListCall",
      "list_flows": "#/$defs/ScenariosListFlowsCall",
      "list_suites": "#/$defs/ScenariosListSuitesCall",
      "set_suite": "#/$defs/ScenariosSetSuiteCall",
      "start_flow_discovery": "#/$defs/ScenariosStartDiscoveryCall",
      "update": "#/$defs/ScenariosUpdateCall"
    },
    "propertyName": "action"
  },
  "oneOf": [
    {
      "$ref": "#/$defs/ScenariosListCall"
    },
    {
      "$ref": "#/$defs/ScenariosListFlowsCall"
    },
    {
      "$ref": "#/$defs/ScenariosStartDiscoveryCall"
    },
    {
      "$ref": "#/$defs/ScenariosDiscoveryStatusCall"
    },
    {
      "$ref": "#/$defs/ScenariosCreateCall"
    },
    {
      "$ref": "#/$defs/ScenariosUpdateCall"
    },
    {
      "$ref": "#/$defs/ScenariosDeleteCall"
    },
    {
      "$ref": "#/$defs/ScenariosListSuitesCall"
    },
    {
      "$ref": "#/$defs/ScenariosCreateSuiteCall"
    },
    {
      "$ref": "#/$defs/ScenariosSetSuiteCall"
    }
  ],
  "type": "object"
}
```

## `knowledge`

Read the current product rules, their sources and versions, and export them as Markdown.

Annotations: reads only.

### `knowledge claims`

Read the recorded product facts of a feature.

| Argument      | Type             | Required | What it is                     |
| ------------- | ---------------- | -------- | ------------------------------ |
| `limit`       | `integer`        | no       |                                |
| `after_mid`   | `string \| null` | no       |                                |
| `feature_mid` | `string \| null` | no       |                                |
| `project_id`  | `string`         | yes      | The project the call is about. |
| `version_id`  | `string`         | yes      |                                |

### `knowledge export`

Export a feature's facts as Markdown.

| Argument      | Type             | Required | What it is                     |
| ------------- | ---------------- | -------- | ------------------------------ |
| `project_id`  | `string`         | yes      | The project the call is about. |
| `version_id`  | `string \| null` | no       |                                |
| `feature_mid` | `string \| null` | no       |                                |

### `knowledge read`

Read the current product rules.

| Argument     | Type     | Required | What it is                     |
| ------------ | -------- | -------- | ------------------------------ |
| `project_id` | `string` | yes      | The project the call is about. |

### `knowledge run_context`

Read the product rules a run used.

| Argument            | Type             | Required | What it is                     |
| ------------------- | ---------------- | -------- | ------------------------------ |
| `limit`             | `integer`        | no       |                                |
| `after_analysis_id` | `string \| null` | no       |                                |
| `scenario_run_id`   | `string \| null` | no       |                                |
| `project_id`        | `string`         | yes      | The project the call is about. |
| `run_id`            | `string`         | yes      |                                |

### `knowledge sources`

List where the product rules came from.

| Argument     | Type                   | Required | What it is                     |
| ------------ | ---------------------- | -------- | ------------------------------ |
| `project_id` | `string`               | yes      | The project the call is about. |
| `app_id`     | `string \| null`       | no       |                                |
| `origin`     | `SourceOrigin \| null` | no       |                                |

### `knowledge versions`

List the versions of the product rules.

| Argument         | Type              | Required | What it is                     |
| ---------------- | ----------------- | -------- | ------------------------------ |
| `project_id`     | `string`          | yes      | The project the call is about. |
| `limit`          | `integer \| null` | no       |                                |
| `before_version` | `integer \| null` | no       |                                |

```json
{
  "$defs": {
    "KnowledgeClaimsCall": {
      "additionalProperties": false,
      "description": "``claims``: one historical version's claims, paged like ``KnowledgeVersionClaimsQuery``.",
      "properties": {
        "action": {
          "const": "claims",
          "title": "Action",
          "type": "string"
        },
        "after_mid": {
          "anyOf": [
            {
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "After Mid"
        },
        "feature_mid": {
          "anyOf": [
            {
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Feature Mid"
        },
        "limit": {
          "default": 50,
          "maximum": 200,
          "minimum": 1,
          "title": "Limit",
          "type": "integer"
        },
        "project_id": {
          "description": "The project the call is about.",
          "minLength": 1,
          "title": "Project Id",
          "type": "string"
        },
        "version_id": {
          "minLength": 1,
          "title": "Version Id",
          "type": "string"
        }
      },
      "required": [
        "action",
        "project_id",
        "version_id"
      ],
      "title": "KnowledgeClaimsCall",
      "type": "object"
    },
    "KnowledgeExportCall": {
      "additionalProperties": false,
      "properties": {
        "action": {
          "const": "export",
          "title": "Action",
          "type": "string"
        },
        "feature_mid": {
          "anyOf": [
            {
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Feature Mid"
        },
        "project_id": {
          "description": "The project the call is about.",
          "minLength": 1,
          "title": "Project Id",
          "type": "string"
        },
        "version_id": {
          "anyOf": [
            {
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Version Id"
        }
      },
      "required": [
        "action",
        "project_id"
      ],
      "title": "KnowledgeExportCall",
      "type": "object"
    },
    "KnowledgeReadCall": {
      "additionalProperties": false,
      "properties": {
        "action": {
          "const": "read",
          "title": "Action",
          "type": "string"
        },
        "project_id": {
          "description": "The project the call is about.",
          "minLength": 1,
          "title": "Project Id",
          "type": "string"
        }
      },
      "required": [
        "action",
        "project_id"
      ],
      "title": "KnowledgeReadCall",
      "type": "object"
    },
    "KnowledgeRunContextCall": {
      "additionalProperties": false,
      "description": "``run_context``: Quality's stored initial knowledge pack of each analysis of a run.",
      "properties": {
        "action": {
          "const": "run_context",
          "title": "Action",
          "type": "string"
        },
        "after_analysis_id": {
          "anyOf": [
            {
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "After Analysis Id"
        },
        "limit": {
          "default": 20,
          "maximum": 200,
          "minimum": 1,
          "title": "Limit",
          "type": "integer"
        },
        "project_id": {
          "description": "The project the call is about.",
          "minLength": 1,
          "title": "Project Id",
          "type": "string"
        },
        "run_id": {
          "minLength": 1,
          "title": "Run Id",
          "type": "string"
        },
        "scenario_run_id": {
          "anyOf": [
            {
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Scenario Run Id"
        }
      },
      "required": [
        "action",
        "project_id",
        "run_id"
      ],
      "title": "KnowledgeRunContextCall",
      "type": "object"
    },
    "KnowledgeSourcesCall": {
      "additionalProperties": false,
      "properties": {
        "action": {
          "const": "sources",
          "title": "Action",
          "type": "string"
        },
        "app_id": {
          "anyOf": [
            {
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "App Id"
        },
        "origin": {
          "anyOf": [
            {
              "$ref": "#/$defs/SourceOrigin"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "project_id": {
          "description": "The project the call is about.",
          "minLength": 1,
          "title": "Project Id",
          "type": "string"
        }
      },
      "required": [
        "action",
        "project_id"
      ],
      "title": "KnowledgeSourcesCall",
      "type": "object"
    },
    "KnowledgeVersionsCall": {
      "additionalProperties": false,
      "properties": {
        "action": {
          "const": "versions",
          "title": "Action",
          "type": "string"
        },
        "before_version": {
          "anyOf": [
            {
              "minimum": 1,
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Before Version"
        },
        "limit": {
          "anyOf": [
            {
              "maximum": 200,
              "minimum": 1,
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Limit"
        },
        "project_id": {
          "description": "The project the call is about.",
          "minLength": 1,
          "title": "Project Id",
          "type": "string"
        }
      },
      "required": [
        "action",
        "project_id"
      ],
      "title": "KnowledgeVersionsCall",
      "type": "object"
    },
    "SourceOrigin": {
      "description": "Where a source's text came from. It decides who a claim is said to be stated by.",
      "enum": [
        "uploaded",
        "connector",
        "exploration",
        "customer",
        "written",
        "test_edit"
      ],
      "title": "SourceOrigin",
      "type": "string"
    }
  },
  "discriminator": {
    "mapping": {
      "claims": "#/$defs/KnowledgeClaimsCall",
      "export": "#/$defs/KnowledgeExportCall",
      "read": "#/$defs/KnowledgeReadCall",
      "run_context": "#/$defs/KnowledgeRunContextCall",
      "sources": "#/$defs/KnowledgeSourcesCall",
      "versions": "#/$defs/KnowledgeVersionsCall"
    },
    "propertyName": "action"
  },
  "oneOf": [
    {
      "$ref": "#/$defs/KnowledgeReadCall"
    },
    {
      "$ref": "#/$defs/KnowledgeSourcesCall"
    },
    {
      "$ref": "#/$defs/KnowledgeVersionsCall"
    },
    {
      "$ref": "#/$defs/KnowledgeClaimsCall"
    },
    {
      "$ref": "#/$defs/KnowledgeExportCall"
    },
    {
      "$ref": "#/$defs/KnowledgeRunContextCall"
    }
  ],
  "type": "object"
}
```

## `test_data`

Read test data, get an upload link for a file and add an item.

Annotations: can change or delete data.

### `test_data create`

Add a test data item.

| Argument     | Type                        | Required | What it is                     |
| ------------ | --------------------------- | -------- | ------------------------------ |
| `project_id` | `string`                    | yes      | The project the call is about. |
| `item`       | `CreateTestDataItemRequest` | yes      |                                |
| `request_id` | `string`                    | yes      |                                |

### `test_data list`

List test data items.

| Argument     | Type                   | Required | What it is                     |
| ------------ | ---------------------- | -------- | ------------------------------ |
| `project_id` | `string`               | yes      | The project the call is about. |
| `app_id`     | `string \| null`       | no       |                                |
| `category`   | `ItemCategory \| null` | no       |                                |
| `cursor`     | `string \| null`       | no       |                                |

### `test_data read`

Read one test data item.

| Argument     | Type     | Required | What it is                     |
| ------------ | -------- | -------- | ------------------------------ |
| `project_id` | `string` | yes      | The project the call is about. |
| `item_id`    | `string` | yes      |                                |

### `test_data upload_link`

Get a link to upload a test file.

| Argument     | Type                        | Required | What it is                     |
| ------------ | --------------------------- | -------- | ------------------------------ |
| `project_id` | `string`                    | yes      | The project the call is about. |
| `upload`     | `TestDataUploadLinkRequest` | yes      |                                |

```json
{
  "$defs": {
    "CodeBinding": {
      "description": "A ``code`` field's value: an OTP binding reference in the identity broker (5.2).",
      "properties": {
        "binding_ref": {
          "maxLength": 512,
          "minLength": 1,
          "title": "Binding Ref",
          "type": "string"
        }
      },
      "required": [
        "binding_ref"
      ],
      "title": "CodeBinding",
      "type": "object"
    },
    "CreateTestDataItemRequest": {
      "description": "`POST /v1/projects/{p}/test-data` (6.1). Requires `Idempotency-Key`, carried as a\nheader, not a body field.",
      "properties": {
        "app_id": {
          "anyOf": [
            {
              "maxLength": 255,
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "App Id"
        },
        "fields": {
          "additionalProperties": {
            "discriminator": {
              "mapping": {
                "code": "#/$defs/DepositCodeInput",
                "file": "#/$defs/DepositFileInput",
                "secret": "#/$defs/DepositSecretInput",
                "text": "#/$defs/DepositTextInput"
              },
              "propertyName": "kind"
            },
            "oneOf": [
              {
                "$ref": "#/$defs/DepositTextInput"
              },
              {
                "$ref": "#/$defs/DepositSecretInput"
              },
              {
                "$ref": "#/$defs/DepositFileInput"
              },
              {
                "$ref": "#/$defs/DepositCodeInput"
              }
            ]
          },
          "title": "Fields",
          "type": "object"
        },
        "label": {
          "maxLength": 255,
          "minLength": 1,
          "title": "Label",
          "type": "string"
        },
        "one_at_a_time": {
          "default": false,
          "title": "One At A Time",
          "type": "boolean"
        }
      },
      "required": [
        "label"
      ],
      "title": "CreateTestDataItemRequest",
      "type": "object"
    },
    "DepositCodeInput": {
      "properties": {
        "key": {
          "default": false,
          "title": "Key",
          "type": "boolean"
        },
        "kind": {
          "const": "code",
          "default": "code",
          "title": "Kind",
          "type": "string"
        },
        "value": {
          "$ref": "#/$defs/CodeBinding"
        }
      },
      "required": [
        "value"
      ],
      "title": "DepositCodeInput",
      "type": "object"
    },
    "DepositFileInput": {
      "properties": {
        "key": {
          "default": false,
          "title": "Key",
          "type": "boolean"
        },
        "kind": {
          "const": "file",
          "default": "file",
          "title": "Kind",
          "type": "string"
        },
        "object": {
          "maxLength": 1024,
          "minLength": 1,
          "title": "Object",
          "type": "string"
        }
      },
      "required": [
        "object"
      ],
      "title": "DepositFileInput",
      "type": "object"
    },
    "DepositSecretInput": {
      "properties": {
        "key": {
          "default": false,
          "title": "Key",
          "type": "boolean"
        },
        "kind": {
          "const": "secret",
          "default": "secret",
          "title": "Kind",
          "type": "string"
        },
        "value": {
          "$ref": "#/$defs/SealedBox"
        }
      },
      "required": [
        "value"
      ],
      "title": "DepositSecretInput",
      "type": "object"
    },
    "DepositTextInput": {
      "properties": {
        "key": {
          "default": false,
          "title": "Key",
          "type": "boolean"
        },
        "kind": {
          "const": "text",
          "default": "text",
          "title": "Kind",
          "type": "string"
        },
        "value": {
          "minLength": 1,
          "title": "Value",
          "type": "string"
        }
      },
      "required": [
        "value"
      ],
      "title": "DepositTextInput",
      "type": "object"
    },
    "FixtureCreateCall": {
      "additionalProperties": false,
      "properties": {
        "action": {
          "const": "create",
          "title": "Action",
          "type": "string"
        },
        "item": {
          "$ref": "#/$defs/CreateTestDataItemRequest"
        },
        "project_id": {
          "description": "The project the call is about.",
          "minLength": 1,
          "title": "Project Id",
          "type": "string"
        },
        "request_id": {
          "title": "Request Id",
          "type": "string"
        }
      },
      "required": [
        "action",
        "project_id",
        "item",
        "request_id"
      ],
      "title": "FixtureCreateCall",
      "type": "object"
    },
    "FixtureListCall": {
      "additionalProperties": false,
      "properties": {
        "action": {
          "const": "list",
          "title": "Action",
          "type": "string"
        },
        "app_id": {
          "anyOf": [
            {
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "App Id"
        },
        "category": {
          "anyOf": [
            {
              "$ref": "#/$defs/ItemCategory"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "cursor": {
          "anyOf": [
            {
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Cursor"
        },
        "project_id": {
          "description": "The project the call is about.",
          "minLength": 1,
          "title": "Project Id",
          "type": "string"
        }
      },
      "required": [
        "action",
        "project_id"
      ],
      "title": "FixtureListCall",
      "type": "object"
    },
    "FixtureReadCall": {
      "additionalProperties": false,
      "properties": {
        "action": {
          "const": "read",
          "title": "Action",
          "type": "string"
        },
        "item_id": {
          "minLength": 1,
          "title": "Item Id",
          "type": "string"
        },
        "project_id": {
          "description": "The project the call is about.",
          "minLength": 1,
          "title": "Project Id",
          "type": "string"
        }
      },
      "required": [
        "action",
        "project_id",
        "item_id"
      ],
      "title": "FixtureReadCall",
      "type": "object"
    },
    "FixtureUploadLinkCall": {
      "additionalProperties": false,
      "properties": {
        "action": {
          "const": "upload_link",
          "title": "Action",
          "type": "string"
        },
        "project_id": {
          "description": "The project the call is about.",
          "minLength": 1,
          "title": "Project Id",
          "type": "string"
        },
        "upload": {
          "$ref": "#/$defs/TestDataUploadLinkRequest"
        }
      },
      "required": [
        "action",
        "project_id",
        "upload"
      ],
      "title": "FixtureUploadLinkCall",
      "type": "object"
    },
    "ItemCategory": {
      "enum": [
        "payment_card",
        "account",
        "file",
        "record"
      ],
      "title": "ItemCategory",
      "type": "string"
    },
    "SealedBox": {
      "description": "A libsodium ``crypto_box_seal`` ciphertext over ``{tenant, field, value}`` (5.3).\n\nWrite-only after sealing: nothing in this package can recover ``value`` from ``sealed``.\nOnly the identity broker holds the private key that opens it, and only for the tenant and\nfield it was sealed under (:mod:`talotrace_contracts.identity.sealing`). Every writer --\nthe browser, the Suite reader, the engines -- sends a value already in this shape: Deposit\nnever seals a value itself, except the two named exceptions of 1.1 item 5, which seal it at\norch's edge before it ever reaches this shape.",
      "properties": {
        "key_id": {
          "maxLength": 64,
          "minLength": 1,
          "title": "Key Id",
          "type": "string"
        },
        "sealed": {
          "minLength": 1,
          "title": "Sealed",
          "type": "string"
        }
      },
      "required": [
        "sealed",
        "key_id"
      ],
      "title": "SealedBox",
      "type": "object"
    },
    "TestDataUploadLinkRequest": {
      "description": "`POST /v1/projects/{p}/test-data:upload-link` (6.1).",
      "properties": {
        "filename": {
          "maxLength": 255,
          "minLength": 1,
          "title": "Filename",
          "type": "string"
        },
        "media_type": {
          "maxLength": 255,
          "minLength": 1,
          "title": "Media Type",
          "type": "string"
        },
        "size": {
          "exclusiveMinimum": 0,
          "maximum": 50000000,
          "title": "Size",
          "type": "integer"
        }
      },
      "required": [
        "filename",
        "media_type",
        "size"
      ],
      "title": "TestDataUploadLinkRequest",
      "type": "object"
    }
  },
  "discriminator": {
    "mapping": {
      "create": "#/$defs/FixtureCreateCall",
      "list": "#/$defs/FixtureListCall",
      "read": "#/$defs/FixtureReadCall",
      "upload_link": "#/$defs/FixtureUploadLinkCall"
    },
    "propertyName": "action"
  },
  "oneOf": [
    {
      "$ref": "#/$defs/FixtureListCall"
    },
    {
      "$ref": "#/$defs/FixtureReadCall"
    },
    {
      "$ref": "#/$defs/FixtureCreateCall"
    },
    {
      "$ref": "#/$defs/FixtureUploadLinkCall"
    }
  ],
  "type": "object"
}
```