pbakaus/impeccable · error

concept-seed: --register steers a re-roll round; pass --rero

Error message

concept-seed: --register steers a re-roll round; pass --reroll <n> with it

What it means

Thrown when --register is set but --reroll is less than 1. Registers only apply to re-roll rounds (they steer what a non-first round instructs), so passing a register on round 0 is meaningless and rejected. This guards against silently ignoring the flag.

Source

Thrown at plugin/skills/impeccable/scripts/concept-seed.mjs:316

  register = null,
  mode = null,
  grain = null,
  platform = null,
  candidateCount = 7,
  catalogDir = CATALOG_DIR,
  _resolvedData = undefined,
} = {}) {
  if (scope !== 'surface' && scope !== 'direction') {
    throw new Error('concept-seed: --scope must be direction or surface');
  }
  if (!Number.isInteger(reroll) || reroll < 0) {
    throw new Error('concept-seed: --reroll must be a non-negative integer');
  }
  if (register !== null && register !== 'safer' && register !== 'bolder') {
    throw new Error('concept-seed: --register must be safer or bolder');
  }
  if (register !== null && reroll < 1) {
    throw new Error('concept-seed: --register steers a re-roll round; pass --reroll <n> with it');
  }
  if (register !== null && scope !== 'direction') {
    throw new Error('concept-seed: --register applies to direction rounds only');
  }
  if (mode !== null && !SEED_MODES.has(mode)) {
    throw new Error('concept-seed: --mode must be persuade, operate, read, or experience');
  }
  // Grain needs no mode: how much of the product is in play is independent of
  // which register of work it is.
  if (grain !== null && !COMPOSITION_GRAINS.includes(grain)) {
    throw new Error(`concept-seed: --grain must be one of ${COMPOSITION_GRAINS.join(', ')}`);
  }
  if (platform !== null && !COMPOSITION_PLATFORMS.includes(platform)) {
    throw new Error(`concept-seed: --platform must be one of ${COMPOSITION_PLATFORMS.join(', ')}`);
  }
  if (!Number.isInteger(candidateCount) || candidateCount < 5 || candidateCount > 7) {
    throw new Error('concept-seed: --candidate-count must be an integer from 5 to 7');
  }

View on GitHub (pinned to d14711ae3d)

Solutions

  1. Pair --register with --reroll >= 1 (e.g. --reroll 1 --register bolder).
  2. If you want steering on the first draw, note that registers are defined only for re-roll rounds; rerun the base key at --reroll 1 instead.

Example fix

# before
$ node concept-seed.mjs --scope direction --register bolder ...
# (reroll defaults to 0)

# after
$ node concept-seed.mjs --scope direction --reroll 1 --register bolder ...
Defensive patterns

Strategy: validation

Validate before calling

if (register != null && !(Number.isInteger(reroll) && reroll >= 1)) {
  throw new Error('--register requires --reroll >= 1');
}

Type guard

function registerRerollPairValid(register, reroll) {
  return register == null || (Number.isInteger(reroll) && reroll >= 1);
}

Try / catch

try {
  await seedConcepts({ scope: 'direction', register, reroll });
} catch (err) {
  if (/register steers a re-roll round/.test(err.message)) {
    console.error('Pair --register with --reroll >= 1.');
  } else throw err;
}

Prevention

When it happens

Trigger: Passing --register safer|bolder together with --reroll 0 (or omitting --reroll, which defaults to 0). The guard is register !== null && reroll < 1.

Common situations: User wants steering on the first round; forgetting that register is a re-roll-only concept; a UI that exposes both controls independently.

Related errors


AI-assisted analysis of pbakaus/impeccable@d14711ae3d (2026-08-13). Data as JSON: /api/errors/a05e77a3b3859555. Report an issue: GitHub.