{"record":{"id":"00b524836351014f","repo":"EveryInc/compound-engineering-plugin","slug":"reporoot-is-not-the-compound-engineering-reposi","errorCode":null,"errorMessage":"${repoRoot} is not the compound-engineering repository","messagePattern":"(.+?) is not the compound-engineering repository","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/dev/codex-dev.ts","lineNumber":126,"sourceCode":"\nfunction resolveHomePath(value: string, home: string): string {\n  if (value === \"~\") return home\n  if (value.startsWith(\"~/\")) return path.join(home, value.slice(2))\n  return path.resolve(value)\n}\n\nasync function readJson(filePath: string): Promise<Record<string, unknown>> {\n  try {\n    return JSON.parse(await fs.readFile(filePath, \"utf8\")) as Record<string, unknown>\n  } catch (error) {\n    throw new Error(`Could not read ${filePath}: ${error instanceof Error ? error.message : String(error)}`)\n  }\n}\n\nasync function assertCompoundEngineeringRepo(repoRoot: string): Promise<void> {\n  const packageJson = await readJson(path.join(repoRoot, \"package.json\"))\n  if (packageJson.name !== \"compound-engineering\") {\n    throw new Error(`${repoRoot} is not the compound-engineering repository`)\n  }\n  const pluginJson = await readJson(path.join(repoRoot, \".codex-plugin\", \"plugin.json\"))\n  if (pluginJson.name !== \"compound-engineering\") {\n    throw new Error(`${repoRoot} is not the compound-engineering repository`)\n  }\n\n  const skills = pluginJson.skills\n  if (typeof skills !== \"string\" || path.resolve(repoRoot, skills) !== path.join(repoRoot, \"skills\")) {\n    throw new Error(\"The Codex plugin manifest does not point at this repository's skills directory\")\n  }\n\n  const unsupported = [\"apps\", \"hooks\", \"mcpServers\"].filter((key) => pluginJson[key] !== undefined)\n  if (unsupported.length > 0) {\n    throw new Error(\n      `Local skill mode cannot represent Codex runtime components: ${unsupported.join(\", \")}. Update the developer workflow before using it.`,\n    )\n  }\n","sourceCodeStart":108,"sourceCodeEnd":144,"githubUrl":"https://github.com/EveryInc/compound-engineering-plugin/blob/c9c10f8c75412c7232cb2bd663e5fd1cea98d84e/src/dev/codex-dev.ts#L108-L144","documentation":"assertCompoundEngineeringRepo guards the codex:dev workflow: it reads <repoRoot>/package.json and requires its name field to be exactly \"compound-engineering\". If it is not, the library concludes the resolved git toplevel is not this repository and refuses to proceed, because the workflow only makes sense inside the plugin's own checkout.","triggerScenarios":"resolveCodexDevContext or inspectLocalCollection runs git rev-parse --show-toplevel from the current directory and the resulting repo root's package.json has a name other than \"compound-engineering\" (src/dev/codex-dev.ts:126).","commonSituations":"Running the dev command from a subdirectory of an unrelated nested git repo (e.g. a vendored dependency or docs repo inside the checkout); a fork renamed the package; a monorepo where the inner repo root is not the plugin root; running inside a temp fixture repo during tests.","solutions":["cd out of the nested repo to a directory inside the actual compound-engineering checkout and re-run.","Check package.json at the repo root: jq .name package.json — it must be \"compound-engineering\".","If you are in a fork/monorepo, restore the root package.json name or run against a real checkout of this repository."],"exampleFix":"// before: package.json in the resolved repo root\n{ \"name\": \"my-fork\" }\n// after\n{ \"name\": \"compound-engineering\" }","handlingStrategy":"validation","validationCode":"import { readFile } from \"node:fs/promises\"\nconst pkg = JSON.parse(await readFile(\"package.json\", \"utf8\"))\nif (pkg.name !== \"compound-engineering\") {\n  throw new Error(\"Not the compound-engineering checkout; cd there first\")\n}","typeGuard":"function isCompoundRepo(pkg: unknown): pkg is { name: \"compound-engineering\" } {\n  return typeof pkg === \"object\" && pkg !== null && (pkg as { name?: unknown }).name === \"compound-engineering\"\n}","tryCatchPattern":"try {\n  await runCodexDev(command)\n} catch (error) {\n  if ((error as Error).message.includes(\"is not the compound-engineering repository\")) {\n    console.error(\"cd into the compound-engineering checkout and retry\")\n  } else throw error\n}","preventionTips":["Run git rev-parse --show-toplevel first to know which repo you are in.","Avoid running the workflow from nested vendored repos or test fixture repos.","Keep root package.json name intact in forks."],"tags":["validation","repository","config"],"backgroundTag":"invalid-repository-root","analyzedSha":"c9c10f8c75412c7232cb2bd663e5fd1cea98d84e","analyzedAt":"2026-08-31T15:18:07.959Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}