{"record":{"id":"45db3b5c0b09aa63","repo":"Yeachan-Heo/oh-my-codex","slug":"missing-rationale","errorCode":null,"errorMessage":"Missing --rationale.","messagePattern":"Missing --rationale\\.","errorType":"exception","errorClass":"UltragoalError","httpStatus":null,"severity":"error","filePath":"src/cli/ultragoal.ts","lineNumber":462,"sourceCode":"        printStatus(result.plan);\n      }\n      return;\n    }\n\n    if (command === 'steer') {\n      const proposalText = readValue(rest, '--proposal');\n      const source = readValue(rest, '--source');\n      if (proposalText) {\n        const parsed = assertPlainObject(await readJsonInput(proposalText, '--proposal'), '--proposal');\n        const proposal = normalizeSteeringProposal({ ...parsed, source: source ?? parsed.source }, proposalText);\n        const result = await steerUltragoal(cwd, proposal, { directiveText: proposalText });\n        printSteerResult(proposal, result, json);\n        if (!result.accepted) process.exitCode = 1;\n        return;\n      }\n      const proposal = await parseSteeringProposal(rest);\n      if (!proposal.evidence?.trim?.()) throw new UltragoalError('Missing --evidence.');\n      if (!proposal.rationale?.trim?.()) throw new UltragoalError('Missing --rationale.');\n      proposal.source = parseSteeringSource(source, proposal.source);\n      const result = await steerUltragoal(cwd, proposal, { directiveText: buildSteerDirectiveText(rest) });\n      printSteerResult(proposal, result, json);\n      if (!result.accepted) process.exitCode = 1;\n      return;\n    }\n\n    if (command === 'record-review-blockers') {\n      const goalId = readValue(rest, '--goal-id');\n      const title = readValue(rest, '--title');\n      const objective = readValue(rest, '--objective');\n      const evidence = readValue(rest, '--evidence');\n      if (!goalId) throw new UltragoalError('Missing --goal-id.');\n      if (!title?.trim()) throw new UltragoalError('Missing --title.');\n      if (!objective?.trim()) throw new UltragoalError('Missing --objective.');\n      if (!evidence?.trim()) throw new UltragoalError('Missing --evidence.');\n      const codexGoal = await parseCodexGoalJson(readValue(rest, '--codex-goal-json'));\n      const result = await recordFinalReviewBlockers(cwd, { goalId, title, objective, evidence, codexGoal });","sourceCodeStart":444,"sourceCodeEnd":480,"githubUrl":"https://github.com/Yeachan-Heo/oh-my-codex/blob/3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2/src/cli/ultragoal.ts#L444-L480","documentation":"Every structured steering proposal must carry non-empty rationale (the reasoning for the mutation), checked right after evidence. It comes from --rationale or the rationale key of --after-json/--directive-json; missing or whitespace-only values abort the steer before steerUltragoal is called.","triggerScenarios":"Steering with --kind and --evidence but no --rationale, or a proposal JSON whose rationale key is absent/blank.","commonSituations":"Believing evidence alone justifies the change; template proposals that only fill kind/evidence; rationale passed under a different key name (e.g. 'reason').","solutions":["Add `--rationale \"...\"` explaining the decision logic","In JSON proposals include a non-empty \"rationale\" string field"],"exampleFix":"# before\nomx ultragoal steer --kind add_goal --evidence 'ci green' --title t --objective o\n# Error: Missing --rationale.\n\n# after\nomx ultragoal steer --kind add_goal --evidence 'ci green' --rationale 'follow-up goal needed for docs' --title t --objective o","handlingStrategy":"validation","validationCode":"if (!rationale?.trim()) { console.error('steer requires non-empty --rationale'); process.exit(2); }","typeGuard":"function hasRationale(p: { rationale?: string }): boolean {\n  return typeof p.rationale === 'string' && p.rationale.trim().length > 0;\n}","tryCatchPattern":null,"preventionTips":["Template steer commands with both --evidence and --rationale placeholders","Programmatic proposals should assert both keys before serialization"],"tags":["cli","ultragoal","steering","missing-argument"],"backgroundTag":"missing-required-cli-flag","analyzedSha":"3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2","analyzedAt":"2026-08-27T22:18:39.783Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}