Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/ouob-tw/loopagentteams/lat-dispatchnpx skills add ouob-tw/LoopAgentTeams --skill lat-dispatchgit clone --depth 1 https://github.com/ouob-tw/LoopAgentTeamsWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00040 | $0.09871 |
| Opus 5 | $0.00020 | $0.04935 |
| Sonnet 5 | $0.00008 | $0.01974 |
| Haiku 4.5 | $0.00004 | $0.00987 |
Grade A, and why
lat-dispatch scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 360 lines — stays where its author put it; the contents beside it link to each section on GitHub.
LAT Dispatch
Client 設定
可用 client、指令格式、解析優先序、內建預設、config.yaml 格式參見 references/clients.md。
內建 Subagent 路由與等待
- 每個委派階段先解析目標 client,再比較 Dispatch 宿主與目標模型家族;同宿主使用內建 subagent,跨宿主才使用外部 CLI client。
- 同宿主派發時讀取
references/native-subagents.md;跨宿主才讀取references/clients.md的 CLI 啟動、Monitor 與恢復章節。 - Codex 呼叫 GPT/Codex worker 時使用內建
spawn_agent,再以wait_agent直接等待完成通知或 mailbox 更新。 - Claude Code 呼叫 Claude worker 時使用內建
Agent;前景直接等完成,背景等待 completion notification 或使用 blockingTaskOutput。 - 內建 subagent 等待期間不得固定輪詢 subagent 狀態。等待明確逾時或異常時只做一次診斷;worker 仍在執行且無確認錯誤時,重新進入 blocking wait。
- 各 phase 的等待分流一致:內建 subagent 直接等待完成通知;外部 CLI 才啟動 Monitor。
- 內建 subagent 不啟動 CLI、zmx、PID file、Session JSONL Monitor。收到完成通知後仍依角色契約處理 Final Answer、review adjudication、executor ledger 與 QA evidence。
- 外部 CLI 的啟動、監控、恢復與錯誤處理維持
references/clients.md的既有契約。
Available scripts
scripts/monitor-session.sh— 監控 Codex/Claude 原始 Session JSONL 並提取最新 turn 的 Final Answerscripts/run-exec-client.sh— exec launcher:啟動 exec client、保存精確 PID、將 FD1/FD2 捕捉為帶 UTC capture time 的 runtime logs、等待退出並清理 PID file
預設流程
使用者啟動 LoopAgentTeams 時,自動執行,僅在 spec 階段需使用者確認(依 spec_review_flow):
進度檢查清單 — 每次啟動 LoopAgentTeams 時建立追蹤,逐項完成後才進入下一階段:
- [ ] init:建立 `.lat/logs/` 與 `.lat/workspace/`,遷移舊全域 ledger
- [ ] spec:腦力激盪 → 草稿/確定 TASK_ID → 初始化 task workspace 與空 ledger → 審查(依 spec_review_flow)→ 使用者確認
- [ ] plan:產生計劃 → 審查迴圈 → 規格與計劃一起提交
- [ ] dispatch:驗證既有 `.lat/workspace/<TASK_ID>/` ledger → 附加 code task → 啟動 code_executor
- [ ] monitor:內建 subagent 等待完成通知/外部 CLI 監控原始 Session JSONL → 將 Final Answer 交給 Dispatch;executor 另確認 task ledger
- [ ] test:test_executor 寫+跑整合與 E2E 測試修到綠 → qa_executor 依 QA 清單寫驗收測試至 qa_e2e/ → 失敗回饋 test_executor 修,迴圈到全過或達上限
- [ ] report:`clean <TASK_ID>` 清理已完成的 task-scoped zmx sessions → 向使用者報告最終狀態
- 每個階段轉換以一句話報告進度。
- 不得推斷完成狀態。 只有實際執行該階段的檢查步驟後,才可勾選完成。
- 不得跳步。 除非使用者明確要求跳過特定步驟。
外部 CLI Monitor 完成契約
- 外部 CLI 執行監控時從本技能目錄呼叫
scripts/monitor-session.sh;不要在 prompt 或臨時 shell 中重寫監控迴圈。client 啟動與 session 定位方式見references/clients.md。內建 subagent 不使用本節 Monitor。 - Codex 監控只傳
agent_id時由腳本自動定位 JSONL;定位 STALL 時,Dispatch 擴大搜尋並人工確認後,以--jsonl-path "$JSONL_PATH"重啟 Monitor。 - Claude exec 與 TUI 都監控 Project transcript;最新人類 prompt 之後的
assistanttext 加stop_reason: "end_turn"表示該 turn 完成,last-prompt不得視為完成標記。 - Codex exec 與 TUI 都監控原生 Session JSONL;同一 turn 必須同時有
response_item的phase: "final_answer"與event_msg.payload.type: "task_complete"或"turn_complete"。 COMPLETED只代表最新 turn 已輸出 Final Answer 並結束,不代表 exec OS 程序已 EOF/退出或 exit code 為 0。- Codex 最新 turn 已有
task_complete/turn_complete卻沒有 Final Answer 時,Monitor 立即回報INCOMPLETE;Dispatch 不得從 rollout 欄位猜測原因,須依references/clients.md先驗證帳號配額,再檢查 client 對應的診斷來源。 - Monitor 不建立、自訂或重新導向 exec log;四種 client 模式皆直接讀 CLI 原始 Session JSONL,並將 Final Answer 原文交給 Dispatch Agent。
- 監控來源的修改時間有變動表示仍有活動,超過該階段
stall秒未變才回報STALL。 - review 階段的內建值為
stall: 600、drift: 1800;同一 client turn 的初次 Monitor 與 re-arm 必須重用同一組已解析值。 - Claude Code Dispatch 呼叫 Monitor 時固定使用
timeout_ms: 3600000、persistent: true;生命週期由 bundled script 的終端事件控制。 - 單一
STALL只觸發診斷,不授權 kill。exec 依references/clients.md使用啟動時保存的 PID;TUI 仍使用 zmx session handle。 spec_reviewer、plan_writer與非 self 的plan_reviewer不寫 task ledger;內建 subagent 以完成通知交回 Final Answer,外部 CLI 由 Monitor 交回 Final Answer。selfplan_reviewer不委派 agent,也不寫 task ledger。code_executor、test_executor、qa_executor不論使用 exec 或 tui,都須寫.lat/workspace/<TASK_ID>/results.yaml並更新同目錄tasks.yaml的精確agent_id狀態。流程狀態以 ledger 為準,Final Answer 僅供摘要與診斷。- ledger 出現結果不能單獨代表 turn 已完成;executor 還須收到內建 subagent 完成通知或外部 Monitor
COMPLETED,才能進入下一階段。
What ships with it
13 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- references/clients.md 37 KB
- references/native-subagents.md 3.9 KB
- references/yaml-schema.md 9.5 KB
- scripts/monitor-session.sh 8.1 KB runs code
- scripts/run-exec-client.sh 7.4 KB runs code
- tests/exec-client-test.sh 27 KB runs code
- tests/exec-runtime-smoke-results-2026-07-24.md 12 KB
- tests/exec-runtime-smoke.md 6.0 KB
- tests/monitor-session-test.sh 21 KB runs code
- tests/native-subagent-contract-test.sh 7.5 KB runs code
- tests/native-subagent-smoke-results-2026-07-22.md 3.5 KB
- tests/native-subagent-smoke.md 3.1 KB
- tests/skill-contract-test.sh 46 KB runs code
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 360 lines · 40 tokens per session scan A ada6e333e1ed
lat-dispatch is a skill published in the GitHub repository ouob-tw/LoopAgentTeams (7 stars, last pushed 21d ago), licensed MIT. It adds 40 tokens to every session and 9,871 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
spec-flow-setup
Set up or repair this repo's spec-flow contract — run init, fill the fields it could not read, make the test command emit a report the engine can read, and prove the result with a green check. Use when a repo has no .spec-flow/config.json, when init left MISSING or REVIEW lines, when a run refuses to start because the…
engine-comments
Decide where a piece of reasoning belongs when writing or editing this engine — an invariant beside the code, a transition in the commit message, or a decision in decisions/. Use when adding a comment or a file header to hooks/, scripts/, commands/ or agents/, when a header has grown past what a reader needs, or when…
foundry-config-setup
Resolve missing setup caused by a hardcoded Foundry project endpoint or model in a sample. Use when a sample fails because it uses a placeholder/hardcoded projectendpoint (for example "https://your-project.services.ai.azure.com") or a hardcoded model instead of reading them from the environment.
gsd-audit-milestone
Audit milestone completion against original intent before archiving.
spec-kitty-charter-doctrine
Run charter interview, generation, context, and sync workflows for project governance in Spec Kitty 3.x. Access doctrine artifacts programmatically via DoctrineService. Resolve agent profiles. Load action-scoped governance context iteratively, not all at once. Triggers: "interview for charter", "generate charter"…
conductor-implement
Executes the tasks defined in the specified track's plan. Use this to start or continue working on a feature, bug fix, or chore.