{"record":{"id":"1b66967537589c4f","repo":"midudev/autoskills","slug":"registry-manifest-not-found-manifest-path","errorCode":null,"errorMessage":"Registry manifest not found: ${MANIFEST_PATH}","messagePattern":"Registry manifest not found: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/autoskills/scripts/validate-registry.mjs","lineNumber":83,"sourceCode":"      continue;\n    }\n\n    const actualSha = sha256Hex(readFileSync(filePath));\n    if (shaMap[file] !== actualSha) {\n      errors.push(`${skillName}: hash mismatch for ${file}`);\n    }\n    parts.push(`${file}:${actualSha}`);\n  }\n\n  const actualBundleHash = sha256Hex(parts.sort().join(\"\\n\"));\n  if (entry.bundleHash !== actualBundleHash) {\n    errors.push(`${skillName}: bundleHash mismatch`);\n  }\n}\n\nfunction main() {\n  if (!existsSync(MANIFEST_PATH)) {\n    throw new Error(`Registry manifest not found: ${MANIFEST_PATH}`);\n  }\n\n  const manifest = JSON.parse(readFileSync(MANIFEST_PATH, \"utf-8\"));\n  const registrySkills = manifest.skills || {};\n  const { declared, conflicts } = collectDeclaredSkills();\n  const errors = [];\n\n  for (const conflict of conflicts) errors.push(conflict);\n\n  for (const [skillName, declaredSkill] of declared) {\n    const entry = registrySkills[skillName];\n    if (!entry) {\n      errors.push(\n        `${skillName}: declared in skills map (${formatSources(declaredSkill.sources)}) but missing from registry`,\n      );\n      continue;\n    }\n","sourceCodeStart":65,"sourceCodeEnd":101,"githubUrl":"https://github.com/midudev/autoskills/blob/0ec725320d2137253ab2e68e7ba8a072148e741a/packages/autoskills/scripts/validate-registry.mjs#L65-L101","documentation":"validate-registry.mjs validates the skills registry manifest before checking individual skills. In main(), it first checks that the registry manifest file exists at MANIFEST_PATH; if not, it throws this Error and aborts validation. It means the script cannot find the registry manifest JSON it needs to compare declared skills against.","triggerScenarios":"Running `validate-registry.mjs` when the file at MANIFEST_PATH (the registry manifest JSON path resolved by the script) does not exist on disk — e.g. the manifest was deleted, renamed, or the script is run from a context where the relative path no longer resolves.","commonSituations":"Running the validator in CI before the manifest is generated; deleting or renaming the registry manifest during a refactor; running the script from the wrong working directory if MANIFEST_PATH is relative; a fresh clone missing a generated manifest file.","solutions":["Run the manifest generation step (whatever script writes the registry manifest) before running validate-registry.mjs.","Verify MANIFEST_PATH exists: `ls` the path printed in the error message; restore the file from git (`git checkout -- <path>`).","Run the script from the repository root (or the working directory MANIFEST_PATH is resolved against) so relative paths resolve correctly."],"exampleFix":"// before (CI workflow)\n- run: node packages/autoskills/scripts/validate-registry.mjs\n// after\n- run: node packages/autoskills/scripts/sync-registry.mjs\n- run: node packages/autoskills/scripts/validate-registry.mjs","handlingStrategy":"validation","validationCode":"import { existsSync } from \"node:fs\";\nconst MANIFEST_PATH = \"packages/autoskills/registry.json\";\nif (!existsSync(MANIFEST_PATH)) {\n  throw new Error(`Registry manifest missing; run the registry sync script first: ${MANIFEST_PATH}`);\n}","typeGuard":null,"tryCatchPattern":"try {\n  validateRegistry();\n} catch (err) {\n  if (String(err.message).startsWith(\"Registry manifest not found\")) {\n    console.error(\"Generate the manifest before validating.\");\n    process.exitCode = 1;\n  } else throw err;\n}","preventionTips":["Chain manifest generation before validation in package.json scripts and CI pipelines.","Run scripts from the repo root so relative paths resolve consistently.","Commit the registry manifest or ensure it is a build artifact generated in the same job."],"tags":["registry","manifest","validation","file-not-found","cli"],"backgroundTag":"file-not-found","analyzedSha":"0ec725320d2137253ab2e68e7ba8a072148e741a","analyzedAt":"2026-09-15T14:12:31.090Z","contentChangedAt":"2026-09-15T14:12:31.090Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}