Skip to content

feat: every task through /dispatch, and the plugin carries it - #37

Merged
mauricios merged 2 commits into
mainfrom
feat/dispatch-every-task
Oct 6, 2026
Merged

mauricios merged 2 commits into
mainfrom
feat/dispatch-every-task

Conversation

@mauricios

Copy link
Copy Markdown
Contributor

With the parallel-agents module, the session in the main checkout now takes every task and hands it to a new session in a worktree of its own. The plugin also carries /dispatch, so a packaged project no longer commits it. Decision 0020 amends 0008, 0015, and 0016.

What changed and why

1. Every task goes through /dispatch (6fc4cff)

Before, decision 0015 left the route to the developer. A task that needed nothing from the scripts started in a session the developer opened with the worktree option, and /dispatch handled only the scripts' route. A team using the module asked for one way in instead. Every requirement goes to the main checkout's session, which hands it to a new session, and that session runs the whole process.

  • The project picks the route, not the task. The route comes from worktree.conf:
    • Worktrees that need nothing from the scripts get Claude Code's worktree: a task chip in the desktop app (one click), or a claude --worktree <slug> "<prompt>" command in a terminal.
    • Worktrees that need a port, setup or start commands, or a base branch other than the default get the scripts' worktree (--no-start), plus a prompt the developer pastes into a session opened on it.
  • Why not per task: whether a task runs the app is a triage question, and a wrong chip costs a second dispatch. A wrong paste costs one step. The developer can still pick the other route for one task (/dispatch <task> chip). The dispatcher never does.
  • Never a chip for the scripts' worktree. Another project tested this on 2026-09-22: a chip always creates its own worktree, without the env file, port, or setup, even when it's given another folder. A WorktreeCreate hook isn't told the folder or the task, and doesn't run when the app reuses a worktree. The decision, /dispatch, and PARALLEL-AGENTS.md record why.
  • Hooks: the session-context hook tells the dispatcher to give every task to /dispatch and names the project's route. protect-hub.sh's message points at /dispatch.
  • Docs: PARALLEL-AGENTS.md, MODULE.md, the scenario, ONBOARDING.md, SKILLS-REFERENCE.md, and README.md follow.

2. The plugin carries /dispatch (dfd6768)

/dispatch was the one framework skill a packaged project still committed, only because it ships in a module.

  • The build: scripts/build-aplyca-adf.sh now copies every module's skills into the plugin. The module stays the single source, so a committed install doesn't change.
  • Projects without the module: the skill stops there, as the plugin's hooks already do.
  • Install and upgrade: /aplyca-adf:adopt leaves the skill out of a packaged project. /aplyca-adf:upgrade deletes a packaged project's copy when it's unchanged since the baseline.
  • Names: the plugin's hooks and skills name the skill /aplyca-adf:dispatch.

Upgrade impact

The CHANGELOG has the details.

  • Overwrite the /dispatch skill and, in a committed project, session-context.sh, protect-hub.sh, .claude/hooks/README.md, and /spec-workflow.
  • Merge docs/PARALLEL-AGENTS.md, whose roles and routes sections changed. § Shared services stays.
  • Packaged projects with the module: delete .claude/skills/dispatch/. /aplyca-adf:upgrade does it.

Release: this changes a workflow rule for module projects and has a migration step for packaged ones. Decision 0017 reads that as MAJOR, though v1.2.0 shipped an /upgrade-handled migration as MINOR. That's your call when we release.

How to verify

  • ./evals/run-evals.sh
  • scripts/build-aplyca-adf.sh leaves no drift.
  • In a project with the module and no port: from the main checkout, /aplyca-adf:dispatch <a docs task> should offer a task chip. With PORT_SLOTS set, it should create the sibling worktree and give a prompt to paste.

What I verified

  • Static evals: all suites pass (159, 83, 45, and 18). New assertions cover:
    • the dispatcher and route lines;
    • the chip rule and the guard in /dispatch;
    • the plugin carrying the skill.
  • claude -p --worktree probe-one --model haiku "<prompt>" (Claude Code 2.1.286, a throwaway repo): the session ran in .claude/worktrees/probe-one, on branch worktree-probe-one, with the prompt. The interactive form parses the same way.
  • check-packaged.sh's new check, run on throwaway projects:
    • It fails a packaged project that commits /dispatch on a release whose plugin has it.
    • It passes one that doesn't.
    • It's skipped on v1.2.1.
  • The rebuilt plugin: it carries skills/dispatch with its copy-selection step (Step 0), and .generated lists it.

What I couldn't verify

  • That a chip's worktree gets the env file through .worktreeinclude. The docs say every worktree the desktop app creates does, but checking a chip needs a click in the desktop app. It's the first thing to check on a real project.
  • No session eval for /dispatch. The chip hand-off only exists in the desktop app.

🤖 Generated with Claude Code

mauricios and others added 2 commits October 6, 2026 08:23
…checkout

With the parallel-agents module, the main checkout's session now takes every task and hands it to
a new session in a worktree of its own (decision 0020, amending 0008 and 0015). The project's
worktree.conf picks the route, not the task: Claude Code's worktree (a task chip in the desktop
app, or a claude --worktree command) when the worktrees need nothing from the scripts; the
scripts' worktree, with a prompt to paste, when they need a port, setup or start commands, or a
base branch other than the default. The developer can pick the other route for one task.

A chip is never used for the scripts' worktree: it always creates a worktree of its own, without
the env file, port, or setup, even when given another folder — a finding from another project's
2026-09-22 test, recorded in the decision.

The session-context hook gives the dispatcher the instruction and its project's route;
protect-hub's message points at /dispatch. Docs, the scenario, and the tests follow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
/dispatch was the one framework skill a packaged project still committed: it ships in the
parallel-agents module, and decision 0016 keeps modules committed — a rule written for the
scripts, templates, and configuration a project owns. The skill is generic machinery, so the
plugin now carries it as /aplyca-adf:dispatch (decision 0020, amending 0016).

scripts/build-aplyca-adf.sh copies every module's skills into the plugin, from the module, which
stays their one source; a committed install doesn't change. The skill stops in a project without
the module. /adopt leaves it out of a packaged project, and /upgrade deletes a packaged project's
committed copy when it's unchanged since the baseline. The plugin's hooks and skills now name
/aplyca-adf:dispatch. The static checks hold the plugin to carrying it, and check-packaged.sh
checks a packaged project commits no copy on a release whose plugin has it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mauricios
mauricios marked this pull request as ready for review October 6, 2026 13:30
@mauricios
mauricios merged commit c60432e into main Oct 6, 2026
1 check passed
@mauricios
mauricios deleted the feat/dispatch-every-task branch October 6, 2026 13:30
mauricios added a commit that referenced this pull request Oct 6, 2026
A minor release for teams with the parallel-agents module (#37, decision 0020): the main
checkout's session takes every task and hands it to a new session in a worktree of its own, by
the route the project's worktree.conf gives, and the plugin carries /dispatch. Unreleased becomes
v1.3.0, with the upgrade from v1.2.x.

Decision 0017 gets a dated clarification: "has to act" means something stops working until the
team acts. A migration /aplyca-adf:upgrade carries out, or a changed rule in an opt-in module, is
minor — as v1.2.0 and v1.3.0 shipped.

plugin.json 1.3.0; both READMEs name the release.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant