fix(core): skills live in <cwd>/.volcanic/skills, next to the rest of the workspace config
This commit is contained in:
@@ -7,7 +7,7 @@ public sealed class SkillsChatTests
|
||||
{
|
||||
private static void WriteSkill(string workspace, string dir, string name, string description)
|
||||
{
|
||||
var path = Path.Combine(workspace, ".claude", "skills", dir);
|
||||
var path = Path.Combine(workspace, ".volcanic", "skills", dir);
|
||||
Directory.CreateDirectory(path);
|
||||
File.WriteAllText(Path.Combine(path, "SKILL.md"), $"---\nname: {name}\ndescription: {description}\n---\nInstructions");
|
||||
}
|
||||
@@ -17,13 +17,13 @@ public sealed class SkillsChatTests
|
||||
{
|
||||
await using var host = new ChatHost();
|
||||
await host.SendAsync("/skills");
|
||||
Assert.Equal("No skills yet. Ask me to write one, or put it in .claude/skills/<name>/SKILL.md.", host.LastReply());
|
||||
Assert.Equal("No skills yet. Ask me to write one, or put it in .volcanic/skills/<name>/SKILL.md.", host.LastReply());
|
||||
|
||||
WriteSkill(host.WorkspaceOf(), "trips", "trip-planner", "Plans trips");
|
||||
WriteSkill(host.WorkspaceOf(2002), "secret", "other-chat", "Belongs to another chat");
|
||||
await host.SendAsync("/skills");
|
||||
|
||||
Assert.Equal("Skills (.claude/skills/<name>/SKILL.md)\n• trip-planner – Plans trips", host.LastReply());
|
||||
Assert.Equal("Skills (.volcanic/skills/<name>/SKILL.md)\n• trip-planner – Plans trips", host.LastReply());
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -42,7 +42,7 @@ public sealed class SkillsChatTests
|
||||
|
||||
var prompt = host.Faux.Requests.Last().SystemPrompt!;
|
||||
Assert.Contains("<name>trip-planner</name>", prompt);
|
||||
Assert.Contains(Path.Combine(host.WorkspaceOf(), ".claude", "skills", "trips", "SKILL.md"), prompt);
|
||||
Assert.Contains(Path.Combine(host.WorkspaceOf(), ".volcanic", "skills", "trips", "SKILL.md"), prompt);
|
||||
Assert.DoesNotContain("other-chat", prompt);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ public class SkillCatalogTests
|
||||
public void Lists_workspace_skills_and_picks_up_new_ones_on_the_next_render()
|
||||
{
|
||||
var dir = Path.Combine(Path.GetTempPath(), "volcanic-prompt", Guid.NewGuid().ToString("N"));
|
||||
var skills = Path.Combine(dir, ".claude", "skills");
|
||||
var skills = Path.Combine(dir, ".volcanic", "skills");
|
||||
Directory.CreateDirectory(Path.Combine(skills, "pdf"));
|
||||
Directory.CreateDirectory(Path.Combine(skills, "no-description"));
|
||||
Directory.CreateDirectory(Path.Combine(skills, "folded"));
|
||||
@@ -141,7 +141,7 @@ public class SkillCatalogTests
|
||||
{
|
||||
Assert.Empty(SkillCatalog.Load(dir));
|
||||
var section = SkillCatalog.Render(dir, []);
|
||||
Assert.Contains(Path.Combine(dir, ".claude", "skills"), section);
|
||||
Assert.Contains(Path.Combine(dir, ".volcanic", "skills"), section);
|
||||
Assert.EndsWith("No skills yet.", section);
|
||||
}
|
||||
finally { Directory.Delete(dir, true); }
|
||||
|
||||
Reference in New Issue
Block a user