Generate a Jira task from a debugging report with implementation guidance
Converts debugging reports into Jira tasks with implementation guidance, creating issues directly or generating markdown drafts.
/plugin marketplace add Cpicon/claude-code-plugins/plugin install agent-team-creator@cpicon-claude-plugins[debugging-report-path]Transform debugging reports into well-structured Jira tasks with implementation guidance.
This command follows a HYBRID architecture:
implementation-planner) and formatting (jira-writer)This separation avoids the known MCP access bug in plugin-defined agents (GitHub #13605, #15810).
/generate-debugger workflow saved to .claude/reports/debugging/Execute phases 0-6 in order. Track FALLBACK_MODE state throughout.
Purpose: Determine if Atlassian MCP is available and authenticated.
Check Atlassian plugin availability
Call mcp__plugin_atlassian_atlassian__getAccessibleAtlassianResources().
FALLBACK_MODE = trueVerify Atlassian authentication (only if plugin available)
Call mcp__plugin_atlassian_atlassian__atlassianUserInfo().
FALLBACK_MODE = trueclaude mcp auth --server atlassian to authenticate. Generating markdown draft instead."Communicate mode to user
FALLBACK_MODE = true: "Running in fallback mode - will generate markdown draft for manual Jira creation."FALLBACK_MODE = false: "Connected to Jira. Will create issue directly."FALLBACK_MODE Effects:
SKIP if FALLBACK_MODE = true. Proceed directly to Phase 2.
Purpose: Determine which Jira project to create the issue in.
Check for cached project configuration
Use Read tool to check if .claude/jira-project.json exists.
projectKey, projectName, cloudIdFirst-time setup (if no cache or cache invalid)
a. Get Atlassian cloud ID
getAccessibleAtlassianResources() (already called in Phase 0)cloudId from the responseb. Extract project name hint
c. Search for matching Jira projects
Call mcp__plugin_atlassian_atlassian__getVisibleJiraProjects:
cloudId: [extracted cloudId]
searchString: [project name hint]
maxResults: 10
d. Match and confirm with user
If exact match found (case-insensitive):
If multiple fuzzy matches:
If no matches found:
e. Cache the selected project
Write to .claude/jira-project.json:
{
"projectKey": "[selected key]",
"projectName": "[project name]",
"cloudId": "[cloud id]",
"configuredAt": "[current ISO timestamp]",
"configuredFrom": "[current working directory]"
}
Purpose: Load and validate the debugging report that will be transformed into a Jira task.
Determine report location
If argument provided (debugging-report-path):
If no argument:
.claude/reports/debugging/report-*.mdIf no reports found:
Read the debugging report
Use Read tool to load the report content.
Validate report format
Check for required sections (using flexible header matching for ## or ###):
Issue Summary or Reported Issue
Root Cause or Root Cause Analysis
Solutions or Recommended Fix
If any required section missing:
If user chooses to abort: End execution
Check report age (optional warning)
Extract timestamp from filename (format: report-YYYY-MM-DD-HHmm.md).
Store report content
Keep the full report text for use in Phase 4.
SKIP if FALLBACK_MODE = true. Proceed directly to Phase 4.
Purpose: Check if a similar Jira issue already exists to prevent duplicates.
Extract search keywords
From the debugging report, extract key terms:
Search for similar issues
Call mcp__plugin_atlassian_atlassian__searchJiraIssuesUsingJql:
cloudId: [cached from Phase 1]
jql: "project = [projectKey] AND text ~ '[keyword1] [keyword2] [keyword3]' AND status != Done ORDER BY created DESC"
maxResults: 5
fields: ["summary", "status", "created", "key"]
Evaluate search results
If no results: Continue to Phase 4
If results found:
Handle user choice
Purpose: Transform the debugging report into a structured implementation plan using an agent.
Invoke implementation-planner agent
Use the Task tool with:
subagent_type: "agent-team-creator:implementation-planner"prompt: The full debugging report content from Phase 2description: "Create implementation plan from debugging report"Wait for agent to complete and receive the implementation plan output.
Validate implementation-planner output
Check that the output contains required sections:
## Problem Summary - must exist
## Recommended Approach - must contain tier selection (Quick Fix, Proper Fix, or Comprehensive Fix)
## Implementation Steps - must have at least one step with **File**: or **File(s)**: reference
## Testing Requirements - must exist
## Risk Assessment - must exist
If validation fails:
If user aborts: End execution
Store implementation plan
Keep the full agent output for use in Phase 5.
Purpose: Format the debugging report and implementation plan into Jira-compatible content.
Prepare combined input for jira-writer
CRITICAL: Format the input exactly as follows (jira-writer expects these headers):
## Debugging Report
[Full debugging report content from Phase 2]
## Implementation Plan
[Full implementation plan from Phase 4]
Invoke jira-writer agent
Use the Task tool with:
subagent_type: "agent-team-creator:jira-writer"prompt: The combined input formatted abovedescription: "Format debugging report for Jira"Wait for agent to complete and receive the Jira-formatted output.
Determine issue type (COMMAND responsibility, not agent)
Scan the debugging report and implementation plan for keywords:
Bug indicators (high confidence):
Task indicators:
Decision logic:
issue_type = "Bug"issue_type = "Task"Generate and sanitize labels (COMMAND responsibility)
Extract label suggestions from:
Label categories:
component:frontend, component:api, component:databasepriority:high, priority:critical, priority:mediumtype:bugfix, type:security, type:performanceSanitization rules (apply to each label):
Validate jira-writer output
Check for required fields:
**Summary:** - must exist and be under 255 characters
**Description:** - must exist
**Acceptance Criteria:** - should have at least one criterion (warning if missing)
If critical fields missing (Summary or Description):
Parse jira-writer output
Extract fields using marker patterns:
| Marker | How to Extract | Target |
|---|---|---|
**Summary:** | Text after marker until newline, trimmed | summary |
**Description:** | All content from marker until next ** field marker or end | description |
**Labels:** | Parse as comma-separated list or bracketed array | labels array |
**Acceptance Criteria:** | Include in description | (part of description) |
Purpose: Create the Jira issue or generate markdown draft.
Create output directory
Ensure .claude/reports/jira-drafts/ directory exists.
Use Write tool to create a placeholder file if directory doesn't exist.
Generate draft filename
Format: draft-YYYY-MM-DD-HHmm.md
Example: draft-2026-01-04-1530.md
Write draft file
Content structure:
# Jira Task Draft
> Generated: [current timestamp]
> Mode: Fallback (Atlassian MCP unavailable)
> Issue Type: [Bug/Task]
---
[Full jira-writer output]
---
## Generated Labels
[label1, label2, label3]
---
## Manual Creation Instructions
1. Copy the Summary and Description above
2. Create a new issue in your Jira project
3. Set the issue type to: [Bug/Task]
4. Add the labels listed above
5. Review and adjust as needed
Notify user
Display:
Validate issue type exists in project
Call mcp__plugin_atlassian_atlassian__getJiraProjectIssueTypesMetadata:
cloudId: [cached]
projectIdOrKey: [cached projectKey]
Create the Jira issue
Call mcp__plugin_atlassian_atlassian__createJiraIssue:
cloudId: [cached]
projectKey: [cached]
issueTypeName: [validated issue type]
summary: [extracted from jira-writer output]
description: [extracted from jira-writer output - preserve markdown formatting]
additional_fields: {
labels: [sanitized labels array]
}
Handle success
https://[site].atlassian.net/browse/[issue-key]Successfully created Jira issue!
Issue: [ISSUE-KEY]
URL: [issue URL]
Type: [Bug/Task]
Summary: [summary]
Labels: [label1, label2, ...]
Handle errors
If createJiraIssue fails:
| Error Type | Recovery Action |
|---|---|
| 401/403 Unauthorized | "Authentication failed. Please run claude mcp auth --server atlassian" |
| 400 Field Validation | Show which field failed, offer to save as draft |
| 404 Project Not Found | Clear cache file, suggest re-running command |
| Network Error | Retry once, then fall back to markdown |
On any failure:
.claude/reports/jira-drafts/draft-[timestamp].md# Use most recent debugging report
/agent-team-creator:generate-jira-task
# Specify a particular report
/agent-team-creator:generate-jira-task .claude/reports/debugging/report-2026-01-03-1530.md
Normal mode: Jira issue key (e.g., PROJ-123) with URL
Fallback mode: Markdown draft file in .claude/reports/jira-drafts/