All skills
cat-xierluo avatar

/multi-agent-orchestration

@41268aa

编排两个以上边界独立的本地 worker,使用 Orca Run/Task/Dispatch、独立 worktree/session 或 tmux 回退,由 PM 负责拆解、派发、巡检、429 停滞恢复、独立验收、PR 收口与临时资源清理;也用于用户明确要求“并行推进”“多个 worker”“PM 总控”“Wave Autopilot”或防止 PM 直接实现逃逸。不要用于单个短任务、纯状态同步,或仅需 Git 分支、提交、PR、merge 规则的工作。

Use this Skill: https://skilld.dev/gh/cat-xierluo/legal-skills/multi-agent-orchestration

This session only. Nothing lands on disk.

templatescron-monitor-prompt.md

≈902 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Cron 兜底监测 prompt 模板

使用方式:PM 派 worker 后挂 cron 兜底(Sentinel 是主监测,cron 抓 Sentinel 盲区,见 SKILL.md §7)。复制本模板,替换 {{...}},用宿主的定时任务能力注册;worker 全部合入后删除该任务。

频次:短任务 ~22min、长流水线 10-15min,避开 :00/:30。

cron 表达式建议

任务粒度 cron 表达式 说明
短任务(< 1h) 7,29,51 * * * * 每 ~22 分钟,错峰
长流水线(1-4h,推荐) 3,13,23,33,43,53 * * * * 每 10 分钟,错峰
长流水线(轻量) 8,23,38,53 * * * * 每 15 分钟,错峰

不要用 */10 * * * *(落在 :00/:30 整点,API 拥堵);不要低于 10 分钟(过频抵消 token efficiency)。

prompt 模板

PM 巡检 {{wave_id}}({{worker_summary}})。读各 worker 的 STATUS.json:{{status_paths}},看 status/phase/updated_at/progress;查各自分支 git log {{base_ref}}..HEAD --oneline 看 commit 节奏;tmux capture-pane -t {{session}} -p | tail -15。

判定(按优先级):
0. **硬指令自删(最先执行,不做巡检)**:读所有 worker STATUS.json({{status_paths}}),若全部为终态(done/failed/blocked/stopped)且无 pending PR 或未合入分支 → 立即 `CronDelete` 本 cron job,本 turn 不做任何后续判定/巡检。最高优先级,避免 worker 全终态后 cron 还空跑一轮(folia Wave-1 实战:3 worker 都 done 后 cron 仍触发一次兜底巡检,PM 手动 CronDelete)。
1. 若某 worker status=done → 按 SKILL.md §8 检查真实 diff/tests/PR 后收口;体系性修改标“已完成·待核实”留 TASKS 活跃区等作者复核。
2. 若 failed/blocked → 读 STATUS.issues 决定纠偏/重启,向用户简报。
3. 若双信号卡死(STATUS.updated_at 和文件 mtime 都 > {{stale_threshold}} 未变 **且** pane 尾部有死循环证据)→ 先发 tmux send-keys 心跳探针;下一轮 cron 仍无变化才重启 worker。
4. 若 updated_at stale 但 pane 显示正常推进(long thinking)→ 不干预,只回一句话。
5. 若 tmux session 不存活 / sentinel 进程消失 → 诊断(额度耗尽?GLM 5h 重置?被 kill?),向用户简报并处置。

正常推进则只回一句:各 worker 当前 phase/progress。不膨胀上下文。

sentinel {{sentinel_ids}} 在后台,worker 终态会自动唤醒 PM,cron 是兜底。

占位符

占位符 含义 示例
{{wave_id}} Wave 标识 wave-svg-deai-260703
{{worker_summary}} worker 一句话摘要 W1=svg-t126/minimax 做 T126;W2=deai-full/glm 去AI化
{{status_paths}} 各 worker STATUS.json 路径(空格分隔) .claude/worktrees/tmux-X/.claude/agent-sessions/s/STATUS.json 与 .../tmux-Y/.claude/agent-sessions/t/STATUS.json
{{base_ref}} 基线分支 main
{{session}} tmux session 名(多 worker 多次 capture) svg-t126 和 deai-full
{{stale_threshold}} 卡死时间阈值 长流水线 20min、短任务 15min
{{sentinel_ids}} sentinel background job id 列表 ba1y0g64e(W1)/bz2ag2js4(W2)

收尾纪律

  • worker 全部 done 并合入后,PM 必须 CronDelete 本 cron,避免孤儿 cron 反复 fire 消耗 token。
  • 若 Wave 中途用户中止 / worker 全部 blocked 无法推进,也 CronDelete,改为 PM 主动处置。
  • cron 是 session-only(默认)或 durable(用户明确要求长期);session 结束 cron 自动消失,不污染下次。

Source: SKILL.md on GitHub

1 alert10d3 checks · Risk HIGH
  • Gen Agent Trust Hub10d

    The skill is a comprehensive multi-agent orchestration framework designed to manage multiple AI agents across isolated git worktrees and terminal sessions. It incorporates robust internal security controls such as an installation guard and a scope guard to limit the actions of sub-agents. It uses pinned executables and cryptographic hashes to verify script integrity. A potential risk of indirect prompt injection exists because the manager agent processes output from worker agents, but this is inherent to its function and mitigated by instructional boundaries and secret redaction.

  • Socket10d

    2 alerts: gptSecurity, gptAnomaly

  • Snyk10d

    Risk: LOW · No issues

Signed by skilld at 41268aa. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated yesterday
Other metadata
metadata
{
  "version": "2.31.1",
  "homepage": "https://github.com/cat-xierluo/legal-skills",
  "author": "杨卫薪律师(微信ywxlaw)"
}

README badge

README badge for cat-xierluo/legal-skills/multi-agent-orchestration