{"record":{"id":"c608a4b95eeccdce","repo":"pbakaus/impeccable","slug":"concept-seed-register-must-be-safer-or-bolder","errorCode":null,"errorMessage":"concept-seed: --register must be safer or bolder","messagePattern":"concept-seed: --register must be safer or bolder","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugin/skills/impeccable/scripts/concept-seed.mjs","lineNumber":313,"sourceCode":"  scope = 'surface',\n  key = process.env.IMPECCABLE_CONCEPT_SEED || crypto.randomBytes(4).toString('hex'),\n  reroll = 0,\n  register = null,\n  mode = null,\n  grain = null,\n  platform = null,\n  candidateCount = 7,\n  catalogDir = CATALOG_DIR,\n  _resolvedData = undefined,\n} = {}) {\n  if (scope !== 'surface' && scope !== 'direction') {\n    throw new Error('concept-seed: --scope must be direction or surface');\n  }\n  if (!Number.isInteger(reroll) || reroll < 0) {\n    throw new Error('concept-seed: --reroll must be a non-negative integer');\n  }\n  if (register !== null && register !== 'safer' && register !== 'bolder') {\n    throw new Error('concept-seed: --register must be safer or bolder');\n  }\n  if (register !== null && reroll < 1) {\n    throw new Error('concept-seed: --register steers a re-roll round; pass --reroll <n> with it');\n  }\n  if (register !== null && scope !== 'direction') {\n    throw new Error('concept-seed: --register applies to direction rounds only');\n  }\n  if (mode !== null && !SEED_MODES.has(mode)) {\n    throw new Error('concept-seed: --mode must be persuade, operate, read, or experience');\n  }\n  // Grain needs no mode: how much of the product is in play is independent of\n  // which register of work it is.\n  if (grain !== null && !COMPOSITION_GRAINS.includes(grain)) {\n    throw new Error(`concept-seed: --grain must be one of ${COMPOSITION_GRAINS.join(', ')}`);\n  }\n  if (platform !== null && !COMPOSITION_PLATFORMS.includes(platform)) {\n    throw new Error(`concept-seed: --platform must be one of ${COMPOSITION_PLATFORMS.join(', ')}`);\n  }","sourceCodeStart":295,"sourceCodeEnd":331,"githubUrl":"https://github.com/pbakaus/impeccable/blob/d14711ae3d1a1dd62dee61a358d27f107c51ccd0/plugin/skills/impeccable/scripts/concept-seed.mjs#L295-L331","documentation":"Thrown when --register is provided but is not one of 'safer' or 'bolder'. The register is an optional user-steering axis on the familiar-to-bold scale applied to a direction re-roll round; null/undefined means 'no steering' and is allowed, but any other value must be exactly 'safer' or 'bolder'.","triggerScenarios":"Passing --register with a typo ('bold', 'safe', 'conservative', 'aggressive') or an unsupported value. The check is register === null || register === 'safer' || register === 'bolder'.","commonSituations":"CLI typo; a wrapper script passing a free-text register; confusion with synonyms (conservative/aggressive).","solutions":["Use exactly --register safer or --register bolder (or omit for no steering).","Programmatic callers should pass register: null when no steering is desired."],"exampleFix":"# before\n$ node concept-seed.mjs --scope direction --reroll 1 --register bold ...\n\n# after\n$ node concept-seed.mjs --scope direction --reroll 1 --register bolder ...","handlingStrategy":"validation","validationCode":"const REGISTERS = new Set(['safer', 'bolder']);\nif (register != null && !REGISTERS.has(register)) {\n  throw new Error('--register must be safer or bolder');\n}","typeGuard":"function isValidRegister(value) {\n  return value == null || value === 'safer' || value === 'bolder';\n}","tryCatchPattern":"try {\n  await seedConcepts({ scope: 'direction', register });\n} catch (err) {\n  if (/--register must be safer or bolder/.test(err.message)) {\n    console.error('Use --register safer, --register bolder, or omit it.');\n  } else throw err;\n}","preventionTips":["Parse --register as an enum at the CLI boundary.","Normalize synonyms (bold/bolder) in the CLI layer, not the seeder.","Document that omitting the flag is a valid 'no steering' state."],"tags":["concept-seed","validation","register","cli-args"],"backgroundTag":null,"analyzedSha":"d14711ae3d1a1dd62dee61a358d27f107c51ccd0","analyzedAt":"2026-08-13T00:52:25.771Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}