diff --git a/plugins/compound-engineering/skills/resolve-pr-parallel/SKILL.md b/plugins/compound-engineering/skills/resolve-pr-parallel/SKILL.md index 46dc793..e040fba 100644 --- a/plugins/compound-engineering/skills/resolve-pr-parallel/SKILL.md +++ b/plugins/compound-engineering/skills/resolve-pr-parallel/SKILL.md @@ -1,5 +1,5 @@ --- -name: resolve_pr_parallel +name: resolve-pr-parallel description: Resolve all PR comments using parallel processing. Use when addressing PR review feedback, resolving review threads, or batch-fixing PR comments. argument-hint: "[optional: PR number or current PR]" disable-model-invocation: true diff --git a/src/commands/convert.ts b/src/commands/convert.ts index 4e9f102..321c579 100644 --- a/src/commands/convert.ts +++ b/src/commands/convert.ts @@ -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}`) } diff --git a/src/commands/install.ts b/src/commands/install.ts index 848016c..f94e81d 100644 --- a/src/commands/install.ts +++ b/src/commands/install.ts @@ -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}`) } diff --git a/src/targets/index.ts b/src/targets/index.ts index b226c5b..bb0509f 100644 --- a/src/targets/index.ts +++ b/src/targets/index.ts @@ -58,7 +58,7 @@ export type TargetHandler = { /** Valid scope values. If absent, the --scope flag is rejected for this target. */ supportedScopes?: TargetScope[] convert: (plugin: ClaudePlugin, options: ClaudeToOpenCodeOptions) => TBundle | null - write: (outputRoot: string, bundle: TBundle) => Promise + write: (outputRoot: string, bundle: TBundle, scope?: TargetScope) => Promise } export const targets: Record = { diff --git a/src/targets/windsurf.ts b/src/targets/windsurf.ts index 1171ae5..ee96045 100644 --- a/src/targets/windsurf.ts +++ b/src/targets/windsurf.ts @@ -2,6 +2,7 @@ import path from "path" import { backupFile, copyDir, ensureDir, pathExists, readJson, writeJsonSecure, writeText } from "../utils/files" import { formatFrontmatter } from "../utils/frontmatter" import type { WindsurfBundle } from "../types/windsurf" +import type { TargetScope } from "./index" /** * Write a WindsurfBundle directly into outputRoot. @@ -9,7 +10,7 @@ import type { WindsurfBundle } from "../types/windsurf" * Unlike other target writers, this writer expects outputRoot to be the final * resolved directory — the CLI handles scope-based nesting (global vs workspace). */ -export async function writeWindsurfBundle(outputRoot: string, bundle: WindsurfBundle): Promise { +export async function writeWindsurfBundle(outputRoot: string, bundle: WindsurfBundle, scope?: TargetScope): Promise { await ensureDir(outputRoot) // Write agent skills (before pass-through copies so pass-through takes precedence on collision) @@ -31,9 +32,10 @@ export async function writeWindsurfBundle(outputRoot: string, bundle: WindsurfBu } } - // Write command workflows (flat in workflows/, per spec) + // Write command workflows (flat in global_workflows/ for global scope, workflows/ for workspace) if (bundle.commandWorkflows.length > 0) { - const workflowsDir = path.join(outputRoot, "workflows") + const workflowsDirName = scope === "global" ? "global_workflows" : "workflows" + const workflowsDir = path.join(outputRoot, workflowsDirName) await ensureDir(workflowsDir) for (const workflow of bundle.commandWorkflows) { validatePathSafe(workflow.name, "command workflow")