DEV Community

developerz.ai
developerz.ai

Posted on

Automating the Full PR Lifecycle with Claude Task Master

The Problem: PRs Don't Merge Themselves

You open a pull request. CI runs. Something fails. You fix it, push again. A reviewer leaves comments. You address them, push again. CI passes. You wait for approval. You merge. Repeat for every PR.

This loop is mechanical. It doesn't require creativity - it requires persistence. And that's exactly what Claude Task Master handles.

What claudetm merge-pr Does

claudetm merge-pr 147
Enter fullscreen mode Exit fullscreen mode

That command owns the entire merge loop:

  • Waits for CI checks to complete
  • If they fail, analyzes the failure and fixes the code
  • Pushes the fix, waits for CI again
  • Addresses review comments as they arrive
  • Merges when approved (configurable auto-merge)
  • Verifies success criteria are actually met

The tool doesn't just retry - it understands the codebase, runs tests, and makes targeted fixes.

Real Usage

This repository's own PRs #147 through #150 were merged using claudetm merge-pr. The maintainer didn't babysit any of them.

How It Fits the Broader Workflow

merge-pr is one entry point. The full autonomous workflow starts with:

claudetm start "Add user authentication with tests"
Enter fullscreen mode Exit fullscreen mode

That command:

  1. Reads the codebase and creates a task list organized by PRs
  2. Defines success criteria up front
  3. Works through each task: changes, tests, commits, pushes
  4. Opens PRs for each logical unit
  5. Hands off to the merge loop
  6. Accepts dynamic plan updates via its mailbox system while working

Profiles for Parallel Work

If you run multiple Claude subscriptions, profiles keep them isolated:

# OAuth profile - isolated config home
claudetm --profile team-a start "..."

# API-key profile - direct Anthropic-compatible endpoint
claudetm --profile ci-bot --api-key $KEY start "..."
Enter fullscreen mode Exit fullscreen mode

Each profile gets its own ~/.claudetm/profiles/<name>/ directory so credentials never clobber each other.

Building on Top

The REST API, MCP server, and HMAC-signed webhooks expose the same lifecycle programmatically. A dashboard, a bot, or a CI pipeline can dispatch tasks and react to progress without running the CLI interactively.

Getting Started

uv tool install claude-task-master
claude
/login
cd your-project
claudetm start "Your goal here"
Enter fullscreen mode Exit fullscreen mode

Requires Python >= 3.10, authenticated Claude CLI, and authenticated GitHub CLI.

Open source, MIT licensed. https://github.com/developerz-ai/claude-task-master

ClaudeCode #AIAgents #DevTools #Automation #OpenSource

Top comments (0)