{"record":{"id":"95b9003d590edf86","repo":"ReactiveX/rxjs","slug":"harness-is-required","errorCode":null,"errorMessage":"--harness is required","messagePattern":"--harness is required","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/migrate/src/skill-cli.ts","lineNumber":96,"sourceCode":"  let projectRoot = process.cwd();\n  let force = false;\n  for (let index = 1; index < argv.length; index++) {\n    const argument = argv[index];\n    if (argument === '--harness') {\n      const value = argv[++index];\n      if (!value || !skillHarnesses.includes(value as SkillHarness)) throw new Error('--harness requires codex, claude, or cursor');\n      harness = value as SkillHarness;\n    } else if (argument === '--project-root') {\n      const value = argv[++index];\n      if (!value) throw new Error('--project-root requires a directory');\n      projectRoot = value;\n    } else if (argument === '--force') {\n      force = true;\n    } else {\n      throw new Error(`Unknown option: ${String(argument)}`);\n    }\n  }\n  if (!harness) throw new Error('--harness is required');\n  return { action, harness, projectRoot, force };\n}\n\nfunction writeJson(stream: Pick<NodeJS.WriteStream, 'write'>, value: unknown): void {\n  stream.write(`${JSON.stringify(value, null, 2)}\\n`);\n}\n\nfunction messageFor(error: unknown): string {\n  return error instanceof Error ? error.message : String(error);\n}\n\nif (process.argv[1]?.replaceAll('\\\\', '/').endsWith('/skill-cli.js')) {\n  runSkillCli(process.argv.slice(2)).then((status) => {\n    process.exitCode = status;\n  });\n}\n","sourceCodeStart":78,"sourceCodeEnd":113,"githubUrl":"https://github.com/ReactiveX/rxjs/blob/54796b38a57e6309f9861e174737479bb3f63f61/packages/migrate/src/skill-cli.ts#L78-L113","documentation":"Thrown by parseSkillArguments when argument parsing finishes without any --harness value. Every skill CLI action requires an explicit harness because it determines the target install layout.","triggerScenarios":"Running rxjs-migrate-skill install with only --project-root or --force and no --harness flag at all.","commonSituations":"Forgetting the harness; assuming it defaults to the detected environment.","solutions":["Add --harness codex|claude|cursor to the command","Script templates should interpolate the harness variable and fail loudly when it is empty"],"exampleFix":"# before\nrxjs-migrate-skill install --project-root .\n# after\nrxjs-migrate-skill install --harness claude --project-root .","handlingStrategy":"validation","validationCode":"if (!argv.includes('--harness')) { console.error('--harness is required'); process.exit(2); }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Template commands with a non-empty harness variable","Fail fast in scripts on missing config"],"tags":["cli","arguments","required-option"],"backgroundTag":"missing-required-cli-option","analyzedSha":"54796b38a57e6309f9861e174737479bb3f63f61","analyzedAt":"2026-08-28T10:21:27.410Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}