pbakaus/impeccable · error · Error

concept-seed: every challenger tier needs at least one appro

Error message

concept-seed: every challenger tier needs at least one approved concept

What it means

Thrown by selectApprovedChallengers() in skill/scripts/lib/roll-selection.mjs when at least one of the three well tiers (WELL_TIERS = graphic, interaction, atmosphere) has zero approved concepts. The roll draws two challengers per tier so every tier must have a non-empty approved pool before mode/rating filters are applied; an empty tier would starve the roll.

Source

Thrown at skill/scripts/lib/roll-selection.mjs:170

export function* selectApprovedChallengers({ scope, key, reroll = 0, minRating = null, mode = null, concepts }) {
  const approved = concepts.filter(concept => concept.status === 'approved');
  // Direction chooses a durable identity, so it draws worlds; surface designs
  // one page inside a committed identity, so it draws compositions. Duals serve
  // both. A tier with no matching-strength approvals falls back to its full
  // approved pool rather than starving the roll.
  const wanted = scope === 'direction'
    ? new Set(['world', 'dual'])
    : new Set(['composition', 'dual']);

  const approvedByTier = new Map();
  for (const concept of approved) {
    const tier = approvedByTier.get(concept.wellTier) || [];
    tier.push(concept);
    approvedByTier.set(concept.wellTier, tier);
  }
  if (WELL_TIERS.some(tier => !(approvedByTier.get(tier) || []).length)) {
    throw new Error('concept-seed: every challenger tier needs at least one approved concept');
  }

  // Optional minimum-rating gate, applied per tier and skipped for any tier it
  // would empty, so a thin tier degrades to its full approved pool.
  if (minRating) {
    for (const [tier, pool] of approvedByTier) {
      const rated = pool.filter(concept => (concept.review?.rating || 0) >= minRating);
      if (rated.length > 0) approvedByTier.set(tier, rated);
    }
  }
  // Mode eligibility, per tier and skipped where it would empty a tier. Worlds
  // used to be drawn with no mode awareness at all, so a build asking for an app
  // UI could get six worlds that only make sense on a landing page. A world is an
  // identity and identities transfer further than compositions do, so this is a
  // ceiling the reviewer sets rather than a category assignment: eligible
  // everywhere until someone says otherwise.
  if (mode) {
    for (const [tier, pool] of approvedByTier) {

View on GitHub (pinned to d14711ae3d)

Solutions

  1. Review and approve at least one concept in each of the graphic, interaction, and atmosphere tiers, then re-run the roll.
  2. Check that each approved concept actually has wellTier set to one of the three tier strings — a missing/misspelled wellTier leaves the tier empty.
  3. If a tier genuinely has no concepts, generate/seed concepts for that tier first via the concept-seed flow.

Example fix

// before
// concepts has approved graphic + atmosphere only, no interaction
selectApprovedChallengers({ scope: 'surface', concepts });
// after
// approve one interaction-tier concept first, then roll
Defensive patterns

Strategy: validation

Validate before calling

const TIERS = ['graphic', 'interaction', 'atmosphere'];
const approvedByTier = new Map(concepts.filter(c => c.status === 'approved').reduce((m, c) => {
  const arr = m.get(c.wellTier) || []; arr.push(c); m.set(c.wellTier, arr); return m;
}, new Map()));
if (TIERS.some(t => !(approvedByTier.get(t) || []).length)) {
  throw new Error('Approve at least one concept per tier first');
}

Type guard

function tiersFullyApproved(concepts) {
  const have = new Set(concepts.filter(c => c.status === 'approved' && c.wellTier).map(c => c.wellTier));
  return ['graphic', 'interaction', 'atmosphere'].every(t => have.has(t));
}

Prevention

When it happens

Trigger: Calling selectApprovedChallengers({ scope, concepts }) where the concepts array has no entry with status==='approved' for one or more of the graphic/interaction/atmosphere wellTier values. Common during concept-seed before all three tiers have at least one concept reviewed and approved.

Common situations: Running a design roll (direction or surface scope) before completing concept review for every tier; a tier's concepts all still in 'pending'/'rejected'; concepts missing the wellTier field so they are not bucketed.

Related errors


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