📚 docs(dev-workflow): 修正 CLI-Core 依赖模型与发版流程口径 - #59
Merged
Conversation
- CLI 对 Core 的依赖描述:caret range → **精确 pin**(与 PR #53 引入的 CLI-pin-Core 联动制对齐;`version:set:core` 会自动同步 CLI 依赖 + 提示锁步 patch) - 明确 Core 兼容修复也必须 CLI 锁步 bump + 同发;仅改 CLI 自身代码时才允许 CLI 单独发 - 新增「发版执行步骤(CI 触发)」小节:标准流程走 GitHub Release 触发 `.github/workflows/publish-npm.yml`,才能拿到 npm 详情页的 provenance 勾;禁止本地 `npm publish` - 三端手写镜像同步(.claude / .cursor / .codex) 背景:本次 core-v3.8.0 / cli-v3.6.3 是本地直接 npm publish 发的,npm 详情页无 provenance 徽章。规则里那段过期的 caret range 描述误导了发版决策——本 PR 修回。
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.
背景
本次 core-v3.8.0 / cli-v3.6.3 发版由我在本地跑
npm publish完成,导致 npm 详情页缺 provenance 徽章(参见 https://www.npmjs.com/package/@double-coding/flow2spec 版本历史,3.6.2 有勾、3.6.3 没勾)。原因追溯:
.github/workflows/publish-npm.yml本来就存在,而且用 GitHub OIDC + trusted publishing +--provenance写得很完整——触发条件是release: published事件(不是 tag push)git push tags没到 GitHub 创 Release,workflow 没被触发,才走了本地npm publish.claude/rules/repo-dev-workflow-constraints.md里两段规则已过期:^3.5.0" —— PR 🚀 feat(cli): 版本联动制——CLI pin Core + update 整体更新与生效验证 #53(2026-08 引入 CLI-pin-Core 联动制)后已是精确 pin,规则文档没同步version:check/pack:check等本地门禁,没写 CI Release 才是正规发布通道规则不同步导致的结果:发版流程走了错的路径,npm 上 3.6.3 / 3.8.0 的 provenance 已不可补(npm 不允许对已发布版本重新签名)。
改动
版本模型小节
新增「发版执行步骤(CI 触发,不本地 npm publish)」小节
写清标准流程:
git checkout main && git pullgit tag core-vX.Y.Z && git tag cli-vX.Y.Z && git push --tagsversion:check --tag/npm test/pack:check/npm publish --provenance明确禁止:「本地跑
npm publish」——即便 hotfix 也应通过 workflow;若确因意外本地发布,须在发版 PR / Release notes 显式记录「本次发布无 provenance」。三端镜像
.claude/rules/*.md+.cursor/rules/*.mdc+.codex/topics/*.md同步修订(仓库内三端手写镜像)。门禁
flow2spec kb check --strict:knowledge check: ok / topics: 20 / routing drift: no后续动作(不阻塞本 PR)
下次发版(core-v3.8.1 / core-v3.9.0 等)时:
npm publish --provenance生效,新版本 provenance 勾回归相关
.github/workflows/publish-npm.yml(既有 workflow,本 PR 不动)