.claude/skills/leader-dispatch/SKILL.md
Dispatch workflow for leader/orchestrator sessions. Use when dispatching a quest to a worker, choosing which worker to assign, spawning new worker sessions, or deciding whether to reuse vs spawn. Triggers: 'dispatch', 'send quest', 'assign worker', 'spawn worker', 'which worker', 'reuse or spawn'.
npx skillsauth add MrVPlusOne/takode leader-dispatchInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill covers leader discipline and the step-by-step dispatch process. Invoke it every time you dispatch a quest, choose a worker, or spawn a new session.
quest claim yourself. Workers claim quests when dispatched. This is a hard rule -- leaders coordinate, workers claim.refined, and dispatch with a full quest journey. Never treat feedback fixes as "quick patches" that skip review. See quest-journey.md in /takode-orchestration.Walk through these steps before dispatching any quest.
takode board show
See current quest state and capacity. Identify quests already in progress and available worker slots.
takode list
See your herded sessions with status, quest claims, last activity. Identify idle workers that might be reusable.
For each idle or disconnected worker, check what quest it last worked on:
takode info <N>
Ask: is the new quest related to this worker's recent context (same feature area, same files, direct follow-up)?
| Situation | Action |
|-----------|--------|
| Idle worker with relevant context | Reuse -- send dispatch directly |
| Disconnected worker (✗) with relevant context | Reuse -- send a message to reconnect it |
| Best worker busy but strongly relevant | Queue with --wait-for #N (session) or --wait-for q-N (quest) on the board |
| No worker has relevant context | Spawn fresh |
Disconnected ≠ dead. Workers showing ✗ (disconnected) in takode list are NOT dead -- they auto-reconnect when you send them a message via takode send. Always prefer reusing a disconnected worker with relevant context over spawning a fresh session. Only archive a disconnected worker if you're sure its context is no longer useful.
Reuse when the next task continues the worker's recent work (same feature, same files, direct follow-up). The worker already has the codebase context loaded.
Queue when the best worker is busy but has strong context overlap. Add the quest to the board as QUEUED with --wait-for #N (where N is the worker's session number) and wait for the worker to free up rather than spawning a fresh session that lacks context. You can also use --wait-for q-N to wait for a specific quest to leave the board.
Spawn fresh when no existing worker has relevant context. Point the new worker to relevant quests or past sessions for context:
takode spawn --message "<dispatch>"
Shell quoting safety. Do not paste complex dispatch text inline inside double quotes if it contains backticks, $(...), or other shell syntax. Your shell can execute that content locally before takode receives it. For multi-line or shell-like dispatches, compose the message with a single-quoted heredoc and pass the variable instead:
msg=$(cat <<'EOF'
Work on [q-XX](quest:q-XX). Read the quest and claim it: `quest show q-XX && quest claim q-XX`.
If logs include `$(...)` or backticks, treat them as literal text.
Return a plan for approval before implementing. After you send the plan, stop and wait for approval.
EOF
)
takode spawn --message "$msg"
takode send 2 "$msg"
Never use --no-worktree unless the user explicitly asks for it or the project's repo instructions require it. All workers get worktrees by default -- including investigation and debugging tasks, since they almost always lead to code changes. Don't use --fixed-name for regular workers -- they auto-name from their quest.
Default to your own backend type unless the user specifies otherwise.
Maintain at most 5 sessions in your herd (reviewer sessions don't count). Before spawning, check takode list. When counting, only count non-reviewer sessions. The summary line at the bottom shows total sessions -- subtract reviewers to get the worker count. Never archive proactively. Only archive when you are at the 5-session limit AND need to spawn a new worker. Idle and disconnected sessions retain valuable context -- keep them until you actually need the slot. When you must archive, choose the session least likely to be reused -- typically the one whose work is most complete, least related to upcoming tasks, or oldest.
Use this exact template. Do not add extra context, file paths, or investigation instructions.
Work on [q-XX](quest:q-XX). Read the quest and claim it: `quest show q-XX && quest claim q-XX`.
Return a plan for approval before implementing. After you send the plan, stop and wait for approval.
When sending this template through the shell, prefer the heredoc pattern above over inline double quotes if you might include shell-like text or multi-line additions.
If the worker needs additional context (related sessions, rejected approaches, user decisions), add it to the quest description before dispatching. Workers have the same tools and skills you do -- they run quest show q-XX themselves.
Workers must stop after each stage boundary. The dispatch message only authorizes planning. After plan approval, the worker implements. After implementation, the worker STOPS and waits -- it does NOT self-review, self-groom, or self-port. The leader advances the quest through review stages.
Make every follow-up message stage-explicit.
/port-changes instruction only after reviewer ACCEPT.Use explicit phrasing when steering between stages. Good defaults:
Implement the approved plan, then stop and report back. Do not run /groom, /port-changes, or change the quest status yourself.
Address the reviewer findings, then stop and report back. Do not port yet.
Run /groom, implement any Critical or Recommended suggestions, then stop and report back. Do not port yet.
Port now using /port-changes, then report back when sync is complete.
For feedback rework dispatches, use this extended template instead:
Work on [q-XX](quest:q-XX). Read the quest and check unaddressed feedback: `quest show q-XX && quest claim q-XX`.
Address all unaddressed feedback items. After fixing each item, mark it as addressed: `quest address q-XX <index>`.
Return a plan for approval before implementing. After you send the plan, stop and wait for approval.
This ensures workers know about pending feedback and explicitly mark each item as addressed after fixing it.
Forward user screenshots. When the user provides screenshots alongside a task request, attach them to the quest via quest feedback q-XX --image <path> before dispatching. If no quest exists (e.g. ad-hoc investigation), send the image file path to the worker via takode send so they can Read it. takode spawn does not support images -- always use a follow-up message or quest attachment.
takode board set <quest-id> --worker <N> --status PLANNING
testing
Use when the user wants to remember, capture, save, or add a random idea, thought, note, link, reference, decision, or memory to Yuege's Random Memory Hub in Notion.
data-ai
Port changes from a git worktree to the main repository. This is the skill behind `/port-changes`; `worktree-rules` remains the underlying skill slug/directory. Use when asked to 'port changes', 'sync to main', 'push to main repo', '/port-changes', or when porting worktree commits.
testing
Cross-session orchestration for Takode. Use when you need to interact with other sessions: listing active sessions, peeking at session activity, reading messages, sending instructions to workers, or spawning new sessions. Triggers: 'check on workers', 'send to session', 'orchestrate', 'coordinate agents', 'list sessions', 'peek at session', 'what are my sessions doing', 'check session status'.
testing
Adversarial review of a worker's completed task. Independently evaluates whether the worker did thorough, honest work or took shortcuts. Returns ACCEPT or CHALLENGE with specific questions. Invoked by the reviewer session after being spawned by the leader.