Documentation
AI
Jira AI

Jira AI

Overview

The Jira AI system covers three operations:

OperationEndpointDescription
GeneratePOST /api/canvas/jira/generateStep-by-step structured work item generation
AnalyzePOST /api/canvas/jira/analyzeInline AI suggestions for a single work item
RewritePOST /api/canvas/jira/rewriteField-level rewrite of selected text in an item

Generation

Jira generation produces structured output validated against a Zod schema:

{
  "items": [
    {
      "key": "EPIC-001",
      "type": "epic",
      "summary": "Reduce checkout friction",
      "description": "...",
      "acceptanceCriteria": ["..."],
      "noGos": ["..."],
      "sourceNoteLinks": [{ "noteId": "...", "noteTitle": "..." }]
    }
  ],
  "recommendedNextStep": "stories"
}

Generated items are persisted via the standard sync pipeline (same D1 push as notes).

Generation modes

ModeBody fieldWhat it does
generate_stepstepGenerates the next tier of the hierarchy
regenerate_itemsitemIdsImproves selected existing items
generate_childrenparentIdDecomposes a parent item into children

Recommended generation sequence

  1. Ideas — high-level opportunity areas
  2. Discoveries — research findings and hypotheses
  3. Prototypes — experiment designs
  4. Epics and Stories — user-facing outcomes and requirements
  5. Tasks and Subtasks — implementation work items

The "Generate next step" button in the Jira Action Bar automatically identifies which tier is missing and suggests the right generation.

Analyze

The analyze endpoint produces inline suggestions for a work item section:

{
  "suggestions": [
    {
      "sectionText": "Users can reset their password",
      "advice": "Add a Given/When/Then format for this acceptance criterion",
      "actions": [
        { "label": "Add Given/When/Then", "prompt": "Rewrite this criterion with Given/When/Then" }
      ]
    }
  ]
}

Suggestions are rendered as @subagent annotation blockquotes inside the work item editor. Each suggestion has action buttons that trigger a rewrite call.

Rewrite

The rewrite endpoint accepts a selected piece of text and a free-form instruction, and returns a rewritten version:

{ "rewritten": "Given a user on the login page, when they click Forgot password..." }

The client replaces the selected text and highlights it yellow to indicate an AI-applied change.

Quota and billing

All Jira AI endpoints consume AI credits. Charges are applied to the board owner's monthly credit quota, not the requesting user. This means collaborators can use AI without needing a Pro plan themselves.

See also