Repository navigation
Description
Motivation
An upcoming project will track its work in Jira. Codev's forge concept layer (spec 589) has no Jira provider today, so issue-driven protocols (BUGFIX, AIR, PIR spawns keyed to issue ids, porch issue lookups, dashboard/VS Code issue surfaces) cannot run against a Jira-tracked project without hand-rolled per-concept overrides in every repo.
Precedent: Linear, the hybrid-forge template (spec 719)
Jira should follow the Linear shape exactly: a hybrid provider that owns issues while every PR concept falls through to the github default (Linear's preset comment is explicit that even pr-create falls through, so the provider is never in the odd position of merging PRs it cannot open). Linear implements: auth-status, issue-comment, issue-list, issue-search, issue-view, recently-closed, user-identity (packages/codev/scripts/forge/linear/).
Proposed work
- Preset scripts at
packages/codev/scripts/forge/jira/mirroring the Linear concept set, wrapping a Jira CLI or the Jira REST API, and emitting the JSON shapes inforge-contracts.ts(note the presets file warns non-GitHub schemas are best-effort; consumers already tolerate null on parse failure, but new scripts should aim for contract conformance). - Register the preset in
getProviderPresets()(packages/codev/src/lib/forge.ts), PR concepts falling through to github like Linear. - Auth story: decide the credential source (Jira API token / PAT via env, or the CLI's own auth) and implement
auth-statussocodev doctorcan report it honestly. - Non-numeric issue ids end-to-end: Jira ids are
KEY-123, not bare numbers. Validate the full path:afx spawn <id>, branch naming (builder/bugfix-<id>), commit-message conventions, porch state keyed by id, and the VS Code open-issue-by-id command (which already anticipates non-numeric identifiers). The Linear lane is the template for what needed touching. - Docs: provider selection via
.codev/config.jsonforge.provider, concept override examples. Skeleton user-facing docs keep hardcodingghper the existing convention; the forge abstraction stays internal.
Open questions for scoping
- Which Jira CLI to wrap, if any, versus direct REST calls with
curl+jq(zero-dependency, matches the shell-script preset style). - Mapping of concept semantics: Jira "resolved/done" statuses for
recently-closed; JQL forissue-searchandissue-list; comment body format (Jira wiki markup vs ADF) forissue-comment. - Whether auto-close-on-merge conventions (
Fix <id>subjects) have a Jira equivalent (smart commits) and whether protocols should use or avoid them.
Interim workaround
Until the preset ships, a project can wire Jira today with per-concept overrides in .codev/config.json (forge section): override the issue concepts with Jira commands and leave PR concepts on the github default. The preset turns that boilerplate into "provider": "jira".
Activity
amrmelsayed commentedon Oct 11, 2026
Architect ruling (2026-10-12): protocol + scoping decisions
Protocol: PIR. The hybrid-provider pattern is settled by spec 719 (Linear), so no spec is needed, but the Jira-specific mapping choices below deserve a reviewed plan before coding.
Owner decisions (fixed constraints for the plan):
acli. The preset wrapsacli jira workitem ...andacli jira auth ...the way the github preset wrapsgh. No direct REST calls; no third-party CLI. Each script declares# forge-executable: acli. Verify the installed CLI's exact subcommands and flags withacli jira --helpbefore coding (the official reference is developer.atlassian.com/cloud/acli/reference/commands/); do not code against third-party skill pages.acli jira auth loginonce (browser OAuth or API token); the CLI owns the credential.auth-statusis a single authenticated call through acli and is whatcodev doctorreports. Codev never reads, stores, or passes a Jira token. Note the known upstream bug where token login fails for service accounts (CLOUD-12991): document that a standard user account is required.auth-status,issue-comment,issue-list,issue-search,issue-view,recently-closed,user-identity); every PR concept falls through to the github default, includingpr-create. Register ingetProviderPresets()(packages/codev/src/lib/forge.ts) alongsidelinear. The sameforge.<key>config toCODEV_<KEY>env plumbing carries the Jira site and project key.recently-closedmatches on status category Done, never on status names (names are per-tenant).issue-listdefaults to open items in that project.Fix KEY-123auto-transitions; closing an issue on merge stays the architect's job, as everywhere else in Codev.KEY-123) must flow end to end:afx spawn <id>, branch naming, porch state keyed by id, commit-message conventions, and the VS Code open-issue-by-id command. The Linear lane (spec 719) is the template for what needed touching; re-verify each site rather than assuming it still holds..codev/config.jsonforge.provider: "jira", prerequisites (acli install + login), and the Cloud-only scope. Skeleton user-facing docs keep hardcodingghfor PR work per the existing convention.Verification at the dev gate: exercise the real path against a live Jira Cloud site:
codev doctorauth report,afx spawn --protocol bugfix <KEY-N>resolving the issue,issue-commentlanding on the work item,recently-closedreturning only Done-category items.amrmelsayed commentedon Oct 11, 2026
On it! Working on this with the PIR protocol (plan + dev-approval gates before PR).
[PIR #1740] Plan draft
[PIR #1740] Plan revised: live acli findings
[PIR #1740] Plan revised: contain side effects on other forges
[PIR #1740] Plan revised: gate VS Code key ids on a Tower-reported is…
[PIR #1740] Plan draft
[PIR #1740] Plan revised: live acli findings
[PIR #1740] Plan revised: contain side effects on other forges
[PIR #1740] Plan revised: gate VS Code key ids on a Tower-reported is…
[PIR #1740] Add the jira forge preset (acli, hybrid) and the provider…
[PIR #1740] codev doctor: report tracker and gh logins for hybrid pro…
[PIR #1740] Carry tracker-key issue ids end to end (spawn, overview, …
[PIR #1740] VS Code: accept tracker-key issue ids where Tower reports…
7 remaining items
[PIR #1740] Make issue createdAt optional end to end; no NaN age, und…
[PIR #1740] Canonicalize a stored lower-case issue key in the overview
[PIR #1740] VS Code: search rows and recently closed label keys via i…
[PIR #1740] Link numeric [PIR #N] tags like Spec and Bugfix tags
[PIR #1740] Pin the issue-key grammar's homes with a parity test
[PIR #1740] jira recently-closed: validate the since date; document t…
[PIR #1740] Review: integration round 1, consultation dispositions, P…
[PIR #1740] Consultation iteration 1 rebuttals
[PIR #1740] Never generate a key-shaped short id; collision tests for…
[PIR #1740] Overview: read the builders table once for discovery and …
[PIR #1740] Forge-neutral spawn wording; pin the porch-id prefix narr…
[PIR #1740] Review: integration round 2, short-id residual, published…
docs(changelog): #1740 Jira provider and tracker-key issue ids (PR #1848
[Bugfix #1844] Fix: derive fallback builder role ids through buildAge…