Skip to content

Commit f522840

Browse files
bradygasterCopilot
andauthored
fix: skills export path + init workflow filtering (#847)
- Export now reads skills from both .ai-team/skills/ and .copilot/skills/ - Init no longer copies CI/CD workflows (squad-ci, squad-release, etc.) to .github/workflows/ — those are upgrade-only Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 029728a commit f522840

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

‎index.cjs‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1061,10 +1061,12 @@ if (cmd === 'export') {
10611061

10621062
// Read skills
10631063
const skillsDir = path.join(dest, '.ai-team', 'skills');
1064+
const copilotSkillsDir = path.join(dest, '.copilot', 'skills');
1065+
const skillsDirs = [skillsDir, copilotSkillsDir].filter(d => fs.existsSync(d));
10641066
try {
1065-
if (fs.existsSync(skillsDir)) {
1066-
for (const entry of fs.readdirSync(skillsDir)) {
1067-
const skillFile = path.join(skillsDir, entry, 'SKILL.md');
1067+
for (const sDir of skillsDirs) {
1068+
for (const entry of fs.readdirSync(sDir)) {
1069+
const skillFile = path.join(sDir, entry, 'SKILL.md');
10681070
if (fs.existsSync(skillFile)) {
10691071
manifest.skills.push(fs.readFileSync(skillFile, 'utf8'));
10701072
}
@@ -1834,9 +1836,11 @@ if (fs.existsSync(workflowsSrc) && fs.statSync(workflowsSrc).isDirectory()) {
18341836
}
18351837
console.log(`${GREEN}✓${RESET} ${BOLD}upgraded${RESET} squad workflow files (${workflowFiles.length} workflows)`);
18361838
} else {
1839+
// During init, only copy framework workflows — CI/CD workflows are installed by upgrade
1840+
const initWorkflows = workflowFiles.filter(f => !PROJECT_TYPE_SENSITIVE_WORKFLOWS.has(f));
18371841
fs.mkdirSync(workflowsDest, { recursive: true });
18381842
let copied = 0;
1839-
for (const file of workflowFiles) {
1843+
for (const file of initWorkflows) {
18401844
const destFile = path.join(workflowsDest, file);
18411845
if (fs.existsSync(destFile)) {
18421846
console.log(`${DIM}${file} already exists — skipping (run 'upgrade' to update)${RESET}`);

0 commit comments

Comments
 (0)