affaan-m/ECC · error · Error
docs/zh-CN/AGENTS.md is missing the catalog summary line
Error message
docs/zh-CN/AGENTS.md is missing the catalog summary line
What it means
parseZhAgentsDocExpectations throws when docs/zh-CN/AGENTS.md lacks the summary line matching '提供 N 个专业代理、N 项技能、N 条命令'. It fires when the Chinese AGENTS translation drops or rewords the catalog counts sentence, so zh expectations cannot be parsed.
Solutions
- Restore the Chinese catalog summary line with correct counts in docs/zh-CN/AGENTS.md.
- Regenerate the localized AGENTS.md via catalog tooling.
- Update the summaryMatch regex only for sanctioned wording changes.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at scripts/ci/catalog.js:279 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of affaan-m/ECC@8321021c54 (2026-09-16).
Data as JSON: /api/errors/a8073e97f66f271f.
Report an issue: GitHub.
Appendix: source
Thrown at scripts/ci/catalog.js:279
if (!match) {
throw new Error(`${pattern.source} is missing the ${pattern.category} entry`);
}
expectations.push({
category: pattern.category,
mode: pattern.mode === 'minimum' && match[2] ? 'minimum' : pattern.mode,
expected: Number(match[1]),
source: `${pattern.source} (${pattern.category})`
});
}
return expectations;
}
function parseZhAgentsDocExpectations(agentsContent) {
const summaryMatch = agentsContent.match(/提供\s+(\d+)\s+个专业代理、\s*(\d+)(\+)?\s*项技能、\s*(\d+)\s+条命令/i);
if (!summaryMatch) {
throw new Error('docs/zh-CN/AGENTS.md is missing the catalog summary line');
}
const expectations = [
{ category: 'agents', mode: 'exact', expected: Number(summaryMatch[1]), source: 'docs/zh-CN/AGENTS.md summary' },
{
category: 'skills',
mode: summaryMatch[3] ? 'minimum' : 'exact',
expected: Number(summaryMatch[2]),
source: 'docs/zh-CN/AGENTS.md summary'
},
{ category: 'commands', mode: 'exact', expected: Number(summaryMatch[4]), source: 'docs/zh-CN/AGENTS.md summary' }
];
const structurePatterns = [
{
category: 'agents',
mode: 'exact',
regex: /^\s*agents\/\s*[—–-]\s*(\d+)\s+个专业子代理\s*$/im,View on GitHub (pinned to 8321021c54)