From dd7b30e96fc7e859619d7d4581f2bcded70eba4d Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 7 Aug 2026 11:27:55 +0000 Subject: [PATCH 1/2] =?UTF-8?q?docs(pm-dispatch):=20mode:cloud=20=E4=B8=80?= =?UTF-8?q?=E6=AC=A1=E6=80=A7=E4=BA=91=E5=8D=A1=E6=94=B9=E7=94=A8=20create?= =?UTF-8?q?=5Fsession,=E9=99=84=E9=A6=96=E6=B4=BE=E5=AE=9E=E6=B5=8B?= =?UTF-8?q?=E4=B8=89=E8=AF=BE(=E7=BB=B4=E6=8A=A4=E8=80=85=202026-08-07=20?= =?UTF-8?q?=E6=8B=8D=E6=9D=BF)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 一次性云卡 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 Claude-Session: https://claude.ai/code/session_011M7UwH25Unfi73UHim7ajY --- .claude/skills/pm-dispatch/SKILL.md | 39 ++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/.claude/skills/pm-dispatch/SKILL.md b/.claude/skills/pm-dispatch/SKILL.md index a68f272173..7ecedb4d5e 100644 --- a/.claude/skills/pm-dispatch/SKILL.md +++ b/.claude/skills/pm-dispatch/SKILL.md @@ -1284,18 +1284,33 @@ same environment — its own container and fresh clone, decoupled from the PM session's lifetime. Use it when devs need resources/lifetime beyond one container, or the maintainer asks for it. Requires the `Claude_Code_Remote` MCP tools (available in remote/web sessions; if absent, say so and fall back -to `mode:subagent`). Per issue: - -1. `create_trigger` with `create_new_session_on_fire: true` and no schedule - (poke-only), name `pm-dispatch-issue-`, prompt = the dispatch template - below **made fully standalone**: the fired session starts with zero - conversation context (it does get the repo clone, so it can be told to - follow `.claude/agents/os-dev.md`), and — since an independent session - cannot return a message to the PM — it must be told to **post the JSON - report as a comment on the issue** (prefixed ``) - instead of returning it, in addition to opening the draft PR. -2. `fire_trigger` to launch it, then `delete_trigger` once the report has - been collected (step 6) so poke-only triggers don't accumulate. +to `mode:subagent`). + +**一次性云卡用 `create_session`,⛔ 不用 create_trigger+fire**(维护者 +2026-08-07 拍板;trigger 流只保留给**定时/重复**型 —— 座位 Routine 一节)。 +实测三课,#6083 首派一天踩齐,每一条都写进派发动作: + +1. **授权面随 source,不随环境。** trigger 拉起的会话**没有仓库授权** —— + clone(匿名只读)可用,push / 开 PR / 发评论全 403(`not in this + session's authorized repository set`),`permission_mode: auto` 下也没有 + 可弹的授权窗,dev 只能做只读勘察。`create_session` 带 `source_url` 的 + 会话**出生即持推送授权**。同时带 `outcome_branch`(= 认领分支,平台托管 + 推送)与显式 `model`(trigger 流不可指模型 —— sonnet 默认惊吓即此出处)、 + `title`(客户端卡片名,维护者按卡片旁观)。 +2. **派发词必须带自驱条款(回合终点约束)。** 云会话是对话形态 —— 回合结束 + 就停下等输入,不像 subagent 一口气跑完;不写这条,dev 会在中期汇报或提问 + 处停摆,而 PM 只能靠 poke 唤醒。条款原文形:⛔ 不为提问/中期汇报结束回合; + 开放选择按裁决与三轴自裁记入终报 open_questions;合法回合终点只有 + (a) 推送完成 + 终报 JSON 作为最后一条消息,或 (b) 硬阻塞详报。 +3. **交付通道写明降级路径。** 云会话通常没有 GitHub API 工具(连接器不随 + create_session/trigger 传递),派发词写明:开 PR / 发评论失败 ⛔ 不视为 + 阻塞 —— 推送 outcome branch + 终报作最后一条会话消息,**PM 代开 draft + PR、代转录报告**到 issue(权限面不因此放大)。 + +**监控与转向**:`get_session` 读实时状态(status / model / token 用量; +IDLE + 分支未推送 = 停摆待 poke);投递消息用**绑定会话的 poke 触发器** +(`create_trigger` 带 `persistent_session_id` + `fire_trigger` + 用后即 +`delete_trigger`)。收报:巡检主动读会话终报与分支推送,⛔ 不等推送通知。 #### 座位 Routine 化(PM 侧的运行形态,#5472 第 5 点) From 06bc01bd8a29b2e49fe4e0c46f45bb2c3f19d535 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 7 Aug 2026 11:35:10 +0000 Subject: [PATCH 2/2] =?UTF-8?q?docs(pm-dispatch):=20=E4=BA=91=E5=8D=A1=20t?= =?UTF-8?q?itle=20=E4=BB=A5=E8=BD=A6=E9=81=93=E5=90=8D=E5=BC=80=E5=A4=B4,?= =?UTF-8?q?=E4=B8=8D=E5=8F=AB=20os-dev(=E7=BB=B4=E6=8A=A4=E8=80=85=202026-?= =?UTF-8?q?08-07=20=E6=8B=8D=E6=9D=BF)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 多车道并行时维护者按卡片名扫车道;命名形 ⚡ <车道> #<单号> <短语>。 Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_011M7UwH25Unfi73UHim7ajY --- .claude/skills/pm-dispatch/SKILL.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.claude/skills/pm-dispatch/SKILL.md b/.claude/skills/pm-dispatch/SKILL.md index 7ecedb4d5e..0fcf0f8f3d 100644 --- a/.claude/skills/pm-dispatch/SKILL.md +++ b/.claude/skills/pm-dispatch/SKILL.md @@ -1296,7 +1296,9 @@ to `mode:subagent`). 可弹的授权窗,dev 只能做只读勘察。`create_session` 带 `source_url` 的 会话**出生即持推送授权**。同时带 `outcome_branch`(= 认领分支,平台托管 推送)与显式 `model`(trigger 流不可指模型 —— sonnet 默认惊吓即此出处)、 - `title`(客户端卡片名,维护者按卡片旁观)。 + `title`(客户端卡片名 —— **以车道名开头,⛔ 不叫 os-dev**,维护者 + 2026-08-07 拍板:多车道并行时卡片按车道可扫;形如 + `⚡ spec #5599 view 身份前置(裁 B)`,即 `⚡ <车道> #<单号> <短语>`)。 2. **派发词必须带自驱条款(回合终点约束)。** 云会话是对话形态 —— 回合结束 就停下等输入,不像 subagent 一口气跑完;不写这条,dev 会在中期汇报或提问 处停摆,而 PM 只能靠 poke 唤醒。条款原文形:⛔ 不为提问/中期汇报结束回合;