Skip to content

Adonis0123/adonis-skills / skills/agent-dispatch

agent-dispatch

Flagged

Choose the lightest agent setup for a coding, review, drafting or design-research task: do it yourself, fan out to 2-3 workers with independent parts across the Claude Code, Codex, Grok Build, Cursor or other CLIs and accounts on this machine, run a scoped architecture loop, or send one brief to independent researchers; pick a cross-model reviewer, test budget and cleanup; track dispatched work, external waits and user decisions on a Run Board. Use when work may need delegation, or the user asks to dispatch, fan out, parallelize, run several agents or accounts, get another AI's review or independent design opinions, or asks how dispatched work is going. Chinese triggers: 派活、并行、要不要多开几个 agent、分给多个 Claude 账号 / codex / grok、找另一个 AI 审、对比优秀设计、多方意见、进度看板、派出的任务进行到哪了。Not for unrelated read-only questions, trivial edits, research with no delegation, a single review of an existing diff (agentic-review-handoff), or the machine-wide session list (sideby sessions). Inside another named workflow, only size its workers.

FileKindSize
GLOSSARY.mdmarkdown2.1 KB
SKILL.mdskill md27.8 KB
evals/README.mdmarkdown7.6 KB
evals/README.zh-CN.mdmarkdown7.5 KB
evals/bench/compare.pyscript5.3 KB
evals/bench/run_bench.pyscript12.3 KB
evals/bench/tasks.jsonconfig6.6 KB
evals/bench/test_bench.pyscript4.4 KB
evals/build_plugin_eval.pyscript11.3 KB
evals/evals.jsonconfig31.4 KB
evals/results.mdmarkdown15.8 KB
evals/test_eval_harness.pyscript3.5 KB
evals/trigger-eval-set.jsonconfig1.6 KB
fixtures/probe-full.jsonconfig1.6 KB
fixtures/probe-single.jsonconfig690 B
fixtures/run-midrun/B9.jsonlother191 B
fixtures/run-midrun/deploy-log.txtmarkdown42 B
fixtures/run-midrun/run.jsonconfig1.8 KB
fixtures/run-sessions/B9.jsonlother191 B
fixtures/run-sessions/deploy-log.txtmarkdown42 B
fixtures/run-sessions/ended.jsonlother95 B
fixtures/run-sessions/run.jsonconfig2.1 KB
fixtures/run-sessions/sessions.jsonconfig804 B
fixtures/session-index.jsonconfig401 B
fixtures/sideby-stub/sessions.jsonconfig1.5 KB
fixtures/sideby-stub/sidebyexecutablescript4.1 KB
references/accounts.mdmarkdown10.4 KB
references/context-budget.mdmarkdown2.9 KB
references/fallbacks.mdmarkdown4.7 KB
references/launch.mdmarkdown16.1 KB
references/measure.mdmarkdown3.3 KB
references/research-brief.mdmarkdown1.3 KB
references/run-board.mdmarkdown48.7 KB
references/task-spec.mdmarkdown5.0 KB
scripts/board.cssother12.6 KB
scripts/board_interaction.jsscript3.7 KB
scripts/board_markdown.jsscript2.9 KB
scripts/board_render.pyscript17.2 KB
scripts/dispatch_board.pyscript95.3 KB
scripts/isolated_case.pyscript1.6 KB
scripts/probe_agents.pyscript12.9 KB
scripts/sideby_cli.pyscript3.2 KB
scripts/sideby_sessions.pyscript3.3 KB
scripts/test_billing_and_quota.pyscript10.9 KB
scripts/test_board_interaction.jsscript2.1 KB
scripts/test_board_markdown.jsscript2.9 KB
scripts/test_board_reload_state.jsscript2.7 KB
scripts/test_bug_regressions.pyscript4.7 KB
scripts/test_dispatch_board.pyscript68.9 KB
scripts/test_harness_limits.pyscript11.7 KB
scripts/test_lane_states.pyscript7.5 KB
scripts/test_probe_agents.pyscript19.2 KB
scripts/test_review_fixes.pyscript6.7 KB
scripts/test_rounds_and_watch.pyscript7.3 KB

scripts/test_bug_regressions.py

View on GitHub
"""Regressions for reproduced defects: hangs, slow parsing, shared boards, lost runs and reports, late sessions, stale states."""

import os
import subprocess
import sys
import tempfile
import time
from unittest import mock

import dispatch_board as board
from sideby_cli import bounded_run
from test_dispatch_board import BoardTestCase, write_jsonl


