fix: npx 装 Claude Code 目标时补上 CLAUDE.md bootstrap#14
Merged
jnMetaCode merged 1 commit intomainfrom Apr 28, 2026
Merged
Conversation
之前 installForTarget 对 Trae/Gemini/Aider/Antigravity/Hermes 都会自动生成 bootstrap 规则(写到各自的 rules 文件),让模型知道"任何任务前先查 skill"。 唯独 .claude/ 分支只复制 skills 和 agents,不写 CLAUDE.md 引导。 结果:用户 npx superpowers-zh 装到 .claude/ 后,skill 文件都在,但模型 完全没被告知要主动用——提"加个导出功能"直接写代码,不会走 brainstorming → writing-plans 的方法论流程。手动 /brainstorming 能触发,自动不触发。 本次改动: - 新增 generateClaudeCodeBootstrap(),对齐 Gemini/Aider 的追加/创建逻辑 - installForTarget 的 .claude/ 分支调用它 - 默认回退分支(未检测到任何工具)也调用它 - 幂等:已包含 superpowers-zh 引用则跳过 - 已有 CLAUDE.md 则追加,保留用户原内容 本地验证四个场景:空项目 / 已有 CLAUDE.md / 二次装 / --tool claude,全部通过。 version bump: 1.1.8 -> 1.1.9
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.
问题
installForTarget对 Trae / Gemini / Aider / Antigravity / Hermes 都会自动生成 bootstrap 规则,写入对应工具的 rules 文件,告诉模型"任何任务前先查 skill"。唯独 Claude Code(.claude/分支)只复制 skills 和 agents,不写 CLAUDE.md 引导。后果:用户
npx superpowers-zh装到.claude/后 skill 文件都在,但模型完全没被告知要主动用——提"加个导出功能"会直接写代码,不会走brainstorming → writing-plans的方法论流程。手动/brainstorming能触发,自动不触发。改动
generateClaudeCodeBootstrap(),对齐 Gemini/Aider 的"追加 or 新建"逻辑installForTarget的.claude/分支调用它superpowers-zh引用则跳过CLAUDE.md则追加,保留用户原内容测试
本地验证四个场景,全部通过:
--tool claude强制指定version bump: 1.1.8 → 1.1.9