From 4ea60f76796e003c20b7efae187019c4364431da Mon Sep 17 00:00:00 2001 From: lanyuanxiaoyao Date: Mon, 8 Jun 2026 18:38:48 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20claude-code=20command=20=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=8A=A0=20rune-=20=E5=89=8D=E7=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/adapters/claude-code.ts | 2 +- tests/commands/init.test.ts | 2 +- tests/integration/flow.test.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/adapters/claude-code.ts b/src/adapters/claude-code.ts index 82187e0..5a31dcf 100644 --- a/src/adapters/claude-code.ts +++ b/src/adapters/claude-code.ts @@ -11,7 +11,7 @@ export async function injectClaudeCode(projectRoot: string): Promise { const commandDir = join(projectRoot, COMMANDS_DIR); await mkdir(commandDir, { recursive: true }); - const commandPath = join(commandDir, `${stage}.md`); + const commandPath = join(commandDir, `rune-${stage}.md`); if (!existsSync(commandPath)) { const cmd = hasChangeName ? `rune ${stage} <变更名>` diff --git a/tests/commands/init.test.ts b/tests/commands/init.test.ts index 887a947..1675300 100644 --- a/tests/commands/init.test.ts +++ b/tests/commands/init.test.ts @@ -41,7 +41,7 @@ describe("runInit", () => { it("注入 OpenCode command 和 skill", async () => { await runInit(TMP_DIR, ["opencode"]); - expect(existsSync(join(TMP_DIR, ".opencode", "commands", "discuss.md"))).toBe(true); + expect(existsSync(join(TMP_DIR, ".opencode", "commands", "rune-discuss.md"))).toBe(true); expect(existsSync(join(TMP_DIR, ".opencode", "skills", "rune-discuss.md"))).toBe(true); }); diff --git a/tests/integration/flow.test.ts b/tests/integration/flow.test.ts index a050546..ef46c45 100644 --- a/tests/integration/flow.test.ts +++ b/tests/integration/flow.test.ts @@ -26,7 +26,7 @@ describe("完整 SDD 流程", () => { it("init → discuss → plan → build → archive 完整流程", async () => { await runInit(TMP_DIR, ["opencode"]); expect(existsSync(join(TMP_DIR, ".rune", "config.yaml"))).toBe(true); - expect(existsSync(join(TMP_DIR, ".opencode", "commands", "discuss.md"))).toBe(true); + expect(existsSync(join(TMP_DIR, ".opencode", "commands", "rune-discuss.md"))).toBe(true); const config = await loadConfig(TMP_DIR); const discussPrompt = assembleDiscussPrompt(config);