{"record":{"id":"c41fc303bfbfc936","repo":"affaan-m/ECC","slug":"readme-md-is-missing-the-quick-start-catalog-summa","errorCode":null,"errorMessage":"README.md is missing the quick-start catalog summary","messagePattern":"README\\.md is missing the quick-start catalog summary","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"scripts/ci/catalog.js","lineNumber":95,"sourceCode":"  }\n}\n\nfunction replaceOrThrow(content, regex, replacer, source) {\n  if (!regex.test(content)) {\n    throw new Error(`${source} is missing the expected catalog marker`);\n  }\n\n  return content.replace(regex, replacer);\n}\n\nfunction parseReadmeExpectations(readmeContent) {\n  const expectations = [];\n\n  const quickStartMatch = readmeContent.match(\n    /access to\\s+(\\d+)\\s+agents,\\s+(\\d+)\\s+skills,\\s+and\\s+(\\d+)\\s+(?:commands|legacy command shims?)/i\n  );\n  if (!quickStartMatch) {\n    throw new Error('README.md is missing the quick-start catalog summary');\n  }\n\n  expectations.push(\n    { category: 'agents', mode: 'exact', expected: Number(quickStartMatch[1]), source: 'README.md quick-start summary' },\n    { category: 'skills', mode: 'exact', expected: Number(quickStartMatch[2]), source: 'README.md quick-start summary' },\n    { category: 'commands', mode: 'exact', expected: Number(quickStartMatch[3]), source: 'README.md quick-start summary' }\n  );\n\n  const projectTreeAgentsMatch = readmeContent.match(/^\\|\\s*--\\s*agents\\/\\s*#\\s*(\\d+)\\s+specialized subagents for delegation\\s*$/im);\n  if (!projectTreeAgentsMatch) {\n    throw new Error('README.md project tree is missing the agents count');\n  }\n\n  expectations.push({\n    category: 'agents',\n    mode: 'exact',\n    expected: Number(projectTreeAgentsMatch[1]),\n    source: 'README.md project tree (agents)'","sourceCodeStart":77,"sourceCodeEnd":113,"githubUrl":"https://github.com/affaan-m/ECC/blob/01e15490f04e29cfefe3896951f43db46994d8ee/scripts/ci/catalog.js#L77-L113","documentation":"classify_events() shells out to the `claude` CLI (`claude -p <prompt> --model <model> --output-format text`) to classify tool calls against compliance steps. If the subprocess exits with a non-zero return code, the function raises a RuntimeError embedding the exit code and the first 500 characters of stderr, because classification cannot proceed without a valid LLM response. The subprocess call has a 60-second timeout.","triggerScenarios":"The `claude` CLI binary is not installed or not on PATH (ENOENT); the --model name is invalid or unavailable; the CLI's auth token is missing/expired; the prompt is too large for the model's context window; the CLI hits an internal error; the 60-second timeout fires and the process is killed (non-zero exit).","commonSituations":"Running in a headless/CI environment without the claude CLI installed; passing a model name the local CLI does not support; expired or missing authentication; a very large trace that exceeds the model context limit; transient CLI/network failure.","solutions":["Confirm `claude` is installed and on PATH: shutil.which('claude') returns a path.","Read the embedded stderr snippet (err message) — it usually names the real cause (auth, model, overload).","Retry with a smaller trace (fewer events) or a supported model name.","Ensure the CLI is authenticated in the running environment (run `claude` interactively once)."],"exampleFix":"# before\nclassify_events(spec, trace, model='haiku')  # RuntimeError if claude missing\n\n# after\nimport shutil\nif not shutil.which('claude'):\n    raise SystemExit('claude CLI not found on PATH — install and authenticate it first')\ntry:\n    result = classify_events(spec, trace, model='haiku')\nexcept RuntimeError as e:\n    logger.error('classifier failed: %s', e)\n    result = {}","handlingStrategy":"try-catch","validationCode":"# Verify the claude CLI exists and is authenticated before classifying.\nimport shutil\nif not shutil.which('claude'):\n    raise SystemExit('claude CLI not found on PATH — install and authenticate it first')","typeGuard":"import shutil\n\ndef claude_cli_available() -> bool:\n    return shutil.which('claude') is not None","tryCatchPattern":"try:\n    result = classify_events(spec, trace, model='haiku')\nexcept RuntimeError as e:\n    # e.args[0] contains 'rc=<code>: <stderr excerpt>' — inspect it.\n    logger.error('classifier subprocess failed: %s', e)\n    # degrade gracefully: skip classification, or retry with a smaller trace\n    result = {}","preventionTips":["Ensure the `claude` CLI is installed, on PATH, and authenticated in every environment that runs classification.","Keep traces small — very large traces blow the context window and slow the subprocess toward the 60s timeout.","Log the embedded stderr excerpt; it usually pinpoints auth, model, or overload failures.","Treat a classifier failure as degradable (return empty mapping) only if your pipeline tolerates missing classifications."],"tags":["subprocess","claude-cli","llm","compliance","external-dependency"],"backgroundTag":null,"analyzedSha":"01e15490f04e29cfefe3896951f43db46994d8ee","analyzedAt":"2026-08-13T00:31:08.655Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}