{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:tokenx:schema:agent-assignment:v2",
  "title": "TokenX agent assignment",
  "type": "object",
  "additionalProperties": false,
  "required": ["assignmentId", "role", "profileKey", "reasoningEffort", "taskProfile", "promptTemplateKey", "ordinal", "objectiveKey", "evidenceKey"],
  "properties": {
    "assignmentId": { "type": "string", "minLength": 1, "maxLength": 32, "pattern": "^a[1-9][0-9]*$" },
    "role": { "enum": ["repo_reader", "repo_reviewer", "test_runner", "file_editor", "implementer"] },
    "profileKey": { "enum": ["economy", "standard", "deep"] },
    "reasoningEffort": { "enum": ["low", "medium", "high", "xhigh", "max", "ultra"] },
    "taskProfile": {
      "enum": ["read", "file_edit", "implementation", "complex_implementation", "analysis", "architecture"]
    },
    "promptTemplateKey": { "enum": ["repo_reader", "repo_reviewer", "test_runner", "file_editor", "implementer"] },
    "ordinal": { "type": "integer", "minimum": 1, "maximum": 4 },
    "objectiveKey": { "enum": ["repo_map", "independent_review", "focused_test", "scoped_file_edit", "implementation_slice"] },
    "evidenceKey": { "enum": ["facts_with_references", "ranked_findings", "command_results", "allowed_file_diff", "diff_and_verification"] }
  }
}
