From draft
Creates Jira epics, stories, and sub-tasks from jira-export-latest.md using MCP-Jira. Auto-generates export if missing. For converting drafts to tracked issues.
npx claudepluginhub mayurpise/draft --plugin draftThis skill uses the workspace's default tool permissions.
Create Jira epic, stories, and sub-tasks from `jira-export-latest.md` using MCP-Jira. If no export file exists, auto-generates one first.
Generates timestamped Markdown previews of Jira issues from track plans, mapping tracks to epics, phases to stories, tasks to sub-tasks, with git metadata for review before creation.
Fetches JIRA issue by key or search, distills title/description/acceptance criteria/comments into structured task, analyzes codebase for gaps/risks, optionally enriches JIRA.
Converts Confluence spec pages into Jira backlogs with Epics and linked tickets. Use for generating backlogs from specs, breaking down requirements, or creating issues from Confluence.
Share bugs, ideas, or general feedback.
Create Jira epic, stories, and sub-tasks from jira-export-latest.md using MCP-Jira. If no export file exists, auto-generates one first.
jira-export-latest.md first (run /draft:jira-preview)Preview before you create. Never create duplicates.
| Draft Concept | Jira Entity |
|---|---|
| Track | Epic |
| Phase | Story |
| Task | Sub-task (under story) |
git branch --show-current # Current branch name
git rev-parse --short HEAD # Current commit hash
draft/tracks.md (look for [~] In Progress or first [ ] track)draft/tracks/<track_id>/jira-export-latest.mdIf no track found:
/draft:new-track to create one, or specify track ID."If jira-export-latest.md exists:
If jira-export-latest.md missing:
/draft:jira-preview logic to generate itAttempt to detect MCP-Jira tools:
mcp_jira_create_issue, jira_createIssue, create_jira_issue, jira-create-issue. Use whichever is available.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
Extract from jira-export-latest.md:
**Summary:** line){noformat} block)For each ## Story N: section:
**Story Points:** line){noformat} block)For each row in ### Sub-tasks table:
If export contains ## Quality Reports section:
Read draft/workflow.md and look for a ## Jira section containing Project Key: <KEY>.
draft/workflow.md:
## Jira
Project Key: <KEY>
This persists the key for all future /draft:jira-create and /draft:jira-preview invocations.Before creating issues, attempt to fetch project metadata via MCP to verify the project key exists. Fail fast with a clear error if invalid:
MCP call: get_project (or equivalent)
- project: [project key]
If the project key is invalid or not found:
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 in this step 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 (via jira-export-latest.md symlink) 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.
MCP call: create_issue
- project: [from config or prompt]
- issue_type: Epic
- summary: [Epic summary]
- description: [Epic description — MUST include signature, see jira-sync.md]
- labels: ["draft"]
For each story in export:
MCP call: create_issue
- project: [same as epic]
- issue_type: Story
- summary: [Story summary]
- description: [Story description — MUST include signature, see jira-sync.md]
- story_points: [from export]
- epic_link: [Epic key from step 5a]
- labels: ["draft"]
For each sub-task under the story:
MCP call: create_issue
- project: [same as epic]
- issue_type: Sub-task
- parent: [Story key from step 5b]
- summary: [Task summary, e.g., "Task 1.1: Extract logging utilities"]
- status: [Map from export: To Do, In Progress, Done]
- labels: ["draft"]
For each bug in the ## Bug Issues section of jira-export-latest.md, create a separate Bug issue:
MCP call: create_issue
- project: [same as epic]
- issue_type: Bug
- summary: [Category] [Brief issue description]
- description: {noformat}
h3. Location
[file:line]
h3. Confidence
[CONFIRMED | HIGH | MEDIUM]
h3. Code Evidence
{code}
[The actual problematic code snippet from bughunt-report-latest.md]
{code}
h3. Data Flow Trace
[How data reaches this point: caller → caller → this function]
h3. Issue
[Full issue description]
h3. Impact
[User-visible or system failure mode]
h3. Verification Done
[Checklist of verification steps completed, e.g.:]
- Traced code path from entry point
- Checked .ai-context.md — not intentional
- Verified framework doesn't handle this
- No upstream guards found
h3. Why Not a False Positive
[Explicit reasoning from bughunt-report-latest.md]
h3. Fix
[Minimal code change or mitigation from report]
h3. Regression Test
[Test case from bughunt-report-latest.md, or "N/A" with reason]
---
🤖 Generated by Draft (Bug Hunt)
Branch: [branch-name] | Commit: [short-hash]
{noformat}
- epic_link: [Epic key from step 5a]
- priority: [Map from severity]
- labels: ["draft"]
Priority Mapping:
| Severity | Jira Priority |
|---|---|
| Critical | Highest |
| High | High |
| Medium | Medium |
| Low | Low |
All bugs from bughunt-report-latest.md get their own Bug issue. They are linked to the Epic but separate from Stories (phases). This keeps implementation work (Stories/Sub-tasks) distinct from defect tracking (Bugs).
The export file (via jira-export-latest.md) has already been updated incrementally during Step 5. Now update plan.md with the Jira keys:
Update plan.md: Add Jira keys to phase headers and tasks:
## 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 (in the timestamped file via jira-export-latest.md):
**Status:** Created
**Epic Key:** PROJ-123
Jira Issues Created
Track: [track_id] - [title]
Project: [PROJ]
Created:
- Epic: PROJ-123 - [Track title]
- Story: PROJ-124 - Phase 1: [name] (3 pts)
- Sub-task: PROJ-125 - Task 1.1
- Sub-task: PROJ-126 - Task 1.2
- Sub-task: PROJ-127 - Task 1.3
- Story: PROJ-128 - Phase 2: [name] (5 pts)
- Sub-task: PROJ-129 - Task 2.1
- Sub-task: PROJ-130 - Task 2.2
[...]
Bugs (from Bug Hunt):
- Bug: PROJ-131 - [Critical] Correctness: Off-by-one error in pagination
- Bug: PROJ-132 - [High] Concurrency: Race condition in cache update
- Bug: PROJ-133 - [Medium] Security: Missing input validation
Total: 1 epic, N stories, M sub-tasks, B bugs, P story points
Label: 'draft' applied to all issues
Updated:
- plan.md (added issue keys to phases and tasks)
- jira-export-latest.md (marked as created with keys)
If MCP call fails:
Failed to create [Epic/Story/Sub-task]: [error message]
Partial creation:
- Epic: PROJ-123 (created)
- Story 1: PROJ-124 (created)
- Sub-task 1.1: PROJ-125 (created)
- Sub-task 1.2: FAILED - [error]
- Story 2: (skipped)
Fix the issue and run `/draft:jira-create` again.
Already-created issues will be detected by keys in jira-export-latest.md.
If export has existing keys:
If project not configured:
## Jira section with Project Key: found in draft/workflow.mddraft/workflow.md under a ## Jira section as Project Key: <KEY>If plan.md phases don't match export:
If sub-task creation not supported: