fix: pass scope to writeWindsurfBundle and fix skill name casing

- Fix resolve-pr-parallel SKILL.md name from underscores to hyphens
  (must match directory name per Windsurf spec)
- Add scope parameter to TargetHandler.write signature
- Pass resolvedScope through to writer in convert.ts and install.ts
- Windsurf writer uses global_workflows/ for global scope, workflows/
  for workspace scope

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Ryan Burnham
2026-02-26 20:29:40 +08:00
parent 6fe51a0602
commit e081e32a30
5 changed files with 11 additions and 9 deletions

View File

@@ -108,7 +108,7 @@ export default defineCommand({
throw new Error(`Target ${targetName} did not return a bundle.`)
}
await target.write(primaryOutputRoot, bundle)
await target.write(primaryOutputRoot, bundle, resolvedScope)
console.log(`Converted ${plugin.manifest.name} to ${targetName} at ${primaryOutputRoot}`)
const extraTargets = parseExtraTargets(args.also)
@@ -136,7 +136,7 @@ export default defineCommand({
hasExplicitOutput,
scope: handler.defaultScope,
})
await handler.write(extraRoot, extraBundle)
await handler.write(extraRoot, extraBundle, handler.defaultScope)
console.log(`Converted ${plugin.manifest.name} to ${extra} at ${extraRoot}`)
}

View File

@@ -111,7 +111,7 @@ export default defineCommand({
hasExplicitOutput,
scope: resolvedScope,
})
await target.write(primaryOutputRoot, bundle)
await target.write(primaryOutputRoot, bundle, resolvedScope)
console.log(`Installed ${plugin.manifest.name} to ${primaryOutputRoot}`)
const extraTargets = parseExtraTargets(args.also)
@@ -139,7 +139,7 @@ export default defineCommand({
hasExplicitOutput,
scope: handler.defaultScope,
})
await handler.write(extraRoot, extraBundle)
await handler.write(extraRoot, extraBundle, handler.defaultScope)
console.log(`Installed ${plugin.manifest.name} to ${extraRoot}`)
}