{"record":{"id":"4ac08aa303c37dce","repo":"affaan-m/ECC","slug":"skills-amendify-requires-skill-id","errorCode":null,"errorMessage":"skills:amendify requires --skill <id>","messagePattern":"skills:amendify requires --skill <id>","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"scripts/session-inspect.js","lineNumber":81,"sourceCode":"  return { target, adapterId, targetType, writePath, listAdapters, skillId, amendmentId, observationsPath };\n}\n\nfunction inspectSkillLoopTarget(target, options = {}) {\n  const observations = readSkillObservations({\n    cwd: options.cwd,\n    projectRoot: options.cwd,\n    observationsPath: options.observationsPath\n  });\n\n  if (target === 'skills:health') {\n    return buildSkillHealthReport(observations, {\n      skillId: options.skillId || null\n    });\n  }\n\n  if (target === 'skills:amendify') {\n    if (!options.skillId) {\n      throw new Error('skills:amendify requires --skill <id>');\n    }\n\n    return proposeSkillAmendment(options.skillId, observations);\n  }\n\n  if (target === 'skills:evaluate') {\n    if (!options.skillId) {\n      throw new Error('skills:evaluate requires --skill <id>');\n    }\n\n    return buildSkillEvaluationScaffold(options.skillId, observations, {\n      amendmentId: options.amendmentId || null\n    });\n  }\n\n  return null;\n}\n","sourceCodeStart":63,"sourceCodeEnd":99,"githubUrl":"https://github.com/affaan-m/ECC/blob/01e15490f04e29cfefe3896951f43db46994d8ee/scripts/session-inspect.js#L63-L99","documentation":"Thrown by session-inspect when the report target is 'skills:amendify' but options.skillId is falsy. Generating a skill amendment proposal requires knowing which skill to amend, so a missing --skill is treated as a hard precondition failure.","triggerScenarios":"Running `node scripts/session-inspect.js skills:amendify` with no --skill, or passing --skill with an empty value (which readArgValue-style parsing may strip).","commonSituations":"Forgetting that the amendify target is per-skill; copying an evaluate command and dropping --skill; auto-complete inserting the target name without the id.","solutions":["Add `--skill <skill-id>` matching a directory under skills/.","List available skills first (ls skills/) to copy the exact id.","Confirm the target name; use skills:health if you want a cross-skill overview (it does not require --skill)."],"exampleFix":"# before\nnode scripts/session-inspect.js skills:amendify\n# after\nnode scripts/session-inspect.js skills:amendify --skill tdd-workflow","handlingStrategy":"validation","validationCode":"const argv = process.argv.slice(2);\nif (argv.includes('skills:amendify')) {\n  const i = argv.indexOf('--skill');\n  if (i === -1 || !argv[i + 1]) { console.error('skills:amendify requires --skill <id>'); process.exit(2); }\n}","typeGuard":null,"tryCatchPattern":"try { buildReport({ target, skillId }); } catch (err) { console.error(err.message); process.exit(2); }","preventionTips":["Wrap skill-targeting commands in a helper that always injects --skill.","List skill ids from skills/ before constructing the command."],"tags":["cli","argument-parsing","session-inspect","skills"],"backgroundTag":null,"analyzedSha":"01e15490f04e29cfefe3896951f43db46994d8ee","analyzedAt":"2026-08-13T00:31:08.655Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}