RobotRock

Context

context provides the metadata shown to reviewers in the task detail view.

Assignment (assignTo) is a separate top-level field on sendToHuman / the create-task API, not part of context. See Send to human.

JSON Forms foundation

Context rendering follows JSON Forms-style UI schema conventions:

  • context.data carries your raw values.
  • context.ui customizes how those values are displayed.

Context shape

context: {
  data: Record<string, unknown>; // required when context is present
  ui?: Record<string, unknown>; // optional
}

context.data

data is a free-form object for business information.

context: {
  data: {
    requestId: "bud-2026-q4-17",
    department: "finance",
    currentBudgetUsd: 1000000,
    requestedIncreaseUsd: 120000,
    affectedTeams: ["platform", "security"],
    submittedBy: {
      id: "usr_123",
      name: "Avery Chen",
      email: "avery@example.com",
    },
  },
}

context.ui

Use ui to control labels, widgets, placeholders, and display options for context.data fields.

context: {
  data: {
    requestId: "bud-2026-q4-17",
    requestedIncreaseUsd: 120000,
    submittedBy: {
      name: "Avery Chen",
      email: "avery@example.com",
    },
  },
  ui: {
    requestId: {
      "ui:title": "Request ID",
      "ui:widget": "string",
    },
    requestedIncreaseUsd: {
      "ui:title": "Requested increase (USD)",
      "ui:widget": "currency",
      "ui:options": { currency: "USD" },
    },
    submittedBy: {
      name: { "ui:title": "Submitted by" },
      email: { "ui:widget": "string" },
    },
  },
}

Common UI keys:

  • ui:widget
  • ui:title
  • ui:description
  • ui:placeholder
  • ui:options

Widget reference (grouped by widget type)

If ui:widget is omitted, RobotRock auto-selects by value type:

  • string -> string
  • number -> number
  • boolean -> boolean
  • object -> object
  • array of primitives -> list
  • array of objects -> table

Unknown widget ids fall back to the type-based default.

string

  • auto-selected for: string values
  • ui:options: none (custom keys ignored today)
context: {
  data: { summary: "Budget update for Q4" },
  ui: { summary: { "ui:widget": "string" } },
}

number

  • auto-selected for: number values
  • ui:options: none
context: {
  data: { riskScore: 87 },
  ui: { riskScore: { "ui:widget": "number" } },
}

boolean

  • auto-selected for: boolean values
  • ui:options: none
context: {
  data: { requiresLegalReview: true },
  ui: { requiresLegalReview: { "ui:widget": "boolean" } },
}

object

  • auto-selected for: object values
  • ui:options: none at object level; nested fields can still use their own widget options (for example currency)
context: {
  data: { owner: { name: "Avery", team: "Finance" } },
  ui: { owner: { "ui:widget": "object" } },
}

list

  • auto-selected for: arrays of primitive values
  • ui:options: none
context: {
  data: { tags: ["finance", "quarterly", "urgent"] },
  ui: { tags: { "ui:widget": "list" } },
}

table

  • auto-selected for: arrays of objects
  • ui:options: none at table level; nested item fields can use options (for example currency)
context: {
  data: {
    lineItems: [{ label: "Tools", amount: 5000 }],
  },
  ui: {
    lineItems: {
      "ui:widget": "table",
      items: {
        amount: {
          "ui:widget": "currency",
          "ui:options": { currency: "USD" },
        },
      },
    },
  },
}

date

  • auto-selected: no (set ui:widget explicitly)
  • ui:options: none
context: {
  data: { submittedAt: "2026-06-01T11:15:00.000Z" },
  ui: { submittedAt: { "ui:widget": "date" } },
}

currency

  • auto-selected: no (set ui:widget explicitly)
  • ui:options: currency (ISO code like USD, EUR, GBP)
context: {
  data: { requestedIncreaseUsd: 120000 },
  ui: {
    requestedIncreaseUsd: {
      "ui:widget": "currency",
      "ui:options": { currency: "EUR" },
    },
  },
}
  • auto-selected: no (set ui:widget explicitly)
  • ui:options: none
context: {
  data: { proposalUrl: "https://example.com/proposals/q4-budget" },
  ui: { proposalUrl: { "ui:widget": "link" } },
}

image

  • auto-selected: no (set ui:widget explicitly)
  • ui:options: none
context: {
  data: { architectureDiagram: "https://example.com/diagram.png" },
  ui: { architectureDiagram: { "ui:widget": "image" } },
}

attachments

  • auto-selected: no (set ui:widget explicitly)
  • ui:options: none
context: {
  data: {
    files: [
      { name: "Budget.xlsx", url: "https://example.com/budget.xlsx" },
      { name: "Forecast.pdf", url: "https://example.com/forecast.pdf" },
    ],
  },
  ui: { files: { "ui:widget": "attachments" } },
}

markdown

  • auto-selected: no (set ui:widget explicitly)
  • ui:options: none
context: {
  data: { notes: "## Summary\nPlease review the updated assumptions." },
  ui: { notes: { "ui:widget": "markdown" } },
}

code

  • auto-selected: no (set ui:widget explicitly)
  • ui:options: language (Shiki language id, for example typescript, json, bash)
context: {
  data: { migrationSnippet: "export const timeoutMs = 5000;" },
  ui: {
    migrationSnippet: {
      "ui:widget": "code",
      "ui:options": { language: "typescript" },
    },
  },
}

compare

  • auto-selected: no (set ui:widget explicitly)
  • ui:options: none
context: {
  data: {
    options: [
      { name: "Plan A", monthlyCostUsd: 12000, summary: "Lower cost" },
      { name: "Plan B", monthlyCostUsd: 18000, summary: "Faster rollout" },
    ],
  },
  ui: { options: { "ui:widget": "compare" } },
}

Notes

  • context is optional.
  • If context is provided, context.data is required.
  • Nested UI config is supported for nested objects in context.data.

Examples

For complete task payloads (including actions) used in the dashboard Examples gallery, see the Examples pages under Tasks in the sidebar.

On this page