Skip to content

feat(cli): let agents read and update Jira tickets safely - #28592

Merged
nwparker merged 5 commits into
mainfrom
nwparker/jira-cli-surface
Oct 14, 2026
Merged

nwparker merged 5 commits into
mainfrom
nwparker/jira-cli-surface

Conversation

@nwparker

@nwparker nwparker commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 5 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​638 $\color{#cf222e}{\Huge{\mathbf{−}}}$​10 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​628
Prod 36 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1448 $\color{#cf222e}{\Huge{\mathbf{−}}}$​112 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1336

ELI5

Agents can now work on Jira tickets from the terminal: read them, create tickets, leave comments, change status, assign people, set priorities, and edit labels. They use the Jira account already connected to the Orca host they are working on.

What Changed

Before, Jira worked in the Tasks panel but had no agent command surface. This adds the complete orca jira command family, human-readable and JSON output, and the orca-jira / jira-tickets discovery guides. Project keys resolve to real project IDs before creation; project issue types and required create fields are discoverable. Multiline descriptions/comments support files and stdin using the existing body-reading implementation.

Each operation pins one saved Jira site. Browse URLs match the complete site origin and context path; ambiguous keys and conflicting sites fail before writing. Read failures remain errors, while a successful empty comment list remains a success. Status changes resolve against the issue's available transitions, and label add/remove use Jira's atomic operations so unrelated labels survive concurrent edits. Failed or uncertain writes never print success and are not retried automatically.

Why

A read-only CLI cannot complete a Jira task. This follows the established command registry and existing host-owned Jira methods, with optional verified-read and label-operation fields negotiated through jira.agent-access.v1. Older hosts receive update guidance before an agent reads or writes; older clients retain existing behavior. Separate credentials, transports, legacy link storage, and read-only aliases would add competing paths without completing the task.

Linked Issue

Fixes #11982.

Visual Proof

N/A — command-line commands and backend read/mutation handling; no renderer layout or visual interaction changed. A compiled-CLI demonstration over a temporary fixture socket verified reads, successful empty comments, multiline create/comment bodies, transitions, atomic label edits, and refusal of an older host before any Jira write. All demonstration data was synthetic; no real Jira account was contacted.

$ orca jira issue eng-1
ENG-1 Fixture login bug
URL: https://fixture.atlassian.net/browse/ENG-1
Status: Open (To Do)

$ orca jira label add ENG-1 --label bug --json
{"ok":true,"result":{"ok":true,"key":"ENG-1","siteId":"fixture-site"}}

# An older host refuses the command before sending a Jira mutation:
{"ok":false,"error":{"code":"incompatible_runtime"}}

Testing

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below

Reproduced the missing command surface against the starting main commit. On macOS, focused CLI/RPC/backend tests and adjacent command-registry, vocabulary, startup-name, Linear, Jira-query, skill, and guide suites passed. The final guide/read/CLI check ran 116 tests; a follow-up manifest extraction passed direct lint, the CLI typecheck and 44 routing/Jira tests; the preceding focused check ran 111 tests. Coverage includes wrong-site URLs, ambiguous keys, old-host write refusal, genuine empty reads, real read errors, mutation rejections, transition ambiguity, uncertain-write handling, and atomic label edits for Cloud and Server/DC.

pnpm tc:cli, the CLI compiler/bin verification, changed-code quality gate, bundled-guide/skill-manifest/RPC-catalog verification, and git diff --check passed. The reviewed merged head d60f71e072f also passed node and CLI product typechecks after incorporating current main. The prior clock issue is resolved on main; #28593 was closed as redundant. CI must cover the full build and native platforms. Live Jira credentials, Linux, Windows, and a real SSH host were not exercised; remote command routing and Server/DC request shapes are covered by fixtures.

Review

Adapted the full command surface, formatting and guide from #11986 by Dan Cieslak (@dcieslak19973), with exact-site selection and honest saved-connection reporting informed by #26055 by kokbee (@kokbee). Both authors are credited in commit trailers. These source PRs are alternatives; this PR implements a single complete surface instead of landing both unchanged.

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Merge risk: Medium. This is a complete new command family, plus small optional backend changes required to avoid misleading reads and unsafe label replacement. Old-client defaults are preserved and new semantics require a capability check. Creation/comments are intentionally not retried after uncertainty. The Cloud-filter and transition-field PRs touch nearby query/schema methods and require integration review; preserve their newer query ownership and optional transition fields when resolving overlap.

Credentials and Jira requests stay on the selected execution host. Commands use no shell commands or platform-specific paths, work independently of git/folder workspace state, and add no mobile/UI requirement or new stream opcode. No original PR was merged, closed, or modified.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred) — focused validation above passed; full CI/native build remain.

Adapt the full command surface and guide from #11986 and exact-site selection and saved connection reporting from #26055. Keep agent reads truthful and label deltas atomic.

Co-authored-by: Dan Cieslak <dcieslak19973@users.noreply.github.com>

Co-authored-by: kokbee <kok2209@gmail.com>
@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 2 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a372b39e-cbbf-4f98-bd94-63603c44c142
📥 Commits

Reviewing files that changed from the base of the PR and between fe4fcf1 and d60f71e.

📒 Files selected for processing: 4
  • skill-guides/orca-jira.md
  • src/cli/bundled-skill-guides.ts
  • src/cli/handlers/jira-write.ts
  • src/cli/index-jira.test.ts
📝 Walkthrough

The pull request adds a Jira CLI surface for issue reads, searches, metadata discovery, creation, comments, status changes, and field and label updates. It adds strict site and read-error handling across Jira runtime and RPC calls, plus atomic label add/remove operations. It also adds Jira skill guides, registers them as bundled guides, and adds shared command-body input handling used by Jira and Linear.

Priority: ➖ Normal

Severity of issue fixed: Medium

Merge Risk: 🟡 Moderate · up to fe4fc

Clarify authorization before agents create follow-up issues, and correct the completion workflow before merging. The transition-flag message is a smaller usability fix.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 9.76% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 41 functions across 34 files. (7 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the primary change: adding safe Jira ticket read and update capabilities for agents.
Description check Passed The description covers the required sections, explains the user-facing changes and rationale, links issue #11982, documents testing and limitations, and addresses security and compatibility considerat…
Linked Issues check Passed Active direct issue #11982 requires a Jira CLI over existing RPC methods, commands for issue reads/search, creation, comments, transitions, assignees, priorities, labels, and project metadata, human-r…
Out of Scope Changes check Passed The changes stay within #11982. The shared body-input helper and Linear delegation support the required multiline Jira and existing Linear body behavior. Strict Jira read handling, exact site selectio…
Full details: Docstring Coverage

Explanation

Docstring coverage is 9.76% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 41 functions across 34 files. (7 skipped: 7 unsupported.)

✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6dda33fc-3785-42da-a7d1-a24b3c758f01
📥 Commits

Reviewing files that changed from the base of the PR and between 9c0420f and fe4fcf1.

📒 Files selected for processing: 41
  • config/scripts/generate-bundled-skill-guides.mjs
  • resources/skills/current-manifest.json
  • skill-guides/jira-tickets.md
  • skill-guides/orca-jira.md
  • skill-stubs/jira-tickets.md
  • skill-stubs/orca-jira.md
  • skills/jira-tickets/SKILL.md
  • skills/orca-jira/SKILL.md
  • src/cli/args.ts
  • src/cli/bundled-skill-guides.ts
  • src/cli/command-body-input.ts
  • src/cli/handler-group-manifest.ts
  • src/cli/handlers/jira-write.ts
  • src/cli/handlers/jira.ts
  • src/cli/index-jira.test.ts
  • src/cli/jira-command-surface.test.ts
  • src/cli/jira-format.ts
  • src/cli/jira-handler-group.ts
  • src/cli/jira-target.ts
  • src/cli/linear-request-builders.ts
  • src/cli/reference-handler-group.ts
  • src/cli/specs/index.ts
  • src/cli/specs/jira.ts
  • src/main/jira/jira-agent-read.test.ts
  • src/main/jira/jira-issue-comments.ts
  • src/main/jira/jira-issue-create-metadata.ts
  • src/main/jira/jira-issue-mutations.test.ts
  • src/main/jira/jira-issue-mutations.ts
  • src/main/jira/jira-issue-read.ts
  • src/main/jira/jira-issue-search.ts
  • src/main/jira/jira-project-queries.ts
  • src/main/jira/jira-read-failure.ts
  • src/main/jira/jira-transition-queries.ts
  • src/main/runtime/rpc/methods/jira.test.ts
  • src/main/runtime/rpc/methods/jira.ts
  • src/main/runtime/runtime-jira-commands.ts
  • src/main/startup/cli-command-names.ts
  • src/shared/jira-agent-capability.ts
  • src/shared/jira-types.ts
  • src/shared/protocol-version.ts
  • src/shared/rpc-contract/jira-params.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.

Comment thread skill-guides/orca-jira.md Resolved
Comment thread skill-guides/orca-jira.md Resolved
Comment thread src/cli/handlers/jira-write.ts Resolved
@nwparker
nwparker merged commit 7ac2dcc into main Oct 14, 2026
23 checks passed
nwparker added a commit that referenced this pull request Oct 14, 2026
## ELI5

Keep the test suite working with the Jira features that have just landed. There is no visible app change.

## What Changed

The host-picker test now expects the host-qualified selection the parent already accepts. The startup fixture provides Electron's protocol handler and verifies that ready installs the Jira image scheme. Jira edit tests use exported wrappers with module-local setters that are cleared on unmount, preserving the issue/source switch tests without the banned mutable function export.

The WSL storage inventory classifies Jira list columns, linked-view choice and prompt templates as device preferences, matching their keys and the existing Linear policy. Skill-guide tests check the actual generated discovery projection rather than assuming it is shorter than every full guide or uses one fixed phrase. The cache test follows the headless workflow's deliberate removal of its push trigger; cache-warmer checks remain intact.

## Why

Final CI found six stale integration assumptions after the Jira batch. Updating the fixtures and inventory preserves the landed behavior and the underlying checks. Changing production code, padding the Jira guide, or restoring an intentionally removed workflow trigger would change the product to satisfy incorrect test assumptions.

## Linked Issue

Follow-up to #28622, #28631 and #28592. The existing headless trigger policy was introduced in #28664.

## Visual Proof

N/A — tests, test fixtures and storage inventory declarations only; no visual or interaction change.

## Testing

- [x] Automated tests updated.
- [x] 196 focused tests across nine files pass on macOS, covering every failed shard assertion, fixture consumers and the headless workflow policy.
- [x] Node and web typechecks pass; all seven changed-code quality stages, formatting and diff checks pass.
- Reproduced five failing assertions in startup/export/storage tests and the skill projection failure before the repairs. The host-picker owner also reproduced the stale selection failure before correcting it.
- Final full CI will run on this PR. The prior Ubuntu 22.04 persistence job crashed in the native watcher build before persistence tests ran; this change does not claim a Linux release, live Jira or real SSH pass.

## Review

Independent source review found no issues; all six reviewed file hashes and the complete diff match committed head `aa703eb50147ba95646cb82f10b6d86b4f890fc4`. Risk: low. No authentication, network, protocol implementation, workflow, renderer behavior, remote messages or migration rewrite logic changes.

## Agent skill upstream boundary

- [x] Not applicable; no upstream skill-installer source or artifacts copied.

## Notes

The three storage keys contain device-level preferences, without workspace paths or identifiers. Tests preserve host disambiguation and issue/source switching. Platform, SSH and provider behavior remains in the existing implementations.

## Checklist

- [x] Small and focused.
- [x] Explained the before/after, mechanism and choice of approach.
- [x] Visual proof marked N/A with a reason.
- [x] Self-reviewed for correctness and cleanup.
- [x] Cross-platform and SSH impact considered.
- [x] Focused tests, types, formatting and quality checks pass; full CI covers the broader build.
@kokbee

kokbee commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Thanks for your work on this 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Jira has no CLI surface — agents can't read or write Jira issues

2 participants