{"record":{"id":"46dbe592cab155c6","repo":"EveryInc/compound-engineering-plugin","slug":"unknown-bundled-plugin-input","errorCode":null,"errorMessage":"Unknown bundled plugin: ${input}","messagePattern":"Unknown bundled plugin: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/commands/cleanup.ts","lineNumber":680,"sourceCode":"  }\n\n  const repoRoot = fileURLToPath(new URL(\"../..\", import.meta.url))\n  const rootManifestPath = path.join(repoRoot, \".claude-plugin\", \"plugin.json\")\n  if (await pathExists(rootManifestPath)) {\n    try {\n      const raw = await fs.readFile(rootManifestPath, \"utf8\")\n      const manifest = JSON.parse(raw) as { name?: string }\n      if (manifest.name === input) return repoRoot\n    } catch {\n      // Fall through to legacy multi-plugin layout.\n    }\n  }\n\n  const legacyPluginPath = path.join(repoRoot, \"plugins\", input)\n  const legacyManifestPath = path.join(legacyPluginPath, \".claude-plugin\", \"plugin.json\")\n  if (await pathExists(legacyManifestPath)) return legacyPluginPath\n\n  throw new Error(`Unknown bundled plugin: ${input}`)\n}\n\nfunction resolveWorkspaceRoot(value: unknown): string {\n  if (value && String(value).trim()) {\n    return path.resolve(expandHome(String(value).trim()))\n  }\n  return process.cwd()\n}\n\nfunction resolveCopilotWorkspaceRoot(outputRoot: string): string {\n  return path.basename(outputRoot) === \".github\" ? outputRoot : path.join(outputRoot, \".github\")\n}\n\nfunction resolveOpenCodeWorkspaceRoot(outputRoot: string): string {\n  return path.basename(outputRoot) === \".opencode\" ? outputRoot : path.join(outputRoot, \".opencode\")\n}\n\nfunction hasExplicitValue(value: unknown): boolean {","sourceCodeStart":662,"sourceCodeEnd":698,"githubUrl":"https://github.com/EveryInc/compound-engineering-plugin/blob/c9c10f8c75412c7232cb2bd663e5fd1cea98d84e/src/commands/cleanup.ts#L662-L698","documentation":"When the `--plugin` argument is not a filesystem path, `resolveCleanupPluginPath` treats it as a bundled plugin name: it first tries the repo root manifest, then falls back to `plugins/<name>/.claude-plugin/plugin.json` in the repo. If neither exists it throws this error, meaning the name matches no plugin bundled with (or constituting) this package.","triggerScenarios":"Running `cleanup --plugin some-plugin` where neither `<repoRoot>/.claude-plugin/plugin.json` path resolution accepts it nor `<repoRoot>/plugins/some-plugin/.claude-plugin/plugin.json` exists — a misspelled name, or running inside an installed/copy of the CLI where the bundled `plugins/` directory isn't present.","commonSituations":"Typo in the plugin name; using an npm-installed CLI where repo-relative lookup paths don't exist; expecting other plugins to be bundled when only compound-engineering is; version drift where a legacy bundled plugin was removed.","solutions":["Use the default: run cleanup with no --plugin (defaults to \"compound-engineering\").","Fix the spelling of the bundled plugin name, or check which plugins exist under plugins/ in your checkout.","If you meant a local checkout, pass an explicit path starting with ./, / or ~ instead of a bare name."],"exampleFix":"// before\nbun run src/index.ts cleanup --plugin compund-engineering\n// Error: Unknown bundled plugin: compund-engineering\n\n// after\nbun run src/index.ts cleanup --plugin compound-engineering","handlingStrategy":"validation","validationCode":"const BUNDLED = [\"compound-engineering\"] // plugins bundled with this CLI\nif (!pluginArg.startsWith(\".\") && !pluginArg.startsWith(\"/\") && !pluginArg.startsWith(\"~\")) {\n  if (!BUNDLED.includes(pluginArg)) {\n    throw new Error(`'${pluginArg}' is not a bundled plugin. Use \"compound-engineering\" or a filesystem path.`)\n  }\n}","typeGuard":"function isBundledPluginName(name: string): boolean {\n  return name === \"compound-engineering\" // extend if more bundled plugins ship\n}","tryCatchPattern":"try {\n  await cleanup({ plugin: pluginArg })\n} catch (e) {\n  if (e instanceof Error && e.message.startsWith(\"Unknown bundled plugin:\")) {\n    console.error(`No bundled plugin named '${pluginArg}'. Omit --plugin for the default.`)\n  } else throw e\n}","preventionTips":["Run cleanup without --plugin; the default (compound-engineering) is almost always what you want.","Only pass a bare name for plugins actually bundled in your checkout (check the plugins/ directory).","For anything else — forks, other plugins — pass an explicit path starting with ./, /, or ~."],"tags":["cli","plugin-resolution","argument-parsing"],"backgroundTag":"unknown-identifier","analyzedSha":"c9c10f8c75412c7232cb2bd663e5fd1cea98d84e","analyzedAt":"2026-08-31T15:18:07.959Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}