{
  "about": "Measured on-call-agent createIssue demand, retained issue-tracking life and published examples. Jira grants and project-scoped computed queries require handlers.",
  "decisions": [
    {
      "operation": "oauthToken",
      "demand": "the issue-tracking customer life trades its install code and refreshes (rotating)",
      "mechanism": "handler",
      "why": "an action: a code or refresh token spent once, a token pair drawn from ctx.secret"
    },
    {
      "operation": "accessibleResources",
      "demand": "the issue-tracking customer life finds the site's cloudid",
      "mechanism": "handler",
      "why": "a computed read: the sites the grant reaches"
    },
    {
      "operation": "getCurrentUser",
      "demand": "The on-call SDK reads the authenticated account ID before creating its project; the Basic and OAuth life verifies the same person.",
      "mechanism": "handler",
      "why": "A read of the authenticated stored person, retaining site and read:jira-user scope checks. first-use.json's app.mjs calls jira.myself.getCurrentUser() and asserts the account's emailAddress and accountId, which leads its project; the answer carries the User the example publishes (avatarUrls at four sizes, the unexpanded groups and applicationRoles, the deprecated key and name)."
    },
    {
      "operation": "searchProjects",
      "demand": "the site's projects",
      "mechanism": "handler",
      "why": "a computed read: paged by startAt and maxResults, isLast first-use.json's resume.mjs calls jira.projects.searchProjects and asserts the OPS project is retained."
    },
    {
      "operation": "createProject",
      "demand": "the World seeds a site's projects through the vendor's own API (the seeding rule)",
      "mechanism": "handler",
      "why": "a create: the project with Jira's default issue types and workflow first-use.json's app.mjs calls jira.projects.createProject({ key: 'OPS', ... leadAccountId }) with the account getCurrentUser answered and asserts the key."
    },
    {
      "operation": "getProject",
      "demand": "a project's issue types",
      "mechanism": "handler",
      "why": "one resource's views (expand=issueTypes)"
    },
    {
      "operation": "getProjectComponents",
      "demand": "a project's components",
      "mechanism": "handler",
      "why": "a read of the project's components"
    },
    {
      "operation": "createComponent",
      "demand": "the World seeds a project's components through the vendor's own API (the seeding rule)",
      "mechanism": "handler",
      "why": "a create under the project The life's Checkout component names Jonah its lead."
    },
    {
      "operation": "getAllLabels",
      "demand": "the site's labels",
      "mechanism": "handler",
      "why": "a computed read: the labels the issues carry"
    },
    {
      "operation": "findAssignableUsers",
      "demand": "the people who can be assigned",
      "mechanism": "handler",
      "why": "a computed read: the site's people The life's picker asks by project, and by the issue being assigned."
    },
    {
      "operation": "searchAndReconsileIssuesUsingJqlPost",
      "demand": "issues searched and listed by JQL",
      "mechanism": "handler",
      "why": "a computed read: the JQL the retained tracking integration writes, parsed; nextPageToken paging"
    },
    {
      "operation": "searchAndReconsileIssuesUsingJql",
      "demand": "issues searched by JQL (GET): Jonah's open-report list from his laptop",
      "mechanism": "handler",
      "why": "the same read as the POST"
    },
    {
      "operation": "createIssue",
      "demand": "a finding filed",
      "mechanism": "handler",
      "why": "a create: the project's next key number (from its issues' history), the workflow's first status first-use.json's app.mjs makes the on-call agent's unchanged jira.issues.createIssue call (a Task with an ADF description and priority High) and asserts the OPS key and the self URL; the life's Done-on-create filing applies a transition to the new issue."
    },
    {
      "operation": "getIssue",
      "demand": "an issue, its status, its labels",
      "mechanism": "handler",
      "why": "one resource's views: the fields asked first-use.json's app.mjs and resume.mjs read the ticket with jira.issues.getIssue and assert its summary, ADF text, priority, type, project and To Do status, and the 404 HttpException of a key no issue carries."
    },
    {
      "operation": "editIssue",
      "demand": "labels set; priority and assignee set in triage",
      "mechanism": "handler",
      "why": "an update of fields The life's triage edit sets priority and assignee beside its label update."
    },
    {
      "operation": "getComments",
      "demand": "an issue's comments",
      "mechanism": "handler",
      "why": "a read of the issue's comments"
    },
    {
      "operation": "addComment",
      "demand": "a duplicate commented on",
      "mechanism": "handler",
      "why": "a create under the issue"
    },
    {
      "operation": "getTransitions",
      "demand": "the transitions out of an issue's status",
      "mechanism": "handler",
      "why": "a computed read of the workflow (states.ts)"
    },
    {
      "operation": "doTransition",
      "demand": "an issue reopened",
      "mechanism": "handler",
      "why": "a move the workflow allows (states.ts)"
    },
    {
      "operation": "door:apiToken",
      "demand": "cookbook/on-call-agent/agent.mjs:11",
      "mechanism": "door",
      "why": "API tokens are created in the Atlassian account console, outside Jira REST. The credential door retains the selected person's named token for its site.",
      "lane": "auth"
    },
    {
      "lane": "auth",
      "operation": "door:sites",
      "demand": "Sign up for a Jira Cloud site and its first administrator.",
      "mechanism": "door",
      "why": "Site signup and the first Atlassian account are console actions outside the Jira platform API."
    },
    {
      "lane": "auth",
      "operation": "door:people",
      "demand": "Give an Atlassian person access to the selected site.",
      "mechanism": "door",
      "why": "The site's administrator grants access through Atlassian administration, outside the issue-tracking REST API."
    },
    {
      "lane": "auth",
      "operation": "door:appCredentials",
      "demand": "Create an OAuth 2.0 (3LO) application in the developer console.",
      "mechanism": "door",
      "why": "The developer console creates the OAuth application's client credentials; the OAuth token API consumes them."
    }
  ]
}
