agentleFS
gonnarungonnarun/sdp/skills/worktree-dispatch/SKILL.md

worktree-dispatch

Skill0 starsChanged 3 months agoMITView on GitHub

Interview several independent tasks and dispatch each as a full SDP workflow in its own git worktree, preserving Claude review gates and merge-time verification.

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. alexgrebeshok-coder/dirigent-skills★ 0same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository5 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 1 is distinctive, and 8 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 8

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use when the user asks for worktree-dispatch, parallel SDP worktrees, independent task dispatch, or per-worktree handoff.

    line 8
  2. Very specific:

    Run scripts/sdp-anchor.sh from the repository root.

    line 13
  3. Very specific:

    Read core/SDP.md, commands/worktree-dispatch.md, and required stage form files.

    line 14
  4. Very specific:

    Treat commands/worktree-dispatch.md as dispatch guidance only.

    line 15
  5. Very specific:

    When printing progress or gate requests, label the review gate as review-gate, not codex-gate.

    line 16
  6. Distinctive:

    Write a shared design skeleton / data-model contract for shared surfaces.

    line 21
  7. Very specific:

    After worktrees complete, integrate incrementally, then run deferred screen/API/data verification serially in main.

    line 27
  8. Very specific:

    Prefer MCP tool claude_review_gate.

    line 40
  9. Very specific:

    Never ask agy after Claude returns a clean content BLOCK:.

    line 49

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Worktree Dispatch for Codex

Use when the user asks for worktree-dispatch, parallel SDP worktrees, independent task dispatch, or per-worktree handoff.

Startup

  1. Confirm the current project is a git repository.
  2. Run scripts/sdp-anchor.sh from the repository root.
  3. Read core/SDP.md, commands/worktree-dispatch.md, and required stage form files.
  4. Treat commands/worktree-dispatch.md as dispatch guidance only; Codex-side gates are review-gate via claude_review_gate MCP or python3 scripts/review_gate.py --reviewer claude.
  5. When printing progress or gate requests, label the review gate as review-gate, not codex-gate.

Workflow

  1. Main session runs Stage 1 only to separate independent tasks.
  2. Write a shared design skeleton / data-model contract for shared surfaces.
  3. For each task, create a handoff that runs full SDP Stage 2-8 in its own worktree.
  4. Dispatch mode:
    • manual: emit copy-pasteable handoff blocks and worktree setup commands; require the user to open each handoff in a Codex session.
    • auto: use scripts/run_segment_tmux.sh only when dispatch.worktree_mode: auto is configured and tmux + codex are available. The runner launches Codex implementation workers; Claude Code remains review-gate only.
    • orca: use scripts/orca_dispatch.sh only when dispatch.worktree_mode: orca is configured and its Orca-CLI capability probe passes. The adapter pins --agent codex; no agent/model override is allowed. Any probe failure falls back to manual only, never auto. Do not git worktree add for these tasks — Orca creates the worktree, and a second one would be integrated by mistake. Read the verdict from the adapter's exit code (0 SUCCESS, 10 FAIL_12X, 11 HALT_BLOCK, 12 PAUSE, 9 unrecognized), never from STATUS.md merely existing.
  5. After worktrees complete, integrate incrementally, then run deferred screen/API/data verification serially in main.

Invariants

  • Each worktree session must run both review-gate reviews at full strength.
  • Implementation worker must be Codex in every dispatch mode. Claude Code may appear only behind claude_review_gate / --reviewer claude.
  • Dispatched sessions do not run shared screen tests against colliding local services; they produce verification checklists.
  • Main session runs merge-time verification serially after integration.

Gate Adapter

For every Stage 4 plan, promoted design, fix-plan, and Stage 7 result gate:

  • Prefer MCP tool claude_review_gate.
  • Fallback:
python3 scripts/review_gate.py --cwd "$PWD" --reviewer claude "<review prompt>" "<artifact-path>"

--reviewer claude is not optional here. The stage documents do carry the rule in prose, but their shell blocks stay bare. core/ is shared by both hosts, so its gate examples are written in the Claude Code form — no --reviewer, because there the CLI default (codex) is already the opposite model. Copy one of those blocks unchanged on this host and the default makes Codex review Codex's own work, which is issue #3 in the other direction. On the Codex side the reviewer is always Claude: the MCP tool, or the CLI with --reviewer claude pinned.

Never ask agy after Claude returns a clean content BLOCK:. agy fallback is only for Claude missing, nonzero, timeout, empty, or invalid output.

Halted gate

A halt (.halt, max_block, identical-reason-twice, escalation stall, or a team decision=halt) is terminal for that artifact. The gate prints the full procedure in the halt body; follow it.

  • Your only move is to stop and report: artifact path, halt reason, cumulative BLOCK count, the gist of the last finding, what you resolved and what you did not.
  • RESET / OVERRIDE / PIVOT_RESET and SDP_GATE_OVERRIDE are human-only. Do not use them, and do not offer them to the user as options. There is no gate command that deletes .halt.
  • Team markers are not consulted after a halt, so preparing or recording one changes nothing.
  • When the halt is a scope problem — each round raised a different defect rather than the same one — the sanctioned recovery is a split. Prepare it with the MCP tool sdp_prepare_split (or python3 scripts/review_gate.py prepare-split <parent> --split-child <a> --split-child <b> --split-rationale "<why>"), which writes a request file and no gate state. A human records it at a terminal; you never run record-split. The parent then answers artifact was split; gate the children, and each child starts its own counter.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.