ActionBoxDOCS

Context block schemas

Pass bounded code, diffs, logs, metrics, links, JSON, and key-value evidence with an Action.

The top-level context array carries evidence that helps a reviewer check an Action. It is separate from decision_context: the Decision Brief explains the decision, while context blocks contain the supporting material.

An Action accepts up to 12 blocks. Each block has a required type and an optional title of up to 120 characters. The complete context array has a schema ceiling of 128 KB. Plan limits are Developer 16 KB, Pro and Founder 64 KB, and Team 128 KB.

Supported block types

typeRequired fieldsOptional fieldsLimits
key_valueitems objecttitle1 to 50 entries. Values must be a string, number, boolean, or null.
codecontenttitle, languagecontent is 1 to 20,000 characters; language is up to 40 characters.
diffcontenttitle, languageSame limits as code.
logscontenttitle, languageSame limits as code.
commandcontenttitle, languageSame limits as code.
jsonvaluetitlevalue may be any valid JSON value, subject to the total context limit.
metricsitems arraytitle1 to 20 metric items.
linksitems arraytitle1 to 20 link items.

Key-value evidence

{
  "type": "key_value",
  "title": "Release",
  "items": {
    "version": "2.18.0",
    "replicas": 6,
    "canary_passed": true
  }
}

Code, diffs, logs, and commands

These four types use the same shape. Choose the type that describes the content so clients can render a useful label and treatment.

Set language to select syntax highlighting: python, javascript, typescript, json, bash, sql, yaml, go, dart, xml, or css. Short forms such as py, js, ts, sh, and yml are accepted. Web highlights supported code; Slack receives the language hint and controls its own colours. Mobile highlighting requires the next app release. Unknown languages remain plain text, and diffs keep their added/removed-line colours. Highlighting does not run the code or change the text copied with the copy button.

{
  "type": "diff",
  "title": "Write-path change",
  "language": "diff",
  "content": "- schema = cached_schema\n+ schema = fetch_live_schema()"
}

Diagram previews (Beta)

Send a code block with language: "mermaid". Where diagram previews are enabled, web shows the image above its source. Slack shows it in View details after an owner or admin reconnects the integration and grants the optional file-upload permission. The current mobile app shows the source as code. Image previews with pinch-to-zoom are prepared for a future mobile release.

{
  "type": "code",
  "title": "Review flow",
  "language": "mermaid",
  "content": "flowchart TD\nA[Request approval] --> B[Review evidence]\nB --> C[Record decision]"
}

Previews support a restricted subset of Mermaid flowcharts. Use flowchart or graph with direction TD, TB, BT, LR, or RL. Nodes can use square labels (A[Review]), rounded labels (A(Start)), or decision diamonds (A{Approve?}). Arrows use -->, optionally followed by a label: A -->|Yes| B. Put each node or arrow on its own line. Use ASCII letters, numbers, and underscores for node IDs, starting with a letter. Keep the diagram within 4 KiB, 20 nodes, and 30 arrows. Horizontal diagrams can have up to four levels. Keep node labels short (at most 64 characters) and arrow labels within 24 characters; labels must fit the shape.

Cycles, HTML, links, images, styling directives, and other Mermaid diagram types are not rendered. Unsupported input remains readable as source; it does not prevent a reviewer from answering. Slack previews up to three diagrams per Action. ActionBox generates the preview from text; there is no image-upload field.

JSON

{
  "type": "json",
  "title": "Deployment plan",
  "value": {
    "strategy": "canary",
    "percent": 10
  }
}

Metrics

Each metric item requires a label from 1 to 120 characters and a string or numeric value. The optional unit is limited to 40 characters.

{
  "type": "metrics",
  "title": "Staging checks",
  "items": [
    { "label": "Passed", "value": 482, "unit": "checks" },
    { "label": "Error rate", "value": 0.02, "unit": "%" }
  ]
}

Each link requires a label from 1 to 120 characters and an HTTP or HTTPS url of up to 2,048 characters. ActionBox validates links before storing the Action. URLs with embedded usernames or passwords are rejected. Do not put access tokens in URL query strings; use a preview provider's access controls instead.

{
  "type": "links",
  "title": "Runbooks",
  "items": [
    {
      "label": "Rollback procedure",
      "url": "https://docs.example.com/runbooks/rollback"
    }
  ]
}

Context is customer-provided content

Do not include passwords, API keys, signing secrets, private credentials, or unrestricted customer records. Keep excerpts small and link to the system of record when reviewers need a larger artifact.

Complete Action example

{
  "title": "Deploy release 2.18.0?",
  "options": [
    { "id": "approve", "label": "Approve" },
    { "id": "hold", "label": "Hold" }
  ],
  "context": [
    {
      "type": "key_value",
      "title": "Release",
      "items": { "version": "2.18.0", "replicas": 6 }
    },
    {
      "type": "links",
      "title": "Evidence",
      "items": [
        { "label": "Deployment run", "url": "https://ci.example.com/runs/4821" }
      ]
    }
  ]
}

Context contributes to the Action fingerprint. Updating it advances action_version and changes the fingerprint, so a response against an older snapshot fails with ACTION_CHANGED.

Next: Decision context, Creating Actions, or the live OpenAPI document.

On this page