Help us improve
Share bugs, ideas, or general feedback.
From draft
Routes to Jira preview (default), create, or review subcommands. Generates structured issue exports or creates issues via MCP.
npx claudepluginhub mayurpise/draft --plugin draftHow this skill is triggered — by the user, by Claude, or both
Slash command
/draft:jiraThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Single entry point for all Jira workflows: preview Draft tracks as Jira issues, create them via MCP (default = 1 Story per track; --epic = 1 Epic + 1-3 Stories), and review any Jira ticket (epic, story, bug, sub-task) end-to-end.
Fetches JIRA issues by key or search, distills into structured tasks, analyzes codebase for gaps and risks, optionally enriches JIRA or spawns subtasks. Use before coding workflows.
Triages bug reports and error messages by searching Jira for duplicates, checking fix history, and creating structured issues or adding comments.
Mandates invoking relevant skills via tools before any response in coding sessions. Covers access, priorities, and adaptations for Claude Code, Copilot CLI, Gemini CLI.
Share bugs, ideas, or general feedback.
Single entry point for all Jira workflows: preview Draft tracks as Jira issues, create them via MCP (default = 1 Story per track; --epic = 1 Epic + 1-3 Stories), and review any Jira ticket (epic, story, bug, sub-task) end-to-end.
Parse $ARGUMENTS and dispatch:
| User Intent | Subcommand | Behavior |
|---|---|---|
(no args), preview, preview <track-id> | preview (default) | Generate jira-export-<timestamp>.md — one Story containing all phases/tasks |
preview --epic ... | preview --epic | Generate rich export: 1 Epic + 1–3 Stories (max) |
create, create <track-id> | create | Create 1 Story (default) via MCP |
review <JIRA_ID> | review | Full qualification review of any Jira ticket — delegates to review.md |
preview is the default when no subcommand is supplied.review requires a Jira ID as the next argument. Validate format <PROJECT>-<NUMBER> (e.g., ENG-446236). If numeric-only, prompt for project prefix — do NOT assume.All subcommands read project-level Jira configuration from draft/workflow.md under a ## Jira section:
## Jira
Project Key: <KEY>
Integration: jira-mcp
Team: <team-name>
Component: <component-name>
Swimlane: <swimlane-name>
Assignee Display Name: <assignee-name>
create. If missing, prompt and persist.jira-mcp if absent.create. Empty values are skipped (Jira ignores blank fields).If a value is missing when needed:
## Jira section in draft/workflow.md so subsequent runs reuse it.When writing any text that will go into Jira (descriptions, summaries, bug details):
This rule applies to both preview generation and create descriptions.
Generate a timestamped jira-export-<timestamp>.md (with jira-export-latest.md symlink) from the active track's plan for review and editing before creating Jira issues.
Flag handling: Check $ARGUMENTS for --epic at the very start of this section. If present, set EPIC_MODE=true and remove the flag from the working arguments. This flag changes the entire output structure (see Step 2).
Plan first, then preview. Accuracy over speed.
The generated jira-export-<timestamp>.md MUST include the standard YAML frontmatter for traceability and sync verification.
basename "$(pwd)" # Project name
git branch --show-current # Local branch
git rev-parse --abbrev-ref --symbolic-full-name @{upstream} 2>/dev/null || echo "none"
git rev-parse HEAD # Full SHA
git rev-parse --short HEAD # Short SHA
git log -1 --format="%ci" # Commit date
git log -1 --format="%s" # Commit subject
git status --porcelain | head -1 # Dirty check
---
project: "{PROJECT_NAME}"
module: "root"
track_id: "{TRACK_ID}"
generated_by: "draft:jira:preview"
generated_at: "{ISO_TIMESTAMP}"
git:
branch: "{LOCAL_BRANCH}"
remote: "{REMOTE/BRANCH or 'none'}"
commit: "{FULL_SHA}"
commit_short: "{SHORT_SHA}"
commit_date: "{COMMIT_DATE}"
commit_message: "{FIRST_LINE_OF_COMMIT_MESSAGE}"
dirty: {true|false}
synced_to_commit: "{FULL_SHA}"
---
This keeps Jira clean and keeps the export focused on root issues by default.
--epic)Use /draft:jira preview --epic or /draft:jira create --epic when you want an Epic.
Splitting rule (simple):
All detailed tasks remain inside the Story descriptions — we never create Jira Tasks or Sub-tasks.
| Flag | Root Issue | Child Issues | Where phases/tasks live |
|---|---|---|---|
| (default) | 1 Story | None | Inside the single Story description |
--epic | 1 Epic | 1–3 Stories (max) | Distributed across the Story descriptions |
draft/tracks.md (look for [~] In Progress or first [ ]). If a track ID is provided in $ARGUMENTS, use that instead.plan.md for phases and tasks.metadata.json for title and type.spec.md for root-issue description.draft/tracks/<id>/review-report-latest.md — review findings (from /draft:review)draft/tracks/<id>/bughunt-report-latest.md — defect findingsdraft/workflow.md → ## Jira section for shared config (see Jira Configuration above).If no track found: tell the user "No track found. Run /draft:new-track to create one, or specify track ID."
EPIC_MODE=true (from --epic flag), use Epic + Stories mode.Count the number of ## Phase sections in plan.md.
Splitting guideline (when using --epic):
Store the target number of stories: TARGET_STORIES.
Divide the phases as evenly as possible across TARGET_STORIES.
Example grouping (store this in memory):
In default mode, ignore grouping — everything goes under one Story.
For every phase:
Calculate total story points using the existing simple table (1-2 tasks = 1pt, 3-4=2pt, 5-6=3pt, 7+=5pt). This total goes on the root issue (or split across stories in epic mode if desired — default is to put total on the first Story).
spec.md (first 2-3 paragraphs) + later the full structured planIf review-report-latest.md or bughunt-report-latest.md exists in the track directory:
bughunt-report-latest.mdreview-report-latest.mdCritical/High findings should be highlighted — consider suggesting additional stories or tasks to address them before the track is complete.
TIMESTAMP=$(date +%Y-%m-%dT%H%M)
EXPORT_FILE="draft/tracks/<track_id>/jira-export-${TIMESTAMP}.md"
SYMLINK="draft/tracks/<track_id>/jira-export-latest.md"
Create the file and the latest symlink.
Use the standard YAML frontmatter.
Add a mode: default or mode: epic field.
Write a clean summary table.
Jira Content Rule: Keep the description minimal and focused. Use short paragraphs. Do not dump full plans or verbose reasoning. Structured phases/tasks must be compact.
Always start with:
## Root Issue
**Summary:** [Track Title]
**Issue Type:** Story # or Epic when --epic
**Labels:** draft
**Description:**
{noformat}
[First 2-3 paragraphs from spec.md]
## Plan
Then render the plan content concisely:
### Phase X: Name headings, with Goal, Verification, and a compact task checklist under each.Include the Draft signature at the bottom of the description.
Jira Content Rule: Keep every Story description short and scannable. Use compact headings and minimal text.
If mode: epic:
## Story N: [Short Title] blocks (using the grouping decided in Step 2).### Phase ... + compact task checklists.Use the existing high-quality bug export format from bughunt-report-latest.md.
These will become real Bug issues linked to the root (Epic or the main Story).
Add at the top:
Default = 1 Story. Use
--epicfor 1 Epic + 1-3 Stories.
Update the symlink.
Jira Preview Generated
Track: [track_id] - [title]
Mapping: [story-rooted | epic-rooted] (phases: N)
Export: draft/tracks/<id>/jira-export-<timestamp>.md
Symlink: draft/tracks/<id>/jira-export-latest.md
Summary:
- 1 root issue ({Story | Epic})
- N mid-level issues ({Tasks | Stories})
- M leaf issues (Sub-tasks)
- P total story points
- B bugs (from bughunt-report-latest.md)
Breakdown:
- Phase 1: [name] - X pts, Y tasks
- Phase 2: [name] - X pts, Y tasks
- ...
Bugs (if bughunt-report-latest.md exists):
- X critical bugs
- Y high bugs
- Z medium/low bugs
Next steps:
1. Review and edit the export via jira-export-latest.md (adjust points, descriptions, leaf issues, bug priorities)
2. Run `/draft:jira create` to create issues in Jira
plan.md has no phases:
/draft:new-track to generate a proper plan."spec.md missing:
plan.md overview for root-issue description.jira-export-latest.md already exists:
Phase has no tasks:
Create Jira issues from jira-export-latest.md using MCP-Jira. If no export file exists, auto-generates one first by running the preview subcommand.
jira-export-latest.md first (run /draft:jira preview)Preview before you create. Never create duplicates.
Default = 1 Story only. Use --epic when you want an Epic + 1–3 Stories. We never create Jira Tasks or Sub-tasks.
draft/tracks.md. If a track ID is provided in $ARGUMENTS, use that.draft/tracks/<track_id>/jira-export-latest.md.If no track found: tell user "No track found. Run /draft:new-track to create one, or specify track ID."
If jira-export-latest.md exists: read and parse it (follow the symlink to the timestamped file). Proceed to Step 3.
If missing: inform user "No jira-export-latest.md found. Generating preview first..." then execute the preview subcommand. Proceed to Step 3.
Detect MCP-Jira tools. Known tool name variants: mcp_jira_create_issue, jira_createIssue, create_jira_issue, jira-create-issue. Use whichever is available.
If unavailable:
MCP-Jira not configured.
To create issues:
1. Configure MCP-Jira server in your settings
2. Run `/draft:jira create` again
Or manually import from:
draft/tracks/<id>/jira-export-latest.md
Stop execution.
Read the mode field from frontmatter:
default → expect 1 root Storyepic → expect 1 Epic + 1–3 Stories## Root Issue (and any ## Story N: sections if mode=epic).Parse the ## Bug Issues section completely (same as before). These are always created as separate Bug issues.
Important: There are no longer "Mid-Level" or "Leaf Issues" tables that become separate Jira Tasks/Sub-tasks. All work items live inside the Story description(s).
Read draft/workflow.md → ## Jira section. Required fields and behavior:
| Field | Required? | Behavior if missing |
|---|---|---|
| Project Key | Yes | Prompt user; append to ## Jira section |
| Integration | No | Defaults to jira-mcp |
| Team | No | Skip — not applied to issues |
| Component | No | Skip |
| Swimlane | No | Skip |
| Assignee Display Name | No | Skip |
When prompting for a missing field, append to draft/workflow.md:
## Jira
Project Key: <KEY>
Integration: jira-mcp
Team: <team-name>
Component: <component-name>
Swimlane: <swimlane-name>
Assignee Display Name: <assignee-name>
Before creating issues, attempt to fetch project metadata via MCP to verify the project key exists:
MCP call: get_project (or equivalent)
- project: [project key]
If invalid: "Jira project '[KEY]' not found. Verify the project key and try again." Stop execution.
If Assignee Display Name is provided, resolve to an account ID via MCP user search (e.g., find_users(query=<display_name>)). Cache the resolved ID for the session. If resolution fails, warn and create issues unassigned rather than failing.
Pin the symlink target: At the start of this step, resolve the symlink to its actual timestamped file path (e.g., via readlink -f jira-export-latest.md). Use the resolved path for all subsequent writes to prevent data loss if the symlink is updated mid-run.
Incremental persistence: After creating each issue, immediately update the corresponding entry in the export file with the Jira key. This ensures re-runs can skip already-created items even if the process fails mid-way.
Note: Some Jira configurations do not allow setting status during creation. If status setting fails, create in default status and log a warning.
Apply these to every create_issue call (omit any that resolved to empty in Step 4b):
- project: [Project Key]
- labels: ["draft"]
- component: [Component if set]
- assignee: [Resolved account ID if set]
- custom_field_swimlane: [Swimlane if set] # field ID is Jira-config specific
- custom_field_team: [Team if set] # field ID is Jira-config specific
Swimlane and Team are often custom fields. If your Jira project uses different field IDs, configure your MCP server's field mapping. Unknown fields will be rejected — log the rejection and continue without them.
For each Story/Epic: Jira Content Rule (strict): The description sent to Jira must be concise. Use short summaries and compact structured sections only. Do not include long reasoning or exhaustive lists.
MCP call: create_issue
- issue_type: Story or Epic
- summary: ...
- description: [concise content — phases as compact sections, tasks as short checklists]
+ shared field defaults
Capture the keys.
For every bug parsed in Step 4, create a real Bug issue:
MCP call: create_issue
- issue_type: Bug
- summary: ...
- description: [full bughunt evidence]
- parent / epic_link: [link to the root Story or Epic]
- priority: [from severity]
+ shared field defaults
Detailed work lives inside the root issue description(s) by default. All detailed work lives inside the Story descriptions.
Export file has already been updated incrementally during Step 5. Now update plan.md with the Jira keys:
## Phase 1: Setup [PROJ-124]
...
- [x] **Task 1.1:** Extract logging utilities [PROJ-125]
- [x] **Task 1.2:** Extract security utilities [PROJ-126]
Set export file status to Created (via jira-export-latest.md):
**Status:** Created
**Root Key:** PROJ-123
Jira Issues Created
Track: [track_id] - [title]
Project: [PROJ]
Mode: {default → 1 Story | --epic → 1 Epic + 1-3 Stories}
Created:
- {Story | Epic}: PROJ-123 - [Track title]
(All phases and tasks are inside the Story description)
Bugs (from Bug Hunt) — always created as separate issues:
- Bug: PROJ-131 - [Critical] Correctness: Off-by-one error in pagination (linked to PROJ-123)
- Bug: PROJ-132 - [High] ...
Total: 1 root issue + B bugs
Label: "draft" applied to all issues
Updated:
- plan.md (added root Jira key)
- jira-export-latest.md (marked as created)
MCP call fails:
Failed to create [issue type]: [error message]
Partial creation:
- {Story | Epic}: PROJ-123 (created)
- Mid-level 1: PROJ-124 (created)
- Leaf 1.1: PROJ-125 (created)
- Leaf 1.2: FAILED - [error]
- Mid-level 2: (skipped)
Fix the issue and run `/draft:jira create` again.
Already-created issues will be detected by keys in jira-export-latest.md.
Export has existing keys: skip items that already have keys; only create items without keys. Report "Skipped Mid-level 1 (already exists: PROJ-124)". Still create leaves if mid-level exists but leaves don't have keys.
Project not configured: see Step 4b.
plan.md phases don't match export: warn "Export has N mid-level issues but plan has M phases. Proceeding with export structure." Create based on export.
See review.md for the full epic/story/bug/sub-task qualification pipeline. The router delegates to that file when the user invokes /draft:jira review <JIRA_ID>.
The review subcommand:
draft/jira-review/<JIRA_ID>/qualification-report.md and (if gaps exist) remediation-plan.md.