Learn how to use @devintern/code effectively

Usage

Single Task Processing

Process a single task from your configured tracker:

# Jira (default)
devintern TASK-123

# Trello (TASK_TRACKER=trello)
devintern 4uWKPOTv
devintern https://trello.com/c/4uWKPOTv/card-slug --create-pr

# Local markdown file (no PM credentials required)
devintern ./tasks/feature-spec.md
devintern /path/to/my-task.md --create-pr

# Skip git branch creation
devintern TASK-123 --no-git

# Use custom .env file
devintern TASK-123 --env-file /path/to/custom.env

# Verbose output for debugging
devintern TASK-123 -v

# Custom AI agent CLI path
devintern TASK-123 --agent-path /path/to/claude

# Override max turns for very complex tasks (default: 500)
devintern TASK-123 --max-turns 1000

# 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 task tracker comments (and Trello list transitions)
devintern TASK-123 --skip-comments

# Skip clarity check for faster processing
devintern TASK-123 --skip-clarity-check

Markdown File Tasks

Pass one or more local .md files as arguments. No task tracker credentials are needed:

# Single file
devintern ./tasks/feature-spec.md --create-pr

# Multiple files (processed in sequence)
devintern ./epic.md ./subtask-a.md ./subtask-b.md

# Mix a PM task with a local file
devintern PROJ-123 ./extra-context.md

See the Markdown File Tasks guide for frontmatter options, status tracking, and TASK_TRACKER=markdown mode.

Batch Processing

Process multiple tasks at once (Jira):

# Process multiple specific tasks
devintern PROJ-123 PROJ-124 PROJ-125

# Process tasks matching a JQL query (Jira only; --jql is a deprecated alias)
devintern --query "project = PROJ AND status = 'To Do'"

# Complex JQL with custom fields
devintern --query "project = \"My Project\" AND cf[10016] <= 3 AND labels IN (FrontEnd, MobileApp)"

# Batch process with PR creation
devintern --query "assignee = currentUser() AND status = 'To Do'" --create-pr

# High-complexity batch with extended turns
devintern --query "labels = 'refactoring' AND type = Story" --max-turns 1000 --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: /tmp/devintern-tasks/myapp-456/task-details.md
# 🌿 Creating feature branch...
# ✅ Created and switched to new branch 'feature/myapp-456'
# 🤖 Running Claude Code with task details...
# [Agent implements the task...]
# ✅ Agent 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-123feature/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-commit flag

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 the task
  • Target branch can be specified with --pr-target-branch (defaults to main)
  • Target branch can also be auto-detected from the task description. Add a line like Target branch: develop to the card or issue and devintern will pick it up. Supported patterns: Target branch:, Base branch:, PR target:. Falls back to --pr-target-branch if no pattern matches.

What It Does

  1. Fetches task details (description, custom fields where supported, comments, attachments)
  2. Formats the information for your AI agent
  3. Creates a feature branch named feature/task-id
  4. Runs optional feasibility assessment (skippable with --skip-clarity-check)
  5. Executes your AI agent with enhanced permissions (default: 500 max turns)
  6. Saves implementation summary to local files
  7. Commits all changes automatically
  8. Pushes the feature branch (when creating PRs)
  9. Creates pull requests on GitHub or Bitbucket (optional)
  10. Posts implementation results back to your task tracker (skippable with --skip-comments)

Troubleshooting

“There are uncommitted changes”

  • Commit your changes: git add . && git commit -m "message"
  • Or stash them: git stash
  • Or use --no-git to skip branch creation

“Agent reached maximum turns limit”

  • Task is too complex for the current turn limit (default: 500)
  • Increase max turns: --max-turns 1000
  • 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 --verbose flag to see detailed error messages

“Issue not found” / card fetch errors

  • Check tracker credentials in .devintern-code/.env
  • Verify the task key or card ID exists and you have access
  • For Jira, ensure JIRA_BASE_URL is correct
  • For Trello, confirm TASK_TRACKER=trello and both TRELLO_API_KEY and TRELLO_API_TOKEN are set