Skip to content
Development
Command

/jira-status

Check JIRA sync status for SpecWeave increment

From plugin
specweave
15673 skills20 agents73 commands
Install
> /plugin marketplace add anton-abyzov/specweave
> /plugin install sw@specweave

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/jira-status

Context preview

What this command does when you run it.

Check JIRA sync status for SpecWeave increment

Command definition

jira-status.md
description: Check JIRA sync status for SpecWeave increment

JIRA Status Command

**Usage**: `sw-jira:status <increment-id>`

**Purpose**: Display JIRA sync status and issue details for an increment

---

Command Behavior

When user runs this command, Claude should:

1. Read Increment Metadata

// Load increment metadata
const metadataPath = `.specweave/increments/${incrementId}/metadata.json`;
const metadata = JSON.parse(await fs.readFile(metadataPath, 'utf-8'));

// Check for linked JIRA issue (check both standard and legacy paths)
const jiraSync = metadata?.external_sync?.jira || metadata?.external_ids?.jira;
const issueKey = jiraSync?.issueKey || jiraSync?.epic;

if (!issueKey) {
  console.log(`
⚠️ No JIRA issue linked

This increment is not linked to a JIRA issue.
Create one with: sw-jira:create ${incrementId}
`);
  return;
}

2. Resolve JIRA Profile

// Priority: increment profile > global defaultProfile > activeProfile
let profileName = jiraSync?.profile;
if (!profileName) {
  const config = JSON.parse(await fs.readFile('.specweave/config.json', 'utf-8'));
  profileName = config?.sync?.defaultProfile ?? config?.sync?.activeProfile;
}

const profileConfig = config?.sync?.profiles?.[profileName];
const { domain, projectKey } = profileConfig?.config || {};

3. Read Local Task Status

// Check tasks.md for completion
const tasksPath = `.specweave/increments/${incrementId}/tasks.md`;
const tasksContent = await fs.readFile(tasksPath, 'utf-8');

const totalTasks = (tasksContent.match(/### T-\d+/g) || []).length;
const completedTasks = (tasksContent.match(/\[x\] completed/gi) || []).length;
const completion = totalTasks > 0 ? Math.round((completedTasks / totalTasks) * 100) : 0;

4. Invoke JIRA Manager Skill (Optional - For Live Status)

Use Skill tool: Skill({ skill: "sw-jira:jira-sync", args: "Check JIRA sync status for increment {increment-id}.

Issue Key: {issueKey}
Profile: {profileName} (domain: {domain})

Steps:
1. GET issue from JIRA API: /rest/api/3/issue/{issueKey}
2. Extract: status, priority, assignee, sprint, story points
3. Compare local vs JIRA status
4. Detect any sync issues or drift
5. Display comprehensive status"

5. Display Status

JIRA Sync Status
================
Increment: {increment-id}
Issue: {issueKey}
URL: https://{domain}/browse/{issueKey}
Status: {jiraStatus}
Completion: {completion}% ({completedTasks}/{totalTasks} tasks)
Last Synced: {lastSyncedAt} ({relativeTime})
Sync Enabled: ✅

Profile: {profileName}
  Domain: {domain}
  Project: {projectKey}

Next Sync: Automatic on task completion

---

Example Output

Issue Linked

User: sw-jira:status 0005-payment-integration

Claude:
JIRA Sync Status
================
Increment: 0005-payment-integration
Issue: MYPROJ-123
URL: https://company.atlassian.net/browse/MYPROJ-123
Status: In Progress
Completion: 60% (6/10 tasks)
Last Synced: 2025-12-07 10:30:00 (5 minutes ago)
Sync Enabled: ✅

Profile: jira-my-project
  Domain: company.atlassian.net
  Project: MYPROJ

Priority: High
Assignee: john.doe
Sprint: Sprint 42

Next Sync: Automatic on task completion

No Issue Linked

User: sw-jira:status 0005

Claude:
JIRA Sync Status
================
Increment: 0005-payment-integration

⚠️ No JIRA issue linked

This increment is not linked to a JIRA issue.
Create one with: sw-jira:create 0005-payment-integration

Sync Issues Detected

User: sw-jira:status 0005

Claude:
JIRA Sync Status
================
Increment: 0005-payment-integration
Issue: MYPROJ-123
URL: https://company.atlassian.net/browse/MYPROJ-123
Status: In Progress
Completion: 60% (6/10 tasks)
Last Synced: 2025-12-05 10:30:00 (2 days ago)
Sync Enabled: ✅

⚠️ Sync Issues Detected:
  - Local status: in_progress, JIRA status: Done
  - Status drift detected - run sw-jira:pull to sync

Profile: jira-my-project
  Domain: company.atlassian.net
  Project: MYPROJ

---

Status Information Displayed

| Field | Source | Description | |-------|--------|-------------| | Issue | metadata.json | JIRA issue key (e.g., PROJ-123) | | URL | Constructed | Direct link to JIRA issue | | Status | JIRA API | Current issue status | | Completion | tasks.md | Local completion percentage | | Last Synced | metadata.json | Timestamp of last sync | | Profile | metadata/config | Which JIRA profile is used | | Priority | JIRA API | Issue priority | | Assignee | JIRA API | Current assignee | | Sprint | JIRA API | Current sprint assignment |

---

Drift Detection

The status command detects common sync issues:

| Issue | Detection | Resolution | |-------|-----------|------------| | Status drift | Local vs JIRA status mismatch | `sw-jira:pull` | | Stale sync | Last synced > 24 hours ago | `sw-jira:sync` | | Missing issue | Issue deleted in JIRA | `sw-jira:create` | | Permission denied | canUpdateExternalItems=false | Read-only mode note |

---

Related

| Command | Purpose | |---------|---------| | `sw-jira:pull` | Pull changes from JIRA | | `sw-jira:push` | Push progress to JIRA | | `sw-jira:sync` | Two-way sync | | `sw-jira:create` | Create JIRA issue | | `sw-jira:close` | Close issue when complete |

Read more
Ships withspecweave

Spec-first AI development: describe a feature → AI creates spec + plan + tasks, builds autonomously, syncs to GitHub/JIRA. Domain-expert skills for PM, Architect, Frontend, QA learn your patterns permanently. Claude Code, Codex, Cursor, Copilot & more.

Get the whole plugin