{"record":{"id":"16ed8d9304f39975","repo":"paperclipai/paperclip","slug":"wiki-page-path-must-be-a-markdown-file-path","errorCode":null,"errorMessage":"Wiki page path must be a markdown file: ${path}","messagePattern":"Wiki page path must be a markdown file: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/plugins/plugin-llm-wiki/src/wiki/core.ts","lineNumber":1187,"sourceCode":"    trimmed !== \"IDEA.md\" &&\n    trimmed !== \"index.md\" &&\n    trimmed !== \"log.md\" &&\n    !trimmed.startsWith(\"raw/\") &&\n    !trimmed.startsWith(\"wiki/\") &&\n    !(options.allowMetadata && trimmed.startsWith(\".paperclip/\"))\n  ) {\n    throw new Error(`Wiki path must stay inside AGENTS.md, IDEA.md, raw/, or wiki/: ${path}`);\n  }\n  return trimmed;\n}\n\nfunction assertPagePath(path: string): string {\n  const normalized = assertWikiPath(path);\n  if (normalized !== \"index.md\" && normalized !== \"log.md\" && normalized !== \"WIKI.md\" && normalized !== \"AGENTS.md\" && normalized !== \"IDEA.md\" && !normalized.startsWith(\"wiki/\")) {\n    throw new Error(`Wiki page writes must target AGENTS.md, IDEA.md, or wiki/: ${path}`);\n  }\n  if (!normalized.endsWith(\".md\")) {\n    throw new Error(`Wiki page path must be a markdown file: ${path}`);\n  }\n  return normalized;\n}\n\nfunction assertPageWriteAllowed(path: string, writer: WritePageInput[\"writer\"] = \"agent_tool\"): void {\n  if (writer !== \"board_ui\" && PROTECTED_WIKI_CONTROL_FILES.has(path)) {\n    throw new Error(`Refusing to overwrite protected wiki control file ${path}; board-managed edits must use the wiki UI.`);\n  }\n}\n\nfunction assertRawPath(path: string): string {\n  const normalized = assertWikiPath(path);\n  if (!normalized.startsWith(\"raw/\")) {\n    throw new Error(`Source path must stay inside raw/: ${path}`);\n  }\n  return normalized;\n}\n","sourceCodeStart":1169,"sourceCodeEnd":1205,"githubUrl":"https://github.com/paperclipai/paperclip/blob/5716fe907e596ce73501408fc6efdb19fb61edf2/packages/plugins/plugin-llm-wiki/src/wiki/core.ts#L1169-L1205","documentation":"Error \"Wiki page path must be a markdown file: ${path}\" thrown in paperclipai/paperclip.","triggerScenarios":"Thrown at packages/plugins/plugin-llm-wiki/src/wiki/core.ts:1188 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a .md filename for wiki pages."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5716fe907e596ce73501408fc6efdb19fb61edf2","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}