affaan-m/ECC · error
! ${contextDir}: invalid meta.json, continuing with defaults
Error message
! ${contextDir}: invalid meta.json, continuing with defaults (${e.message}) What it means
The CK context migration script could not JSON-parse a context's meta.json (the parse exception is included), so instead of failing it continues the v1-to-v2 migration using default metadata. A non-fatal warning: migration proceeds with defaults.
Source
Thrown at skills/ck/commands/migrate.mjs:118
if (existing.version === 2) {
console.log(` ✓ ${contextDir} — already v2, skipping`);
skipped++;
continue;
}
} catch { /* fall through to migrate */ }
}
console.log(`\n → Migrating: ${contextDir}`);
try {
// Read v1 files
const contextMd = existsSync(contextMdPath) ? readFileSync(contextMdPath, 'utf8') : '';
let meta = {};
if (existsSync(metaPath)) {
try {
meta = JSON.parse(readFileSync(metaPath, 'utf8'));
} catch (e) {
console.warn(` ! ${contextDir}: invalid meta.json, continuing with defaults (${e.message})`);
}
}
// Extract fields from CONTEXT.md
const description = extractSection(contextMd, 'What This Is') || extractSection(contextMd, 'About') || null;
const stackRaw = extractSection(contextMd, 'Tech Stack') || '';
const stack = stackRaw.split(/[,\n]/).map(s => s.replace(/^[-*]\s+/, '').trim()).filter(Boolean);
const goal = (extractSection(contextMd, 'Current Goal') || '').split('\n')[0].trim() || null;
const constraintRaw = extractSection(contextMd, 'Do Not Do') || '';
const constraints = parseBullets(constraintRaw);
const decisionsRaw = extractSection(contextMd, 'Decisions Made') || '';
const decisions = parseDecisionsTable(decisionsRaw);
const nextStepsRaw = extractSection(contextMd, 'Next Steps') || '';
const nextSteps = parseBullets(nextStepsRaw);
const blockersRaw = extractSection(contextMd, 'Blockers') || '';
const blockers = parseBullets(blockersRaw).filter(b => b.toLowerCase() !== 'none');
const leftOffRaw = extractSection(contextMd, 'Where I Left Off') || '';
const leftOffParsed = parseLeftOff(leftOffRaw);View on GitHub (pinned to 06c5e118c4)
Solutions
- Fix or delete the invalid meta.json in the context directory so defaults are not silently used.
- Validate meta.json against the expected schema to find the malformed field.
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at skills/ck/commands/migrate.mjs:118 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of affaan-m/ECC@06c5e118c4 (2026-08-18).
Data as JSON: /api/errors/0b5b930518627f75.
Report an issue: GitHub.