refactor(skills): replace 'project' with 'workspace' scope (#16380)

This commit is contained in:
N. Taylor Mullen
2026-01-14 13:05:26 -08:00
committed by GitHub
parent b3eecc3a50
commit c8c7b57a79
8 changed files with 56 additions and 26 deletions
@@ -35,9 +35,9 @@ describe('SkillManager', () => {
vi.restoreAllMocks();
});
it('should discover skills from extensions, user, and project with precedence', async () => {
it('should discover skills from extensions, user, and workspace with precedence', async () => {
const userDir = path.join(testRootDir, 'user');
const projectDir = path.join(testRootDir, 'project');
const projectDir = path.join(testRootDir, 'workspace');
await fs.mkdir(path.join(userDir, 'skill-a'), { recursive: true });
await fs.mkdir(path.join(projectDir, 'skill-b'), { recursive: true });
@@ -92,9 +92,9 @@ description: project-desc
expect(names).toContain('skill-project');
});
it('should respect precedence: Project > User > Extension', async () => {
it('should respect precedence: Workspace > User > Extension', async () => {
const userDir = path.join(testRootDir, 'user');
const projectDir = path.join(testRootDir, 'project');
const projectDir = path.join(testRootDir, 'workspace');
await fs.mkdir(path.join(userDir, 'skill'), { recursive: true });
await fs.mkdir(path.join(projectDir, 'skill'), { recursive: true });
+3 -3
View File
@@ -39,8 +39,8 @@ export class SkillManager {
}
/**
* Discovers skills from standard user and project locations, as well as extensions.
* Precedence: Extensions (lowest) -> User -> Project (highest).
* Discovers skills from standard user and workspace locations, as well as extensions.
* Precedence: Extensions (lowest) -> User -> Workspace (highest).
*/
async discoverSkills(
storage: Storage,
@@ -62,7 +62,7 @@ export class SkillManager {
const userSkills = await loadSkillsFromDir(Storage.getUserSkillsDir());
this.addSkillsWithPrecedence(userSkills);
// 4. Project skills (highest precedence)
// 4. Workspace skills (highest precedence)
const projectSkills = await loadSkillsFromDir(
storage.getProjectSkillsDir(),
);