Learn how to use @devintern/code effectively
Usage
Single Task Processing
Process a single Jira task:
# Basic usage
devintern TASK-123
# Skip the AI agent and just fetch/format the task
devintern TASK-123 --no-agent
# Skip git branch creation
devintern TASK-123 --no-git
# Use custom .env file
devintern TASK-123 --env-file /path/to/custom.env
# Specify custom output file
devintern TASK-123 -o my-task.md
# Verbose output for debugging
devintern TASK-123 -v
# Custom AI agent CLI path
devintern TASK-123 --claude-path /path/to/claude
# Increase max turns for complex tasks
devintern TASK-123 --max-turns 50
# Skip automatic commit after AI agent completes
devintern TASK-123 --no-auto-commit
# Create pull request after implementation
devintern TASK-123 --create-pr
# Create PR targeting specific branch
devintern TASK-123 --create-pr --pr-target-branch develop
# Skip ALL Jira comments
devintern TASK-123 --skip-jira-comments
# Skip clarity check for faster processing
devintern TASK-123 --skip-clarity-check
Batch Processing
Process multiple tasks at once:
# Process multiple specific tasks
devintern PROJ-123 PROJ-124 PROJ-125
# Process tasks matching JQL query
devintern --jql "project = PROJ AND status = 'To Do'"
# Complex JQL with custom fields
devintern --jql "project = \"My Project\" AND cf[10016] <= 3 AND labels IN (FrontEnd, MobileApp)"
# Batch process with PR creation
devintern --jql "assignee = currentUser() AND status = 'To Do'" --create-pr
# High-complexity batch with extended turns
devintern --jql "labels = 'refactoring' AND type = Story" --max-turns 500 --create-pr
# Batch with skipped clarity checks
devintern PROJ-101 PROJ-102 PROJ-103 --skip-clarity-check --create-pr
Workflow Examples
Standard Development Workflow
# 1. Go to your project directory
cd ~/projects/my-app
# 2. Check git status (should be clean)
git status
# 3. Run devintern
devintern MYAPP-456
# Expected output:
# 🔍 Fetching JIRA task: MYAPP-456
# 📋 Task Summary: Implement user authentication
# 💾 Saving formatted task details to: ./task-details.md
# 🌿 Creating feature branch...
# ✅ Created and switched to new branch 'feature/myapp-456'
# 🤖 Running Claude with task details...
# [Claude implements the task...]
# ✅ Claude execution completed successfully
# 📝 Committing changes...
# ✅ Successfully committed changes for MYAPP-456
Git Integration Details
Automatic Branch Creation
- Creates branches with format:
feature/task-id - Converts task keys to lowercase:
PROJ-123→feature/proj-123 - Checks for uncommitted changes before creating branches
- Switches to existing branch if it already exists
Automatic Commit
- Commits all changes after AI agent successfully completes
- Uses descriptive commit message:
feat: implement TASK-123 - Task Summary - Can be disabled with
--no-auto-commitflag
Pull Request Creation
- Automatically creates PRs on GitHub or Bitbucket
- Detects repository platform from git remote URL
- PR title format:
[TASK-123] Task Summary - PR body includes implementation details and links back to Jira
- Target branch can be specified with
--pr-target-branch(defaults tomain)
What It Does
- Fetches Jira task details (description, custom fields, comments, attachments)
- Formats the information for your AI agent
- Creates a feature branch named
feature/task-id - Runs optional feasibility assessment (skippable with
--skip-clarity-check) - Executes your AI agent with enhanced permissions
- Saves implementation summary to local files
- Commits all changes automatically
- Pushes the feature branch (when creating PRs)
- Creates pull requests on GitHub or Bitbucket (optional)
- Posts implementation results back to Jira (skippable with
--skip-jira-comments)
Troubleshooting
“There are uncommitted changes”
- Commit your changes:
git add . && git commit -m "message" - Or stash them:
git stash - Or use
--no-gitto skip branch creation
“Claude reached maximum turns limit”
- Task is too complex for the current turn limit
- Increase max turns:
--max-turns 50 - Consider breaking the task into smaller subtasks
“PR creation failed”
- Ensure you have the correct token configured
- Check token/App permissions
- For GitHub App: Ensure the App is installed on the repository
- Use
--verboseflag to see detailed error messages
“Issue not found”
- Check Jira credentials
- Verify task key exists and you have access
- Ensure
JIRA_BASE_URLis correct