{"record":{"id":"0b5b930518627f75","repo":"affaan-m/ECC","slug":"contextdir-invalid-meta-json-continuing-wit","errorCode":null,"errorMessage":"! ${contextDir}: invalid meta.json, continuing with defaults (${e.message})","messagePattern":"! (.+?): invalid meta\\.json, continuing with defaults \\((.+?)\\)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"skills/ck/commands/migrate.mjs","lineNumber":118,"sourceCode":"      if (existing.version === 2) {\n        console.log(`  ✓ ${contextDir} — already v2, skipping`);\n        skipped++;\n        continue;\n      }\n    } catch { /* fall through to migrate */ }\n  }\n\n  console.log(`\\n  → Migrating: ${contextDir}`);\n\n  try {\n    // Read v1 files\n    const contextMd = existsSync(contextMdPath) ? readFileSync(contextMdPath, 'utf8') : '';\n    let meta = {};\n    if (existsSync(metaPath)) {\n      try {\n        meta = JSON.parse(readFileSync(metaPath, 'utf8'));\n      } catch (e) {\n        console.warn(`  ! ${contextDir}: invalid meta.json, continuing with defaults (${e.message})`);\n      }\n    }\n\n    // Extract fields from CONTEXT.md\n    const description   = extractSection(contextMd, 'What This Is') || extractSection(contextMd, 'About') || null;\n    const stackRaw      = extractSection(contextMd, 'Tech Stack') || '';\n    const stack         = stackRaw.split(/[,\\n]/).map(s => s.replace(/^[-*]\\s+/, '').trim()).filter(Boolean);\n    const goal          = (extractSection(contextMd, 'Current Goal') || '').split('\\n')[0].trim() || null;\n    const constraintRaw = extractSection(contextMd, 'Do Not Do') || '';\n    const constraints   = parseBullets(constraintRaw);\n    const decisionsRaw  = extractSection(contextMd, 'Decisions Made') || '';\n    const decisions     = parseDecisionsTable(decisionsRaw);\n    const nextStepsRaw  = extractSection(contextMd, 'Next Steps') || '';\n    const nextSteps     = parseBullets(nextStepsRaw);\n    const blockersRaw   = extractSection(contextMd, 'Blockers') || '';\n    const blockers      = parseBullets(blockersRaw).filter(b => b.toLowerCase() !== 'none');\n    const leftOffRaw    = extractSection(contextMd, 'Where I Left Off') || '';\n    const leftOffParsed = parseLeftOff(leftOffRaw);","sourceCodeStart":100,"sourceCodeEnd":136,"githubUrl":"https://github.com/affaan-m/ECC/blob/06c5e118c4d3e6c3b7f9445f973a2194c82de193/skills/ck/commands/migrate.mjs#L100-L136","documentation":"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.","triggerScenarios":"Thrown at skills/ck/commands/migrate.mjs:118 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"06c5e118c4d3e6c3b7f9445f973a2194c82de193","analyzedAt":"2026-08-18T11:27:13.915Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}