Skip to content

Instantly share code, notes, and snippets.

@DanielCardonaRojas
Last active October 22, 2025 01:27
Show Gist options
  • Save DanielCardonaRojas/eac03308527eed4d9f7782195db4729c to your computer and use it in GitHub Desktop.
Save DanielCardonaRojas/eac03308527eed4d9f7782195db4729c to your computer and use it in GitHub Desktop.
description allowed-tools
Sync JIRA work items to TaskWarrior with claude tag
Bash(acli)

You are syncing JIRA work items to TaskWarrior for AI-assisted execution. Follow these steps:

Workflow

  1. Query JIRA for work items:

    • Run this command to get unresolved work items assigned to the current user:
      acli jira workitem search --jql "assignee = currentUser() AND resolution = Unresolved AND status = Open ORDER BY priority ASC" --json
    • Parse the JSON output to extract: Issue Key, Summary, Priority, Issue Type, Status
    • The results will be ordered by priority (highest priority first)
  2. Check TaskWarrior MCP availability:

    • Use ListMcpResourcesTool to verify TaskWarrior MCP is configured
    • If not available, inform the user and provide setup instructions
  3. For each work item, create a TaskWarrior task:

    Task Description Format:

    /jira-scout [TICKET-KEY]
    

    Priority Mapping (JIRA → TaskWarrior):

    • Highest → H (high)
    • High → H (high)
    • Medium → M (medium)
    • Low → L (low)
    • Lowest → L (low)

    Tags to add:

    • claude (required - enables taskwarrior-task to find it)
    • Issue type tag: bug, feature, story, task, epic, etc. (lowercase version of JIRA issue type)
    • scout as this will only be for gathering context about tickets
    • Optional: Add project key as a tag (e.g., proj-123)

    Annotations to add:

    • Add the JIRA ticket summary as an annotation
    • Add the current status as an annotation (e.g., "Status: In Progress")
    • Add a link to the JIRA issue if available
  4. Use TaskWarrior MCP to create tasks:

    • Use the appropriate MCP resource to create each task with:
      • Description: /jira-scout [TICKET-KEY]
      • Priority: Mapped from JIRA priority
      • Tags: claude, issue type, and any other relevant tags
      • Annotations: Summary, status, and JIRA link
    • Track which tasks were successfully created
  5. Provide summary:

    • Display a summary of:
      • Number of JIRA issues found
      • Number of tasks created in TaskWarrior
      • List of created tasks with their keys and priorities
      • Any errors or issues encountered
    • Suggest running /taskwarrior-task to start working on the highest priority item

Error Handling

  • If acli is not installed or configured, provide installation instructions
  • If TaskWarrior MCP is not available, guide the user on setup
  • If a task already exists in TaskWarrior for a JIRA issue, skip it or update it (ask user preference)
  • Handle JIRA API errors gracefully with clear error messages

Important Notes

  • The description format /jira-scout [TICKET-KEY] is critical - this allows taskwarrior-task to automatically set up the project context
  • Always tag with claude so taskwarrior-task can find these tasks
  • Mirror the JIRA priority accurately to ensure correct task ordering
  • Keep annotations concise but informative for context
  • Consider filtering out JIRA issues that are already "Done" or "Closed"

JIRA Query Command

The command is pre-configured to fetch:

  • Work items assigned to the current user
  • Only unresolved items
  • Only items with status "Open"
  • Ordered by priority (ascending, so highest priority first)
  • Output in JSON format for easy parsing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment