{"record":{"id":"61b062b97d01c981","repo":"affaan-m/ECC","slug":"agents-md-is-missing-the-catalog-summary-line","errorCode":null,"errorMessage":"AGENTS.md is missing the catalog summary line","messagePattern":"AGENTS\\.md is missing the catalog summary line","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"scripts/ci/catalog.js","lineNumber":224,"sourceCode":"    if (!match) {\n      throw new Error(`${pattern.source} is missing the ${pattern.category} row`);\n    }\n\n    expectations.push({\n      category: pattern.category,\n      mode: 'exact',\n      expected: Number(match[1]),\n      source: `${pattern.source} (${pattern.category})`\n    });\n  }\n\n  return expectations;\n}\n\nfunction parseAgentsDocExpectations(agentsContent) {\n  const summaryMatch = agentsContent.match(/providing\\s+(\\d+)\\s+specialized agents,\\s+(\\d+)(\\+)?\\s+skills,\\s+(\\d+)\\s+commands/i);\n  if (!summaryMatch) {\n    throw new Error('AGENTS.md is missing the catalog summary line');\n  }\n\n  const expectations = [\n    { category: 'agents', mode: 'exact', expected: Number(summaryMatch[1]), source: 'AGENTS.md summary' },\n    {\n      category: 'skills',\n      mode: summaryMatch[3] ? 'minimum' : 'exact',\n      expected: Number(summaryMatch[2]),\n      source: 'AGENTS.md summary'\n    },\n    { category: 'commands', mode: 'exact', expected: Number(summaryMatch[4]), source: 'AGENTS.md summary' }\n  ];\n\n  const structurePatterns = [\n    {\n      category: 'agents',\n      mode: 'exact',\n      regex: /^\\s*agents\\/\\s*[—–-]\\s*(\\d+)\\s+specialized subagents\\s*$/im,","sourceCodeStart":206,"sourceCodeEnd":242,"githubUrl":"https://github.com/affaan-m/ECC/blob/8321021c54d670126ce3b2969d5deb880b4b0c2a/scripts/ci/catalog.js#L206-L242","documentation":"parseAgentsDocExpectations throws when AGENTS.md lacks the summary line matching 'providing N specialized agents, N skills, and N commands'. It fires when the header summary is reworded or the counts are dropped, so the doc-derived expectations for agents/skills/commands cannot be built.","triggerScenarios":"Thrown at scripts/ci/catalog.js:224 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Restore the summary sentence in AGENTS.md with current counts.","Regenerate AGENTS.md counts via the catalog write mode.","Adjust the summaryMatch regex if the sentence format intentionally 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"}