Skip to content

Commit dd7b30e

Browse files
committed
docs(pm-dispatch): mode:cloud 一次性云卡改用 create_session,附首派实测三课(维护者 2026-08-07 拍板)
一次性云卡 create_session 取代 create_trigger+fire(后者只留定时/重复): 1) 授权面随 source —— trigger 会话无仓库授权,push/PR/评论全 403; create_session 带 source_url + outcome_branch + 显式 model + title; 2) 派发词必须带自驱条款(云会话回合结束即停,不写会中途停摆); 3) 交付通道降级路径(无 GitHub API 工具时推分支 + 终报走会话消息, PM 代开 PR 代转录)。附监控与转向手段(get_session / poke 触发器)。 出处:#6083 首派一天踩齐三课。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011M7UwH25Unfi73UHim7ajY
1 parent 773f80a commit dd7b30e

1 file changed

Lines changed: 27 additions & 12 deletions

File tree

.claude/skills/pm-dispatch/SKILL.md

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1284,18 +1284,33 @@ same environment — its own container and fresh clone, decoupled from the PM
12841284
session's lifetime. Use it when devs need resources/lifetime beyond one
12851285
container, or the maintainer asks for it. Requires the `Claude_Code_Remote`
12861286
MCP tools (available in remote/web sessions; if absent, say so and fall back
1287-
to `mode:subagent`). Per issue:
1288-
1289-
1. `create_trigger` with `create_new_session_on_fire: true` and no schedule
1290-
(poke-only), name `pm-dispatch-issue-<n>`, prompt = the dispatch template
1291-
below **made fully standalone**: the fired session starts with zero
1292-
conversation context (it does get the repo clone, so it can be told to
1293-
follow `.claude/agents/os-dev.md`), and — since an independent session
1294-
cannot return a message to the PM — it must be told to **post the JSON
1295-
report as a comment on the issue** (prefixed `<!-- os-dev-report -->`)
1296-
instead of returning it, in addition to opening the draft PR.
1297-
2. `fire_trigger` to launch it, then `delete_trigger` once the report has
1298-
been collected (step 6) so poke-only triggers don't accumulate.
1287+
to `mode:subagent`).
1288+
1289+
**一次性云卡用 `create_session`,⛔ 不用 create_trigger+fire**(维护者
1290+
2026-08-07 拍板;trigger 流只保留给**定时/重复**型 —— 座位 Routine 一节)。
1291+
实测三课,#6083 首派一天踩齐,每一条都写进派发动作:
1292+
1293+
1. **授权面随 source,不随环境。** trigger 拉起的会话**没有仓库授权** ——
1294+
clone(匿名只读)可用,push / 开 PR / 发评论全 403(`not in this
1295+
session's authorized repository set`),`permission_mode: auto` 下也没有
1296+
可弹的授权窗,dev 只能做只读勘察。`create_session``source_url`
1297+
会话**出生即持推送授权**。同时带 `outcome_branch`(= 认领分支,平台托管
1298+
推送)与显式 `model`(trigger 流不可指模型 —— sonnet 默认惊吓即此出处)、
1299+
`title`(客户端卡片名,维护者按卡片旁观)。
1300+
2. **派发词必须带自驱条款(回合终点约束)。** 云会话是对话形态 —— 回合结束
1301+
就停下等输入,不像 subagent 一口气跑完;不写这条,dev 会在中期汇报或提问
1302+
处停摆,而 PM 只能靠 poke 唤醒。条款原文形:⛔ 不为提问/中期汇报结束回合;
1303+
开放选择按裁决与三轴自裁记入终报 open_questions;合法回合终点只有
1304+
(a) 推送完成 + 终报 JSON 作为最后一条消息,或 (b) 硬阻塞详报。
1305+
3. **交付通道写明降级路径。** 云会话通常没有 GitHub API 工具(连接器不随
1306+
create_session/trigger 传递),派发词写明:开 PR / 发评论失败 ⛔ 不视为
1307+
阻塞 —— 推送 outcome branch + 终报作最后一条会话消息,**PM 代开 draft
1308+
PR、代转录报告**到 issue(权限面不因此放大)。
1309+
1310+
**监控与转向**:`get_session` 读实时状态(status / model / token 用量;
1311+
IDLE + 分支未推送 = 停摆待 poke);投递消息用**绑定会话的 poke 触发器**
1312+
(`create_trigger``persistent_session_id` + `fire_trigger` + 用后即
1313+
`delete_trigger`)。收报:巡检主动读会话终报与分支推送,⛔ 不等推送通知。
12991314

13001315
#### 座位 Routine 化(PM 侧的运行形态,#5472 第 5 点)
13011316

0 commit comments

Comments
 (0)