From dc5ab571c8529987cd26adba4f88e77e1b148041 Mon Sep 17 00:00:00 2001 From: bradygaster Date: Sun, 5 Apr 2026 02:04:28 -0700 Subject: [PATCH] fix: skills export path + init workflow filtering MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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> --- index.cjs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/index.cjs b/index.cjs index 48e528641..2a23b7ff0 100644 --- a/index.cjs +++ b/index.cjs @@ -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) { const destFile = path.join(workflowsDest, file); if (fs.existsSync(destFile)) { console.log(`${DIM}${file} already exists — skipping (run 'upgrade' to update)${RESET}`);