Skip to content
Back to skills

Parallel Dispatch

ASecurity

Use when the Director is about to build two or more independent slices at once, or when resuming with leftover .worktrees/ from an interrupted wave. Covers git-worktree setup, concurrent builder/reviewer dispatch, where tbv/ bookkeeping commits go, serial squash-merges, and merge-conflict recovery.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 3, 2026
ai-agentsgogit

Security analysis

A100/100

Scanned December 3, 2026

npx -y skills add restierecon/tbv --skill parallel-dispatch --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Parallel Dispatch?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Parallel Dispatch
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/restierecon-parallel-dispatch/badge)](https://www.skillsdirectory.com/skills/restierecon-parallel-dispatch)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: parallel-dispatch
description: Use when the Director is about to build two or more independent slices at once, or when resuming with leftover .worktrees/ from an interrupted wave. Covers git-worktree setup, concurrent builder/reviewer dispatch, where tbv/ bookkeeping commits go, serial squash-merges, and merge-conflict recovery.
---

# Parallel Slice Dispatch (git worktrees)

**Throughput checkpoint — required before any wave.** Answer these four, each or
`n/a: <reason>`, as the body of the wave-start bookkeeping commit on main
(`chore(tbv): start wave <IDs>`) before creating a worktree — log-event.sh has no
wave event, so the commit message is the record:
1. Blocking first steps — what must land before anything parallel can start (shared
   schema, a dependency bump)? Ship that alone first.
2. Independent slices — which ready slices share no `depends_on` edge and no files?
3. Shared mutable files — which files would two slices both edit? Split the file's
   ownership (or the slice) before falling back to serializing those slices.
4. Smallest safe wave — the fewest slices that clear the most downstream work, not
   simply `max_parallel_slices`.

Gather all slices whose `depends_on` are satisfied (done, or absent from
task-tree.json = shipped) and whose risk gate lets them start (`risk-gate.sh pending`
lists the ones that can't: unrecorded, or critical and waiting on a human). They are independent and safe to run concurrently. Dispatch
up to `max_parallel_slices` (tbv/project.md, default 3) at once:

1. For each: `git worktree add .worktrees/<ID> -b slice/<ID>` from main, then run the
   project's dependency-install step inside that worktree (see the project specifics in AGENTS.md or the project CLAUDE.md) — a
   fresh worktree has no installed environment; gates can't run until it does.
2. Lock each slice's contract before its builder (global protocol → Contract): fire the
   `tester` calls in a single message, one per worktree, then run
   `~/.tbv/scripts/contract.sh lock <ID>` from that worktree as each tester reports.
   guard.sh refuses a builder spawn on a slice whose contract isn't locked. A slice with
   `"contract": "none: <reason>"` skips this step.
3. Fire the `builder` calls in a single message, one per locked worktree — instruct each
   to work only inside its assigned worktree path (the Agent tool has no enforced
   working-directory field; this is prompt discipline, not harness isolation). A
   CONTRACT-DISPUTE goes back to that slice's tester as the protocol says.
4. As each builder reports COMPLETE, run `gate.sh` in that worktree, then its reviewer
   (and auditor, if triggered) against the same worktree — dispatched in parallel
   across whichever slices just finished building.
5. tbv/ bookkeeping stays out of slice branches during a wave: builder/reviewer/
   auditor commits inside a worktree touch application code only. The Director's own
   commits (task-tree.json, log.jsonl, stories.md — record-gate.sh, land-slice.sh and
   adopt-plan.sh commit in the main checkout for you) land directly on
   main, in the main checkout — never on a slice branch. Slice branches stay free of tbv/ commits
   so a squash-merge only touches code and sibling bookkeeping never collides.
6. Process verdicts and merges to main ONE AT A TIME (`land-slice.sh <ID>` from the
   main checkout), in whatever order they land — the merge stays Director-serial even
   though build/review was concurrent.
7. Conflict (land-slice.sh lists the files and leaves main untouched; a sibling already
   changed an overlapping file): re-dispatch
   that builder once, in its worktree, to rebase onto current main and resolve. Then
   compare gate.sh's new patch_id with the approved one: same → verdicts stand (clean
   rebase); different → the resolution changed the slice, re-run every gate. Second failure → escalate (tbv/flags/pending-review.md); don't force it.
8. land-slice.sh removes the worktree and branch after the merge. On abandonment:
   `git worktree remove .worktrees/<ID>` and delete the branch yourself.

A crashed wave leaves worktrees behind; the SessionStart hook lists them. Resume each
(re-invoke its builder/reviewer in place) or tear it down before starting new work.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.