{"record":{"id":"2aa8ea06662c36ff","repo":"affaan-m/ECC","slug":"missing-value-for-argname","errorCode":null,"errorMessage":"Missing value for ${argName}","messagePattern":"Missing value for (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"scripts/skills-health.js","lineNumber":29,"sourceCode":"Options:\n  --json                  Emit machine-readable JSON\n  --skills-root <path>    Override curated skills root\n  --learned-root <path>   Override learned skills root\n  --imported-root <path>  Override imported skills root\n  --home <path>           Override home directory for learned/imported skill roots\n  --runs-file <path>      Override skill run JSONL path\n  --now <timestamp>       Override current time for deterministic reports\n  --dashboard             Show rich health dashboard with charts\n  --panel <name>          Show only a specific panel (success-rate, failures, amendments, versions)\n  --warn-threshold <n>    Decline sensitivity threshold (default: 0.1)\n  --help                  Show this help text\n`);\n}\n\nfunction requireValue(argv, index, argName) {\n  const value = argv[index + 1];\n  if (!value || value.startsWith('--')) {\n    throw new Error(`Missing value for ${argName}`);\n  }\n\n  return value;\n}\n\nfunction parseArgs(argv) {\n  const options = {};\n\n  for (let index = 0; index < argv.length; index += 1) {\n    const arg = argv[index];\n\n    if (arg === '--json') {\n      options.json = true;\n      continue;\n    }\n\n    if (arg === '--help' || arg === '-h') {\n      options.help = true;","sourceCodeStart":11,"sourceCodeEnd":47,"githubUrl":"https://github.com/affaan-m/ECC/blob/01e15490f04e29cfefe3896951f43db46994d8ee/scripts/skills-health.js#L11-L47","documentation":"Thrown by requireValue() in skills-health.js when a value-taking flag (--runs-file, --now, --panel, --warn-threshold) is followed by no token or by a token beginning with '--'. As with other ECC CLIs, the parser refuses to consume a neighboring flag as a value.","triggerScenarios":"`node scripts/skills-health.js --panel` with nothing after; `--warn-threshold --json` (the boolean flag is read as the threshold); a dropped/quoted value.","commonSituations":"Trailing value-flag at end of command; reordering flags so they collide; typos where the user expected a boolean.","solutions":["Supply the value right after the flag: `--panel failures`.","Use a numeric for --warn-threshold (e.g. `--warn-threshold 0.2`).","Re-run with --help to confirm which flags take values."],"exampleFix":"# before\nnode scripts/skills-health.js --panel --json\n# after\nnode scripts/skills-health.js --panel failures --json","handlingStrategy":"validation","validationCode":"const VALUE_FLAGS = new Set(['--runs-file', '--now', '--panel', '--warn-threshold']);\nfor (let i = 0; i < argv.length; i += 1) {\n  if (VALUE_FLAGS.has(argv[i]) && (!argv[i + 1] || argv[i + 1].startsWith('--'))) {\n    throw new Error(`Missing value for ${argv[i]}`);\n  }\n}","typeGuard":null,"tryCatchPattern":"try { parseArgs(process.argv.slice(2)); } catch (err) { console.error(err.message); showHelp(); process.exit(2); }","preventionTips":["Pre-flight value-flags before invoking skills-health.","Use `--flag=value` form to prevent adjacent-flag collisions."],"tags":["cli","argument-parsing","skills-health"],"backgroundTag":null,"analyzedSha":"01e15490f04e29cfefe3896951f43db46994d8ee","analyzedAt":"2026-08-13T00:31:08.655Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}