{"record":{"id":"8c79030128575f6e","repo":"affaan-m/ECC","slug":"readme-md-project-tree-is-missing-the-agents-count","errorCode":null,"errorMessage":"README.md project tree is missing the agents count","messagePattern":"README\\.md project tree is missing the agents count","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"scripts/ci/catalog.js","lineNumber":106,"sourceCode":"function 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)'\n  });\n\n  const tablePatterns = [\n    { category: 'agents', regex: /\\|\\s*(?:\\*\\*)?Agents(?:\\*\\*)?\\s*\\|\\s*(?:(?:PASS:|\\u2705)\\s*)?(\\d+)\\s+agents\\s*\\|/i, source: 'README.md comparison table' },\n    { category: 'commands', regex: /\\|\\s*(?:\\*\\*)?Commands(?:\\*\\*)?\\s*\\|\\s*(?:(?:PASS:|\\u2705)\\s*)?(\\d+)\\s+commands(?:\\s*\\([^)]*\\))?\\s*\\|/i, source: 'README.md comparison table' },\n    { category: 'skills', regex: /\\|\\s*(?:\\*\\*)?Skills(?:\\*\\*)?\\s*\\|\\s*(?:(?:PASS:|\\u2705)\\s*)?(\\d+)\\s+skills\\s*\\|/i, source: 'README.md comparison table' }\n  ];\n\n  for (const pattern of tablePatterns) {\n    const match = readmeContent.match(pattern.regex);\n    if (!match) {","sourceCodeStart":88,"sourceCodeEnd":124,"githubUrl":"https://github.com/affaan-m/ECC/blob/8321021c54d670126ce3b2969d5deb880b4b0c2a/scripts/ci/catalog.js#L88-L124","documentation":"parseReadmeExpectations throws when the README project-tree block lacks the 'agents/' line with its count (e.g. 'agents/ — 68 specialized subagents'). It fires when the tree was restructured, the count line deleted, or its formatting changed so the expected regex no longer matches.","triggerScenarios":"Thrown at scripts/ci/catalog.js:106 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Re-add the agents entry with its count to the README.md project tree.","Use the catalog script's write mode to regenerate the tree counts.","Adjust the projectTreeAgentsMatch regex if the tree format legitimately changed."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8321021c54d670126ce3b2969d5deb880b4b0c2a","analyzedAt":"2026-09-16T10:08:13.343Z","contentChangedAt":"2026-09-16T10:08:13.343Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}