Skip to content

feat(skills): publish objectstack-pm-dispatch — the project-agnostic PM dispatch loop (#4607) - #4621

Merged
os-zhuang merged 1 commit into
mainfrom
claude/issue-4607-published-pm-dispatch-skill
Aug 2, 2026
Merged

feat(skills): publish objectstack-pm-dispatch — the project-agnostic PM dispatch loop (#4607)#4621
os-zhuang merged 1 commit into
mainfrom
claude/issue-4607-published-pm-dispatch-skill

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

Fixes #4607

做了什么

.claude/skills/pm-dispatch(仓库内部 PM 派发机制)的通用内核泛化为发布目录 skills/ 里的正式 skill:skills/objectstack-pm-dispatch/SKILL.md(807 行,无 metadata.internal,metadata.domain: process)。第三方 ObjectStack 项目(hotcrm、客户项目)可经 npx skills add objectstack-ai/objectstack/skills --skill objectstack-pm-dispatch 安装。

覆盖 issue 列出的全部内核内容:队列标签状态机与幂等标签初始化;认领协议(同账号竞态验证 + 跨账号 assignee 身份)与 ~24h 僵尸认领回收;backlog 持续分诊 + 派发前过时前提核查;批次独立性(文件不相交、Blocked-by 依赖不同批);复核契约(ACCEPT / REWORK≤2 / ESCALATE,以 GitHub 实况为准)与合并政策(复核过 + CI 绿 → merge queue 或按项目惯例);升级判据 + 两轴决策分析原文保留(项目长远合理性 × 防 AI 写代码犯错);多 PM 按仓库分片 + 分片登记表 + 跨分片移交;容器资源纪律(重型阶段 flock 互斥、堆上限、范围化构建、PID 精确操作、worktree 清理);内嵌通用开发 agent 规程模板(worktree-first、范围=issue、contract-first、JSON 报告契约、needs_decision 而非猜)——不依赖自定义 agent 类型。

Upstream reporting 节(维护者点名):应用项目发现平台缺陷时——先对照平台 main 做过时前提核查;最小复现 + 钉版本 + 引用被违反的契约;绝不在应用侧加容忍性 workaround;上报 issue 带 Part of <app>#N 回链、不打对方队列标签(平台侧 PM 自行分诊);应用侧任务以 Blocked-by: 挂起或钉版本登记书面解除条件。

配置约定:读取可选的 .claude/pm-dispatch.json(backlogRepo / repos / batch / mode / conventionsFile / routingLabelPrefix);无配置零配置起跑(当前仓库 = 唯一分片 = backlog)。所有项目特定门禁(分支命名、release-note 工件、测试命令、合并政策)从项目自己的 conventions 文件读取,冲突时项目文件优先

目录命名:objectstack-pm-dispatch 而非 issue 原文的 skills/pm-dispatch(请维护者确认)

issue 正文写的是 skills/pm-dispatch/SKILL.md,本 PR 落地为 skills/objectstack-pm-dispatch/,理由:

  1. 目录边界即命名空间边界。 发布目录里现有 9 个 skill 全部是 objectstack-* 前缀,frontmatter name 与目录名一致。skills CLI 的消费端 skill 命名空间是扁平的——裸名 pm-dispatch 在客户项目里极易与其他来源的同名 skill 冲突;前缀即厂商命名空间,与既有目录形态一致。
  2. 避免同仓库内同名双 skill。 内部版 .claude/skills/pm-dispatch 本 PR 不动(issue 边界要求)。若发布版也叫 pm-dispatch,本仓库的 agent 会同时看到两个同名 skill(内部版 + 发布版),加载哪个是随机的——这正是 fix(create-objectstack): scope skill installs to the curated skills/ catalog #3101 目录边界要防的混淆。前缀不同,两版并存无歧义,后续「内部版瘦身为发布版 + 内部配置」的演进也不需要改名。
  3. 注册表与文档生成器约定。 build-skill-docs.tsDISPLAY 注册表、skills/README.md 索引、skills-reference.mdx 全按 objectstack-* 组织;沿用前缀即零特例。

若维护者坚持 issue 原文的裸名,改名是一次 git mv + 注册表一行,成本极低——本 PR 先按目录既有惯例落地。

门禁与防回退验证(revert-proof)

  • pnpm --filter @objectstack/spec check:skill-docs ✅(生成物同步)
  • pnpm --filter @objectstack/spec check:skill-refs ✅(process skill 无 Zod 引用,SKILL_MAP 不涉及)
  • packages/create-objectstack template-consistency.test.ts:18/18 ✅(含目录边界 4 项)
  • 反向验证(改完即还原,证明门禁真实拦截):
    • 还原生成的 README/reference 两文件 → check:skill-docs exit 1(✗ … is out of date);
    • 删除 skill 目录但保留 DISPLAY 注册项 → exit 1(✗ DISPLAY entry without SKILL.md: objectstack-pm-dispatch);
    • 给发布版 frontmatter 加 metadata.internal: true → 边界测试 never marks a curated skills/ entry internal 失败
  • check:skill-examples 与本变更无关(新 skill 无 os:check 标记的 ts 代码块;该门禁在 CI 于 workspace build 之后运行)。

边界与 changeset

  • 内部版 .claude/skills/pm-dispatch 未动;
  • changeset .changeset/published-pm-dispatch-skill.md 空 frontmatter(不发布任何 npm 包:packages/specfiles 不含 scripts/,skills 目录经 skills CLI 从 git 直接分发);
  • 未触碰 content/docs/releases/

🤖 Generated with Claude Code

https://claude.ai/code/session_012C2cd7tL8QDoZ2QKN3djJ5


Generated by Claude Code

…PM dispatch loop (#4607)

Generalizes the repo-internal .claude/skills/pm-dispatch core into the
published skills/ catalog so any ObjectStack project (hotcrm, customer
projects) can install the loop with the skills CLI.

Project-specific rules are replaced by two seams: an optional
.claude/pm-dispatch.json (backlogRepo / repos / batch / mode /
conventionsFile / routingLabelPrefix, zero-config = current repo is the
only shard and the backlog), and pointers to the project's own conventions
file for gates, release-note artifacts, branch naming and merge policy.

The developer-agent procedure ships embedded as a paste-in template, so the
loop needs no custom agent types. Adds the upstream-reporting section for
platform defects found in an app project. The internal .claude version is
untouched.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012C2cd7tL8QDoZ2QKN3djJ5
@vercel

vercel Bot commented Aug 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
objectstack Ignored Ignored Aug 2, 2026 11:42am

Request Review

@github-actions github-actions Bot added size/l documentation Improvements or additions to documentation tooling and removed size/l labels Aug 2, 2026
@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

No hand-written docs reference the 0 changed package(s). ✅

@os-zhuang
os-zhuang marked this pull request as ready for review August 2, 2026 11:43
@os-zhuang
os-zhuang enabled auto-merge August 2, 2026 11:43
@os-zhuang
os-zhuang added this pull request to the merge queue Aug 2, 2026
Merged via the queue into main with commit 73d701f Aug 2, 2026
22 checks passed
@os-zhuang
os-zhuang deleted the claude/issue-4607-published-pm-dispatch-skill branch August 2, 2026 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

把 pm-dispatch 泛化为正式发布的 skill——任何 ObjectStack 项目(hotcrm、客户项目)可装即用,含平台问题上报规程

2 participants