Repository navigation
fix: skills export path + init workflow filtering #847
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1061,10 +1061,12 @@ if (cmd === 'export') { | |
|
|
||
| // Read skills | ||
| const skillsDir = path.join(dest, '.ai-team', 'skills'); | ||
| const copilotSkillsDir = path.join(dest, '.copilot', 'skills'); | ||
| const skillsDirs = [skillsDir, copilotSkillsDir].filter(d => fs.existsSync(d)); | ||
| try { | ||
| if (fs.existsSync(skillsDir)) { | ||
| for (const entry of fs.readdirSync(skillsDir)) { | ||
| const skillFile = path.join(skillsDir, entry, 'SKILL.md'); | ||
| for (const sDir of skillsDirs) { | ||
| for (const entry of fs.readdirSync(sDir)) { | ||
| const skillFile = path.join(sDir, entry, 'SKILL.md'); | ||
| if (fs.existsSync(skillFile)) { | ||
| manifest.skills.push(fs.readFileSync(skillFile, 'utf8')); | ||
| } | ||
|
|
@@ -1834,9 +1836,11 @@ if (fs.existsSync(workflowsSrc) && fs.statSync(workflowsSrc).isDirectory()) { | |
| } | ||
| console.log(`${GREEN}✓${RESET} ${BOLD}upgraded${RESET} squad workflow files (${workflowFiles.length} workflows)`); | ||
| } else { | ||
| // During init, only copy framework workflows — CI/CD workflows are installed by upgrade | ||
| const initWorkflows = workflowFiles.filter(f => !PROJECT_TYPE_SENSITIVE_WORKFLOWS.has(f)); | ||
| fs.mkdirSync(workflowsDest, { recursive: true }); | ||
| let copied = 0; | ||
| for (const file of workflowFiles) { | ||
| for (const file of initWorkflows) { | ||
|
Comment on lines
+1839
to
+1843
|
||
| const destFile = path.join(workflowsDest, file); | ||
| if (fs.existsSync(destFile)) { | ||
| console.log(`${DIM}${file} already exists — skipping (run 'upgrade' to update)${RESET}`); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exporting skills from both .ai-team/skills and .copilot/skills can produce duplicates when a repo still has the legacy directory alongside the new one. On import, skills with the same
name:(or identical content) will silently overwrite each other because they’re written to the same.ai-team/skills/<skillName>/SKILL.mdpath. Consider treating.copilot/skillsas the canonical source when present (fallback to.ai-team/skillsonly if it’s absent), or de-duplicating by skill directory name / parsedname:so each exported skill is unique and stable.