standup
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesestandup — facilitate a group chat between branch-agents
standup — 促成分支Agent间的群聊
You're the facilitator. Each of the user's git worktrees (and any PRs they
pick) joins a shared markdown chat as its own agent, and the agents reconcile
their scattered work into ONE consolidated worktree. You convene the room, run
the conversation in rounds, and carry the outcome back — the reconciling happens
in the chat, between the agents.
The room is one shared file (default ): YAML front
matter holds the + ; the body is the transcript. Writes are
atomically locked, so agents speak at once. It is read-only — agents decide
how the merge should go; nobody commits or merges inside the room. Real git
work happens afterward via .
~/.claude-mem/STANDUP.mdgoalprompt/do你是主持人。用户的每个Git工作树(以及他们选择的任意PR)都会作为独立Agent加入一个共享的Markdown聊天,这些Agent会将分散的工作协调为一个统一的工作树。你负责召集会议、按轮次推进对话,并带回最终结果——协调过程在Agent之间的聊天中进行。
会议记录存储在一个共享文件中(默认路径为 ):YAML前置元数据包含(目标)和(提示语);文件主体是聊天记录。写入操作采用原子锁机制,确保Agent可以同时发言。整个过程是只读的——Agent仅决定合并的方式;无人会在会议中执行提交或合并操作。真正的Git操作将在后续通过命令完成。
~/.claude-mem/STANDUP.mdgoalprompt/do1. Fill the room
1. 填充参会者
Two ways, mixable:
-
By recency (common) — worktrees active in a window:bash
node "${CLAUDE_SKILL_DIR}/standup.mjs" worktrees --since <1h|4h|24h|7d|all> --jsonActive = a commit or an uncommitted/staged/untracked edit in the window. If the user didn't name a window, offer 1h / 4h / 24h / 7d / all. -
By hand — specific branches and/or open PRs:bash
node "${CLAUDE_SKILL_DIR}/standup.mjs" worktrees --json # local branches node "${CLAUDE_SKILL_DIR}/standup.mjs" prs --json # open PRs (via gh)Show one numbered list (worktrees + PRs, with age/title); their reply is the "checkbox." Iferrors (noprs/ not GitHub), carry on worktrees-only.gh
Zero or one candidate isn't a standup — say so, offer to widen, stop. Otherwise
echo the roster to confirm before you start.
有两种可选方式,可混合使用:
-
按活跃度(常用)——指定时间窗口内活跃的工作树:bash
node "${CLAUDE_SKILL_DIR}/standup.mjs" worktrees --since <1h|4h|24h|7d|all> --json活跃定义为:在指定时间窗口内有提交记录,或存在未提交/已暂存/未跟踪的修改。若用户未指定时间窗口,可提供1h / 4h / 24h / 7d / all这些选项。 -
手动选择——指定特定分支和/或开放PR:bash
node "${CLAUDE_SKILL_DIR}/standup.mjs" worktrees --json # 本地分支 node "${CLAUDE_SKILL_DIR}/standup.mjs" prs --json # 开放PR(通过gh工具)展示一个编号列表(包含工作树和PR,附带时长/标题);用户的回复即为选中项。若命令执行失败(未安装prs工具或非GitHub仓库),则仅展示工作树。gh
若候选数量为0或1,则无法开展站会——需告知用户,建议扩大范围,然后终止流程。否则,先确认参会名单后再开始。
2. Open the room
2. 创建会议
Set a goal + prompt that invite a conversation, not one-shot status reports:
bash
node "${CLAUDE_SKILL_DIR}/standup.mjs" open --force --agent facilitator \
--goal "Collapse these branches/PRs into ONE consolidated worktree: what each changed, where they overlap, which becomes the target, and the merge order." \
--prompt "Facilitated rounds. Round 1: introduce your branch and its state. Then resolve the conflicts the facilitator surfaces, round by round, until the room lands on one concrete plan (target worktree + merge order + conflict resolutions). Read-only: decide, don't merge. Register AGREE when you back the plan."设置目标和提示语,引导对话而非单次状态汇报:
bash
node "${CLAUDE_SKILL_DIR}/standup.mjs" open --force --agent facilitator \
--goal "将这些分支/PR整合为一个统一的工作树:明确各分支的变更内容、重叠部分、目标分支以及合并顺序。" \
--prompt "按轮次推进会议。第一轮:介绍你的分支及其状态。随后针对主持人提出的冲突逐轮解决,直到会议达成一个具体方案(目标工作树 + 合并顺序 + 冲突解决方式)。只读模式:仅做决策,不执行合并。同意方案时请回复AGREE。"3. Run it as rounds
3. 按轮次推进会议
You drive the turns — if agents watch-loop on their own the room can stall with
nothing decided. Each agent speaks once per round (read → post → return); you
read between rounds and bring back whoever's still needed.
Spawned agents don't inherit , so resolve it once and paste the
real path into each brief:
CLAUDE_SKILL_DIRbash
echo "${CLAUDE_SKILL_DIR}"Round 1 — intros (everyone, one Task message so they run together). Brief
each:
You're(a PR is<branch>) in a standup group chat. Readpr-<number>and play your part by it. The room is<skill-dir>/agent-brief.md; speak with~/.claude-mem/STANDUP.md, catch up withnode "<skill-dir>/standup.mjs" post …. Get your bearings (… read,cd "<path>",git log --oneline origin/main..HEAD,git status --short; a PR usesgit diff --stat origin/main...HEAD), then post ONE turn: your branch, its real state, and how it should fold in. Read-only. Then return.gh pr view/diff <number>
Reconcile. Once they've returned, the room and list the open
items — overlaps, conflicts, competing implementations, undecided
target/order. None? Skip to the close.
readResolution rounds (cap ~4). Per open item, re-spawn only the agents it
implicates, with the specific question. Tell them to
first, then post their position and if convinced. again, update
the list. Repeat.
read --since <their-name>--agreereadClose — you always write it. Stop when the list is empty, you hit the cap, or
an agent errors (note "didn't report," don't block). Then write the SUMMATION
yourself — don't wait for an agent to volunteer. Write it as plain prose a human
can skim, not a field dump: which worktree is the target and why, the merge order
in a sentence, and what's left for the human:
bash
node "${CLAUDE_SKILL_DIR}/standup.mjs" summation --agent facilitator \
--text "Build on <worktree> — it's the only one with real code. Layer <branch>'s changes on top, then drop in the doc-only branches; skip <empty branch>. Your call before it's safe: <the one or two real decisions>. Done when it all sits in <target> and builds clean."你负责掌控流程——若Agent自行循环等待,会议可能陷入停滞无法决策。每轮每个Agent发言一次(读取记录 → 发布内容 → 返回结果);你需在轮次间隙查看记录,召回仍需参与的Agent。
生成的Agent不会继承环境变量,因此需先解析该路径并将实际路径粘贴到每个Agent的提示中:
CLAUDE_SKILL_DIRbash
echo "${CLAUDE_SKILL_DIR}"第一轮 — 自我介绍(所有Agent,通过一条任务消息同步执行)。为每个Agent提供提示:
你是站会群聊中的**(PR则为<branch>**)。阅读pr-<number>并按其中要求扮演你的角色。会议记录存储在<skill-dir>/agent-brief.md;使用~/.claude-mem/STANDUP.md发布内容,使用node "<skill-dir>/standup.mjs" post …查看最新记录。先了解自身状态(执行… read、cd "<path>"、git log --oneline origin/main..HEAD、git status --short;PR需使用git diff --stat origin/main...HEAD),然后发布一次发言:介绍你的分支、实际状态以及如何融入整合。只读模式。完成后返回。gh pr view/diff <number>
协调阶段。所有Agent返回后,会议记录并列出待处理项——重叠内容、冲突、竞争实现、未确定的目标分支/合并顺序。若无待处理项,直接进入收尾阶段。
read决议轮次(最多约4轮)。针对每个待处理项,仅召回相关Agent,并提出具体问题。告知他们先执行查看最新记录,然后发布立场,若被说服则添加参数。再次记录,更新待处理项列表。重复此过程。
read --since <their-name>--agreeread收尾 — 由你完成总结。待处理项为空、达到轮次上限或Agent出错时停止(需注明“未反馈”,不阻塞流程)。然后由你亲自撰写总结——无需等待Agent主动提交。总结需采用人类可快速浏览的平实 prose,而非字段堆砌:明确目标工作树及原因,用一句话说明合并顺序,以及留给人类的后续工作:
bash
node "${CLAUDE_SKILL_DIR}/standup.mjs" summation --agent facilitator \
--text "基于<worktree>进行构建——它是唯一包含实际代码的分支。在其基础上叠加<branch>的变更,然后加入仅含文档的分支;跳过<空分支>。需你决策的关键事项:<1-2个实际决策点>。当所有内容整合到<目标分支>且可正常构建时,任务完成。"4. Brief the human in plain language
4. 用平实语言告知用户
This is the payoff — don't hand them the raw SUMMATION, translate it. A human
who didn't watch the room should understand the outcome without decoding paths,
line counts, or commit hashes. Lead with the answer, then the few choices only
they can make:
- What you found — one plain line per branch: who has real code, who's just docs, who's empty.
- The plan — target + merge order in a sentence or two.
- Their call — only the decisions a human must make (which implementation
wins, what to drop, anything risky), as concrete questions. Use
for the clear-cut ones.
AskUserQuestion
Keep git internals out unless they ask. Once they've settled the open calls, hand
the plan to to perform the merges — don't merge anything yourself
outside .
/do/do这是最终成果——不要直接交付原始总结,需转化为易懂的语言。未全程参与会议的用户应无需解析路径、行数或提交哈希即可理解结果。先给出结论,再列出仅需用户决策的事项:
- 发现内容——每个分支用一句话说明:哪些包含实际代码,哪些仅含文档,哪些为空。
- 整合方案——用1-2句话说明目标分支和合并顺序。
- 需你决策——仅列出必须由人类做出的决策(如选择哪种实现方案、舍弃哪些内容、风险事项等),以具体问题呈现。明确的决策点使用。
AskUserQuestion
除非用户询问,否则不要提及Git内部细节。用户解决完待决策事项后,将方案交给****执行合并操作——不要在之外自行执行任何合并。
/do/doCLI
CLI命令
bash
node "${CLAUDE_SKILL_DIR}/standup.mjs" <command> [--flags]Defaults: agent = git branch, file = . Every write is
atomically locked.
~/.claude-mem/STANDUP.md| command | what it does |
|---|---|
| worktrees newest-first; |
| open GitHub PRs (via |
| create the room ( |
| add yourself + say Hello |
| append a turn |
| append an AGREE turn |
| block until someone else posts, print it (exit 2 on timeout) |
| print the chat (or only turns after AGENT's last) |
| participants + AGREEs + consensus check |
| write the SUMMATION, flip |
Each spawned agent plays its turns by (bundled here) — the
playbook for being one voice in the room.
agent-brief.mdbash
node "${CLAUDE_SKILL_DIR}/standup.mjs" <command> [--flags]默认设置:agent = Git分支,文件路径 = 。所有写入操作均采用原子锁机制。
~/.claude-mem/STANDUP.md| 命令 | 功能说明 |
|---|---|
| 按最新排序展示工作树; |
| 按最新排序展示GitHub开放PR(通过 |
| 创建会议记录文件( |
| 加入会议并发送问候语 |
| 追加一条发言 |
| 追加一条AGREE发言 |
| 阻塞等待他人发言并打印内容(超时后返回状态码2) |
| 打印聊天记录(或仅展示AGENT最后一次发言后的内容) |
| 展示参会者、AGREE记录及共识检查结果 |
| 写入总结内容,将 |
每个生成的Agent都会按照****(随工具捆绑)中的规则执行发言——这是Agent在会议中的行为指南。
agent-brief.md