{"record":{"id":"1ac63008761a75dc","repo":"Yeachan-Heo/oh-my-codex","slug":"missing-kind-for-structured-ultragoal-steer","errorCode":null,"errorMessage":"Missing --kind for structured ultragoal steer.","messagePattern":"Missing --kind for structured ultragoal steer\\.","errorType":"exception","errorClass":"UltragoalError","httpStatus":null,"severity":"error","filePath":"src/cli/ultragoal.ts","lineNumber":223,"sourceCode":"  const persistedRoleRoutingMarker = scope.sessionId\n    ? readRoleRoutingMarker(scope.baseStateDir, { cwd: scope.cwd, sessionId: scope.sessionId })\n    : null;\n  return resolveNativeSubagentSupportStatus({\n    persistedSupportBlocker,\n    persistedRoleRoutingMarker,\n    persistedCapacityBlocker,\n    cwd: scope.cwd,\n    sessionId: scope.sessionId,\n  });\n}\n\nconst STEERING_KINDS = new Set<UltragoalSteeringMutationKind>(ULTRAGOAL_STEERING_MUTATION_KINDS);\nconst STEERING_SOURCES = new Set<UltragoalSteeringSource>(ULTRAGOAL_STEERING_SOURCES);\n\ntype CliSteerResult = Awaited<ReturnType<typeof steerUltragoal>>;\n\nfunction parseSteeringKind(raw: string | undefined): UltragoalSteeringMutationKind {\n  if (!raw) throw new UltragoalError('Missing --kind for structured ultragoal steer.');\n  if (!STEERING_KINDS.has(raw as UltragoalSteeringMutationKind)) throw new UltragoalError(`Invalid --kind: ${raw}. Expected one of ${Array.from(STEERING_KINDS).join(', ')}.`);\n  return raw as UltragoalSteeringMutationKind;\n}\n\nfunction parseSteeringSource(raw: string | undefined, fallback: UltragoalSteeringSource = 'cli'): UltragoalSteeringSource {\n  if (!raw) return fallback;\n  if (!STEERING_SOURCES.has(raw as UltragoalSteeringSource)) throw new UltragoalError(`Invalid --source: ${raw}. Expected one of ${Array.from(STEERING_SOURCES).join(', ')}.`);\n  return raw as UltragoalSteeringSource;\n}\n\nfunction assertPlainObject(value: unknown, label: string): Record<string, unknown> {\n  if (!value || typeof value !== 'object' || Array.isArray(value)) throw new UltragoalError(`${label} must be a JSON object.`);\n  return value as Record<string, unknown>;\n}\n\nfunction normalizeTargetGoalId(raw: Record<string, unknown>): string | undefined {\n  if (typeof raw.targetGoalId === 'string' && raw.targetGoalId.trim()) return raw.targetGoalId.trim();\n  if (Array.isArray(raw.targetGoalIds)) return raw.targetGoalIds.find((id): id is string => typeof id === 'string' && id.trim().length > 0)?.trim();","sourceCodeStart":205,"sourceCodeEnd":241,"githubUrl":"https://github.com/Yeachan-Heo/oh-my-codex/blob/3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2/src/cli/ultragoal.ts#L205-L241","documentation":"Structured ultragoal steering mutations require an explicit --kind naming the mutation type (the set ULTRAGOAL_STEERING_MUTATION_KINDS). parseSteeringKind throws immediately when --kind is absent, because the engine cannot infer which mutation you intend from flags alone.","triggerScenarios":"Running `omx ultragoal steer --evidence e --rationale r` without --kind and without --directive-json (directive-json bypasses this path).","commonSituations":"Copy-pasting a steer example that predates structured kinds; assuming --after-json alone identifies the kind; forgetting the flag when migrating from freeform natural-language steering (which error 490 says is rejected).","solutions":["Add `--kind <mutation>` matching one of ULTRAGOAL_STEERING_MUTATION_KINDS (see the error's sibling message which lists them, or --help)","Alternatively pass a complete proposal via --directive-json which includes kind inside the object"],"exampleFix":"# before\nomx ultragoal steer --evidence 'tests fail' --rationale 'pause goal'\n# Error: Missing --kind for structured ultragoal steer.\n\n# after\nomx ultragoal steer --kind add_goal --evidence 'tests fail' --rationale 'pause goal' --title g --objective o","handlingStrategy":"validation","validationCode":"const KINDS: string[] = ['add_goal','update_goal','record_blocker' /* mirror ULTRAGOAL_STEERING_MUTATION_KINDS */];\nif (!kind) throw new Error('steer requires --kind or --directive-json');\nif (!KINDS.includes(kind)) throw new Error(`unknown kind ${kind}`);","typeGuard":"function isSteeringKind(v: string | undefined, kinds: Set<string>): v is string {\n  return !!v && kinds.has(v);\n}","tryCatchPattern":null,"preventionTips":["Keep a shared constants module for steering kinds used by scripts and the CLI","Prefer --directive-json for compound proposals so kind lives in one document"],"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"}