merge-tracks

A manual command for combining completed parallel development tracks back into the main Git branch. A development track is one separate line of work, and a pull request is a proposed change for review before merging.

In plain words
What is it for?
Use it to preview a merge, merge tracks with or without automatic pull-request creation, keep worktrees, or delete track branches afterward.
Why use it?
It provides manual control when automatic merging fails or when you need to preview or change cleanup behavior.

Command

Part of the devteam plugin — 20 skills, 20 commands, 12 hooks, 2 MCP servers shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/michael-harris/devteam/merge-tracks
Clone the repo
git clone --depth 1 https://github.com/michael-harris/devteam

Or install devteam, the plugin that ships this one along with the rest of its 20 skills, 20 commands, 12 hooks, 2 MCP servers.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,448 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.02448
Opus 5 $0.00000 $0.01224
Sonnet 5 $0.00000 $0.00490
Haiku 4.5 $0.00000 $0.00245

Measured 3d ago against content hash 2d3187cec109, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

merge-tracks scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/merge-tracks.md · 323 lines

How it starts

The opening of the file, as written. The whole thing — 323 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Merge Tracks Command

Debug/Expert Command - Manually merge parallel development tracks.

Note: This command is rarely needed. Track merging happens automatically when all tracks complete via /devteam:implement. Use this only if automatic merge failed or you need manual control over the merge process.

You are orchestrating the parallel development tracks merging phase to combine all completed tracks back into the main branch.

Command Usage

/devteam:merge-tracks                      # Merge all tracks, create PR, cleanup worktrees (default)
/devteam:merge-tracks --manual-merge       # Merge all tracks, skip PR, cleanup worktrees
/devteam:merge-tracks --keep-worktrees     # Merge, create PR, keep worktrees
/devteam:merge-tracks --delete-branches    # Merge, create PR, cleanup worktrees & branches
/devteam:merge-tracks --dry-run            # Show what would be merged without doing it

Flags:

  • --manual-merge: Skip automatic PR creation after merge, allow manual PR creation
  • --keep-worktrees: Keep worktrees after merge (default: delete)
  • --delete-branches: Delete track branches after merge (default: keep)
  • --dry-run: Preview merge plan without executing

Prerequisites

This command only works for projects planned with git worktrees (--use-worktrees flag).

Pre-flight checks:

  1. SQLite state database must exist with worktree mode enabled
  2. All tracks must be complete (all sprints in all tracks marked "completed")
  3. No uncommitted changes in any worktree
  4. All worktrees should have pushed to remote (optional but recommended)

Your Process

Step 0: Parse Parameters

Extract flags from command:

  • --manual-merge: Skip PR creation after merge (default: false)
  • --keep-worktrees: Do not delete worktrees after merge (default: false)
  • --delete-branches: Delete track branches after merge (default: false)
  • --dry-run: Show merge plan without executing (default: false)

Step 1: Load State and Validate

Read the full file on GitHub · 323 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 323 lines · 0 tokens per session scan A 2d3187cec109

Subscribe to this mod's changes

merge-tracks is a command published in the GitHub repository michael-harris/devteam (18 stars, last pushed 6mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,448 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.