fix: CLI缺少参数友好提示、config.yaml注释模板、skill目录结构规范
This commit is contained in:
@@ -23,7 +23,10 @@ describe("injectOpenCode", () => {
|
||||
|
||||
for (const stage of ["discuss", "plan", "build", "archive"]) {
|
||||
expect(commands).toContain(`rune-${stage}.md`);
|
||||
expect(skills).toContain(`rune-${stage}.md`);
|
||||
expect(skills).toContain(`rune-${stage}`);
|
||||
expect(
|
||||
existsSync(join(TMP_DIR, ".opencode", "skills", `rune-${stage}`, "SKILL.md")),
|
||||
).toBe(true);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -34,7 +37,10 @@ describe("injectOpenCode", () => {
|
||||
const skills = await readdir(join(TMP_DIR, ".opencode", "skills"));
|
||||
|
||||
expect(commands).toContain("rune-status.md");
|
||||
expect(skills).toContain("rune-status.md");
|
||||
expect(skills).toContain("rune-status");
|
||||
expect(
|
||||
existsSync(join(TMP_DIR, ".opencode", "skills", "rune-status", "SKILL.md")),
|
||||
).toBe(true);
|
||||
});
|
||||
|
||||
it("command 文件包含 skill 调用指令", async () => {
|
||||
@@ -49,11 +55,12 @@ describe("injectOpenCode", () => {
|
||||
it("skill 文件包含 bash 命令", async () => {
|
||||
await injectOpenCode(TMP_DIR);
|
||||
const content = await readFile(
|
||||
join(TMP_DIR, ".opencode", "skills", "rune-discuss.md"),
|
||||
join(TMP_DIR, ".opencode", "skills", "rune-discuss", "SKILL.md"),
|
||||
"utf-8",
|
||||
);
|
||||
expect(content).toContain("rune discuss");
|
||||
expect(content).toContain("description");
|
||||
expect(content).toContain("name: rune-discuss");
|
||||
});
|
||||
|
||||
it("plan/build/archive skill 包含变更名称参数提示", async () => {
|
||||
@@ -61,7 +68,7 @@ describe("injectOpenCode", () => {
|
||||
|
||||
for (const stage of ["plan", "build", "archive"]) {
|
||||
const content = await readFile(
|
||||
join(TMP_DIR, ".opencode", "skills", `rune-${stage}.md`),
|
||||
join(TMP_DIR, ".opencode", "skills", `rune-${stage}`, "SKILL.md"),
|
||||
"utf-8",
|
||||
);
|
||||
expect(content).toContain("变更名");
|
||||
|
||||
Reference in New Issue
Block a user