Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions index.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Comment on lines +1065 to +1069

Copilot AI Apr 5, 2026

Copy link

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.md path. Consider treating .copilot/skills as the canonical source when present (fallback to .ai-team/skills only if it’s absent), or de-duplicating by skill directory name / parsed name: so each exported skill is unique and stable.

Copilot uses AI. Check for mistakes.
if (fs.existsSync(skillFile)) {
manifest.skills.push(fs.readFileSync(skillFile, 'utf8'));
}
Expand Down Expand Up @@ -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

Copilot AI Apr 5, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Init now filters out CI/CD workflows via initWorkflows, but the later “all squad workflows already exist — skipping” condition/message still keys off workflowFiles.length. On a re-run of init, this message becomes misleading because the filtered CI/CD workflows won’t exist by design. Consider basing the condition/message on initWorkflows (e.g., “all init workflows already exist”) so the output matches the new behavior.

Copilot uses AI. Check for mistakes.
const destFile = path.join(workflowsDest, file);
if (fs.existsSync(destFile)) {
console.log(`${DIM}${file} already exists — skipping (run 'upgrade' to update)${RESET}`);
Expand Down
Loading