feat(agents): add /pm-dispatch PM loop and os-dev developer subagent - #4540
Merged
Conversation
Adds a project-manager dispatch mechanism for Claude Code sessions: - .claude/skills/pm-dispatch/SKILL.md — the PM agent protocol: pull ready issues from the GitHub backlog (pm:queue label or explicit list), claim them, dispatch each to a parallel os-dev subagent, verify the returned reports against GitHub (PR exists, scope, test evidence), then dispatch the next batch. Uncertainties are escalated as needs-user-decision issues for the maintainer instead of guessed at. All loop state lives in GitHub (labels/assignees/PRs), so the loop is resumable from a fresh session. - .claude/agents/os-dev.md — the single-issue developer subagent: own worktree, branch claude/issue-<n>-<slug>, implementation + tests + changeset, draft PR, structured JSON report back to the PM; returns needs_decision instead of guessing on contract-shaping ambiguity. Both are internal agent tooling (metadata.internal: true), outside the published skills/ catalog. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012C2cd7tL8QDoZ2QKN3djJ5
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012C2cd7tL8QDoZ2QKN3djJ5
…pendent cloud session mode:cloud spawns one fresh cloud session per issue via Claude_Code_Remote poke-only triggers (create_trigger + fire_trigger), with report collection through GitHub issue comments and send_later sweeps, since an independent session has no direct return channel to the PM. Default stays mode:subagent. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012C2cd7tL8QDoZ2QKN3djJ5
…loud) - One main backlog in objectstack; repo:objectui / repo:cloud labels route the dev agent's target repo while the issue stays in the backlog. - Contract-first splitting for cross-repo features: parent + per-repo sub-issues, spec/backend first, Blocked-by lines gate downstream dispatch (verified against GitHub at selection time). - Linkage chores become pm:queue issues (e.g. objectui accept => file the objectui:refresh console-bump chore in objectstack). - Label setup now covers all three repos + routing labels on the backlog. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012C2cd7tL8QDoZ2QKN3djJ5
…lations Every escalated option must be analyzed on (1) long-term architectural soundness for this project (North Star, no workarounds, contract-first) and (2) making AI-written code — especially AI-authored metadata apps — structurally hard to get wrong (strict schemas, publish-time rejection, declared = enforced, never lenient consumer fallbacks). Applied to both the PM's [decision] issue template and the os-dev needs_decision report. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012C2cd7tL8QDoZ2QKN3djJ5
This was referenced Aug 2, 2026
os-zhuang
marked this pull request as ready for review
August 2, 2026 01:51
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
目的
在 Claude Code 中构建「项目经理 agent 派发任务」机制:PM agent 从 issue 清单中挑选、认领并派发任务给并行的开发 agent;开发 agent 完成后以结构化 JSON 回报;PM 逐项复核后派发下一批。过程中遇到需要维护者拍板的不确定性,不猜测,而是创建
needs-user-decisionissue 等待确认。内容
.claude/skills/pm-dispatch/SKILL.md— PM agent 的运行规程(/pm-dispatch触发):pm:queue/pm:dispatched/needs-user-decision、assignee、PR 关联),不依赖任何本地状态,新会话可直接续跑。mode:subagent(默认,会话内并行子 agent,回报无损)与mode:cloud(每个 issue 一个独立云端会话,经 poke-only trigger 拉起;回报走 issue 评论 +send_later定时收取)。objectstack/ frontendobjectui/ cloud):主 backlog 统一在 objectstack,repo:objectui/repo:cloud标签路由代码落地仓库;跨仓功能按契约优先拆分(父 issue + 每仓 sub-issue,spec/后端先行),Blocked-by:未合并不派发;联动收尾(如 objectui 合并后的objectui:refresh回灌)由 PM 自动生成跟进 issue。Fixes #n、无content/docs/releases/改动、changeset 到位、测试证据是真实输出。裁决 ACCEPT / REWORK(最多返工 2 轮)/ ESCALATE。[决策]issue 必须沿 ① 项目长远合理性(北极星、no workarounds、contract-first)与 ② 防 AI 写代码犯错、尤其防 AI 写元数据 app 犯错(严格 schema、发布时响亮拒绝、declared = enforced、拒绝消费端宽容回退)两条轴分析各方案并给出建议;两轴冲突时如实呈现交维护者拍板。.claude/agents/os-dev.md— 单 issue 开发子 agent 定义:claude/issue-<n>-<slug>、实现 + 测试 + changeset、推送、draft PR。needs_decision而不是猜,且必须按上述两条评估轴分析各选项;顺带发现的问题按 Prime Directive chore: version packages #10 另开 issue,不塞进本 PR。备注
skills/发布目录之外,已按template-consistency.test.ts的要求打上metadata.internal: true(已用同一正则本地校验通过)。.claude/工具改动,不发布任何 package,已按门禁要求附空 frontmatter changeset(sanctioned 的 "this PR releases nothing" 声明)。🤖 Generated with Claude Code
https://claude.ai/code/session_012C2cd7tL8QDoZ2QKN3djJ5