{"record":{"id":"c9f538fe48371bfe","repo":"paperclipai/paperclip","slug":"guidance-body-is-required-pass-file-or-body","errorCode":null,"errorMessage":"Guidance body is required. Pass --file or --body.","messagePattern":"Guidance body is required\\. Pass --file or --body\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"cli/src/commands/pipelines.ts","lineNumber":292,"sourceCode":"        const ctx = resolvePipelineContext(opts);\n        const pipelineId = await resolvePipelineId(ctx, pipeline);\n        const result = await ctx.api.get(apiPath`/api/pipelines/${pipelineId}/documents/guidance`);\n        printOutput(result, { json: ctx.json });\n      })),\n  );\n  addPipelineOptions(\n    guidance\n      .command(\"put\")\n      .description(\"Create or replace pipeline guidance\")\n      .argument(\"<pipeline>\", \"Pipeline ID or key\")\n      .option(\"--file <path>\", \"Markdown file\")\n      .option(\"--body <markdown>\", \"Markdown body\")\n      .option(\"--title <title>\", \"Document title\")\n      .action((pipeline: string, opts: GuidancePutOptions) => withPipelineErrors(async () => {\n        const ctx = resolvePipelineContext(opts);\n        const pipelineId = await resolvePipelineId(ctx, pipeline);\n        const body = opts.body ?? (opts.file ? await readFile(opts.file, \"utf8\") : undefined);\n        if (body === undefined) throw new Error(\"Guidance body is required. Pass --file or --body.\");\n        printOutput(await ctx.api.put(apiPath`/api/pipelines/${pipelineId}/documents/guidance`, {\n          title: opts.title ?? \"Pipeline guidance\",\n          body,\n        }), { json: ctx.json });\n      })),\n  );\n\n  addPipelineOptions(\n    pipelines\n      .command(\"set-automation\")\n      .description(\"Set a run_routine onEnter automation on a stage\")\n      .argument(\"<pipeline>\", \"Pipeline ID or key\")\n      .requiredOption(\"--stage <key>\", \"Stage key\")\n      .requiredOption(\"--routine <id>\", \"Routine ID\")\n      .option(\"--note <text>\", \"Automation note\")\n      .action((pipeline: string, opts: AutomationOptions) => withPipelineErrors(async () => {\n        const ctx = resolvePipelineContext(opts);\n        const detail = await getPipeline(ctx, pipeline);","sourceCodeStart":274,"sourceCodeEnd":310,"githubUrl":"https://github.com/paperclipai/paperclip/blob/67001ec6eb96ae601aa27bc91d9b2415d665334a/cli/src/commands/pipelines.ts#L274-L310","documentation":"Error \"Guidance body is required. Pass --file or --body.\" thrown in paperclipai/paperclip.","triggerScenarios":"Thrown at cli/src/commands/pipelines.ts:292 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"67001ec6eb96ae601aa27bc91d9b2415d665334a","analyzedAt":"2026-08-12T12:05:45.408Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}