{"record":{"id":"fdc81b767006fa5b","repo":"pbakaus/impeccable","slug":"concept-seed-register-applies-to-direction-roun","errorCode":null,"errorMessage":"concept-seed: --register applies to direction rounds only","messagePattern":"concept-seed: --register applies to direction rounds only","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugin/skills/impeccable/scripts/concept-seed.mjs","lineNumber":319,"sourceCode":"  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  }\n  if (!Number.isInteger(candidateCount) || candidateCount < 5 || candidateCount > 7) {\n    throw new Error('concept-seed: --candidate-count must be an integer from 5 to 7');\n  }\n  const unit = (salt) => {\n    const h = crypto.createHash('sha256').update(`${scope}:${salt}:${key}`).digest();\n    return h.readUInt32BE(0) / 0xffffffff;","sourceCodeStart":301,"sourceCodeEnd":337,"githubUrl":"https://github.com/pbakaus/impeccable/blob/d14711ae3d1a1dd62dee61a358d27f107c51ccd0/plugin/skills/impeccable/scripts/concept-seed.mjs#L301-L337","documentation":"Thrown when --register is set but --scope is not 'direction'. Registers (safer/bolder) only steer direction rounds; surface scope has a different deal structure (three grounded structures, no lineup) where the register concept does not apply.","triggerScenarios":"Passing --register safer|bolder with --scope surface. The guard is register !== null && scope !== 'direction'.","commonSituations":"User wants a bolder surface; a wrapper always forwards the register flag regardless of scope; confusion that register is a direction-only axis.","solutions":["Drop --register when using --scope surface (the surface deal does not support it).","If you want register steering, use --scope direction --reroll <n> --register safer|bolder."],"exampleFix":"# before\n$ node concept-seed.mjs --scope surface --reroll 1 --register bolder ...\n\n# after\n$ node concept-seed.mjs --scope surface --reroll 1 ...","handlingStrategy":"validation","validationCode":"if (register != null && scope !== 'direction') {\n  throw new Error('--register applies only to --scope direction');\n}","typeGuard":"function registerScopePairValid(register, scope) {\n  return register == null || scope === 'direction';\n}","tryCatchPattern":"try {\n  await seedConcepts({ scope, register });\n} catch (err) {\n  if (/register applies to direction rounds only/.test(err.message)) {\n    console.error('Drop --register when using --scope surface.');\n  } else throw err;\n}","preventionTips":["In the CLI, hide/disable the --register option when --scope is surface.","Document that register is a direction-only axis.","Validate the register+scope pair before calling the seeder."],"tags":["concept-seed","validation","register","scope","cli-args"],"backgroundTag":null,"analyzedSha":"d14711ae3d1a1dd62dee61a358d27f107c51ccd0","analyzedAt":"2026-08-13T00:52:25.771Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}