pbakaus/impeccable · error · Error
concept-seed: --platform must be one of ${COMPOSITION_PLATFO
Error message
concept-seed: --platform must be one of ${COMPOSITION_PLATFORMS.join(', ')} What it means
Thrown when `platform` is set to a value not in COMPOSITION_PLATFORMS = [web, ios, android]. Platform is optional (default null). Note 'adaptive' is deliberately excluded — it is a project-level value meaning both native targets, not a property of a single composition. The dynamic message interpolates the allowed list.
Source
Thrown at skill/scripts/concept-seed.mjs:330
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');
}
const unit = (salt) => {
const h = crypto.createHash('sha256').update(`${scope}:${salt}:${key}`).digest();
return h.readUInt32BE(0) / 0xffffffff;
};
const indexSalt = reroll === 0 ? 'index' : `index:reroll-${reroll}`;
const buildIndex = 3 + Math.floor(unit(indexSalt) * (candidateCount - 2)); // 3..candidateCount
// Surface scope deals a hand of three grounded structures: one card is not
// a choice, and the full ranked list would hand selection back to the
// model's taste. The dice pick all three; the primary index leads. The
// no-lineup rule stays direction-only, where it was written for worlds.
const dealtIndices = [buildIndex];
for (let draw = 0; scope === 'surface' && dealtIndices.length < Math.min(3, candidateCount); draw += 1) {
const idx = 1 + Math.floor(unit(`${indexSalt}:deal-${draw}`) * candidateCount);
if (!dealtIndices.includes(idx)) dealtIndices.push(idx);View on GitHub (pinned to d14711ae3d)
Solutions
- Use exactly web, ios, or android, or omit platform / pass null.
- If you meant 'both native targets', that is the project-level 'adaptive' concept and is not valid here — pick web, ios, or android per composition.
Example fix
// before
await seedConcepts({ scope: 'surface', platform: 'mobile' });
// after
await seedConcepts({ scope: 'surface', platform: 'ios' }); // or web|android Defensive patterns
Strategy: type-guard
Type guard
import { COMPOSITION_PLATFORMS, isPlatform } from './lib/roll-selection.mjs';
function isValidPlatform(v) {
return v == null || isPlatform(v);
} Prevention
- Use web, ios, or android only, or omit / pass null.
- 'adaptive' is a project-level value and is intentionally rejected at the composition level.
- Do not pass 'mobile'/'desktop'; pick web/ios/android explicitly.
When it happens
Trigger: Passing 'mobile', 'desktop', 'native'; passing 'adaptive' (rejected); passing 'macos' or 'windows'; confusing platform with grain.
Common situations: Assuming 'mobile' covers ios+android; trying to use the project-level 'adaptive' value at the composition level; a caller forwarding an OS string from the runtime.
Related errors
- concept-seed: --scope must be direction or surface
- concept-seed: --register must be safer or bolder
- concept-seed: --mode must be persuade, operate, read, or exp
- concept-seed: --grain must be one of ${COMPOSITION_GRAINS.jo
- concept-seed: --reroll must be a non-negative integer
AI-assisted analysis of pbakaus/impeccable@d14711ae3d (2026-08-13).
Data as JSON: /api/errors/76ea1330ab5d6933.
Report an issue: GitHub.