--- id: "a6bd718d-e770-4a8d-ae16-b4b522203766" name: "Jira Cloud (browser-harness)" micro_summary: "Domain hub for authenticated Jira audits via browser-harness" status: "in_progress" see_also: [] scope: "Domain hub for Jira Cloud — patterns and safe read-only audit recipes for authenticated browser-harness sessions. Contains JQL examples, field lists, pagination rules, ADF->text guidance, and fetch/js quoting guidance." --- ## Purpose Domain hub documenting the authenticated Jira audit patterns used by browser-harness workers: reuse existing authenticated tab, verify identity, run read-only REST queries, post-filter by assignee displayName, parse ADF descriptions to text, and save artifacts to disk for handoff. ## Key patterns - Reuse an existing authenticated Jira tab: `list_tabs()` → `switch_tab(targetId)`; avoid `new_tab()`/`goto_url()` when an authenticated tab exists. - Verify current user: GET `/rest/api/3/myself` and check `displayName`. - Use the supported search API: `/rest/api/3/search/jql?jql=...` (not the removed `/rest/api/3/search`). - Request fields: `summary,status,priority,assignee,updated,parent,description,duedate,issuetype,project,labels,comment`. - Pagination: respect `nextPageToken`/`isLast` and loop (guarded to avoid infinite loops). - Post-filter: after retrieval, keep only issues whose `fields.assignee.displayName` exactly matches the intended display name (e.g., `Jack ten Bosch`). - ADF -> text: flatten Atlassian Document Format to plaintext (paragraph/heading/content recursion) for short actionable summaries; do NOT mutate issues. - Safety: read-only only; never call issue edit/transition endpoints during audits. ## Dev notes - browser-harness `js()` quoting: prefer async IIFE or run small Python helper scripts to avoid nested-quote and auto-wrap pitfalls. - Save raw JSON and normalized artifacts under `/Users/jack/.cache/pi-jira-audit/` with timestamps for reproducibility.