class BugRegressions(BoardTestCase):
    def test_timeout_does_not_wait_for_a_descendant_that_left_the_group(self):
        # the child ignores SIGTERM and starts a setsid grandchild that keeps stdout open for 8 s
        script = ("import os,signal,subprocess,sys,time; signal.signal(signal.SIGTERM, signal.SIG_IGN); "
                  "subprocess.Popen([sys.executable,'-c','import time; time.sleep(8)'], start_new_session=True); time.sleep(30)")
        started = time.monotonic()
        with self.assertRaises(subprocess.TimeoutExpired):
            bounded_run([sys.executable, "-c", script], timeout=0.5)
        self.assertLess(time.monotonic() - started, 4)

    def test_long_grok_answers_parse_in_linear_time(self):
        events = [{"type": "text", "data": "字" * 20} for _ in range(20000)]
        started = time.monotonic()
        info = board.summarize_events(events)
        self.assertLess(time.monotonic() - started, 1)
        self.assertTrue(info["activity"].startswith("AI 说:字"))

    def test_claude_session_is_known_while_the_worker_runs(self):
        info = board.summarize_events([{"type": "system", "subtype": "init", "session_id": "live-1"},
                                       {"type": "assistant", "message": {"content": [{"type": "text", "text": "在改"}]}}])
        self.assertEqual(info["session"], "live-1")

    def test_relative_run_dir_stays_in_the_registry(self):
        _, text, _ = self.run_cli("init", "--objective", "相对", "--run-id", "rel1")
        rd = text.strip()
        relative = os.path.relpath(rd, self.plain)
        self.assertEqual(self.run_cli("--run", relative, "lane", "add", "--id", "L")[0], 0)
        self.assertTrue(all(os.path.isabs(r["dir"]) for r in board.load_registry()))

    def test_close_keeps_reports_when_paths_go_through_a_symlink(self):
        real = tempfile.mkdtemp(dir=self.root)
        link = os.path.join(self.root, "link")
        os.symlink(real, link)
        rd = os.path.join(link, "runs", "c1")
        os.makedirs(rd)
        run = {"version": 1, "id": "c1", "objective": "o", "state": "active", "created_at": board.now_iso(),
               "lanes": [], "waits": [], "asks": [], "grants": []}
        stream = os.path.join(os.path.realpath(rd), "w.jsonl")  # recorded through the real path
        write_jsonl(stream, [{"type": "result", "subtype": "success", "result": "FINAL REPORT"}])
        board.add_lane(run, {"id": "W", "output": stream, "state": "done"})
        archive = board.close_run(rd, run)
        self.assertTrue(board.load_run(archive)["lanes"][0]["output"].startswith(archive))
        self.assertEqual(board.lane_result(board.load_run(archive), board.load_run(archive)["lanes"][0]), "FINAL REPORT")

    def test_ending_a_lane_refreshes_the_open_board(self):
        _, text, _ = self.run_cli("init", "--objective", "o", "--run-id", "s1")
        rd = text.strip()
        self.run_cli("--run", rd, "lane", "add", "--id", "L", "--title", "卡片", "--state", "working")
        self.run_cli("--run", rd, "lane", "set", "--id", "L", "--state", "done")
        page = open(board.board_path(rd), encoding="utf-8").read()
        self.assertNotIn('class="pill working"', page)

    def test_unchanged_streams_are_parsed_once_per_change(self):
        path = os.path.join(self.root, "big.jsonl")
        write_jsonl(path, [{"type": "assistant"}])
        with mock.patch.object(board, "_read_tail", wraps=board._read_tail) as parse:
            board.read_tail(path)
            board.read_tail(path)
            self.assertEqual(parse.call_count, 1)
            with open(path, "a", encoding="utf-8") as f:
                f.write('{"type": "result"}\n')
            board.read_tail(path)
            self.assertEqual(parse.call_count, 2)

    def test_relative_streams_and_logs_live_in_the_run_dir(self):
        _, text, _ = self.run_cli("init", "--objective", "o", "--run-id", "relout")
        rd = text.strip()
        self.run_cli("--run", rd, "lane", "add", "--id", "B9", "--output", "B9.jsonl")
        self.run_cli("--run", rd, "lane", "set", "--id", "B9", "--round", "2", "--output", "B9-2.jsonl")
        self.run_cli("--run", rd, "wait", "add", "--id", "W", "--log", "deploy.log")
        run = board.load_run(rd)
        self.assertEqual(run["lanes"][0]["output"], os.path.join(rd, "B9-2.jsonl"))  # not the shell's cwd
        self.assertEqual(run["waits"][0]["log"], os.path.join(rd, "deploy.log"))
finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the workStars: 322kUpdated Claude CodeCodexVerifiedInstall
systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesStars: 322kUpdated Claude CodeCodexVerifiedInstall
test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation codeStars: 322kUpdated Claude CodeCodexVerifiedInstall
skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.Stars: 197kUpdated Claude CodeCodexVerifiedInstall