M1: Jira fetch (REST) + JiraContext artifact #11
Loading…
Reference in a new issue
No description provided.
Delete branch "issue-2/jira-fetch-rest"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
M1 — Jira fetch (REST) + prompt input (closes #2). Turns a Jira issue key into a validated
JiraContextartifact (jira-context.json) using plain, deterministic, unit-tested orchestrator code — no pi session.Changes
src/jira—JiraClientseam +JiraRestClient(Jira Cloud REST API v3, Basic auth via email + API token, injectedfetch/clock).flattenAdf).JiraContextnormalization (normalizeIssue): summary, description, acceptance criteria, labels, components, issue type, parent key, linked keys, url. Comments/attachments excluded (v1).JiraErrorclassification (kind/retriable/status) + HTTP-status mapper.fetchJiraContextorchestrator with fail-fastJiraConfigErroron missing creds.src/shared/retry— genericwithRetry(bounded attempts, exponential backoff, injectable sleep +isRetriable).src/artifacts—writeJiraContext/readJiraContext/validateJiraContextforjira-context.json(schema per DESIGN.md §3.4).src/config— addedJIRA_ACCEPTANCE_CRITERIA_FIELD_ID(Jira has no standard AC field; configurable custom field id), with masking coverage.Error mapping (per policy)
401/403→ auth (fail-fast, not retried)404→ not-found (fail-fast, not retried)429/5xx→ transient (retried with backoff)Testing
tsc --noEmitcleaneslint .cleanprettier --check .cleanChecklist
Notes
fetchJiraContextorchestrator beyond the literal task list to make the milestone usable end-to-end; still deterministic + tested.error.jsonwriting and CLI wiring are cross-cutting and deferred to M8;JiraErroralready carrieskind/retriable/status.