{"record":{"id":"3032123fa206d08b","repo":"EveryInc/compound-engineering-plugin","slug":"cleanup-currently-supports-only-the-compound-engin","errorCode":null,"errorMessage":"Cleanup currently supports only the compound-engineering plugin.","messagePattern":"Cleanup currently supports only the compound-engineering plugin\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/commands/cleanup.ts","lineNumber":110,"sourceCode":"      alias: \"qwen-home\",\n      description: \"Qwen root to clean for legacy Bun installs (default: ~/.qwen)\",\n    },\n    windsurfHome: {\n      type: \"string\",\n      alias: \"windsurf-home\",\n      description: \"Deprecated Windsurf root to clean (default: ~/.codeium/windsurf)\",\n    },\n    agentsHome: {\n      type: \"string\",\n      alias: \"agents-home\",\n      description: \"Shared .agents root to clean for shadowing skills (default: ~/.agents)\",\n    },\n  },\n  async run({ args }) {\n    const pluginPath = await resolveCleanupPluginPath(args.plugin ? String(args.plugin) : \"compound-engineering\")\n    const plugin = await loadClaudePlugin(pluginPath)\n    if (plugin.manifest.name !== \"compound-engineering\") {\n      throw new Error(\"Cleanup currently supports only the compound-engineering plugin.\")\n    }\n    const targetNames = resolveCleanupTargets(String(args.target))\n    const outputRoot = resolveWorkspaceRoot(args.output)\n    const hasExplicitOpenCodeHome = hasExplicitValue(args.opencodeHome)\n    const roots = {\n      codexHome: resolveCodexHome(args.codexHome),\n      piHome: resolveTargetHome(args.piHome, path.join(os.homedir(), \".pi\", \"agent\")),\n      // Mirror install: respect OPENCODE_CONFIG_DIR before falling back to the\n      // XDG default so cleanup scans the same directory install wrote to.\n      opencodeHome: resolveTargetHome(args.opencodeHome, resolveOpenCodeGlobalRoot()),\n      kiroHome: resolveTargetHome(args.kiroHome, path.join(outputRoot, \".kiro\")),\n      copilotHome: resolveTargetHome(args.copilotHome, path.join(os.homedir(), \".copilot\")),\n      droidHome: resolveTargetHome(args.droidHome, path.join(os.homedir(), \".factory\")),\n      qwenHome: resolveTargetHome(args.qwenHome, path.join(os.homedir(), \".qwen\")),\n      windsurfHome: resolveTargetHome(args.windsurfHome, path.join(os.homedir(), \".codeium\", \"windsurf\")),\n      agentsHome: resolveTargetHome(args.agentsHome, path.join(os.homedir(), \".agents\")),\n      workspaceRoot: outputRoot,\n      hasExplicitOutput: hasExplicitValue(args.output),","sourceCodeStart":92,"sourceCodeEnd":128,"githubUrl":"https://github.com/EveryInc/compound-engineering-plugin/blob/c9c10f8c75412c7232cb2bd663e5fd1cea98d84e/src/commands/cleanup.ts#L92-L128","documentation":"The `cleanup` command removes installed compound-engineering artifacts from agent homes, but its logic (targets, stale-artifact registries) is written specifically for the compound-engineering plugin. After loading the plugin at the resolved path, `run` checks `plugin.manifest.name` and throws this error if it is anything else. This guards against running removal routines designed for one plugin against another plugin's installed files.","triggerScenarios":"Running `cleanup` (with no --plugin, defaults to \"compound-engineering\") where resolveCleanupPluginPath resolves to a plugin whose .claude-plugin/plugin.json has a different `name` — e.g. passing `--plugin ./some-other-plugin` pointing at a valid but differently-named plugin directory.","commonSituations":"A developer points --plugin at a checkout of a fork or a different plugin to try to clean it up; a repo was renamed so the manifest name no longer matches; someone copies the cleanup workflow to clean another Claude plugin's installs.","solutions":["Run cleanup against the actual compound-engineering plugin (omit --plugin or pass \"compound-engineering\").","If using a local checkout, verify its .claude-plugin/plugin.json declares \"name\": \"compound-engineering\"; fix the name or use the official plugin.","If you need to remove a different plugin, remove its artifacts manually (or with the plugin's own tooling) instead of using this command."],"exampleFix":"// before\nbun run src/index.ts cleanup --plugin ./my-fork\n// Error: Cleanup currently supports only the compound-engineering plugin.\n\n// after\nbun run src/index.ts cleanup --plugin compound-engineering","handlingStrategy":"validation","validationCode":"import { readFileSync, existsSync } from \"node:fs\"\nconst manifestPath = pluginPath + \"/.claude-plugin/plugin.json\"\nif (!existsSync(manifestPath)) throw new Error(`No plugin manifest at ${manifestPath}`)\nconst name = JSON.parse(readFileSync(manifestPath, \"utf8\")).manifest?.name ?? JSON.parse(readFileSync(manifestPath, \"utf8\")).name\nif (name !== \"compound-engineering\") {\n  console.warn(`Skipping cleanup: ${pluginPath} is '${name}', not compound-engineering`)\n}","typeGuard":"function isCompoundEngineeringManifest(m: unknown): m is { name: \"compound-engineering\" } {\n  return typeof m === \"object\" && m !== null && (m as any).name === \"compound-engineering\"\n}","tryCatchPattern":"try {\n  await cleanupCommand.run({ args })\n} catch (e) {\n  if (e instanceof Error && e.message.includes(\"only the compound-engineering plugin\")) {\n    console.error(`Wrong plugin for cleanup: ${args.plugin}. Use the compound-engineering plugin.`)\n  } else throw e\n}","preventionTips":["Omit --plugin and let cleanup default to \"compound-engineering\".","Before pointing --plugin at a checkout, cat its .claude-plugin/plugin.json and confirm name is compound-engineering.","Remove other plugins with their own tooling, not this command."],"tags":["cli","validation","plugin-manifest"],"backgroundTag":"unsupported-plugin-name","analyzedSha":"c9c10f8c75412c7232cb2bd663e5fd1cea98d84e","analyzedAt":"2026-08-31T15:18:07.959Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}