feat: claude-code command 文件加 rune- 前缀
This commit is contained in:
@@ -11,7 +11,7 @@ export async function injectClaudeCode(projectRoot: string): Promise<void> {
|
|||||||
|
|
||||||
const commandDir = join(projectRoot, COMMANDS_DIR);
|
const commandDir = join(projectRoot, COMMANDS_DIR);
|
||||||
await mkdir(commandDir, { recursive: true });
|
await mkdir(commandDir, { recursive: true });
|
||||||
const commandPath = join(commandDir, `${stage}.md`);
|
const commandPath = join(commandDir, `rune-${stage}.md`);
|
||||||
if (!existsSync(commandPath)) {
|
if (!existsSync(commandPath)) {
|
||||||
const cmd = hasChangeName
|
const cmd = hasChangeName
|
||||||
? `rune ${stage} <变更名>`
|
? `rune ${stage} <变更名>`
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ describe("runInit", () => {
|
|||||||
it("注入 OpenCode command 和 skill", async () => {
|
it("注入 OpenCode command 和 skill", async () => {
|
||||||
await runInit(TMP_DIR, ["opencode"]);
|
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);
|
expect(existsSync(join(TMP_DIR, ".opencode", "skills", "rune-discuss.md"))).toBe(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ describe("完整 SDD 流程", () => {
|
|||||||
it("init → discuss → plan → build → archive 完整流程", async () => {
|
it("init → discuss → plan → build → archive 完整流程", async () => {
|
||||||
await runInit(TMP_DIR, ["opencode"]);
|
await runInit(TMP_DIR, ["opencode"]);
|
||||||
expect(existsSync(join(TMP_DIR, ".rune", "config.yaml"))).toBe(true);
|
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 config = await loadConfig(TMP_DIR);
|
||||||
const discussPrompt = assembleDiscussPrompt(config);
|
const discussPrompt = assembleDiscussPrompt(config);
|
||||||
|
|||||||
Reference in New Issue
Block a user