From d31068fde753d7c752f27ae3840caaf810483d40 Mon Sep 17 00:00:00 2001 From: Copilot Date: Sat, 25 Apr 2026 15:48:38 +0300 Subject: [PATCH 1/2] fix: pass --sync flag in template-sync tests The sync-templates.mjs script requires --sync, SQUAD_SYNC_TEMPLATES=1 env var, or direct invocation (argv.length <= 2) to actually sync. When run from vitest, extra argv entries mean the direct-invocation check fails, so the script silently skips the sync. Pass --sync explicitly in both the beforeAll hook and the script-execution test. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- test/template-sync.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/template-sync.test.ts b/test/template-sync.test.ts index f4d5e674c..4cab2ea16 100644 --- a/test/template-sync.test.ts +++ b/test/template-sync.test.ts @@ -27,7 +27,7 @@ const ROOT = resolve(__dirname, '..'); // repo root, overwriting .github/agents/squad.agent.md from the CLI // template and making it diverge from .squad-templates/squad.agent.md. beforeAll(() => { - execSync('node scripts/sync-templates.mjs', { + execSync('node scripts/sync-templates.mjs --sync', { cwd: ROOT, encoding: 'utf-8', timeout: 60_000, @@ -162,7 +162,7 @@ describe('dynamic template enumeration (all synced files)', () => { describe('sync-templates.mjs script execution', () => { it('exits with code 0 (no syntax errors, no crashes)', () => { // execSync throws on non-zero exit codes - const output = execSync('node scripts/sync-templates.mjs', { + const output = execSync('node scripts/sync-templates.mjs --sync', { cwd: ROOT, encoding: 'utf-8', timeout: 60_000, From 422e7f989cd22e1a201a7c7a7cb8bf5f14d70589 Mon Sep 17 00:00:00 2001 From: Copilot Date: Sat, 25 Apr 2026 16:20:30 +0300 Subject: [PATCH 2/2] fix: wire skill command in cli-entry.ts Add missing dynamic import for skill.ts command (APM integration). The cli-command-wiring test expects all commands in cli/commands/ to have a corresponding import in cli-entry.ts. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- packages/squad-cli/src/cli-entry.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/squad-cli/src/cli-entry.ts b/packages/squad-cli/src/cli-entry.ts index c30760f8a..ac1638e1a 100644 --- a/packages/squad-cli/src/cli-entry.ts +++ b/packages/squad-cli/src/cli-entry.ts @@ -901,6 +901,12 @@ async function main(): Promise { return; } + if (cmd === 'skill') { + const { runSkill } = await import('./cli/commands/skill.js'); + await runSkill(getSquadStartDir(), args.slice(1)); + return; + } + if (cmd === 'upstream') { const { upstreamCommand } = await import('./cli/commands/upstream.js'); await upstreamCommand(args.slice(1));