{"record":{"id":"c6b44d343ca312d5","repo":"EveryInc/compound-engineering-plugin","slug":"package-json-version-root-version-does-not-matc","errorCode":null,"errorMessage":"package.json version ${root.version} does not match .claude-plugin/plugin.json version ${ce.version}","messagePattern":"package\\.json version (.+?) does not match \\.claude-plugin/plugin\\.json version (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/release/components.ts","lineNumber":197,"sourceCode":"    case \"minor\":\n      return `${major}.${minor + 1}.0`\n    case \"patch\":\n      return `${major}.${minor}.${patch + 1}`\n  }\n}\n\nexport async function loadCurrentVersions(cwd = process.cwd()): Promise<VersionSources> {\n  const root = await readJson<RootPackageJson>(`${cwd}/package.json`)\n  const ce = await readJson<PluginManifest>(`${cwd}/.claude-plugin/plugin.json`)\n  const antigravity = await readJson<PluginManifest>(`${cwd}/plugin.json`)\n  const kimi = await readJson<PluginManifest>(`${cwd}/.kimi-plugin/plugin.json`)\n  const grok = await readJson<PluginManifest>(`${cwd}/.grok-plugin/plugin.json`)\n  const devin = await readJson<PluginManifest>(`${cwd}/.devin-plugin/plugin.json`)\n  const marketplace = await readJson<MarketplaceManifest>(`${cwd}/.claude-plugin/marketplace.json`)\n  const cursorMarketplace = await readJson<MarketplaceManifest>(`${cwd}/.cursor-plugin/marketplace.json`)\n\n  if (root.version !== ce.version) {\n    throw new Error(`package.json version ${root.version} does not match .claude-plugin/plugin.json version ${ce.version}`)\n  }\n\n  if (root.version !== antigravity.version) {\n    throw new Error(`package.json version ${root.version} does not match plugin.json version ${antigravity.version}`)\n  }\n\n  if (root.version !== kimi.version) {\n    throw new Error(`package.json version ${root.version} does not match .kimi-plugin/plugin.json version ${kimi.version}`)\n  }\n\n  if (root.version !== grok.version) {\n    throw new Error(`package.json version ${root.version} does not match .grok-plugin/plugin.json version ${grok.version}`)\n  }\n\n  if (root.version !== devin.version) {\n    throw new Error(`package.json version ${root.version} does not match .devin-plugin/plugin.json version ${devin.version}`)\n  }\n","sourceCodeStart":179,"sourceCodeEnd":215,"githubUrl":"https://github.com/EveryInc/compound-engineering-plugin/blob/c9c10f8c75412c7232cb2bd663e5fd1cea98d84e/src/release/components.ts#L179-L215","documentation":"The release components loader reads versions from package.json and every plugin manifest and requires them to agree. This first consistency check throws when the root `package.json` version differs from `.claude-plugin/plugin.json`'s version, indicating release-owned versions have drifted out of sync (a known failure mode this guard prevents).","triggerScenarios":"Calling `loadCurrentVersions()`/`currentVersions()`/`versions()` after one file was hand-bumped or updated without the other — e.g. editing `package.json` version but not `.claude-plugin/plugin.json` (or vice versa) during a manual release attempt.","commonSituations":"Hand-editing versions instead of letting release automation prepare them; a merge conflict resolved keeping one side's version; a bot PR bumping package.json while plugin.json update failed.","solutions":["Set both files to the same version: pick the intended version and update `package.json` and `.claude-plugin/plugin.json` to match","Prefer letting release automation prepare versions rather than hand-bumping (per repo policy)","Check recent merge history for a conflict resolution that dropped one version bump","Re-run the validation after syncing to catch the other paired checks (antigravity, marketplaces)"],"exampleFix":"// before\n// package.json: \"version\": \"1.4.0\"; plugin.json: \"version\": \"1.3.0\"\n// after\n// package.json: \"version\": \"1.4.0\"; plugin.json: \"version\": \"1.4.0\"","handlingStrategy":"validation","validationCode":"import { readFileSync } from \"node:fs\"\nconst pkg = JSON.parse(readFileSync(\"package.json\", \"utf8\"))\nconst ce = JSON.parse(readFileSync(\".claude-plugin/plugin.json\", \"utf8\"))\nif (pkg.version !== ce.version) {\n  throw new Error(`Sync versions: package.json=${pkg.version} vs plugin.json=${ce.version}`)\n}","typeGuard":"function versionsInSync(pkgVersion: string, pluginVersion: string): boolean { return pkgVersion === pluginVersion }","tryCatchPattern":"try {\n  const versions = await currentVersions()\n} catch (error) {\n  if (String(error).includes(\"does not match\")) {\n    console.error(\"Version drift detected; align package.json and plugin.json (prefer release automation)\")\n  } else throw error\n}","preventionTips":["Never hand-bump release-owned versions; let release automation prepare them","Resolve merge conflicts in version fields by taking one coherent version everywhere","Run release validation before pushing to catch drift early"],"tags":["release","version-drift","consistency"],"backgroundTag":"version-drift-between-manifests","analyzedSha":"c9c10f8c75412c7232cb2bd663e5fd1cea98d84e","analyzedAt":"2026-08-31T15:18:07.959Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}